diff --git a/.gitignore b/.gitignore index 44d35c64cc5bc0f475eea887c3b5ac844a84ceb3..dc93fe14997b53cb9c08d7d7b3a4fd49e4db0e28 100644 --- a/.gitignore +++ b/.gitignore @@ -1,11 +1,9 @@ -### IDEA ### -.idea/* +*.classpath +*.project *.iml -*/target/* -*/*.iml -fx.jpg -poster.jpg -simsunb.ttf -spy.log -Alibaba-PuHuiTi-Regular.otf -logs/* \ No newline at end of file +*.factorypath +target +.idea/ +*.log +logs +*.DS_Store diff --git a/1.png b/1.png new file mode 100644 index 0000000000000000000000000000000000000000..c3f372ba7cd533edd950e3040ada0ac55807545b Binary files /dev/null and b/1.png differ diff --git a/yshop-admin/src/main/resources/ip2region/ip2region.db b/Alibaba-PuHuiTi-Regular.otf similarity index 45% rename from yshop-admin/src/main/resources/ip2region/ip2region.db rename to Alibaba-PuHuiTi-Regular.otf index 43e1daf59a7bf34977adc6be925e5ea0d4a2cd22..5960ba1297cb4923a7e5ae93d892523bd68971ba 100644 Binary files a/yshop-admin/src/main/resources/ip2region/ip2region.db and b/Alibaba-PuHuiTi-Regular.otf differ diff --git a/LICENSE b/LICENSE index 59b38aa90bb27613c00ed3e16c3e1fb442d06457..29f81d812f3e768fa89638d1f72920dbfd1413a8 100644 --- a/LICENSE +++ b/LICENSE @@ -1,191 +1,201 @@ -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,hu peng - - 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 + 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: + + (a) You must give any other recipients of the Work or + Derivative Works a copy of this License; and + + (b) You must cause any modified files to carry prominent notices + stating that You changed the files; and + + (c) 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 + + (d) 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 [yyyy] [name of copyright owner] + + 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. diff --git a/README.md b/README.md index dcc66055503288a42eb3bb5aaeb0c1c175a7038c..bd8b3c8e3eb77a14e410b8ea6c143e157aabe198 100644 --- a/README.md +++ b/README.md @@ -1,3 +1,7 @@ +### **[B2C微服务系统、B2B2C多商户系统、餐饮点餐系统,请移步](https://www.yixiang.co)** + + +

yshop意象商城系统

#### 项目简介 @@ -11,17 +15,13 @@ yshop基于当前流行技术组合的前后端分离商城系统: SpringBoot2 | 管理后台演示地址: | https://demo2.yixiang.co | | 关注公众号点击单商户体验小程序与H5 | ![输入图片说明](https://images.gitee.com/uploads/images/2021/0121/154904_12c09826_477893.png) | -#### 重要通知 -关于log4j2漏洞说明 -- 方式一:拉最新的代码,重新打包运行应用 -- 方式二:不更新代码,直接加启动参数,如下: -- java -Dlog4j2.formatMsgNoLookups=true -jar yshop-admin-2.3.jar + #### 核心依赖 | 依赖 | 版本 | |-----------------|--------| -| Spring Boot | 2.7.10 | +| Spring Boot | 2.7.x | | weixin-java | 4.4.0 | | Spring Security | 2.7.10 | | Mybatis Plus | 3.5.2 | @@ -48,7 +48,8 @@ git clone https://gitee.com/guchengwuyue/yshopmall.git ``` 3、idea打开项目加载依赖目录如下: -![输入图片说明](https://images.gitee.com/uploads/images/2021/0811/163004_833fc53d_477893.png "test1.png") +![输入图片说明](1.png) + 4、导入数据库,配置开发环境数据库信息及其redis信息,文件路径如下: diff --git a/docker/Dockerfile b/docker/Dockerfile deleted file mode 100644 index 3e43c3b8949e5e28ed44917310e7dc2715fd93a5..0000000000000000000000000000000000000000 --- a/docker/Dockerfile +++ /dev/null @@ -1,6 +0,0 @@ -FROM openjdk:8u212-jre -MAINTAINER yshop yshop@yixiang.co - -COPY yshop-admin-2.3.jar /yshop/yshop-admin-2.3.jar - -ENTRYPOINT ["java", "-Xmx256m", "-jar", "/yshop/yshop-admin-2.3.jar"] diff --git a/docker/application/docker-compose.yml b/docker/application/docker-compose.yml deleted file mode 100644 index 1389a6e3eda2970d846722d021a3ac41fae3335e..0000000000000000000000000000000000000000 --- a/docker/application/docker-compose.yml +++ /dev/null @@ -1,10 +0,0 @@ -version: '3' - -services: - yshop-admin: - image: yshop-admin:latest - container_name: yshop-admin - ports: - - 8000:8000 - volumes: - - "/yshop/log:/log" diff --git a/docker/docker-compose.yml b/docker/docker-compose.yml deleted file mode 100644 index a3fba4233d219074804cc34b8c0f37bd31484b78..0000000000000000000000000000000000000000 --- a/docker/docker-compose.yml +++ /dev/null @@ -1,21 +0,0 @@ -version: '3' - -services: - mysql: - image: mysql:5.7 - container_name: mysql - environment: - MYSQL_ROOT_PASSWORD: 123456 - ports: - - 3306:3306 - volumes: - - /yshop/mysql/data:/var/lib/mysql #挂载 MySQL数据 - redis: - image: redis:5 - container_name: redis - command: redis-server /usr/local/etc/redis/redis.conf --appendonly yes - volumes: - - /yshop/redis/data:/data #挂载 Redis数据 - - /yshop/redis/conf/redis.conf:/usr/local/etc/redis/redis.conf #挂载 Redis配置 - ports: - - 6379:6379 diff --git a/fx.jpg b/fx.jpg new file mode 100644 index 0000000000000000000000000000000000000000..739d0c173eefe1fd60850b2057435b5a5ed4ec06 Binary files /dev/null and b/fx.jpg differ diff --git a/imgs/test1.png b/imgs/test1.png deleted file mode 100644 index 5e0cebe7ed3640f700fe79bb73462ebf47a5493d..0000000000000000000000000000000000000000 Binary files a/imgs/test1.png and /dev/null differ diff --git a/imgs/test2.png b/imgs/test2.png deleted file mode 100644 index abc0b41ad80921d3938088c9ac8b1f451ad4fb8c..0000000000000000000000000000000000000000 Binary files a/imgs/test2.png and /dev/null differ diff --git a/imgs/test3.png b/imgs/test3.png deleted file mode 100644 index 6e58dc49d1f844ff377614767abc97807dae7f80..0000000000000000000000000000000000000000 Binary files a/imgs/test3.png and /dev/null differ diff --git a/imgs/test4.png b/imgs/test4.png deleted file mode 100644 index f50119f427bf1708f9f49c4b4c867a3cb30a254e..0000000000000000000000000000000000000000 Binary files a/imgs/test4.png and /dev/null differ diff --git a/imgs/test5.png b/imgs/test5.png deleted file mode 100644 index b0801863c0f2e4717767ef1a79820fce2e39d58a..0000000000000000000000000000000000000000 Binary files a/imgs/test5.png and /dev/null differ diff --git a/imgs/test6.png b/imgs/test6.png deleted file mode 100644 index a298243b6f3710bbbdb1de3dc5e3e36edc246c16..0000000000000000000000000000000000000000 Binary files a/imgs/test6.png and /dev/null differ diff --git a/imgs/test8.png b/imgs/test8.png deleted file mode 100644 index e58f171f5c4df26c7c44d0da8aed2c7b8cbcafd6..0000000000000000000000000000000000000000 Binary files a/imgs/test8.png and /dev/null differ diff --git a/imgs/test9.png b/imgs/test9.png deleted file mode 100644 index 841fcc3fce3b69f473cdef0ca36ff88c6f4100c0..0000000000000000000000000000000000000000 Binary files a/imgs/test9.png and /dev/null differ diff --git a/pom.xml b/pom.xml index 6841f200c76603f4d9f14952b69a4ac180a864a0..e16c667fb7673d7f09cad062c4cc9daee443408a 100644 --- a/pom.xml +++ b/pom.xml @@ -7,7 +7,7 @@ co.yixiang yshop pom - 2.3 + 3.3 yshop-common @@ -15,9 +15,12 @@ yshop-admin yshop-tools yshop-generator + yshop-weixin yshop-shop yshop-mproot + yshop-mall + yshop-message yshop-oss @@ -26,30 +29,30 @@ org.springframework.boot spring-boot-starter-parent - 2.7.16 + 2.7.18 UTF-8 UTF-8 1.8 + 3.3.0 3.0.0 - 2.0.40 + 1.2.83 1.2.16 - 5.8.22 + 5.5.7 + 4.1.2 2.5.0 - 1.5.1.Final - 4.1.2 - 1.5.21 - 1.5.24 - 3.0.3 + 1.2.0.Final + 1.5.21 + 1.5.24 + 3.0.3 2.11.0 1 1.6.2 1.21 - 6.1.7.Final - 1.4.1 + 2.8.9 @@ -58,24 +61,17 @@ org.springframework.boot spring-boot-starter-web - org.springframework.boot spring-boot-starter-test test - - org.springframework.boot - spring-boot-starter-security - - org.hibernate.validator hibernate-validator ${validator.version} - org.springframework.boot spring-boot-starter-aop @@ -85,37 +81,24 @@ org.springframework.boot spring-boot-starter-cache - - - - - - org.springframework.boot spring-boot-starter-data-redis - - + + + + + + + + + @@ -138,21 +121,37 @@ springfox-swagger-ui ${swagger.version} - - - - - - - - - - + + + + + + + + + + com.github.xiaoymin knife4j-spring-boot-starter - ${xiaoymin.version} + ${github-xiaoymin.version} + + + io.swagger + swagger-models + + + io.swagger + swagger-annotations + + + + + io.swagger + swagger-models + ${swagger-models.version} + compile @@ -181,22 +180,22 @@ ${hutool.version} - - org.apache.poi - poi - ${apachepoi.version} - + + + + + org.apache.poi poi-ooxml - ${apachepoi.version} + ${poi.version} - - xerces - xercesImpl - ${xerces.version} - + + + + + @@ -205,22 +204,22 @@ ${fastjson.version} - - org.mapstruct - mapstruct-jdk8 - ${mapstruct.version} - - - org.mapstruct - mapstruct-processor - ${mapstruct.version} - provided - - - javax.inject - javax.inject - ${javax.version} - + + + + + + + + + + + + + + + + com.github.whvcse easy-captcha @@ -231,24 +230,18 @@ UserAgentUtils ${bitwalker.version} - - javax.xml.bind - jaxb-api - 2.3.0 - - - - - - - - - + + diff --git a/poster.jpg b/poster.jpg new file mode 100644 index 0000000000000000000000000000000000000000..7687578ae155404942b0dfa6dfc1a1d2568d4bb3 Binary files /dev/null and b/poster.jpg differ diff --git a/shell/jar-run2.sh b/shell/jar-run2.sh new file mode 100644 index 0000000000000000000000000000000000000000..83af76640db26c9205e92d342fe556772d539325 --- /dev/null +++ b/shell/jar-run2.sh @@ -0,0 +1,64 @@ +#cription: 启动重启server服务 +#端口号,根据此端口号确定PID +PORT=767 +#启动命令所在目录 +HOME='/home/sszn/task-agc' + +#查询出监听了test.jar端口TCP协议的程序 +pid=$(ps -ef | grep gdw-agc-task-1.0.0.0.jar | grep -v grep | awk '{print $2}') + +start(){ + echo "start running cloud-core ............... " + if [ -n "$pid" ]; then + echo "server already start,pid:$pid" + echo "pid:$pid agc-job port:$PORT 服务已经在运行了,请停止后再 执行 sh run.sh start " + return 0 + fi + #进入命令所在目录 + cd $HOME + # 启动服务控制台日志输出到nohup.out文件中 + nohup java -jar gdw-agc-task-1.0.0.0.jar >> /home/sszn/task-agc/log/agc-$(date +%Y-%m-%d).log 2>&1 & + echo "running success agc-job port:$PORT" + echo "agc-job port:$PORT 服务启动成功 ..... " +} + +stop(){ + echo "stopping running cloud-core ............... " + if [ -z "$pid" ]; then + echo "not find program on port:$PORT" + echo "agc-job port:$PORT 服务已经被关闭了请执行 sh run.sh start " + return 0 + fi + #结束程序,使用讯号2,如果不行可以尝试讯号9强制结束 + kill -9 $pid + rm -rf $pid + echo "kill program use signal 2,pid:$pid" +} + +status(){ + if [ -z "$pid" ]; then + echo "not find program on port:$PORT" + else + echo "program is running,pid:$pid" + fi +} + +case $1 in + start) + start + ;; + stop) + stop + ;; + restart) + $0 stop + sleep 2 + $0 start + ;; + status) + status + ;; + *) + echo $"Usage: $0 {start|stop|status}" + exit 0 +esac diff --git a/shell/start.sh b/shell/start.sh index 5729fd39862e8b4c71ddd11c2aaf356fb33c8d87..abaae58705775dc56b15107e2741d48ca0933624 100644 --- a/shell/start.sh +++ b/shell/start.sh @@ -1 +1 @@ -nohup java -jar yshop-admin-2.3.jar --spring.profiles.active=prod & +nohup java -jar yshop-app-3.3.jar --spring.profiles.active=prod & diff --git a/shell/startup.sh b/shell/startup.sh new file mode 100644 index 0000000000000000000000000000000000000000..2a625e02370a2d24bc8e4f6d6734165031492bfd --- /dev/null +++ b/shell/startup.sh @@ -0,0 +1,81 @@ +#!/usr/bin/env bash + +INPUT=$2 +FILE_PATH=`readlink -f ${INPUT}` +SERVICE=${INPUT##*/} +SERVICE_NAME=${SERVICE%.*} +DEPLOY_DIR=`pwd` +JVM_OPTS="-server -Xms64m -Xmx128m" + +if [[ "$1" = "" ]]; +then + echo -e "\033[0;31m 未输入操作名 \033[0m \033[0;34m {start|stop|restart|status} \033[0m" + exit 1 +fi + +if [[ "$SERVICE" = "" ]]; +then + echo -e "\033[0;31m 未输入应用名 \033[0m" + exit 1 +fi + +LOGS_DIR="$DEPLOY_DIR/logs/$SERVICE_NAME" +echo "$LOGS_DIR" +if [[ ! -d "$LOGS_DIR" ]]; then + mkdir -p ${LOGS_DIR} +fi + +LOG_PATH="$LOGS_DIR/stdout.out" +pid=0 + +start() +{ + checkPid + if [[ ! -n "$pid" ]]; then + BUILD_ID=dontKillMe nohup java ${JVM_OPTS} -jar ${FILE_PATH} --spring.profiles.active=prod >> ${LOG_PATH} 2>&1 & + echo "$SERVICE_NAME is starting you can check the $LOG_PATH" + else + echo "$SERVICE_NAME is runing PID: $pid" + fi +} + +checkPid() +{ + pid=`ps -ef |grep ${FILE_PATH} |grep -v grep |awk '{print $2}'` +} + +stop() +{ + checkPid + if [[ ! -n "$pid" ]]; then + echo "$SERVICE_NAME not runing" + else + echo "$SERVICE_NAME stop..." + kill -9 ${pid} + fi +} + +restart() +{ + stop + sleep 2 + start +} + +status() +{ + checkPid + if [[ ! -n "$pid" ]]; then + echo "$SERVICE_NAME not runing" + else + echo "$SERVICE_NAME runing PID: $pid" + fi +} + +case $1 in + start) start;; + stop) stop;; + restart) restart;; + status) status;; + *) echo "require start|stop|restart|status" ;; +esac diff --git a/shell/stop.sh b/shell/stop.sh index d3c05cd12ed209a61fce8e0d946130fae5e1d4ef..48a48f00f431932d07ca1257eb0efb3ca863cff2 100644 --- a/shell/stop.sh +++ b/shell/stop.sh @@ -1,4 +1,4 @@ -PID=$(ps -ef | grep yshop-admin-2.3.jar | grep -v grep | awk '{ print $2 }') +PID=$(ps -ef | grep yshop-app-3.3.jar | grep -v grep | awk '{ print $2 }') if [ -z "$PID" ];then echo Application is already stopped else diff --git a/simsunb.ttf b/simsunb.ttf new file mode 100644 index 0000000000000000000000000000000000000000..1c14f7fab9287c0746119a6c1de788f9b8e8bd93 Binary files /dev/null and b/simsunb.ttf differ diff --git a/sql/.yshop.version/yshop-V1.1.pdman.json b/sql/.yshop.version/yshop-V1.1.pdman.json new file mode 100644 index 0000000000000000000000000000000000000000..46050424af16235feb0abdbad439a44767b6abde --- /dev/null +++ b/sql/.yshop.version/yshop-V1.1.pdman.json @@ -0,0 +1,11450 @@ +{ + "modules": [ + { + "name": "DB_REVERSE_MYSQL", + "chnname": "逆向解析_MYSQL", + "entities": [ + { + "title": "monitor_server", + "chnname": "服务监控", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cpu_core", + "type": "INT_10", + "chnname": "CPU内核数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cpu_rate", + "type": "DOUBLE_22", + "chnname": "CPU使用率", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "disk_total", + "type": "DOUBLE_22", + "chnname": "磁盘总量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "disk_used", + "type": "DOUBLE_22", + "chnname": "磁盘使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mem_total", + "type": "DOUBLE_22", + "chnname": "内存总数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mem_used", + "type": "DOUBLE_22", + "chnname": "内存使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "port", + "type": "INT_10", + "chnname": "访问端口", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "state", + "type": "VARCHAR_255", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "swap_total", + "type": "DOUBLE_22", + "chnname": "交换区总量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "swap_used", + "type": "DOUBLE_22", + "chnname": "交换区使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "服务地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_live", + "chnname": "", + "fields": [ + { + "name": "roomid", + "type": "BIGINT_19", + "chnname": "直播间id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "直播间标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cover_imge", + "type": "VARCHAR_255", + "chnname": "背景图", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share_imge", + "type": "VARCHAR_255", + "chnname": "分享图片", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "live_status", + "type": "INT_10", + "chnname": "直播间状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "BIGINT_19", + "chnname": "开始时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "end_time", + "type": "BIGINT_19", + "chnname": "预计结束时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "anchor_name", + "type": "VARCHAR_64", + "chnname": "主播昵称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "anchor_wechat", + "type": "VARCHAR_32", + "chnname": "主播微信号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "anchor_imge", + "type": "VARCHAR_255", + "chnname": "主播头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "直播间类型 1:推流 0:手机直播", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "screen_type", + "type": "BIT_1", + "chnname": "横屏、竖屏 【1:横屏,0:竖屏】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_like", + "type": "BIT_1", + "chnname": "是否关闭点赞 【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_comment", + "type": "BIT_1", + "chnname": "是否关闭评论 【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_goods", + "type": "BIT_1", + "chnname": "是否关闭货架 【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "VARCHAR_255", + "chnname": "商品id 多个,分割", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_live_goods", + "chnname": "", + "fields": [ + { + "name": "goods_id", + "type": "BIGINT_19", + "chnname": "直播商品id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT_19", + "chnname": "关联商品id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cover_imge_url", + "type": "VARCHAR_255", + "chnname": "商品图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_64", + "chnname": "商品小程序路径", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price_type", + "type": "VARCHAR_255", + "chnname": "价格类型 1:一口价(只需要传入price,price2不传) 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传) 3:显示折扣价(price字段为原价,price2字段为现价, price和price2必传)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "VARCHAR_64", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price2", + "type": "VARCHAR_64", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "商品名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "third_party_tag", + "type": "VARCHAR_255", + "chnname": "1, 2:表示是为api添加商品,否则是直播控制台添加的商品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "audit_id", + "type": "BIGINT_19", + "chnname": "审核单id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "audit_status", + "type": "INT UNSIGNED_10", + "chnname": "审核状态 0:未审核,1:审核中,2:审核通过,3审核失败", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "edges": [], + "nodes": [] + }, + "associations": [] + }, + { + "name": "tools", + "chnname": "工具模块", + "entities": [ + { + "title": "tools_email_config", + "chnname": "邮箱配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "from_user", + "type": "VARCHAR_255", + "chnname": "收件人", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "host", + "type": "VARCHAR_255", + "chnname": "邮件服务器SMTP地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pass", + "type": "VARCHAR_255", + "chnname": "密码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "port", + "type": "VARCHAR_255", + "chnname": "端口", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sys_user", + "type": "VARCHAR_255", + "chnname": "发件者用户名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_local_storage", + "chnname": "本地存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "文件真实的名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "文件名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "suffix", + "type": "VARCHAR_255", + "chnname": "后缀", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_100", + "chnname": "大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "operate", + "type": "VARCHAR_255", + "chnname": "操作人", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_picture", + "chnname": "Sm.Ms图床", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "上传日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delete_url", + "type": "VARCHAR_255", + "chnname": "删除的URL", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "filename", + "type": "VARCHAR_255", + "chnname": "图片名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "height", + "type": "VARCHAR_255", + "chnname": "图片高度", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "图片大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "图片地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "width", + "type": "VARCHAR_255", + "chnname": "图片宽度", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "md5code", + "type": "VARCHAR_255", + "chnname": "文件的MD5值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_qiniu_config", + "chnname": "七牛云配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "access_key", + "type": "TEXT", + "chnname": "accessKey", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bucket", + "type": "VARCHAR_255", + "chnname": "Bucket 识别符", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "host", + "type": "VARCHAR_255", + "chnname": "外链域名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "secret_key", + "type": "TEXT", + "chnname": "secretKey", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "空间类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "zone", + "type": "VARCHAR_255", + "chnname": "机房", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_qiniu_content", + "chnname": "七牛云文件存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "bucket", + "type": "VARCHAR_255", + "chnname": "Bucket 识别符", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "文件名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "文件大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "文件类型:私有或公开", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "上传或同步的时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "文件url", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "suffix", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_verification_code", + "chnname": "验证码", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "code", + "type": "VARCHAR_255", + "chnname": "验证码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态:1有效、0过期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "验证码类型:email或者短信", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_255", + "chnname": "接收邮箱或者手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "scenes", + "type": "VARCHAR_255", + "chnname": "业务名称:如重置邮箱、重置密码等", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_alipay_config", + "chnname": "支付宝配置类", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "app_id", + "type": "VARCHAR_255", + "chnname": "应用ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "charset", + "type": "VARCHAR_255", + "chnname": "编码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "format", + "type": "VARCHAR_255", + "chnname": "类型 固定格式json", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "gateway_url", + "type": "VARCHAR_255", + "chnname": "网关地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "notify_url", + "type": "VARCHAR_255", + "chnname": "异步回调", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "private_key", + "type": "TEXT", + "chnname": "私钥", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "public_key", + "type": "TEXT", + "chnname": "公钥", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "return_url", + "type": "VARCHAR_255", + "chnname": "回调地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sign_type", + "type": "VARCHAR_255", + "chnname": "签名方式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sys_service_provider_id", + "type": "VARCHAR_255", + "chnname": "商户号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "logging", + "chnname": "日志", + "entities": [ + { + "title": "sys_log", + "chnname": "系统日志", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "exception_detail", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "log_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "request_ip", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browser", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + }, + { + "name": "gen", + "chnname": "代码生成", + "entities": [ + { + "title": "gen_test", + "chnname": "代码生成测试", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sex", + "type": "INT_10", + "chnname": "性别", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "column_config", + "chnname": "代码生成字段信息存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "table_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "column_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "column_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dict_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extra", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "form_show", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "form_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "key_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "list_show", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "not_null", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "query_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "date_annotation", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "gen_config", + "chnname": "代码生成器配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "table_name", + "type": "VARCHAR_255", + "chnname": "表名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "author", + "type": "VARCHAR_255", + "chnname": "作者", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cover", + "type": "BIT_1", + "chnname": "是否覆盖", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "module_name", + "type": "VARCHAR_255", + "chnname": "模块名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pack", + "type": "VARCHAR_255", + "chnname": "至于哪个包下", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "前端代码生成的路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "api_path", + "type": "VARCHAR_255", + "chnname": "前端Api文件路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "prefix", + "type": "VARCHAR_255", + "chnname": "表前缀", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "api_alias", + "type": "VARCHAR_255", + "chnname": "接口名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "column_config", + "moduleName": false, + "x": 288.359375, + "y": 279, + "id": "09a1ceae" + }, + { + "shape": "table", + "title": "gen_config", + "moduleName": false, + "x": 760, + "y": 200, + "id": "2e380491" + } + ], + "edges": [] + }, + "associations": [] + }, + { + "name": "monitor", + "chnname": "", + "entities": [ + { + "title": "sys_visits", + "chnname": "访客记录", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "date", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ip_counts", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pv_counts", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "week_day", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + }, + { + "name": "quartz", + "chnname": "定时任务", + "entities": [ + { + "title": "quartz_job", + "chnname": "定时任务", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "bean_name", + "type": "VARCHAR_255", + "chnname": "Spring Bean名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cron_expression", + "type": "VARCHAR_255", + "chnname": "cron 表达式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pause", + "type": "BIT_1", + "chnname": "状态:1暂停、0启用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_name", + "type": "VARCHAR_255", + "chnname": "任务名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method_name", + "type": "VARCHAR_255", + "chnname": "方法名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "VARCHAR_255", + "chnname": "参数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "quartz_log", + "chnname": "定时任务日志", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "baen_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cron_expression", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "exception_detail", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_success", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "quartz_job", + "moduleName": false, + "x": 422.359375, + "y": 367, + "id": "4b2bda89" + }, + { + "shape": "table", + "title": "quartz_log", + "moduleName": false, + "x": 890, + "y": 340, + "id": "b47ba8e0" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "b47ba8e0", + "target": "4b2bda89", + "id": "01afd2ee", + "controlPoints": [ + { + "x": 759.2236328125, + "y": 356.3101851851852 + }, + { + "x": 608.0595703125, + "y": 354.9063636363636 + } + ], + "sourceAnchor": 12, + "targetAnchor": 9 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "quartz_log", + "field": "job_name" + }, + "to": { + "entity": "quartz_job", + "field": "job_name" + } + } + ] + }, + { + "name": "system", + "chnname": "系统模块", + "entities": [ + { + "title": "sys_users_roles", + "chnname": "用户角色关联", + "fields": [ + { + "name": "user_id", + "type": "BIGINT_19", + "chnname": "用户ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "角色ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_roles_menus", + "chnname": "角色菜单关联", + "fields": [ + { + "name": "menu_id", + "type": "BIGINT_19", + "chnname": "菜单ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "角色ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_roles_depts", + "chnname": "角色部门关联", + "fields": [ + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_user_avatar", + "chnname": "系统用户头像", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "真实文件名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_role", + "chnname": "角色表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "data_scope", + "type": "VARCHAR_255", + "chnname": "数据权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "INT_10", + "chnname": "角色级别", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "permission", + "type": "VARCHAR_255", + "chnname": "功能权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dict", + "chnname": "数据字典", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "字典名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dict_detail", + "chnname": "数据字典详情", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "label", + "type": "VARCHAR_255", + "chnname": "字典标签", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_255", + "chnname": "字典值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "VARCHAR_255", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dict_id", + "type": "BIGINT_19", + "chnname": "字典id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dept", + "chnname": "部门", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT_19", + "chnname": "上级部门", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIT_1", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_menu", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "i_frame", + "type": "BIT_1", + "chnname": "是否外链", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "菜单名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "component", + "type": "VARCHAR_255", + "chnname": "组件", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT_19", + "chnname": "上级菜单ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "BIGINT_19", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "icon", + "type": "VARCHAR_255", + "chnname": "图标", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "链接地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cache", + "type": "BIT_1", + "chnname": "缓存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hidden", + "type": "BIT_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "component_name", + "type": "VARCHAR_20", + "chnname": "组件名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "permission", + "type": "VARCHAR_255", + "chnname": "权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "INT_10", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_job", + "chnname": "岗位", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "岗位名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIT_1", + "chnname": "岗位状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "BIGINT_19", + "chnname": "岗位排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "部门ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_user", + "chnname": "系统用户", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "avatar_id", + "type": "BIGINT_19", + "chnname": "头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "email", + "type": "VARCHAR_255", + "chnname": "邮箱", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIGINT_19", + "chnname": "状态:1启用、0禁用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "password", + "type": "VARCHAR_255", + "chnname": "密码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "部门名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "VARCHAR_255", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_id", + "type": "BIGINT_19", + "chnname": "岗位名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "last_password_reset_time", + "type": "DATETIME", + "chnname": "最后修改密码的日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nick_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sex", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "sys_user", + "moduleName": false, + "x": 730, + "y": 200, + "id": "42584636" + }, + { + "shape": "table", + "title": "sys_menu", + "moduleName": false, + "x": 230, + "y": 580, + "id": "faa9e561" + }, + { + "shape": "table", + "title": "sys_dict_detail", + "moduleName": false, + "x": 1440, + "y": 720, + "id": "de6d0d5f" + }, + { + "shape": "table", + "title": "sys_dict", + "moduleName": false, + "x": 1080, + "y": 770, + "id": "2e3e2ccb" + }, + { + "shape": "table", + "title": "sys_user_avatar", + "moduleName": false, + "x": 220, + "y": 100, + "id": "794cd430" + }, + { + "shape": "table", + "title": "sys_job", + "moduleName": false, + "x": 240, + "y": 290, + "id": "fe1aecfe" + }, + { + "shape": "table", + "title": "sys_roles_menus", + "moduleName": false, + "x": 550, + "y": 490, + "id": "0ba651c7" + }, + { + "shape": "table", + "title": "sys_role", + "moduleName": false, + "x": 850, + "y": 570, + "id": "2dd8b462" + }, + { + "shape": "table", + "title": "sys_roles_depts", + "moduleName": false, + "x": 1140, + "y": 490, + "id": "759d8dd0" + }, + { + "shape": "table", + "title": "sys_users_roles", + "moduleName": false, + "x": 1210, + "y": 50, + "id": "e76717e1" + }, + { + "shape": "table", + "title": "sys_dept", + "moduleName": false, + "x": 1200, + "y": 240, + "id": "2ecdc324" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "fe1aecfe", + "id": "a7e02413", + "controlPoints": [ + { + "x": 518.6240234375, + "y": 225.91161616161617 + }, + { + "x": 384.025390625, + "y": 232.19736842105263 + } + ], + "sourceAnchor": 16, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "2ecdc324", + "id": "99cdad68", + "controlPoints": [ + { + "x": 941.3759765625, + "y": 187.46212121212122 + }, + { + "x": 1055.974609375, + "y": 192.22058823529412 + } + ], + "sourceAnchor": 13, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "de6d0d5f", + "target": "2e3e2ccb", + "id": "0f30581b", + "controlPoints": [ + { + "x": 1296.224609375, + "y": 736.3355263157895 + }, + { + "x": 1223.775390625, + "y": 732.25 + } + ], + "sourceAnchor": 8, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "794cd430", + "id": "618c6bc6", + "controlPoints": [ + { + "x": 518.6240234375, + "y": 91.33838383838385 + }, + { + "x": 368.099609375, + "y": 72.28846153846153 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "0ba651c7", + "target": "faa9e561", + "id": "fdb423ea", + "controlPoints": [ + { + "x": 422.126953125, + "y": 492.281914893617 + }, + { + "x": 395.0341796875, + "y": 442.10714285714283 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "0ba651c7", + "target": "2dd8b462", + "id": "882b95a1", + "controlPoints": [ + { + "x": 677.873046875, + "y": 512.8191489361702 + }, + { + "x": 705.974609375, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 3, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "759d8dd0", + "target": "2dd8b462", + "id": "7a7a3350", + "controlPoints": [ + { + "x": 1034.2080078125, + "y": 492.281914893617 + }, + { + "x": 994.025390625, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "759d8dd0", + "target": "2ecdc324", + "id": "a9e0dc69", + "controlPoints": [ + { + "x": 1245.7919921875, + "y": 506.48049645390074 + }, + { + "x": 1440, + "y": 500 + }, + { + "x": 1440, + "y": 190 + }, + { + "x": 1344.025390625, + "y": 192.22058823529412 + } + ], + "sourceAnchor": 3, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e76717e1", + "target": "42584636", + "id": "6179129e", + "controlPoints": [ + { + "x": 1085.4638671875, + "y": 52.28191489361702 + }, + { + "x": 941.3759765625, + "y": 72.11363636363636 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e76717e1", + "target": "2dd8b462", + "id": "c796f9c9", + "controlPoints": [ + { + "x": 1334.5361328125, + "y": 72.81914893617022 + }, + { + "x": 1480, + "y": 70 + }, + { + "x": 1490, + "y": 580 + }, + { + "x": 1030, + "y": 590 + }, + { + "x": 994.025390625, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 3, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "sys_user", + "field": "job_id" + }, + "to": { + "entity": "sys_job", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_user", + "field": "dept_id" + }, + "to": { + "entity": "sys_dept", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_dict_detail", + "field": "dict_id" + }, + "to": { + "entity": "sys_dict", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "user", + "field": "avatar_id" + }, + "to": { + "entity": "sys_user_avatar", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_menus", + "field": "menu_id" + }, + "to": { + "entity": "sys_menu", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_menus", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_depts", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_depts", + "field": "dept_id" + }, + "to": { + "entity": "sys_dept", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_users_roles", + "field": "user_id" + }, + "to": { + "entity": "user", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_users_roles", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + } + ] + }, + { + "name": "activity", + "chnname": "活动", + "entities": [ + { + "title": "yx_store_seckill", + "chnname": "商品秒杀产品表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品秒杀产品表id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "推荐图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "活动标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "原价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "返多少积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_16", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATE", + "chnname": "开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATE", + "chnname": "结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "产品状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "热门推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "删除 0未删除1已删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "num", + "type": "INT UNSIGNED_10", + "chnname": "最多秒杀几个", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "TINYINT UNSIGNED_1", + "chnname": "显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time_id", + "type": "INT UNSIGNED_10", + "chnname": "时间段id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spec_type", + "type": "BIT_1", + "chnname": "规格 0单 1多", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "运费模板id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_sub", + "type": "INT_10", + "chnname": "规格设置", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_pink", + "chnname": "拼团表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单id 生成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id_key", + "type": "INT UNSIGNED_10", + "chnname": "订单id 数据库", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_num", + "type": "INT UNSIGNED_10", + "chnname": "购买商品个数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "购买总金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cid", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT UNSIGNED_20", + "chnname": "产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "people", + "type": "INT UNSIGNED_10", + "chnname": "拼团总人数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "拼团产品单价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "k_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "团长id 0为团长", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_tpl", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否发送模板消息0未发送1已发送", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_refund", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否退款 0未退款 1已退款", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态1进行中2已完成3未完成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_user", + "chnname": "优惠券发放记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "优惠券发放记录id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cid", + "type": "INT UNSIGNED_10", + "chnname": "兑换的项目id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "优惠券所属用户", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_title", + "type": "VARCHAR_32", + "chnname": "优惠券名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "优惠券的面值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "最低消费多少金额可用优惠券", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "优惠券创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "end_time", + "type": "DATETIME", + "chnname": "优惠券结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_time", + "type": "DATETIME", + "chnname": "使用时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "获取方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态(0:未使用,1:已使用, 2:已过期)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_fail", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否有效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_issue_user", + "chnname": "优惠券前台用户领取记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "领取优惠券用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "issue_coupon_id", + "type": "INT_10", + "chnname": "优惠券前台领取ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "领取时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_issue", + "chnname": "优惠券前台领取表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cid", + "type": "INT_10", + "chnname": "优惠券ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ctype", + "type": "BIT_1", + "chnname": "优惠券类型 0-通用 1-商品券", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "优惠券领取开启时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "end_time", + "type": "DATETIME", + "chnname": "优惠券领取结束时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_count", + "type": "INT_10", + "chnname": "优惠券领取数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remain_count", + "type": "INT_10", + "chnname": "优惠券剩余领取数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_permanent", + "type": "BIT_1", + "chnname": "是否无限张数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "1 正常 0 未开启 -1 已无效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "优惠券添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon", + "chnname": "优惠券表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "优惠券表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_64", + "chnname": "优惠券名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "integral", + "type": "INT UNSIGNED_10", + "chnname": "兑换消耗积分值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "兑换的优惠券面值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "最低消费多少金额可用优惠券", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_time", + "type": "INT UNSIGNED_10", + "chnname": "优惠券有效期限(单位:天)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态(0:关闭,1:开启)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "VARCHAR_200", + "chnname": "商品ids", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "TINYINT_3", + "chnname": "优惠券类型 0-通用 1-商品券", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "兑换项目添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_combination", + "chnname": "拼团产品表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "推荐图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "活动标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr", + "type": "VARCHAR_255", + "chnname": "活动属性", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "people", + "type": "INT UNSIGNED_10", + "chnname": "参团人数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_price", + "type": "DECIMAL_10_2", + "chnname": "商品原价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_host", + "type": "TINYINT UNSIGNED_1", + "chnname": "推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "TINYINT UNSIGNED_1", + "chnname": "产品状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_use", + "type": "TINYINT UNSIGNED_1", + "chnname": "商户是否可用1可用0不可用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "拼团内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "拼团开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "拼团结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "effective_time", + "type": "INT_10", + "chnname": "拼团订单有效时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "INT UNSIGNED_10", + "chnname": "拼团产品成本", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browse", + "type": "INT_10", + "chnname": "浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_32", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spec_type", + "type": "BIT_1", + "chnname": "规格 0单 1多", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "运费模板ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_sub", + "type": "INT_10", + "chnname": "规格设置", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain_user_help", + "chnname": "砍价用户帮助表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价用户帮助表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "帮助的用户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_user_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户参与砍价表id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "帮助砍价多少金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain_user", + "chnname": "用户参与砍价表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户参与砍价表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_price_min", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价的最低价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_price", + "type": "DECIMAL_8_2", + "chnname": "砍价金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍掉的价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态 1参与中 2 活动结束参与失败 3活动结束参与成功", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "参与时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否取消", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain", + "chnname": "砍价表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "关联产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "砍价活动名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_150", + "chnname": "砍价活动图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_16", + "chnname": "单位名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "砍价产品轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "砍价开启时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "砍价结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_255", + "chnname": "砍价产品名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价商品最低价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "num", + "type": "INT UNSIGNED_10", + "chnname": "每次购买的砍价产品数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_max_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户每次砍价的最大金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户每次砍价的最小金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_num", + "type": "INT UNSIGNED_10", + "chnname": "用户每次砍价的次数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "砍价详情", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "反多少积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "砍价活动简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否推荐0不推荐1推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除 0未删除 1删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮 0不包邮 1包邮", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "rule", + "type": "TEXT", + "chnname": "砍价规则", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "look", + "type": "INT UNSIGNED_10", + "chnname": "砍价产品浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share", + "type": "INT UNSIGNED_10", + "chnname": "砍价产品分享量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_visit", + "chnname": "产品浏览分析表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "INT_10", + "chnname": "产品ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_type", + "type": "VARCHAR_32", + "chnname": "产品类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_id", + "type": "INT_10", + "chnname": "产品分类ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "CHAR_50", + "chnname": "产品类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "INT_10", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "count", + "type": "INT_10", + "chnname": "访问次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "VARCHAR_255", + "chnname": "备注描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_pink", + "moduleName": false, + "x": 310, + "y": 580, + "id": "13513a4e" + }, + { + "shape": "table", + "title": "yx_store_coupon", + "moduleName": false, + "x": 600, + "y": 180, + "id": "2b6bf508" + }, + { + "shape": "table", + "title": "yx_store_coupon_user", + "moduleName": false, + "x": 1310, + "y": 190, + "id": "aa29268e" + }, + { + "shape": "table", + "title": "yx_store_coupon_issue", + "moduleName": false, + "x": 1270, + "y": 580, + "id": "74e5a8f0" + }, + { + "shape": "table", + "title": "yx_store_coupon_issue_user", + "moduleName": false, + "x": 790, + "y": 610, + "id": "dfd12dd0" + }, + { + "shape": "table", + "title": "yx_store_bargain", + "moduleName": false, + "x": -160, + "y": -50, + "id": "1de36ee3" + }, + { + "shape": "table", + "title": "yx_store_bargain_user", + "moduleName": false, + "x": 590, + "y": -340, + "id": "14a47167" + }, + { + "shape": "table", + "title": "yx_store_bargain_user_help", + "moduleName": false, + "x": 490, + "y": -100, + "id": "e979c0f8" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "aa29268e", + "target": "2b6bf508", + "id": "a8da6c7b", + "controlPoints": [ + { + "x": 1041.849609375, + "y": 91.2897465437788 + }, + { + "x": 835.138671875, + "y": 72.12931034482759 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "74e5a8f0", + "target": "2b6bf508", + "id": "6abf3f7d", + "controlPoints": [ + { + "x": 1051.787109375, + "y": 510.3375331564987 + }, + { + "x": 835.138671875, + "y": 72.12931034482759 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "dfd12dd0", + "target": "74e5a8f0", + "id": "0433262a", + "controlPoints": [ + { + "x": 991.1455078125, + "y": 608.3222222222222 + }, + { + "x": 1051.787109375, + "y": 472.12931034482756 + } + ], + "sourceAnchor": 5, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "14a47167", + "target": "1de36ee3", + "id": "e528de82", + "controlPoints": [ + { + "x": 279.8408203125, + "y": -377.6630434782609 + }, + { + "x": 182.1513671875, + "y": -347.9440298507463 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e979c0f8", + "target": "1de36ee3", + "id": "b2e7774f", + "controlPoints": [ + { + "x": 280.6005859375, + "y": -120.73355263157895 + }, + { + "x": 182.1513671875, + "y": -347.9440298507463 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_user", + "field": "cid" + }, + "to": { + "entity": "yx_store_coupon", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_issue", + "field": "cid" + }, + "to": { + "entity": "yx_store_coupon", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_issue_user", + "field": "issue_coupon_id" + }, + "to": { + "entity": "yx_store_coupon_issue", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_bargain_user", + "field": "bargain_id" + }, + "to": { + "entity": "yx_store_bargain", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_bargain_user_help", + "field": "bargain_id" + }, + "to": { + "entity": "yx_store_bargain", + "field": "id" + } + } + ] + }, + { + "name": "cart", + "chnname": "购物车", + "entities": [ + { + "title": "yx_store_cart", + "chnname": "购物车表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "购物车表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_attr_unique", + "type": "VARCHAR_50", + "chnname": "商品属性", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_num", + "type": "SMALLINT UNSIGNED_5", + "chnname": "商品数量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pay", + "type": "BIT_1", + "chnname": "0 = 未购买 1 = 已购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_new", + "type": "BIT_1", + "chnname": "是否为立即购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination_id", + "type": "INT UNSIGNED_10", + "chnname": "拼团id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_id", + "type": "INT UNSIGNED_10", + "chnname": "秒杀产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "INT UNSIGNED_10", + "chnname": "砍价id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "category", + "chnname": "商品分类", + "entities": [ + { + "title": "yx_store_category", + "chnname": "商品分类表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT_7", + "chnname": "商品分类表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "pid", + "type": "MEDIUMINT_7", + "chnname": "父id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_name", + "type": "VARCHAR_100", + "chnname": "分类名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "MEDIUMINT_7", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pic", + "type": "VARCHAR_128", + "chnname": "图标", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否推荐", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "删除状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "order", + "chnname": "订单", + "entities": [ + { + "title": "yx_store_order", + "chnname": "订单表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extend_order_id", + "type": "VARCHAR_32", + "chnname": "额外订单号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_32", + "chnname": "用户姓名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_phone", + "type": "VARCHAR_18", + "chnname": "用户电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_address", + "type": "VARCHAR_100", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_id", + "type": "VARCHAR_256", + "chnname": "购物车id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "freight_price", + "type": "DECIMAL_8_2", + "chnname": "运费金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_num", + "type": "INT UNSIGNED_10", + "chnname": "订单商品总数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "订单总价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "实际支付金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "支付邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "deduction_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "抵扣金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_id", + "type": "INT UNSIGNED_10", + "chnname": "优惠券id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "优惠券金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "paid", + "type": "TINYINT UNSIGNED_1", + "chnname": "支付状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_time", + "type": "DATETIME", + "chnname": "支付时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_type", + "type": "VARCHAR_32", + "chnname": "支付方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:已完成;-1:已退款)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_status", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 未退款 1 申请中 2 已退款", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap_img", + "type": "VARCHAR_255", + "chnname": "退款图片", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap_explain", + "type": "VARCHAR_255", + "chnname": "退款用户说明", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_time", + "type": "DATETIME", + "chnname": "退款时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap", + "type": "VARCHAR_255", + "chnname": "前台退款原因", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason", + "type": "VARCHAR_255", + "chnname": "不退款的理由", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "退款金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_sn", + "type": "VARCHAR_100", + "chnname": "快递公司编号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_name", + "type": "VARCHAR_64", + "chnname": "快递名称/送货人姓名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_type", + "type": "VARCHAR_32", + "chnname": "发货类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_id", + "type": "VARCHAR_64", + "chnname": "快递单号/手机号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "gain_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "消费赚取积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "使用积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "back_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "给用户退了多少积分", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "CHAR_32", + "chnname": "唯一id(md5加密)类似id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_512", + "chnname": "管理员备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_mer_check", + "type": "TINYINT UNSIGNED_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团产品id0一般产品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pink_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团id 0没有拼团", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "秒杀产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "INT UNSIGNED_10", + "chnname": "砍价id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "verify_code", + "type": "VARCHAR_50", + "chnname": "核销码", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_id", + "type": "INT_10", + "chnname": "门店id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "shipping_type", + "type": "BIT_1", + "chnname": "配送方式 1=快递 ,2=门店自提", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_channel", + "type": "TINYINT UNSIGNED_1", + "chnname": "支付渠道(0微信公众号1微信小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_remind", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_system_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_order_cart_info", + "chnname": "订单购物详情表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "购物车id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_info", + "type": "TEXT", + "chnname": "购买东西的详细信息", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "VARCHAR_50", + "chnname": "唯一id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_order_status", + "chnname": "订单操作记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_type", + "type": "VARCHAR_32", + "chnname": "操作类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_message", + "type": "VARCHAR_256", + "chnname": "操作备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_time", + "type": "DATETIME", + "chnname": "操作时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_express", + "chnname": "快递公司表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "快递公司id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "code", + "type": "VARCHAR_50", + "chnname": "快递公司简称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_50", + "chnname": "快递公司全称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_order", + "moduleName": false, + "x": 610, + "y": 550, + "id": "0eda0dc5" + }, + { + "shape": "table", + "title": "yx_store_order_cart_info", + "moduleName": false, + "x": 1370, + "y": 70, + "id": "1412580b" + }, + { + "shape": "table", + "title": "yx_store_cart", + "moduleName": "cart", + "x": 1410, + "y": 330, + "id": "bcf3c95c" + }, + { + "shape": "table", + "title": "yx_store_order_status", + "moduleName": false, + "x": 1380, + "y": 610, + "id": "f5488e91" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "1412580b", + "target": "0eda0dc5", + "id": "6f47eff5", + "controlPoints": [ + { + "x": 1179.8701171875, + "y": 52.38333333333334 + }, + { + "x": 1074.1962890625, + "y": 32.03378378378378 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "1412580b", + "target": "bcf3c95c", + "id": "2c239ffd", + "controlPoints": [ + { + "x": 1179.8701171875, + "y": 72.51666666666668 + }, + { + "x": 1120, + "y": 70 + }, + { + "x": 1120, + "y": 210 + }, + { + "x": 1184.4970703125, + "y": 212.1209677419355 + } + ], + "sourceAnchor": 4, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "f5488e91", + "target": "0eda0dc5", + "id": "70641526", + "controlPoints": [ + { + "x": 1200.5224609375, + "y": 602.4423076923077 + }, + { + "x": 1130, + "y": 450 + }, + { + "x": 1074.1962890625, + "y": 32.03378378378378 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_order_cart_info", + "field": "oid" + }, + "to": { + "entity": "yx_store_order", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_order_cart_info", + "field": "cart_id" + }, + "to": { + "entity": "yx_store_cart", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_order_status", + "field": "oid" + }, + "to": { + "entity": "yx_store_order", + "field": "id" + } + } + ] + }, + { + "name": "product", + "chnname": "商品模块", + "entities": [ + { + "title": "yx_store_product_reply", + "chnname": "评论表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "评论ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT_19", + "chnname": "订单ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "CHAR_32", + "chnname": "唯一id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT_19", + "chnname": "产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "reply_type", + "type": "VARCHAR_32", + "chnname": "某种商品类型(普通商品、秒杀商品)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_score", + "type": "BIT_1", + "chnname": "商品分数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "service_score", + "type": "BIT_1", + "chnname": "服务分数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "comment", + "type": "VARCHAR_512", + "chnname": "评论内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pics", + "type": "TEXT", + "chnname": "评论图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "评论时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_reply_content", + "type": "VARCHAR_300", + "chnname": "管理员回复内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_reply_time", + "type": "DATETIME", + "chnname": "管理员回复时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "0未删除1已删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_reply", + "type": "BIT_1", + "chnname": "0未回复1已回复", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_relation", + "chnname": "商品点赞和收藏表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "类型(收藏(collect)、点赞(like))", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "category", + "type": "VARCHAR_32", + "chnname": "某种类型的商品(普通商品、秒杀商品)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr_value", + "chnname": "商品属性值表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sku", + "type": "VARCHAR_128", + "chnname": "商品属性索引值 (attr_value|attr_value[|....])", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "属性对应的库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "属性金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_128", + "chnname": "图片", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "VARCHAR_100", + "chnname": "唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bar_code", + "type": "VARCHAR_255", + "chnname": "商品条码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL_10_2", + "chnname": "原价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "weight", + "type": "DECIMAL_8_2", + "chnname": "重量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "volume", + "type": "DECIMAL_8_2", + "chnname": "体积", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage", + "type": "DECIMAL_8_2", + "chnname": "一级返佣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage_two", + "type": "DECIMAL_8_2", + "chnname": "二级返佣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pink_price", + "type": "DECIMAL_8_2", + "chnname": "拼团价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pink_stock", + "type": "INT_10", + "chnname": "拼团库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_price", + "type": "DECIMAL_10_2", + "chnname": "秒杀价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_stock", + "type": "INT_10", + "chnname": "秒杀库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr_result", + "chnname": "商品属性详情表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "result", + "type": "TEXT", + "chnname": "商品属性参数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_time", + "type": "DATETIME", + "chnname": "上次修改时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr", + "chnname": "商品属性表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr_name", + "type": "VARCHAR_32", + "chnname": "属性名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr_values", + "type": "VARCHAR_256", + "chnname": "属性值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product", + "chnname": "商品表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "商品id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_256", + "chnname": "商品图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "slider_image", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_128", + "chnname": "商品名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_info", + "type": "VARCHAR_256", + "chnname": "商品简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "keyword", + "type": "VARCHAR_256", + "chnname": "关键字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bar_code", + "type": "VARCHAR_15", + "chnname": "产品条码(一维码)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_id", + "type": "VARCHAR_64", + "chnname": "分类id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "商品价格", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "vip_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "会员价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "市场价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_32", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "SMALLINT_5", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "状态(0:未上架,1:上架)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "BIT_1", + "chnname": "是否热卖", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_benefit", + "type": "BIT_1", + "chnname": "是否优惠", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_best", + "type": "BIT_1", + "chnname": "是否精品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_new", + "type": "BIT_1", + "chnname": "是否新品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "产品描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_use", + "type": "TINYINT UNSIGNED_1", + "chnname": "商户是否代理 0不可代理1可代理", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "获得积分", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_seckill", + "type": "TINYINT UNSIGNED_1", + "chnname": "秒杀状态 0 未开启 1已开启", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_bargain", + "type": "TINYINT UNSIGNED_1", + "chnname": "砍价状态 0未开启 1开启", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_good", + "type": "BIT_1", + "chnname": "是否优品推荐", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ficti", + "type": "MEDIUMINT_7", + "chnname": "虚拟销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browse", + "type": "INT_10", + "chnname": "浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "code_path", + "type": "VARCHAR_64", + "chnname": "产品二维码地址(用户小程序海报)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_sub", + "type": "BIT_1", + "chnname": "是否单独分佣", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "运费模板ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spec_type", + "type": "BIT_1", + "chnname": "规格 0单 1多", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_rule", + "chnname": "商品规则值(规格)表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "rule_name", + "type": "VARCHAR_32", + "chnname": "规格名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "rule_value", + "type": "JSON", + "chnname": "规格值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_product", + "moduleName": false, + "x": 390, + "y": 410, + "id": "1f2a5f58" + }, + { + "shape": "table", + "title": "yx_store_product_attr", + "moduleName": false, + "x": 970, + "y": 60, + "id": "8d021563" + }, + { + "shape": "table", + "title": "yx_store_product_attr_value", + "moduleName": false, + "x": 1090, + "y": 360, + "id": "65395cd5" + }, + { + "shape": "table", + "title": "yx_store_product_attr_result", + "moduleName": false, + "x": 1020, + "y": 660, + "id": "f65fda56" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "8d021563", + "target": "1f2a5f58", + "id": "8a5b631d", + "controlPoints": [ + { + "x": 814.5400390625, + "y": 62.52272727272727 + }, + { + "x": 698.1318359375, + "y": 42.0462962962963 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "65395cd5", + "target": "1f2a5f58", + "id": "b3c471e9", + "controlPoints": [ + { + "x": 818.958984375, + "y": 252.17424242424244 + }, + { + "x": 698.1318359375, + "y": 42.0462962962963 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "65395cd5", + "target": "8d021563", + "id": "76f261e2", + "controlPoints": [ + { + "x": 818.958984375, + "y": 272.2348484848485 + }, + { + "x": 750, + "y": 240 + }, + { + "x": 814.5400390625, + "y": 82.70454545454545 + } + ], + "sourceAnchor": 4, + "targetAnchor": 4 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr", + "field": "product_id" + }, + "to": { + "entity": "yx_store_product", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr_value", + "field": "product_id" + }, + "to": { + "entity": "yx_store_product", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr_value", + "field": "sku" + }, + "to": { + "entity": "yx_store_product_attr", + "field": "attr_name" + } + } + ] + }, + { + "name": "shop", + "chnname": "商户模块", + "entities": [ + { + "title": "yx_material_group", + "chnname": "素材分组", + "fields": [ + { + "name": "id", + "type": "VARCHAR_32", + "chnname": "PK", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_id", + "type": "VARCHAR_32", + "chnname": "创建者ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_200", + "chnname": "分组名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_attachment", + "chnname": "附件管理表", + "fields": [ + { + "name": "att_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "附件名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_dir", + "type": "VARCHAR_200", + "chnname": "附件路径", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "satt_dir", + "type": "VARCHAR_200", + "chnname": "压缩图片路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_size", + "type": "CHAR_30", + "chnname": "附件大小", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_type", + "type": "CHAR_30", + "chnname": "附件类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "INT_10", + "chnname": "分类ID0编辑器,1产品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image_type", + "type": "TINYINT UNSIGNED_1", + "chnname": "图片上传类型 1本地 2七牛云 3OSS 4COS ", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "module_type", + "type": "TINYINT UNSIGNED_1", + "chnname": "图片上传模块类型 1 后台上传 2 用户生成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "invite_code", + "type": "VARCHAR_50", + "chnname": "邀请码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_config", + "chnname": "配置表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "配置id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "menu_name", + "type": "VARCHAR_255", + "chnname": "字段名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_5000", + "chnname": "默认值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_group_data", + "chnname": "组合数据详情表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "组合数据详情ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "group_name", + "type": "VARCHAR_100", + "chnname": "对应的数据名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "TEXT", + "chnname": "数据组对应的数据值(json数据)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加数据时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "数据排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态(1:开启;2:关闭;)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_store", + "chnname": "门店自提", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "门店名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "introduction", + "type": "VARCHAR_1000", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_25", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "省市区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "detailed_address", + "type": "VARCHAR_255", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "门店logo", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "latitude", + "type": "CHAR_25", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "longitude", + "type": "CHAR_25", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time", + "type": "VARCHAR_100", + "chnname": "核销有效日期", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time", + "type": "VARCHAR_100", + "chnname": "每日营业开关时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time_end", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time_start", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time_end", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time_start", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_store_staff", + "chnname": "门店店员表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "微信用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "avatar", + "type": "VARCHAR_255", + "chnname": "店员头像", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_id", + "type": "INT_10", + "chnname": "门店id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "staff_name", + "type": "VARCHAR_64", + "chnname": "店员名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_15", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "verify_status", + "type": "TINYINT_3", + "chnname": "核销开关", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_user_level", + "chnname": "设置用户等级表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "会员名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "money", + "type": "DECIMAL_8_2", + "chnname": "购买金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_date", + "type": "INT_10", + "chnname": "有效时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_forever", + "type": "BIT_1", + "chnname": "是否为永久会员", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pay", + "type": "BIT_1", + "chnname": "是否购买,1=购买,0=不购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示 1=显示,0=隐藏", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "grade", + "type": "INT_10", + "chnname": "会员等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "discount", + "type": "DECIMAL_8_2", + "chnname": "享受折扣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "会员卡背景", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "icon", + "type": "VARCHAR_255", + "chnname": "会员图标", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "explain", + "type": "TEXT", + "chnname": "说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除.1=删除,0=未删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_material", + "chnname": "素材库", + "fields": [ + { + "name": "id", + "type": "VARCHAR_32", + "chnname": "PK", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_id", + "type": "VARCHAR_100", + "chnname": "创建者ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "CHAR_2", + "chnname": "类型1、图片;2、视频", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "group_id", + "type": "VARCHAR_32", + "chnname": "分组ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_200", + "chnname": "素材名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_500", + "chnname": "素材链接", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_material", + "moduleName": false, + "x": 442.359375, + "y": 277, + "id": "fe721315" + }, + { + "shape": "table", + "title": "yx_material_group", + "moduleName": false, + "x": 887.359375, + "y": 279, + "id": "f3be72cb" + }, + { + "shape": "table", + "title": "yx_system_store", + "moduleName": false, + "x": 326.359375, + "y": 624, + "id": "396a35b0" + }, + { + "shape": "table", + "title": "yx_system_store_staff", + "moduleName": false, + "x": 870, + "y": 590, + "id": "c3935d4a" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "fe721315", + "target": "f3be72cb", + "id": "e1f3d02d", + "controlPoints": [ + { + "x": 623.05859375, + "y": 283.9775132275132 + }, + { + "x": 743.333984375, + "y": 241.25 + } + ], + "sourceAnchor": 9, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "c3935d4a", + "target": "396a35b0", + "id": "5bfc667b", + "controlPoints": [ + { + "x": 699.7900390625, + "y": 558.5457559681697 + }, + { + "x": 517.833984375, + "y": 456.0914634146342 + } + ], + "sourceAnchor": 8, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_material", + "field": "group_id" + }, + "to": { + "entity": "yx_material_group", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_system_store_staff", + "field": "store_id" + }, + "to": { + "entity": "yx_system_store", + "field": "id" + } + } + ] + }, + { + "name": "template", + "chnname": "运费模板", + "entities": [ + { + "title": "yx_shipping_templates", + "chnname": "运费模板表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "模板ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "模板名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "region_info", + "type": "TEXT", + "chnname": "地域以及费用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "appoint", + "type": "BIT_1", + "chnname": "指定包邮开关", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "appoint_info", + "type": "TEXT", + "chnname": "指定包邮内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_shipping_templates_free", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "编号", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "province_id", + "type": "INT_10", + "chnname": "省ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "DECIMAL_10_2", + "chnname": "包邮件数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL_10_2", + "chnname": "包邮金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uniqid", + "type": "VARCHAR_32", + "chnname": "分组唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_city", + "chnname": "城市表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "INT_10", + "chnname": "省市级别", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "parent_id", + "type": "INT_10", + "chnname": "父级id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "area_code", + "type": "VARCHAR_30", + "chnname": "区号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merger_name", + "type": "VARCHAR_255", + "chnname": "合并名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "lng", + "type": "VARCHAR_50", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "lat", + "type": "VARCHAR_50", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否展示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_shipping_templates_region", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "编号", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "province_id", + "type": "INT_10", + "chnname": "省ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "first", + "type": "DECIMAL_10_2", + "chnname": "首件", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "first_price", + "type": "DECIMAL_10_2", + "chnname": "首件运费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "continues", + "type": "DECIMAL_10_2", + "chnname": "续件", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "continue_price", + "type": "DECIMAL_10_2", + "chnname": "续件运费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uniqid", + "type": "VARCHAR_50", + "chnname": "分组唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_shipping_templates", + "moduleName": false, + "x": 680, + "y": 380, + "id": "c8177992" + }, + { + "shape": "table", + "title": "yx_system_city", + "moduleName": false, + "x": 290, + "y": 260, + "id": "f3f8204a" + }, + { + "shape": "table", + "title": "yx_shipping_templates_free", + "moduleName": false, + "x": 1080, + "y": 190, + "id": "ac873dd5" + }, + { + "shape": "table", + "title": "yx_shipping_templates_region", + "moduleName": false, + "x": 1080, + "y": 540, + "id": "7ca63a1e" + } + ], + "edges": [] + }, + "associations": [] + }, + { + "name": "user", + "chnname": "用户模块", + "entities": [ + { + "title": "yx_user_bill", + "chnname": "用户账单表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户账单id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_id", + "type": "VARCHAR_32", + "chnname": "关联id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pm", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 = 支出 1 = 获得", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_64", + "chnname": "账单标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "category", + "type": "VARCHAR_64", + "chnname": "明细种类", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_64", + "chnname": "明细类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "明细数字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "剩余", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "0 = 带确定 1 = 有效 -1 = 无效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_level", + "chnname": "用户等级记录表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level_id", + "type": "INT_10", + "chnname": "等级vip", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "grade", + "type": "INT_10", + "chnname": "会员等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time", + "type": "INT_10", + "chnname": "过期时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_forever", + "type": "BIT_1", + "chnname": "是否永久", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "0:禁止,1:正常", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remind", + "type": "BIT_1", + "chnname": "是否已通知", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除,0=未删除,1=删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "discount", + "type": "INT_10", + "chnname": "享受折扣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_task_finish", + "chnname": "用户任务完成记录表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "task_id", + "type": "INT_10", + "chnname": "任务id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "是否有效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_sign", + "chnname": "签到记录表", + "fields": [ + { + "name": "int", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "签到说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "INT_10", + "chnname": "获得积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "INT_10", + "chnname": "剩余积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_recharge", + "chnname": "用户充值表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "充值用户UID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL_8_2", + "chnname": "充值金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_price", + "type": "DECIMAL_8_2", + "chnname": "购买赠送金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "recharge_type", + "type": "VARCHAR_32", + "chnname": "充值类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "paid", + "type": "BIT_1", + "chnname": "是否充值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_time", + "type": "DATETIME", + "chnname": "充值支付时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "充值时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_price", + "type": "DECIMAL_10_2", + "chnname": "退款金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_address", + "chnname": "用户地址表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户地址id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_32", + "chnname": "收货人姓名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "VARCHAR_16", + "chnname": "收货人电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "province", + "type": "VARCHAR_64", + "chnname": "收货人所在省", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city", + "type": "VARCHAR_64", + "chnname": "收货人所在市", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "district", + "type": "VARCHAR_64", + "chnname": "收货人所在区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "detail", + "type": "VARCHAR_256", + "chnname": "收货人详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "post_code", + "type": "VARCHAR_20", + "chnname": "邮编", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "longitude", + "type": "VARCHAR_16", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "latitude", + "type": "VARCHAR_16", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_default", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否默认", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_group", + "chnname": "用户分组表", + "fields": [ + { + "name": "id", + "type": "SMALLINT UNSIGNED_5", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "group_name", + "type": "VARCHAR_64", + "chnname": "用户分组名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_extract", + "chnname": "用户提现表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_64", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extract_type", + "type": "VARCHAR_32", + "chnname": "bank = 银行卡 alipay = 支付宝wx=微信", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bank_code", + "type": "VARCHAR_32", + "chnname": "银行卡", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bank_address", + "type": "VARCHAR_256", + "chnname": "开户地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "alipay_code", + "type": "VARCHAR_64", + "chnname": "支付宝账号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extract_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "提现金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_msg", + "type": "VARCHAR_128", + "chnname": "无效原因", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "-1 未通过 0 审核中 1 已提现", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "wechat", + "type": "VARCHAR_15", + "chnname": "微信号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_enter", + "chnname": "商户申请表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "商户申请ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "INT UNSIGNED_10", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "province", + "type": "VARCHAR_32", + "chnname": "商户所在省", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city", + "type": "VARCHAR_32", + "chnname": "商户所在市", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "district", + "type": "VARCHAR_32", + "chnname": "商户所在区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_256", + "chnname": "商户详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_name", + "type": "VARCHAR_256", + "chnname": "商户名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_user", + "type": "VARCHAR_32", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_tel", + "type": "VARCHAR_16", + "chnname": "商户电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "charter", + "type": "VARCHAR_512", + "chnname": "商户证书", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT UNSIGNED_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "apply_time", + "type": "INT UNSIGNED_10", + "chnname": "审核时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "success_time", + "type": "INT_10", + "chnname": "通过时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_message", + "type": "VARCHAR_256", + "chnname": "未通过原因", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_time", + "type": "INT UNSIGNED_10", + "chnname": "未通过时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "-1 审核未通过 0未审核 1审核通过", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_lock", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 = 开启 1= 关闭", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_user_task", + "chnname": "等级任务设置", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "任务名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "配置原名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "task_type", + "type": "VARCHAR_50", + "chnname": "任务类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "INT_10", + "chnname": "限定数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level_id", + "type": "INT_10", + "chnname": "等级id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_must", + "type": "BIT_1", + "chnname": "是否务必达成任务,1务必达成,0=满足其一", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "illustrate", + "type": "VARCHAR_255", + "chnname": "任务说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "新增时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user", + "chnname": "用户表", + "fields": [ + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户账户(跟accout一样)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "password", + "type": "VARCHAR_255", + "chnname": "用户密码(跟pwd)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_25", + "chnname": "真实姓名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "birthday", + "type": "INT_10", + "chnname": "生日", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "card_id", + "type": "VARCHAR_20", + "chnname": "身份证号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_255", + "chnname": "用户备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "partner_id", + "type": "INT_10", + "chnname": "合伙人id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "group_id", + "type": "INT_10", + "chnname": "用户分组id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_100", + "chnname": "用户昵称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "avatar", + "type": "VARCHAR_256", + "chnname": "用户头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_15", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_ip", + "type": "VARCHAR_16", + "chnname": "添加ip", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "最后一次登录时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "last_ip", + "type": "VARCHAR_16", + "chnname": "最后一次登录ip", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "now_money", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户余额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage_price", + "type": "DECIMAL_8_2", + "chnname": "佣金金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户剩余积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sign_num", + "type": "INT_10", + "chnname": "连续签到天数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "1为正常,0为禁止", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "TINYINT UNSIGNED_3", + "chnname": "等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "推广元id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_time", + "type": "DATETIME", + "chnname": "推广员关联时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_type", + "type": "VARCHAR_32", + "chnname": "用户类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_promoter", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否为推广员", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_count", + "type": "INT UNSIGNED_10", + "chnname": "用户购买次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_count", + "type": "INT_10", + "chnname": "下级人数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "addres", + "type": "VARCHAR_255", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "adminid", + "type": "INT UNSIGNED_10", + "chnname": "管理员编号 ", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "login_type", + "type": "VARCHAR_36", + "chnname": "用户登陆类型,h5,wechat,routine", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "wx_profile", + "type": "JSON", + "chnname": "微信用户json信息", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "wechat", + "chnname": "微信模块", + "entities": [ + { + "title": "yx_wechat_reply", + "chnname": "微信关键字回复表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "微信关键字回复id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "key", + "type": "VARCHAR_64", + "chnname": "关键字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "回复类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "data", + "type": "TEXT", + "chnname": "回复数据", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "0=不可用 1 =可用", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hide", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_menu", + "chnname": "微信缓存表", + "fields": [ + { + "name": "key", + "type": "VARCHAR_32", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "result", + "type": "TEXT", + "chnname": "缓存数据", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT_10", + "chnname": "缓存时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_media", + "chnname": "微信回复表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "微信视频音频id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_16", + "chnname": "回复类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_128", + "chnname": "文件路径", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "media_id", + "type": "VARCHAR_64", + "chnname": "微信服务器返回的id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_256", + "chnname": "地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temporary", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否永久或者临时 0永久1临时", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT UNSIGNED_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_article", + "chnname": "文章管理表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "文章管理ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cid", + "type": "VARCHAR_255", + "chnname": "分类id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "文章标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "author", + "type": "VARCHAR_255", + "chnname": "文章作者", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image_input", + "type": "VARCHAR_255", + "chnname": "文章图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "synopsis", + "type": "VARCHAR_255", + "chnname": "文章简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share_title", + "type": "VARCHAR_255", + "chnname": "文章分享标题", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share_synopsis", + "type": "VARCHAR_255", + "chnname": "文章分享简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "visit", + "type": "VARCHAR_255", + "chnname": "浏览次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "原文链接", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hide", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "admin_id", + "type": "INT UNSIGNED_10", + "chnname": "管理员id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "INT_10", + "chnname": "产品关联id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否热门(小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_banner", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否轮播图(小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_template", + "chnname": "微信模板", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "模板id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "tempkey", + "type": "CHAR_50", + "chnname": "模板编号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "CHAR_100", + "chnname": "模板名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "VARCHAR_1000", + "chnname": "回复内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "tempid", + "type": "CHAR_100", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_30", + "chnname": "类型:template:模板消息 subscribe:订阅消息", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + } + ], + "message": "3.1sql导出", + "version": "V1.1", + "changes": [ + { + "type": "entity", + "name": "yx_wechat_live", + "opt": "add" + }, + { + "type": "entity", + "name": "yx_wechat_live_goods", + "opt": "add" + }, + { + "type": "field", + "name": "yx_store_seckill.price.notNull", + "opt": "update", + "changeData": "true=>false" + }, + { + "type": "field", + "name": "yx_store_seckill.cost.notNull", + "opt": "update", + "changeData": "true=>false" + }, + { + "type": "field", + "name": "yx_store_seckill.ot_price.notNull", + "opt": "update", + "changeData": "true=>false" + }, + { + "type": "field", + "name": "yx_store_seckill.spec_type", + "opt": "add" + }, + { + "type": "field", + "name": "yx_store_seckill.temp_id", + "opt": "add" + }, + { + "type": "field", + "name": "yx_store_seckill.is_sub", + "opt": "add" + }, + { + "type": "field", + "name": "yx_store_combination.price.notNull", + "opt": "update", + "changeData": "true=>false" + }, + { + "type": "field", + "name": "yx_store_combination.stock.notNull", + "opt": "update", + "changeData": "true=>false" + }, + { + "type": "field", + "name": "yx_store_combination.unit_name.notNull", + "opt": "update", + "changeData": "true=>false" + }, + { + "type": "field", + "name": "yx_store_combination.spec_type", + "opt": "add" + }, + { + "type": "field", + "name": "yx_store_combination.temp_id", + "opt": "add" + }, + { + "type": "field", + "name": "yx_store_combination.is_sub", + "opt": "add" + }, + { + "type": "field", + "name": "yx_store_combination.is_postage", + "opt": "delete" + }, + { + "type": "field", + "name": "yx_store_combination.postage", + "opt": "delete" + }, + { + "type": "field", + "name": "yx_store_product_attr_value.pink_price", + "opt": "add" + }, + { + "type": "field", + "name": "yx_store_product_attr_value.pink_stock", + "opt": "add" + }, + { + "type": "field", + "name": "yx_store_product_attr_value.seckill_price", + "opt": "add" + }, + { + "type": "field", + "name": "yx_store_product_attr_value.seckill_stock", + "opt": "add" + }, + { + "type": "field", + "name": "yx_wechat_template.type", + "opt": "add" + } + ], + "date": "2020/9/5 17:13:6" +} diff --git a/sql/.yshop.version/yshop-V1.2.pdman.json b/sql/.yshop.version/yshop-V1.2.pdman.json new file mode 100644 index 0000000000000000000000000000000000000000..b7c43630f2a653e1b67e2aa097a7e1d66cd79933 --- /dev/null +++ b/sql/.yshop.version/yshop-V1.2.pdman.json @@ -0,0 +1,11402 @@ +{ + "modules": [ + { + "name": "DB_REVERSE_MYSQL", + "chnname": "逆向解析_MYSQL", + "entities": [ + { + "title": "monitor_server", + "chnname": "服务监控", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cpu_core", + "type": "INT_10", + "chnname": "CPU内核数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cpu_rate", + "type": "DOUBLE_22", + "chnname": "CPU使用率", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "disk_total", + "type": "DOUBLE_22", + "chnname": "磁盘总量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "disk_used", + "type": "DOUBLE_22", + "chnname": "磁盘使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mem_total", + "type": "DOUBLE_22", + "chnname": "内存总数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mem_used", + "type": "DOUBLE_22", + "chnname": "内存使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "port", + "type": "INT_10", + "chnname": "访问端口", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "state", + "type": "VARCHAR_255", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "swap_total", + "type": "DOUBLE_22", + "chnname": "交换区总量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "swap_used", + "type": "DOUBLE_22", + "chnname": "交换区使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "服务地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "edges": [], + "nodes": [] + }, + "associations": [] + }, + { + "name": "tools", + "chnname": "工具模块", + "entities": [ + { + "title": "tools_email_config", + "chnname": "邮箱配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "from_user", + "type": "VARCHAR_255", + "chnname": "收件人", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "host", + "type": "VARCHAR_255", + "chnname": "邮件服务器SMTP地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pass", + "type": "VARCHAR_255", + "chnname": "密码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "port", + "type": "VARCHAR_255", + "chnname": "端口", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sys_user", + "type": "VARCHAR_255", + "chnname": "发件者用户名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_local_storage", + "chnname": "本地存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "文件真实的名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "文件名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "suffix", + "type": "VARCHAR_255", + "chnname": "后缀", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_100", + "chnname": "大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "operate", + "type": "VARCHAR_255", + "chnname": "操作人", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_picture", + "chnname": "Sm.Ms图床", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "上传日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delete_url", + "type": "VARCHAR_255", + "chnname": "删除的URL", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "filename", + "type": "VARCHAR_255", + "chnname": "图片名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "height", + "type": "VARCHAR_255", + "chnname": "图片高度", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "图片大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "图片地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "width", + "type": "VARCHAR_255", + "chnname": "图片宽度", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "md5code", + "type": "VARCHAR_255", + "chnname": "文件的MD5值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_qiniu_config", + "chnname": "七牛云配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "access_key", + "type": "TEXT", + "chnname": "accessKey", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bucket", + "type": "VARCHAR_255", + "chnname": "Bucket 识别符", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "host", + "type": "VARCHAR_255", + "chnname": "外链域名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "secret_key", + "type": "TEXT", + "chnname": "secretKey", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "空间类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "zone", + "type": "VARCHAR_255", + "chnname": "机房", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_qiniu_content", + "chnname": "七牛云文件存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "bucket", + "type": "VARCHAR_255", + "chnname": "Bucket 识别符", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "文件名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "文件大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "文件类型:私有或公开", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "上传或同步的时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "文件url", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "suffix", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_verification_code", + "chnname": "验证码", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "code", + "type": "VARCHAR_255", + "chnname": "验证码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态:1有效、0过期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "验证码类型:email或者短信", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_255", + "chnname": "接收邮箱或者手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "scenes", + "type": "VARCHAR_255", + "chnname": "业务名称:如重置邮箱、重置密码等", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_alipay_config", + "chnname": "支付宝配置类", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "app_id", + "type": "VARCHAR_255", + "chnname": "应用ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "charset", + "type": "VARCHAR_255", + "chnname": "编码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "format", + "type": "VARCHAR_255", + "chnname": "类型 固定格式json", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "gateway_url", + "type": "VARCHAR_255", + "chnname": "网关地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "notify_url", + "type": "VARCHAR_255", + "chnname": "异步回调", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "private_key", + "type": "TEXT", + "chnname": "私钥", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "public_key", + "type": "TEXT", + "chnname": "公钥", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "return_url", + "type": "VARCHAR_255", + "chnname": "回调地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sign_type", + "type": "VARCHAR_255", + "chnname": "签名方式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sys_service_provider_id", + "type": "VARCHAR_255", + "chnname": "商户号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "logging", + "chnname": "日志", + "entities": [ + { + "title": "sys_log", + "chnname": "系统日志", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "exception_detail", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "log_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "request_ip", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browser", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + }, + { + "name": "gen", + "chnname": "代码生成", + "entities": [ + { + "title": "gen_test", + "chnname": "代码生成测试", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sex", + "type": "INT_10", + "chnname": "性别", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "column_config", + "chnname": "代码生成字段信息存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "table_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "column_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "column_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dict_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extra", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "form_show", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "form_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "key_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "list_show", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "not_null", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "query_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "date_annotation", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "gen_config", + "chnname": "代码生成器配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "table_name", + "type": "VARCHAR_255", + "chnname": "表名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "author", + "type": "VARCHAR_255", + "chnname": "作者", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cover", + "type": "BIT_1", + "chnname": "是否覆盖", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "module_name", + "type": "VARCHAR_255", + "chnname": "模块名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pack", + "type": "VARCHAR_255", + "chnname": "至于哪个包下", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "前端代码生成的路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "api_path", + "type": "VARCHAR_255", + "chnname": "前端Api文件路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "prefix", + "type": "VARCHAR_255", + "chnname": "表前缀", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "api_alias", + "type": "VARCHAR_255", + "chnname": "接口名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "column_config", + "moduleName": false, + "x": 288.359375, + "y": 279, + "id": "09a1ceae" + }, + { + "shape": "table", + "title": "gen_config", + "moduleName": false, + "x": 760, + "y": 200, + "id": "2e380491" + } + ], + "edges": [] + }, + "associations": [] + }, + { + "name": "monitor", + "chnname": "", + "entities": [ + { + "title": "sys_visits", + "chnname": "访客记录", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "date", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ip_counts", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pv_counts", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "week_day", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + }, + { + "name": "quartz", + "chnname": "定时任务", + "entities": [ + { + "title": "quartz_job", + "chnname": "定时任务", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "bean_name", + "type": "VARCHAR_255", + "chnname": "Spring Bean名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cron_expression", + "type": "VARCHAR_255", + "chnname": "cron 表达式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pause", + "type": "BIT_1", + "chnname": "状态:1暂停、0启用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_name", + "type": "VARCHAR_255", + "chnname": "任务名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method_name", + "type": "VARCHAR_255", + "chnname": "方法名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "VARCHAR_255", + "chnname": "参数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "quartz_log", + "chnname": "定时任务日志", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "baen_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cron_expression", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "exception_detail", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_success", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "quartz_job", + "moduleName": false, + "x": 422.359375, + "y": 367, + "id": "4b2bda89" + }, + { + "shape": "table", + "title": "quartz_log", + "moduleName": false, + "x": 890, + "y": 340, + "id": "b47ba8e0" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "b47ba8e0", + "target": "4b2bda89", + "id": "01afd2ee", + "controlPoints": [ + { + "x": 759.2236328125, + "y": 356.3101851851852 + }, + { + "x": 608.0595703125, + "y": 354.9063636363636 + } + ], + "sourceAnchor": 12, + "targetAnchor": 9 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "quartz_log", + "field": "job_name" + }, + "to": { + "entity": "quartz_job", + "field": "job_name" + } + } + ] + }, + { + "name": "system", + "chnname": "系统模块", + "entities": [ + { + "title": "sys_users_roles", + "chnname": "用户角色关联", + "fields": [ + { + "name": "user_id", + "type": "BIGINT_19", + "chnname": "用户ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "角色ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_roles_menus", + "chnname": "角色菜单关联", + "fields": [ + { + "name": "menu_id", + "type": "BIGINT_19", + "chnname": "菜单ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "角色ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_roles_depts", + "chnname": "角色部门关联", + "fields": [ + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_user_avatar", + "chnname": "系统用户头像", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "真实文件名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_role", + "chnname": "角色表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "data_scope", + "type": "VARCHAR_255", + "chnname": "数据权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "INT_10", + "chnname": "角色级别", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "permission", + "type": "VARCHAR_255", + "chnname": "功能权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dict", + "chnname": "数据字典", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "字典名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dict_detail", + "chnname": "数据字典详情", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "label", + "type": "VARCHAR_255", + "chnname": "字典标签", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_255", + "chnname": "字典值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "VARCHAR_255", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dict_id", + "type": "BIGINT_19", + "chnname": "字典id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dept", + "chnname": "部门", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT_19", + "chnname": "上级部门", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIT_1", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_menu", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "i_frame", + "type": "BIT_1", + "chnname": "是否外链", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "菜单名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "component", + "type": "VARCHAR_255", + "chnname": "组件", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT_19", + "chnname": "上级菜单ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "BIGINT_19", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "icon", + "type": "VARCHAR_255", + "chnname": "图标", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "链接地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cache", + "type": "BIT_1", + "chnname": "缓存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hidden", + "type": "BIT_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "component_name", + "type": "VARCHAR_20", + "chnname": "组件名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "permission", + "type": "VARCHAR_255", + "chnname": "权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "INT_10", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_job", + "chnname": "岗位", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "岗位名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIT_1", + "chnname": "岗位状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "BIGINT_19", + "chnname": "岗位排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "部门ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_user", + "chnname": "系统用户", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "avatar_id", + "type": "BIGINT_19", + "chnname": "头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "email", + "type": "VARCHAR_255", + "chnname": "邮箱", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIGINT_19", + "chnname": "状态:1启用、0禁用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "password", + "type": "VARCHAR_255", + "chnname": "密码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "部门名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "VARCHAR_255", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_id", + "type": "BIGINT_19", + "chnname": "岗位名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "last_password_reset_time", + "type": "DATETIME", + "chnname": "最后修改密码的日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nick_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sex", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "sys_user", + "moduleName": false, + "x": 730, + "y": 200, + "id": "42584636" + }, + { + "shape": "table", + "title": "sys_menu", + "moduleName": false, + "x": 230, + "y": 580, + "id": "faa9e561" + }, + { + "shape": "table", + "title": "sys_dict_detail", + "moduleName": false, + "x": 1440, + "y": 720, + "id": "de6d0d5f" + }, + { + "shape": "table", + "title": "sys_dict", + "moduleName": false, + "x": 1080, + "y": 770, + "id": "2e3e2ccb" + }, + { + "shape": "table", + "title": "sys_user_avatar", + "moduleName": false, + "x": 220, + "y": 100, + "id": "794cd430" + }, + { + "shape": "table", + "title": "sys_job", + "moduleName": false, + "x": 240, + "y": 290, + "id": "fe1aecfe" + }, + { + "shape": "table", + "title": "sys_roles_menus", + "moduleName": false, + "x": 550, + "y": 490, + "id": "0ba651c7" + }, + { + "shape": "table", + "title": "sys_role", + "moduleName": false, + "x": 850, + "y": 570, + "id": "2dd8b462" + }, + { + "shape": "table", + "title": "sys_roles_depts", + "moduleName": false, + "x": 1140, + "y": 490, + "id": "759d8dd0" + }, + { + "shape": "table", + "title": "sys_users_roles", + "moduleName": false, + "x": 1210, + "y": 50, + "id": "e76717e1" + }, + { + "shape": "table", + "title": "sys_dept", + "moduleName": false, + "x": 1200, + "y": 240, + "id": "2ecdc324" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "fe1aecfe", + "id": "a7e02413", + "controlPoints": [ + { + "x": 518.6240234375, + "y": 225.91161616161617 + }, + { + "x": 384.025390625, + "y": 232.19736842105263 + } + ], + "sourceAnchor": 16, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "2ecdc324", + "id": "99cdad68", + "controlPoints": [ + { + "x": 941.3759765625, + "y": 187.46212121212122 + }, + { + "x": 1055.974609375, + "y": 192.22058823529412 + } + ], + "sourceAnchor": 13, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "de6d0d5f", + "target": "2e3e2ccb", + "id": "0f30581b", + "controlPoints": [ + { + "x": 1296.224609375, + "y": 736.3355263157895 + }, + { + "x": 1223.775390625, + "y": 732.25 + } + ], + "sourceAnchor": 8, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "794cd430", + "id": "618c6bc6", + "controlPoints": [ + { + "x": 518.6240234375, + "y": 91.33838383838385 + }, + { + "x": 368.099609375, + "y": 72.28846153846153 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "0ba651c7", + "target": "faa9e561", + "id": "fdb423ea", + "controlPoints": [ + { + "x": 422.126953125, + "y": 492.281914893617 + }, + { + "x": 395.0341796875, + "y": 442.10714285714283 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "0ba651c7", + "target": "2dd8b462", + "id": "882b95a1", + "controlPoints": [ + { + "x": 677.873046875, + "y": 512.8191489361702 + }, + { + "x": 705.974609375, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 3, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "759d8dd0", + "target": "2dd8b462", + "id": "7a7a3350", + "controlPoints": [ + { + "x": 1034.2080078125, + "y": 492.281914893617 + }, + { + "x": 994.025390625, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "759d8dd0", + "target": "2ecdc324", + "id": "a9e0dc69", + "controlPoints": [ + { + "x": 1245.7919921875, + "y": 506.48049645390074 + }, + { + "x": 1440, + "y": 500 + }, + { + "x": 1440, + "y": 190 + }, + { + "x": 1344.025390625, + "y": 192.22058823529412 + } + ], + "sourceAnchor": 3, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e76717e1", + "target": "42584636", + "id": "6179129e", + "controlPoints": [ + { + "x": 1085.4638671875, + "y": 52.28191489361702 + }, + { + "x": 941.3759765625, + "y": 72.11363636363636 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e76717e1", + "target": "2dd8b462", + "id": "c796f9c9", + "controlPoints": [ + { + "x": 1334.5361328125, + "y": 72.81914893617022 + }, + { + "x": 1480, + "y": 70 + }, + { + "x": 1490, + "y": 580 + }, + { + "x": 1030, + "y": 590 + }, + { + "x": 994.025390625, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 3, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "sys_user", + "field": "job_id" + }, + "to": { + "entity": "sys_job", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_user", + "field": "dept_id" + }, + "to": { + "entity": "sys_dept", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_dict_detail", + "field": "dict_id" + }, + "to": { + "entity": "sys_dict", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_user", + "field": "avatar_id" + }, + "to": { + "entity": "sys_user_avatar", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_menus", + "field": "menu_id" + }, + "to": { + "entity": "sys_menu", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_menus", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_depts", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_depts", + "field": "dept_id" + }, + "to": { + "entity": "sys_dept", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_users_roles", + "field": "user_id" + }, + "to": { + "entity": "sys_user", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_users_roles", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + } + ] + }, + { + "name": "activity", + "chnname": "活动", + "entities": [ + { + "title": "yx_store_seckill", + "chnname": "商品秒杀产品表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品秒杀产品表id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "推荐图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "活动标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "原价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "返多少积分", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_16", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATE", + "chnname": "开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATE", + "chnname": "结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "产品状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "热门推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "删除 0未删除1已删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "num", + "type": "INT UNSIGNED_10", + "chnname": "最多秒杀几个", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "TINYINT UNSIGNED_1", + "chnname": "显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time_id", + "type": "INT UNSIGNED_10", + "chnname": "时间段id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spec_type", + "type": "BIT_1", + "chnname": "规格 0单 1多", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "运费模板id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_pink", + "chnname": "拼团表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单id 生成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id_key", + "type": "INT UNSIGNED_10", + "chnname": "订单id 数据库", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_num", + "type": "INT UNSIGNED_10", + "chnname": "购买商品个数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "购买总金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cid", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT UNSIGNED_20", + "chnname": "产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "people", + "type": "INT UNSIGNED_10", + "chnname": "拼团总人数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "拼团产品单价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "k_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "团长id 0为团长", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_tpl", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否发送模板消息0未发送1已发送", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_refund", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否退款 0未退款 1已退款", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态1进行中2已完成3未完成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_user", + "chnname": "优惠券发放记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "优惠券发放记录id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cid", + "type": "INT UNSIGNED_10", + "chnname": "兑换的项目id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "优惠券所属用户", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_title", + "type": "VARCHAR_32", + "chnname": "优惠券名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "优惠券的面值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "最低消费多少金额可用优惠券", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "优惠券创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "end_time", + "type": "DATETIME", + "chnname": "优惠券结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_time", + "type": "DATETIME", + "chnname": "使用时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "获取方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态(0:未使用,1:已使用, 2:已过期)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_fail", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否有效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_issue_user", + "chnname": "优惠券前台用户领取记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "领取优惠券用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "issue_coupon_id", + "type": "INT_10", + "chnname": "优惠券前台领取ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "领取时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_issue", + "chnname": "优惠券前台领取表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cid", + "type": "INT_10", + "chnname": "优惠券ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ctype", + "type": "BIT_1", + "chnname": "优惠券类型 0-通用 1-商品券", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "优惠券领取开启时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "end_time", + "type": "DATETIME", + "chnname": "优惠券领取结束时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_count", + "type": "INT_10", + "chnname": "优惠券领取数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remain_count", + "type": "INT_10", + "chnname": "优惠券剩余领取数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_permanent", + "type": "BIT_1", + "chnname": "是否无限张数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "1 正常 0 未开启 -1 已无效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "优惠券添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon", + "chnname": "优惠券表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "优惠券表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_64", + "chnname": "优惠券名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "integral", + "type": "INT UNSIGNED_10", + "chnname": "兑换消耗积分值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "兑换的优惠券面值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "最低消费多少金额可用优惠券", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_time", + "type": "INT UNSIGNED_10", + "chnname": "优惠券有效期限(单位:天)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态(0:关闭,1:开启)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "VARCHAR_200", + "chnname": "商品ids", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "TINYINT_3", + "chnname": "优惠券类型 0-通用 1-商品券", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "兑换项目添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_combination", + "chnname": "拼团产品表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "推荐图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "活动标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr", + "type": "VARCHAR_255", + "chnname": "活动属性", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "people", + "type": "INT UNSIGNED_10", + "chnname": "参团人数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_price", + "type": "DECIMAL_10_2", + "chnname": "商品原价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_host", + "type": "TINYINT UNSIGNED_1", + "chnname": "推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "TINYINT UNSIGNED_1", + "chnname": "产品状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_use", + "type": "TINYINT UNSIGNED_1", + "chnname": "商户是否可用1可用0不可用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "拼团内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "拼团开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "拼团结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "effective_time", + "type": "INT_10", + "chnname": "拼团订单有效时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "INT UNSIGNED_10", + "chnname": "拼团产品成本", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browse", + "type": "INT_10", + "chnname": "浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_32", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spec_type", + "type": "BIT_1", + "chnname": "规格 0单 1多", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "运费模板ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain_user_help", + "chnname": "砍价用户帮助表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价用户帮助表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "帮助的用户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_user_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户参与砍价表id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "帮助砍价多少金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain_user", + "chnname": "用户参与砍价表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户参与砍价表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_price_min", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价的最低价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_price", + "type": "DECIMAL_8_2", + "chnname": "砍价金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍掉的价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态 1参与中 2 活动结束参与失败 3活动结束参与成功", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "参与时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否取消", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain", + "chnname": "砍价表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "关联产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "砍价活动名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_150", + "chnname": "砍价活动图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_16", + "chnname": "单位名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "砍价产品轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "砍价开启时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "砍价结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_255", + "chnname": "砍价产品名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价商品最低价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "num", + "type": "INT UNSIGNED_10", + "chnname": "每次购买的砍价产品数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_max_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户每次砍价的最大金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户每次砍价的最小金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_num", + "type": "INT UNSIGNED_10", + "chnname": "用户每次砍价的次数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "砍价详情", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "反多少积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "砍价活动简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否推荐0不推荐1推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除 0未删除 1删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮 0不包邮 1包邮", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "rule", + "type": "TEXT", + "chnname": "砍价规则", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "look", + "type": "INT UNSIGNED_10", + "chnname": "砍价产品浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share", + "type": "INT UNSIGNED_10", + "chnname": "砍价产品分享量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_visit", + "chnname": "产品浏览分析表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "INT_10", + "chnname": "产品ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_type", + "type": "VARCHAR_32", + "chnname": "产品类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_id", + "type": "INT_10", + "chnname": "产品分类ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "CHAR_50", + "chnname": "产品类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "INT_10", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "count", + "type": "INT_10", + "chnname": "访问次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "VARCHAR_255", + "chnname": "备注描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_pink", + "moduleName": false, + "x": 310, + "y": 580, + "id": "13513a4e" + }, + { + "shape": "table", + "title": "yx_store_coupon", + "moduleName": false, + "x": 600, + "y": 180, + "id": "2b6bf508" + }, + { + "shape": "table", + "title": "yx_store_coupon_user", + "moduleName": false, + "x": 1310, + "y": 190, + "id": "aa29268e" + }, + { + "shape": "table", + "title": "yx_store_coupon_issue", + "moduleName": false, + "x": 1270, + "y": 580, + "id": "74e5a8f0" + }, + { + "shape": "table", + "title": "yx_store_coupon_issue_user", + "moduleName": false, + "x": 790, + "y": 610, + "id": "dfd12dd0" + }, + { + "shape": "table", + "title": "yx_store_bargain", + "moduleName": false, + "x": -160, + "y": -50, + "id": "1de36ee3" + }, + { + "shape": "table", + "title": "yx_store_bargain_user", + "moduleName": false, + "x": 590, + "y": -340, + "id": "14a47167" + }, + { + "shape": "table", + "title": "yx_store_bargain_user_help", + "moduleName": false, + "x": 490, + "y": -100, + "id": "e979c0f8" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "aa29268e", + "target": "2b6bf508", + "id": "a8da6c7b", + "controlPoints": [ + { + "x": 1041.849609375, + "y": 91.2897465437788 + }, + { + "x": 835.138671875, + "y": 72.12931034482759 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "74e5a8f0", + "target": "2b6bf508", + "id": "6abf3f7d", + "controlPoints": [ + { + "x": 1051.787109375, + "y": 510.3375331564987 + }, + { + "x": 835.138671875, + "y": 72.12931034482759 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "dfd12dd0", + "target": "74e5a8f0", + "id": "0433262a", + "controlPoints": [ + { + "x": 991.1455078125, + "y": 608.3222222222222 + }, + { + "x": 1051.787109375, + "y": 472.12931034482756 + } + ], + "sourceAnchor": 5, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "14a47167", + "target": "1de36ee3", + "id": "e528de82", + "controlPoints": [ + { + "x": 279.8408203125, + "y": -377.6630434782609 + }, + { + "x": 182.1513671875, + "y": -347.9440298507463 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e979c0f8", + "target": "1de36ee3", + "id": "b2e7774f", + "controlPoints": [ + { + "x": 280.6005859375, + "y": -120.73355263157895 + }, + { + "x": 182.1513671875, + "y": -347.9440298507463 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_user", + "field": "cid" + }, + "to": { + "entity": "yx_store_coupon", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_issue", + "field": "cid" + }, + "to": { + "entity": "yx_store_coupon", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_issue_user", + "field": "issue_coupon_id" + }, + "to": { + "entity": "yx_store_coupon_issue", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_bargain_user", + "field": "bargain_id" + }, + "to": { + "entity": "yx_store_bargain", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_bargain_user_help", + "field": "bargain_id" + }, + "to": { + "entity": "yx_store_bargain", + "field": "id" + } + } + ] + }, + { + "name": "cart", + "chnname": "购物车", + "entities": [ + { + "title": "yx_store_cart", + "chnname": "购物车表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "购物车表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_attr_unique", + "type": "VARCHAR_50", + "chnname": "商品属性", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_num", + "type": "SMALLINT UNSIGNED_5", + "chnname": "商品数量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pay", + "type": "BIT_1", + "chnname": "0 = 未购买 1 = 已购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_new", + "type": "BIT_1", + "chnname": "是否为立即购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination_id", + "type": "INT UNSIGNED_10", + "chnname": "拼团id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_id", + "type": "INT UNSIGNED_10", + "chnname": "秒杀产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "INT UNSIGNED_10", + "chnname": "砍价id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "category", + "chnname": "商品分类", + "entities": [ + { + "title": "yx_store_category", + "chnname": "商品分类表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT_7", + "chnname": "商品分类表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "pid", + "type": "MEDIUMINT_7", + "chnname": "父id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_name", + "type": "VARCHAR_100", + "chnname": "分类名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "MEDIUMINT_7", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pic", + "type": "VARCHAR_128", + "chnname": "图标", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否推荐", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "删除状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "order", + "chnname": "订单", + "entities": [ + { + "title": "yx_store_order", + "chnname": "订单表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extend_order_id", + "type": "VARCHAR_32", + "chnname": "额外订单号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_32", + "chnname": "用户姓名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_phone", + "type": "VARCHAR_18", + "chnname": "用户电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_address", + "type": "VARCHAR_100", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_id", + "type": "VARCHAR_256", + "chnname": "购物车id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "freight_price", + "type": "DECIMAL_8_2", + "chnname": "运费金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_num", + "type": "INT UNSIGNED_10", + "chnname": "订单商品总数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "订单总价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "实际支付金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "支付邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "deduction_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "抵扣金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_id", + "type": "INT UNSIGNED_10", + "chnname": "优惠券id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "优惠券金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "paid", + "type": "TINYINT UNSIGNED_1", + "chnname": "支付状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_time", + "type": "DATETIME", + "chnname": "支付时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_type", + "type": "VARCHAR_32", + "chnname": "支付方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:已完成;-1:已退款)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_status", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 未退款 1 申请中 2 已退款", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap_img", + "type": "VARCHAR_255", + "chnname": "退款图片", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap_explain", + "type": "VARCHAR_255", + "chnname": "退款用户说明", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_time", + "type": "DATETIME", + "chnname": "退款时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap", + "type": "VARCHAR_255", + "chnname": "前台退款原因", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason", + "type": "VARCHAR_255", + "chnname": "不退款的理由", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "退款金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_sn", + "type": "VARCHAR_100", + "chnname": "快递公司编号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_name", + "type": "VARCHAR_64", + "chnname": "快递名称/送货人姓名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_type", + "type": "VARCHAR_32", + "chnname": "发货类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_id", + "type": "VARCHAR_64", + "chnname": "快递单号/手机号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "gain_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "消费赚取积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "使用积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "back_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "给用户退了多少积分", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "CHAR_32", + "chnname": "唯一id(md5加密)类似id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_512", + "chnname": "管理员备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_mer_check", + "type": "TINYINT UNSIGNED_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团产品id0一般产品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pink_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团id 0没有拼团", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "秒杀产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "INT UNSIGNED_10", + "chnname": "砍价id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "verify_code", + "type": "VARCHAR_50", + "chnname": "核销码", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_id", + "type": "INT_10", + "chnname": "门店id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "shipping_type", + "type": "BIT_1", + "chnname": "配送方式 1=快递 ,2=门店自提", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_channel", + "type": "TINYINT UNSIGNED_1", + "chnname": "支付渠道(0微信公众号1微信小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_remind", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_system_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_order_cart_info", + "chnname": "订单购物详情表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "购物车id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_info", + "type": "TEXT", + "chnname": "购买东西的详细信息", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "VARCHAR_50", + "chnname": "唯一id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_order_status", + "chnname": "订单操作记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_type", + "type": "VARCHAR_32", + "chnname": "操作类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_message", + "type": "VARCHAR_256", + "chnname": "操作备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_time", + "type": "DATETIME", + "chnname": "操作时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_express", + "chnname": "快递公司表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "快递公司id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "code", + "type": "VARCHAR_50", + "chnname": "快递公司简称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_50", + "chnname": "快递公司全称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_order", + "moduleName": false, + "x": 610, + "y": 550, + "id": "0eda0dc5" + }, + { + "shape": "table", + "title": "yx_store_order_cart_info", + "moduleName": false, + "x": 1370, + "y": 70, + "id": "1412580b" + }, + { + "shape": "table", + "title": "yx_store_cart", + "moduleName": "cart", + "x": 1410, + "y": 330, + "id": "bcf3c95c" + }, + { + "shape": "table", + "title": "yx_store_order_status", + "moduleName": false, + "x": 1380, + "y": 610, + "id": "f5488e91" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "1412580b", + "target": "0eda0dc5", + "id": "6f47eff5", + "controlPoints": [ + { + "x": 1179.8701171875, + "y": 52.38333333333334 + }, + { + "x": 1074.1962890625, + "y": 32.03378378378378 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "1412580b", + "target": "bcf3c95c", + "id": "2c239ffd", + "controlPoints": [ + { + "x": 1179.8701171875, + "y": 72.51666666666668 + }, + { + "x": 1120, + "y": 70 + }, + { + "x": 1120, + "y": 210 + }, + { + "x": 1184.4970703125, + "y": 212.1209677419355 + } + ], + "sourceAnchor": 4, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "f5488e91", + "target": "0eda0dc5", + "id": "70641526", + "controlPoints": [ + { + "x": 1200.5224609375, + "y": 602.4423076923077 + }, + { + "x": 1130, + "y": 450 + }, + { + "x": 1074.1962890625, + "y": 32.03378378378378 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_order_cart_info", + "field": "oid" + }, + "to": { + "entity": "yx_store_order", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_order_cart_info", + "field": "cart_id" + }, + "to": { + "entity": "yx_store_cart", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_order_status", + "field": "oid" + }, + "to": { + "entity": "yx_store_order", + "field": "id" + } + } + ] + }, + { + "name": "product", + "chnname": "商品模块", + "entities": [ + { + "title": "yx_store_product_reply", + "chnname": "评论表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "评论ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT_19", + "chnname": "订单ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "CHAR_32", + "chnname": "唯一id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT_19", + "chnname": "产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "reply_type", + "type": "VARCHAR_32", + "chnname": "某种商品类型(普通商品、秒杀商品)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_score", + "type": "BIT_1", + "chnname": "商品分数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "service_score", + "type": "BIT_1", + "chnname": "服务分数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "comment", + "type": "VARCHAR_512", + "chnname": "评论内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pics", + "type": "TEXT", + "chnname": "评论图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "评论时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_reply_content", + "type": "VARCHAR_300", + "chnname": "管理员回复内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_reply_time", + "type": "DATETIME", + "chnname": "管理员回复时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "0未删除1已删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_reply", + "type": "BIT_1", + "chnname": "0未回复1已回复", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_relation", + "chnname": "商品点赞和收藏表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "类型(收藏(collect)、点赞(like))", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "category", + "type": "VARCHAR_32", + "chnname": "某种类型的商品(普通商品、秒杀商品)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr_value", + "chnname": "商品属性值表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sku", + "type": "VARCHAR_128", + "chnname": "商品属性索引值 (attr_value|attr_value[|....])", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "属性对应的库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "属性金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_128", + "chnname": "图片", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "VARCHAR_100", + "chnname": "唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bar_code", + "type": "VARCHAR_255", + "chnname": "商品条码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL_10_2", + "chnname": "原价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "weight", + "type": "DECIMAL_8_2", + "chnname": "重量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "volume", + "type": "DECIMAL_8_2", + "chnname": "体积", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage", + "type": "DECIMAL_8_2", + "chnname": "一级返佣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage_two", + "type": "DECIMAL_8_2", + "chnname": "二级返佣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pink_price", + "type": "DECIMAL_8_2", + "chnname": "拼团价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pink_stock", + "type": "INT_10", + "chnname": "拼团库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_price", + "type": "DECIMAL_10_2", + "chnname": "秒杀价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_stock", + "type": "INT_10", + "chnname": "秒杀库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr_result", + "chnname": "商品属性详情表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "result", + "type": "TEXT", + "chnname": "商品属性参数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_time", + "type": "DATETIME", + "chnname": "上次修改时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr", + "chnname": "商品属性表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr_name", + "type": "VARCHAR_32", + "chnname": "属性名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr_values", + "type": "VARCHAR_256", + "chnname": "属性值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product", + "chnname": "商品表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "商品id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_256", + "chnname": "商品图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "slider_image", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_128", + "chnname": "商品名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_info", + "type": "VARCHAR_256", + "chnname": "商品简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "keyword", + "type": "VARCHAR_256", + "chnname": "关键字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bar_code", + "type": "VARCHAR_15", + "chnname": "产品条码(一维码)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_id", + "type": "VARCHAR_64", + "chnname": "分类id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "商品价格", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "vip_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "会员价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "市场价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_32", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "SMALLINT_5", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "状态(0:未上架,1:上架)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "BIT_1", + "chnname": "是否热卖", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_benefit", + "type": "BIT_1", + "chnname": "是否优惠", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_best", + "type": "BIT_1", + "chnname": "是否精品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_new", + "type": "BIT_1", + "chnname": "是否新品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "产品描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_use", + "type": "TINYINT UNSIGNED_1", + "chnname": "商户是否代理 0不可代理1可代理", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "获得积分", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_seckill", + "type": "TINYINT UNSIGNED_1", + "chnname": "秒杀状态 0 未开启 1已开启", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_bargain", + "type": "TINYINT UNSIGNED_1", + "chnname": "砍价状态 0未开启 1开启", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_good", + "type": "BIT_1", + "chnname": "是否优品推荐", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ficti", + "type": "MEDIUMINT_7", + "chnname": "虚拟销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browse", + "type": "INT_10", + "chnname": "浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "code_path", + "type": "VARCHAR_64", + "chnname": "产品二维码地址(用户小程序海报)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_sub", + "type": "BIT_1", + "chnname": "是否单独分佣", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "运费模板ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spec_type", + "type": "BIT_1", + "chnname": "规格 0单 1多", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_rule", + "chnname": "商品规则值(规格)表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "rule_name", + "type": "VARCHAR_32", + "chnname": "规格名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "rule_value", + "type": "JSON", + "chnname": "规格值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_product", + "moduleName": false, + "x": 390, + "y": 410, + "id": "1f2a5f58" + }, + { + "shape": "table", + "title": "yx_store_product_attr", + "moduleName": false, + "x": 970, + "y": 60, + "id": "8d021563" + }, + { + "shape": "table", + "title": "yx_store_product_attr_value", + "moduleName": false, + "x": 1090, + "y": 360, + "id": "65395cd5" + }, + { + "shape": "table", + "title": "yx_store_product_attr_result", + "moduleName": false, + "x": 1020, + "y": 660, + "id": "f65fda56" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "8d021563", + "target": "1f2a5f58", + "id": "8a5b631d", + "controlPoints": [ + { + "x": 814.5400390625, + "y": 62.52272727272727 + }, + { + "x": 698.1318359375, + "y": 42.0462962962963 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "65395cd5", + "target": "1f2a5f58", + "id": "b3c471e9", + "controlPoints": [ + { + "x": 818.958984375, + "y": 252.17424242424244 + }, + { + "x": 698.1318359375, + "y": 42.0462962962963 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "65395cd5", + "target": "8d021563", + "id": "76f261e2", + "controlPoints": [ + { + "x": 818.958984375, + "y": 272.2348484848485 + }, + { + "x": 750, + "y": 240 + }, + { + "x": 814.5400390625, + "y": 82.70454545454545 + } + ], + "sourceAnchor": 4, + "targetAnchor": 4 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr", + "field": "product_id" + }, + "to": { + "entity": "yx_store_product", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr_value", + "field": "product_id" + }, + "to": { + "entity": "yx_store_product", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr_value", + "field": "sku" + }, + "to": { + "entity": "yx_store_product_attr", + "field": "attr_name" + } + } + ] + }, + { + "name": "shop", + "chnname": "商户模块", + "entities": [ + { + "title": "yx_material_group", + "chnname": "素材分组", + "fields": [ + { + "name": "id", + "type": "VARCHAR_32", + "chnname": "PK", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_id", + "type": "VARCHAR_32", + "chnname": "创建者ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_200", + "chnname": "分组名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_attachment", + "chnname": "附件管理表", + "fields": [ + { + "name": "att_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "附件名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_dir", + "type": "VARCHAR_200", + "chnname": "附件路径", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "satt_dir", + "type": "VARCHAR_200", + "chnname": "压缩图片路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_size", + "type": "CHAR_30", + "chnname": "附件大小", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_type", + "type": "CHAR_30", + "chnname": "附件类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "INT_10", + "chnname": "分类ID0编辑器,1产品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image_type", + "type": "TINYINT UNSIGNED_1", + "chnname": "图片上传类型 1本地 2七牛云 3OSS 4COS ", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "module_type", + "type": "TINYINT UNSIGNED_1", + "chnname": "图片上传模块类型 1 后台上传 2 用户生成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "invite_code", + "type": "VARCHAR_50", + "chnname": "邀请码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_config", + "chnname": "配置表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "配置id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "menu_name", + "type": "VARCHAR_255", + "chnname": "字段名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_5000", + "chnname": "默认值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_group_data", + "chnname": "组合数据详情表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "组合数据详情ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "group_name", + "type": "VARCHAR_100", + "chnname": "对应的数据名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "TEXT", + "chnname": "数据组对应的数据值(json数据)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加数据时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "数据排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态(1:开启;2:关闭;)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_store", + "chnname": "门店自提", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "门店名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "introduction", + "type": "VARCHAR_1000", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_25", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "省市区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "detailed_address", + "type": "VARCHAR_255", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "门店logo", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "latitude", + "type": "CHAR_25", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "longitude", + "type": "CHAR_25", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time", + "type": "VARCHAR_100", + "chnname": "核销有效日期", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time", + "type": "VARCHAR_100", + "chnname": "每日营业开关时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time_end", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time_start", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time_end", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time_start", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_store_staff", + "chnname": "门店店员表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "微信用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "avatar", + "type": "VARCHAR_255", + "chnname": "店员头像", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_id", + "type": "INT_10", + "chnname": "门店id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "staff_name", + "type": "VARCHAR_64", + "chnname": "店员名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_15", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "verify_status", + "type": "TINYINT_3", + "chnname": "核销开关", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_user_level", + "chnname": "设置用户等级表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "会员名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "money", + "type": "DECIMAL_8_2", + "chnname": "购买金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_date", + "type": "INT_10", + "chnname": "有效时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_forever", + "type": "BIT_1", + "chnname": "是否为永久会员", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pay", + "type": "BIT_1", + "chnname": "是否购买,1=购买,0=不购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示 1=显示,0=隐藏", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "grade", + "type": "INT_10", + "chnname": "会员等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "discount", + "type": "DECIMAL_8_2", + "chnname": "享受折扣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "会员卡背景", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "icon", + "type": "VARCHAR_255", + "chnname": "会员图标", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "explain", + "type": "TEXT", + "chnname": "说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除.1=删除,0=未删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_material", + "chnname": "素材库", + "fields": [ + { + "name": "id", + "type": "VARCHAR_32", + "chnname": "PK", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_id", + "type": "VARCHAR_100", + "chnname": "创建者ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "CHAR_2", + "chnname": "类型1、图片;2、视频", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "group_id", + "type": "VARCHAR_32", + "chnname": "分组ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_200", + "chnname": "素材名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_500", + "chnname": "素材链接", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_material", + "moduleName": false, + "x": 442.359375, + "y": 277, + "id": "fe721315" + }, + { + "shape": "table", + "title": "yx_material_group", + "moduleName": false, + "x": 887.359375, + "y": 279, + "id": "f3be72cb" + }, + { + "shape": "table", + "title": "yx_system_store", + "moduleName": false, + "x": 326.359375, + "y": 624, + "id": "396a35b0" + }, + { + "shape": "table", + "title": "yx_system_store_staff", + "moduleName": false, + "x": 870, + "y": 590, + "id": "c3935d4a" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "fe721315", + "target": "f3be72cb", + "id": "e1f3d02d", + "controlPoints": [ + { + "x": 623.05859375, + "y": 283.9775132275132 + }, + { + "x": 743.333984375, + "y": 241.25 + } + ], + "sourceAnchor": 9, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "c3935d4a", + "target": "396a35b0", + "id": "5bfc667b", + "controlPoints": [ + { + "x": 699.7900390625, + "y": 558.5457559681697 + }, + { + "x": 517.833984375, + "y": 456.0914634146342 + } + ], + "sourceAnchor": 8, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_material", + "field": "group_id" + }, + "to": { + "entity": "yx_material_group", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_system_store_staff", + "field": "store_id" + }, + "to": { + "entity": "yx_system_store", + "field": "id" + } + } + ] + }, + { + "name": "template", + "chnname": "运费模板", + "entities": [ + { + "title": "yx_shipping_templates", + "chnname": "运费模板表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "模板ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "模板名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "region_info", + "type": "TEXT", + "chnname": "地域以及费用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "appoint", + "type": "BIT_1", + "chnname": "指定包邮开关", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "appoint_info", + "type": "TEXT", + "chnname": "指定包邮内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_shipping_templates_free", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "编号", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "province_id", + "type": "INT_10", + "chnname": "省ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "DECIMAL_10_2", + "chnname": "包邮件数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL_10_2", + "chnname": "包邮金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uniqid", + "type": "VARCHAR_32", + "chnname": "分组唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_city", + "chnname": "城市表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "INT_10", + "chnname": "省市级别", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "parent_id", + "type": "INT_10", + "chnname": "父级id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "area_code", + "type": "VARCHAR_30", + "chnname": "区号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merger_name", + "type": "VARCHAR_255", + "chnname": "合并名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "lng", + "type": "VARCHAR_50", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "lat", + "type": "VARCHAR_50", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否展示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_shipping_templates_region", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "编号", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "province_id", + "type": "INT_10", + "chnname": "省ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "first", + "type": "DECIMAL_10_2", + "chnname": "首件", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "first_price", + "type": "DECIMAL_10_2", + "chnname": "首件运费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "continues", + "type": "DECIMAL_10_2", + "chnname": "续件", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "continue_price", + "type": "DECIMAL_10_2", + "chnname": "续件运费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uniqid", + "type": "VARCHAR_50", + "chnname": "分组唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_shipping_templates", + "moduleName": false, + "x": 680, + "y": 380, + "id": "c8177992" + }, + { + "shape": "table", + "title": "yx_system_city", + "moduleName": false, + "x": 290, + "y": 260, + "id": "f3f8204a" + }, + { + "shape": "table", + "title": "yx_shipping_templates_free", + "moduleName": false, + "x": 1080, + "y": 190, + "id": "ac873dd5" + }, + { + "shape": "table", + "title": "yx_shipping_templates_region", + "moduleName": false, + "x": 1080, + "y": 540, + "id": "7ca63a1e" + } + ], + "edges": [] + }, + "associations": [] + }, + { + "name": "user", + "chnname": "用户模块", + "entities": [ + { + "title": "yx_user_bill", + "chnname": "用户账单表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户账单id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_id", + "type": "VARCHAR_32", + "chnname": "关联id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pm", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 = 支出 1 = 获得", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_64", + "chnname": "账单标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "category", + "type": "VARCHAR_64", + "chnname": "明细种类", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_64", + "chnname": "明细类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "明细数字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "剩余", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "0 = 带确定 1 = 有效 -1 = 无效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_level", + "chnname": "用户等级记录表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level_id", + "type": "INT_10", + "chnname": "等级vip", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "grade", + "type": "INT_10", + "chnname": "会员等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time", + "type": "INT_10", + "chnname": "过期时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_forever", + "type": "BIT_1", + "chnname": "是否永久", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "0:禁止,1:正常", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remind", + "type": "BIT_1", + "chnname": "是否已通知", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除,0=未删除,1=删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "discount", + "type": "INT_10", + "chnname": "享受折扣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_task_finish", + "chnname": "用户任务完成记录表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "task_id", + "type": "INT_10", + "chnname": "任务id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "是否有效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_sign", + "chnname": "签到记录表", + "fields": [ + { + "name": "int", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "签到说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "INT_10", + "chnname": "获得积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "INT_10", + "chnname": "剩余积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_recharge", + "chnname": "用户充值表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "充值用户UID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL_8_2", + "chnname": "充值金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_price", + "type": "DECIMAL_8_2", + "chnname": "购买赠送金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "recharge_type", + "type": "VARCHAR_32", + "chnname": "充值类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "paid", + "type": "BIT_1", + "chnname": "是否充值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_time", + "type": "DATETIME", + "chnname": "充值支付时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "充值时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_price", + "type": "DECIMAL_10_2", + "chnname": "退款金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_address", + "chnname": "用户地址表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户地址id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_32", + "chnname": "收货人姓名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "VARCHAR_16", + "chnname": "收货人电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "province", + "type": "VARCHAR_64", + "chnname": "收货人所在省", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city", + "type": "VARCHAR_64", + "chnname": "收货人所在市", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "district", + "type": "VARCHAR_64", + "chnname": "收货人所在区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "detail", + "type": "VARCHAR_256", + "chnname": "收货人详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "post_code", + "type": "VARCHAR_20", + "chnname": "邮编", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "longitude", + "type": "VARCHAR_16", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "latitude", + "type": "VARCHAR_16", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_default", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否默认", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_group", + "chnname": "用户分组表", + "fields": [ + { + "name": "id", + "type": "SMALLINT UNSIGNED_5", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "group_name", + "type": "VARCHAR_64", + "chnname": "用户分组名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_extract", + "chnname": "用户提现表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_64", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extract_type", + "type": "VARCHAR_32", + "chnname": "bank = 银行卡 alipay = 支付宝wx=微信", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bank_code", + "type": "VARCHAR_32", + "chnname": "银行卡", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bank_address", + "type": "VARCHAR_256", + "chnname": "开户地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "alipay_code", + "type": "VARCHAR_64", + "chnname": "支付宝账号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extract_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "提现金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_msg", + "type": "VARCHAR_128", + "chnname": "无效原因", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "-1 未通过 0 审核中 1 已提现", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "wechat", + "type": "VARCHAR_15", + "chnname": "微信号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_enter", + "chnname": "商户申请表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "商户申请ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "INT UNSIGNED_10", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "province", + "type": "VARCHAR_32", + "chnname": "商户所在省", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city", + "type": "VARCHAR_32", + "chnname": "商户所在市", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "district", + "type": "VARCHAR_32", + "chnname": "商户所在区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_256", + "chnname": "商户详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_name", + "type": "VARCHAR_256", + "chnname": "商户名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_user", + "type": "VARCHAR_32", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_tel", + "type": "VARCHAR_16", + "chnname": "商户电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "charter", + "type": "VARCHAR_512", + "chnname": "商户证书", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT UNSIGNED_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "apply_time", + "type": "INT UNSIGNED_10", + "chnname": "审核时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "success_time", + "type": "INT_10", + "chnname": "通过时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_message", + "type": "VARCHAR_256", + "chnname": "未通过原因", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_time", + "type": "INT UNSIGNED_10", + "chnname": "未通过时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "-1 审核未通过 0未审核 1审核通过", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_lock", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 = 开启 1= 关闭", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_user_task", + "chnname": "等级任务设置", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "任务名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "配置原名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "task_type", + "type": "VARCHAR_50", + "chnname": "任务类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "INT_10", + "chnname": "限定数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level_id", + "type": "INT_10", + "chnname": "等级id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_must", + "type": "BIT_1", + "chnname": "是否务必达成任务,1务必达成,0=满足其一", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "illustrate", + "type": "VARCHAR_255", + "chnname": "任务说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "新增时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user", + "chnname": "用户表", + "fields": [ + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户账户(跟accout一样)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "password", + "type": "VARCHAR_255", + "chnname": "用户密码(跟pwd)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_25", + "chnname": "真实姓名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "birthday", + "type": "INT_10", + "chnname": "生日", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "card_id", + "type": "VARCHAR_20", + "chnname": "身份证号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_255", + "chnname": "用户备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "partner_id", + "type": "INT_10", + "chnname": "合伙人id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "group_id", + "type": "INT_10", + "chnname": "用户分组id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_100", + "chnname": "用户昵称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "avatar", + "type": "VARCHAR_256", + "chnname": "用户头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_15", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_ip", + "type": "VARCHAR_16", + "chnname": "添加ip", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "最后一次登录时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "last_ip", + "type": "VARCHAR_16", + "chnname": "最后一次登录ip", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "now_money", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户余额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage_price", + "type": "DECIMAL_8_2", + "chnname": "佣金金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户剩余积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sign_num", + "type": "INT_10", + "chnname": "连续签到天数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "1为正常,0为禁止", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "TINYINT UNSIGNED_3", + "chnname": "等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "推广元id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_time", + "type": "DATETIME", + "chnname": "推广员关联时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_type", + "type": "VARCHAR_32", + "chnname": "用户类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_promoter", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否为推广员", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_count", + "type": "INT UNSIGNED_10", + "chnname": "用户购买次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_count", + "type": "INT_10", + "chnname": "下级人数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "addres", + "type": "VARCHAR_255", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "adminid", + "type": "INT UNSIGNED_10", + "chnname": "管理员编号 ", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "login_type", + "type": "VARCHAR_36", + "chnname": "用户登陆类型,h5,wechat,routine", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "wx_profile", + "type": "JSON", + "chnname": "微信用户json信息", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "wechat", + "chnname": "微信模块", + "entities": [ + { + "title": "yx_wechat_reply", + "chnname": "微信关键字回复表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "微信关键字回复id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "key", + "type": "VARCHAR_64", + "chnname": "关键字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "回复类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "data", + "type": "TEXT", + "chnname": "回复数据", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "0=不可用 1 =可用", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hide", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_menu", + "chnname": "微信缓存表", + "fields": [ + { + "name": "key", + "type": "VARCHAR_32", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "result", + "type": "TEXT", + "chnname": "缓存数据", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT_10", + "chnname": "缓存时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_media", + "chnname": "微信回复表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "微信视频音频id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_16", + "chnname": "回复类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_128", + "chnname": "文件路径", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "media_id", + "type": "VARCHAR_64", + "chnname": "微信服务器返回的id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_256", + "chnname": "地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temporary", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否永久或者临时 0永久1临时", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT UNSIGNED_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_article", + "chnname": "文章管理表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "文章管理ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cid", + "type": "VARCHAR_255", + "chnname": "分类id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "文章标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "author", + "type": "VARCHAR_255", + "chnname": "文章作者", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image_input", + "type": "VARCHAR_255", + "chnname": "文章图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "synopsis", + "type": "VARCHAR_255", + "chnname": "文章简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share_title", + "type": "VARCHAR_255", + "chnname": "文章分享标题", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share_synopsis", + "type": "VARCHAR_255", + "chnname": "文章分享简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "visit", + "type": "VARCHAR_255", + "chnname": "浏览次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "原文链接", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hide", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "admin_id", + "type": "INT UNSIGNED_10", + "chnname": "管理员id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "INT_10", + "chnname": "产品关联id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否热门(小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_banner", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否轮播图(小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_template", + "chnname": "微信模板", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "模板id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "tempkey", + "type": "CHAR_50", + "chnname": "模板编号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "CHAR_100", + "chnname": "模板名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "VARCHAR_1000", + "chnname": "回复内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "tempid", + "type": "CHAR_100", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_30", + "chnname": "类型:template:模板消息 subscribe:订阅消息", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_live_goods", + "chnname": "微信小程序直播商品表", + "fields": [ + { + "name": "goods_id", + "type": "BIGINT_19", + "chnname": "直播商品id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT_19", + "chnname": "关联商品id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cover_imge_url", + "type": "VARCHAR_255", + "chnname": "商品图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_64", + "chnname": "商品小程序路径", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price_type", + "type": "VARCHAR_255", + "chnname": "价格类型 1:一口价(只需要传入price,price2不传) 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传) 3:显示折扣价(price字段为原价,price2字段为现价, price和price2必传)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "VARCHAR_64", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price2", + "type": "VARCHAR_64", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "商品名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "third_party_tag", + "type": "VARCHAR_255", + "chnname": "1, 2:表示是为api添加商品,否则是直播控制台添加的商品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "audit_id", + "type": "BIGINT_19", + "chnname": "审核单id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "audit_status", + "type": "INT UNSIGNED_10", + "chnname": "审核状态 0:未审核,1:审核中,2:审核通过,3审核失败", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_live", + "chnname": "微信小程序直播表", + "fields": [ + { + "name": "room_id", + "type": "BIGINT_19", + "chnname": "直播间id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "直播间标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cover_imge", + "type": "VARCHAR_255", + "chnname": "背景图", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share_imge", + "type": "VARCHAR_255", + "chnname": "分享图片", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "live_status", + "type": "INT_10", + "chnname": "直播间状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "BIGINT_19", + "chnname": "开始时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "end_time", + "type": "BIGINT_19", + "chnname": "预计结束时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "anchor_name", + "type": "VARCHAR_64", + "chnname": "主播昵称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "anchor_wechat", + "type": "VARCHAR_32", + "chnname": "主播微信号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "anchor_imge", + "type": "VARCHAR_255", + "chnname": "主播头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "直播间类型 1:推流 0:手机直播", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "screen_type", + "type": "BIT_1", + "chnname": "横屏、竖屏 【1:横屏,0:竖屏】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_like", + "type": "BIT_1", + "chnname": "是否关闭点赞 【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_comment", + "type": "BIT_1", + "chnname": "是否关闭评论 【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_goods", + "type": "BIT_1", + "chnname": "是否关闭货架 【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "VARCHAR_255", + "chnname": "商品id 多个,分割", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_replay", + "type": "BIT_1", + "chnname": "是否关闭回放【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_share", + "type": "BIT_1", + "chnname": "是否关闭分享【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_kf", + "type": "BIT_1", + "chnname": "是否关闭客服【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + } + ], + "message": "3.0升级sql", + "version": "V1.2", + "changes": [ + { + "type": "field", + "name": "yx_store_seckill.give_integral.notNull", + "opt": "update", + "changeData": "true=>false" + }, + { + "type": "field", + "name": "yx_store_seckill.is_sub", + "opt": "delete" + }, + { + "type": "field", + "name": "yx_store_combination.is_sub", + "opt": "delete" + }, + { + "type": "entity", + "name": "yx_wechat_live_goods.chnname", + "opt": "update", + "changeData": "=>微信小程序直播商品表" + }, + { + "type": "field", + "name": "yx_wechat_live.room_id", + "opt": "add" + }, + { + "type": "field", + "name": "yx_wechat_live.close_replay", + "opt": "add" + }, + { + "type": "field", + "name": "yx_wechat_live.close_share", + "opt": "add" + }, + { + "type": "field", + "name": "yx_wechat_live.close_kf", + "opt": "add" + }, + { + "type": "field", + "name": "yx_wechat_live.roomid", + "opt": "delete" + }, + { + "type": "entity", + "name": "yx_wechat_live.chnname", + "opt": "update", + "changeData": "=>微信小程序直播表" + } + ], + "date": "2020/9/12 23:56:59" +} diff --git a/sql/.yshop.version/yshop-base.pdman.json b/sql/.yshop.version/yshop-base.pdman.json new file mode 100644 index 0000000000000000000000000000000000000000..dffa9a999da9d5c2a4be11745a1bd987c65ce350 --- /dev/null +++ b/sql/.yshop.version/yshop-base.pdman.json @@ -0,0 +1,11247 @@ +{ + "modules": [ + { + "name": "DB_REVERSE_MYSQL", + "chnname": "逆向解析_MYSQL", + "entities": [ + { + "title": "monitor_server", + "chnname": "服务监控", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cpu_core", + "type": "INT_10", + "chnname": "CPU内核数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cpu_rate", + "type": "DOUBLE_22", + "chnname": "CPU使用率", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "disk_total", + "type": "DOUBLE_22", + "chnname": "磁盘总量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "disk_used", + "type": "DOUBLE_22", + "chnname": "磁盘使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mem_total", + "type": "DOUBLE_22", + "chnname": "内存总数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mem_used", + "type": "DOUBLE_22", + "chnname": "内存使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "port", + "type": "INT_10", + "chnname": "访问端口", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "state", + "type": "VARCHAR_255", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "swap_total", + "type": "DOUBLE_22", + "chnname": "交换区总量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "swap_used", + "type": "DOUBLE_22", + "chnname": "交换区使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "服务地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ], + "indexs": [], + "headers": [ + { + "fieldName": "chnname", + "relationNoShow": false + }, + { + "fieldName": "name", + "relationNoShow": false + }, + { + "fieldName": "type", + "relationNoShow": false + }, + { + "fieldName": "dataType", + "relationNoShow": true + }, + { + "fieldName": "remark", + "relationNoShow": true + }, + { + "fieldName": "pk", + "relationNoShow": false + }, + { + "fieldName": "notNull", + "relationNoShow": true + }, + { + "fieldName": "autoIncrement", + "relationNoShow": true + }, + { + "fieldName": "defaultValue", + "relationNoShow": true + }, + { + "fieldName": "relationNoShow", + "relationNoShow": true + }, + { + "fieldName": "uiHint", + "relationNoShow": true + } + ] + } + ], + "graphCanvas": { + "edges": [], + "nodes": [] + }, + "associations": [] + }, + { + "name": "tools", + "chnname": "工具模块", + "entities": [ + { + "title": "tools_email_config", + "chnname": "邮箱配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "from_user", + "type": "VARCHAR_255", + "chnname": "收件人", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "host", + "type": "VARCHAR_255", + "chnname": "邮件服务器SMTP地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pass", + "type": "VARCHAR_255", + "chnname": "密码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "port", + "type": "VARCHAR_255", + "chnname": "端口", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sys_user", + "type": "VARCHAR_255", + "chnname": "发件者用户名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_local_storage", + "chnname": "本地存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "文件真实的名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "文件名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "suffix", + "type": "VARCHAR_255", + "chnname": "后缀", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_100", + "chnname": "大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "operate", + "type": "VARCHAR_255", + "chnname": "操作人", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_picture", + "chnname": "Sm.Ms图床", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "上传日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delete_url", + "type": "VARCHAR_255", + "chnname": "删除的URL", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "filename", + "type": "VARCHAR_255", + "chnname": "图片名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "height", + "type": "VARCHAR_255", + "chnname": "图片高度", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "图片大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "图片地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "width", + "type": "VARCHAR_255", + "chnname": "图片宽度", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "md5code", + "type": "VARCHAR_255", + "chnname": "文件的MD5值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_qiniu_config", + "chnname": "七牛云配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "access_key", + "type": "TEXT", + "chnname": "accessKey", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bucket", + "type": "VARCHAR_255", + "chnname": "Bucket 识别符", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "host", + "type": "VARCHAR_255", + "chnname": "外链域名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "secret_key", + "type": "TEXT", + "chnname": "secretKey", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "空间类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "zone", + "type": "VARCHAR_255", + "chnname": "机房", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_qiniu_content", + "chnname": "七牛云文件存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "bucket", + "type": "VARCHAR_255", + "chnname": "Bucket 识别符", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "文件名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "文件大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "文件类型:私有或公开", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "上传或同步的时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "文件url", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "suffix", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_verification_code", + "chnname": "验证码", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "code", + "type": "VARCHAR_255", + "chnname": "验证码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态:1有效、0过期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "验证码类型:email或者短信", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_255", + "chnname": "接收邮箱或者手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "scenes", + "type": "VARCHAR_255", + "chnname": "业务名称:如重置邮箱、重置密码等", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_alipay_config", + "chnname": "支付宝配置类", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "app_id", + "type": "VARCHAR_255", + "chnname": "应用ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "charset", + "type": "VARCHAR_255", + "chnname": "编码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "format", + "type": "VARCHAR_255", + "chnname": "类型 固定格式json", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "gateway_url", + "type": "VARCHAR_255", + "chnname": "网关地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "notify_url", + "type": "VARCHAR_255", + "chnname": "异步回调", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "private_key", + "type": "TEXT", + "chnname": "私钥", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "public_key", + "type": "TEXT", + "chnname": "公钥", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "return_url", + "type": "VARCHAR_255", + "chnname": "回调地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sign_type", + "type": "VARCHAR_255", + "chnname": "签名方式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sys_service_provider_id", + "type": "VARCHAR_255", + "chnname": "商户号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "logging", + "chnname": "日志", + "entities": [ + { + "title": "sys_log", + "chnname": "系统日志", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "exception_detail", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "log_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "request_ip", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browser", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ], + "indexs": [], + "headers": [ + { + "fieldName": "chnname", + "relationNoShow": false + }, + { + "fieldName": "name", + "relationNoShow": false + }, + { + "fieldName": "type", + "relationNoShow": false + }, + { + "fieldName": "dataType", + "relationNoShow": true + }, + { + "fieldName": "remark", + "relationNoShow": true + }, + { + "fieldName": "pk", + "relationNoShow": false + }, + { + "fieldName": "notNull", + "relationNoShow": true + }, + { + "fieldName": "autoIncrement", + "relationNoShow": true + }, + { + "fieldName": "defaultValue", + "relationNoShow": true + }, + { + "fieldName": "relationNoShow", + "relationNoShow": true + }, + { + "fieldName": "uiHint", + "relationNoShow": true + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + }, + { + "name": "gen", + "chnname": "代码生成", + "entities": [ + { + "title": "gen_test", + "chnname": "代码生成测试", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sex", + "type": "INT_10", + "chnname": "性别", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "column_config", + "chnname": "代码生成字段信息存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "table_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "column_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "column_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dict_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extra", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "form_show", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "form_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "key_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "list_show", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "not_null", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "query_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "date_annotation", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "gen_config", + "chnname": "代码生成器配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "table_name", + "type": "VARCHAR_255", + "chnname": "表名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "author", + "type": "VARCHAR_255", + "chnname": "作者", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cover", + "type": "BIT_1", + "chnname": "是否覆盖", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "module_name", + "type": "VARCHAR_255", + "chnname": "模块名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pack", + "type": "VARCHAR_255", + "chnname": "至于哪个包下", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "前端代码生成的路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "api_path", + "type": "VARCHAR_255", + "chnname": "前端Api文件路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "prefix", + "type": "VARCHAR_255", + "chnname": "表前缀", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "api_alias", + "type": "VARCHAR_255", + "chnname": "接口名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "column_config", + "moduleName": false, + "x": 288.359375, + "y": 279, + "id": "09a1ceae" + }, + { + "shape": "table", + "title": "gen_config", + "moduleName": false, + "x": 760, + "y": 200, + "id": "2e380491" + } + ], + "edges": [] + }, + "associations": [] + }, + { + "name": "monitor", + "chnname": "", + "entities": [ + { + "title": "sys_visits", + "chnname": "访客记录", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "date", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ip_counts", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pv_counts", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "week_day", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ], + "indexs": [], + "headers": [ + { + "fieldName": "chnname", + "relationNoShow": false + }, + { + "fieldName": "name", + "relationNoShow": false + }, + { + "fieldName": "type", + "relationNoShow": false + }, + { + "fieldName": "dataType", + "relationNoShow": true + }, + { + "fieldName": "remark", + "relationNoShow": true + }, + { + "fieldName": "pk", + "relationNoShow": false + }, + { + "fieldName": "notNull", + "relationNoShow": true + }, + { + "fieldName": "autoIncrement", + "relationNoShow": true + }, + { + "fieldName": "defaultValue", + "relationNoShow": true + }, + { + "fieldName": "relationNoShow", + "relationNoShow": true + }, + { + "fieldName": "uiHint", + "relationNoShow": true + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + }, + { + "name": "quartz", + "chnname": "定时任务", + "entities": [ + { + "title": "quartz_job", + "chnname": "定时任务", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "bean_name", + "type": "VARCHAR_255", + "chnname": "Spring Bean名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cron_expression", + "type": "VARCHAR_255", + "chnname": "cron 表达式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pause", + "type": "BIT_1", + "chnname": "状态:1暂停、0启用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_name", + "type": "VARCHAR_255", + "chnname": "任务名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method_name", + "type": "VARCHAR_255", + "chnname": "方法名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "VARCHAR_255", + "chnname": "参数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ], + "indexs": [], + "headers": [ + { + "fieldName": "chnname", + "relationNoShow": false + }, + { + "fieldName": "name", + "relationNoShow": false + }, + { + "fieldName": "type", + "relationNoShow": false + }, + { + "fieldName": "dataType", + "relationNoShow": true + }, + { + "fieldName": "remark", + "relationNoShow": true + }, + { + "fieldName": "pk", + "relationNoShow": false + }, + { + "fieldName": "notNull", + "relationNoShow": true + }, + { + "fieldName": "autoIncrement", + "relationNoShow": true + }, + { + "fieldName": "defaultValue", + "relationNoShow": true + }, + { + "fieldName": "relationNoShow", + "relationNoShow": true + }, + { + "fieldName": "uiHint", + "relationNoShow": true + } + ] + }, + { + "title": "quartz_log", + "chnname": "定时任务日志", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "baen_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cron_expression", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "exception_detail", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_success", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ], + "indexs": [], + "headers": [ + { + "fieldName": "chnname", + "relationNoShow": false + }, + { + "fieldName": "name", + "relationNoShow": false + }, + { + "fieldName": "type", + "relationNoShow": false + }, + { + "fieldName": "dataType", + "relationNoShow": true + }, + { + "fieldName": "remark", + "relationNoShow": true + }, + { + "fieldName": "pk", + "relationNoShow": false + }, + { + "fieldName": "notNull", + "relationNoShow": true + }, + { + "fieldName": "autoIncrement", + "relationNoShow": true + }, + { + "fieldName": "defaultValue", + "relationNoShow": true + }, + { + "fieldName": "relationNoShow", + "relationNoShow": true + }, + { + "fieldName": "uiHint", + "relationNoShow": true + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "quartz_job", + "moduleName": false, + "x": 422.359375, + "y": 367, + "id": "4b2bda89" + }, + { + "shape": "table", + "title": "quartz_log", + "moduleName": false, + "x": 890, + "y": 340, + "id": "b47ba8e0" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "b47ba8e0", + "target": "4b2bda89", + "id": "01afd2ee", + "controlPoints": [ + { + "x": 759.2236328125, + "y": 356.3101851851852 + }, + { + "x": 608.0595703125, + "y": 354.9063636363636 + } + ], + "sourceAnchor": 12, + "targetAnchor": 9 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "quartz_log", + "field": "job_name" + }, + "to": { + "entity": "quartz_job", + "field": "job_name" + } + } + ] + }, + { + "name": "system", + "chnname": "系统模块", + "entities": [ + { + "title": "sys_users_roles", + "chnname": "用户角色关联", + "fields": [ + { + "name": "user_id", + "type": "BIGINT_19", + "chnname": "用户ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "角色ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_roles_menus", + "chnname": "角色菜单关联", + "fields": [ + { + "name": "menu_id", + "type": "BIGINT_19", + "chnname": "菜单ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "角色ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_roles_depts", + "chnname": "角色部门关联", + "fields": [ + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_user_avatar", + "chnname": "系统用户头像", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "真实文件名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_role", + "chnname": "角色表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "data_scope", + "type": "VARCHAR_255", + "chnname": "数据权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "INT_10", + "chnname": "角色级别", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "permission", + "type": "VARCHAR_255", + "chnname": "功能权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dict", + "chnname": "数据字典", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "字典名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dict_detail", + "chnname": "数据字典详情", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "label", + "type": "VARCHAR_255", + "chnname": "字典标签", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_255", + "chnname": "字典值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "VARCHAR_255", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dict_id", + "type": "BIGINT_19", + "chnname": "字典id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dept", + "chnname": "部门", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT_19", + "chnname": "上级部门", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIT_1", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_menu", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "i_frame", + "type": "BIT_1", + "chnname": "是否外链", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "菜单名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "component", + "type": "VARCHAR_255", + "chnname": "组件", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT_19", + "chnname": "上级菜单ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "BIGINT_19", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "icon", + "type": "VARCHAR_255", + "chnname": "图标", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "链接地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cache", + "type": "BIT_1", + "chnname": "缓存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hidden", + "type": "BIT_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "component_name", + "type": "VARCHAR_20", + "chnname": "组件名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "permission", + "type": "VARCHAR_255", + "chnname": "权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "INT_10", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_job", + "chnname": "岗位", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "岗位名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIT_1", + "chnname": "岗位状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "BIGINT_19", + "chnname": "岗位排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "部门ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_user", + "chnname": "系统用户", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "avatar_id", + "type": "BIGINT_19", + "chnname": "头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "email", + "type": "VARCHAR_255", + "chnname": "邮箱", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIGINT_19", + "chnname": "状态:1启用、0禁用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "password", + "type": "VARCHAR_255", + "chnname": "密码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "部门名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "VARCHAR_255", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_id", + "type": "BIGINT_19", + "chnname": "岗位名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "last_password_reset_time", + "type": "DATETIME", + "chnname": "最后修改密码的日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nick_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sex", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "sys_user", + "moduleName": false, + "x": 730, + "y": 200, + "id": "42584636" + }, + { + "shape": "table", + "title": "sys_menu", + "moduleName": false, + "x": 230, + "y": 580, + "id": "faa9e561" + }, + { + "shape": "table", + "title": "sys_dict_detail", + "moduleName": false, + "x": 1440, + "y": 720, + "id": "de6d0d5f" + }, + { + "shape": "table", + "title": "sys_dict", + "moduleName": false, + "x": 1080, + "y": 770, + "id": "2e3e2ccb" + }, + { + "shape": "table", + "title": "sys_user_avatar", + "moduleName": false, + "x": 220, + "y": 100, + "id": "794cd430" + }, + { + "shape": "table", + "title": "sys_job", + "moduleName": false, + "x": 240, + "y": 290, + "id": "fe1aecfe" + }, + { + "shape": "table", + "title": "sys_roles_menus", + "moduleName": false, + "x": 550, + "y": 490, + "id": "0ba651c7" + }, + { + "shape": "table", + "title": "sys_role", + "moduleName": false, + "x": 850, + "y": 570, + "id": "2dd8b462" + }, + { + "shape": "table", + "title": "sys_roles_depts", + "moduleName": false, + "x": 1140, + "y": 490, + "id": "759d8dd0" + }, + { + "shape": "table", + "title": "sys_users_roles", + "moduleName": false, + "x": 1210, + "y": 50, + "id": "e76717e1" + }, + { + "shape": "table", + "title": "sys_dept", + "moduleName": false, + "x": 1200, + "y": 240, + "id": "2ecdc324" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "fe1aecfe", + "id": "a7e02413", + "controlPoints": [ + { + "x": 518.6240234375, + "y": 225.91161616161617 + }, + { + "x": 384.025390625, + "y": 232.19736842105263 + } + ], + "sourceAnchor": 16, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "2ecdc324", + "id": "99cdad68", + "controlPoints": [ + { + "x": 941.3759765625, + "y": 187.46212121212122 + }, + { + "x": 1055.974609375, + "y": 192.22058823529412 + } + ], + "sourceAnchor": 13, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "de6d0d5f", + "target": "2e3e2ccb", + "id": "0f30581b", + "controlPoints": [ + { + "x": 1296.224609375, + "y": 736.3355263157895 + }, + { + "x": 1223.775390625, + "y": 732.25 + } + ], + "sourceAnchor": 8, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "794cd430", + "id": "618c6bc6", + "controlPoints": [ + { + "x": 518.6240234375, + "y": 91.33838383838385 + }, + { + "x": 368.099609375, + "y": 72.28846153846153 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "0ba651c7", + "target": "faa9e561", + "id": "fdb423ea", + "controlPoints": [ + { + "x": 422.126953125, + "y": 492.281914893617 + }, + { + "x": 395.0341796875, + "y": 442.10714285714283 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "0ba651c7", + "target": "2dd8b462", + "id": "882b95a1", + "controlPoints": [ + { + "x": 677.873046875, + "y": 512.8191489361702 + }, + { + "x": 705.974609375, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 3, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "759d8dd0", + "target": "2dd8b462", + "id": "7a7a3350", + "controlPoints": [ + { + "x": 1034.2080078125, + "y": 492.281914893617 + }, + { + "x": 994.025390625, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "759d8dd0", + "target": "2ecdc324", + "id": "a9e0dc69", + "controlPoints": [ + { + "x": 1245.7919921875, + "y": 506.48049645390074 + }, + { + "x": 1440, + "y": 500 + }, + { + "x": 1440, + "y": 190 + }, + { + "x": 1344.025390625, + "y": 192.22058823529412 + } + ], + "sourceAnchor": 3, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e76717e1", + "target": "42584636", + "id": "6179129e", + "controlPoints": [ + { + "x": 1085.4638671875, + "y": 52.28191489361702 + }, + { + "x": 941.3759765625, + "y": 72.11363636363636 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e76717e1", + "target": "2dd8b462", + "id": "c796f9c9", + "controlPoints": [ + { + "x": 1334.5361328125, + "y": 72.81914893617022 + }, + { + "x": 1480, + "y": 70 + }, + { + "x": 1490, + "y": 580 + }, + { + "x": 1030, + "y": 590 + }, + { + "x": 994.025390625, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 3, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "sys_user", + "field": "job_id" + }, + "to": { + "entity": "sys_job", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_user", + "field": "dept_id" + }, + "to": { + "entity": "sys_dept", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_dict_detail", + "field": "dict_id" + }, + "to": { + "entity": "sys_dict", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_user", + "field": "avatar_id" + }, + "to": { + "entity": "sys_user_avatar", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_menus", + "field": "menu_id" + }, + "to": { + "entity": "sys_menu", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_menus", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_depts", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_depts", + "field": "dept_id" + }, + "to": { + "entity": "sys_dept", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_users_roles", + "field": "user_id" + }, + "to": { + "entity": "sys_user", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_users_roles", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + } + ] + }, + { + "name": "activity", + "chnname": "活动", + "entities": [ + { + "title": "yx_store_seckill", + "chnname": "商品秒杀产品表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品秒杀产品表id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "推荐图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "活动标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "价格", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "原价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "返多少积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_16", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATE", + "chnname": "开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATE", + "chnname": "结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "产品状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "热门推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "删除 0未删除1已删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "num", + "type": "INT UNSIGNED_10", + "chnname": "最多秒杀几个", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "TINYINT UNSIGNED_1", + "chnname": "显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time_id", + "type": "INT UNSIGNED_10", + "chnname": "时间段id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_pink", + "chnname": "拼团表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单id 生成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id_key", + "type": "INT UNSIGNED_10", + "chnname": "订单id 数据库", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_num", + "type": "INT UNSIGNED_10", + "chnname": "购买商品个数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "购买总金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cid", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT UNSIGNED_20", + "chnname": "产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "people", + "type": "INT UNSIGNED_10", + "chnname": "拼团总人数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "拼团产品单价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "k_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "团长id 0为团长", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_tpl", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否发送模板消息0未发送1已发送", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_refund", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否退款 0未退款 1已退款", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态1进行中2已完成3未完成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_user", + "chnname": "优惠券发放记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "优惠券发放记录id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cid", + "type": "INT UNSIGNED_10", + "chnname": "兑换的项目id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "优惠券所属用户", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_title", + "type": "VARCHAR_32", + "chnname": "优惠券名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "优惠券的面值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "最低消费多少金额可用优惠券", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "优惠券创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "end_time", + "type": "DATETIME", + "chnname": "优惠券结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_time", + "type": "DATETIME", + "chnname": "使用时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "获取方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态(0:未使用,1:已使用, 2:已过期)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_fail", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否有效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_issue_user", + "chnname": "优惠券前台用户领取记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "领取优惠券用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "issue_coupon_id", + "type": "INT_10", + "chnname": "优惠券前台领取ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "领取时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_issue", + "chnname": "优惠券前台领取表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cid", + "type": "INT_10", + "chnname": "优惠券ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ctype", + "type": "BIT_1", + "chnname": "优惠券类型 0-通用 1-商品券", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "优惠券领取开启时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "end_time", + "type": "DATETIME", + "chnname": "优惠券领取结束时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_count", + "type": "INT_10", + "chnname": "优惠券领取数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remain_count", + "type": "INT_10", + "chnname": "优惠券剩余领取数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_permanent", + "type": "BIT_1", + "chnname": "是否无限张数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "1 正常 0 未开启 -1 已无效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "优惠券添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon", + "chnname": "优惠券表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "优惠券表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_64", + "chnname": "优惠券名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "integral", + "type": "INT UNSIGNED_10", + "chnname": "兑换消耗积分值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "兑换的优惠券面值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "最低消费多少金额可用优惠券", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_time", + "type": "INT UNSIGNED_10", + "chnname": "优惠券有效期限(单位:天)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态(0:关闭,1:开启)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "VARCHAR_200", + "chnname": "商品ids", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "TINYINT_3", + "chnname": "优惠券类型 0-通用 1-商品券", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "兑换项目添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_combination", + "chnname": "拼团产品表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "推荐图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "活动标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr", + "type": "VARCHAR_255", + "chnname": "活动属性", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "people", + "type": "INT UNSIGNED_10", + "chnname": "参团人数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "价格", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_price", + "type": "DECIMAL_10_2", + "chnname": "商品原价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_host", + "type": "TINYINT UNSIGNED_1", + "chnname": "推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "TINYINT UNSIGNED_1", + "chnname": "产品状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_use", + "type": "TINYINT UNSIGNED_1", + "chnname": "商户是否可用1可用0不可用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮1是0否", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "拼团内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "拼团开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "拼团结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "effective_time", + "type": "INT_10", + "chnname": "拼团订单有效时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "INT UNSIGNED_10", + "chnname": "拼团产品成本", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browse", + "type": "INT_10", + "chnname": "浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_32", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain_user_help", + "chnname": "砍价用户帮助表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价用户帮助表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "帮助的用户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_user_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户参与砍价表id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "帮助砍价多少金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain_user", + "chnname": "用户参与砍价表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户参与砍价表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_price_min", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价的最低价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_price", + "type": "DECIMAL_8_2", + "chnname": "砍价金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍掉的价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态 1参与中 2 活动结束参与失败 3活动结束参与成功", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "参与时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否取消", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain", + "chnname": "砍价表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "关联产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "砍价活动名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_150", + "chnname": "砍价活动图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_16", + "chnname": "单位名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "砍价产品轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "砍价开启时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "砍价结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_255", + "chnname": "砍价产品名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价商品最低价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "num", + "type": "INT UNSIGNED_10", + "chnname": "每次购买的砍价产品数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_max_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户每次砍价的最大金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户每次砍价的最小金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_num", + "type": "INT UNSIGNED_10", + "chnname": "用户每次砍价的次数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "砍价详情", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "反多少积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "砍价活动简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否推荐0不推荐1推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除 0未删除 1删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮 0不包邮 1包邮", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "rule", + "type": "TEXT", + "chnname": "砍价规则", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "look", + "type": "INT UNSIGNED_10", + "chnname": "砍价产品浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share", + "type": "INT UNSIGNED_10", + "chnname": "砍价产品分享量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_visit", + "chnname": "产品浏览分析表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "INT_10", + "chnname": "产品ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_type", + "type": "VARCHAR_32", + "chnname": "产品类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_id", + "type": "INT_10", + "chnname": "产品分类ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "CHAR_50", + "chnname": "产品类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "INT_10", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "count", + "type": "INT_10", + "chnname": "访问次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "VARCHAR_255", + "chnname": "备注描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_pink", + "moduleName": false, + "x": 310, + "y": 580, + "id": "13513a4e" + }, + { + "shape": "table", + "title": "yx_store_coupon", + "moduleName": false, + "x": 600, + "y": 180, + "id": "2b6bf508" + }, + { + "shape": "table", + "title": "yx_store_coupon_user", + "moduleName": false, + "x": 1310, + "y": 190, + "id": "aa29268e" + }, + { + "shape": "table", + "title": "yx_store_coupon_issue", + "moduleName": false, + "x": 1270, + "y": 580, + "id": "74e5a8f0" + }, + { + "shape": "table", + "title": "yx_store_coupon_issue_user", + "moduleName": false, + "x": 790, + "y": 610, + "id": "dfd12dd0" + }, + { + "shape": "table", + "title": "yx_store_bargain", + "moduleName": false, + "x": -160, + "y": -50, + "id": "1de36ee3" + }, + { + "shape": "table", + "title": "yx_store_bargain_user", + "moduleName": false, + "x": 590, + "y": -340, + "id": "14a47167" + }, + { + "shape": "table", + "title": "yx_store_bargain_user_help", + "moduleName": false, + "x": 490, + "y": -100, + "id": "e979c0f8" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "aa29268e", + "target": "2b6bf508", + "id": "a8da6c7b", + "controlPoints": [ + { + "x": 1041.849609375, + "y": 91.2897465437788 + }, + { + "x": 835.138671875, + "y": 72.12931034482759 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "74e5a8f0", + "target": "2b6bf508", + "id": "6abf3f7d", + "controlPoints": [ + { + "x": 1051.787109375, + "y": 510.3375331564987 + }, + { + "x": 835.138671875, + "y": 72.12931034482759 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "dfd12dd0", + "target": "74e5a8f0", + "id": "0433262a", + "controlPoints": [ + { + "x": 991.1455078125, + "y": 608.3222222222222 + }, + { + "x": 1051.787109375, + "y": 472.12931034482756 + } + ], + "sourceAnchor": 5, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "14a47167", + "target": "1de36ee3", + "id": "e528de82", + "controlPoints": [ + { + "x": 279.8408203125, + "y": -377.6630434782609 + }, + { + "x": 182.1513671875, + "y": -347.9440298507463 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e979c0f8", + "target": "1de36ee3", + "id": "b2e7774f", + "controlPoints": [ + { + "x": 280.6005859375, + "y": -120.73355263157895 + }, + { + "x": 182.1513671875, + "y": -347.9440298507463 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_user", + "field": "cid" + }, + "to": { + "entity": "yx_store_coupon", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_issue", + "field": "cid" + }, + "to": { + "entity": "yx_store_coupon", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_issue_user", + "field": "issue_coupon_id" + }, + "to": { + "entity": "yx_store_coupon_issue", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_bargain_user", + "field": "bargain_id" + }, + "to": { + "entity": "yx_store_bargain", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_bargain_user_help", + "field": "bargain_id" + }, + "to": { + "entity": "yx_store_bargain", + "field": "id" + } + } + ] + }, + { + "name": "cart", + "chnname": "购物车", + "entities": [ + { + "title": "yx_store_cart", + "chnname": "购物车表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "购物车表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_attr_unique", + "type": "VARCHAR_50", + "chnname": "商品属性", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_num", + "type": "SMALLINT UNSIGNED_5", + "chnname": "商品数量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pay", + "type": "BIT_1", + "chnname": "0 = 未购买 1 = 已购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_new", + "type": "BIT_1", + "chnname": "是否为立即购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination_id", + "type": "INT UNSIGNED_10", + "chnname": "拼团id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_id", + "type": "INT UNSIGNED_10", + "chnname": "秒杀产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "INT UNSIGNED_10", + "chnname": "砍价id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "category", + "chnname": "商品分类", + "entities": [ + { + "title": "yx_store_category", + "chnname": "商品分类表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT_7", + "chnname": "商品分类表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "pid", + "type": "MEDIUMINT_7", + "chnname": "父id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_name", + "type": "VARCHAR_100", + "chnname": "分类名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "MEDIUMINT_7", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pic", + "type": "VARCHAR_128", + "chnname": "图标", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否推荐", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "删除状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "order", + "chnname": "订单", + "entities": [ + { + "title": "yx_store_order", + "chnname": "订单表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extend_order_id", + "type": "VARCHAR_32", + "chnname": "额外订单号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_32", + "chnname": "用户姓名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_phone", + "type": "VARCHAR_18", + "chnname": "用户电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_address", + "type": "VARCHAR_100", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_id", + "type": "VARCHAR_256", + "chnname": "购物车id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "freight_price", + "type": "DECIMAL_8_2", + "chnname": "运费金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_num", + "type": "INT UNSIGNED_10", + "chnname": "订单商品总数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "订单总价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "实际支付金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "支付邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "deduction_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "抵扣金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_id", + "type": "INT UNSIGNED_10", + "chnname": "优惠券id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "优惠券金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "paid", + "type": "TINYINT UNSIGNED_1", + "chnname": "支付状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_time", + "type": "DATETIME", + "chnname": "支付时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_type", + "type": "VARCHAR_32", + "chnname": "支付方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:已完成;-1:已退款)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_status", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 未退款 1 申请中 2 已退款", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap_img", + "type": "VARCHAR_255", + "chnname": "退款图片", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap_explain", + "type": "VARCHAR_255", + "chnname": "退款用户说明", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_time", + "type": "DATETIME", + "chnname": "退款时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap", + "type": "VARCHAR_255", + "chnname": "前台退款原因", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason", + "type": "VARCHAR_255", + "chnname": "不退款的理由", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "退款金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_sn", + "type": "VARCHAR_100", + "chnname": "快递公司编号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_name", + "type": "VARCHAR_64", + "chnname": "快递名称/送货人姓名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_type", + "type": "VARCHAR_32", + "chnname": "发货类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_id", + "type": "VARCHAR_64", + "chnname": "快递单号/手机号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "gain_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "消费赚取积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "使用积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "back_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "给用户退了多少积分", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "CHAR_32", + "chnname": "唯一id(md5加密)类似id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_512", + "chnname": "管理员备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_mer_check", + "type": "TINYINT UNSIGNED_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团产品id0一般产品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pink_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团id 0没有拼团", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "秒杀产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "INT UNSIGNED_10", + "chnname": "砍价id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "verify_code", + "type": "VARCHAR_50", + "chnname": "核销码", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_id", + "type": "INT_10", + "chnname": "门店id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "shipping_type", + "type": "BIT_1", + "chnname": "配送方式 1=快递 ,2=门店自提", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_channel", + "type": "TINYINT UNSIGNED_1", + "chnname": "支付渠道(0微信公众号1微信小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_remind", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_system_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_order_cart_info", + "chnname": "订单购物详情表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "购物车id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_info", + "type": "TEXT", + "chnname": "购买东西的详细信息", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "VARCHAR_50", + "chnname": "唯一id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_order_status", + "chnname": "订单操作记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_type", + "type": "VARCHAR_32", + "chnname": "操作类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_message", + "type": "VARCHAR_256", + "chnname": "操作备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_time", + "type": "DATETIME", + "chnname": "操作时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_express", + "chnname": "快递公司表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "快递公司id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "code", + "type": "VARCHAR_50", + "chnname": "快递公司简称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_50", + "chnname": "快递公司全称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_order", + "moduleName": false, + "x": 610, + "y": 550, + "id": "0eda0dc5" + }, + { + "shape": "table", + "title": "yx_store_order_cart_info", + "moduleName": false, + "x": 1370, + "y": 70, + "id": "1412580b" + }, + { + "shape": "table", + "title": "yx_store_cart", + "moduleName": "cart", + "x": 1410, + "y": 330, + "id": "bcf3c95c" + }, + { + "shape": "table", + "title": "yx_store_order_status", + "moduleName": false, + "x": 1380, + "y": 610, + "id": "f5488e91" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "1412580b", + "target": "0eda0dc5", + "id": "6f47eff5", + "controlPoints": [ + { + "x": 1179.8701171875, + "y": 52.38333333333334 + }, + { + "x": 1074.1962890625, + "y": 32.03378378378378 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "1412580b", + "target": "bcf3c95c", + "id": "2c239ffd", + "controlPoints": [ + { + "x": 1179.8701171875, + "y": 72.51666666666668 + }, + { + "x": 1120, + "y": 70 + }, + { + "x": 1120, + "y": 210 + }, + { + "x": 1184.4970703125, + "y": 212.1209677419355 + } + ], + "sourceAnchor": 4, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "f5488e91", + "target": "0eda0dc5", + "id": "70641526", + "controlPoints": [ + { + "x": 1200.5224609375, + "y": 602.4423076923077 + }, + { + "x": 1130, + "y": 450 + }, + { + "x": 1074.1962890625, + "y": 32.03378378378378 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_order_cart_info", + "field": "oid" + }, + "to": { + "entity": "yx_store_order", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_order_cart_info", + "field": "cart_id" + }, + "to": { + "entity": "yx_store_cart", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_order_status", + "field": "oid" + }, + "to": { + "entity": "yx_store_order", + "field": "id" + } + } + ] + }, + { + "name": "product", + "chnname": "商品模块", + "entities": [ + { + "title": "yx_store_product_reply", + "chnname": "评论表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "评论ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT_19", + "chnname": "订单ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "CHAR_32", + "chnname": "唯一id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT_19", + "chnname": "产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "reply_type", + "type": "VARCHAR_32", + "chnname": "某种商品类型(普通商品、秒杀商品)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_score", + "type": "BIT_1", + "chnname": "商品分数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "service_score", + "type": "BIT_1", + "chnname": "服务分数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "comment", + "type": "VARCHAR_512", + "chnname": "评论内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pics", + "type": "TEXT", + "chnname": "评论图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "评论时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_reply_content", + "type": "VARCHAR_300", + "chnname": "管理员回复内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_reply_time", + "type": "DATETIME", + "chnname": "管理员回复时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "0未删除1已删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_reply", + "type": "BIT_1", + "chnname": "0未回复1已回复", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_relation", + "chnname": "商品点赞和收藏表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "类型(收藏(collect)、点赞(like))", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "category", + "type": "VARCHAR_32", + "chnname": "某种类型的商品(普通商品、秒杀商品)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr_value", + "chnname": "商品属性值表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sku", + "type": "VARCHAR_128", + "chnname": "商品属性索引值 (attr_value|attr_value[|....])", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "属性对应的库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "属性金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_128", + "chnname": "图片", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "VARCHAR_100", + "chnname": "唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bar_code", + "type": "VARCHAR_255", + "chnname": "商品条码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL_10_2", + "chnname": "原价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "weight", + "type": "DECIMAL_8_2", + "chnname": "重量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "volume", + "type": "DECIMAL_8_2", + "chnname": "体积", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage", + "type": "DECIMAL_8_2", + "chnname": "一级返佣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage_two", + "type": "DECIMAL_8_2", + "chnname": "二级返佣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr_result", + "chnname": "商品属性详情表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "result", + "type": "TEXT", + "chnname": "商品属性参数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_time", + "type": "DATETIME", + "chnname": "上次修改时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr", + "chnname": "商品属性表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr_name", + "type": "VARCHAR_32", + "chnname": "属性名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr_values", + "type": "VARCHAR_256", + "chnname": "属性值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product", + "chnname": "商品表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "商品id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_256", + "chnname": "商品图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "slider_image", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_128", + "chnname": "商品名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_info", + "type": "VARCHAR_256", + "chnname": "商品简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "keyword", + "type": "VARCHAR_256", + "chnname": "关键字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bar_code", + "type": "VARCHAR_15", + "chnname": "产品条码(一维码)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_id", + "type": "VARCHAR_64", + "chnname": "分类id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "商品价格", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "vip_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "会员价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "市场价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_32", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "SMALLINT_5", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "状态(0:未上架,1:上架)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "BIT_1", + "chnname": "是否热卖", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_benefit", + "type": "BIT_1", + "chnname": "是否优惠", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_best", + "type": "BIT_1", + "chnname": "是否精品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_new", + "type": "BIT_1", + "chnname": "是否新品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "产品描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_use", + "type": "TINYINT UNSIGNED_1", + "chnname": "商户是否代理 0不可代理1可代理", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "获得积分", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_seckill", + "type": "TINYINT UNSIGNED_1", + "chnname": "秒杀状态 0 未开启 1已开启", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_bargain", + "type": "TINYINT UNSIGNED_1", + "chnname": "砍价状态 0未开启 1开启", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_good", + "type": "BIT_1", + "chnname": "是否优品推荐", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ficti", + "type": "MEDIUMINT_7", + "chnname": "虚拟销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browse", + "type": "INT_10", + "chnname": "浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "code_path", + "type": "VARCHAR_64", + "chnname": "产品二维码地址(用户小程序海报)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_sub", + "type": "BIT_1", + "chnname": "是否单独分佣", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "运费模板ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spec_type", + "type": "BIT_1", + "chnname": "规格 0单 1多", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_rule", + "chnname": "商品规则值(规格)表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "rule_name", + "type": "VARCHAR_32", + "chnname": "规格名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "rule_value", + "type": "JSON", + "chnname": "规格值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_product", + "moduleName": false, + "x": 390, + "y": 410, + "id": "1f2a5f58" + }, + { + "shape": "table", + "title": "yx_store_product_attr", + "moduleName": false, + "x": 970, + "y": 60, + "id": "8d021563" + }, + { + "shape": "table", + "title": "yx_store_product_attr_value", + "moduleName": false, + "x": 1090, + "y": 360, + "id": "65395cd5" + }, + { + "shape": "table", + "title": "yx_store_product_attr_result", + "moduleName": false, + "x": 1020, + "y": 660, + "id": "f65fda56" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "8d021563", + "target": "1f2a5f58", + "id": "8a5b631d", + "controlPoints": [ + { + "x": 814.5400390625, + "y": 62.52272727272727 + }, + { + "x": 698.1318359375, + "y": 42.0462962962963 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "65395cd5", + "target": "1f2a5f58", + "id": "b3c471e9", + "controlPoints": [ + { + "x": 818.958984375, + "y": 252.17424242424244 + }, + { + "x": 698.1318359375, + "y": 42.0462962962963 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "65395cd5", + "target": "8d021563", + "id": "76f261e2", + "controlPoints": [ + { + "x": 818.958984375, + "y": 272.2348484848485 + }, + { + "x": 750, + "y": 240 + }, + { + "x": 814.5400390625, + "y": 82.70454545454545 + } + ], + "sourceAnchor": 4, + "targetAnchor": 4 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr", + "field": "product_id" + }, + "to": { + "entity": "yx_store_product", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr_value", + "field": "product_id" + }, + "to": { + "entity": "yx_store_product", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr_value", + "field": "sku" + }, + "to": { + "entity": "yx_store_product_attr", + "field": "attr_name" + } + } + ] + }, + { + "name": "shop", + "chnname": "商户模块", + "entities": [ + { + "title": "yx_material_group", + "chnname": "素材分组", + "fields": [ + { + "name": "id", + "type": "VARCHAR_32", + "chnname": "PK", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_id", + "type": "VARCHAR_32", + "chnname": "创建者ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_200", + "chnname": "分组名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_attachment", + "chnname": "附件管理表", + "fields": [ + { + "name": "att_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "附件名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_dir", + "type": "VARCHAR_200", + "chnname": "附件路径", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "satt_dir", + "type": "VARCHAR_200", + "chnname": "压缩图片路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_size", + "type": "CHAR_30", + "chnname": "附件大小", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_type", + "type": "CHAR_30", + "chnname": "附件类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "INT_10", + "chnname": "分类ID0编辑器,1产品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image_type", + "type": "TINYINT UNSIGNED_1", + "chnname": "图片上传类型 1本地 2七牛云 3OSS 4COS ", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "module_type", + "type": "TINYINT UNSIGNED_1", + "chnname": "图片上传模块类型 1 后台上传 2 用户生成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "invite_code", + "type": "VARCHAR_50", + "chnname": "邀请码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_config", + "chnname": "配置表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "配置id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "menu_name", + "type": "VARCHAR_255", + "chnname": "字段名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_5000", + "chnname": "默认值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_group_data", + "chnname": "组合数据详情表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "组合数据详情ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "group_name", + "type": "VARCHAR_100", + "chnname": "对应的数据名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "TEXT", + "chnname": "数据组对应的数据值(json数据)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加数据时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "数据排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态(1:开启;2:关闭;)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_store", + "chnname": "门店自提", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "门店名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "introduction", + "type": "VARCHAR_1000", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_25", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "省市区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "detailed_address", + "type": "VARCHAR_255", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "门店logo", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "latitude", + "type": "CHAR_25", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "longitude", + "type": "CHAR_25", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time", + "type": "VARCHAR_100", + "chnname": "核销有效日期", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time", + "type": "VARCHAR_100", + "chnname": "每日营业开关时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time_end", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time_start", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time_end", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time_start", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_store_staff", + "chnname": "门店店员表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "微信用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "avatar", + "type": "VARCHAR_255", + "chnname": "店员头像", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_id", + "type": "INT_10", + "chnname": "门店id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "staff_name", + "type": "VARCHAR_64", + "chnname": "店员名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_15", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "verify_status", + "type": "TINYINT_3", + "chnname": "核销开关", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_user_level", + "chnname": "设置用户等级表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "会员名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "money", + "type": "DECIMAL_8_2", + "chnname": "购买金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_date", + "type": "INT_10", + "chnname": "有效时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_forever", + "type": "BIT_1", + "chnname": "是否为永久会员", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pay", + "type": "BIT_1", + "chnname": "是否购买,1=购买,0=不购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示 1=显示,0=隐藏", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "grade", + "type": "INT_10", + "chnname": "会员等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "discount", + "type": "DECIMAL_8_2", + "chnname": "享受折扣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "会员卡背景", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "icon", + "type": "VARCHAR_255", + "chnname": "会员图标", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "explain", + "type": "TEXT", + "chnname": "说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除.1=删除,0=未删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_material", + "chnname": "素材库", + "fields": [ + { + "name": "id", + "type": "VARCHAR_32", + "chnname": "PK", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_id", + "type": "VARCHAR_100", + "chnname": "创建者ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "CHAR_2", + "chnname": "类型1、图片;2、视频", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "group_id", + "type": "VARCHAR_32", + "chnname": "分组ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_200", + "chnname": "素材名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_500", + "chnname": "素材链接", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_material", + "moduleName": false, + "x": 442.359375, + "y": 277, + "id": "fe721315" + }, + { + "shape": "table", + "title": "yx_material_group", + "moduleName": false, + "x": 887.359375, + "y": 279, + "id": "f3be72cb" + }, + { + "shape": "table", + "title": "yx_system_store", + "moduleName": false, + "x": 326.359375, + "y": 624, + "id": "396a35b0" + }, + { + "shape": "table", + "title": "yx_system_store_staff", + "moduleName": false, + "x": 870, + "y": 590, + "id": "c3935d4a" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "fe721315", + "target": "f3be72cb", + "id": "e1f3d02d", + "controlPoints": [ + { + "x": 623.05859375, + "y": 283.9775132275132 + }, + { + "x": 743.333984375, + "y": 241.25 + } + ], + "sourceAnchor": 9, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "c3935d4a", + "target": "396a35b0", + "id": "5bfc667b", + "controlPoints": [ + { + "x": 699.7900390625, + "y": 558.5457559681697 + }, + { + "x": 517.833984375, + "y": 456.0914634146342 + } + ], + "sourceAnchor": 8, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_material", + "field": "group_id" + }, + "to": { + "entity": "yx_material_group", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_system_store_staff", + "field": "store_id" + }, + "to": { + "entity": "yx_system_store", + "field": "id" + } + } + ] + }, + { + "name": "template", + "chnname": "运费模板", + "entities": [ + { + "title": "yx_shipping_templates", + "chnname": "运费模板表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "模板ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "模板名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "region_info", + "type": "TEXT", + "chnname": "地域以及费用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "appoint", + "type": "BIT_1", + "chnname": "指定包邮开关", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "appoint_info", + "type": "TEXT", + "chnname": "指定包邮内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_shipping_templates_free", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "编号", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "province_id", + "type": "INT_10", + "chnname": "省ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "DECIMAL_10_2", + "chnname": "包邮件数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL_10_2", + "chnname": "包邮金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uniqid", + "type": "VARCHAR_32", + "chnname": "分组唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_city", + "chnname": "城市表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "INT_10", + "chnname": "省市级别", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "parent_id", + "type": "INT_10", + "chnname": "父级id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "area_code", + "type": "VARCHAR_30", + "chnname": "区号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merger_name", + "type": "VARCHAR_255", + "chnname": "合并名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "lng", + "type": "VARCHAR_50", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "lat", + "type": "VARCHAR_50", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否展示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_shipping_templates_region", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "编号", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "province_id", + "type": "INT_10", + "chnname": "省ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "first", + "type": "DECIMAL_10_2", + "chnname": "首件", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "first_price", + "type": "DECIMAL_10_2", + "chnname": "首件运费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "continues", + "type": "DECIMAL_10_2", + "chnname": "续件", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "continue_price", + "type": "DECIMAL_10_2", + "chnname": "续件运费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uniqid", + "type": "VARCHAR_50", + "chnname": "分组唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_shipping_templates", + "moduleName": false, + "x": 680, + "y": 380, + "id": "c8177992" + }, + { + "shape": "table", + "title": "yx_system_city", + "moduleName": false, + "x": 290, + "y": 260, + "id": "f3f8204a" + }, + { + "shape": "table", + "title": "yx_shipping_templates_free", + "moduleName": false, + "x": 1080, + "y": 190, + "id": "ac873dd5" + }, + { + "shape": "table", + "title": "yx_shipping_templates_region", + "moduleName": false, + "x": 1080, + "y": 540, + "id": "7ca63a1e" + } + ], + "edges": [] + }, + "associations": [] + }, + { + "name": "user", + "chnname": "用户模块", + "entities": [ + { + "title": "yx_user_bill", + "chnname": "用户账单表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户账单id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_id", + "type": "VARCHAR_32", + "chnname": "关联id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pm", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 = 支出 1 = 获得", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_64", + "chnname": "账单标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "category", + "type": "VARCHAR_64", + "chnname": "明细种类", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_64", + "chnname": "明细类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "明细数字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "剩余", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "0 = 带确定 1 = 有效 -1 = 无效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_level", + "chnname": "用户等级记录表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level_id", + "type": "INT_10", + "chnname": "等级vip", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "grade", + "type": "INT_10", + "chnname": "会员等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time", + "type": "INT_10", + "chnname": "过期时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_forever", + "type": "BIT_1", + "chnname": "是否永久", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "0:禁止,1:正常", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remind", + "type": "BIT_1", + "chnname": "是否已通知", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除,0=未删除,1=删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "discount", + "type": "INT_10", + "chnname": "享受折扣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_task_finish", + "chnname": "用户任务完成记录表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "task_id", + "type": "INT_10", + "chnname": "任务id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "是否有效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_sign", + "chnname": "签到记录表", + "fields": [ + { + "name": "int", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "签到说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "INT_10", + "chnname": "获得积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "INT_10", + "chnname": "剩余积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_recharge", + "chnname": "用户充值表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "充值用户UID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL_8_2", + "chnname": "充值金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_price", + "type": "DECIMAL_8_2", + "chnname": "购买赠送金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "recharge_type", + "type": "VARCHAR_32", + "chnname": "充值类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "paid", + "type": "BIT_1", + "chnname": "是否充值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_time", + "type": "DATETIME", + "chnname": "充值支付时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "充值时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_price", + "type": "DECIMAL_10_2", + "chnname": "退款金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_address", + "chnname": "用户地址表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户地址id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_32", + "chnname": "收货人姓名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "VARCHAR_16", + "chnname": "收货人电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "province", + "type": "VARCHAR_64", + "chnname": "收货人所在省", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city", + "type": "VARCHAR_64", + "chnname": "收货人所在市", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "district", + "type": "VARCHAR_64", + "chnname": "收货人所在区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "detail", + "type": "VARCHAR_256", + "chnname": "收货人详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "post_code", + "type": "VARCHAR_20", + "chnname": "邮编", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "longitude", + "type": "VARCHAR_16", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "latitude", + "type": "VARCHAR_16", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_default", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否默认", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_group", + "chnname": "用户分组表", + "fields": [ + { + "name": "id", + "type": "SMALLINT UNSIGNED_5", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "group_name", + "type": "VARCHAR_64", + "chnname": "用户分组名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_extract", + "chnname": "用户提现表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_64", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extract_type", + "type": "VARCHAR_32", + "chnname": "bank = 银行卡 alipay = 支付宝wx=微信", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bank_code", + "type": "VARCHAR_32", + "chnname": "银行卡", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bank_address", + "type": "VARCHAR_256", + "chnname": "开户地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "alipay_code", + "type": "VARCHAR_64", + "chnname": "支付宝账号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extract_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "提现金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_msg", + "type": "VARCHAR_128", + "chnname": "无效原因", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "-1 未通过 0 审核中 1 已提现", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "wechat", + "type": "VARCHAR_15", + "chnname": "微信号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_enter", + "chnname": "商户申请表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "商户申请ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "INT UNSIGNED_10", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "province", + "type": "VARCHAR_32", + "chnname": "商户所在省", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city", + "type": "VARCHAR_32", + "chnname": "商户所在市", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "district", + "type": "VARCHAR_32", + "chnname": "商户所在区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_256", + "chnname": "商户详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_name", + "type": "VARCHAR_256", + "chnname": "商户名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_user", + "type": "VARCHAR_32", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_tel", + "type": "VARCHAR_16", + "chnname": "商户电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "charter", + "type": "VARCHAR_512", + "chnname": "商户证书", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT UNSIGNED_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "apply_time", + "type": "INT UNSIGNED_10", + "chnname": "审核时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "success_time", + "type": "INT_10", + "chnname": "通过时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_message", + "type": "VARCHAR_256", + "chnname": "未通过原因", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_time", + "type": "INT UNSIGNED_10", + "chnname": "未通过时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "-1 审核未通过 0未审核 1审核通过", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_lock", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 = 开启 1= 关闭", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_user_task", + "chnname": "等级任务设置", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "任务名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "配置原名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "task_type", + "type": "VARCHAR_50", + "chnname": "任务类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "INT_10", + "chnname": "限定数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level_id", + "type": "INT_10", + "chnname": "等级id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_must", + "type": "BIT_1", + "chnname": "是否务必达成任务,1务必达成,0=满足其一", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "illustrate", + "type": "VARCHAR_255", + "chnname": "任务说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "新增时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user", + "chnname": "用户表", + "fields": [ + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户账户(跟accout一样)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "password", + "type": "VARCHAR_255", + "chnname": "用户密码(跟pwd)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_25", + "chnname": "真实姓名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "birthday", + "type": "INT_10", + "chnname": "生日", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "card_id", + "type": "VARCHAR_20", + "chnname": "身份证号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_255", + "chnname": "用户备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "partner_id", + "type": "INT_10", + "chnname": "合伙人id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "group_id", + "type": "INT_10", + "chnname": "用户分组id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_100", + "chnname": "用户昵称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "avatar", + "type": "VARCHAR_256", + "chnname": "用户头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_15", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_ip", + "type": "VARCHAR_16", + "chnname": "添加ip", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "最后一次登录时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "last_ip", + "type": "VARCHAR_16", + "chnname": "最后一次登录ip", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "now_money", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户余额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage_price", + "type": "DECIMAL_8_2", + "chnname": "佣金金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户剩余积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sign_num", + "type": "INT_10", + "chnname": "连续签到天数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "1为正常,0为禁止", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "TINYINT UNSIGNED_3", + "chnname": "等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "推广元id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_time", + "type": "DATETIME", + "chnname": "推广员关联时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_type", + "type": "VARCHAR_32", + "chnname": "用户类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_promoter", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否为推广员", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_count", + "type": "INT UNSIGNED_10", + "chnname": "用户购买次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_count", + "type": "INT_10", + "chnname": "下级人数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "addres", + "type": "VARCHAR_255", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "adminid", + "type": "INT UNSIGNED_10", + "chnname": "管理员编号 ", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "login_type", + "type": "VARCHAR_36", + "chnname": "用户登陆类型,h5,wechat,routine", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "wx_profile", + "type": "JSON", + "chnname": "微信用户json信息", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "wechat", + "chnname": "微信模块", + "entities": [ + { + "title": "yx_wechat_reply", + "chnname": "微信关键字回复表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "微信关键字回复id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "key", + "type": "VARCHAR_64", + "chnname": "关键字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "回复类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "data", + "type": "TEXT", + "chnname": "回复数据", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "0=不可用 1 =可用", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hide", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_menu", + "chnname": "微信缓存表", + "fields": [ + { + "name": "key", + "type": "VARCHAR_32", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "result", + "type": "TEXT", + "chnname": "缓存数据", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT_10", + "chnname": "缓存时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_media", + "chnname": "微信回复表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "微信视频音频id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_16", + "chnname": "回复类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_128", + "chnname": "文件路径", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "media_id", + "type": "VARCHAR_64", + "chnname": "微信服务器返回的id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_256", + "chnname": "地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temporary", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否永久或者临时 0永久1临时", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT UNSIGNED_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_article", + "chnname": "文章管理表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "文章管理ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cid", + "type": "VARCHAR_255", + "chnname": "分类id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "文章标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "author", + "type": "VARCHAR_255", + "chnname": "文章作者", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image_input", + "type": "VARCHAR_255", + "chnname": "文章图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "synopsis", + "type": "VARCHAR_255", + "chnname": "文章简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share_title", + "type": "VARCHAR_255", + "chnname": "文章分享标题", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share_synopsis", + "type": "VARCHAR_255", + "chnname": "文章分享简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "visit", + "type": "VARCHAR_255", + "chnname": "浏览次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "原文链接", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hide", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "admin_id", + "type": "INT UNSIGNED_10", + "chnname": "管理员id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "INT_10", + "chnname": "产品关联id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否热门(小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_banner", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否轮播图(小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ], + "indexs": [], + "headers": [ + { + "fieldName": "chnname", + "relationNoShow": false + }, + { + "fieldName": "name", + "relationNoShow": false + }, + { + "fieldName": "type", + "relationNoShow": false + }, + { + "fieldName": "dataType", + "relationNoShow": true + }, + { + "fieldName": "remark", + "relationNoShow": true + }, + { + "fieldName": "pk", + "relationNoShow": false + }, + { + "fieldName": "notNull", + "relationNoShow": true + }, + { + "fieldName": "autoIncrement", + "relationNoShow": true + }, + { + "fieldName": "defaultValue", + "relationNoShow": true + }, + { + "fieldName": "relationNoShow", + "relationNoShow": true + }, + { + "fieldName": "uiHint", + "relationNoShow": true + } + ] + }, + { + "title": "yx_wechat_template", + "chnname": "微信模板", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "模板id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "tempkey", + "type": "CHAR_50", + "chnname": "模板编号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "CHAR_100", + "chnname": "模板名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "VARCHAR_1000", + "chnname": "回复内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "tempid", + "type": "CHAR_100", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + } + ], + "version": "V1.0", + "message": "V1", + "date": "2020/7/21 12:14:27" +} diff --git "a/sql/3.0\345\215\207\347\272\2473.1sql.sql" "b/sql/3.0\345\215\207\347\272\2473.1sql.sql" new file mode 100644 index 0000000000000000000000000000000000000000..26dce00580fb352d0eddf80a3e83fd05167e28a9 --- /dev/null +++ "b/sql/3.0\345\215\207\347\272\2473.1sql.sql" @@ -0,0 +1,136 @@ + + +-- ---------------------------- +-- 字段修改 +-- ---------------------------- +ALTER TABLE `yx_store_seckill` + CHANGE COLUMN `price` `price` DECIMAL(10,2) UNSIGNED COMMENT '价格' AFTER `info`, + CHANGE COLUMN `cost` `cost` DECIMAL(8,2) UNSIGNED COMMENT '成本' AFTER `price`, + CHANGE COLUMN `ot_price` `ot_price` DECIMAL(10,2) UNSIGNED COMMENT '原价' AFTER `cost`; +ALTER TABLE yx_store_seckill ADD COLUMN spec_type tinyint(1) COMMENT '规格 0单 1多' AFTER time_id; +ALTER TABLE yx_store_seckill ADD COLUMN temp_id INT(10) COMMENT '运费模板id' AFTER spec_type; +ALTER TABLE yx_store_pink ADD COLUMN unique_id VARCHAR(128) COMMENT '库存唯一值' AFTER is_del; +ALTER TABLE yx_store_seckill MODIFY COLUMN give_integral DECIMAL(10,2) UNSIGNED COMMENT '返多少积分'; +ALTER TABLE `yx_store_combination` + CHANGE COLUMN `price` `price` DECIMAL(10,2) UNSIGNED NULL DEFAULT '0.00' COMMENT '价格' AFTER `info`, + CHANGE COLUMN `stock` `stock` INT(10) UNSIGNED NULL DEFAULT '0' COMMENT '库存' AFTER `sales`, + CHANGE COLUMN `unit_name` `unit_name` VARCHAR(32) NULL DEFAULT '' COMMENT '单位名' AFTER `browse`; +ALTER TABLE yx_store_combination ADD COLUMN spec_type tinyint(1) COMMENT '规格 0单 1多' AFTER unit_name; +ALTER TABLE yx_store_combination ADD COLUMN temp_id INT(10) COMMENT '运费模板ID' AFTER spec_type; +ALTER TABLE yx_store_combination DROP is_postage; +ALTER TABLE yx_store_combination DROP postage; +ALTER TABLE yx_store_product_attr_value ADD COLUMN pink_price DECIMAL(8,2) NOT NULL COMMENT '拼团价' AFTER brokerage_two; +ALTER TABLE yx_store_product_attr_value ADD COLUMN pink_stock INT(10) NOT NULL COMMENT '拼团库存' AFTER pink_price; +ALTER TABLE yx_store_product_attr_value ADD COLUMN seckill_price DECIMAL(10,2) NOT NULL COMMENT '秒杀价' AFTER pink_stock; +ALTER TABLE yx_store_product_attr_value ADD COLUMN seckill_stock INT(10) NOT NULL COMMENT '秒杀库存' AFTER seckill_price; +ALTER TABLE yx_wechat_template ADD COLUMN type VARCHAR(30) COMMENT '类型:template:模板消息 subscribe:订阅消息' AFTER is_del; + +-- ---------------------------- +-- 足迹菜单添加 +-- ---------------------------- +INSERT INTO `yx_system_group_data` VALUES (225, 'yshop_my_menus', '{\"imageArr\":[\"https://app2.yixiang.co/file/pic/20200911093912577832.png\"],\"uniapp_url\":\"/pages/shop/GoodsFoot/index\",\"name\":\"我的足迹\",\"id\":225,\"pic\":\"https://app2.yixiang.co/file/pic/20200911093912577832.png\",\"sort\":10,\"url\":\"\",\"wxapp_url\":\"\",\"status\":1}', '2020-09-11 09:39:21', '2020-09-11 09:40:49', 10, 1, 0); + +-- ---------------------------- +-- 菜单添加 +-- ---------------------------- +INSERT INTO `sys_menu` VALUES (237, b'0', '规格新增、修改', NULL, 233, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-28 16:35:00', 'yxStoreProductRule:add', 2, '2020-07-16 20:09:03', 0); +INSERT INTO `sys_menu` VALUES (238, b'0', '规格删除', NULL, 233, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-28 16:35:00', 'yxStoreProductRule:del', 2, '2020-07-16 20:08:57', 0); +INSERT INTO `sys_menu` VALUES (240, b'0', '新增、修改模板', NULL, 234, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-29 17:16:06', 'yxShippingTemplates:add', 2, '2020-07-16 20:09:11', 0); +INSERT INTO `sys_menu` VALUES (241, b'0', '删除模板', NULL, 234, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-29 17:16:06', 'yxShippingTemplates:del', 2, '2020-07-16 20:09:16', 0); +INSERT INTO `sys_menu` VALUES (242, b'0', '直播管理', 'wechat/live/index', 48, 999, 'weixin', 'wxlive', b'0', b'0', 'Wxlive', '2020-08-10 17:20:54', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (243, b'0', '直播商品管理', 'wechat/goods/index', 48, 999, 'weixin', 'wxlivegoods', b'0', b'0', 'WxliveGoods', '2020-08-10 17:20:54', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (244, b'0', '拼团商品添加', 'activity/combination/form', 63, 999, NULL, 'combinationAdd', b'0', b'1', 'CombinationAdd', '2020-08-13 21:28:45', 'YXSTORECOMBINATION_EDIT', 1, '2020-08-13 21:31:26', 0); +INSERT INTO `sys_menu` VALUES (245, b'0', '拼团商品修改', 'activity/combination/form', 63, 3, 'anq', 'combinationEdit/:id', b'0', b'1', 'CombinationEdit', '2019-12-24 13:02:23', 'YXSTORECOMBINATION_EDIT', 1, '2020-07-10 16:45:33', 0); +INSERT INTO `sys_menu` VALUES (246, b'0', '秒杀商品添加', 'activity/seckill/form', 63, 999, NULL, 'secKillAdd', b'0', b'1', 'SecKillAdd', '2020-08-13 21:28:45', 'YXSTORESECKILL_EDIT', 1, '2020-08-13 21:31:26', 0); +INSERT INTO `sys_menu` VALUES (247, b'0', '秒杀商品修改', 'activity/seckill/form', 63, 3, 'anq', 'secKillEdit/:id', b'0', b'1', 'SecKillEdit', '2019-12-24 13:02:23', 'YXSTORESECKILL_EDIT', 1, '2020-07-10 16:45:33', 0); +INSERT INTO `sys_menu` VALUES (248, b'0', '多级菜单', NULL, 0, 999, 'menu', 'nested', b'0', b'0', '-', '2020-08-19 11:31:10', NULL, 0, NULL, 0); +INSERT INTO `sys_menu` VALUES (249, b'0', '二级菜单1', 'nested/menu1/index', 248, 999, 'menu', 'menu1', b'0', b'0', '-', '2020-08-19 11:34:34', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (250, b'0', '三级菜单1', 'nested/menu1/menu1-1', 249, 999, 'menu', 'menu1-1', b'0', b'0', '-', '2020-08-19 11:35:52', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (251, b'0', '三级菜单2', 'nested/menu1/menu1-2', 249, 999, 'menu', 'menu1-2', b'0', b'0', '-', '2020-08-19 11:37:48', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (252, b'0', '二级菜单2', 'nested/menu2/index', 248, 999, 'menu', 'menu2', b'0', b'0', '-', '2020-08-19 11:38:35', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (253, b'0', '浏览记录', 'monitor/log/mlog', 40, 15, 'log', 'viewlog', b'0', b'0', 'Viewlog', '2020-07-31 09:47:11', 'log:list', 1, '2020-07-31 09:49:39', 0); +INSERT INTO `sys_menu` VALUES (256, b'0', '商品收藏', 'shop/collect/index', 40, 16, 'menu', 'productRelation', b'0', b'0', 'ProductRelation', '2020-09-03 14:32:49', 'yxStoreProductRelation:list', 1, '2020-09-03 16:21:08', 0); +INSERT INTO `sys_menu` VALUES (257, b'0', '用户足迹', 'shop/foot/index', 40, 17, 'list', 'footRelation', b'0', b'0', 'FootRelation', '2020-09-03 16:20:21', 'yxStoreProductRelation:list', 1, '2020-09-03 16:21:16', 0); +INSERT INTO `sys_menu` VALUES (258, b'0', '订单详情', 'shop/order/detail', 53, 999, 'sqlMonitor', 'detail/:id', b'0', b'1', 'Detail', '2020-09-10 07:29:34', NULL, 1, '2020-09-10 08:52:09', 0); +-- ---------------------------- +-- 菜单添加权限 +-- ---------------------------- +INSERT INTO `sys_roles_menus` VALUES (237, 1); +INSERT INTO `sys_roles_menus` VALUES (238, 1); +INSERT INTO `sys_roles_menus` VALUES (240, 1); +INSERT INTO `sys_roles_menus` VALUES (241, 1); +INSERT INTO `sys_roles_menus` VALUES (242, 1); +INSERT INTO `sys_roles_menus` VALUES (243, 1); +INSERT INTO `sys_roles_menus` VALUES (244, 1); +INSERT INTO `sys_roles_menus` VALUES (245, 1); +INSERT INTO `sys_roles_menus` VALUES (246, 1); +INSERT INTO `sys_roles_menus` VALUES (247, 1); +INSERT INTO `sys_roles_menus` VALUES (248, 1); +INSERT INTO `sys_roles_menus` VALUES (249, 1); +INSERT INTO `sys_roles_menus` VALUES (250, 1); +INSERT INTO `sys_roles_menus` VALUES (251, 1); +INSERT INTO `sys_roles_menus` VALUES (252, 1); +INSERT INTO `sys_roles_menus` VALUES (253, 1); +INSERT INTO `sys_roles_menus` VALUES (256, 1); +INSERT INTO `sys_roles_menus` VALUES (257, 1); +INSERT INTO `sys_roles_menus` VALUES (258, 1); + + + + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for yx_wechat_live +-- ---------------------------- +DROP TABLE IF EXISTS `yx_wechat_live`; +CREATE TABLE `yx_wechat_live` ( + `room_id` bigint(11) NOT NULL COMMENT '直播间id', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '直播间标题', + `cover_imge` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '背景图', + `share_imge` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分享图片', + `live_status` int(9) NULL DEFAULT NULL COMMENT '直播间状态', + `start_time` bigint(11) NULL DEFAULT NULL COMMENT '开始时间', + `end_time` bigint(11) NULL DEFAULT NULL COMMENT '预计结束时间', + `anchor_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主播昵称', + `anchor_wechat` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主播微信号', + `anchor_imge` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主播头像', + `type` tinyint(1) NULL DEFAULT NULL COMMENT '直播间类型 1:推流 0:手机直播', + `screen_type` tinyint(1) NULL DEFAULT NULL COMMENT '横屏、竖屏 【1:横屏,0:竖屏】', + `close_like` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭点赞 【0:开启,1:关闭】', + `close_comment` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭评论 【0:开启,1:关闭】', + `close_goods` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭货架 【0:开启,1:关闭】', + `product_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商品id 多个,分割', + `close_replay` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭回放【0:开启,1:关闭】', + `close_share` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭分享【0:开启,1:关闭】', + `close_kf` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭客服【0:开启,1:关闭】', + PRIMARY KEY (`room_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信直播表' ROW_FORMAT = Dynamic; + + +-- ---------------------------- +-- Table structure for yx_wechat_live_goods +-- ---------------------------- +DROP TABLE IF EXISTS `yx_wechat_live_goods`; +CREATE TABLE `yx_wechat_live_goods` ( + `goods_id` bigint(9) NOT NULL COMMENT '直播商品id', + `product_id` bigint(9) NULL DEFAULT NULL COMMENT '关联商品id', + `cover_imge_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品图片', + `url` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品小程序路径', + `price_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '价格类型 1:一口价(只需要传入price,price2不传) 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传) 3:显示折扣价(price字段为原价,price2字段为现价, price和price2必传)', + `price` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `price2` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品名称', + `third_party_tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '1, 2:表示是为api添加商品,否则是直播控制台添加的商品', + `audit_id` bigint(20) NULL DEFAULT NULL COMMENT '审核单id', + `audit_status` int(1) UNSIGNED ZEROFILL NULL DEFAULT NULL COMMENT '审核状态 0:未审核,1:审核中,2:审核通过,3审核失败', + PRIMARY KEY (`goods_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信直播商品表' ROW_FORMAT = Dynamic; + +SET FOREIGN_KEY_CHECKS = 1; + + + + +drop index uid on yx_store_product_relation; diff --git "a/sql/3.1\345\215\207\347\272\2473.2sql.sql" "b/sql/3.1\345\215\207\347\272\2473.2sql.sql" new file mode 100644 index 0000000000000000000000000000000000000000..78848dd635aa47acd2ab3f019618d53130883531 --- /dev/null +++ "b/sql/3.1\345\215\207\347\272\2473.2sql.sql" @@ -0,0 +1,54 @@ + + +-- ---------------------------- +-- 字段修改 +-- ---------------------------- +ALTER TABLE yx_store_product ADD COLUMN is_integral tinyint(1) ZEROFILL NULL DEFAULT 0 COMMENT '是开启积分兑换' AFTER is_del; + +ALTER TABLE yx_store_product ADD COLUMN integral int(11) NULL DEFAULT 0 COMMENT '需要多少积分兑换 只在开启积分兑换时生效' AFTER is_integral; + +ALTER TABLE yx_store_product_attr_value ADD COLUMN integral INT(10) DEFAULT 0 COMMENT '需要多少积分兑换' AFTER seckill_price; + +ALTER TABLE yx_store_order ADD COLUMN `pay_integral` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '实际支付积分'; + +ALTER TABLE yx_user modify column add_ip varchar(100) NULL DEFAULT '' COMMENT '添加ip'; + +ALTER TABLE yx_user modify column last_ip varchar(100) NULL DEFAULT '' COMMENT '最后一次登录ip'; + +ALTER TABLE yx_store_visit modify column id bigint(20) NOT NULL; + +ALTER TABLE yx_store_visit modify column product_id bigint(20) NULL DEFAULT NULL COMMENT '产品ID'; + +ALTER TABLE yx_store_visit modify column uid bigint(20) NULL DEFAULT NULL COMMENT '用户ID'; + +ALTER TABLE yx_store_order_cart_info ADD COLUMN order_id varchar(32) NULL DEFAULT NULL COMMENT '订单号' AFTER oid; + +INSERT INTO `sys_menu` VALUES (264, b'0', '终端装修', NULL, 0, 0, 'theme', 'theme', b'0', b'0', '--', '2021-02-25 19:33:17', '', 1, '2021-02-25 19:33:32', 0); +INSERT INTO `sys_menu` VALUES (265, b'1', '商城装修', NULL, 264, 999, 'theme', 'https://demo2.yixiang.co/container', b'0', b'0', '-', '2021-02-25 19:35:13', NULL, 1, NULL, 0); +INSERT INTO `sys_roles_menus` VALUES (264, 1); +INSERT INTO `sys_roles_menus` VALUES (265, 1); + +-- ---------------------------- +-- Table structure for yx_store_canvas +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_canvas`; +CREATE TABLE `yx_store_canvas` ( + `canvas_id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '画布id', + `terminal` tinyint(1) NOT NULL COMMENT '终端 1-小程序 2-H5 3-APP 4-PC', + `json` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '画布json数据', + `type` tinyint(1) NULL DEFAULT 1 COMMENT '类型 1-系统画布 2-自定义页面 3-商家店铺装修', + `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '名称', + `shop_id` bigint(20) NULL DEFAULT 0 COMMENT '店铺id,当type=3的时候,值为具体的店铺id,其它情况为0', + `create_time` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_time` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间', + `is_del` tinyint(1) NULL DEFAULT NULL COMMENT '删除标识', + PRIMARY KEY (`canvas_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '画布信息表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of yx_store_canvas +-- ---------------------------- +INSERT INTO `yx_store_canvas` VALUES (11, 3, '[{\"title\":\"店铺头部\",\"type\":\"header\",\"componentContent\":{\"title\":\"Yshop\"},\"index\":0},{\"title\":\"搜索商品\",\"type\":\"search\",\"componentContent\":{},\"index\":1},{\"title\":\"轮播图\",\"type\":\"banner\",\"componentContent\":{\"bannerData\":[{\"pic\":\"./static/img/banner.f96c3f5.png\",\"name\":\"0\",\"sort\":0,\"url\":\"/\",\"status\":1}]},\"index\":2},{\"title\":\"滚动新闻\",\"type\":\"noticeBar\",\"componentContent\":{\"roll\":[{\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"url\":\"/news_list\",\"info\":\"yshop基于springboot2+Mybatisplus商城系统,3.0版本重构了代码,新增了运费模板、sku单独管理、商品券等\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\"}]},\"index\":3},{\"title\":\"菜单\",\"type\":\"menu\",\"componentContent\":{\"menus\":[{\"imageArr\":[\"https://image.dayouqiantu.cn/5e85bfa61251d.png\"],\"uniapp_url\":\"/pages/shop/GoodsList/index\",\"name\":\"全部商品\",\"id\":180,\"pic\":\"https://image.dayouqiantu.cn/all.png\",\"sort\":9,\"url\":\"/goods_list\",\"wxapp_url\":\"/pages/shop/GoodsClass/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/news.png\"],\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"name\":\"图文资讯\",\"id\":196,\"pic\":\"https://image.dayouqiantu.cn/xw.png\",\"sort\":8,\"url\":\"/news_list\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e939507b5e.png\"],\"uniapp_url\":\"/pages/shop/GoodsCollection/index\",\"name\":\"我的收藏\",\"id\":197,\"pic\":\"https://image.dayouqiantu.cn/colle.png\",\"sort\":7,\"url\":\"/collection\",\"wxapp_url\":\"/pages/shop/GoodsCollection/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/coupon.png\"],\"uniapp_url\":\"\",\"name\":\"优惠券\",\"id\":199,\"pic\":\"https://image.dayouqiantu.cn/cou.png\",\"sort\":6,\"url\":\"/user/get_coupon\",\"wxapp_url\":\"/pages/user/coupon/GetCoupon/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/pink.png\"],\"uniapp_url\":\"/pages/activity/GoodsGroup/index\",\"name\":\"拼团专区\",\"id\":200,\"pic\":\"https://image.dayouqiantu.cn/62ac09d2914d36c65b9b59d2147d809a.png\",\"sort\":5,\"url\":\"/activity/group\",\"wxapp_url\":\"/pages/activity/GoodsGroup/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/sign.png\"],\"uniapp_url\":\"/pages/user/signIn/Sign/index\",\"name\":\"积分签到\",\"id\":209,\"pic\":\"https://image.dayouqiantu.cn/29ea4acebbf99e7eaf6f85af2b6d79ae.png\",\"sort\":4,\"url\":\"/user/sign\",\"wxapp_url\":\"/pages/user/signIn/Sign/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/sekill.png\"],\"uniapp_url\":\"/pages/activity/GoodsSeckill/index\",\"name\":\"秒杀专区\",\"id\":216,\"pic\":\"https://image.dayouqiantu.cn/b0344c148141b50d68db9722708ea49e.png\",\"sort\":3,\"url\":\"/activity/goods_seckill\",\"wxapp_url\":\"/pages/activity/GoodsSeckill/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/bargin.png\"],\"uniapp_url\":\"/pages/activity/GoodsBargain/index\",\"name\":\"砍价专区\",\"id\":217,\"pic\":\"https://image.dayouqiantu.cn/bar.png\",\"sort\":2,\"url\":\"/activity/bargain\",\"wxapp_url\":\"/pages/activity/GoodsBargain/main\",\"status\":1}]},\"index\":4},{\"title\":\"广告\",\"type\":\"adv\",\"componentContent\":{\"detail\":{\"list\":[{\"image\":\"https://wx.yixiang.co/static/images/index001.png\",\"url\":\"\",\"uniapp_url\":\"/pages/user/coupon/GetCoupon/index\",\"wxapp_url\":\"/pages/user/coupon/GetCoupon/index\",\"path_type\":1},{\"image\":\"https://wx.yixiang.co/static/images/index002.png\",\"url\":\"\",\"uniapp_url\":\"/pages/shop/GoodsList/index\",\"wxapp_url\":\"/pages/shop/GoodsList/index\",\"path_type\":1},{\"image\":\"https://wx.yixiang.co/static/images/index003.png\",\"url\":\"\",\"uniapp_url\":\"/pages/shop/GoodsList/index?title=\\\"积分商城\\\"&isIntegral=true\",\"wxapp_url\":\"/pages/shop/GoodsList/index?title=\\\"积分商城\\\"&isIntegral=true\",\"path_type\":1}],\"name\":\"\",\"style\":3}},\"index\":5},{\"title\":\"热门榜单\",\"type\":\"hotCommodity\",\"componentContent\":{},\"index\":6},{\"title\":\"为您推荐\",\"type\":\"promotionGood\",\"componentContent\":{},\"index\":7}]', 1, '1', 0, '2021-02-25 19:36:06', '2021-02-25 22:39:55', 0); + + + diff --git "a/sql/sql\346\211\247\350\241\214\351\241\272\345\272\217\350\257\264\346\230\216.txt" "b/sql/sql\346\211\247\350\241\214\351\241\272\345\272\217\350\257\264\346\230\216.txt" new file mode 100644 index 0000000000000000000000000000000000000000..f0977c460685e28ef7c209e3b78c1a2bb384f303 --- /dev/null +++ "b/sql/sql\346\211\247\350\241\214\351\241\272\345\272\217\350\257\264\346\230\216.txt" @@ -0,0 +1,4 @@ +1、3.0平滑升级3.2 直接导入3.0升级3.1sql.sql再执行3.1升级3.2sql.sql(特别说明:平滑升级只限于没有改过添加过菜单之类的,如果你已经添加了菜单,请自行解决一下) +2、如果你已经是3.1版本了直接执行3.1升级3.2sql.sql即可 +3、如果是全新下载的直接导入yshop3.2.sql +4、注意:操作数据库属于危险行为,请勿用于生产库,请事先做好备份,再执行sql操作!!! diff --git a/sql/yshop.pdman.json b/sql/yshop.pdman.json new file mode 100644 index 0000000000000000000000000000000000000000..16b84cdde6a7dfc2aae73ffba3c855988448ecb8 --- /dev/null +++ b/sql/yshop.pdman.json @@ -0,0 +1,12704 @@ +{ + "modules": [ + { + "name": "DB_REVERSE_MYSQL", + "chnname": "逆向解析_MYSQL", + "entities": [ + { + "title": "monitor_server", + "chnname": "服务监控", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cpu_core", + "type": "INT_10", + "chnname": "CPU内核数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cpu_rate", + "type": "DOUBLE_22", + "chnname": "CPU使用率", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "disk_total", + "type": "DOUBLE_22", + "chnname": "磁盘总量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "disk_used", + "type": "DOUBLE_22", + "chnname": "磁盘使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mem_total", + "type": "DOUBLE_22", + "chnname": "内存总数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mem_used", + "type": "DOUBLE_22", + "chnname": "内存使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "port", + "type": "INT_10", + "chnname": "访问端口", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "state", + "type": "VARCHAR_255", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "swap_total", + "type": "DOUBLE_22", + "chnname": "交换区总量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "swap_used", + "type": "DOUBLE_22", + "chnname": "交换区使用量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "服务地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "edges": [], + "nodes": [] + }, + "associations": [] + }, + { + "name": "tools", + "chnname": "工具模块", + "entities": [ + { + "title": "tools_email_config", + "chnname": "邮箱配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "from_user", + "type": "VARCHAR_255", + "chnname": "收件人", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "host", + "type": "VARCHAR_255", + "chnname": "邮件服务器SMTP地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pass", + "type": "VARCHAR_255", + "chnname": "密码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "port", + "type": "VARCHAR_255", + "chnname": "端口", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sys_user", + "type": "VARCHAR_255", + "chnname": "发件者用户名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_local_storage", + "chnname": "本地存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "文件真实的名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "文件名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "suffix", + "type": "VARCHAR_255", + "chnname": "后缀", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_100", + "chnname": "大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "operate", + "type": "VARCHAR_255", + "chnname": "操作人", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_picture", + "chnname": "Sm.Ms图床", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "上传日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delete_url", + "type": "VARCHAR_255", + "chnname": "删除的URL", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "filename", + "type": "VARCHAR_255", + "chnname": "图片名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "height", + "type": "VARCHAR_255", + "chnname": "图片高度", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "图片大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "图片地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "width", + "type": "VARCHAR_255", + "chnname": "图片宽度", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "md5code", + "type": "VARCHAR_255", + "chnname": "文件的MD5值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_qiniu_config", + "chnname": "七牛云配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "access_key", + "type": "TEXT", + "chnname": "accessKey", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bucket", + "type": "VARCHAR_255", + "chnname": "Bucket 识别符", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "host", + "type": "VARCHAR_255", + "chnname": "外链域名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "secret_key", + "type": "TEXT", + "chnname": "secretKey", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "空间类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "zone", + "type": "VARCHAR_255", + "chnname": "机房", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_qiniu_content", + "chnname": "七牛云文件存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "bucket", + "type": "VARCHAR_255", + "chnname": "Bucket 识别符", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "文件名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "文件大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "文件类型:私有或公开", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "上传或同步的时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "文件url", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "suffix", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_verification_code", + "chnname": "验证码", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "code", + "type": "VARCHAR_255", + "chnname": "验证码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态:1有效、0过期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_255", + "chnname": "验证码类型:email或者短信", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_255", + "chnname": "接收邮箱或者手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "scenes", + "type": "VARCHAR_255", + "chnname": "业务名称:如重置邮箱、重置密码等", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "tools_alipay_config", + "chnname": "支付宝配置类", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "主键", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "app_id", + "type": "VARCHAR_255", + "chnname": "应用ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "charset", + "type": "VARCHAR_255", + "chnname": "编码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "format", + "type": "VARCHAR_255", + "chnname": "类型 固定格式json", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "gateway_url", + "type": "VARCHAR_255", + "chnname": "网关地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "notify_url", + "type": "VARCHAR_255", + "chnname": "异步回调", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "private_key", + "type": "TEXT", + "chnname": "私钥", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "public_key", + "type": "TEXT", + "chnname": "公钥", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "return_url", + "type": "VARCHAR_255", + "chnname": "回调地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sign_type", + "type": "VARCHAR_255", + "chnname": "签名方式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sys_service_provider_id", + "type": "VARCHAR_255", + "chnname": "商户号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "logging", + "chnname": "日志", + "entities": [ + { + "title": "sys_log", + "chnname": "系统日志", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "exception_detail", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "log_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "request_ip", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browser", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + }, + { + "name": "gen", + "chnname": "代码生成", + "entities": [ + { + "title": "gen_test", + "chnname": "代码生成测试", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sex", + "type": "INT_10", + "chnname": "性别", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "column_config", + "chnname": "代码生成字段信息存储", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "table_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "column_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "column_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dict_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extra", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "form_show", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "form_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "key_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "list_show", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "not_null", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "query_type", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "date_annotation", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "gen_config", + "chnname": "代码生成器配置", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "table_name", + "type": "VARCHAR_255", + "chnname": "表名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "author", + "type": "VARCHAR_255", + "chnname": "作者", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cover", + "type": "BIT_1", + "chnname": "是否覆盖", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "module_name", + "type": "VARCHAR_255", + "chnname": "模块名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pack", + "type": "VARCHAR_255", + "chnname": "至于哪个包下", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "前端代码生成的路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "api_path", + "type": "VARCHAR_255", + "chnname": "前端Api文件路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "prefix", + "type": "VARCHAR_255", + "chnname": "表前缀", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "api_alias", + "type": "VARCHAR_255", + "chnname": "接口名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "column_config", + "moduleName": false, + "x": 288.359375, + "y": 279, + "id": "09a1ceae" + }, + { + "shape": "table", + "title": "gen_config", + "moduleName": false, + "x": 760, + "y": 200, + "id": "2e380491" + } + ], + "edges": [] + }, + "associations": [] + }, + { + "name": "monitor", + "chnname": "", + "entities": [ + { + "title": "sys_visits", + "chnname": "访客记录", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "date", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ip_counts", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pv_counts", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "week_day", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + }, + { + "name": "quartz", + "chnname": "定时任务", + "entities": [ + { + "title": "quartz_job", + "chnname": "定时任务", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "bean_name", + "type": "VARCHAR_255", + "chnname": "Spring Bean名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cron_expression", + "type": "VARCHAR_255", + "chnname": "cron 表达式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pause", + "type": "BIT_1", + "chnname": "状态:1暂停、0启用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_name", + "type": "VARCHAR_255", + "chnname": "任务名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method_name", + "type": "VARCHAR_255", + "chnname": "方法名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "VARCHAR_255", + "chnname": "参数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "quartz_log", + "chnname": "定时任务日志", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "baen_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cron_expression", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "exception_detail", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_success", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "method_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "params", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "quartz_job", + "moduleName": false, + "x": 422.359375, + "y": 367, + "id": "4b2bda89" + }, + { + "shape": "table", + "title": "quartz_log", + "moduleName": false, + "x": 890, + "y": 340, + "id": "b47ba8e0" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "b47ba8e0", + "target": "4b2bda89", + "id": "01afd2ee", + "controlPoints": [ + { + "x": 759.2236328125, + "y": 356.3101851851852 + }, + { + "x": 608.0595703125, + "y": 354.9063636363636 + } + ], + "sourceAnchor": 12, + "targetAnchor": 9 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "quartz_log", + "field": "job_name" + }, + "to": { + "entity": "quartz_job", + "field": "job_name" + } + } + ] + }, + { + "name": "system", + "chnname": "系统模块", + "entities": [ + { + "title": "sys_users_roles", + "chnname": "用户角色关联", + "fields": [ + { + "name": "user_id", + "type": "BIGINT_19", + "chnname": "用户ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "角色ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_roles_menus", + "chnname": "角色菜单关联", + "fields": [ + { + "name": "menu_id", + "type": "BIGINT_19", + "chnname": "菜单ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "角色ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_roles_depts", + "chnname": "角色部门关联", + "fields": [ + { + "name": "role_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_user_avatar", + "chnname": "系统用户头像", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "真实文件名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "size", + "type": "VARCHAR_255", + "chnname": "大小", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_role", + "chnname": "角色表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "data_scope", + "type": "VARCHAR_255", + "chnname": "数据权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "INT_10", + "chnname": "角色级别", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "permission", + "type": "VARCHAR_255", + "chnname": "功能权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dict", + "chnname": "数据字典", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "字典名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_255", + "chnname": "描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dict_detail", + "chnname": "数据字典详情", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "label", + "type": "VARCHAR_255", + "chnname": "字典标签", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_255", + "chnname": "字典值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "VARCHAR_255", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dict_id", + "type": "BIGINT_19", + "chnname": "字典id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_dept", + "chnname": "部门", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT_19", + "chnname": "上级部门", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIT_1", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_menu", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "i_frame", + "type": "BIT_1", + "chnname": "是否外链", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "菜单名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "component", + "type": "VARCHAR_255", + "chnname": "组件", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT_19", + "chnname": "上级菜单ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "BIGINT_19", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "icon", + "type": "VARCHAR_255", + "chnname": "图标", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_255", + "chnname": "链接地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cache", + "type": "BIT_1", + "chnname": "缓存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hidden", + "type": "BIT_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "component_name", + "type": "VARCHAR_20", + "chnname": "组件名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "permission", + "type": "VARCHAR_255", + "chnname": "权限", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "INT_10", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_job", + "chnname": "岗位", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "岗位名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIT_1", + "chnname": "岗位状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "BIGINT_19", + "chnname": "岗位排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "部门ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "sys_user", + "chnname": "系统用户", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "avatar_id", + "type": "BIGINT_19", + "chnname": "头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "email", + "type": "VARCHAR_255", + "chnname": "邮箱", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "enabled", + "type": "BIGINT_19", + "chnname": "状态:1启用、0禁用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "password", + "type": "VARCHAR_255", + "chnname": "密码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "dept_id", + "type": "BIGINT_19", + "chnname": "部门名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "VARCHAR_255", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "job_id", + "type": "BIGINT_19", + "chnname": "岗位名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "last_password_reset_time", + "type": "DATETIME", + "chnname": "最后修改密码的日期", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nick_name", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sex", + "type": "VARCHAR_255", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "sys_user", + "moduleName": false, + "x": 730, + "y": 200, + "id": "42584636" + }, + { + "shape": "table", + "title": "sys_menu", + "moduleName": false, + "x": 230, + "y": 580, + "id": "faa9e561" + }, + { + "shape": "table", + "title": "sys_dict_detail", + "moduleName": false, + "x": 1440, + "y": 720, + "id": "de6d0d5f" + }, + { + "shape": "table", + "title": "sys_dict", + "moduleName": false, + "x": 1080, + "y": 770, + "id": "2e3e2ccb" + }, + { + "shape": "table", + "title": "sys_user_avatar", + "moduleName": false, + "x": 220, + "y": 100, + "id": "794cd430" + }, + { + "shape": "table", + "title": "sys_job", + "moduleName": false, + "x": 240, + "y": 290, + "id": "fe1aecfe" + }, + { + "shape": "table", + "title": "sys_roles_menus", + "moduleName": false, + "x": 550, + "y": 490, + "id": "0ba651c7" + }, + { + "shape": "table", + "title": "sys_role", + "moduleName": false, + "x": 850, + "y": 570, + "id": "2dd8b462" + }, + { + "shape": "table", + "title": "sys_roles_depts", + "moduleName": false, + "x": 1140, + "y": 490, + "id": "759d8dd0" + }, + { + "shape": "table", + "title": "sys_users_roles", + "moduleName": false, + "x": 1210, + "y": 50, + "id": "e76717e1" + }, + { + "shape": "table", + "title": "sys_dept", + "moduleName": false, + "x": 1200, + "y": 240, + "id": "2ecdc324" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "fe1aecfe", + "id": "a7e02413", + "controlPoints": [ + { + "x": 518.6240234375, + "y": 225.91161616161617 + }, + { + "x": 384.025390625, + "y": 232.19736842105263 + } + ], + "sourceAnchor": 16, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "2ecdc324", + "id": "99cdad68", + "controlPoints": [ + { + "x": 941.3759765625, + "y": 187.46212121212122 + }, + { + "x": 1055.974609375, + "y": 192.22058823529412 + } + ], + "sourceAnchor": 13, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "de6d0d5f", + "target": "2e3e2ccb", + "id": "0f30581b", + "controlPoints": [ + { + "x": 1296.224609375, + "y": 736.3355263157895 + }, + { + "x": 1223.775390625, + "y": 732.25 + } + ], + "sourceAnchor": 8, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "42584636", + "target": "794cd430", + "id": "618c6bc6", + "controlPoints": [ + { + "x": 518.6240234375, + "y": 91.33838383838385 + }, + { + "x": 368.099609375, + "y": 72.28846153846153 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "0ba651c7", + "target": "faa9e561", + "id": "fdb423ea", + "controlPoints": [ + { + "x": 422.126953125, + "y": 492.281914893617 + }, + { + "x": 395.0341796875, + "y": 442.10714285714283 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "0ba651c7", + "target": "2dd8b462", + "id": "882b95a1", + "controlPoints": [ + { + "x": 677.873046875, + "y": 512.8191489361702 + }, + { + "x": 705.974609375, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 3, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "759d8dd0", + "target": "2dd8b462", + "id": "7a7a3350", + "controlPoints": [ + { + "x": 1034.2080078125, + "y": 492.281914893617 + }, + { + "x": 994.025390625, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "759d8dd0", + "target": "2ecdc324", + "id": "a9e0dc69", + "controlPoints": [ + { + "x": 1245.7919921875, + "y": 506.48049645390074 + }, + { + "x": 1440, + "y": 500 + }, + { + "x": 1440, + "y": 190 + }, + { + "x": 1344.025390625, + "y": 192.22058823529412 + } + ], + "sourceAnchor": 3, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e76717e1", + "target": "42584636", + "id": "6179129e", + "controlPoints": [ + { + "x": 1085.4638671875, + "y": 52.28191489361702 + }, + { + "x": 941.3759765625, + "y": 72.11363636363636 + } + ], + "sourceAnchor": 0, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e76717e1", + "target": "2dd8b462", + "id": "c796f9c9", + "controlPoints": [ + { + "x": 1334.5361328125, + "y": 72.81914893617022 + }, + { + "x": 1480, + "y": 70 + }, + { + "x": 1490, + "y": 580 + }, + { + "x": 1030, + "y": 590 + }, + { + "x": 994.025390625, + "y": 502.17857142857144 + } + ], + "sourceAnchor": 3, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "sys_user", + "field": "job_id" + }, + "to": { + "entity": "sys_job", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_user", + "field": "dept_id" + }, + "to": { + "entity": "sys_dept", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_dict_detail", + "field": "dict_id" + }, + "to": { + "entity": "sys_dict", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_user", + "field": "avatar_id" + }, + "to": { + "entity": "sys_user_avatar", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_menus", + "field": "menu_id" + }, + "to": { + "entity": "sys_menu", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_menus", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_depts", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_roles_depts", + "field": "dept_id" + }, + "to": { + "entity": "sys_dept", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_users_roles", + "field": "user_id" + }, + "to": { + "entity": "sys_user", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "sys_users_roles", + "field": "role_id" + }, + "to": { + "entity": "sys_role", + "field": "id" + } + } + ] + }, + { + "name": "activity", + "chnname": "活动", + "entities": [ + { + "title": "yx_store_seckill", + "chnname": "商品秒杀产品表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品秒杀产品表id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "推荐图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "活动标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "原价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "返多少积分", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_16", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATE", + "chnname": "开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATE", + "chnname": "结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "产品状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "热门推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "删除 0未删除1已删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "num", + "type": "INT UNSIGNED_10", + "chnname": "最多秒杀几个", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "TINYINT UNSIGNED_1", + "chnname": "显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "time_id", + "type": "INT UNSIGNED_10", + "chnname": "时间段id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spec_type", + "type": "BIT_1", + "chnname": "规格 0单 1多", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "运费模板id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_pink", + "chnname": "拼团表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单id 生成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id_key", + "type": "INT UNSIGNED_10", + "chnname": "订单id 数据库", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_num", + "type": "INT UNSIGNED_10", + "chnname": "购买商品个数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "购买总金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cid", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "BIGINT UNSIGNED_20", + "chnname": "产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "people", + "type": "INT UNSIGNED_10", + "chnname": "拼团总人数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "拼团产品单价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "k_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "团长id 0为团长", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_tpl", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否发送模板消息0未发送1已发送", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_refund", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否退款 0未退款 1已退款", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态1进行中2已完成3未完成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_user", + "chnname": "优惠券发放记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "优惠券发放记录id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cid", + "type": "INT UNSIGNED_10", + "chnname": "兑换的项目id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "优惠券所属用户", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_title", + "type": "VARCHAR_32", + "chnname": "优惠券名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "优惠券的面值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "最低消费多少金额可用优惠券", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "优惠券创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "end_time", + "type": "DATETIME", + "chnname": "优惠券结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_time", + "type": "DATETIME", + "chnname": "使用时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "获取方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态(0:未使用,1:已使用, 2:已过期)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_fail", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否有效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_issue_user", + "chnname": "优惠券前台用户领取记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "领取优惠券用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "issue_coupon_id", + "type": "INT_10", + "chnname": "优惠券前台领取ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "领取时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon_issue", + "chnname": "优惠券前台领取表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cid", + "type": "INT_10", + "chnname": "优惠券ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ctype", + "type": "BIT_1", + "chnname": "优惠券类型 0-通用 1-商品券", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "优惠券领取开启时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "end_time", + "type": "DATETIME", + "chnname": "优惠券领取结束时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_count", + "type": "INT_10", + "chnname": "优惠券领取数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remain_count", + "type": "INT_10", + "chnname": "优惠券剩余领取数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_permanent", + "type": "BIT_1", + "chnname": "是否无限张数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "1 正常 0 未开启 -1 已无效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "优惠券添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_coupon", + "chnname": "优惠券表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "优惠券表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_64", + "chnname": "优惠券名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "integral", + "type": "INT UNSIGNED_10", + "chnname": "兑换消耗积分值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "兑换的优惠券面值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "最低消费多少金额可用优惠券", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_time", + "type": "INT UNSIGNED_10", + "chnname": "优惠券有效期限(单位:天)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态(0:关闭,1:开启)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "VARCHAR_200", + "chnname": "商品ids", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "TINYINT_3", + "chnname": "优惠券类型 0-通用 1-商品券", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "兑换项目添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_combination", + "chnname": "拼团产品表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "推荐图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "活动标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr", + "type": "VARCHAR_255", + "chnname": "活动属性", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "people", + "type": "INT UNSIGNED_10", + "chnname": "参团人数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_price", + "type": "DECIMAL_10_2", + "chnname": "商品原价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_host", + "type": "TINYINT UNSIGNED_1", + "chnname": "推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "TINYINT UNSIGNED_1", + "chnname": "产品状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_use", + "type": "TINYINT UNSIGNED_1", + "chnname": "商户是否可用1可用0不可用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "拼团内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "拼团开始时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "拼团结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "effective_time", + "type": "INT_10", + "chnname": "拼团订单有效时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "INT UNSIGNED_10", + "chnname": "拼团产品成本", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browse", + "type": "INT_10", + "chnname": "浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_32", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spec_type", + "type": "BIT_1", + "chnname": "规格 0单 1多", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "运费模板ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain_user_help", + "chnname": "砍价用户帮助表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价用户帮助表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "帮助的用户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_user_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户参与砍价表id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "帮助砍价多少金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain_user", + "chnname": "用户参与砍价表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户参与砍价表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_price_min", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价的最低价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_price", + "type": "DECIMAL_8_2", + "chnname": "砍价金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍掉的价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态 1参与中 2 活动结束参与失败 3活动结束参与成功", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "参与时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否取消", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_bargain", + "chnname": "砍价表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "砍价产品ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "关联产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "砍价活动名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_150", + "chnname": "砍价活动图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_16", + "chnname": "单位名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "images", + "type": "VARCHAR_2000", + "chnname": "砍价产品轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "DATETIME", + "chnname": "砍价开启时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stop_time", + "type": "DATETIME", + "chnname": "砍价结束时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_255", + "chnname": "砍价产品名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "砍价商品最低价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "num", + "type": "INT UNSIGNED_10", + "chnname": "每次购买的砍价产品数量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_max_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户每次砍价的最大金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_min_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户每次砍价的最小金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_num", + "type": "INT UNSIGNED_10", + "chnname": "用户每次砍价的次数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "砍价详情", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "反多少积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "info", + "type": "VARCHAR_255", + "chnname": "砍价活动简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否推荐0不推荐1推荐", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除 0未删除 1删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮 0不包邮 1包邮", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_10_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "rule", + "type": "TEXT", + "chnname": "砍价规则", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "look", + "type": "INT UNSIGNED_10", + "chnname": "砍价产品浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share", + "type": "INT UNSIGNED_10", + "chnname": "砍价产品分享量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_visit", + "chnname": "产品浏览分析表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "INT_10", + "chnname": "产品ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_type", + "type": "VARCHAR_32", + "chnname": "产品类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_id", + "type": "INT_10", + "chnname": "产品分类ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "CHAR_50", + "chnname": "产品类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "INT_10", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "count", + "type": "INT_10", + "chnname": "访问次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "VARCHAR_255", + "chnname": "备注描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_pink", + "moduleName": false, + "x": 310, + "y": 580, + "id": "13513a4e" + }, + { + "shape": "table", + "title": "yx_store_coupon", + "moduleName": false, + "x": 600, + "y": 180, + "id": "2b6bf508" + }, + { + "shape": "table", + "title": "yx_store_coupon_user", + "moduleName": false, + "x": 1310, + "y": 190, + "id": "aa29268e" + }, + { + "shape": "table", + "title": "yx_store_coupon_issue", + "moduleName": false, + "x": 1270, + "y": 580, + "id": "74e5a8f0" + }, + { + "shape": "table", + "title": "yx_store_coupon_issue_user", + "moduleName": false, + "x": 790, + "y": 610, + "id": "dfd12dd0" + }, + { + "shape": "table", + "title": "yx_store_bargain", + "moduleName": false, + "x": -160, + "y": -50, + "id": "1de36ee3" + }, + { + "shape": "table", + "title": "yx_store_bargain_user", + "moduleName": false, + "x": 590, + "y": -340, + "id": "14a47167" + }, + { + "shape": "table", + "title": "yx_store_bargain_user_help", + "moduleName": false, + "x": 490, + "y": -100, + "id": "e979c0f8" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "aa29268e", + "target": "2b6bf508", + "id": "a8da6c7b", + "controlPoints": [ + { + "x": 1041.849609375, + "y": 91.2897465437788 + }, + { + "x": 835.138671875, + "y": 72.12931034482759 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "74e5a8f0", + "target": "2b6bf508", + "id": "6abf3f7d", + "controlPoints": [ + { + "x": 1051.787109375, + "y": 510.3375331564987 + }, + { + "x": 835.138671875, + "y": 72.12931034482759 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "dfd12dd0", + "target": "74e5a8f0", + "id": "0433262a", + "controlPoints": [ + { + "x": 991.1455078125, + "y": 608.3222222222222 + }, + { + "x": 1051.787109375, + "y": 472.12931034482756 + } + ], + "sourceAnchor": 5, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "14a47167", + "target": "1de36ee3", + "id": "e528de82", + "controlPoints": [ + { + "x": 279.8408203125, + "y": -377.6630434782609 + }, + { + "x": 182.1513671875, + "y": -347.9440298507463 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "e979c0f8", + "target": "1de36ee3", + "id": "b2e7774f", + "controlPoints": [ + { + "x": 280.6005859375, + "y": -120.73355263157895 + }, + { + "x": 182.1513671875, + "y": -347.9440298507463 + } + ], + "sourceAnchor": 4, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_user", + "field": "cid" + }, + "to": { + "entity": "yx_store_coupon", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_issue", + "field": "cid" + }, + "to": { + "entity": "yx_store_coupon", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_coupon_issue_user", + "field": "issue_coupon_id" + }, + "to": { + "entity": "yx_store_coupon_issue", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_bargain_user", + "field": "bargain_id" + }, + "to": { + "entity": "yx_store_bargain", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_bargain_user_help", + "field": "bargain_id" + }, + "to": { + "entity": "yx_store_bargain", + "field": "id" + } + } + ] + }, + { + "name": "cart", + "chnname": "购物车", + "entities": [ + { + "title": "yx_store_cart", + "chnname": "购物车表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "购物车表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_attr_unique", + "type": "VARCHAR_50", + "chnname": "商品属性", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_num", + "type": "SMALLINT UNSIGNED_5", + "chnname": "商品数量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pay", + "type": "BIT_1", + "chnname": "0 = 未购买 1 = 已购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_new", + "type": "BIT_1", + "chnname": "是否为立即购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination_id", + "type": "INT UNSIGNED_10", + "chnname": "拼团id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_id", + "type": "INT UNSIGNED_10", + "chnname": "秒杀产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "INT UNSIGNED_10", + "chnname": "砍价id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "category", + "chnname": "商品分类", + "entities": [ + { + "title": "yx_store_category", + "chnname": "商品分类表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT_7", + "chnname": "商品分类表ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "pid", + "type": "MEDIUMINT_7", + "chnname": "父id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_name", + "type": "VARCHAR_100", + "chnname": "分类名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "MEDIUMINT_7", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pic", + "type": "VARCHAR_128", + "chnname": "图标", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否推荐", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "删除状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "order", + "chnname": "订单", + "entities": [ + { + "title": "yx_store_order", + "chnname": "订单表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extend_order_id", + "type": "VARCHAR_32", + "chnname": "额外订单号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_32", + "chnname": "用户姓名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_phone", + "type": "VARCHAR_18", + "chnname": "用户电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_address", + "type": "VARCHAR_100", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_id", + "type": "VARCHAR_256", + "chnname": "购物车id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "freight_price", + "type": "DECIMAL_8_2", + "chnname": "运费金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_num", + "type": "INT UNSIGNED_10", + "chnname": "订单商品总数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "订单总价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "total_postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "实际支付金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "支付邮费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "deduction_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "抵扣金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_id", + "type": "INT UNSIGNED_10", + "chnname": "优惠券id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "coupon_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "优惠券金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "paid", + "type": "TINYINT UNSIGNED_1", + "chnname": "支付状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_time", + "type": "DATETIME", + "chnname": "支付时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_type", + "type": "VARCHAR_32", + "chnname": "支付方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:已完成;-1:已退款)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_status", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 未退款 1 申请中 2 已退款", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap_img", + "type": "VARCHAR_255", + "chnname": "退款图片", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap_explain", + "type": "VARCHAR_255", + "chnname": "退款用户说明", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_time", + "type": "DATETIME", + "chnname": "退款时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason_wap", + "type": "VARCHAR_255", + "chnname": "前台退款原因", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_reason", + "type": "VARCHAR_255", + "chnname": "不退款的理由", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "退款金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_sn", + "type": "VARCHAR_100", + "chnname": "快递公司编号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_name", + "type": "VARCHAR_64", + "chnname": "快递名称/送货人姓名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_type", + "type": "VARCHAR_32", + "chnname": "发货类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "delivery_id", + "type": "VARCHAR_64", + "chnname": "快递单号/手机号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "gain_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "消费赚取积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "use_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "使用积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "back_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "给用户退了多少积分", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "CHAR_32", + "chnname": "唯一id(md5加密)类似id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remark", + "type": "VARCHAR_512", + "chnname": "管理员备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_mer_check", + "type": "TINYINT UNSIGNED_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "combination_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团产品id0一般产品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pink_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "拼团id 0没有拼团", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "秒杀产品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bargain_id", + "type": "INT UNSIGNED_10", + "chnname": "砍价id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "verify_code", + "type": "VARCHAR_50", + "chnname": "核销码", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_id", + "type": "INT_10", + "chnname": "门店id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "shipping_type", + "type": "BIT_1", + "chnname": "配送方式 1=快递 ,2=门店自提", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_channel", + "type": "TINYINT UNSIGNED_1", + "chnname": "支付渠道(0微信公众号1微信小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_remind", + "type": "TINYINT UNSIGNED_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_system_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ], + "indexs": [], + "headers": [ + { + "fieldName": "chnname", + "relationNoShow": false + }, + { + "fieldName": "name", + "relationNoShow": false + }, + { + "fieldName": "type", + "relationNoShow": false + }, + { + "fieldName": "dataType", + "relationNoShow": true + }, + { + "fieldName": "remark", + "relationNoShow": true + }, + { + "fieldName": "pk", + "relationNoShow": false + }, + { + "fieldName": "notNull", + "relationNoShow": true + }, + { + "fieldName": "autoIncrement", + "relationNoShow": true + }, + { + "fieldName": "defaultValue", + "relationNoShow": true + }, + { + "fieldName": "relationNoShow", + "relationNoShow": true + }, + { + "fieldName": "uiHint", + "relationNoShow": true + } + ] + }, + { + "title": "yx_store_order_cart_info", + "chnname": "订单购物详情表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "购物车id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cart_info", + "type": "TEXT", + "chnname": "购买东西的详细信息", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "VARCHAR_50", + "chnname": "唯一id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_order_status", + "chnname": "订单操作记录表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT UNSIGNED_20", + "chnname": "订单id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_type", + "type": "VARCHAR_32", + "chnname": "操作类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_message", + "type": "VARCHAR_256", + "chnname": "操作备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_time", + "type": "DATETIME", + "chnname": "操作时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_express", + "chnname": "快递公司表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "快递公司id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "code", + "type": "VARCHAR_50", + "chnname": "快递公司简称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_50", + "chnname": "快递公司全称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_order", + "moduleName": false, + "x": 610, + "y": 550, + "id": "0eda0dc5" + }, + { + "shape": "table", + "title": "yx_store_order_cart_info", + "moduleName": false, + "x": 1370, + "y": 70, + "id": "1412580b" + }, + { + "shape": "table", + "title": "yx_store_cart", + "moduleName": "cart", + "x": 1410, + "y": 330, + "id": "bcf3c95c" + }, + { + "shape": "table", + "title": "yx_store_order_status", + "moduleName": false, + "x": 1380, + "y": 610, + "id": "f5488e91" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "1412580b", + "target": "0eda0dc5", + "id": "6f47eff5", + "controlPoints": [ + { + "x": 1179.8701171875, + "y": 52.38333333333334 + }, + { + "x": 1074.1962890625, + "y": 32.03378378378378 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "1412580b", + "target": "bcf3c95c", + "id": "2c239ffd", + "controlPoints": [ + { + "x": 1179.8701171875, + "y": 72.51666666666668 + }, + { + "x": 1120, + "y": 70 + }, + { + "x": 1120, + "y": 210 + }, + { + "x": 1184.4970703125, + "y": 212.1209677419355 + } + ], + "sourceAnchor": 4, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "f5488e91", + "target": "0eda0dc5", + "id": "70641526", + "controlPoints": [ + { + "x": 1200.5224609375, + "y": 602.4423076923077 + }, + { + "x": 1130, + "y": 450 + }, + { + "x": 1074.1962890625, + "y": 32.03378378378378 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_order_cart_info", + "field": "oid" + }, + "to": { + "entity": "yx_store_order", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_order_status", + "field": "oid" + }, + "to": { + "entity": "yx_store_order", + "field": "id" + } + } + ] + }, + { + "name": "product", + "chnname": "商品模块", + "entities": [ + { + "title": "yx_store_product_reply", + "chnname": "评论表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "评论ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "oid", + "type": "BIGINT_19", + "chnname": "订单ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "CHAR_32", + "chnname": "唯一id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT_19", + "chnname": "产品id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "reply_type", + "type": "VARCHAR_32", + "chnname": "某种商品类型(普通商品、秒杀商品)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_score", + "type": "BIT_1", + "chnname": "商品分数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "service_score", + "type": "BIT_1", + "chnname": "服务分数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "comment", + "type": "VARCHAR_512", + "chnname": "评论内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pics", + "type": "TEXT", + "chnname": "评论图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "评论时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_reply_content", + "type": "VARCHAR_300", + "chnname": "管理员回复内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_reply_time", + "type": "DATETIME", + "chnname": "管理员回复时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "0未删除1已删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_reply", + "type": "BIT_1", + "chnname": "0未回复1已回复", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_relation", + "chnname": "商品点赞和收藏表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "类型(收藏(collect)、点赞(like))", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "category", + "type": "VARCHAR_32", + "chnname": "某种类型的商品(普通商品、秒杀商品)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr_value", + "chnname": "商品属性值表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sku", + "type": "VARCHAR_128", + "chnname": "商品属性索引值 (attr_value|attr_value[|....])", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "INT UNSIGNED_10", + "chnname": "属性对应的库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "INT UNSIGNED_10", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "属性金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_128", + "chnname": "图片", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unique", + "type": "VARCHAR_100", + "chnname": "唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bar_code", + "type": "VARCHAR_255", + "chnname": "商品条码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL_10_2", + "chnname": "原价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "weight", + "type": "DECIMAL_8_2", + "chnname": "重量", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "volume", + "type": "DECIMAL_8_2", + "chnname": "体积", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage", + "type": "DECIMAL_8_2", + "chnname": "一级返佣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage_two", + "type": "DECIMAL_8_2", + "chnname": "二级返佣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pink_price", + "type": "DECIMAL_8_2", + "chnname": "拼团价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pink_stock", + "type": "INT_10", + "chnname": "拼团库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_price", + "type": "DECIMAL_10_2", + "chnname": "秒杀价", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "seckill_stock", + "type": "INT_10", + "chnname": "秒杀库存", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr_result", + "chnname": "商品属性详情表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "result", + "type": "TEXT", + "chnname": "商品属性参数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_time", + "type": "DATETIME", + "chnname": "上次修改时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_attr", + "chnname": "商品属性表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "商品ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr_name", + "type": "VARCHAR_32", + "chnname": "属性名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "attr_values", + "type": "VARCHAR_256", + "chnname": "属性值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product", + "chnname": "商品表", + "fields": [ + { + "name": "id", + "type": "BIGINT_19", + "chnname": "商品id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_256", + "chnname": "商品图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "slider_image", + "type": "VARCHAR_2000", + "chnname": "轮播图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_128", + "chnname": "商品名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_info", + "type": "VARCHAR_256", + "chnname": "商品简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "keyword", + "type": "VARCHAR_256", + "chnname": "关键字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bar_code", + "type": "VARCHAR_15", + "chnname": "产品条码(一维码)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cate_id", + "type": "VARCHAR_64", + "chnname": "分类id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "商品价格", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "vip_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "会员价格", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ot_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "市场价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "postage", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "邮费", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "unit_name", + "type": "VARCHAR_32", + "chnname": "单位名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "SMALLINT_5", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sales", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "stock", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "库存", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "状态(0:未上架,1:上架)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "BIT_1", + "chnname": "是否热卖", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_benefit", + "type": "BIT_1", + "chnname": "是否优惠", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_best", + "type": "BIT_1", + "chnname": "是否精品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_new", + "type": "BIT_1", + "chnname": "是否新品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "description", + "type": "TEXT", + "chnname": "产品描述", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_postage", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否包邮", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_use", + "type": "TINYINT UNSIGNED_1", + "chnname": "商户是否代理 0不可代理1可代理", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "获得积分", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cost", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "成本价", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_seckill", + "type": "TINYINT UNSIGNED_1", + "chnname": "秒杀状态 0 未开启 1已开启", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_bargain", + "type": "TINYINT UNSIGNED_1", + "chnname": "砍价状态 0未开启 1开启", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_good", + "type": "BIT_1", + "chnname": "是否优品推荐", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "ficti", + "type": "MEDIUMINT_7", + "chnname": "虚拟销量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "browse", + "type": "INT_10", + "chnname": "浏览量", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "code_path", + "type": "VARCHAR_64", + "chnname": "产品二维码地址(用户小程序海报)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_sub", + "type": "BIT_1", + "chnname": "是否单独分佣", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "运费模板ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spec_type", + "type": "BIT_1", + "chnname": "规格 0单 1多", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_store_product_rule", + "chnname": "商品规则值(规格)表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "rule_name", + "type": "VARCHAR_32", + "chnname": "规格名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "rule_value", + "type": "JSON", + "chnname": "规格值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_store_product", + "moduleName": false, + "x": 390, + "y": 410, + "id": "1f2a5f58" + }, + { + "shape": "table", + "title": "yx_store_product_attr", + "moduleName": false, + "x": 970, + "y": 60, + "id": "8d021563" + }, + { + "shape": "table", + "title": "yx_store_product_attr_value", + "moduleName": false, + "x": 1090, + "y": 360, + "id": "65395cd5" + }, + { + "shape": "table", + "title": "yx_store_product_attr_result", + "moduleName": false, + "x": 1020, + "y": 660, + "id": "f65fda56" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "8d021563", + "target": "1f2a5f58", + "id": "8a5b631d", + "controlPoints": [ + { + "x": 814.5400390625, + "y": 62.52272727272727 + }, + { + "x": 698.1318359375, + "y": 42.0462962962963 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "65395cd5", + "target": "1f2a5f58", + "id": "b3c471e9", + "controlPoints": [ + { + "x": 818.958984375, + "y": 252.17424242424244 + }, + { + "x": 698.1318359375, + "y": 42.0462962962963 + } + ], + "sourceAnchor": 2, + "targetAnchor": 1 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "65395cd5", + "target": "8d021563", + "id": "76f261e2", + "controlPoints": [ + { + "x": 818.958984375, + "y": 272.2348484848485 + }, + { + "x": 750, + "y": 240 + }, + { + "x": 814.5400390625, + "y": 82.70454545454545 + } + ], + "sourceAnchor": 4, + "targetAnchor": 4 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr", + "field": "product_id" + }, + "to": { + "entity": "yx_store_product", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr_value", + "field": "product_id" + }, + "to": { + "entity": "yx_store_product", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_store_product_attr_value", + "field": "sku" + }, + "to": { + "entity": "yx_store_product_attr", + "field": "attr_name" + } + } + ] + }, + { + "name": "shop", + "chnname": "商户模块", + "entities": [ + { + "title": "yx_material_group", + "chnname": "素材分组", + "fields": [ + { + "name": "id", + "type": "VARCHAR_32", + "chnname": "PK", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_id", + "type": "VARCHAR_32", + "chnname": "创建者ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_200", + "chnname": "分组名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_attachment", + "chnname": "附件管理表", + "fields": [ + { + "name": "att_id", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "附件名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_dir", + "type": "VARCHAR_200", + "chnname": "附件路径", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "satt_dir", + "type": "VARCHAR_200", + "chnname": "压缩图片路径", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_size", + "type": "CHAR_30", + "chnname": "附件大小", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "att_type", + "type": "CHAR_30", + "chnname": "附件类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pid", + "type": "INT_10", + "chnname": "分类ID0编辑器,1产品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image_type", + "type": "TINYINT UNSIGNED_1", + "chnname": "图片上传类型 1本地 2七牛云 3OSS 4COS ", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "module_type", + "type": "TINYINT UNSIGNED_1", + "chnname": "图片上传模块类型 1 后台上传 2 用户生成", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "invite_code", + "type": "VARCHAR_50", + "chnname": "邀请码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_config", + "chnname": "配置表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "配置id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "menu_name", + "type": "VARCHAR_255", + "chnname": "字段名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "VARCHAR_5000", + "chnname": "默认值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_group_data", + "chnname": "组合数据详情表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "组合数据详情ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "group_name", + "type": "VARCHAR_100", + "chnname": "对应的数据名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "value", + "type": "TEXT", + "chnname": "数据组对应的数据值(json数据)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加数据时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "数据排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "状态(1:开启;2:关闭;)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_store", + "chnname": "门店自提", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "门店名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "introduction", + "type": "VARCHAR_1000", + "chnname": "简介", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_25", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_255", + "chnname": "省市区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "detailed_address", + "type": "VARCHAR_255", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "门店logo", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "latitude", + "type": "CHAR_25", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "longitude", + "type": "CHAR_25", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time", + "type": "VARCHAR_100", + "chnname": "核销有效日期", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time", + "type": "VARCHAR_100", + "chnname": "每日营业开关时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time_end", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "day_time_start", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time_end", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time_start", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_store_staff", + "chnname": "门店店员表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "微信用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "avatar", + "type": "VARCHAR_255", + "chnname": "店员头像", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_id", + "type": "INT_10", + "chnname": "门店id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "store_name", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "staff_name", + "type": "VARCHAR_64", + "chnname": "店员名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_15", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "verify_status", + "type": "TINYINT_3", + "chnname": "核销开关", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_user_level", + "chnname": "设置用户等级表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "会员名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "money", + "type": "DECIMAL_8_2", + "chnname": "购买金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_date", + "type": "INT_10", + "chnname": "有效时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_forever", + "type": "BIT_1", + "chnname": "是否为永久会员", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_pay", + "type": "BIT_1", + "chnname": "是否购买,1=购买,0=不购买", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示 1=显示,0=隐藏", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "grade", + "type": "INT_10", + "chnname": "会员等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "discount", + "type": "DECIMAL_8_2", + "chnname": "享受折扣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image", + "type": "VARCHAR_255", + "chnname": "会员卡背景", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "icon", + "type": "VARCHAR_255", + "chnname": "会员图标", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "explain", + "type": "TEXT", + "chnname": "说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除.1=删除,0=未删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_material", + "chnname": "素材库", + "fields": [ + { + "name": "id", + "type": "VARCHAR_32", + "chnname": "PK", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "创建时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_id", + "type": "VARCHAR_100", + "chnname": "创建者ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "CHAR_2", + "chnname": "类型1、图片;2、视频", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "group_id", + "type": "VARCHAR_32", + "chnname": "分组ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_200", + "chnname": "素材名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_500", + "chnname": "素材链接", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_material", + "moduleName": false, + "x": 442.359375, + "y": 277, + "id": "fe721315" + }, + { + "shape": "table", + "title": "yx_material_group", + "moduleName": false, + "x": 887.359375, + "y": 279, + "id": "f3be72cb" + }, + { + "shape": "table", + "title": "yx_system_store", + "moduleName": false, + "x": 326.359375, + "y": 624, + "id": "396a35b0" + }, + { + "shape": "table", + "title": "yx_system_store_staff", + "moduleName": false, + "x": 870, + "y": 590, + "id": "c3935d4a" + } + ], + "edges": [ + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "fe721315", + "target": "f3be72cb", + "id": "e1f3d02d", + "controlPoints": [ + { + "x": 623.05859375, + "y": 283.9775132275132 + }, + { + "x": 743.333984375, + "y": 241.25 + } + ], + "sourceAnchor": 9, + "targetAnchor": 0 + }, + { + "shape": "erdRelation", + "relation": "0,n:1", + "source": "c3935d4a", + "target": "396a35b0", + "id": "5bfc667b", + "controlPoints": [ + { + "x": 699.7900390625, + "y": 558.5457559681697 + }, + { + "x": 517.833984375, + "y": 456.0914634146342 + } + ], + "sourceAnchor": 8, + "targetAnchor": 1 + } + ] + }, + "associations": [ + { + "relation": "0,n:1", + "from": { + "entity": "yx_material", + "field": "group_id" + }, + "to": { + "entity": "yx_material_group", + "field": "id" + } + }, + { + "relation": "0,n:1", + "from": { + "entity": "yx_system_store_staff", + "field": "store_id" + }, + "to": { + "entity": "yx_system_store", + "field": "id" + } + } + ] + }, + { + "name": "template", + "chnname": "运费模板", + "entities": [ + { + "title": "yx_shipping_templates", + "chnname": "运费模板表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "模板ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "模板名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "region_info", + "type": "TEXT", + "chnname": "地域以及费用", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "appoint", + "type": "BIT_1", + "chnname": "指定包邮开关", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "appoint_info", + "type": "TEXT", + "chnname": "指定包邮内容", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_shipping_templates_free", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "编号", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "province_id", + "type": "INT_10", + "chnname": "省ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "DECIMAL_10_2", + "chnname": "包邮件数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL_10_2", + "chnname": "包邮金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uniqid", + "type": "VARCHAR_32", + "chnname": "分组唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_city", + "chnname": "城市表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "INT_10", + "chnname": "省市级别", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "parent_id", + "type": "INT_10", + "chnname": "父级id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "area_code", + "type": "VARCHAR_30", + "chnname": "区号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_100", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merger_name", + "type": "VARCHAR_255", + "chnname": "合并名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "lng", + "type": "VARCHAR_50", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "lat", + "type": "VARCHAR_50", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否展示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_shipping_templates_region", + "chnname": "", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "编号", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "province_id", + "type": "INT_10", + "chnname": "省ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temp_id", + "type": "INT_10", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "城市ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "first", + "type": "DECIMAL_10_2", + "chnname": "首件", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "first_price", + "type": "DECIMAL_10_2", + "chnname": "首件运费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "continues", + "type": "DECIMAL_10_2", + "chnname": "续件", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "continue_price", + "type": "DECIMAL_10_2", + "chnname": "续件运费", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "计费方式", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uniqid", + "type": "VARCHAR_50", + "chnname": "分组唯一值", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [ + { + "shape": "table", + "title": "yx_shipping_templates", + "moduleName": false, + "x": 680, + "y": 380, + "id": "c8177992" + }, + { + "shape": "table", + "title": "yx_system_city", + "moduleName": false, + "x": 290, + "y": 260, + "id": "f3f8204a" + }, + { + "shape": "table", + "title": "yx_shipping_templates_free", + "moduleName": false, + "x": 1080, + "y": 190, + "id": "ac873dd5" + }, + { + "shape": "table", + "title": "yx_shipping_templates_region", + "moduleName": false, + "x": 1080, + "y": 540, + "id": "7ca63a1e" + } + ], + "edges": [] + }, + "associations": [] + }, + { + "name": "sys_user", + "chnname": "用户模块", + "entities": [ + { + "title": "yx_user_bill", + "chnname": "用户账单表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户账单id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_id", + "type": "VARCHAR_32", + "chnname": "关联id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pm", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 = 支出 1 = 获得", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_64", + "chnname": "账单标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "category", + "type": "VARCHAR_64", + "chnname": "明细种类", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_64", + "chnname": "明细类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "明细数字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "剩余", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "0 = 带确定 1 = 有效 -1 = 无效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_level", + "chnname": "用户等级记录表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level_id", + "type": "INT_10", + "chnname": "等级vip", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "grade", + "type": "INT_10", + "chnname": "会员等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "valid_time", + "type": "INT_10", + "chnname": "过期时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_forever", + "type": "BIT_1", + "chnname": "是否永久", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "0:禁止,1:正常", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_255", + "chnname": "备注", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "remind", + "type": "BIT_1", + "chnname": "是否已通知", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "是否删除,0=未删除,1=删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "discount", + "type": "INT_10", + "chnname": "享受折扣", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_task_finish", + "chnname": "用户任务完成记录表", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "task_id", + "type": "INT_10", + "chnname": "任务id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "是否有效", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_sign", + "chnname": "签到记录表", + "fields": [ + { + "name": "int", + "type": "BIGINT_19", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "用户uid", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "签到说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "INT_10", + "chnname": "获得积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "INT_10", + "chnname": "剩余积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_recharge", + "chnname": "用户充值表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT_19", + "chnname": "充值用户UID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_50", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "order_id", + "type": "VARCHAR_32", + "chnname": "订单号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "DECIMAL_8_2", + "chnname": "充值金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "give_price", + "type": "DECIMAL_8_2", + "chnname": "购买赠送金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "recharge_type", + "type": "VARCHAR_32", + "chnname": "充值类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "paid", + "type": "BIT_1", + "chnname": "是否充值", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_time", + "type": "DATETIME", + "chnname": "充值支付时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "充值时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "refund_price", + "type": "DECIMAL_10_2", + "chnname": "退款金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT_3", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_address", + "chnname": "用户地址表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户地址id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_32", + "chnname": "收货人姓名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "VARCHAR_16", + "chnname": "收货人电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "province", + "type": "VARCHAR_64", + "chnname": "收货人所在省", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city", + "type": "VARCHAR_64", + "chnname": "收货人所在市", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city_id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "district", + "type": "VARCHAR_64", + "chnname": "收货人所在区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "detail", + "type": "VARCHAR_256", + "chnname": "收货人详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "post_code", + "type": "VARCHAR_20", + "chnname": "邮编", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "longitude", + "type": "VARCHAR_16", + "chnname": "经度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "latitude", + "type": "VARCHAR_16", + "chnname": "纬度", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_default", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否默认", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_group", + "chnname": "用户分组表", + "fields": [ + { + "name": "id", + "type": "SMALLINT UNSIGNED_5", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "group_name", + "type": "VARCHAR_64", + "chnname": "用户分组名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_extract", + "chnname": "用户提现表", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_64", + "chnname": "名称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extract_type", + "type": "VARCHAR_32", + "chnname": "bank = 银行卡 alipay = 支付宝wx=微信", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bank_code", + "type": "VARCHAR_32", + "chnname": "银行卡", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "bank_address", + "type": "VARCHAR_256", + "chnname": "开户地址", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "alipay_code", + "type": "VARCHAR_64", + "chnname": "支付宝账号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "extract_price", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "提现金额", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_512", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "balance", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_msg", + "type": "VARCHAR_128", + "chnname": "无效原因", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "-1 未通过 0 审核中 1 已提现", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "wechat", + "type": "VARCHAR_15", + "chnname": "微信号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user_enter", + "chnname": "商户申请表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "商户申请ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "uid", + "type": "INT UNSIGNED_10", + "chnname": "用户ID", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "province", + "type": "VARCHAR_32", + "chnname": "商户所在省", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "city", + "type": "VARCHAR_32", + "chnname": "商户所在市", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "district", + "type": "VARCHAR_32", + "chnname": "商户所在区", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "address", + "type": "VARCHAR_256", + "chnname": "商户详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "merchant_name", + "type": "VARCHAR_256", + "chnname": "商户名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_user", + "type": "VARCHAR_32", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "link_tel", + "type": "VARCHAR_16", + "chnname": "商户电话", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "charter", + "type": "VARCHAR_512", + "chnname": "商户证书", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT UNSIGNED_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "apply_time", + "type": "INT UNSIGNED_10", + "chnname": "审核时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "success_time", + "type": "INT_10", + "chnname": "通过时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_message", + "type": "VARCHAR_256", + "chnname": "未通过原因", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "fail_time", + "type": "INT UNSIGNED_10", + "chnname": "未通过时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "-1 审核未通过 0未审核 1审核通过", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_lock", + "type": "TINYINT UNSIGNED_1", + "chnname": "0 = 开启 1= 关闭", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否删除", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_system_user_task", + "chnname": "等级任务设置", + "fields": [ + { + "name": "id", + "type": "INT_10", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "任务名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_255", + "chnname": "配置原名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "task_type", + "type": "VARCHAR_50", + "chnname": "任务类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "number", + "type": "INT_10", + "chnname": "限定数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level_id", + "type": "INT_10", + "chnname": "等级id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_show", + "type": "BIT_1", + "chnname": "是否显示", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_must", + "type": "BIT_1", + "chnname": "是否务必达成任务,1务必达成,0=满足其一", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "illustrate", + "type": "VARCHAR_255", + "chnname": "任务说明", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "新增时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_user", + "chnname": "用户表", + "fields": [ + { + "name": "uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "用户id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "username", + "type": "VARCHAR_255", + "chnname": "用户账户(跟accout一样)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "password", + "type": "VARCHAR_255", + "chnname": "用户密码(跟pwd)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "real_name", + "type": "VARCHAR_25", + "chnname": "真实姓名", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "birthday", + "type": "INT_10", + "chnname": "生日", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "card_id", + "type": "VARCHAR_20", + "chnname": "身份证号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mark", + "type": "VARCHAR_255", + "chnname": "用户备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "partner_id", + "type": "INT_10", + "chnname": "合伙人id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "group_id", + "type": "INT_10", + "chnname": "用户分组id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "nickname", + "type": "VARCHAR_100", + "chnname": "用户昵称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "avatar", + "type": "VARCHAR_256", + "chnname": "用户头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "phone", + "type": "CHAR_15", + "chnname": "手机号码", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_ip", + "type": "VARCHAR_16", + "chnname": "添加ip", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "最后一次登录时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "last_ip", + "type": "VARCHAR_16", + "chnname": "最后一次登录ip", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "now_money", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户余额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "brokerage_price", + "type": "DECIMAL_8_2", + "chnname": "佣金金额", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "integral", + "type": "DECIMAL UNSIGNED_8_2", + "chnname": "用户剩余积分", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sign_num", + "type": "INT_10", + "chnname": "连续签到天数", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "BIT_1", + "chnname": "1为正常,0为禁止", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "level", + "type": "TINYINT UNSIGNED_3", + "chnname": "等级", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_uid", + "type": "BIGINT UNSIGNED_20", + "chnname": "推广元id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_time", + "type": "DATETIME", + "chnname": "推广员关联时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "user_type", + "type": "VARCHAR_32", + "chnname": "用户类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_promoter", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否为推广员", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "pay_count", + "type": "INT UNSIGNED_10", + "chnname": "用户购买次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "spread_count", + "type": "INT_10", + "chnname": "下级人数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "addres", + "type": "VARCHAR_255", + "chnname": "详细地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "adminid", + "type": "INT UNSIGNED_10", + "chnname": "管理员编号 ", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "login_type", + "type": "VARCHAR_36", + "chnname": "用户登陆类型,h5,wechat,routine", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "wx_profile", + "type": "JSON", + "chnname": "微信用户json信息", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + } + }, + { + "name": "wechat", + "chnname": "微信模块", + "entities": [ + { + "title": "yx_wechat_reply", + "chnname": "微信关键字回复表", + "fields": [ + { + "name": "id", + "type": "MEDIUMINT UNSIGNED_8", + "chnname": "微信关键字回复id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "key", + "type": "VARCHAR_64", + "chnname": "关键字", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_32", + "chnname": "回复类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "data", + "type": "TEXT", + "chnname": "回复数据", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "0=不可用 1 =可用", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hide", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_menu", + "chnname": "微信缓存表", + "fields": [ + { + "name": "key", + "type": "VARCHAR_32", + "chnname": "", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "result", + "type": "TEXT", + "chnname": "缓存数据", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT_10", + "chnname": "缓存时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_media", + "chnname": "微信回复表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "微信视频音频id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_16", + "chnname": "回复类型", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "path", + "type": "VARCHAR_128", + "chnname": "文件路径", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "media_id", + "type": "VARCHAR_64", + "chnname": "微信服务器返回的id", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_256", + "chnname": "地址", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "temporary", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否永久或者临时 0永久1临时", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "add_time", + "type": "INT UNSIGNED_10", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_article", + "chnname": "文章管理表", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "文章管理ID", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "cid", + "type": "VARCHAR_255", + "chnname": "分类id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "title", + "type": "VARCHAR_255", + "chnname": "文章标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "author", + "type": "VARCHAR_255", + "chnname": "文章作者", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "image_input", + "type": "VARCHAR_255", + "chnname": "文章图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "synopsis", + "type": "VARCHAR_255", + "chnname": "文章简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "TEXT", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share_title", + "type": "VARCHAR_255", + "chnname": "文章分享标题", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share_synopsis", + "type": "VARCHAR_255", + "chnname": "文章分享简介", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "visit", + "type": "VARCHAR_255", + "chnname": "浏览次数", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "sort", + "type": "INT UNSIGNED_10", + "chnname": "排序", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_255", + "chnname": "原文链接", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT UNSIGNED_1", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "hide", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否隐藏", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "admin_id", + "type": "INT UNSIGNED_10", + "chnname": "管理员id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "mer_id", + "type": "INT UNSIGNED_10", + "chnname": "商户id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "INT_10", + "chnname": "产品关联id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_hot", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否热门(小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_banner", + "type": "TINYINT UNSIGNED_1", + "chnname": "是否轮播图(小程序)", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_template", + "chnname": "微信模板", + "fields": [ + { + "name": "id", + "type": "INT UNSIGNED_10", + "chnname": "模板id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": true, + "defaultValue": "" + }, + { + "name": "tempkey", + "type": "CHAR_50", + "chnname": "模板编号", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "CHAR_100", + "chnname": "模板名", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "content", + "type": "VARCHAR_1000", + "chnname": "回复内容", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "tempid", + "type": "CHAR_100", + "chnname": "模板ID", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "update_time", + "type": "DATETIME", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "status", + "type": "TINYINT_3", + "chnname": "状态", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "VARCHAR_30", + "chnname": "类型:template:模板消息 subscribe:订阅消息", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_live_goods", + "chnname": "微信直播商品表", + "fields": [ + { + "name": "goods_id", + "type": "BIGINT_19", + "chnname": "直播商品id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "BIGINT_19", + "chnname": "关联商品id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cover_imge_url", + "type": "VARCHAR_255", + "chnname": "商品图片", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "url", + "type": "VARCHAR_64", + "chnname": "商品小程序路径", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price_type", + "type": "VARCHAR_255", + "chnname": "价格类型 1:一口价(只需要传入price,price2不传) 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传) 3:显示折扣价(price字段为原价,price2字段为现价, price和price2必传)", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price", + "type": "VARCHAR_64", + "chnname": "", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "price2", + "type": "VARCHAR_64", + "chnname": "", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "商品名称", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "third_party_tag", + "type": "VARCHAR_255", + "chnname": "1, 2:表示是为api添加商品,否则是直播控制台添加的商品", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "audit_id", + "type": "BIGINT_19", + "chnname": "审核单id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "audit_status", + "type": "INT UNSIGNED_10", + "chnname": "审核状态 0:未审核,1:审核中,2:审核通过,3审核失败", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + }, + { + "title": "yx_wechat_live", + "chnname": "微信直播表", + "fields": [ + { + "name": "room_id", + "type": "BIGINT_19", + "chnname": "直播间id", + "remark": "", + "pk": true, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "name", + "type": "VARCHAR_255", + "chnname": "直播间标题", + "remark": "", + "pk": false, + "notNull": true, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "cover_imge", + "type": "VARCHAR_255", + "chnname": "背景图", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "share_imge", + "type": "VARCHAR_255", + "chnname": "分享图片", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "live_status", + "type": "INT_10", + "chnname": "直播间状态", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "start_time", + "type": "BIGINT_19", + "chnname": "开始时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "end_time", + "type": "BIGINT_19", + "chnname": "预计结束时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "anchor_name", + "type": "VARCHAR_64", + "chnname": "主播昵称", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "anchor_wechat", + "type": "VARCHAR_32", + "chnname": "主播微信号", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "anchor_imge", + "type": "VARCHAR_255", + "chnname": "主播头像", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "type", + "type": "BIT_1", + "chnname": "直播间类型 1:推流 0:手机直播", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "screen_type", + "type": "BIT_1", + "chnname": "横屏、竖屏 【1:横屏,0:竖屏】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_like", + "type": "BIT_1", + "chnname": "是否关闭点赞 【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_comment", + "type": "BIT_1", + "chnname": "是否关闭评论 【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_goods", + "type": "BIT_1", + "chnname": "是否关闭货架 【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "product_id", + "type": "VARCHAR_255", + "chnname": "商品id 多个,分割", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_replay", + "type": "BIT_1", + "chnname": "是否关闭回放【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_share", + "type": "BIT_1", + "chnname": "是否关闭分享【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "close_kf", + "type": "BIT_1", + "chnname": "是否关闭客服【0:开启,1:关闭】", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ] + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + }, + { + "name": "after_sales", + "chnname": "售后", + "entities": [ + { + "title": "yx_store_after_sales", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "remark": "", + "chnname": "", + "pk": true, + "notNull": true, + "autoIncrement": true + }, + { + "name": "order_code", + "type": "BIGINT UNSIGNED_20", + "remark": "", + "chnname": "订单号" + }, + { + "name": "refund_amount", + "type": "Money", + "remark": "", + "chnname": "退款金额" + }, + { + "name": "service_type", + "type": "YesNo", + "remark": "", + "chnname": "服务类型0仅退款1退货退款" + }, + { + "name": "reasons", + "type": "MiddleString", + "remark": "", + "chnname": "申请原因" + }, + { + "name": "explain", + "type": "LongText", + "remark": "", + "chnname": "说明" + }, + { + "name": "explain_img", + "type": "LongText", + "remark": "", + "chnname": "说明图片->多个用逗号分割" + }, + { + "name": "delivery_sn", + "type": "DefaultString", + "remark": "", + "chnname": "物流单号" + }, + { + "name": "delivery_name", + "type": "DefaultString", + "remark": "", + "chnname": "物流名称" + }, + { + "name": "state", + "type": "DefaultString", + "remark": "", + "chnname": "状态" + }, + { + "name": "create_time", + "type": "DATETIME", + "chnname": "添加时间", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "逻辑删除", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ], + "indexs": [], + "headers": [ + { + "fieldName": "chnname", + "relationNoShow": false + }, + { + "fieldName": "name", + "relationNoShow": false + }, + { + "fieldName": "type", + "relationNoShow": false + }, + { + "fieldName": "dataType", + "relationNoShow": true + }, + { + "fieldName": "remark", + "relationNoShow": true + }, + { + "fieldName": "pk", + "relationNoShow": false + }, + { + "fieldName": "notNull", + "relationNoShow": true + }, + { + "fieldName": "autoIncrement", + "relationNoShow": true + }, + { + "fieldName": "defaultValue", + "relationNoShow": true + }, + { + "fieldName": "relationNoShow", + "relationNoShow": true + }, + { + "fieldName": "uiHint", + "relationNoShow": true + } + ], + "chnname": "售后记录表" + }, + { + "title": "yx_store_after_sales_item", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "remark": "", + "chnname": "主键id", + "pk": true, + "notNull": true, + "autoIncrement": true + }, + { + "name": "store_after_sales_id", + "type": "BIGINT UNSIGNED_20", + "remark": "", + "chnname": "售后id" + }, + { + "name": "product_id", + "type": "BIGINT UNSIGNED_20", + "remark": "", + "chnname": "商品id" + }, + { + "name": "cart_info", + "type": "DefaultString", + "remark": "", + "chnname": "退货东西的详情信息" + }, + { + "name": "is_del", + "type": "BIT_1", + "chnname": "逻辑删除", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + } + ], + "indexs": [], + "headers": [ + { + "fieldName": "chnname", + "relationNoShow": false + }, + { + "fieldName": "name", + "relationNoShow": false + }, + { + "fieldName": "type", + "relationNoShow": false + }, + { + "fieldName": "dataType", + "relationNoShow": true + }, + { + "fieldName": "remark", + "relationNoShow": true + }, + { + "fieldName": "pk", + "relationNoShow": false + }, + { + "fieldName": "notNull", + "relationNoShow": true + }, + { + "fieldName": "autoIncrement", + "relationNoShow": true + }, + { + "fieldName": "defaultValue", + "relationNoShow": true + }, + { + "fieldName": "relationNoShow", + "relationNoShow": true + }, + { + "fieldName": "uiHint", + "relationNoShow": true + } + ], + "chnname": "售后子表" + }, + { + "title": "yx_store_after_sales_status", + "fields": [ + { + "name": "id", + "type": "BIGINT UNSIGNED_20", + "remark": "", + "chnname": "", + "pk": true, + "notNull": true, + "autoIncrement": true + }, + { + "name": "store_after_sales_id", + "type": "BIGINT UNSIGNED_20", + "chnname": "售后id", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_type", + "type": "DefaultString", + "chnname": "操作类型", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_message", + "type": "ShortString", + "chnname": "操作备注", + "remark": "", + "pk": false, + "notNull": false, + "autoIncrement": false, + "defaultValue": "" + }, + { + "name": "change_time", + "type": "DateTime", + "remark": "", + "chnname": "操作时间" + }, + { + "name": "operator", + "type": "DefaultString", + "remark": "", + "chnname": "操作人" + } + ], + "indexs": [], + "headers": [ + { + "fieldName": "chnname", + "relationNoShow": false + }, + { + "fieldName": "name", + "relationNoShow": false + }, + { + "fieldName": "type", + "relationNoShow": false + }, + { + "fieldName": "dataType", + "relationNoShow": true + }, + { + "fieldName": "remark", + "relationNoShow": true + }, + { + "fieldName": "pk", + "relationNoShow": false + }, + { + "fieldName": "notNull", + "relationNoShow": true + }, + { + "fieldName": "autoIncrement", + "relationNoShow": true + }, + { + "fieldName": "defaultValue", + "relationNoShow": true + }, + { + "fieldName": "relationNoShow", + "relationNoShow": true + }, + { + "fieldName": "uiHint", + "relationNoShow": true + } + ], + "chnname": "售后订单操作详情表" + } + ], + "graphCanvas": { + "nodes": [], + "edges": [] + }, + "associations": [] + } + ], + "dataTypeDomains": { + "datatype": [ + { + "name": "默认字串", + "code": "DefaultString", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(32)" + }, + "ORACLE": { + "type": "NVARCHAR2(32)" + }, + "SQLServer": { + "type": "NVARCHAR(32)" + }, + "PostgreSQL": { + "type": "VARCHAR(32)" + } + } + }, + { + "name": "标识号", + "code": "IdOrKey", + "apply": { + "JAVA": { + "type": "String" + }, + "ORACLE": { + "type": "VARCHAR2(32)" + }, + "MYSQL": { + "type": "VARCHAR(32)" + }, + "SQLServer": { + "type": "VARCHAR(32)" + }, + "PostgreSQL": { + "type": "VARCHAR(32)" + } + } + }, + { + "name": "标识号-长", + "code": "LongKey", + "apply": { + "MYSQL": { + "type": "VARCHAR(64)" + }, + "ORACLE": { + "type": "VARCHAR2(64)" + }, + "JAVA": { + "type": "String" + }, + "SQLServer": { + "type": "VARCHAR(64)" + }, + "PostgreSQL": { + "type": "VARCHAR(64)" + } + } + }, + { + "name": "名称", + "code": "Name", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(128)" + }, + "ORACLE": { + "type": "NVARCHAR2(128)" + }, + "SQLServer": { + "type": "NVARCHAR(128)" + }, + "PostgreSQL": { + "type": "VARCHAR(128)" + } + } + }, + { + "name": "备注说明", + "code": "Intro", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(512)" + }, + "ORACLE": { + "type": "NVARCHAR2(512)" + }, + "SQLServer": { + "type": "NVARCHAR(512)" + }, + "PostgreSQL": { + "type": "VARCHAR(512)" + } + } + }, + { + "name": "字串-短", + "code": "ShortString", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(128)" + }, + "ORACLE": { + "type": "NVARCHAR2(128)" + }, + "SQLServer": { + "type": "NVARCHAR(128)" + }, + "PostgreSQL": { + "type": "VARCHAR(128)" + } + } + }, + { + "name": "字串-中", + "code": "MiddleString", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(1024)" + }, + "ORACLE": { + "type": "NVARCHAR2(1024)" + }, + "SQLServer": { + "type": "NVARCHAR(1024)" + }, + "PostgreSQL": { + "type": "VARCHAR(1024)" + } + } + }, + { + "name": "字串-长", + "code": "LongString", + "apply": { + "JAVA": { + "type": "String" + }, + "ORACLE": { + "type": "NVARCHAR2(3072)" + }, + "MYSQL": { + "type": "VARCHAR(3072)" + }, + "SQLServer": { + "type": "NVARCHAR(3072)" + }, + "PostgreSQL": { + "type": "VARCHAR(3072)" + } + } + }, + { + "name": "大文本", + "code": "LongText", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "TEXT" + }, + "ORACLE": { + "type": "CLOB" + }, + "SQLServer": { + "type": "NTEXT" + }, + "PostgreSQL": { + "type": "TEXT" + } + } + }, + { + "name": "小数", + "code": "Double", + "apply": { + "JAVA": { + "type": "Double" + }, + "MYSQL": { + "type": "DECIMAL(32,10)" + }, + "ORACLE": { + "type": "NUMBER(32,10)" + }, + "SQLServer": { + "type": "DECIMAL(32,10)" + }, + "PostgreSQL": { + "type": "DECIMAL(32,10)" + } + } + }, + { + "name": "比例", + "code": "Ratio", + "apply": { + "MYSQL": { + "type": "DECIMAL(4,2)" + }, + "JAVA": { + "type": "Double" + }, + "ORACLE": { + "type": "NUMBER(4,2)" + }, + "SQLServer": { + "type": "DECIMAL(4,2)" + }, + "PostgreSQL": { + "type": "DECIMAL(4,2)" + } + } + }, + { + "name": "整数", + "code": "Integer", + "apply": { + "JAVA": { + "type": "Integer" + }, + "MYSQL": { + "type": "INT" + }, + "ORACLE": { + "type": "INT" + }, + "SQLServer": { + "type": "INT" + }, + "PostgreSQL": { + "type": "INT" + } + } + }, + { + "name": "大整数", + "code": "BigInt", + "apply": { + "MYSQL": { + "type": "BIGINT" + }, + "JAVA": { + "type": "Long" + }, + "ORACLE": { + "type": "NUMBER" + }, + "SQLServer": { + "type": "BIGINT" + }, + "PostgreSQL": { + "type": "BIGINT" + } + } + }, + { + "name": "金额", + "code": "Money", + "apply": { + "JAVA": { + "type": "Double" + }, + "MYSQL": { + "type": "DECIMAL(32,8)" + }, + "ORACLE": { + "type": "NUMBER(32,8)" + }, + "SQLServer": { + "type": "DECIMAL(32,8)" + }, + "PostgreSQL": { + "type": "DECIMAL(32,8)" + } + } + }, + { + "name": "是否", + "code": "YesNo", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(1)" + }, + "ORACLE": { + "type": "VARCHAR2(1)" + }, + "SQLServer": { + "type": "VARCHAR(1)" + }, + "PostgreSQL": { + "type": "VARCHAR(1)" + } + } + }, + { + "name": "数据字典", + "code": "Dict", + "apply": { + "JAVA": { + "type": "String" + }, + "MYSQL": { + "type": "VARCHAR(32)" + }, + "ORACLE": { + "type": "VARCHAR2(32)" + }, + "SQLServer": { + "type": "VARCHAR(32)" + }, + "PostgreSQL": { + "type": "VARCHAR(32)" + } + } + }, + { + "name": "日期", + "code": "Date", + "apply": { + "JAVA": { + "type": "Date" + }, + "MYSQL": { + "type": "DATE" + }, + "ORACLE": { + "type": "DATE" + }, + "SQLServer": { + "type": "DATE" + }, + "PostgreSQL": { + "type": "DATE" + } + } + }, + { + "name": "日期时间", + "code": "DateTime", + "apply": { + "JAVA": { + "type": "Date" + }, + "MYSQL": { + "type": "DATETIME" + }, + "ORACLE": { + "type": "DATE" + }, + "SQLServer": { + "type": "DATE" + }, + "PostgreSQL": { + "type": "DATE" + } + } + }, + { + "name": "单字符", + "code": "Char", + "apply": { + "MYSQL": { + "type": "CHAR(1)" + }, + "ORACLE": { + "type": "CHAR(1)" + }, + "JAVA": { + "type": "String" + }, + "SQLServer": { + "type": "CHAR(1)" + }, + "PostgreSQL": { + "type": "CHAR(1)" + } + } + }, + { + "name": "BIGINT UNSIGNED_20", + "code": "BIGINT UNSIGNED_20", + "apply": { + "MYSQL": { + "type": "BIGINT UNSIGNED(20)" + } + } + }, + { + "name": "BIGINT_19", + "code": "BIGINT_19", + "apply": { + "MYSQL": { + "type": "BIGINT(19)" + } + } + }, + { + "name": "BIT_1", + "code": "BIT_1", + "apply": { + "MYSQL": { + "type": "BIT(1)" + } + } + }, + { + "name": "CHAR_100", + "code": "CHAR_100", + "apply": { + "MYSQL": { + "type": "CHAR(100)" + } + } + }, + { + "name": "CHAR_15", + "code": "CHAR_15", + "apply": { + "MYSQL": { + "type": "CHAR(15)" + } + } + }, + { + "name": "CHAR_2", + "code": "CHAR_2", + "apply": { + "MYSQL": { + "type": "CHAR(2)" + } + } + }, + { + "name": "CHAR_25", + "code": "CHAR_25", + "apply": { + "MYSQL": { + "type": "CHAR(25)" + } + } + }, + { + "name": "CHAR_30", + "code": "CHAR_30", + "apply": { + "MYSQL": { + "type": "CHAR(30)" + } + } + }, + { + "name": "CHAR_32", + "code": "CHAR_32", + "apply": { + "MYSQL": { + "type": "CHAR(32)" + } + } + }, + { + "name": "CHAR_50", + "code": "CHAR_50", + "apply": { + "MYSQL": { + "type": "CHAR(50)" + } + } + }, + { + "name": "DATE", + "code": "DATE", + "apply": { + "MYSQL": { + "type": "DATE" + } + } + }, + { + "name": "DATETIME", + "code": "DATETIME", + "apply": { + "MYSQL": { + "type": "DATETIME" + } + } + }, + { + "name": "DECIMAL UNSIGNED_10_2", + "code": "DECIMAL UNSIGNED_10_2", + "apply": { + "MYSQL": { + "type": "DECIMAL UNSIGNED(10,2)" + } + } + }, + { + "name": "DECIMAL UNSIGNED_8_2", + "code": "DECIMAL UNSIGNED_8_2", + "apply": { + "MYSQL": { + "type": "DECIMAL UNSIGNED(8,2)" + } + } + }, + { + "name": "DECIMAL_10_2", + "code": "DECIMAL_10_2", + "apply": { + "MYSQL": { + "type": "DECIMAL(10,2)" + } + } + }, + { + "name": "DECIMAL_8_2", + "code": "DECIMAL_8_2", + "apply": { + "MYSQL": { + "type": "DECIMAL(8,2)" + } + } + }, + { + "name": "DOUBLE_22", + "code": "DOUBLE_22", + "apply": { + "MYSQL": { + "type": "DOUBLE(22)" + } + } + }, + { + "name": "INT UNSIGNED_10", + "code": "INT UNSIGNED_10", + "apply": { + "MYSQL": { + "type": "INT UNSIGNED(10)" + } + } + }, + { + "name": "INT_10", + "code": "INT_10", + "apply": { + "MYSQL": { + "type": "INT(10)" + } + } + }, + { + "name": "JSON", + "code": "JSON", + "apply": { + "MYSQL": { + "type": "JSON" + } + } + }, + { + "name": "MEDIUMINT UNSIGNED_8", + "code": "MEDIUMINT UNSIGNED_8", + "apply": { + "MYSQL": { + "type": "MEDIUMINT UNSIGNED(8)" + } + } + }, + { + "name": "MEDIUMINT_7", + "code": "MEDIUMINT_7", + "apply": { + "MYSQL": { + "type": "MEDIUMINT(7)" + } + } + }, + { + "name": "SMALLINT UNSIGNED_5", + "code": "SMALLINT UNSIGNED_5", + "apply": { + "MYSQL": { + "type": "SMALLINT UNSIGNED(5)" + } + } + }, + { + "name": "SMALLINT_5", + "code": "SMALLINT_5", + "apply": { + "MYSQL": { + "type": "SMALLINT(5)" + } + } + }, + { + "name": "TEXT", + "code": "TEXT", + "apply": { + "MYSQL": { + "type": "TEXT" + } + } + }, + { + "name": "TINYINT UNSIGNED_1", + "code": "TINYINT UNSIGNED_1", + "apply": { + "MYSQL": { + "type": "TINYINT UNSIGNED(1)" + } + } + }, + { + "name": "TINYINT UNSIGNED_3", + "code": "TINYINT UNSIGNED_3", + "apply": { + "MYSQL": { + "type": "TINYINT UNSIGNED(3)" + } + } + }, + { + "name": "TINYINT_3", + "code": "TINYINT_3", + "apply": { + "MYSQL": { + "type": "TINYINT(3)" + } + } + }, + { + "name": "VARCHAR_100", + "code": "VARCHAR_100", + "apply": { + "MYSQL": { + "type": "VARCHAR(100)" + } + } + }, + { + "name": "VARCHAR_1000", + "code": "VARCHAR_1000", + "apply": { + "MYSQL": { + "type": "VARCHAR(1000)" + } + } + }, + { + "name": "VARCHAR_128", + "code": "VARCHAR_128", + "apply": { + "MYSQL": { + "type": "VARCHAR(128)" + } + } + }, + { + "name": "VARCHAR_15", + "code": "VARCHAR_15", + "apply": { + "MYSQL": { + "type": "VARCHAR(15)" + } + } + }, + { + "name": "VARCHAR_150", + "code": "VARCHAR_150", + "apply": { + "MYSQL": { + "type": "VARCHAR(150)" + } + } + }, + { + "name": "VARCHAR_16", + "code": "VARCHAR_16", + "apply": { + "MYSQL": { + "type": "VARCHAR(16)" + } + } + }, + { + "name": "VARCHAR_18", + "code": "VARCHAR_18", + "apply": { + "MYSQL": { + "type": "VARCHAR(18)" + } + } + }, + { + "name": "VARCHAR_20", + "code": "VARCHAR_20", + "apply": { + "MYSQL": { + "type": "VARCHAR(20)" + } + } + }, + { + "name": "VARCHAR_200", + "code": "VARCHAR_200", + "apply": { + "MYSQL": { + "type": "VARCHAR(200)" + } + } + }, + { + "name": "VARCHAR_2000", + "code": "VARCHAR_2000", + "apply": { + "MYSQL": { + "type": "VARCHAR(2000)" + } + } + }, + { + "name": "VARCHAR_25", + "code": "VARCHAR_25", + "apply": { + "MYSQL": { + "type": "VARCHAR(25)" + } + } + }, + { + "name": "VARCHAR_255", + "code": "VARCHAR_255", + "apply": { + "MYSQL": { + "type": "VARCHAR(255)" + } + } + }, + { + "name": "VARCHAR_256", + "code": "VARCHAR_256", + "apply": { + "MYSQL": { + "type": "VARCHAR(256)" + } + } + }, + { + "name": "VARCHAR_30", + "code": "VARCHAR_30", + "apply": { + "MYSQL": { + "type": "VARCHAR(30)" + } + } + }, + { + "name": "VARCHAR_300", + "code": "VARCHAR_300", + "apply": { + "MYSQL": { + "type": "VARCHAR(300)" + } + } + }, + { + "name": "VARCHAR_32", + "code": "VARCHAR_32", + "apply": { + "MYSQL": { + "type": "VARCHAR(32)" + } + } + }, + { + "name": "VARCHAR_36", + "code": "VARCHAR_36", + "apply": { + "MYSQL": { + "type": "VARCHAR(36)" + } + } + }, + { + "name": "VARCHAR_50", + "code": "VARCHAR_50", + "apply": { + "MYSQL": { + "type": "VARCHAR(50)" + } + } + }, + { + "name": "VARCHAR_500", + "code": "VARCHAR_500", + "apply": { + "MYSQL": { + "type": "VARCHAR(500)" + } + } + }, + { + "name": "VARCHAR_5000", + "code": "VARCHAR_5000", + "apply": { + "MYSQL": { + "type": "VARCHAR(5000)" + } + } + }, + { + "name": "VARCHAR_512", + "code": "VARCHAR_512", + "apply": { + "MYSQL": { + "type": "VARCHAR(512)" + } + } + }, + { + "name": "VARCHAR_64", + "code": "VARCHAR_64", + "apply": { + "MYSQL": { + "type": "VARCHAR(64)" + } + } + } + ], + "database": [ + { + "code": "MYSQL", + "template": "DROP TABLE {{=it.entity.title}};\n$blankline\nCREATE TABLE {{=it.entity.title}}(\n{{ pkList = [] ; }}\n{{~it.entity.fields:field:index}}\n {{? field.pk }}{{ pkList.push(field.name) }}{{?}}\n {{=field.name}} {{=field.type}} {{= field.pk ? 'NOT NULL' : '' }} COMMENT '{{=it.func.join(field.chnname,field.remark,';')}}' {{= index < it.entity.fields.length-1 ? ',' : ( pkList.length>0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}{{? pkList.length >0 }} PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n CONSTRAINT PK_{{=it.entity.title}} PRIMARY KEY CLUSTERED ({{~pkList:pkName:i}}{{= pkName }} ASC {{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i0 ? ',' :'' ) }}\n{{~}}\n{{? pkList.length >0 }}\n PRIMARY KEY ({{~pkList:pkName:i}}{{= pkName }}{{= i

yshop1.3版本上线了

', '', '', '8', NULL, '', NULL, '2019-08-22 12:26:00', '2020-06-25 19:12:53', 0); -INSERT INTO `yx_article` VALUES (3, '', '44', '444', 'http://127.0.0.1:8000/file/pic/20200527164543489004.png', '4444', '

55555

', '', '', '', 0, '', NULL, '2020-06-25 19:12:35', NULL, 1); -INSERT INTO `yx_article` VALUES (4, '', 'yshop3.0', 'yshop', 'https://image.dayouqiantu.cn/news.png', 'yshop3.0', '


yshop3.0

', '', '', '3', 0, '', NULL, '2020-07-02 12:15:13', '2020-07-03 17:58:19', 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_express --- ---------------------------- -DROP TABLE IF EXISTS `yx_express`; -CREATE TABLE `yx_express` ( - `id` mediumint 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 NOT NULL DEFAULT '0' COMMENT '排序', - `is_show` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否显示', - `create_time` datetime DEFAULT NULL, - `update_time` datetime DEFAULT NULL, - `is_del` tinyint DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - KEY `is_show` (`is_show`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=433 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='快递公司表'; - --- ---------------------------- --- Records of yx_express --- ---------------------------- -BEGIN; -INSERT INTO `yx_express` VALUES (426, 'STO', '申通快递', 0, 0, NULL, NULL, 1); -INSERT INTO `yx_express` VALUES (427, 'SF', '顺丰速运', 0, 0, NULL, NULL, 0); -INSERT INTO `yx_express` VALUES (428, 'ZTO', '中通快递', 0, 0, NULL, '2021-04-04 15:08:36', 0); -INSERT INTO `yx_express` VALUES (429, 'YTO', '圆通速递', 0, 0, NULL, '2020-09-06 09:59:36', 0); -INSERT INTO `yx_express` VALUES (430, '555', '555555', 0, 0, NULL, NULL, 1); -INSERT INTO `yx_express` VALUES (431, '555', '5555', 0, 0, NULL, NULL, 1); -INSERT INTO `yx_express` VALUES (432, '555', '555', 0, 0, '2020-06-26 12:29:48', NULL, 1); -COMMIT; - --- ---------------------------- --- 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', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `create_id` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci 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 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 DEFAULT '' COMMENT '素材链接', - `update_time` datetime DEFAULT NULL, - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='素材库'; - --- ---------------------------- --- Records of yx_material --- ---------------------------- -BEGIN; -INSERT INTO `yx_material` VALUES ('05bf470c271f73fe2f572cad60b356f4', '2020-09-03 17:13:52', 'admin', '1', NULL, '1.jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200903171351713145.jpg', NULL, 0); -INSERT INTO `yx_material` VALUES ('1888a13fdeca0d85dcc6bef413c531b9', '2020-06-26 17:22:21', 'admin', '1', NULL, 'list_16.png', 'http://127.0.0.1:8000/file/pic/20200626172220229003.png', NULL, 1); -INSERT INTO `yx_material` VALUES ('353760137dad5526444c01074f9490e0', '2020-09-03 17:18:08', 'admin', '1', NULL, '3.jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg', NULL, 0); -INSERT INTO `yx_material` VALUES ('3e2aa47438e059b06eea6327ae2260ec', '2020-06-26 18:25:07', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'news.png', 'https://image.dayouqiantu.cn/news.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('612f4f924840739f0ebdfbdce21d878b', '2020-06-26 18:25:07', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'sign.png', 'https://image.dayouqiantu.cn/sign.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('658cff7a98834617e46adfd105db0a3c', '2020-05-27 16:45:44', 'admin', '1', NULL, 'list_18.png', 'http://127.0.0.1:8000/file/pic/20200527164543489004.png', NULL, 1); -INSERT INTO `yx_material` VALUES ('6d2c5511b87631ffa6c5eecb9e4d736f', '2020-06-26 18:25:23', 'admin', '1', '8cc5996f6c4b54fcf5c0f2845a5d9afa', '5ca04fa9c08ef.jpg', 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', NULL, 0); -INSERT INTO `yx_material` VALUES ('6d4adf87cbb42bac277edf212dcbf2a7', '2020-06-26 18:20:58', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'collect.png', 'https://image.dayouqiantu.cn/collect.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('700a8cade3e6ff35a5e0d12b55849735', '2020-09-03 17:18:08', 'admin', '1', NULL, '7.jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg', NULL, 0); -INSERT INTO `yx_material` VALUES ('7492896114a45879b88c08f02ef88a3e', '2020-06-26 18:25:07', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'pink.png', 'https://image.dayouqiantu.cn/pink.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('77b45342d9861a25323f284b155c4c9d', '2020-09-03 17:18:08', 'admin', '1', NULL, '6.jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg', NULL, 0); -INSERT INTO `yx_material` VALUES ('7cc18f371ebcfaeb63d95f734251453b', '2020-06-26 18:25:24', 'admin', '1', '8cc5996f6c4b54fcf5c0f2845a5d9afa', '5ca0786c5d2c1.jpg', 'https://image.dayouqiantu.cn/5ca0786c5d2c1.jpg', NULL, 1); -INSERT INTO `yx_material` VALUES ('80116a9fea6f899d4530e82bc4d9b97b', '2020-09-03 17:12:09', 'admin', '1', NULL, 'avatar_default.png', 'https://consoleapi.xinxintuan.co/file/pic/20200903171208889668.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('808cbc928e818b2c0d12f5919042cdc2', '2020-06-26 11:08:09', 'admin', '1', NULL, 'list_34.png', 'http://127.0.0.1:8000/file/pic/20200626110808157592.png', NULL, 1); -INSERT INTO `yx_material` VALUES ('8a599a4721469bfcd1c313241c88bee0', '2020-06-26 18:20:58', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'buy.png', 'https://image.dayouqiantu.cn/buy.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('8e19af4d16b717574d863e6316cf15e4', '2020-06-26 18:24:51', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'add.png', 'https://image.dayouqiantu.cn/add.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('9ddc310b8b6e224cd1ee2f27f1d19017', '2020-06-26 18:25:07', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'sekill.png', 'https://image.dayouqiantu.cn/sekill.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('a0fc29a301a72712802ef38efe011fc4', '2020-09-11 09:39:13', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'avatar_default.png', 'https://consoleapi.xinxintuan.co/file/pic/20200911093912577832.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('a961d6c0f255083294c27bed47330ad9', '2020-05-27 16:45:27', 'admin', '1', '83ee56004ff88fd1ecdde5a43469ef2e', 'list_13.png', 'http://127.0.0.1:8000/file/pic/20200527164526793230.png', NULL, 1); -INSERT INTO `yx_material` VALUES ('b36ab3797cd310a210f5d3dec2d05349', '2020-09-03 17:18:08', 'admin', '1', NULL, '5.jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200903171807625149.jpg', NULL, 0); -INSERT INTO `yx_material` VALUES ('bd6c9dc5a3373fe377b4aeb0579ed1bb', '2020-06-26 17:35:22', 'admin', '1', NULL, 'list_18.png', 'http://127.0.0.1:8009/api/api/file/pic/20200626173520849370.png', NULL, 1); -INSERT INTO `yx_material` VALUES ('c246328a65ecb0170b67334e8ef4683e', '2020-06-26 18:20:58', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'goods.png', 'https://image.dayouqiantu.cn/goods.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('c48c27553f32321e5b5e6cdc2b934484', '2020-09-15 07:41:40', 'admin', '1', NULL, '1600126884(1).jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200915074139926178.jpg', NULL, 0); -INSERT INTO `yx_material` VALUES ('c83bb0d55e101f6ab525acb1f524b10b', '2020-06-26 17:39:44', 'admin', '1', NULL, 'list_34.png', 'http://127.0.0.1:8000/file/pic/20200626173943611335.png', NULL, 1); -INSERT INTO `yx_material` VALUES ('d63a722c0a0e55e73126ff9411ae1224', '2020-06-26 18:20:58', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'coupon.png', 'https://image.dayouqiantu.cn/coupon.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('d98b9f8ad2daa9e9a7567b3ae31b81d7', '2020-06-26 18:24:51', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'bargin.png', 'https://image.dayouqiantu.cn/bargin.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('eb8aa8d0846009f5b685e9f07a05c836', '2020-09-03 17:10:04', 'admin', '1', NULL, 'avatar_default.png', 'https://consoleapi.xinxintuan.co/file/pic/20200903171003417769.png', NULL, 0); -INSERT INTO `yx_material` VALUES ('f04dcbf4b61ab35d0f08f85a27ee92ff', '2020-06-26 18:25:24', 'admin', '1', '8cc5996f6c4b54fcf5c0f2845a5d9afa', '5ca081af6183f.jpg', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', NULL, 0); -INSERT INTO `yx_material` VALUES ('f0e8dddf88c587f638e5a7859d8cc7a3', '2020-09-03 17:18:08', 'admin', '1', NULL, '4.jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200903171807568739.jpg', NULL, 0); -COMMIT; - --- ---------------------------- --- 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', - `create_time` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '创建时间', - `create_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '创建者ID', - `name` varchar(200) CHARACTER SET utf8mb4 COLLATE utf8mb4_bin NOT NULL COMMENT '分组名', - `update_time` datetime DEFAULT NULL, - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COLLATE=utf8mb4_bin ROW_FORMAT=DYNAMIC COMMENT='素材分组'; - --- ---------------------------- --- Records of yx_material_group --- ---------------------------- -BEGIN; -INSERT INTO `yx_material_group` VALUES ('83ee56004ff88fd1ecdde5a43469ef2e', '2020-05-27 16:45:08', NULL, 'test', '2020-06-26 18:20:00', 0); -INSERT INTO `yx_material_group` VALUES ('8cc5996f6c4b54fcf5c0f2845a5d9afa', '2020-06-26 11:07:26', NULL, '商品', '2020-06-26 18:20:14', 0); -INSERT INTO `yx_material_group` VALUES ('d9b1b9d69f5b72cda63e26dc9f087623', '2020-06-26 18:20:19', NULL, 'icon', NULL, 0); -INSERT INTO `yx_material_group` VALUES ('fe2e32c3ce27983c298ab344c6e1c4fa', '2020-05-27 16:45:13', NULL, 'bb', NULL, 1); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_bargain --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_bargain`; -CREATE TABLE `yx_store_bargain` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '砍价产品ID', - `product_id` bigint 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 DEFAULT NULL COMMENT '单位名称', - `stock` int unsigned DEFAULT NULL COMMENT '库存', - `sales` int unsigned DEFAULT NULL COMMENT '销量', - `images` varchar(2000) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '砍价产品轮播图', - `start_time` datetime NOT NULL COMMENT '砍价开启时间', - `stop_time` datetime NOT NULL COMMENT '砍价结束时间', - `store_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '砍价产品名称', - `price` decimal(8,2) unsigned DEFAULT NULL COMMENT '砍价金额', - `min_price` decimal(8,2) unsigned DEFAULT NULL COMMENT '砍价商品最低价', - `num` int unsigned DEFAULT NULL COMMENT '每次购买的砍价产品数量', - `bargain_max_price` decimal(8,2) unsigned DEFAULT NULL COMMENT '用户每次砍价的最大金额', - `bargain_min_price` decimal(8,2) unsigned DEFAULT NULL COMMENT '用户每次砍价的最小金额', - `bargain_num` int unsigned NOT NULL DEFAULT '1' COMMENT '用户每次砍价的次数', - `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)', - `description` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '砍价详情', - `give_integral` decimal(10,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '反多少积分', - `info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '砍价活动简介', - `cost` decimal(8,2) unsigned DEFAULT NULL COMMENT '成本价', - `sort` int unsigned NOT NULL DEFAULT '0' COMMENT '排序', - `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除 0未删除 1删除', - `create_time` datetime DEFAULT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `rule` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '砍价规则', - `look` int unsigned DEFAULT '0' COMMENT '砍价产品浏览量', - `share` int unsigned DEFAULT '0' COMMENT '砍价产品分享量', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=14 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='砍价表'; - --- ---------------------------- --- Records of yx_store_bargain --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_bargain` VALUES (12, 7, '专属测试商品', 'https://consoleapi.xinxintuan.co/file/pic/20200903171208889668.png', '张', 7, 3, 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg,https://image.dayouqiantu.cn/5ca081af6183f.jpg', '2020-09-12 18:20:56', '2020-09-30 00:00:00', NULL, 100.00, 1.00, 1, 10.00, 1.00, 1, 1, '


', 0.00, '结算', 110.00, 0, 1, '2020-09-12 18:22:14', NULL, '

1、规则1

2、规则2

', 40, 23); -INSERT INTO `yx_store_bargain` VALUES (13, 8, '多规格商品测试', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', '张', 501, 5, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '2021-04-04 00:00:00', '2021-04-14 00:00:00', NULL, 0.01, 1.00, 1, 1.00, 1.00, 1, 1, '


', 0.00, '多规格商品测试', 1.00, 0, 0, '2021-04-04 11:28:09', NULL, '

1111

', 0, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_cart --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_cart`; -CREATE TABLE `yx_store_cart` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '购物车表ID', - `uid` bigint unsigned NOT NULL COMMENT '用户ID', - `type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'product' COMMENT '类型', - `product_id` bigint unsigned NOT NULL COMMENT '商品ID', - `product_attr_unique` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '商品属性', - `cart_num` smallint unsigned NOT NULL DEFAULT '0' COMMENT '商品数量', - `create_time` datetime NOT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `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 unsigned DEFAULT '0' COMMENT '拼团id', - `seckill_id` int unsigned NOT NULL DEFAULT '0' COMMENT '秒杀产品ID', - `bargain_id` int unsigned NOT NULL DEFAULT '0' COMMENT '砍价id', - PRIMARY KEY (`id`) USING BTREE, - KEY `user_id` (`uid`) USING BTREE, - KEY `goods_id` (`product_id`) USING BTREE, - KEY `uid` (`uid`,`is_pay`) USING BTREE, - KEY `uid_2` (`uid`,`is_del`) USING BTREE, - KEY `uid_3` (`uid`,`is_new`) USING BTREE, - KEY `type` (`type`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=150 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='购物车表'; - --- ---------------------------- --- Records of yx_store_cart --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_cart` VALUES (86, 40, 'product', 6, '91d12632e2c047d7b34dab48cfc5a34e', 1, '2020-09-12 14:54:08', '2020-09-12 14:54:45', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (87, 43, 'product', 7, '789984b858bb489bb6313107e11fdc15', 1, '2020-09-12 17:04:12', '2020-09-12 17:06:04', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (88, 43, 'product', 7, '789984b858bb489bb6313107e11fdc15', 1, '2020-09-12 17:06:54', '2020-09-12 17:07:00', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (89, 43, 'product', 7, '789984b858bb489bb6313107e11fdc15', 1, '2020-09-12 17:07:53', '2020-09-12 17:07:57', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (90, 43, 'product', 8, '2f7ee7305cfe43f782ea28c0235256db', 1, '2020-09-12 17:27:03', '2020-09-12 17:27:24', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (91, 43, 'product', 8, '183fcbaffb3849c48de2e87a226209b9', 1, '2020-09-12 17:48:03', '2020-09-12 17:48:14', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (92, 43, 'product', 7, '789984b858bb489bb6313107e11fdc15', 1, '2020-09-12 17:54:50', NULL, 0, 0, 0, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (93, 43, 'product', 8, '67138eee0bed408abe7d32b0ab2060b0', 1, '2020-09-12 17:56:08', NULL, 0, 0, 0, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (94, 43, 'product', 7, '789984b858bb489bb6313107e11fdc15', 1, '2020-09-12 18:10:27', NULL, 0, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (95, 43, 'product', 8, '183fcbaffb3849c48de2e87a226209b9', 1, '2020-09-12 18:10:44', '2020-09-12 18:11:05', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (96, 43, 'product', 8, 'f25af180071742458622febf7dde528b', 1, '2020-09-12 18:18:27', '2020-09-12 18:18:37', 1, 0, 1, 10, 0, 0); -INSERT INTO `yx_store_cart` VALUES (97, 42, 'product', 3, 'b951f8e2ed4641f08be1bce99b716a6d', 1, '2020-09-12 19:27:31', NULL, 0, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (98, 42, 'product', 8, '013f89ec740f478d8144f052909c0807', 1, '2020-09-12 19:42:36', NULL, 0, 0, 1, 10, 0, 0); -INSERT INTO `yx_store_cart` VALUES (99, 40, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-12 23:18:58', '2020-09-13 15:01:09', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (100, 53, 'product', 5, '4dd9ea6fb9f1414aabf18b713f0f6832', 1, '2020-09-13 02:29:15', '2020-09-13 02:29:37', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (101, 53, 'product', 8, '013f89ec740f478d8144f052909c0807', 1, '2020-09-13 03:54:24', '2020-09-13 03:54:28', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (102, 42, 'product', 8, '8112da382da7420f961203372f7c1d31', 1, '2020-09-13 06:59:31', NULL, 0, 0, 1, 0, 7, 0); -INSERT INTO `yx_store_cart` VALUES (103, 44, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-13 10:15:35', '2020-09-13 10:18:02', 1, 0, 1, 0, 6, 0); -INSERT INTO `yx_store_cart` VALUES (104, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 10:41:44', '2020-09-13 10:41:49', 1, 0, 1, 5, 0, 0); -INSERT INTO `yx_store_cart` VALUES (105, 53, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-13 10:42:37', '2020-09-13 10:42:42', 1, 0, 1, 0, 6, 0); -INSERT INTO `yx_store_cart` VALUES (106, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 10:58:02', '2020-09-13 11:04:18', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (107, 42, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:04:15', '2020-09-14 10:59:22', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (108, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:05:22', '2020-09-13 11:05:26', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (109, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:06:59', '2020-09-13 11:07:03', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (110, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:07:24', '2020-09-13 11:07:29', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (111, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:08:49', '2020-09-13 11:08:53', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (112, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:09:01', '2020-09-13 11:09:05', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (113, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:11:33', '2020-09-13 11:11:38', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (114, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:18:03', '2020-09-13 11:18:06', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (115, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:42:10', '2020-09-13 11:42:13', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (116, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:43:03', '2020-09-13 11:43:09', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (117, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:46:23', '2020-09-13 11:46:28', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (118, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:56:22', '2020-09-13 11:56:24', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (119, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:57:35', '2020-09-13 11:57:38', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (120, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 12:00:39', '2020-09-13 12:00:42', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (121, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 20:00:13', '2020-09-13 20:00:16', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (122, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 20:01:24', '2020-09-13 20:01:49', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (123, 42, 'product', 2, '04e9d586cef8464aaee0a45439f12520', 1, '2020-09-13 21:32:46', '2020-09-13 21:33:38', 1, 0, 1, 16, 0, 0); -INSERT INTO `yx_store_cart` VALUES (124, 42, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 21:33:49', '2020-09-13 21:33:51', 1, 0, 1, 5, 0, 0); -INSERT INTO `yx_store_cart` VALUES (125, 54, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 22:04:08', '2020-09-13 22:05:10', 1, 0, 1, 5, 0, 0); -INSERT INTO `yx_store_cart` VALUES (126, 50, 'product', 3, 'b951f8e2ed4641f08be1bce99b716a6d', 1, '2020-09-13 22:04:30', '2020-09-13 22:04:52', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (127, 50, 'product', 4, '6a1919d9178b48f3a75fe4640e51693e', 1, '2020-09-13 22:12:38', '2020-09-13 22:12:44', 1, 0, 1, 7, 0, 0); -INSERT INTO `yx_store_cart` VALUES (128, 49, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-13 23:59:44', '2020-09-14 00:01:07', 1, 0, 1, 6, 0, 0); -INSERT INTO `yx_store_cart` VALUES (129, 49, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 00:02:41', '2020-09-14 00:02:42', 1, 0, 1, 6, 0, 0); -INSERT INTO `yx_store_cart` VALUES (130, 49, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 00:02:48', '2020-09-14 00:02:50', 1, 0, 1, 6, 0, 0); -INSERT INTO `yx_store_cart` VALUES (131, 59, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 00:03:19', '2020-09-14 00:04:08', 1, 0, 1, 6, 0, 0); -INSERT INTO `yx_store_cart` VALUES (132, 49, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 00:03:36', '2020-09-14 00:03:39', 1, 0, 1, 6, 0, 0); -INSERT INTO `yx_store_cart` VALUES (133, 55, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 00:18:43', NULL, 0, 0, 1, 6, 0, 0); -INSERT INTO `yx_store_cart` VALUES (134, 42, 'product', 3, '43cdbd1043474b4e97a1cffffa18071c', 1, '2020-09-14 08:40:57', '2020-09-14 08:41:02', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (135, 42, 'product', 3, '43cdbd1043474b4e97a1cffffa18071c', 1, '2020-09-14 08:41:11', '2020-09-14 08:41:17', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (136, 42, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-14 09:56:15', NULL, 0, 0, 1, 5, 0, 0); -INSERT INTO `yx_store_cart` VALUES (137, 61, 'product', 2, '04e9d586cef8464aaee0a45439f12520', 1, '2020-09-14 10:01:46', '2020-09-14 10:02:55', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (138, 61, 'product', 2, '04e9d586cef8464aaee0a45439f12520', 1, '2020-09-14 10:08:05', '2020-09-14 10:08:07', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (139, 40, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-14 10:13:05', '2020-09-14 10:13:17', 1, 0, 1, 5, 0, 0); -INSERT INTO `yx_store_cart` VALUES (140, 42, 'product', 1, 'd4ce8cd4bda84d479c11348e060afb8e', 1, '2020-09-14 10:18:05', '2020-09-14 10:18:12', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (141, 42, 'product', 1, 'd4ce8cd4bda84d479c11348e060afb8e', 1, '2020-09-14 10:20:20', '2020-09-14 10:20:24', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (142, 42, 'product', 1, 'd4ce8cd4bda84d479c11348e060afb8e', 1, '2020-09-14 10:22:06', '2020-09-14 10:22:12', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (143, 42, 'product', 4, '6a1919d9178b48f3a75fe4640e51693e', 1, '2020-09-14 10:50:38', '2020-09-14 10:50:44', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (144, 42, 'product', 3, '43cdbd1043474b4e97a1cffffa18071c', 1, '2020-09-14 11:00:30', '2020-09-14 11:00:36', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (145, 71, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-14 12:52:02', '2020-09-14 12:53:06', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (146, 71, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 13:16:45', '2020-09-14 13:16:46', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (147, 76, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-14 22:20:51', NULL, 0, 0, 0, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (148, 76, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-14 22:20:55', '2020-09-14 22:21:11', 1, 0, 1, 0, 0, 0); -INSERT INTO `yx_store_cart` VALUES (149, 54, 'product', 2, '04e9d586cef8464aaee0a45439f12520', 1, '2020-09-14 22:34:54', '2020-09-14 22:34:59', 1, 0, 1, 0, 0, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_category --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_category`; -CREATE TABLE `yx_store_category` ( - `id` mediumint NOT NULL AUTO_INCREMENT COMMENT '商品分类表ID', - `pid` mediumint NOT NULL COMMENT '父id', - `cate_name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '分类名称', - `sort` mediumint DEFAULT NULL COMMENT '排序', - `pic` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '图标', - `is_show` tinyint(1) DEFAULT '1' COMMENT '是否推荐', - `create_time` datetime DEFAULT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `is_del` tinyint unsigned DEFAULT '0' COMMENT '删除状态', - PRIMARY KEY (`id`) USING BTREE, - KEY `pid` (`pid`) USING BTREE, - KEY `is_base` (`is_show`) USING BTREE, - KEY `sort` (`sort`) USING BTREE, - KEY `add_time` (`create_time`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商品分类表'; - --- ---------------------------- --- Records of yx_store_category --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_category` VALUES (1, 0, '图文广告', 1, '', 1, '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_store_category` VALUES (2, 1, '写真', 1, 'http://localhost:8000/file/pic/资讯-20200311043727918.png', 1, '2020-06-25 18:54:35', NULL, 1); -INSERT INTO `yx_store_category` VALUES (3, 1, '平面设计1', 1, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 1, '2020-06-25 18:54:35', '2021-04-03 22:26:18', 0); -INSERT INTO `yx_store_category` VALUES (5, 1, '名片', 1, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg', 1, '2020-06-25 18:54:35', '2020-09-09 21:00:32', 0); -INSERT INTO `yx_store_category` VALUES (6, 0, '666', 1, '', 1, '2020-06-25 18:54:35', NULL, 1); -INSERT INTO `yx_store_category` VALUES (7, 0, '99995', 1, '', 1, '2020-06-25 18:54:35', NULL, 1); -INSERT INTO `yx_store_category` VALUES (8, 7, '8888', 1, 'http://localhost:8000/file/pic/钻石-20200328094531898.jpg', 1, '2020-06-25 18:54:35', NULL, 1); -INSERT INTO `yx_store_category` VALUES (9, 0, '3333', 1, '', 1, '2020-06-25 17:11:45', NULL, 1); -INSERT INTO `yx_store_category` VALUES (10, 0, '666', 1, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 1, '2021-04-03 22:25:23', NULL, 1); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_combination --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_combination`; -CREATE TABLE `yx_store_combination` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `product_id` bigint 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 '活动标题', - `attr` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '活动属性', - `people` int unsigned NOT NULL COMMENT '参团人数', - `info` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '简介', - `price` decimal(10,2) unsigned DEFAULT NULL COMMENT '价格', - `product_price` decimal(10,2) DEFAULT NULL COMMENT '商品原价', - `sort` int unsigned NOT NULL COMMENT '排序', - `sales` int unsigned NOT NULL DEFAULT '0' COMMENT '销量', - `stock` int unsigned DEFAULT NULL COMMENT '库存', - `create_time` datetime NOT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `is_host` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '推荐', - `is_show` tinyint unsigned NOT NULL COMMENT '产品状态', - `is_del` tinyint unsigned NOT NULL DEFAULT '0', - `combination` tinyint unsigned NOT NULL DEFAULT '1', - `mer_use` tinyint unsigned DEFAULT NULL COMMENT '商户是否可用1可用0不可用', - `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '拼团内容', - `start_time` datetime NOT NULL COMMENT '拼团开始时间', - `stop_time` datetime NOT NULL COMMENT '拼团结束时间', - `effective_time` int NOT NULL DEFAULT '0' COMMENT '拼团订单有效时间', - `cost` int unsigned NOT NULL DEFAULT '0' COMMENT '拼图产品成本', - `browse` int DEFAULT '0' COMMENT '浏览量', - `unit_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '单位名', - `spec_type` tinyint(1) DEFAULT NULL COMMENT '规格 0单 1多', - `temp_id` int DEFAULT NULL COMMENT '运费模板ID', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='拼团产品表'; - --- ---------------------------- --- Records of yx_store_combination --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_combination` VALUES (1, 8, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '多规格商品测试', NULL, 1, '多规格商品测试', 1.00, NULL, 0, 5, 501, '2021-04-04 11:15:03', NULL, 1, 1, 0, 1, NULL, '


', '2021-04-04 00:00:00', '2021-04-19 00:00:00', 24, 1, 0, '张', NULL, NULL); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_coupon --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_coupon`; -CREATE TABLE `yx_store_coupon` ( - `id` int unsigned NOT NULL AUTO_INCREMENT COMMENT '优惠券表ID', - `title` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '优惠券名称', - `integral` int 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 unsigned NOT NULL DEFAULT '0' COMMENT '优惠券有效期限(单位:天)', - `sort` int unsigned NOT NULL DEFAULT '1' COMMENT '排序', - `status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '状态(0:关闭,1:开启)', - `product_id` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品ids', - `type` tinyint DEFAULT '0' COMMENT '优惠券类型 0-通用 1-商品券', - `create_time` datetime NOT NULL COMMENT '兑换项目添加时间', - `update_time` datetime DEFAULT NULL, - `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除', - PRIMARY KEY (`id`) USING BTREE, - KEY `state` (`status`) USING BTREE, - KEY `add_time` (`create_time`) USING BTREE, - KEY `coupon_time` (`coupon_time`) USING BTREE, - KEY `is_del` (`is_del`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='优惠券表'; - --- ---------------------------- --- Records of yx_store_coupon --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_coupon` VALUES (6, '全场通用', 0, 1.00, 10.00, 100, 0, 1, '', 0, '2020-09-12 17:57:02', NULL, 0); -INSERT INTO `yx_store_coupon` VALUES (7, '多规格商品券', 0, 1.00, 5.00, 100, 0, 1, '8', 1, '2020-09-12 17:57:46', NULL, 0); -INSERT INTO `yx_store_coupon` VALUES (8, '22', 0, 2.00, 2.00, 2, 0, 1, NULL, 0, '2021-04-04 16:03:42', NULL, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_coupon_issue --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_coupon_issue`; -CREATE TABLE `yx_store_coupon_issue` ( - `id` int unsigned NOT NULL AUTO_INCREMENT, - `cname` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '', - `cid` int DEFAULT NULL COMMENT '优惠券ID', - `ctype` tinyint(1) DEFAULT NULL COMMENT '优惠券类型 0-通用 1-商品券', - `start_time` datetime DEFAULT NULL COMMENT '优惠券领取开启时间', - `end_time` datetime DEFAULT NULL COMMENT '优惠券领取结束时间', - `total_count` int DEFAULT NULL COMMENT '优惠券领取数量', - `remain_count` int 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 unsigned NOT NULL DEFAULT '0', - `create_time` datetime DEFAULT NULL COMMENT '优惠券添加时间', - `update_time` datetime DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - KEY `cid` (`cid`) USING BTREE, - KEY `start_time` (`start_time`,`end_time`) USING BTREE, - KEY `remain_count` (`remain_count`) USING BTREE, - KEY `status` (`status`) USING BTREE, - KEY `is_del` (`is_del`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='优惠券前台领取表'; - --- ---------------------------- --- Records of yx_store_coupon_issue --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_coupon_issue` VALUES (6, '多规格商品券', 7, 1, '2020-09-12 18:07:10', '2020-09-30 00:00:00', 100, 99, 0, 1, 0, '2020-09-12 18:07:19', NULL); -INSERT INTO `yx_store_coupon_issue` VALUES (7, '全场通用', 6, 0, '2020-09-12 18:07:25', '2020-09-29 00:00:00', 100, 100, 0, 1, 0, '2020-09-12 18:07:34', NULL); -INSERT INTO `yx_store_coupon_issue` VALUES (8, '22', 8, NULL, NULL, NULL, 0, 0, 0, 1, 1, '2021-04-04 16:03:55', NULL); -INSERT INTO `yx_store_coupon_issue` VALUES (9, '22', 8, NULL, NULL, NULL, 0, 0, 0, 1, 1, '2021-04-04 16:04:43', '2021-04-04 16:06:39'); -INSERT INTO `yx_store_coupon_issue` VALUES (10, '22', 8, NULL, '2021-04-05 00:00:00', '2021-04-30 00:00:00', 0, 0, 0, 1, 0, '2021-04-04 16:06:29', NULL); -COMMIT; - --- ---------------------------- --- 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` bigint unsigned NOT NULL AUTO_INCREMENT, - `uid` bigint DEFAULT NULL COMMENT '领取优惠券用户ID', - `issue_coupon_id` int DEFAULT NULL COMMENT '优惠券前台领取ID', - `create_time` datetime DEFAULT NULL COMMENT '领取时间', - `update_time` datetime DEFAULT NULL, - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `uid` (`uid`,`issue_coupon_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='优惠券前台用户领取记录表'; - --- ---------------------------- --- Records of yx_store_coupon_issue_user --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_coupon_issue_user` VALUES (5, 43, 6, '2020-09-12 18:08:26', NULL, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_coupon_user --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_coupon_user`; -CREATE TABLE `yx_store_coupon_user` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '优惠券发放记录id', - `cid` int unsigned NOT NULL DEFAULT '0' COMMENT '兑换的项目id', - `uid` bigint 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 '最低消费多少金额可用优惠券', - `create_time` datetime NOT NULL COMMENT '优惠券创建时间', - `update_time` datetime DEFAULT NULL, - `end_time` datetime NOT NULL COMMENT '优惠券结束时间', - `use_time` datetime DEFAULT NULL 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 unsigned NOT NULL DEFAULT '0' COMMENT '是否有效', - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - KEY `cid` (`cid`) USING BTREE, - KEY `uid` (`uid`) USING BTREE, - KEY `add_time` (`create_time`) USING BTREE, - KEY `end_time` (`end_time`) USING BTREE, - KEY `status` (`status`) USING BTREE, - KEY `is_fail` (`is_fail`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='优惠券发放记录表'; - --- ---------------------------- --- Records of yx_store_coupon_user --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_coupon_user` VALUES (5, 7, 43, '多规格商品券', 1.00, 5.00, '2020-09-12 18:08:26', '2020-09-12 18:11:05', '2020-12-21 18:08:26', '2020-09-12 18:11:05', 'get', 1, 0, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_order --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_order`; -CREATE TABLE `yx_store_order` ( - `id` bigint 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 DEFAULT NULL COMMENT '额外订单号', - `uid` bigint 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 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 unsigned NOT NULL DEFAULT '0' COMMENT '优惠券id', - `coupon_price` decimal(8,2) unsigned NOT NULL DEFAULT '0.00' COMMENT '优惠券金额', - `paid` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '支付状态', - `pay_time` datetime DEFAULT NULL COMMENT '支付时间', - `pay_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '支付方式', - `create_time` datetime NOT NULL COMMENT '创建时间', - `update_time` datetime DEFAULT NULL, - `status` tinyint(1) NOT NULL DEFAULT '0' COMMENT '订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:已完成;-1:已退款)', - `refund_status` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '0 未退款 1 申请中 2 已退款', - `refund_reason_wap_img` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '退款图片', - `refund_reason_wap_explain` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '退款用户说明', - `refund_reason_time` datetime DEFAULT NULL COMMENT '退款时间', - `refund_reason_wap` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '前台退款原因', - `refund_reason` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci 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 DEFAULT '' COMMENT '快递公司编号', - `delivery_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '快递名称/送货人姓名', - `delivery_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '发货类型', - `delivery_id` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci 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 DEFAULT NULL COMMENT '给用户退了多少积分', - `mark` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '备注', - `is_del` tinyint 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 DEFAULT NULL COMMENT '管理员备注', - `combination_id` bigint unsigned DEFAULT '0' COMMENT '拼团产品id0一般产品', - `pink_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '拼团id 0没有拼团', - `cost` decimal(8,2) unsigned NOT NULL COMMENT '成本价', - `seckill_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '秒杀产品ID', - `bargain_id` int unsigned DEFAULT '0' COMMENT '砍价id', - `verify_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '核销码', - `store_id` int NOT NULL DEFAULT '0' COMMENT '门店id', - `shipping_type` tinyint(1) NOT NULL DEFAULT '1' COMMENT '配送方式 1=快递 ,2=门店自提', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `order_id_2` (`order_id`,`uid`) USING BTREE, - UNIQUE KEY `unique` (`unique`) USING BTREE, - KEY `uid` (`uid`) USING BTREE, - KEY `add_time` (`create_time`) USING BTREE, - KEY `pay_price` (`pay_price`) USING BTREE, - KEY `paid` (`paid`) USING BTREE, - KEY `pay_time` (`pay_time`) USING BTREE, - KEY `pay_type` (`pay_type`) USING BTREE, - KEY `status` (`status`) USING BTREE, - KEY `is_del` (`is_del`) USING BTREE, - KEY `coupon_id` (`coupon_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单表'; - --- ---------------------------- --- Records of yx_store_order --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_order` VALUES (1, '1302228251506114560', NULL, 29, '哈哈', '18888888888', '北京市 北京市 朝阳区 老两口儿', '2', 0.00, 1, 10.00, 0.00, 10.00, 0.00, 0.00, 0, 0.00, 1, '2020-09-05 20:55:40', 'yue', '2020-09-05 20:53:04', '2020-09-05 20:55:40', 0, 0, NULL, NULL, NULL, NULL, NULL, 0.00, '', NULL, NULL, NULL, 0.00, 0.00, NULL, '', 0, '8b53cc02e2ed45dda4356979fc7f2f87', NULL, 0, 0, 11.00, 0, 0, '', 0, 1); -COMMIT; - --- ---------------------------- --- 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` bigint unsigned NOT NULL AUTO_INCREMENT, - `oid` bigint unsigned NOT NULL COMMENT '订单id', - `cart_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '购物车id', - `product_id` bigint 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 KEY `oid` (`oid`,`unique`) USING BTREE, - KEY `cart_id` (`cart_id`) USING BTREE, - KEY `product_id` (`product_id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单购物详情表'; - --- ---------------------------- --- Records of yx_store_order_cart_info --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for yx_store_order_status --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_order_status`; -CREATE TABLE `yx_store_order_status` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `oid` bigint 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` datetime NOT NULL DEFAULT CURRENT_TIMESTAMP COMMENT '操作时间', - PRIMARY KEY (`id`) USING BTREE, - KEY `oid` (`oid`) USING BTREE, - KEY `change_type` (`change_type`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='订单操作记录表'; - --- ---------------------------- --- Records of yx_store_order_status --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for yx_store_pink --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_pink`; -CREATE TABLE `yx_store_pink` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `uid` bigint unsigned NOT NULL COMMENT '用户id', - `order_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '订单id 生成', - `order_id_key` int unsigned NOT NULL COMMENT '订单id 数据库', - `total_num` int unsigned NOT NULL COMMENT '购买商品个数', - `total_price` decimal(10,2) unsigned NOT NULL COMMENT '购买总金额', - `cid` bigint unsigned NOT NULL COMMENT '拼团产品id', - `pid` bigint unsigned NOT NULL COMMENT '产品id', - `people` int unsigned NOT NULL COMMENT '拼图总人数', - `price` decimal(10,2) unsigned NOT NULL COMMENT '拼团产品单价', - `create_time` datetime NOT NULL COMMENT '开始时间', - `update_time` datetime DEFAULT NULL, - `stop_time` datetime DEFAULT NULL, - `k_id` bigint unsigned NOT NULL DEFAULT '0' COMMENT '团长id 0为团长', - `is_tpl` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否发送模板消息0未发送1已发送', - `is_refund` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否退款 0未退款 1已退款', - `status` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '状态1进行中2已完成3未完成', - `is_del` tinyint(1) DEFAULT '0' COMMENT '是否删除1删除 0否', - `unique_id` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '库存唯一值', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=6 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='拼团表'; - --- ---------------------------- --- Records of yx_store_pink --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_pink` VALUES (5, 28, '1302844793633636352', 5, 1, 2.00, 4, 4, 2, 2.00, '2020-09-07 13:47:32', '2020-09-10 21:13:59', '2020-09-10 21:13:59', 0, 0, 0, 3, 0, NULL); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_product --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_product`; -CREATE TABLE `yx_store_product` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '商品id', - `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 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 DEFAULT '0.00' COMMENT '会员价格', - `ot_price` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '市场价', - `postage` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '邮费', - `unit_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '单位名', - `sort` smallint DEFAULT '0' COMMENT '排序', - `sales` mediumint unsigned DEFAULT '0' COMMENT '销量', - `stock` mediumint unsigned DEFAULT '0' COMMENT '库存', - `is_show` tinyint(1) DEFAULT '1' COMMENT '状态(0:未上架,1:上架)', - `is_hot` tinyint(1) DEFAULT '0' COMMENT '是否热卖', - `is_benefit` tinyint(1) DEFAULT '0' COMMENT '是否优惠', - `is_best` tinyint(1) DEFAULT '0' COMMENT '是否精品', - `is_new` tinyint(1) DEFAULT '0' COMMENT '是否新品', - `description` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '产品描述', - `create_time` datetime DEFAULT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `is_postage` tinyint unsigned DEFAULT '0' COMMENT '是否包邮', - `is_del` tinyint unsigned DEFAULT '0' COMMENT '是否删除', - `mer_use` tinyint unsigned DEFAULT '0' COMMENT '商户是否代理 0不可代理1可代理', - `give_integral` decimal(8,2) unsigned DEFAULT NULL COMMENT '获得积分', - `cost` decimal(8,2) unsigned DEFAULT NULL COMMENT '成本价', - `is_good` tinyint(1) DEFAULT '0' COMMENT '是否优品推荐', - `ficti` mediumint DEFAULT '100' COMMENT '虚拟销量', - `browse` int DEFAULT '0' COMMENT '浏览量', - `is_sub` tinyint(1) DEFAULT '0' COMMENT '是否单独分佣', - `temp_id` int DEFAULT NULL COMMENT '运费模板ID', - `spec_type` tinyint(1) DEFAULT '0' COMMENT '规格 0单 1多', - PRIMARY KEY (`id`) USING BTREE, - KEY `is_hot` (`is_hot`) USING BTREE, - KEY `is_benefit` (`is_benefit`) USING BTREE, - KEY `is_best` (`is_best`) USING BTREE, - KEY `is_new` (`is_new`) USING BTREE, - KEY `toggle_on_sale, is_del` (`is_del`) USING BTREE, - KEY `price` (`price`) USING BTREE, - KEY `is_show` (`is_show`) USING BTREE, - KEY `sort` (`sort`) USING BTREE, - KEY `sales` (`sales`) USING BTREE, - KEY `add_time` (`create_time`) USING BTREE, - KEY `is_postage` (`is_postage`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商品表'; - --- ---------------------------- --- Records of yx_store_product --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_product` VALUES (1, 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '照片打印', '照片打印', '照片打印', '', '5', 2.00, 0.00, 1.00, 0.00, '张', 0, 8, 992, 1, 0, 0, 0, 0, '


', '2020-09-04 17:41:30', '2020-09-05 20:57:49', 0, 0, 0, 0.00, 3.00, 0, 0, 3, 0, 34, 0); -INSERT INTO `yx_store_product` VALUES (2, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg,https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg,https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg', 'X型展架', 'X型展架', 'X型展架', '', '3', 10.00, 0.00, 12.00, 0.00, '张', 0, 20, 3310, 1, 1, 1, 0, 0, '


', '2020-09-04 17:55:16', '2021-04-04 15:13:02', 0, 1, 0, 0.00, 11.00, 0, 69, 25, 0, 34, 1); -INSERT INTO `yx_store_product` VALUES (3, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg', '彩色复印-量大有优惠', '彩色复印', '彩色复印', '', '3', 2.00, 0.00, 1.00, 0.00, '张', 0, 8, 9996, 1, 1, 1, 0, 0, '

1111

', '2020-09-07 13:14:50', '2020-09-13 22:18:46', 0, 1, 0, 0.00, 1.00, 0, 0, 43, 0, 34, 0); -INSERT INTO `yx_store_product` VALUES (4, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807625149.jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200903171807625149.jpg', '户外写真背胶', '户外写真背胶', '户外写真背胶', '', '3', 2.00, 0.00, 1.00, 0.00, '米', 0, 24, 87, 1, 1, 1, 0, 0, '

户外写真背胶

', '2020-09-07 13:16:02', NULL, 0, 1, 0, 0.00, 1.00, 0, 0, 32, 0, 34, 0); -INSERT INTO `yx_store_product` VALUES (5, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807568739.jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200903171807568739.jpg', '广告版定制', '广告版定制', '广告版定制', '', '3', 2.00, 0.00, 11.00, 0.00, '米', 0, 16, 2, 1, 1, 1, 1, 1, '

广告版定制

', '2020-09-07 13:17:49', '2020-09-12 00:14:32', 0, 1, 0, 0.00, 1.00, 0, 0, 26, 0, 34, 0); -INSERT INTO `yx_store_product` VALUES (6, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg', 'https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg', '印刷各种印刷', '印刷各种印刷', '印刷各种印刷', '', '3', 11.00, 0.00, 33.00, 0.00, '张', 1, 35, 9965, 1, 1, 1, 0, 0, '

印刷各种印刷

', '2020-09-07 13:18:45', '2020-09-11 17:18:18', 0, 1, 0, 1.00, 22.00, 0, 1, 139, 0, 34, 0); -INSERT INTO `yx_store_product` VALUES (7, 'https://consoleapi.xinxintuan.co/file/pic/20200903171208889668.png', 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg,https://image.dayouqiantu.cn/5ca081af6183f.jpg', '专属测试商品', '', '专属测试商品', '', '3', 100.00, 0.00, 120.00, 0.00, '张', 0, 3, 7, 1, 0, 0, 0, 0, '


', '2020-09-12 16:11:05', '2020-09-12 17:03:58', 0, 1, 0, 10.00, 110.00, 0, 9, 9, 0, 34, 0); -INSERT INTO `yx_store_product` VALUES (8, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '多规格商品测试', '多规格商品测试', '多规格商品测试', '', '5', 4.00, 0.00, 9.00, 0.00, '张', 0, 5, 501, 1, 1, 1, 1, 1, '


', '2020-09-12 17:24:51', NULL, 0, 0, 0, 0.00, 1.00, 0, 0, 19, 1, 34, 1); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_product_attr --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_product_attr`; -CREATE TABLE `yx_store_product_attr` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `product_id` bigint 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, - KEY `store_id` (`product_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=71 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商品属性表'; - --- ---------------------------- --- Records of yx_store_product_attr --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_product_attr` VALUES (32, 1, '规格', '默认'); -INSERT INTO `yx_store_product_attr` VALUES (55, 4, '规格', '默认'); -INSERT INTO `yx_store_product_attr` VALUES (57, 2, '纸张', 'A4,A3'); -INSERT INTO `yx_store_product_attr` VALUES (58, 2, '颜色', '白色,红色'); -INSERT INTO `yx_store_product_attr` VALUES (59, 0, '规格', '默认'); -INSERT INTO `yx_store_product_attr` VALUES (60, 6, '规格', '默认'); -INSERT INTO `yx_store_product_attr` VALUES (62, 7, '规格', '默认'); -INSERT INTO `yx_store_product_attr` VALUES (67, 8, '纸张', 'A4,A3,A5'); -INSERT INTO `yx_store_product_attr` VALUES (68, 8, '颜色', '白色,红色'); -INSERT INTO `yx_store_product_attr` VALUES (69, 5, '规格', '默认'); -INSERT INTO `yx_store_product_attr` VALUES (70, 3, '规格', '默认'); -COMMIT; - --- ---------------------------- --- 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` bigint unsigned NOT NULL AUTO_INCREMENT, - `product_id` bigint unsigned NOT NULL COMMENT '商品ID', - `result` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品属性参数', - `change_time` datetime NOT NULL COMMENT '上次修改时间', - PRIMARY KEY (`id`) USING BTREE, - KEY `product_id` (`product_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=56 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商品属性详情表'; - --- ---------------------------- --- Records of yx_store_product_attr_result --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_product_attr_result` VALUES (26, 1, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"00005\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":3.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":1.0,\"pic\":\"\",\"pinkPrice\":0.1,\"pinkStock\":100,\"price\":2.0,\"seckillPrice\":0.2,\"seckillStock\":100,\"stock\":999,\"value1\":\"规格\",\"value2\":\"\",\"volume\":0.0,\"weight\":0.0}]}', '2020-09-08 21:18:03'); -INSERT INTO `yx_store_product_attr_result` VALUES (44, 4, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":0.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":0.0,\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg\",\"pinkPrice\":22.0,\"pinkStock\":18,\"price\":0.0,\"seckillPrice\":0.0,\"seckillStock\":0,\"stock\":93,\"value1\":\"规格\",\"volume\":0.0,\"weight\":0.0}]}', '2020-09-12 15:55:17'); -INSERT INTO `yx_store_product_attr_result` VALUES (46, 2, '{\"attr\":[{\"detail\":[\"A4\",\"A3\"],\"value\":\"纸张\"},{\"detail\":[\"白色\",\"红色\"],\"value\":\"颜色\"}],\"value\":[{\"barCode\":\"00001\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":11.0,\"detail\":{\"纸张\":\"A4\",\"颜色\":\"白色\"},\"otPrice\":12.0,\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg\",\"pinkPrice\":11.09,\"pinkStock\":100,\"price\":10.0,\"seckillPrice\":1.0,\"seckillStock\":100,\"stock\":991,\"value1\":\"A4\",\"value2\":\"白色\",\"volume\":0.0,\"weight\":0.0},{\"barCode\":\"00002\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":11.0,\"detail\":{\"纸张\":\"A4\",\"颜色\":\"红色\"},\"otPrice\":12.0,\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg\",\"pinkPrice\":22.88,\"pinkStock\":99,\"price\":11.0,\"seckillPrice\":2.0,\"seckillStock\":100,\"stock\":661,\"value1\":\"A4\",\"value2\":\"红色\",\"volume\":0.0,\"weight\":0.0},{\"barCode\":\"00003\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":11.0,\"detail\":{\"纸张\":\"A3\",\"颜色\":\"白色\"},\"otPrice\":12.0,\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg\",\"pinkPrice\":33.89,\"pinkStock\":99,\"price\":12.0,\"seckillPrice\":3.0,\"seckillStock\":100,\"stock\":995,\"value1\":\"A3\",\"value2\":\"白色\",\"volume\":0.0,\"weight\":0.0},{\"barCode\":\"00004\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":11.0,\"detail\":{\"纸张\":\"A3\",\"颜色\":\"红色\"},\"otPrice\":12.0,\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg\",\"pinkPrice\":45.66,\"pinkStock\":100,\"price\":13.0,\"seckillPrice\":4.0,\"seckillStock\":100,\"stock\":665,\"value1\":\"A3\",\"value2\":\"红色\",\"volume\":0.0,\"weight\":0.0}]}', '2020-09-12 16:10:09'); -INSERT INTO `yx_store_product_attr_result` VALUES (48, 6, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"00002\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":22.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":33.0,\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg\",\"pinkPrice\":19.9,\"pinkStock\":99,\"price\":11.0,\"seckillPrice\":22.98,\"seckillStock\":2000,\"stock\":9989,\"value1\":\"规格\",\"volume\":1.0,\"weight\":1.0}]}', '2020-09-12 16:11:31'); -INSERT INTO `yx_store_product_attr_result` VALUES (50, 7, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":110.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":120.0,\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200911093912577832.png\",\"pinkPrice\":0.0,\"pinkStock\":0,\"price\":100.0,\"seckillPrice\":0.0,\"seckillStock\":0,\"stock\":10,\"value1\":\"规格\",\"volume\":0.0,\"weight\":0.0}]}', '2020-09-12 17:03:58'); -INSERT INTO `yx_store_product_attr_result` VALUES (53, 8, '{\"attr\":[{\"detail\":[\"A4\",\"A3\",\"A5\"],\"value\":\"纸张\"},{\"detail\":[\"白色\",\"红色\"],\"value\":\"颜色\"}],\"value\":[{\"barCode\":\"\",\"brokerage\":1.0,\"brokerageTwo\":1.0,\"cost\":1.0,\"detail\":{\"纸张\":\"A4\",\"颜色\":\"白色\"},\"otPrice\":12.0,\"pic\":\"https://image.dayouqiantu.cn/5ca081af6183f.jpg\",\"pinkPrice\":1.0,\"pinkStock\":9,\"price\":9.0,\"seckillPrice\":1.0,\"seckillStock\":10,\"stock\":96,\"value1\":\"A4\",\"value2\":\"白色\",\"volume\":0.0,\"weight\":0.0},{\"barCode\":\"\",\"brokerage\":1.0,\"brokerageTwo\":1.0,\"cost\":1.0,\"detail\":{\"纸张\":\"A4\",\"颜色\":\"红色\"},\"otPrice\":9.0,\"pic\":\"https://image.dayouqiantu.cn/5ca081af6183f.jpg\",\"pinkPrice\":2.0,\"pinkStock\":10,\"price\":8.0,\"seckillPrice\":1.0,\"seckillStock\":10,\"stock\":99,\"value1\":\"A4\",\"value2\":\"红色\",\"volume\":0.0,\"weight\":0.0},{\"barCode\":\"\",\"brokerage\":1.0,\"brokerageTwo\":1.0,\"cost\":1.0,\"detail\":{\"纸张\":\"A3\",\"颜色\":\"白色\"},\"otPrice\":9.0,\"pic\":\"https://image.dayouqiantu.cn/5ca081af6183f.jpg\",\"pinkPrice\":0.5,\"pinkStock\":10,\"price\":7.0,\"seckillPrice\":0.1,\"seckillStock\":10,\"stock\":88,\"value1\":\"A3\",\"value2\":\"白色\",\"volume\":0.0,\"weight\":0.0},{\"barCode\":\"\",\"brokerage\":1.0,\"brokerageTwo\":1.0,\"cost\":1.0,\"detail\":{\"纸张\":\"A3\",\"颜色\":\"红色\"},\"otPrice\":9.0,\"pic\":\"https://image.dayouqiantu.cn/5ca081af6183f.jpg\",\"pinkPrice\":1.0,\"pinkStock\":9,\"price\":6.0,\"seckillPrice\":0.1,\"seckillStock\":9,\"stock\":88,\"value1\":\"A3\",\"value2\":\"红色\",\"volume\":0.0,\"weight\":0.0},{\"barCode\":\"\",\"brokerage\":1.0,\"brokerageTwo\":1.0,\"cost\":1.0,\"detail\":{\"纸张\":\"A5\",\"颜色\":\"白色\"},\"otPrice\":9.0,\"pic\":\"https://image.dayouqiantu.cn/5ca081af6183f.jpg\",\"pinkPrice\":2.0,\"pinkStock\":9,\"price\":5.0,\"seckillPrice\":0.1,\"seckillStock\":9,\"stock\":65,\"value1\":\"A5\",\"value2\":\"白色\",\"volume\":0.0,\"weight\":0.0},{\"barCode\":\"\",\"brokerage\":1.0,\"brokerageTwo\":1.0,\"cost\":1.0,\"detail\":{\"纸张\":\"A5\",\"颜色\":\"红色\"},\"otPrice\":9.0,\"pic\":\"https://image.dayouqiantu.cn/5ca081af6183f.jpg\",\"pinkPrice\":3.0,\"pinkStock\":9,\"price\":4.0,\"seckillPrice\":0.1,\"seckillStock\":9,\"stock\":66,\"value1\":\"A5\",\"value2\":\"红色\",\"volume\":0.0,\"weight\":0.0}]}', '2020-09-12 18:23:33'); -INSERT INTO `yx_store_product_attr_result` VALUES (54, 5, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"1231321\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":1.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":11.0,\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg\",\"pinkPrice\":29.0,\"pinkStock\":10,\"price\":2.0,\"seckillPrice\":11.99,\"seckillStock\":10,\"stock\":11,\"value1\":\"规格\",\"volume\":1.0,\"weight\":1.0}]}', '2020-09-13 10:15:24'); -INSERT INTO `yx_store_product_attr_result` VALUES (55, 3, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":1.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":1.0,\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg\",\"pinkPrice\":119.99,\"pinkStock\":10,\"price\":2.0,\"seckillPrice\":0.0,\"seckillStock\":0,\"stock\":9999,\"value1\":\"规格\",\"volume\":0.0,\"weight\":0.0}]}', '2020-09-13 22:18:46'); -COMMIT; - --- ---------------------------- --- 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` bigint unsigned NOT NULL AUTO_INCREMENT, - `product_id` bigint unsigned NOT NULL COMMENT '商品ID', - `sku` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品属性索引值 (attr_value|attr_value[|....])', - `stock` int unsigned NOT NULL COMMENT '属性对应的库存', - `sales` int unsigned DEFAULT '0' COMMENT '销量', - `price` decimal(8,2) unsigned NOT NULL COMMENT '属性金额', - `image` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci 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 '成本价', - `bar_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '商品条码', - `ot_price` decimal(10,2) DEFAULT '0.00' COMMENT '原价', - `weight` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '重量', - `volume` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '体积', - `brokerage` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '一级返佣', - `brokerage_two` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '二级返佣', - `pink_price` decimal(8,2) NOT NULL DEFAULT '0.00' COMMENT '拼团价', - `pink_stock` int NOT NULL DEFAULT '0' COMMENT '拼团库存', - `seckill_price` decimal(10,2) NOT NULL DEFAULT '0.00' COMMENT '秒杀价', - `seckill_stock` int NOT NULL DEFAULT '0' COMMENT '秒杀库存', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `unique` (`unique`,`sku`) USING BTREE, - KEY `store_id` (`product_id`,`sku`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=107 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商品属性值表'; - --- ---------------------------- --- Records of yx_store_product_attr_value --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_product_attr_value` VALUES (44, 1, '默认', 993, 6, 2.00, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg', 'd4ce8cd4bda84d479c11348e060afb8e', 3.00, '00005', 1.00, 0.00, 0.00, 0.00, 0.00, 0.10, 100, 0.20, 97); -INSERT INTO `yx_store_product_attr_value` VALUES (77, 4, '默认', 91, 2, 0.00, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg', '6a1919d9178b48f3a75fe4640e51693e', 0.00, '', 0.00, 0.00, 0.00, 0.00, 0.00, 22.00, 17, 0.00, 0); -INSERT INTO `yx_store_product_attr_value` VALUES (79, 2, 'A4,白色', 987, 4, 10.00, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg', '04e9d586cef8464aaee0a45439f12520', 11.00, '00001', 12.00, 0.00, 0.00, 0.00, 0.00, 11.09, 99, 1.00, 100); -INSERT INTO `yx_store_product_attr_value` VALUES (80, 2, 'A4,红色', 661, 0, 11.00, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg', '3d1ffa92e6064c36b614d3046c268968', 11.00, '00002', 12.00, 0.00, 0.00, 0.00, 0.00, 22.88, 99, 2.00, 100); -INSERT INTO `yx_store_product_attr_value` VALUES (81, 2, 'A3,白色', 995, 0, 12.00, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg', '344f3a0e9d644845ae483c8b9a84a112', 11.00, '00003', 12.00, 0.00, 0.00, 0.00, 0.00, 33.89, 99, 3.00, 100); -INSERT INTO `yx_store_product_attr_value` VALUES (82, 2, 'A3,红色', 665, 0, 13.00, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg', '4a9ca8587855412ea7be9ba53f829052', 11.00, '00004', 12.00, 0.00, 0.00, 0.00, 0.00, 45.66, 100, 4.00, 100); -INSERT INTO `yx_store_product_attr_value` VALUES (83, 0, '默认', 10, 0, 100.00, 'https://consoleapi.xinxintuan.co/file/pic/20200911093912577832.png', 'bbdc071ff67c4892839eac9f62e7eb18', 110.00, '', 120.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0.00, 0); -INSERT INTO `yx_store_product_attr_value` VALUES (84, 6, '默认', 9966, 23, 11.00, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807584910.jpg', '90babee9cea24645870c6027fc420d42', 22.00, '00002', 33.00, 1.00, 1.00, 0.00, 0.00, 19.90, 95, 22.98, 2000); -INSERT INTO `yx_store_product_attr_value` VALUES (86, 7, '默认', 7, 3, 100.00, 'https://consoleapi.xinxintuan.co/file/pic/20200911093912577832.png', '789984b858bb489bb6313107e11fdc15', 110.00, '', 120.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0.00, 0); -INSERT INTO `yx_store_product_attr_value` VALUES (99, 8, 'A4,白色', 95, 1, 9.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', '013f89ec740f478d8144f052909c0807', 1.00, '', 12.00, 0.00, 0.00, 1.00, 1.00, 1.00, 9, 1.00, 10); -INSERT INTO `yx_store_product_attr_value` VALUES (100, 8, 'A4,红色', 99, 0, 8.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', '4e1d7c450a8e48f6ae4ec7788f0cfd90', 1.00, '', 9.00, 0.00, 0.00, 1.00, 1.00, 2.00, 10, 1.00, 10); -INSERT INTO `yx_store_product_attr_value` VALUES (101, 8, 'A3,白色', 88, 0, 7.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', '3ce61e5e6f4b46a7a210862af85212bc', 1.00, '', 9.00, 0.00, 0.00, 1.00, 1.00, 0.50, 10, 0.10, 10); -INSERT INTO `yx_store_product_attr_value` VALUES (102, 8, 'A3,红色', 88, 0, 6.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 'b1e48ae88299479899d95b86dd1be700', 1.00, '', 9.00, 0.00, 0.00, 1.00, 1.00, 1.00, 9, 0.10, 9); -INSERT INTO `yx_store_product_attr_value` VALUES (103, 8, 'A5,白色', 65, 0, 5.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', '81b7a068f84a498ca8ad4e1916011e00', 1.00, '', 9.00, 0.00, 0.00, 1.00, 1.00, 2.00, 9, 0.10, 9); -INSERT INTO `yx_store_product_attr_value` VALUES (104, 8, 'A5,红色', 66, 0, 4.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', '8112da382da7420f961203372f7c1d31', 1.00, '', 9.00, 0.00, 0.00, 1.00, 1.00, 3.00, 9, 0.10, 9); -INSERT INTO `yx_store_product_attr_value` VALUES (105, 5, '默认', 3, 8, 2.00, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807641535.jpg', '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1.00, '1231321', 11.00, 1.00, 1.00, 0.00, 0.00, 29.00, 5, 11.99, 8); -INSERT INTO `yx_store_product_attr_value` VALUES (106, 3, '默认', 9996, 3, 2.00, 'https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg', '43cdbd1043474b4e97a1cffffa18071c', 1.00, '', 1.00, 0.00, 0.00, 0.00, 0.00, 119.99, 10, 0.00, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_product_relation --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_product_relation`; -CREATE TABLE `yx_store_product_relation` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `uid` bigint unsigned NOT NULL COMMENT '用户ID', - `product_id` bigint unsigned NOT NULL COMMENT '商品ID', - `type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '类型(收藏(collect)、点赞(like))', - `category` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '某种类型的商品(普通商品、秒杀商品)', - `create_time` datetime NOT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `uid` (`uid`,`product_id`,`type`,`category`) USING BTREE, - KEY `type` (`type`) USING BTREE, - KEY `category` (`category`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商品点赞和收藏表'; - --- ---------------------------- --- Records of yx_store_product_relation --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for yx_store_product_reply --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_product_reply`; -CREATE TABLE `yx_store_product_reply` ( - `id` bigint NOT NULL AUTO_INCREMENT COMMENT '评论ID', - `uid` bigint NOT NULL COMMENT '用户ID', - `oid` bigint NOT NULL COMMENT '订单ID', - `unique` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '唯一id', - `product_id` bigint 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 utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '评论内容', - `pics` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '评论图片', - `create_time` datetime NOT NULL COMMENT '评论时间', - `update_time` datetime DEFAULT NULL, - `merchant_reply_content` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '管理员回复内容', - `merchant_reply_time` datetime DEFAULT NULL COMMENT '管理员回复时间', - `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '0未删除1已删除', - `is_reply` tinyint(1) NOT NULL DEFAULT '0' COMMENT '0未回复1已回复', - PRIMARY KEY (`id`) USING BTREE, - KEY `add_time` (`create_time`) USING BTREE, - KEY `parent_id` (`reply_type`) USING BTREE, - KEY `is_del` (`is_del`) USING BTREE, - KEY `product_score` (`product_score`) USING BTREE, - KEY `service_score` (`service_score`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=4 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='评论表'; - --- ---------------------------- --- Records of yx_store_product_reply --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_product_reply` VALUES (3, 43, 67, 'c1907f2efeff48168c119ee28ddcac42', 8, 'product', 5, 5, '棒棒哒', '', '2020-09-12 17:45:11', NULL, NULL, NULL, 0, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_store_seckill --- ---------------------------- -DROP TABLE IF EXISTS `yx_store_seckill`; -CREATE TABLE `yx_store_seckill` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '商品秒杀产品表id', - `product_id` bigint 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 DEFAULT NULL COMMENT '价格', - `cost` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '成本', - `ot_price` decimal(10,2) unsigned DEFAULT NULL COMMENT '原价', - `give_integral` decimal(10,2) unsigned DEFAULT NULL COMMENT '返多少积分', - `sort` int unsigned NOT NULL COMMENT '排序', - `stock` int unsigned NOT NULL COMMENT '库存', - `sales` int unsigned NOT NULL DEFAULT '0' COMMENT '销量', - `unit_name` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '单位名', - `description` text CHARACTER SET utf8 COLLATE utf8_general_ci COMMENT '内容', - `start_time` date NOT NULL COMMENT '开始时间', - `stop_time` date NOT NULL COMMENT '结束时间', - `create_time` datetime NOT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `status` tinyint unsigned NOT NULL COMMENT '产品状态', - `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '删除 0未删除1已删除', - `num` int unsigned NOT NULL COMMENT '最多秒杀几个', - `is_show` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '显示', - `time_id` int unsigned DEFAULT '0' COMMENT '时间段id', - `spec_type` tinyint(1) DEFAULT NULL COMMENT '规格 0单 1多', - `temp_id` int DEFAULT NULL COMMENT '运费模板id', - PRIMARY KEY (`id`) USING BTREE, - KEY `product_id` (`product_id`) USING BTREE, - KEY `start_time` (`start_time`,`stop_time`) USING BTREE, - KEY `is_del` (`is_del`) USING BTREE, - KEY `is_show` (`status`) USING BTREE, - KEY `add_time` (`create_time`) USING BTREE, - KEY `sort` (`sort`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='商品秒杀产品表'; - --- ---------------------------- --- Records of yx_store_seckill --- ---------------------------- -BEGIN; -INSERT INTO `yx_store_seckill` VALUES (8, 8, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '多规格商品测试', '多规格商品测试', 0.01, 1.00, 9.00, 0.00, 0, 501, 5, '张', '


', '2021-04-04', '2021-04-06', '2021-04-04 11:22:40', NULL, 1, 0, 1, 1, 210, NULL, NULL); -COMMIT; - --- ---------------------------- --- Table structure for yx_system_attachment --- ---------------------------- -DROP TABLE IF EXISTS `yx_system_attachment`; -CREATE TABLE `yx_system_attachment` ( - `att_id` bigint 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 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 NOT NULL DEFAULT '0' COMMENT '分类ID0编辑器,1产品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图', - `image_type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '图片上传类型 1本地 2七牛云 3OSS 4COS ', - `module_type` tinyint unsigned NOT NULL DEFAULT '1' COMMENT '图片上传模块类型 1 后台上传 2 用户生成', - `uid` bigint unsigned DEFAULT '0' COMMENT '用户id', - `invite_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '邀请码', - `create_time` datetime DEFAULT NULL, - `update_time` datetime DEFAULT NULL, - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`att_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=121 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='附件管理表'; - --- ---------------------------- --- Records of yx_system_attachment --- ---------------------------- -BEGIN; -INSERT INTO `yx_system_attachment` VALUES (113, '12_55_wechat_bargain_share_wap.jpg', '/home/yshop/file/qrcode/12_55_wechat_bargain_share_wap.jpg', 'qrcode/12_55_wechat_bargain_share_wap.jpg', '3897220', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 13:38:52', NULL, 0); -INSERT INTO `yx_system_attachment` VALUES (114, '12_55_wechat_bargain_user_spread.jpg', '/home/yshop/file/qrcode/12_55_wechat_bargain_user_spread.jpg', 'qrcode/12_55_wechat_bargain_user_spread.jpg', '43231', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 13:38:53', NULL, 0); -INSERT INTO `yx_system_attachment` VALUES (115, '4_59_uniappH5_product_detail_wap.jpg', '/home/yshop/file/qrcode/4_59_uniappH5_product_detail_wap.jpg', 'qrcode/4_59_uniappH5_product_detail_wap.jpg', '3904929', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 13:43:20', NULL, 0); -INSERT INTO `yx_system_attachment` VALUES (116, '4_59_uniappH5_product_user_spread.jpg', '/home/yshop/file/qrcode/4_59_uniappH5_product_user_spread.jpg', 'qrcode/4_59_uniappH5_product_user_spread.jpg', '113247', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 13:43:20', NULL, 0); -INSERT INTO `yx_system_attachment` VALUES (117, '4_75_uniappH5_product_detail_wap.jpg', '/home/yshop/file/qrcode/4_75_uniappH5_product_detail_wap.jpg', 'qrcode/4_75_uniappH5_product_detail_wap.jpg', '4025717', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 17:25:11', NULL, 0); -INSERT INTO `yx_system_attachment` VALUES (118, '4_75_uniappH5_product_user_spread.jpg', '/home/yshop/file/qrcode/4_75_uniappH5_product_user_spread.jpg', 'qrcode/4_75_uniappH5_product_user_spread.jpg', '113146', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 17:25:11', NULL, 0); -INSERT INTO `yx_system_attachment` VALUES (119, '915891458048_yshop.jpg', '/home/yshop/file/qrcode/915891458048_yshop.jpg', 'qrcode/915891458048_yshop.jpg', '4148444', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 22:21:17', NULL, 0); -INSERT INTO `yx_system_attachment` VALUES (120, '915891458048_yshop.jpg', '/home/yshop/file/qrcode/915891458048_yshop.jpg', 'qrcode/915891458048_yshop.jpg', '4148444', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 22:21:17', NULL, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_system_config --- ---------------------------- -DROP TABLE IF EXISTS `yx_system_config`; -CREATE TABLE `yx_system_config` ( - `id` int 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 DEFAULT NULL COMMENT '默认值', - `sort` int unsigned DEFAULT '0' COMMENT '排序', - `status` tinyint unsigned DEFAULT '0' COMMENT '是否隐藏', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=227 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='配置表'; - --- ---------------------------- --- Records of yx_system_config --- ---------------------------- -BEGIN; -INSERT INTO `yx_system_config` VALUES (162, 'wechat_share_img', '', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (165, 'wechat_avatar', '', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (172, 'wechat_share_synopsis', 'springboot2前后端分离电商系统', 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', 'yshop电商系统', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (177, 'store_postage', '1', 0, 0); -INSERT INTO `yx_system_config` VALUES (178, 'store_free_postage', '1', 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 (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://127.0.0.1:8080', 0, 0); -INSERT INTO `yx_system_config` VALUES (185, 'api_url', 'http://127.0.0.1:8008', 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', 'wxc061dee8806ff712', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (188, 'wechat_appsecret', '1111', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (189, 'wechat_encodingaeskey', 'yYuBUkC8BXImCXyu7O6hkzLj4TC5nxsWPfL4CQAZPNY', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (190, 'wechat_token', 'yshop', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (191, 'wxpay_mchId', '1111', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (192, 'wxpay_appId', '111111', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (193, 'wxpay_mchKey', '1111', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (194, 'wxapp_appId', '121221', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (195, 'wxapp_secret', '121212', 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 (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', '11111111111', 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', 'wx7c84ede33062d1e4', NULL, NULL); -INSERT INTO `yx_system_config` VALUES (212, 'file_store_mode', '1', 0, 0); -INSERT INTO `yx_system_config` VALUES (213, 'sms_access_key', 'yshopyshop', 0, 0); -INSERT INTO `yx_system_config` VALUES (214, 'sms_enable', '2', 0, 0); -INSERT INTO `yx_system_config` VALUES (215, 'sms_access_secret', 'yshop', 0, 0); -INSERT INTO `yx_system_config` VALUES (216, 'sms_region', 'cn-hangzhou', 0, 0); -INSERT INTO `yx_system_config` VALUES (217, 'sms_templateId', '111111111', 0, 0); -INSERT INTO `yx_system_config` VALUES (218, 'sms_sign', 'yshop', 0, 0); -INSERT INTO `yx_system_config` VALUES (219, 'exp_enable', '1', 0, 0); -INSERT INTO `yx_system_config` VALUES (220, 'exp_appId', '1607734', 0, 0); -INSERT INTO `yx_system_config` VALUES (221, 'exp_appKey', '33333333333333', 0, 0); -INSERT INTO `yx_system_config` VALUES (222, 'admin_api_url', 'http://127.0.0.1:8001', 0, 0); -INSERT INTO `yx_system_config` VALUES (223, 'imageArr', '[\"\"]', 0, 0); -INSERT INTO `yx_system_config` VALUES (224, 'wechat_ma_encodingaeskey', '', 0, 0); -INSERT INTO `yx_system_config` VALUES (225, 'wxapi', 'http://你的H5api端域名/api/wxapp/serve', 0, 0); -INSERT INTO `yx_system_config` VALUES (226, 'wechat_ma_token', '', 0, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_system_group_data --- ---------------------------- -DROP TABLE IF EXISTS `yx_system_group_data`; -CREATE TABLE `yx_system_group_data` ( - `id` int 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数据)', - `create_time` datetime DEFAULT NULL COMMENT '添加数据时间', - `update_time` datetime DEFAULT NULL, - `sort` int DEFAULT '0' COMMENT '数据排序', - `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '状态(1:开启;2:关闭;)', - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=227 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='组合数据详情表'; - --- ---------------------------- --- Records of yx_system_group_data --- ---------------------------- -BEGIN; -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\":0}', '2020-06-25 18:54:35', '2021-04-04 15:52:00', 1, 0, 0); -INSERT INTO `yx_system_group_data` VALUES (180, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/all.png\"],\"uniapp_url\":\"/pages/shop/GoodsList/index\",\"name\":\"全部商品\",\"id\":180,\"pic\":\"https://image.dayouqiantu.cn/all.png\",\"sort\":9,\"url\":\"/goods_list\",\"wxapp_url\":\"/pages/shop/GoodsClass/main\",\"status\":1}', '2020-06-25 18:54:35', NULL, 9, 1, 0); -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\":\"yshop3.0\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-27 15:47:38', 2, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (183, 'yshop_hot_search', '{\"id\":183,\"title\":\"照片\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (184, 'yshop_hot_search', '{\"id\":184,\"title\":\"springboot\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); -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\":\"yshop基于springboot2+Mybatisplus+jwt商城系统\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-27 15:47:22', 4, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (188, 'yshop_hot_search', '{\"id\":188,\"title\":\"打印\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); -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}', '2020-06-25 18:54:35', NULL, 9, 1, 0); -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}', '2020-06-25 18:54:35', NULL, 8, 1, 0); -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}', '2020-06-25 18:54:35', NULL, 7, 1, 0); -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}', '2020-06-25 18:54:35', NULL, 6, 1, 0); -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}', '2020-06-25 18:54:35', NULL, 5, 1, 0); -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}', '2020-06-25 18:54:35', NULL, 4, 1, 0); -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}', '2020-06-25 18:54:35', NULL, 3, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (196, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/xw.png\"],\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"name\":\"图文资讯\",\"id\":196,\"pic\":\"https://image.dayouqiantu.cn/xw.png\",\"sort\":8,\"url\":\"/news_list\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:26:24', 8, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (197, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/colle.png\"],\"uniapp_url\":\"/pages/shop/GoodsCollection/index\",\"name\":\"我的收藏\",\"id\":197,\"pic\":\"https://image.dayouqiantu.cn/colle.png\",\"sort\":7,\"url\":\"/collection\",\"wxapp_url\":\"/pages/shop/GoodsCollection/main\",\"status\":1}', '2020-06-25 18:54:35', NULL, 7, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (199, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/cou.png\"],\"uniapp_url\":\"/pages/user/coupon/GetCoupon/index\",\"name\":\"优惠券\",\"id\":199,\"pic\":\"https://image.dayouqiantu.cn/cou.png\",\"sort\":6,\"url\":\"/user/get_coupon\",\"wxapp_url\":\"/pages/user/coupon/GetCoupon/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:26:36', 6, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (200, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/62ac09d2914d36c65b9b59d2147d809a.png\"],\"uniapp_url\":\"/pages/activity/GoodsGroup/index\",\"name\":\"拼团专区\",\"id\":200,\"pic\":\"https://image.dayouqiantu.cn/62ac09d2914d36c65b9b59d2147d809a.png\",\"sort\":5,\"url\":\"/activity/group\",\"wxapp_url\":\"/pages/activity/GoodsGroup/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:26:45', 5, 1, 0); -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}', '2020-06-25 18:54:35', NULL, 2, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (202, 'yshop_sign_day_num', '{\"sign_num\":\"10\",\"id\":205,\"day\":\"第一天\"}', '2020-06-25 18:54:35', NULL, 9, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (203, 'yshop_sign_day_num', '{\"sign_num\":\"20\",\"id\":\"\",\"day\":\"第二天\"}', '2020-06-25 18:54:35', NULL, 8, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (204, 'yshop_sign_day_num', '{\"sign_num\":\"30\",\"id\":\"\",\"day\":\"第三天\"}', '2020-06-25 18:54:35', NULL, 7, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (205, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"40\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第四天\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 6, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (206, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"50\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第五天\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 5, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (207, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"60\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第六天\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 4, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (208, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"100\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"奖励\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 3, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (209, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/29ea4acebbf99e7eaf6f85af2b6d79ae.png\"],\"uniapp_url\":\"/pages/user/signIn/Sign/index\",\"name\":\"积分签到\",\"id\":209,\"pic\":\"https://image.dayouqiantu.cn/29ea4acebbf99e7eaf6f85af2b6d79ae.png\",\"sort\":4,\"url\":\"/user/sign\",\"wxapp_url\":\"/pages/user/signIn/Sign/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:26:56', 4, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (210, 'yshop_seckill_time', '{\"continued\":2,\"id\":\"\",\"time\":5}', '2020-06-25 18:54:35', NULL, 0, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (211, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"3\",\"id\":\"\",\"sort\":\"\",\"time\":\"7\",\"value\":\"\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (212, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"2\",\"id\":\"\",\"sort\":\"\",\"time\":\"10\",\"value\":\"\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (213, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"3\",\"id\":\"\",\"sort\":\"\",\"time\":\"12\",\"value\":\"\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (214, 'yshop_seckill_time', '{\"continued\":\"10\",\"id\":214,\"time\":\"15\"}', '2020-06-25 18:54:35', '2020-09-05 17:16:06', 0, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (215, 'yshop_seckill_time', '{\"continued\":\"2\",\"id\":223,\"time\":\"19\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (216, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/b0344c148141b50d68db9722708ea49e.png\"],\"uniapp_url\":\"/pages/activity/GoodsSeckill/index\",\"name\":\"秒杀专区\",\"id\":216,\"pic\":\"https://image.dayouqiantu.cn/b0344c148141b50d68db9722708ea49e.png\",\"sort\":3,\"url\":\"/activity/goods_seckill\",\"wxapp_url\":\"/pages/activity/GoodsSeckill/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:27:06', 3, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (217, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/bar.png\"],\"uniapp_url\":\"/pages/activity/GoodsBargain/index\",\"name\":\"砍价专区\",\"id\":217,\"pic\":\"https://image.dayouqiantu.cn/bar.png\",\"sort\":2,\"url\":\"/activity/bargain\",\"wxapp_url\":\"/pages/activity/GoodsBargain/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:27:16', 2, 1, 0); -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}', '2020-06-25 18:54:35', NULL, 1, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (219, 'yshop_home_banner', '{\"name\":\"222\",\"id\":\"\",\"pic\":\"https://image.dayouqiantu.cn/5c9f117f624ee.jpg\",\"sort\":\"\",\"url\":\"/\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (221, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e60da498cfdd.png\"],\"uniapp_url\":\"/pages/orderAdmin/OrderCancellation/index\",\"name\":\"订单核销\",\"id\":221,\"pic\":\"https://image.dayouqiantu.cn/5e60da498cfdd.png\",\"sort\":0,\"url\":\"/order/order_cancellation\",\"wxapp_url\":\"\",\"status\":1}', '2020-06-25 18:54:35', '2020-09-15 15:46:36', 0, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (222, 'yshop_recharge_price_ways', '{\"give_price\":\"10\",\"price\":\"100\",\"id\":\"\",\"sort\":0,\"status\":1}', '2020-06-25 18:54:35', NULL, 1, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (223, 'yshop_recharge_price_ways', '{\"give_price\":\"1000\",\"price\":1,\"id\":223,\"sort\":0,\"status\":1}', '2020-06-25 18:54:35', '2020-09-12 18:34:21', 0, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (224, 'yshop_home_banner', '{\"imageArr\":[\"https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg\"],\"uniapp_url\":\"3\",\"name\":\"3\",\"id\":224,\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200903171807647067.jpg\",\"sort\":0,\"url\":\"3\",\"wxapp_url\":\"\",\"status\":1}', '2020-09-03 17:13:59', '2020-09-15 07:54:11', 0, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (225, 'yshop_my_menus', '{\"imageArr\":[\"https://consoleapi.xinxintuan.co/file/pic/20200911093912577832.png\"],\"uniapp_url\":\"/pages/shop/GoodsFoot/index\",\"name\":\"我的足迹\",\"id\":225,\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200911093912577832.png\",\"sort\":10,\"url\":\"\",\"wxapp_url\":\"\",\"status\":1}', '2020-09-11 09:39:21', '2020-09-11 09:40:49', 10, 1, 0); -INSERT INTO `yx_system_group_data` VALUES (226, 'yshop_home_banner', '{\"imageArr\":[\"https://consoleapi.xinxintuan.co/file/pic/20200915074139926178.jpg\"],\"uniapp_url\":\"\",\"name\":\"sdaas\",\"id\":\"\",\"pic\":\"https://consoleapi.xinxintuan.co/file/pic/20200915074139926178.jpg\",\"sort\":0,\"url\":\"\",\"wxapp_url\":\"\",\"status\":1}', '2020-09-15 07:41:46', NULL, 0, 1, 1); -COMMIT; - --- ---------------------------- --- Table structure for yx_system_store --- ---------------------------- -DROP TABLE IF EXISTS `yx_system_store`; -CREATE TABLE `yx_system_store` ( - `id` int 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 '每日营业开关时间', - `create_time` datetime NOT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `is_show` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否显示', - `is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除', - `day_time_end` datetime DEFAULT NULL, - `day_time_start` datetime DEFAULT NULL, - `valid_time_end` datetime DEFAULT NULL, - `valid_time_start` datetime DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - KEY `phone` (`phone`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='门店自提'; - --- ---------------------------- --- Records of yx_system_store --- ---------------------------- -BEGIN; -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', '2020-06-25 18:54:35', NULL, 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', '河南省信阳市', '', 'https://image.dayouqiantu.cn/noMeal_tt.png', '32.11683', '114.05857', '2020-03-21 - 2020-03-31', '17:11:13 - 20:11:13', '2020-06-25 18:54:35', '2021-04-04 11:47:28', 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', '河南省郑州', '', 'https://image.dayouqiantu.cn/noMeal_tt.png', '34.72468', '113.6401', '2020-03-21 - 2020-03-31', '17:11:13 - 20:11:15', '2020-06-25 18:54:35', '2020-06-26 10:51:21', 1, 1, '2020-03-21 20:11:15', '2020-03-21 17:11:13', '2020-03-31 00:00:00', '2020-03-21 00:00:00'); -COMMIT; - --- ---------------------------- --- Table structure for yx_system_store_staff --- ---------------------------- -DROP TABLE IF EXISTS `yx_system_store_staff`; -CREATE TABLE `yx_system_store_staff` ( - `id` int unsigned NOT NULL AUTO_INCREMENT, - `uid` bigint 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 NOT NULL COMMENT '门店id', - `store_name` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, - `staff_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '店员名称', - `phone` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '手机号码', - `verify_status` tinyint NOT NULL DEFAULT '0' COMMENT '核销开关', - `status` tinyint DEFAULT '1' COMMENT '状态', - `create_time` datetime DEFAULT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=7 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='门店店员表'; - --- ---------------------------- --- Records of yx_system_store_staff --- ---------------------------- -BEGIN; -INSERT INTO `yx_system_store_staff` VALUES (2, 12, '会敲代码的喵2', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', 4, '信阳门店', 'tttt', '15136175423', 1, 1, '2020-06-25 18:54:35', NULL, 1); -INSERT INTO `yx_system_store_staff` VALUES (3, 11, '会敲代码的喵88', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', 5, '郑州门店', 'tttt', '16136175234', 1, 1, '2020-06-25 18:54:35', NULL, 1); -INSERT INTO `yx_system_store_staff` VALUES (4, 19, '15136175528', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', 5, '郑州门店', '111', '15136175246', 1, 1, '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_store_staff` VALUES (5, 20, '15136171112', 'https://image.dayouqiantu.cn/5e79f6cfd33b6.png', 4, '信阳门店', '444', '44444', 1, 1, NULL, '2020-06-26 10:56:09', 0); -INSERT INTO `yx_system_store_staff` VALUES (6, 21, '15136175234', 'https://image.dayouqiantu.cn/5e79f6cfd33b6.png', 4, '信阳门店', '5555', '555555', 1, 1, '2020-06-26 10:53:46', NULL, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_system_user_level --- ---------------------------- -DROP TABLE IF EXISTS `yx_system_user_level`; -CREATE TABLE `yx_system_user_level` ( - `id` int NOT NULL AUTO_INCREMENT, - `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 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 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 '说明', - `create_time` datetime NOT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `is_del` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否删除.1=删除,0=未删除', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=11 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='设置用户等级表'; - --- ---------------------------- --- Records of yx_system_user_level --- ---------------------------- -BEGIN; -INSERT INTO `yx_system_user_level` VALUES (1, '普通会员', 20.00, 0, 1, 0, 1, 1, 99.00, 'http://pic.dayouqiantu.cn/5c9ccca8cd632.jpg', 'http://pic.dayouqiantu.cn/5c9ccca8bc1e0.png', '普通会员', '2020-06-25 18:54:35', NULL, 1); -INSERT INTO `yx_system_user_level` VALUES (2, '青铜会员', 0.00, 0, 1, 0, 1, 2, 98.00, 'http://pic.dayouqiantu.cn/5c9ccca904016.jpg', 'http://pic.dayouqiantu.cn/5c9ccca8f0a30.png', '青铜会员', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_level` VALUES (3, '黄铜会员', 0.00, 0, 1, 0, 1, 3, 95.00, 'http://pic.dayouqiantu.cn/5c9ccca8b27f1.jpg', 'http://pic.dayouqiantu.cn/5c9ccca8e9365.png', '黄铜会员', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_level` VALUES (4, '白银会员', 0.00, 0, 1, 0, 1, 4, 94.00, 'http://pic.dayouqiantu.cn/5c9ccca8d6ae1.jpg', 'http://pic.dayouqiantu.cn/5c9ccca8a27f0.png', '白银会员', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_level` VALUES (5, '黄金会员', 0.00, 0, 1, 0, 1, 5, 90.00, 'http://pic.dayouqiantu.cn/5c9ccca8b27f1.jpg', 'http://pic.dayouqiantu.cn/5c9ccca8aa5b9.png', '黄金会员', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_level` VALUES (6, '钻石会员', 0.00, 0, 1, 0, 1, 6, 88.00, 'http://localhost:8000/file/pic/钻石-20200328094531898.jpg', 'http://pic.dayouqiantu.cn/5c9ccca90d2d3.png', '钻石会员', '2020-06-25 18:54:35', NULL, 1); -COMMIT; - --- ---------------------------- --- Table structure for yx_system_user_task --- ---------------------------- -DROP TABLE IF EXISTS `yx_system_user_task`; -CREATE TABLE `yx_system_user_task` ( - `id` int 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 NOT NULL DEFAULT '0' COMMENT '限定数', - `level_id` int NOT NULL DEFAULT '0' COMMENT '等级id', - `sort` int 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 '任务说明', - `create_time` datetime NOT NULL COMMENT '新增时间', - `update_time` datetime DEFAULT NULL, - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='等级任务设置'; - --- ---------------------------- --- Records of yx_system_user_task --- ---------------------------- -BEGIN; -INSERT INTO `yx_system_user_task` VALUES (1, '满足积分20分', '积分数', 'SatisfactionIntegral', 20, 1, 0, 1, 1, '', '2020-06-25 18:54:35', '2020-06-25 18:54:35', 0); -INSERT INTO `yx_system_user_task` VALUES (2, '消费满100元', '消费金额', 'ConsumptionAmount', 100, 1, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (3, '满足积分200分', '积分数', 'SatisfactionIntegral', 200, 2, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (4, '累计签到20天', '累计签到', 'CumulativeAttendance', 20, 2, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (5, '满足积分500分', '积分数', 'SatisfactionIntegral', 500, 3, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (6, '累计签到30天', '累计签到', 'CumulativeAttendance', 30, 3, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (7, '满足积分1000分', '积分数', 'SatisfactionIntegral', 1000, 4, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (8, '累计签到10天', '累计签到', 'CumulativeAttendance', 10, 4, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (9, '满足积分1200分', '积分数', 'SatisfactionIntegral', 1200, 5, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (10, '累计签到60天', '累计签到', 'CumulativeAttendance', 60, 5, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (11, '消费满10000元', '消费次数', 'ConsumptionAmount', 10000, 5, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (12, '满足积分2000分', '积分数', 'SatisfactionIntegral', 2000, 6, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (13, '消费满10000元', '消费次数', 'ConsumptionAmount', 10000, 6, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (14, '累计签到100天', '累计签到', 'CumulativeAttendance', 100, 6, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (15, '消费满1000元', '消费金额', 'ConsumptionAmount', 1000, 4, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (16, '累计签到2天', '累计签到', 'CumulativeAttendance', 2, 1, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (17, '消费满100元', '消费次数', 'ConsumptionAmount', 100, 2, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -INSERT INTO `yx_system_user_task` VALUES (18, '消费满1000元', '消费金额', 'ConsumptionAmount', 1000, 3, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_user --- ---------------------------- -DROP TABLE IF EXISTS `yx_user`; -CREATE TABLE `yx_user` ( - `uid` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '用户id', - `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户账户(跟accout一样)', - `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户密码(跟pwd)', - `real_name` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '' COMMENT '真实姓名', - `birthday` int DEFAULT '0' COMMENT '生日', - `card_id` varchar(20) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '身份证号码', - `mark` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '用户备注', - `nickname` varchar(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT NULL COMMENT '用户昵称', - `avatar` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户头像', - `phone` char(15) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '手机号码', - `add_ip` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '添加ip', - `create_time` datetime DEFAULT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL COMMENT '最后一次登录时间', - `last_ip` varchar(16) CHARACTER SET utf8 COLLATE utf8_general_ci 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 NOT NULL DEFAULT '0' COMMENT '连续签到天数', - `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '1为正常,0为禁止', - `level` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '等级', - `spread_uid` bigint unsigned DEFAULT '0' COMMENT '推广元id', - `spread_time` datetime DEFAULT NULL COMMENT '推广员关联时间', - `user_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '用户类型', - `is_promoter` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否为推广员', - `pay_count` int unsigned DEFAULT '0' COMMENT '用户购买次数', - `spread_count` int DEFAULT '0' COMMENT '下级人数', - `addres` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '详细地址', - `adminid` int unsigned DEFAULT '0' COMMENT '管理员编号 ', - `login_type` varchar(36) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '用户登陆类型,h5,wechat,routine', - `wx_profile` json DEFAULT NULL COMMENT '微信用户json信息', - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`uid`) USING BTREE, - UNIQUE KEY `username` (`username`) USING BTREE, - KEY `spreaduid` (`spread_uid`) USING BTREE, - KEY `level` (`level`) USING BTREE, - KEY `status` (`status`) USING BTREE, - KEY `is_promoter` (`is_promoter`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户表'; - --- ---------------------------- --- Records of yx_user --- ---------------------------- -BEGIN; -INSERT INTO `yx_user` VALUES (1, '222', '222', '222', 20, '2', '2', '2', '2', '2', '', NULL, '2021-04-04 15:19:28', '', 0.00, 0.00, 0.00, 0, 1, 0, 0, NULL, '2', 0, 0, 0, '', 0, '', NULL, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_user_address --- ---------------------------- -DROP TABLE IF EXISTS `yx_user_address`; -CREATE TABLE `yx_user_address` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '用户地址id', - `uid` bigint 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 '收货人所在市', - `city_id` int DEFAULT NULL, - `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 unsigned NOT NULL DEFAULT '0' COMMENT '是否默认', - `is_del` tinyint unsigned NOT NULL DEFAULT '0' COMMENT '是否删除', - `create_time` datetime NOT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - PRIMARY KEY (`id`) USING BTREE, - KEY `uid` (`uid`) USING BTREE, - KEY `is_default` (`is_default`) USING BTREE, - KEY `is_del` (`is_del`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=36 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户地址表'; - --- ---------------------------- --- Records of yx_user_address --- ---------------------------- -BEGIN; -INSERT INTO `yx_user_address` VALUES (24, 40, '陶子', '13666666666', '北京市', '北京市', 2, '朝阳区', '哈哈哈家', '', '0', '0', 0, 0, '2020-09-12 14:54:31', NULL); -INSERT INTO `yx_user_address` VALUES (25, 43, '张先生', '18888888888', '天津市', '天津市', 7363, '和平区', '6666', '', '0', '0', 0, 0, '2020-09-12 17:04:50', '2020-09-13 02:29:33'); -INSERT INTO `yx_user_address` VALUES (26, 53, 'hahsdhsd', '15601064107', '北京市', '北京市', 2, '东城区', 'wqwewe', '', '0', '0', 0, 0, '2020-09-13 02:29:33', '2020-09-13 11:01:30'); -INSERT INTO `yx_user_address` VALUES (27, 44, '胡先生', '18888888888', '北京市', '北京市', 2, '东城区', '999', '', '0', '0', 0, 0, '2020-09-13 10:17:00', '2020-09-13 11:01:30'); -INSERT INTO `yx_user_address` VALUES (28, 53, '12', '15601064107', '山西省', '长治市', 72975, '长治县', '21231', '', '0', '0', 0, 0, '2020-09-13 11:01:30', '2020-09-13 21:33:36'); -INSERT INTO `yx_user_address` VALUES (29, 42, '阿萨德', '18888888888', '天津市', '天津市', 7363, '河东区', '阿萨打算打', '', '0', '0', 0, 0, '2020-09-13 21:33:36', '2020-09-13 22:04:49'); -INSERT INTO `yx_user_address` VALUES (30, 50, 'Hhhh', '18888888888', '河北省', '邯郸市', 26779, '复兴区', 'Hhhh', '', '0', '0', 0, 0, '2020-09-13 22:04:49', '2020-09-13 22:05:05'); -INSERT INTO `yx_user_address` VALUES (31, 54, '胡新生', '15136175234', '北京市', '北京市', 2, '东城区', '999', '', '0', '0', 0, 0, '2020-09-13 22:05:05', '2020-09-14 00:00:20'); -INSERT INTO `yx_user_address` VALUES (32, 49, 'Hhhh', '18855555555', '天津市', '天津市', 7363, '河东区', 'Yyyy', '', '0', '0', 0, 0, '2020-09-14 00:00:20', '2020-09-14 00:03:47'); -INSERT INTO `yx_user_address` VALUES (33, 59, '胡先生', '15136175245', '天津市', '天津市', 7363, '和平区', '666', '', '0', '0', 0, 0, '2020-09-14 00:03:47', '2020-09-14 10:02:22'); -INSERT INTO `yx_user_address` VALUES (34, 61, '胡先生', '15136175246', '北京市', '北京市', 2, '东城区', '666', '', '0', '0', 0, 0, '2020-09-14 10:02:22', '2020-09-14 12:53:03'); -INSERT INTO `yx_user_address` VALUES (35, 71, '666', '18888888888', '天津市', '天津市', 7363, '河东区', '摸摸', '', '0', '0', 1, 0, '2020-09-14 12:53:03', NULL); -COMMIT; - --- ---------------------------- --- Table structure for yx_user_bill --- ---------------------------- -DROP TABLE IF EXISTS `yx_user_bill`; -CREATE TABLE `yx_user_bill` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT COMMENT '用户账单id', - `uid` bigint 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 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 '备注', - `create_time` datetime NOT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `status` tinyint(1) NOT NULL DEFAULT '1' COMMENT '0 = 带确定 1 = 有效 -1 = 无效', - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - KEY `openid` (`uid`) USING BTREE, - KEY `status` (`status`) USING BTREE, - KEY `add_time` (`create_time`) USING BTREE, - KEY `pm` (`pm`) USING BTREE, - KEY `type` (`category`,`type`,`link_id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户账单表'; - --- ---------------------------- --- Records of yx_user_bill --- ---------------------------- -BEGIN; -INSERT INTO `yx_user_bill` VALUES (1, 11, '1', 0, '购买商品', 'now_money', 'pay_product', 119.80, 7381.31, '余额支付', '2020-06-25 18:54:35', NULL, 1, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_user_extract --- ---------------------------- -DROP TABLE IF EXISTS `yx_user_extract`; -CREATE TABLE `yx_user_extract` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `uid` bigint unsigned DEFAULT NULL, - `real_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '名称', - `extract_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT 'bank' COMMENT 'bank = 银行卡 alipay = 支付宝wx=微信', - `bank_code` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '0' COMMENT '银行卡', - `bank_address` varchar(256) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '开户地址', - `alipay_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT '' COMMENT '支付宝账号', - `extract_price` decimal(8,2) unsigned DEFAULT '0.00' COMMENT '提现金额', - `mark` varchar(512) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL, - `balance` decimal(8,2) unsigned DEFAULT '0.00', - `fail_msg` varchar(128) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '无效原因', - `fail_time` datetime DEFAULT NULL, - `create_time` datetime DEFAULT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `status` tinyint DEFAULT '0' COMMENT '-1 未通过 0 审核中 1 已提现', - `wechat` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '微信号', - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - KEY `extract_type` (`extract_type`) USING BTREE, - KEY `status` (`status`) USING BTREE, - KEY `add_time` (`create_time`) USING BTREE, - KEY `openid` (`uid`) USING BTREE, - KEY `fail_time` (`fail_time`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户提现表'; - --- ---------------------------- --- Records of yx_user_extract --- ---------------------------- -BEGIN; -INSERT INTO `yx_user_extract` VALUES (1, 11, '会敲代码的喵', 'weixin', '0', '', '', 1.00, NULL, 5.00, '失败了', '2020-09-13 12:25:52', '2020-06-25 18:54:35', '2020-09-13 12:25:52', -1, 'hu', 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_user_group --- ---------------------------- -DROP TABLE IF EXISTS `yx_user_group`; -CREATE TABLE `yx_user_group` ( - `id` smallint unsigned NOT NULL AUTO_INCREMENT, - `group_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '用户分组名称', - PRIMARY KEY (`id`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户分组表'; - --- ---------------------------- --- Records of yx_user_group --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for yx_user_level --- ---------------------------- -DROP TABLE IF EXISTS `yx_user_level`; -CREATE TABLE `yx_user_level` ( - `id` int NOT NULL AUTO_INCREMENT, - `uid` bigint NOT NULL DEFAULT '0' COMMENT '用户uid', - `level_id` int NOT NULL DEFAULT '0' COMMENT '等级vip', - `grade` int NOT NULL DEFAULT '0' COMMENT '会员等级', - `valid_time` int NOT NULL DEFAULT '0' COMMENT '过期时间', - `is_forever` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否永久', - `mer_id` int 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=删除', - `create_time` datetime NOT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `discount` int NOT NULL DEFAULT '0' COMMENT '享受折扣', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `id` (`id`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户等级记录表'; - --- ---------------------------- --- Records of yx_user_level --- ---------------------------- -BEGIN; -COMMIT; - --- ---------------------------- --- Table structure for yx_user_recharge --- ---------------------------- -DROP TABLE IF EXISTS `yx_user_recharge`; -CREATE TABLE `yx_user_recharge` ( - `id` bigint unsigned NOT NULL AUTO_INCREMENT, - `uid` bigint DEFAULT NULL COMMENT '充值用户UID', - `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci DEFAULT '', - `order_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '订单号', - `price` decimal(8,2) DEFAULT NULL COMMENT '充值金额', - `give_price` decimal(8,2) DEFAULT '0.00' COMMENT '购买赠送金额', - `recharge_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '充值类型', - `paid` tinyint(1) DEFAULT NULL COMMENT '是否充值', - `pay_time` datetime DEFAULT NULL COMMENT '充值支付时间', - `create_time` datetime DEFAULT NULL COMMENT '充值时间', - `update_time` datetime DEFAULT NULL, - `refund_price` decimal(10,2) DEFAULT '0.00' COMMENT '退款金额', - `is_del` tinyint DEFAULT '0', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `order_id` (`order_id`) USING BTREE, - KEY `uid` (`uid`) USING BTREE, - KEY `recharge_type` (`recharge_type`) USING BTREE, - KEY `paid` (`paid`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='用户充值表'; - --- ---------------------------- --- Records of yx_user_recharge --- ---------------------------- -BEGIN; -INSERT INTO `yx_user_recharge` VALUES (1, 11, 'hupeng', '1234428298159718400', 200.00, 0.00, 'weixin', 0, NULL, '2020-06-25 18:54:35', NULL, 0.00, 0); -COMMIT; - --- ---------------------------- --- Table structure for yx_user_sign --- ---------------------------- -DROP TABLE IF EXISTS `yx_user_sign`; -CREATE TABLE `yx_user_sign` ( - `int` bigint NOT NULL AUTO_INCREMENT, - `uid` bigint NOT NULL DEFAULT '0' COMMENT '用户uid', - `title` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '签到说明', - `number` int NOT NULL DEFAULT '0' COMMENT '获得积分', - `balance` int NOT NULL DEFAULT '0' COMMENT '剩余积分', - `create_time` datetime NOT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `is_del` tinyint(1) DEFAULT '0', - PRIMARY KEY (`int`) USING BTREE, - KEY `uid` (`uid`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=19 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='签到记录表'; - --- ---------------------------- --- Records of yx_user_sign --- ---------------------------- -BEGIN; -INSERT INTO `yx_user_sign` VALUES (17, 43, '签到奖励', 10, 10, '2020-09-12 17:41:55', NULL, 0); -INSERT INTO `yx_user_sign` VALUES (18, 44, '签到奖励', 10, 0, '2020-09-13 22:21:57', NULL, 0); -COMMIT; - --- ---------------------------- --- 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 COMMENT '缓存数据', - `add_time` int DEFAULT NULL COMMENT '缓存时间', - PRIMARY KEY (`key`) USING BTREE -) ENGINE=InnoDB DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='微信缓存表'; - --- ---------------------------- --- Records of yx_wechat_menu --- ---------------------------- -BEGIN; -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); -COMMIT; - --- ---------------------------- --- Table structure for yx_wechat_reply --- ---------------------------- -DROP TABLE IF EXISTS `yx_wechat_reply`; -CREATE TABLE `yx_wechat_reply` ( - `id` mediumint 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 unsigned NOT NULL DEFAULT '1' COMMENT '0=不可用 1 =可用', - `hide` tinyint unsigned DEFAULT '0' COMMENT '是否隐藏', - PRIMARY KEY (`id`) USING BTREE, - UNIQUE KEY `key` (`key`) USING BTREE, - KEY `type` (`type`) USING BTREE, - KEY `status` (`status`) USING BTREE, - KEY `hide` (`hide`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=2 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='微信关键字回复表'; - --- ---------------------------- --- Records of yx_wechat_reply --- ---------------------------- -BEGIN; -INSERT INTO `yx_wechat_reply` VALUES (1, 'subscribe', 'text', '{\"content\":\"22222222222444499990000\"}', 1, NULL); -COMMIT; - --- ---------------------------- --- Table structure for yx_wechat_template --- ---------------------------- -DROP TABLE IF EXISTS `yx_wechat_template`; -CREATE TABLE `yx_wechat_template` ( - `id` int 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 DEFAULT NULL COMMENT '模板ID', - `create_time` datetime NOT NULL COMMENT '添加时间', - `update_time` datetime DEFAULT NULL, - `status` tinyint NOT NULL DEFAULT '0' COMMENT '状态', - `is_del` tinyint(1) DEFAULT '0', - `type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '类型:template:模板消息 subscribe:订阅消息', - PRIMARY KEY (`id`) USING BTREE, - KEY `tempkey` (`tempkey`) USING BTREE -) ENGINE=InnoDB AUTO_INCREMENT=16 DEFAULT CHARSET=utf8 ROW_FORMAT=DYNAMIC COMMENT='微信模板'; - --- ---------------------------- --- Records of yx_wechat_template --- ---------------------------- -BEGIN; -INSERT INTO `yx_wechat_template` VALUES (3, 'delivery_success', '订单发货提醒', '{{first.DATA}}\n订单编号:{{keyword1.DATA}}\n物流公司:{{keyword2.DATA}}\n物流单号:{{keyword3.DATA}}\n{{remark.DATA}}', 'NyrkeQ5TDFDq0GV0wkNA9L39GzPHfzbQqVLnbA5OTsY', '2020-06-25 18:54:35', '2020-07-06 15:52:09', 1, 1, NULL); -INSERT INTO `yx_wechat_template` VALUES (13, 'pay_success', '订单支付成功通知', '{{first.DATA}}\n订单编号:{{keyword1.DATA}}\n支付金额:{{keyword2.DATA}}\n{{remark.DATA}}', 'W5r2c2kzhbq8uxStkPAVx_sk-5aapMFCqe7b7KU5jXI', '2020-06-25 18:54:35', '2020-09-14 12:51:34', 1, 0, 'subscribe'); -INSERT INTO `yx_wechat_template` VALUES (14, 'recharge_success', '帐户资金变动提醒', '{{first.DATA}}\n变动类型:{{keyword1.DATA}}\n变动时间:{{keyword2.DATA}}\n变动金额:{{keyword3.DATA}}\n{{remark.DATA}}', 'ePF4RS3ONCEuS9AuPyqZ2Th_B-HZ6E1CIpnJRt7ACwI', '2020-06-25 18:54:35', '2020-07-06 15:51:54', 1, 0, NULL); -INSERT INTO `yx_wechat_template` VALUES (15, 'refund_success', '退款进度通知', '', 'jaDVkOdbbk01WcWSxp1_liEQen44-euhj7shxjDvLIc', '2020-07-06 15:53:10', NULL, 0, 0, NULL); -COMMIT; - -SET FOREIGN_KEY_CHECKS = 1; diff --git a/sql/yshop3.2.sql b/sql/yshop3.2.sql new file mode 100644 index 0000000000000000000000000000000000000000..0e33e459b2515fe886af8acbd48032a3b6d0dc62 --- /dev/null +++ b/sql/yshop3.2.sql @@ -0,0 +1,7415 @@ +/* + Navicat Premium Data Transfer + + Source Server : 本地 + Source Server Type : MySQL + Source Server Version : 50729 + Source Host : localhost:3306 + Source Schema : yshopb2c + + Target Server Type : MySQL + Target Server Version : 50729 + File Encoding : 65001 + + Date: 21/12/2020 13:37:30 +*/ + +SET NAMES utf8mb4; +SET FOREIGN_KEY_CHECKS = 0; + +-- ---------------------------- +-- Table structure for tools_alipay_config +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_after_sales_status`; +CREATE TABLE `yx_store_after_sales_status` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `store_after_sales_id` bigint(20) DEFAULT NULL COMMENT '售后id', + `change_type` tinyint(1) DEFAULT NULL COMMENT '操作类型', + `change_message` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT '操作备注', + `change_time` datetime DEFAULT NULL COMMENT '操作时间', + `operator` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '操作人', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='售后订单操作详情表'; + +DROP TABLE IF EXISTS `yx_store_after_sales_item`; +CREATE TABLE `yx_store_after_sales_item` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id', + `store_after_sales_id` bigint(20) DEFAULT NULL COMMENT '售后id', + `product_id` bigint(20) DEFAULT NULL COMMENT '商品id', + `cart_info` text COLLATE utf8_bin NOT NULL COMMENT '退货东西的详情信息', + `is_del` bit(1) DEFAULT NULL COMMENT '逻辑删除', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='售后子表'; + +DROP TABLE IF EXISTS `yx_store_after_sales`; +CREATE TABLE `yx_store_after_sales` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `order_code` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '订单号', + `refund_amount` decimal(32,8) DEFAULT NULL COMMENT '退款金额', + `service_type` tinyint(1) DEFAULT NULL COMMENT '服务类型0仅退款1退货退款', + `reasons` text COLLATE utf8_bin COMMENT '申请原因', + `explains` text COLLATE utf8_bin COMMENT '说明', + `explain_img` text COLLATE utf8_bin COMMENT '说明图片->多个用逗号分割', + `shipper_code` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '物流公司编码', + `delivery_sn` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '物流单号', + `delivery_name` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '物流名称', + `state` tinyint(1) DEFAULT NULL COMMENT '状态 0已提交等待平台审核 1平台已审核 等待用户发货/退款 2 用户已发货 3退款成功', + `sales_state` tinyint(1) DEFAULT NULL COMMENT '售后状态-0正常1用户取消2商家拒绝', + `create_time` datetime DEFAULT NULL COMMENT '添加时间', + `is_del` tinyint(1) DEFAULT NULL COMMENT '逻辑删除', + `user_id` bigint(20) DEFAULT NULL COMMENT '用户id', + `consignee` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '商家收货人', + `phone_number` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '商家手机号', + `address` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '商家地址', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='售后记录表'; + + +DROP TABLE IF EXISTS `tools_alipay_config`; +CREATE TABLE `tools_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 tools_alipay_config +-- ---------------------------- +INSERT INTO `tools_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 = 386 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, 'sys_users_roles', 'user_id', 'bigint', NULL, '', b'1', NULL, 'PRI', b'1', b'1', NULL, '用户ID', NULL); +INSERT INTO `column_config` VALUES (140, 'sys_users_roles', 'role_id', 'bigint', NULL, '', b'1', NULL, 'PRI', b'1', b'1', NULL, '角色ID', NULL); +INSERT INTO `column_config` VALUES (141, 'sys_user_avatar', 'id', 'bigint', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '', NULL); +INSERT INTO `column_config` VALUES (142, 'sys_user_avatar', 'real_name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '真实文件名', NULL); +INSERT INTO `column_config` VALUES (143, 'sys_user_avatar', 'path', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '路径', NULL); +INSERT INTO `column_config` VALUES (144, 'sys_user_avatar', 'size', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '大小', NULL); +INSERT INTO `column_config` VALUES (145, 'sys_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); +INSERT INTO `column_config` VALUES (334, 'yx_store_product_rule', 'id', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '', NULL); +INSERT INTO `column_config` VALUES (335, 'yx_store_product_rule', 'rule_name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '规格名称', NULL); +INSERT INTO `column_config` VALUES (336, 'yx_store_product_rule', 'rule_value', 'json', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '规格值', NULL); +INSERT INTO `column_config` VALUES (337, 'yx_store_product_rule', 'create_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '', NULL); +INSERT INTO `column_config` VALUES (338, 'yx_store_product_rule', 'update_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '', NULL); +INSERT INTO `column_config` VALUES (339, 'yx_store_product_rule', 'is_del', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '', NULL); +INSERT INTO `column_config` VALUES (340, 'yx_shipping_templates', 'id', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '模板ID', NULL); +INSERT INTO `column_config` VALUES (341, 'yx_shipping_templates', 'name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '模板名称', NULL); +INSERT INTO `column_config` VALUES (342, 'yx_shipping_templates', 'type', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '计费方式', NULL); +INSERT INTO `column_config` VALUES (343, 'yx_shipping_templates', 'region_info', 'text', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '地域以及费用', NULL); +INSERT INTO `column_config` VALUES (344, 'yx_shipping_templates', 'appoint', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '指定包邮开关', NULL); +INSERT INTO `column_config` VALUES (345, 'yx_shipping_templates', 'appoint_info', 'text', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '指定包邮内容', NULL); +INSERT INTO `column_config` VALUES (346, 'yx_shipping_templates', 'create_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '添加时间', NULL); +INSERT INTO `column_config` VALUES (347, 'yx_shipping_templates', 'update_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '', NULL); +INSERT INTO `column_config` VALUES (348, 'yx_shipping_templates', 'is_del', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '', NULL); +INSERT INTO `column_config` VALUES (349, 'yx_shipping_templates', 'sort', 'int', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '排序', NULL); +INSERT INTO `column_config` VALUES (350, 'yx_shipping_templates_region', 'id', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '编号', NULL); +INSERT INTO `column_config` VALUES (351, 'yx_shipping_templates_region', 'province_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '省ID', NULL); +INSERT INTO `column_config` VALUES (352, 'yx_shipping_templates_region', 'temp_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '模板ID', NULL); +INSERT INTO `column_config` VALUES (353, 'yx_shipping_templates_region', 'city_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '城市ID', NULL); +INSERT INTO `column_config` VALUES (354, 'yx_shipping_templates_region', 'first', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '首件', NULL); +INSERT INTO `column_config` VALUES (355, 'yx_shipping_templates_region', 'first_price', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '首件运费', NULL); +INSERT INTO `column_config` VALUES (356, 'yx_shipping_templates_region', 'continues', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '续件', NULL); +INSERT INTO `column_config` VALUES (357, 'yx_shipping_templates_region', 'continue_price', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '续件运费', NULL); +INSERT INTO `column_config` VALUES (358, 'yx_shipping_templates_region', 'type', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '计费方式', NULL); +INSERT INTO `column_config` VALUES (359, 'yx_shipping_templates_region', 'uniqid', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '分组唯一值', NULL); +INSERT INTO `column_config` VALUES (360, 'yx_shipping_templates_free', 'id', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '编号', NULL); +INSERT INTO `column_config` VALUES (361, 'yx_shipping_templates_free', 'province_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '省ID', NULL); +INSERT INTO `column_config` VALUES (362, 'yx_shipping_templates_free', 'temp_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '模板ID', NULL); +INSERT INTO `column_config` VALUES (363, 'yx_shipping_templates_free', 'city_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '城市ID', NULL); +INSERT INTO `column_config` VALUES (364, 'yx_shipping_templates_free', 'number', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '包邮件数', NULL); +INSERT INTO `column_config` VALUES (365, 'yx_shipping_templates_free', 'price', 'decimal', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '包邮金额', NULL); +INSERT INTO `column_config` VALUES (366, 'yx_shipping_templates_free', 'type', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '计费方式', NULL); +INSERT INTO `column_config` VALUES (367, 'yx_shipping_templates_free', 'uniqid', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '分组唯一值', NULL); +INSERT INTO `column_config` VALUES (368, 'yx_system_city', 'id', 'int', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '', NULL); +INSERT INTO `column_config` VALUES (369, 'yx_system_city', 'city_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '城市id', NULL); +INSERT INTO `column_config` VALUES (370, 'yx_system_city', 'level', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '省市级别', NULL); +INSERT INTO `column_config` VALUES (371, 'yx_system_city', 'parent_id', 'int', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '父级id', NULL); +INSERT INTO `column_config` VALUES (372, 'yx_system_city', 'area_code', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '区号', NULL); +INSERT INTO `column_config` VALUES (373, 'yx_system_city', 'name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '名称', NULL); +INSERT INTO `column_config` VALUES (374, 'yx_system_city', 'merger_name', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '合并名称', NULL); +INSERT INTO `column_config` VALUES (375, 'yx_system_city', 'lng', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '经度', NULL); +INSERT INTO `column_config` VALUES (376, 'yx_system_city', 'lat', 'varchar', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '纬度', NULL); +INSERT INTO `column_config` VALUES (377, 'yx_system_city', 'is_show', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '是否展示', NULL); +INSERT INTO `column_config` VALUES (378, 'yx_store_product_relation', 'id', 'bigint', NULL, 'auto_increment', b'1', NULL, 'PRI', b'1', b'0', NULL, '', NULL); +INSERT INTO `column_config` VALUES (379, 'yx_store_product_relation', 'uid', 'bigint', NULL, '', b'1', NULL, 'MUL', b'1', b'1', NULL, '用户ID', NULL); +INSERT INTO `column_config` VALUES (380, 'yx_store_product_relation', 'product_id', 'bigint', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '商品ID', NULL); +INSERT INTO `column_config` VALUES (381, 'yx_store_product_relation', 'type', 'varchar', NULL, '', b'1', NULL, 'MUL', b'1', b'0', NULL, '类型(收藏(collect)、点赞(like))', NULL); +INSERT INTO `column_config` VALUES (382, 'yx_store_product_relation', 'category', 'varchar', NULL, '', b'1', NULL, 'MUL', b'1', b'0', NULL, '某种类型的商品(普通商品、秒杀商品)', NULL); +INSERT INTO `column_config` VALUES (383, 'yx_store_product_relation', 'create_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'1', NULL, '添加时间', NULL); +INSERT INTO `column_config` VALUES (384, 'yx_store_product_relation', 'update_time', 'datetime', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '', NULL); +INSERT INTO `column_config` VALUES (385, 'yx_store_product_relation', 'is_del', 'tinyint', NULL, '', b'1', NULL, '', b'1', b'0', NULL, '', NULL); + +-- ---------------------------- +-- Table structure for sys_dept +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dept`; +CREATE TABLE `sys_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 '创建日期', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '部门' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of sys_dept +-- ---------------------------- +INSERT INTO `sys_dept` VALUES (1, 'YSHOP', 0, b'1', '2019-03-01 12:07:37', NULL, 0); +INSERT INTO `sys_dept` VALUES (2, '研发部', 7, b'1', '2019-03-25 09:15:32', NULL, 0); +INSERT INTO `sys_dept` VALUES (5, '运维部', 7, b'1', '2019-03-25 09:20:44', NULL, 0); +INSERT INTO `sys_dept` VALUES (6, '测试部', 8, b'1', '2019-03-25 09:52:18', NULL, 0); +INSERT INTO `sys_dept` VALUES (7, '华南分部', 1, b'1', '2019-03-25 11:04:50', NULL, 0); +INSERT INTO `sys_dept` VALUES (8, '华北分部', 1, b'1', '2019-03-25 11:04:53', NULL, 0); +INSERT INTO `sys_dept` VALUES (11, '人事部', 8, b'1', '2019-03-25 11:07:58', NULL, 0); +INSERT INTO `sys_dept` VALUES (12, '7773', 1, b'1', '2020-05-18 19:43:53', NULL, 0); + +-- ---------------------------- +-- Table structure for sys_dict +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dict`; +CREATE TABLE `sys_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 '创建日期', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 18 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of sys_dict +-- ---------------------------- +INSERT INTO `sys_dict` VALUES (1, 'user_status', '用户状态', '2019-10-27 20:31:36', NULL, 0); +INSERT INTO `sys_dict` VALUES (4, 'dept_status', '部门状态', '2019-10-27 20:31:36', NULL, 0); +INSERT INTO `sys_dict` VALUES (5, 'job_status', '岗位状态', '2019-10-27 20:31:36', NULL, 0); +INSERT INTO `sys_dict` VALUES (6, '33', '3', '2020-05-18 19:55:49', NULL, 0); +INSERT INTO `sys_dict` VALUES (16, 'force_update', '强制升级', '2020-12-09 11:13:21', NULL, 0); +INSERT INTO `sys_dict` VALUES (17, 'is_enable', '是否启用', '2020-12-10 12:02:57', NULL, 0); + +-- ---------------------------- +-- Table structure for sys_dict_detail +-- ---------------------------- +DROP TABLE IF EXISTS `sys_dict_detail`; +CREATE TABLE `sys_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 '创建日期', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `FK5tpkputc6d9nboxojdbgnpmyb`(`dict_id`) USING BTREE, + CONSTRAINT `FK5tpkputc6d9nboxojdbgnpmyb` FOREIGN KEY (`dict_id`) REFERENCES `sys_dict` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB AUTO_INCREMENT = 24 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '数据字典详情' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of sys_dict_detail +-- ---------------------------- +INSERT INTO `sys_dict_detail` VALUES (1, '激活', 'true', '1', 1, '2019-10-27 20:31:36', NULL, 0); +INSERT INTO `sys_dict_detail` VALUES (2, '禁用', 'false', '2', 1, NULL, NULL, 0); +INSERT INTO `sys_dict_detail` VALUES (3, '启用', 'true', '1', 4, NULL, NULL, 0); +INSERT INTO `sys_dict_detail` VALUES (4, '停用', 'false', '2', 4, '2019-10-27 20:31:36', NULL, 0); +INSERT INTO `sys_dict_detail` VALUES (5, '启用2', 'true', '1', 5, NULL, NULL, 0); +INSERT INTO `sys_dict_detail` VALUES (6, '停用', 'false', '2', 5, '2019-10-27 20:31:36', NULL, 0); +INSERT INTO `sys_dict_detail` VALUES (7, '8', '8', '999', NULL, '2020-05-18 19:44:05', NULL, 0); +INSERT INTO `sys_dict_detail` VALUES (8, '99', '999', '999', NULL, '2020-05-18 19:44:31', NULL, 0); +INSERT INTO `sys_dict_detail` VALUES (20, '是', '1', '999', 16, '2020-12-09 11:41:30', NULL, 0); +INSERT INTO `sys_dict_detail` VALUES (21, '否', '0', '999', 16, '2020-12-09 11:41:36', NULL, 0); +INSERT INTO `sys_dict_detail` VALUES (22, '是', '1', '999', 17, '2020-12-10 12:03:09', NULL, 0); +INSERT INTO `sys_dict_detail` VALUES (23, '否', '0', '999', 17, '2020-12-10 12:03:16', NULL, 0); + +-- ---------------------------- +-- Table structure for tools_email_config +-- ---------------------------- +DROP TABLE IF EXISTS `tools_email_config`; +CREATE TABLE `tools_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 tools_email_config +-- ---------------------------- +INSERT INTO `tools_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 = 17 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, '门店店员'); +INSERT INTO `gen_config` VALUES (11, 'yx_store_product_rule', 'hupeng', b'0', 'yshop-mall', 'co.yixiang.modules', 'product', 'product\\', NULL, 'sku规则'); +INSERT INTO `gen_config` VALUES (12, 'yx_shipping_templates', 'hupeng', b'0', 'yshop-mall', 'co.yixiang.modules', 'product', 'product\\', NULL, '运费模板'); +INSERT INTO `gen_config` VALUES (13, 'yx_shipping_templates_region', 'hupeng', b'0', 'yshop-mall', 'co.yixiang.modules', 'product', 'product\\', NULL, '运费模板区域'); +INSERT INTO `gen_config` VALUES (14, 'yx_shipping_templates_free', 'hupeng', b'0', 'yshop-mall', 'co.yixiang.modules', 'product', 'product\\', NULL, '运费模板免费'); +INSERT INTO `gen_config` VALUES (15, 'yx_system_city', 'hupeng', b'0', 'yshop-mall', 'co.yixiang.modules', 'product', 'product\\', NULL, '城市'); +INSERT INTO `gen_config` VALUES (16, 'yx_store_product_relation', 'hupeng', b'0', 'yshop-mall', 'co.yixiang.modules.product', 'd:/', 'd:/', NULL, 'ProductRelation'); + +-- ---------------------------- +-- 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; + +-- ---------------------------- +-- Records of gen_test +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_job +-- ---------------------------- +DROP TABLE IF EXISTS `sys_job`; +CREATE TABLE `sys_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 '创建日期', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `FKmvhj0rogastlctflsxf1d6k3i`(`dept_id`) USING BTREE, + CONSTRAINT `FKmvhj0rogastlctflsxf1d6k3i` FOREIGN KEY (`dept_id`) REFERENCES `sys_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 sys_job +-- ---------------------------- +INSERT INTO `sys_job` VALUES (8, '人事专员', b'1', 3, 11, '2019-03-29 14:52:28', NULL, 0); +INSERT INTO `sys_job` VALUES (10, '产品经理', b'1', 4, 2, '2019-03-29 14:55:51', NULL, 0); +INSERT INTO `sys_job` VALUES (11, '全栈开发2', b'1', 2, 2, '2019-03-31 13:39:30', NULL, 0); +INSERT INTO `sys_job` VALUES (12, '软件测试', b'1', 5, 2, '2019-03-31 13:39:43', NULL, 0); + +-- ---------------------------- +-- Table structure for tools_local_storage +-- ---------------------------- +DROP TABLE IF EXISTS `tools_local_storage`; +CREATE TABLE `tools_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 = 64 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '本地存储' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of tools_local_storage +-- ---------------------------- +INSERT INTO `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_local_storage` VALUES (45, '钻石-20200328094531898.jpg', '钻石', 'jpg', 'E:\\yshop\\file\\pic\\钻石-20200328094531898.jpg', 'pic', '32.42KB ', 'admin', '2020-03-28 21:45:32'); +INSERT INTO `tools_local_storage` VALUES (46, '20200527164526793230.png', 'list_13', 'png', 'D:\\yshop\\file\\pic\\20200527164526793230.png', 'pic', '23.05KB ', 'admin', '2020-05-27 16:45:27'); +INSERT INTO `tools_local_storage` VALUES (47, '20200527164543489004.png', 'list_18', 'png', 'D:\\yshop\\file\\pic\\20200527164543489004.png', 'pic', '29.62KB ', 'admin', '2020-05-27 16:45:43'); +INSERT INTO `tools_local_storage` VALUES (48, '20200623200105269693.png', 'list_13', 'png', 'D:\\yshop\\file\\pic\\20200623200105269693.png', 'pic', '23.05KB ', 'yshop', '2020-06-23 20:01:05'); +INSERT INTO `tools_local_storage` VALUES (49, '20200623200118648188.png', 'list_18', 'png', 'D:\\yshop\\file\\pic\\20200623200118648188.png', 'pic', '29.62KB ', 'yshop', '2020-06-23 20:01:19'); +INSERT INTO `tools_local_storage` VALUES (50, '20200626110808157592.png', 'list_34', 'png', 'D:\\yshop\\file\\pic\\20200626110808157592.png', 'pic', '27.05KB ', 'yshop', '2020-06-26 11:08:08'); +INSERT INTO `tools_local_storage` VALUES (51, '20200626172220229003.png', 'list_16', 'png', 'D:\\yshop\\file\\pic\\20200626172220229003.png', 'pic', '28.93KB ', 'yshop', '2020-06-26 17:22:20'); +INSERT INTO `tools_local_storage` VALUES (52, '20200626173520849370.png', 'list_18', 'png', 'D:\\yshop\\file\\pic\\20200626173520849370.png', 'pic', '29.62KB ', 'yshop', '2020-06-26 17:35:21'); +INSERT INTO `tools_local_storage` VALUES (53, '20200626173943611335.png', 'list_34', 'png', 'D:\\yshop\\file\\pic\\20200626173943611335.png', 'pic', '27.05KB ', 'yshop', '2020-06-26 17:39:44'); +INSERT INTO `tools_local_storage` VALUES (54, '20200903171003417769.png', 'avatar_default', 'png', '/home/yshop/file/pic/20200903171003417769.png', 'pic', '54.06KB ', 'yshop', '2020-09-03 17:10:03'); +INSERT INTO `tools_local_storage` VALUES (55, '20200903171208889668.png', 'avatar_default', 'png', '/home/yshop/file/pic/20200903171208889668.png', 'pic', '54.06KB ', 'yshop', '2020-09-03 17:12:09'); +INSERT INTO `tools_local_storage` VALUES (56, '20200903171351713145.jpg', '1', 'jpg', '/home/yshop/file/pic/20200903171351713145.jpg', 'pic', '126.59KB ', 'yshop', '2020-09-03 17:13:52'); +INSERT INTO `tools_local_storage` VALUES (57, '20200903171807568739.jpg', '4', 'jpg', '/home/yshop/file/pic/20200903171807568739.jpg', 'pic', '68.57KB ', 'yshop', '2020-09-03 17:18:08'); +INSERT INTO `tools_local_storage` VALUES (58, '20200903171807584910.jpg', '3', 'jpg', '/home/yshop/file/pic/20200903171807584910.jpg', 'pic', '34.32KB ', 'yshop', '2020-09-03 17:18:08'); +INSERT INTO `tools_local_storage` VALUES (59, '20200903171807625149.jpg', '5', 'jpg', '/home/yshop/file/pic/20200903171807625149.jpg', 'pic', '81.55KB ', 'yshop', '2020-09-03 17:18:08'); +INSERT INTO `tools_local_storage` VALUES (60, '20200903171807641535.jpg', '6', 'jpg', '/home/yshop/file/pic/20200903171807641535.jpg', 'pic', '61.97KB ', 'yshop', '2020-09-03 17:18:08'); +INSERT INTO `tools_local_storage` VALUES (61, '20200903171807647067.jpg', '7', 'jpg', '/home/yshop/file/pic/20200903171807647067.jpg', 'pic', '76.04KB ', 'yshop', '2020-09-03 17:18:08'); +INSERT INTO `tools_local_storage` VALUES (62, '20200911093912577832.png', 'avatar_default', 'png', '/home/yshop/file/pic/20200911093912577832.png', 'pic', '54.06KB ', 'admin', '2020-09-11 09:39:13'); +INSERT INTO `tools_local_storage` VALUES (63, '20200915074139926178.jpg', '1600126884(1)', 'jpg', '/home/yshop/file/pic/20200915074139926178.jpg', 'pic', '23.64KB ', 'yshop', '2020-09-15 07:41:40'); + +-- ---------------------------- +-- Table structure for sys_log +-- ---------------------------- +DROP TABLE IF EXISTS `sys_log`; +CREATE TABLE `sys_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, + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 45 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统日志' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of log +-- ---------------------------- +INSERT INTO `sys_log` VALUES (1, '2020-12-20 12:20:56', '用户登录', NULL, 'INFO', 'co.yixiang.modules.security.rest.AuthController.login()', '{ authUser: {username=admin, password= ******} request: SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@4ee2d4e7]] }', '192.168.31.223', 1725, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (2, '2020-12-20 12:21:07', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.31.223', 45, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (3, '2020-12-20 12:21:14', '查询', NULL, 'INFO', 'co.yixiang.modules.shop.rest.SystemConfigController.getYxSystemConfigs()', '{ criteria: YxSystemConfigQueryCriteria() pageable: Page request [number: 0, size 50, sort: UNSORTED] }', '192.168.31.223', 4, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (4, '2020-12-20 12:21:16', '查询wxlive', NULL, 'INFO', 'co.yixiang.modules.wechat.rest.YxWechatLiveController.getYxWechatLives()', '{ criteria: YxWechatLiveQueryCriteria(liveStatus=null) pageable: Page request [number: 0, size 10, sort: room_id: DESC] }', '192.168.31.223', 45, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (5, '2020-12-20 12:21:19', '查询yxWechatLiveGoods', NULL, 'INFO', 'co.yixiang.modules.wechat.rest.YxWechatLiveGoodsController.getYxWechatLiveGoodss()', '{ criteria: YxWechatLiveGoodsQueryCriteria(name=null) pageable: Page request [number: 0, size 10, sort: goods_id: DESC] }', '192.168.31.223', 8, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (6, '2020-12-20 12:21:22', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.category.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria(cateName=null) pageable: Page request [number: 0, size 10, sort: sort: DESC] }', '192.168.31.223', 19, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (7, '2020-12-20 12:21:23', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 47, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (8, '2020-12-20 12:21:23', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 13, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (9, '2020-12-20 12:25:02', '查询素材分组', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialGroupController.getYxMaterialGroups()', '{ criteria: YxMaterialGroupQueryCriteria() pageable: Page request [number: 1, size 100, sort: create_time: DESC] }', '192.168.31.223', 22, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (10, '2020-12-20 12:25:02', '查询素材管理', NULL, 'INFO', 'co.yixiang.modules.shop.rest.MaterialController.getYxMaterials()', '{ criteria: YxMaterialQueryCriteria(groupId=null) pageable: Page request [number: 0, size 12, sort: create_time: DESC] }', '192.168.31.223', 21, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (11, '2020-12-20 12:30:06', '查询拼团', 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.31.223', 13, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (12, '2020-12-20 12:30:08', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 37, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (13, '2020-12-20 12:30:25', '查询拼团', 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.31.223', 3, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (14, '2020-12-20 12:30:29', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 28, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (15, '2020-12-20 12:31:43', '列表', 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.31.223', 23, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (16, '2020-12-20 12:31:46', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 20, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (17, '2020-12-20 12:31: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.31.223', 21, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (18, '2020-12-20 12:31:55', '查询砍价', NULL, 'INFO', 'co.yixiang.modules.activity.rest.StoreBargainController.getYxStoreBargains()', '{ criteria: YxStoreBargainQueryCriteria() pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 233, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (19, '2020-12-20 12:31:56', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 17, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (20, '2020-12-20 12:32: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.31.223', 3, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (21, '2020-12-20 12:32:18', '查询yxWechatLiveGoods', NULL, 'INFO', 'co.yixiang.modules.wechat.rest.YxWechatLiveGoodsController.getYxWechatLiveGoodss()', '{ criteria: YxWechatLiveGoodsQueryCriteria(name=null) pageable: Page request [number: 0, size 10, sort: goods_id: DESC] }', '192.168.31.223', 4, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (22, '2020-12-20 12:32:21', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.category.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria(cateName=null) pageable: Page request [number: 0, size 10, sort: sort: DESC] }', '192.168.31.223', 3, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (23, '2020-12-20 12:32:21', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 8, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (24, '2020-12-20 12:32:21', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 15, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (25, '2020-12-20 20:56:56', '用户登录', NULL, 'INFO', 'co.yixiang.modules.security.rest.AuthController.login()', '{ authUser: {username=admin, password= ******} request: SecurityContextHolderAwareRequestWrapper[ FirewalledRequest[ org.apache.catalina.connector.RequestFacade@4aab466d]] }', '192.168.31.223', 980, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (26, '2020-12-20 20:57:18', '查询商品分类', NULL, 'INFO', 'co.yixiang.modules.category.rest.StoreCategoryController.getYxStoreCategorys()', '{ criteria: YxStoreCategoryQueryCriteria(cateName=null) pageable: Page request [number: 0, size 10, sort: sort: DESC] }', '192.168.31.223', 16, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (27, '2020-12-20 20:57:18', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 79, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (28, '2020-12-20 20:57:18', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 11, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (29, '2020-12-20 20:57:22', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 17, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (30, '2020-12-20 20:57:22', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 41, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (31, '2020-12-20 20:58:32', '新增/修改商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.create()', '{ storeProductDto: StoreProductDto(id=6, image=https://app2.yixiang.co/file/pic/20200903171807641535.jpg, sliderImage=[https://app2.yixiang.co/file/pic/20200903171807641535.jpg], storeName=印刷各种印刷, storeInfo=印刷各种印刷, keyword=印刷各种印刷, barCode=, cateId=3, price=11.0, otPrice=null, postage=0.0, unitName=张, sort=1, sales=35, stock=9965, isShow=1, isHot=1, isBenefit=1, isBest=0, isNew=0, description=

印刷各种印刷

, isPostage=0, giveIntegral=1.0, cost=22.0, isGood=0, isSub=0, ficti=1, tempId=34, specType=0, items=[], attrs=[co.yixiang.modules.product.service.dto.ProductFormatDto@e1b7fc1]) }', '192.168.31.223', 71, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (32, '2020-12-20 20:58:33', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 20, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (33, '2020-12-20 20:58:34', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 9, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (34, '2020-12-20 20:59:11', '新增/修改商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.create()', '{ storeProductDto: StoreProductDto(id=8, image=https://image.dayouqiantu.cn/5ca081af6183f.jpg, sliderImage=[https://image.dayouqiantu.cn/5ca081af6183f.jpg, https://image.dayouqiantu.cn/5ca081af6183f.jpg, https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg], storeName=多规格商品测试, storeInfo=多规格商品测试, keyword=多规格商品测试, barCode=, cateId=5, price=4.0, otPrice=null, postage=0.0, unitName=张, sort=0, sales=5, stock=501, isShow=1, isHot=1, isBenefit=1, isBest=1, isNew=1, description=


, isPostage=0, giveIntegral=0.0, cost=1.0, isGood=0, isSub=1, ficti=0, tempId=34, specType=1, items=[co.yixiang.modules.product.service.dto.FromatDetailDto@3a1b9d03, co.yixiang.modules.product.service.dto.FromatDetailDto@5fb12695], attrs=[co.yixiang.modules.product.service.dto.ProductFormatDto@1796c183, co.yixiang.modules.product.service.dto.ProductFormatDto@3a45a7cd, co.yixiang.modules.product.service.dto.ProductFormatDto@2d318da6, co.yixiang.modules.product.service.dto.ProductFormatDto@55342aab, co.yixiang.modules.product.service.dto.ProductFormatDto@2ee2163f, co.yixiang.modules.product.service.dto.ProductFormatDto@5c1e7c4f]) }', '192.168.31.223', 33, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (35, '2020-12-20 20:59:13', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 10, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (36, '2020-12-20 20:59:13', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 22, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (37, '2020-12-20 21:16:55', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 14, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (38, '2020-12-20 21:16:55', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 21, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (39, '2020-12-20 21:17:50', '新增/修改商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.create()', '{ storeProductDto: StoreProductDto(id=8, image=https://image.dayouqiantu.cn/5ca081af6183f.jpg, sliderImage=[https://image.dayouqiantu.cn/5ca081af6183f.jpg, https://image.dayouqiantu.cn/5ca081af6183f.jpg, https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg], storeName=多规格商品测试, storeInfo=多规格商品测试, keyword=多规格商品测试, barCode=, cateId=5, price=4.0, otPrice=null, postage=0.0, unitName=张, sort=0, sales=5, stock=501, isShow=1, isHot=1, isBenefit=1, isBest=1, isNew=1, description=


, isPostage=0, giveIntegral=0.0, cost=1.0, isGood=0, isSub=1, isIntegral=1, ficti=0, tempId=34, specType=1, items=[co.yixiang.modules.product.service.dto.FromatDetailDto@36bccf62, co.yixiang.modules.product.service.dto.FromatDetailDto@7b1f6e6c], attrs=[co.yixiang.modules.product.service.dto.ProductFormatDto@30145eea, co.yixiang.modules.product.service.dto.ProductFormatDto@5527d9d7, co.yixiang.modules.product.service.dto.ProductFormatDto@4a8b9843, co.yixiang.modules.product.service.dto.ProductFormatDto@2d753c48, co.yixiang.modules.product.service.dto.ProductFormatDto@6829cf6a, co.yixiang.modules.product.service.dto.ProductFormatDto@1757112f]) }', '192.168.31.223', 139, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (40, '2020-12-20 21:17:52', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 56, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (41, '2020-12-20 21:17:52', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 91, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (42, '2020-12-20 21:18:17', '新增/修改商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.create()', '{ storeProductDto: StoreProductDto(id=8, image=https://image.dayouqiantu.cn/5ca081af6183f.jpg, sliderImage=[https://image.dayouqiantu.cn/5ca081af6183f.jpg, https://image.dayouqiantu.cn/5ca081af6183f.jpg, https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg], storeName=多规格商品测试, storeInfo=多规格商品测试, keyword=多规格商品测试, barCode=, cateId=5, price=4.0, otPrice=null, postage=0.0, unitName=张, sort=0, sales=5, stock=501, isShow=1, isHot=1, isBenefit=1, isBest=1, isNew=1, description=


, isPostage=0, giveIntegral=0.0, cost=1.0, isGood=0, isSub=1, isIntegral=1, ficti=0, tempId=34, specType=1, items=[co.yixiang.modules.product.service.dto.FromatDetailDto@6166fb7a, co.yixiang.modules.product.service.dto.FromatDetailDto@57f40cb6], attrs=[co.yixiang.modules.product.service.dto.ProductFormatDto@314d446d, co.yixiang.modules.product.service.dto.ProductFormatDto@329a3a74, co.yixiang.modules.product.service.dto.ProductFormatDto@17886021, co.yixiang.modules.product.service.dto.ProductFormatDto@69eefe37, co.yixiang.modules.product.service.dto.ProductFormatDto@18f4fa22, co.yixiang.modules.product.service.dto.ProductFormatDto@2dfea217]) }', '192.168.31.223', 26, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (43, '2020-12-20 21:18:18', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=0, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 12, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); +INSERT INTO `sys_log` VALUES (44, '2020-12-20 21:18:18', '查询商品', NULL, 'INFO', 'co.yixiang.modules.product.rest.StoreProductController.getYxStoreProducts()', '{ criteria: YxStoreProductQueryCriteria(storeName=null, isDel=0, isShow=1, cateId=null) pageable: Page request [number: 0, size 10, sort: id: DESC] }', '192.168.31.223', 37, 'admin', ' 局域网', NULL, 0, 1, NULL, 0); + +-- ---------------------------- +-- Table structure for sys_menu +-- ---------------------------- +DROP TABLE IF EXISTS `sys_menu`; +CREATE TABLE `sys_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 '类型', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `FKqcf9gem97gqa5qjm4d3elcqt5`(`pid`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 264 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of menu +-- ---------------------------- +INSERT INTO `sys_menu` VALUES (1, b'0', '系统管理', NULL, 0, 99, 'system', 'system', b'0', b'0', NULL, '2018-12-18 15:11:29', NULL, 1, '2020-07-16 20:05:34', 0); +INSERT INTO `sys_menu` VALUES (2, b'0', '用户管理', 'system/user/index', 1, 2, 'peoples', 'user', b'0', b'0', 'User', '2018-12-18 15:14:44', 'user:list', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (3, b'0', '角色管理', 'system/role/index', 1, 3, 'role', 'role', b'0', b'0', 'Role', '2018-12-18 15:16:07', 'roles:list', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (5, b'0', '菜单管理', 'system/menu/index', 1, 5, 'menu', 'menu', b'0', b'0', 'Menu', '2018-12-18 15:17:28', 'menu:list', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (6, b'0', '系统监控', NULL, 0, 100, 'monitor', 'monitor', b'0', b'0', NULL, '2018-12-18 15:17:48', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (7, b'0', '操作日志', 'monitor/log/index', 6, 11, 'log', 'logs', b'1', b'0', 'Log', '2018-12-18 15:18:26', 'log:list', 1, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_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, '2020-08-06 22:57:28', 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_menu` VALUES (30, b'0', '代码生成', 'generator/index', 36, 22, 'dev', 'generator', b'0', b'0', 'GeneratorIndex', '2019-01-11 15:45:55', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (32, b'0', '异常日志', 'monitor/log/errorLog', 6, 12, 'error', 'errorLog', b'0', b'0', 'ErrorLog', '2019-01-13 13:49:03', 'logError:list,logError:detail', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (35, b'0', '部门管理', 'system/dept/index', 1, 6, 'dept', 'dept', b'0', b'0', 'Dept', '2019-03-25 09:46:00', 'dept:list', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (36, b'0', '系统工具', '', 0, 101, 'sys-tools', 'sys-tools', b'0', b'0', NULL, '2019-03-29 10:57:35', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (37, b'0', '岗位管理', 'system/job/index', 1, 7, 'Steve-Jobs', 'job', b'0', b'0', 'Job', '2019-03-29 13:51:18', 'user:list', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (39, b'0', '字典管理', 'system/dict/index', 1, 8, 'dictionary', 'dict', b'0', b'0', 'Dict', '2019-04-10 11:49:04', 'dict:list', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (40, b'0', '商品管理', '', 0, 1, 'shop', 'shop', b'1', b'0', '', '2019-10-03 17:40:19', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (41, b'0', '商品分类', 'shop/cate/index', 40, 11, 'icon', 'cate', b'0', b'0', 'Cate', '2019-10-03 17:42:35', 'YXSTORECATEGORY_ALL,YXSTORECATEGORY_SELECT', 1, NULL, 0); +INSERT INTO `sys_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,YXSTORECATEGORY_ALL,YXSTORECATEGORY_SELECT,YXSYSTEMGROUPDATA_SELECT', 1, '2020-08-06 23:01:36', 0); +INSERT INTO `sys_menu` VALUES (46, b'0', '会员管理', '', 0, 2, 'peoples', 'member', b'0', b'0', '', '2019-10-06 16:18:05', NULL, 1, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_menu` VALUES (48, b'0', '微信管理', '', 0, 14, 'weixin', 'wechat', b'0', b'0', '', '2019-10-06 18:28:54', NULL, 1, '2020-06-26 15:18:32', 0); +INSERT INTO `sys_menu` VALUES (49, b'0', '微信菜单', 'wechat/menu/index', 48, 31, 'menu', 'wemenu', b'0', b'0', 'WeMenu', '2019-10-06 18:31:06', 'YxWechatMenu_ALL,YxWechatMenu_SELECT', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (50, b'0', '图文管理', 'wechat/article/index', 48, 32, 'article', 'wearticle', b'0', b'0', 'WeArticle', '2019-10-07 17:33:45', 'YXARTICLE_ALL,YXARTICLE_SELECT', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (51, b'0', '自动回复', 'wechat/reply/index', 48, 33, 'reply', 'wereply', b'0', b'0', 'Wereply', '2019-10-10 09:58:31', 'YXWECHATREPLY_ALL', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (52, b'0', '公众号配置', 'wechat/config/index', 48, 34, 'configure', 'weconfig', b'0', b'0', 'WeConfig', '2019-10-10 15:52:24', 'YXSYSTEMCONFIG_ALL', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (53, b'0', '订单管理', '', 0, 4, 'lock', 'order', b'0', b'0', '', '2019-10-14 14:35:18', NULL, 1, NULL, 0); +INSERT INTO `sys_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,YXEXPRESS_SELECT', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (55, b'0', '商城配置', '', 0, 15, 'configure', 'set', b'0', b'0', '', '2019-10-18 15:21:26', NULL, 1, '2020-06-26 15:18:20', 0); +INSERT INTO `sys_menu` VALUES (60, b'0', '热门搜索', 'shop/set/hot', 55, 55, 'search', 'hot', b'0', b'0', 'Hot', '2019-10-26 18:21:54', 'YXSYSTEMGROUPDATA_ALL,YXSYSTEMGROUPDATA_SELECT', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (61, b'0', '个人中心菜单', 'shop/set/usermenu', 55, 56, 'menu', 'userMenu', b'0', b'0', 'UserMenu', '2019-10-26 18:42:18', 'YXSYSTEMGROUPDATA_ALL,YXSYSTEMGROUPDATA_SELECT', 1, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_menu` VALUES (63, b'0', '营销管理', '', 0, 6, 'yingxiao', 'activity', b'0', b'0', '', '2019-11-09 14:17:42', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (64, b'0', '优惠券制作', 'activity/coupon/index', 229, 61, 'coupon', 'coupon', b'0', b'0', 'Coupon', '2019-11-09 14:18:58', 'YXSTORECOUPON_SELECT', 1, '2020-06-26 15:16:40', 0); +INSERT INTO `sys_menu` VALUES (65, b'0', '已发布优惠券', 'activity/couponissue/index', 229, 62, 'coupon2', 'couponissue', b'0', b'0', 'Couponissue', '2019-11-09 14:20:35', 'YXSTORECOUPONISSUE_SELECT', 1, '2020-06-26 15:16:48', 0); +INSERT INTO `sys_menu` VALUES (66, b'0', '优惠券领取记录', 'activity/storecouponuser/index', 229, 63, 'log', 'couponuser', b'0', b'0', 'Couponuser', '2019-11-09 14:21:35', 'YXSTORECOUPONUSER_SELECT,YXSTORECOUPONUSER_SELECT', 1, '2020-08-06 23:11:10', 0); +INSERT INTO `sys_menu` VALUES (68, b'0', '积分配置', 'wechat/config/point', 227, 59, 'configure', 'pointConfig', b'0', b'0', 'PointConfig', '2019-11-10 18:45:55', 'YXSYSTEMCONFIG_SELECT,YXSYSTEMCONFIG_SELECT', 1, '2020-08-06 23:09:31', 0); +INSERT INTO `sys_menu` VALUES (69, b'0', '分销管理', '', 0, 7, 'fenxiao', 'promoter', b'0', b'0', '', '2019-11-11 10:42:16', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (70, b'0', '分销配置', 'wechat/config/promoter', 69, 71, 'configure', 'promoterconfig', b'0', b'0', 'Promoterconfig', '2019-11-11 10:48:37', 'YXSYSTEMCONFIG_SELECT,YXSYSTEMCONFIG_SELECT', 1, '2020-08-06 23:12:31', 0); +INSERT INTO `sys_menu` VALUES (71, b'0', '分销员', 'shop/user/aindex', 69, 72, 'user', 'agent', b'0', b'0', 'Agent', '2019-11-13 18:32:00', 'YXUSER_SELECT', 1, NULL, 1); +INSERT INTO `sys_menu` VALUES (72, b'0', '提现管理', 'activity/extract/index', 176, 81, 'tixian', 'extract', b'0', b'0', 'Extract', '2019-11-14 10:49:39', 'YXUSEREXTRACT_SELECT,YXUSEREXTRACT_SELECT', 1, '2020-08-06 23:07:28', 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_menu` VALUES (74, b'0', '拼团列表', 'activity/combinlist/index', 63, 65, 'list', 'pink', b'0', b'0', 'Pink', '2019-11-21 19:35:58', 'YXSTOREPINK_SELECT', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (75, b'0', '微信支付配置', 'wechat/config/pay', 48, 35, 'wxpay', 'wxpayconfig', b'0', b'0', 'Wxpayconfig', '2019-11-28 17:06:22', 'YXSYSTEMCONFIG_ALL', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (76, b'0', '小程序配置', 'wechat/config/wxapp', 48, 36, 'configure', 'wxapp', b'0', b'0', 'Wxapp', '2019-11-29 15:13:46', 'YXSYSTEMCONFIG_ALL', 1, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_menu` VALUES (79, b'0', '签到天数配置', 'shop/set/sign', 227, 61, 'sign2', 'signday', b'0', b'0', 'Signday', '2019-12-05 14:12:16', 'YXSYSTEMGROUPDATA_ALL,YXSYSTEMGROUPDATA_SELECT', 1, '2020-06-26 15:09:25', 0); +INSERT INTO `sys_menu` VALUES (80, b'0', '用户账单', 'shop/user/bill', 46, 24, 'list', 'bill', b'0', b'0', 'Bill', '2019-12-11 17:28:38', 'YXUSERBILL_ALL,YXUSERBILL_SELECT', 1, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_menu` VALUES (82, b'0', '微信模板消息', 'wechat/template/index', 48, 35, 'anq', 'template', b'0', b'0', 'Template', '2019-12-13 14:42:50', 'yxWechatTemplate:list', 1, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_menu` VALUES (84, b'0', '秒杀配置', 'shop/set/seckill', 63, 67, 'configure', 'seckillconfig', b'0', b'0', 'Seckillconfig', '2019-12-16 16:07:42', 'YXSYSTEMGROUPDATA_SELECT', 1, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_menu` VALUES (117, b'0', '图表库', 'components/Echarts', 10, 50, 'chart', 'echarts', b'1', b'0', 'Echarts', '2019-11-21 09:04:32', '', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (118, b'0', '商品新增', 'shop/goods/form', 40, 1, 'anq', 'goodsAdd', b'0', b'1', 'GoodsAdd', '2019-12-24 13:00:47', 'YXSTOREPRODUCT_EDIT', 1, '2020-07-10 16:45:19', 0); +INSERT INTO `sys_menu` VALUES (119, b'0', '商品修改', 'shop/goods/form', 40, 3, 'anq', 'goodsEdit/:id', b'0', b'1', 'GoodsEdit', '2019-12-24 13:02:23', 'YXSTOREPRODUCT_CREATE', 1, '2020-07-10 16:45:33', 0); +INSERT INTO `sys_menu` VALUES (120, b'0', '商品删除', NULL, 45, 4, NULL, NULL, b'0', b'0', NULL, '2019-12-24 13:03:51', 'YXSTOREPRODUCT_DELETE', 2, '2020-07-10 16:22:51', 0); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_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, NULL, 1); +INSERT INTO `sys_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, NULL, 0); +INSERT INTO `sys_menu` VALUES (124, b'0', '在线会员', 'monitor/online/indext', 46, 25, 'Steve-Jobs', 'onlinet', b'0', b'0', 'OnlineMember', '2020-01-13 10:53:07', 'auth_online', 1, '2020-08-06 22:50:49', 0); +INSERT INTO `sys_menu` VALUES (125, b'0', '邮费配置', 'wechat/config/postage', 55, 58, 'configure', 'postageConfig', b'0', b'0', 'PostageConfig', '2020-02-13 15:38:24', 'YXSYSTEMCONFIG_SELECT', 1, NULL, 1); +INSERT INTO `sys_menu` VALUES (126, b'0', '编辑', NULL, 54, 1, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:05:28', 'YXSTOREORDER_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (127, b'0', '用户新增', NULL, 2, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:12:21', 'user:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (128, b'0', '用户编辑', NULL, 2, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:12:47', 'user:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (129, b'0', '用户删除', NULL, 2, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:13:08', 'user:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (130, b'0', '角色创建', NULL, 3, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:13:49', 'roles:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (131, b'0', '角色修改', NULL, 3, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:14:11', 'roles:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (132, b'0', '角色删除', NULL, 3, 999, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:14:38', 'roles:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (133, b'0', '菜单新增', NULL, 5, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:15:05', 'menu:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (134, b'0', '菜单编辑', NULL, 5, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:18:44', 'menu:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (135, b'0', '菜单删除', NULL, 5, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:19:05', 'menu:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (136, b'0', '部门新增', NULL, 35, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:21:07', 'dept:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (137, b'0', '部门编辑', NULL, 35, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:21:33', 'dept:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (138, b'0', '部门删除', NULL, 35, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:21:53', 'dept:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (139, b'0', '岗位新增', NULL, 37, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:29:04', 'job:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (140, b'0', '岗位编辑', NULL, 37, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:48:38', 'job:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (141, b'0', '岗位删除', NULL, 37, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:49:00', 'job:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (142, b'0', '字典新增', NULL, 39, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:49:26', 'dict:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (143, b'0', '字典编辑', NULL, 39, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:49:39', 'dict:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (144, b'0', '字典删除', NULL, 39, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:49:56', 'dict:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (147, b'0', '上传文件', NULL, 18, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:53:49', 'storage:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (148, b'0', '文件编辑', NULL, 18, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:54:06', 'storage:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (149, b'0', '文件删除', NULL, 18, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:54:27', 'storage:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (150, b'0', '任务新增', NULL, 28, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:55:58', 'timing:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (151, b'0', '任务编辑', NULL, 28, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:56:54', 'timing:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (152, b'0', '任务删除', NULL, 28, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 21:57:10', 'timing:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (153, b'0', '新增分类', NULL, 41, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:00:41', 'YXSTORECATEGORY_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (154, b'0', '分类编辑', NULL, 41, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:01:15', 'YXSTORECATEGORY_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (155, b'0', '分类删除', NULL, 41, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:01:37', 'YXSTORECATEGORY_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (156, b'0', '修改会员', NULL, 47, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:03:40', 'YXUSER_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (157, b'0', '等级新增', NULL, 77, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:06:55', 'YXSYSTEMUSERLEVEL_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (158, b'0', '等级编辑', NULL, 77, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:08:03', 'YXSYSTEMUSERLEVEL_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (159, b'0', '等级删除', NULL, 77, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:08:41', 'YXSYSTEMUSERLEVEL_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (160, b'0', '编辑任务', NULL, 78, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:10:08', 'YXSYSTEMUSERTASK_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (161, b'0', '评论删除', NULL, 62, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:14:22', 'YXSTOREPRODUCTREPLY_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (162, b'0', '新增物流', NULL, 81, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:15:33', 'YXEXPRESS_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (163, b'0', '编辑物流', NULL, 81, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:15:53', 'YXEXPRESS_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (164, b'0', '删除物流', NULL, 81, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:16:11', 'YXEXPRESS_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (165, b'0', '新增优惠券', NULL, 64, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:18:32', 'YXSTORECOUPON_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (166, b'0', '编辑优惠券', NULL, 64, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:18:50', 'YXSTORECOUPON_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (167, b'0', '删除优惠券', NULL, 64, 4, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:19:10', 'YXSTORECOUPON_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (168, b'0', '编辑已发布', NULL, 65, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:20:23', 'YXSTORECOUPONISSUE_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (169, b'0', '删除已发布', NULL, 65, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:20:42', 'YXSTORECOUPONISSUE_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (170, b'0', '编辑拼团', NULL, 73, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:24:15', 'YXSTORECOMBINATION_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (171, b'0', '删除拼团', NULL, 73, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:24:37', 'YXSTORECOMBINATION_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (172, b'0', '编辑秒杀', NULL, 83, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:25:23', 'YXSTORESECKILL_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (173, b'0', '删除秒杀', NULL, 83, 3, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:25:41', 'YXSTORESECKILL_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (174, b'0', '编辑砍价', NULL, 86, 2, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:26:20', 'YXSTOREBARGAIN_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (175, b'0', '删除砍价', NULL, 86, 999, NULL, NULL, b'0', b'0', NULL, '2020-02-14 22:26:40', 'YXSTOREBARGAIN_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (176, b'0', '财务管理', NULL, 0, 8, 'price', 'price', b'0', b'0', NULL, '2020-03-02 22:30:23', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (177, b'0', '充值管理', 'shop/recharge/index', 176, 82, 'rec', 'recharge', b'0', b'0', 'Recharge', '2020-03-02 23:05:26', 'yxUserRecharge:list', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (178, b'0', '门店管理', NULL, 0, 9, 'store', 'store', b'0', b'0', NULL, '2020-03-03 17:27:53', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (179, b'0', '门店列表', 'shop/store/index', 178, 92, 'edit', 'storeinfo', b'0', b'0', 'Storeinfo', '2020-03-03 17:29:09', 'yxSystemStore:list', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (180, b'0', '门店配置', 'shop/store/set', 178, 91, 'configure', 'storeset', b'0', b'0', 'Storeset', '2020-03-04 13:09:54', 'YXSYSTEMCONFIG_SELECT,YXSYSTEMCONFIG_SELECT', 1, '2020-08-06 23:05:23', 0); +INSERT INTO `sys_menu` VALUES (181, b'0', '核销订单', 'shop/order/indext', 178, 95, 'order', 'ordert', b'0', b'0', 'Ordert', '2020-03-05 17:04:12', 'YXSTOREORDER_SELECT', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (182, b'0', '充值金额配置', 'shop/set/recharge', 176, 83, 'money', 'rechargeset', b'0', b'0', 'Rechargeset', '2020-03-21 14:24:05', 'YXSYSTEMGROUPDATA_ALL,YXSYSTEMGROUPDATA_SELECT', 1, '2020-06-26 15:11:06', 0); +INSERT INTO `sys_menu` VALUES (183, b'0', '店员列表', 'shop/storestaff/index', 178, 94, 'peoples', 'staff', b'0', b'0', 'Staff', '2020-03-22 14:11:36', 'yxSystemStoreStaff:list', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (184, b'0', '新增菜单', NULL, 49, 0, 'add', NULL, b'0', b'0', NULL, '2020-06-14 20:10:02', 'YxWechatMenu_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (185, b'0', '模板新增', NULL, 82, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:14:17', 'yxWechatTemplate:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (186, b'0', '模板修改', NULL, 82, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:14:46', 'yxWechatTemplate:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (187, b'0', '模板删除', NULL, 82, 3, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:15:10', 'yxWechatTemplate:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (188, b'0', '新增幻灯片', NULL, 56, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:33:48', 'YXSYSTEMGROUPDATA_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (189, b'0', '修改幻灯片', NULL, 56, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:35:11', 'YXSYSTEMGROUPDATA_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (190, b'0', '删除幻灯片', NULL, 56, 3, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:40:30', 'YXSYSTEMGROUPDATA_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (191, b'0', '新增导航按钮', NULL, 57, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:42:43', 'YXSYSTEMGROUPDATA_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (192, b'0', '修改导航按钮', NULL, 57, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:43:53', 'YXSYSTEMGROUPDATA_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (193, b'0', '删除导航按钮', NULL, 57, 3, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:44:43', 'YXSYSTEMGROUPDATA_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (194, b'0', '新增滚动新闻', NULL, 59, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:48:32', 'YXSYSTEMGROUPDATA_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (195, b'0', '修改滚动新闻', NULL, 59, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:48:52', 'YXSYSTEMGROUPDATA_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (196, b'0', '删除滚动新闻', NULL, 59, 3, NULL, NULL, b'0', b'0', NULL, '2020-06-14 20:49:32', 'YXSYSTEMGROUPDATA_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (197, b'0', '新增热门搜索', NULL, 60, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:14:25', 'YXSYSTEMGROUPDATA_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (198, b'0', '修改热门搜索', NULL, 60, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:14:55', 'YXSYSTEMGROUPDATA_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (199, b'0', '删除热门搜索', NULL, 60, 3, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:15:25', 'YXSYSTEMGROUPDATA_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (200, b'0', '新增个人中心菜单', NULL, 61, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:17:47', 'YXSYSTEMGROUPDATA_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (201, b'0', '修改个人中心菜单', NULL, 61, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:18:37', 'YXSYSTEMGROUPDATA_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (202, b'0', '删除个人中心菜单', NULL, 61, 3, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:19:47', 'YXSYSTEMGROUPDATA_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (203, b'0', '新增积分配置', NULL, 68, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:20:47', 'YXSYSTEMCONFIG_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (204, b'0', '新增签到天数', NULL, 79, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:26:32', 'YXSYSTEMGROUPDATA_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (205, b'0', '修改签到天数', NULL, 79, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:26:32', 'YXSYSTEMGROUPDATA_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (206, b'0', '删除签到天数', NULL, 79, 3, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:26:52', 'YXSYSTEMGROUPDATA_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (207, b'0', '新增邮费配置', NULL, 125, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:29:20', 'YXSYSTEMCONFIG_CREATE', 2, NULL, 1); +INSERT INTO `sys_menu` VALUES (208, b'0', '新增充值金额', NULL, 182, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:30:59', 'YXSYSTEMGROUPDATA_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (209, b'0', '修改充值金额', NULL, 182, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:30:30', 'YXSYSTEMGROUPDATA_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (210, b'0', '删除充值金额', NULL, 182, 3, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:30:59', 'YXSYSTEMGROUPDATA_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (211, b'0', '新增秒杀配置', NULL, 84, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:43:36', 'YXSYSTEMGROUPDATA_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (212, b'0', '修改秒杀配置', NULL, 84, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:43:56', 'YXSYSTEMGROUPDATA_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (213, b'0', '删除秒杀配置', NULL, 84, 3, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:23:36', 'YXSYSTEMGROUPDATA_DELETE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (214, b'0', '新增分销配置', NULL, 70, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:46:46', 'YXSYSTEMCONFIG_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (215, b'0', '提现审核', NULL, 72, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:56:11', 'YXUSEREXTRACT_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (216, b'0', '删除充值', NULL, 177, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:59:11', 'yxUserRecharge:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (217, b'0', '导出充值', NULL, 177, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 21:59:54', 'yxUserRecharge:list', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (218, b'0', '新增门店', NULL, 179, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:01:57', 'yxSystemStore:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (219, b'0', '修改门店', NULL, 179, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:02:30', 'yxSystemStore:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (220, b'0', '删除门店', NULL, 179, 3, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:02:57', 'yxSystemStore:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (221, b'0', '新增门店配置', NULL, 180, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:04:25', 'YXSYSTEMCONFIG_CREATE', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (222, b'0', '编辑核销订单', NULL, 181, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:07:26', 'YXSTOREORDER_EDIT', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (223, b'0', '新增店员', NULL, 183, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:11:13', 'yxSystemStoreStaff:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (224, b'0', '修改店员', NULL, 183, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:11:37', 'yxSystemStoreStaff:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (225, b'0', '删除店员', NULL, 183, 3, NULL, NULL, b'0', b'0', NULL, '2020-06-14 22:11:59', 'yxSystemStoreStaff:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (226, b'0', '分销记录', 'shop/user/brobill', 69, 72, 'log', 'prolog', b'0', b'0', 'Prolog', '2020-06-26 14:52:30', 'YXUSERBILL_ALL,YXUSERBILL_SELECT,YXUSERBILL_SELECT', 1, '2020-08-06 23:12:57', 0); +INSERT INTO `sys_menu` VALUES (227, b'0', '积分管理', NULL, 0, 10, 'Sign', 'syspoints', b'0', b'0', '-', '2020-06-26 15:00:59', NULL, 1, '2020-06-26 15:06:11', 0); +INSERT INTO `sys_menu` VALUES (228, b'0', '积分记录', 'shop/user/pobill', 227, 60, 'log', 'pobill', b'0', b'0', 'Pobill', '2020-06-26 15:04:17', 'YXUSERBILL_ALL,YXUSERBILL_SELECT,YXUSERBILL_SELECT', 1, '2020-08-06 23:09:57', 0); +INSERT INTO `sys_menu` VALUES (229, b'0', '电子券管理', NULL, 0, 5, 'coupon', 'syscoupon', b'0', b'0', '', '2020-06-26 15:15:47', NULL, 1, '2020-06-26 15:22:16', 0); +INSERT INTO `sys_menu` VALUES (230, b'0', '商城系统配置', 'wechat/config/shop', 55, 59, 'shop', 'shopconfig', b'0', b'0', 'Shopconfig', '2020-06-26 15:45:32', 'YXSYSTEMCONFIG_SELECT', 1, '2020-07-04 18:50:34', 0); +INSERT INTO `sys_menu` VALUES (231, b'0', '阿里云短信', 'wechat/config/sms', 55, 60, 'sys-tools', 'smsconfig', b'0', b'0', 'Smsconfig', '2020-06-26 16:06:08', 'YXSYSTEMCONFIG_SELECT', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (232, b'0', '快递鸟配置', 'wechat/config/express', 55, 61, 'news', 'expressconfig', b'0', b'0', 'Expressconfig', '2020-06-26 16:08:10', 'YXSYSTEMCONFIG_SELECT', 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (233, b'0', '商品规格', 'shop/storeProductRule/index', 40, 13, 'mnt', 'productRule', b'0', b'0', 'ProductRule', '2020-06-28 16:35:00', 'yxStoreProductRule:list', 1, '2020-07-10 16:21:48', 0); +INSERT INTO `sys_menu` VALUES (234, b'0', '运费模板', 'shop/shippingTemplates/index', 40, 14, 'exit-fullscreen', 'shippingTemplates', b'0', b'0', 'ShippingTemplates', '2020-06-29 17:16:06', 'yxShippingTemplates:list', 1, '2020-07-10 16:57:13', 0); +INSERT INTO `sys_menu` VALUES (235, b'0', '图文添加', 'wechat/article/form', 48, 36, 'article', 'artadd', b'0', b'1', 'Artadd', '2020-07-01 18:50:35', NULL, 1, '2020-07-02 11:24:45', 0); +INSERT INTO `sys_menu` VALUES (236, b'0', '图文编辑', 'wechat/article/form', 48, 37, 'alipay', 'artadd/:id', b'0', b'1', 'Editadd', '2020-07-02 11:24:39', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (237, b'0', '规格新增、修改', NULL, 233, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-28 16:35:00', 'yxStoreProductRule:add,yxStoreProductRule:edit', 2, '2020-07-16 20:09:03', 0); +INSERT INTO `sys_menu` VALUES (238, b'0', '规格删除', NULL, 233, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-28 16:35:00', 'yxStoreProductRule:del', 2, '2020-07-16 20:08:57', 0); +INSERT INTO `sys_menu` VALUES (240, b'0', '新增、修改模板', NULL, 234, 1, NULL, NULL, b'0', b'0', NULL, '2020-06-29 17:16:06', 'yxShippingTemplates:add', 2, '2020-07-16 20:09:11', 0); +INSERT INTO `sys_menu` VALUES (241, b'0', '删除模板', NULL, 234, 2, NULL, NULL, b'0', b'0', NULL, '2020-06-29 17:16:06', 'yxShippingTemplates:del', 2, '2020-07-16 20:09:16', 0); +INSERT INTO `sys_menu` VALUES (242, b'0', '直播管理', 'wechat/live/index', 48, 999, 'weixin', 'wxlive', b'0', b'0', 'Wxlive', '2020-08-10 17:20:54', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (243, b'0', '直播商品管理', 'wechat/goods/index', 48, 999, 'weixin', 'wxlivegoods', b'0', b'0', 'WxliveGoods', '2020-08-10 17:20:54', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (244, b'0', '拼团商品添加', 'activity/combination/form', 63, 999, NULL, 'combinationAdd', b'0', b'1', 'CombinationAdd', '2020-08-13 21:28:45', 'YXSTORECOMBINATION_EDIT', 1, '2020-08-13 21:31:26', 0); +INSERT INTO `sys_menu` VALUES (245, b'0', '拼团商品修改', 'activity/combination/form', 63, 3, 'anq', 'combinationEdit/:id', b'0', b'1', 'CombinationEdit', '2019-12-24 13:02:23', 'YXSTORECOMBINATION_EDIT', 1, '2020-07-10 16:45:33', 0); +INSERT INTO `sys_menu` VALUES (246, b'0', '秒杀商品添加', 'activity/seckill/form', 63, 999, NULL, 'secKillAdd', b'0', b'1', 'SecKillAdd', '2020-08-13 21:28:45', 'YXSTORESECKILL_EDIT', 1, '2020-08-13 21:31:26', 0); +INSERT INTO `sys_menu` VALUES (247, b'0', '秒杀商品修改', 'activity/seckill/form', 63, 3, 'anq', 'secKillEdit/:id', b'0', b'1', 'SecKillEdit', '2019-12-24 13:02:23', 'YXSTORESECKILL_EDIT', 1, '2020-07-10 16:45:33', 0); +INSERT INTO `sys_menu` VALUES (248, b'0', '多级菜单', NULL, 0, 999, 'menu', 'nested', b'0', b'0', '-', '2020-08-19 11:31:10', NULL, 0, NULL, 0); +INSERT INTO `sys_menu` VALUES (249, b'0', '二级菜单1', 'nested/menu1/index', 248, 999, 'menu', 'menu1', b'0', b'0', '-', '2020-08-19 11:34:34', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (250, b'0', '三级菜单1', 'nested/menu1/menu1-1', 249, 999, 'menu', 'menu1-1', b'0', b'0', '-', '2020-08-19 11:35:52', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (251, b'0', '三级菜单2', 'nested/menu1/menu1-2', 249, 999, 'menu', 'menu1-2', b'0', b'0', '-', '2020-08-19 11:37:48', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (252, b'0', '二级菜单2', 'nested/menu2/index', 248, 999, 'menu', 'menu2', b'0', b'0', '-', '2020-08-19 11:38:35', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (253, b'0', '浏览记录', 'monitor/log/mlog', 40, 15, 'log', 'viewlog', b'0', b'0', 'Viewlog', '2020-07-31 09:47:11', 'log:list', 1, '2020-07-31 09:49:39', 0); +INSERT INTO `sys_menu` VALUES (256, b'0', '商品收藏', 'shop/collect/index', 40, 16, 'menu', 'productRelation', b'0', b'0', 'ProductRelation', '2020-09-03 14:32:49', 'yxStoreProductRelation:list', 1, '2020-09-03 16:21:08', 0); +INSERT INTO `sys_menu` VALUES (257, b'0', '用户足迹', 'shop/foot/index', 40, 17, 'list', 'footRelation', b'0', b'0', 'FootRelation', '2020-09-03 16:20:21', 'yxStoreProductRelation:list', 1, '2020-09-03 16:21:16', 0); +INSERT INTO `sys_menu` VALUES (258, b'0', '订单详情', 'shop/order/detail', 53, 999, 'sqlMonitor', 'detail/:id', b'0', b'1', 'Detail', '2020-09-10 07:29:34', NULL, 1, '2020-09-10 08:52:09', 0); +INSERT INTO `sys_menu` VALUES (259, b'0', 'App版本', 'shop/appVersion/index', 55, 999, 'app', 'appVersion', b'0', b'0', '', '2020-12-09 11:04:33', 'yxAppVersion:list', 1, '2020-12-09 11:07:13', 0); +INSERT INTO `sys_menu` VALUES (260, b'0', '订单消息管理', 'shop/customer/index', 55, 4, 'peoples', 'storeCustomer', b'0', b'0', 'msgInfo', '2020-04-02 14:16:43', 'yxStoreCustomer:list', 1, '2020-12-10 11:44:49', 0); +INSERT INTO `sys_menu` VALUES (261, b'0', '添加人员', NULL, 260, 1, NULL, NULL, b'0', b'0', NULL, '2020-04-02 14:18:30', 'yxStoreCustomer:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (262, b'0', '编辑人员', NULL, 260, 2, NULL, NULL, b'0', b'0', NULL, '2020-04-02 14:18:47', 'yxStoreCustomer:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (263, b'0', '删除人员', NULL, 260, 3, NULL, NULL, b'0', b'0', NULL, '2020-04-02 14:19:07', 'yxStoreCustomer:del', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (264, b'0', '终端装修', NULL, 0, 0, 'theme', 'theme', b'0', b'0', '--', '2021-02-25 19:33:17', '', 1, '2021-02-25 19:33:32', 0); +INSERT INTO `sys_menu` VALUES (265, b'0', '商城装修', 'theme/container/index', 264, 999, 'theme', 'container', b'0', b'0', 'Container', '2021-02-25 19:35:13', NULL, 1, NULL, 0); +INSERT INTO `sys_menu` VALUES (266, b'0', '售后', 'shop/afterSeals/index', 53, 44, 'order', 'afterSeals', b'0', b'0', 'AfterSeals', '2021-06-30 15:23:38', 'yxStoreAfterSales:list', 1, '2021-06-30 15:33:14', 0); +INSERT INTO `sys_menu` VALUES (267, b'0', '新增', NULL, 266, 999, NULL, NULL, b'0', b'0', '-', '2021-06-30 15:34:17', 'yxStoreAfterSales:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (268, b'0', '修改', NULL, 266, 999, NULL, NULL, b'0', b'0', '-', '2021-06-30 15:34:39', 'yxStoreAfterSales:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (269, b'0', '删除', NULL, 266, 999, NULL, NULL, b'0', b'0', '-', '2021-06-30 15:34:55', 'yxStoreAfterSales:del', 2, NULL, 0); +-- ---------------------------- +-- 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 tools_picture +-- ---------------------------- +DROP TABLE IF EXISTS `tools_picture`; +CREATE TABLE `tools_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; + +-- ---------------------------- +-- Records of tools_picture +-- ---------------------------- + +-- ---------------------------- +-- Table structure for tools_qiniu_config +-- ---------------------------- +DROP TABLE IF EXISTS `tools_qiniu_config`; +CREATE TABLE `tools_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 tools_qiniu_config +-- ---------------------------- +INSERT INTO `tools_qiniu_config` VALUES (1, 'OJou_rI3QATSsY0MMqkpq0FPvAXpEjs1o4KHuvCx', 'yixiang', 'https://image.dayouqiantu.cn', 'XwNNqLeAnXP754LhkJYmBM6nu1djcc1LUXTDYylY', '公开', '华东'); + +-- ---------------------------- +-- Table structure for tools_qiniu_content +-- ---------------------------- +DROP TABLE IF EXISTS `tools_qiniu_content`; +CREATE TABLE `tools_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 = 28 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '七牛云文件存储' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of tools_qiniu_content +-- ---------------------------- +INSERT INTO `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_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 `tools_qiniu_content` VALUES (14, 'yixiang', 'list_28', '28.38KB ', '公开', '2020-01-11 17:06:00', 'https://image.dayouqiantu.cn/list_28.png', 'png'); +INSERT INTO `tools_qiniu_content` VALUES (15, 'yixiang', 'goods', '2.82KB ', '公开', '2020-06-26 18:20:58', 'https://image.dayouqiantu.cn/goods.png', 'png'); +INSERT INTO `tools_qiniu_content` VALUES (16, 'yixiang', 'coupon', '2.92KB ', '公开', '2020-06-26 18:20:58', 'https://image.dayouqiantu.cn/coupon.png', 'png'); +INSERT INTO `tools_qiniu_content` VALUES (17, 'yixiang', 'buy', '2.59KB ', '公开', '2020-06-26 18:20:58', 'https://image.dayouqiantu.cn/buy.png', 'png'); +INSERT INTO `tools_qiniu_content` VALUES (18, 'yixiang', 'collect', '3.65KB ', '公开', '2020-06-26 18:20:58', 'https://image.dayouqiantu.cn/collect.png', 'png'); +INSERT INTO `tools_qiniu_content` VALUES (19, 'yixiang', 'bargin', '3.39KB ', '公开', '2020-06-26 18:24:51', 'https://image.dayouqiantu.cn/bargin.png', 'png'); +INSERT INTO `tools_qiniu_content` VALUES (20, 'yixiang', 'add', '3.17KB ', '公开', '2020-06-26 18:24:51', 'https://image.dayouqiantu.cn/add.png', 'png'); +INSERT INTO `tools_qiniu_content` VALUES (21, 'yixiang', 'sign', '2.63KB ', '公开', '2020-06-26 18:25:07', 'https://image.dayouqiantu.cn/sign.png', 'png'); +INSERT INTO `tools_qiniu_content` VALUES (22, 'yixiang', 'sekill', '3.54KB ', '公开', '2020-06-26 18:25:07', 'https://image.dayouqiantu.cn/sekill.png', 'png'); +INSERT INTO `tools_qiniu_content` VALUES (23, 'yixiang', 'pink', '3.25KB ', '公开', '2020-06-26 18:25:07', 'https://image.dayouqiantu.cn/pink.png', 'png'); +INSERT INTO `tools_qiniu_content` VALUES (24, 'yixiang', 'news', '2.70KB ', '公开', '2020-06-26 18:25:07', 'https://image.dayouqiantu.cn/news.png', 'png'); +INSERT INTO `tools_qiniu_content` VALUES (25, 'yixiang', '5ca04fa9c08ef', '314.06KB ', '公开', '2020-06-26 18:25:23', 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', 'jpg'); +INSERT INTO `tools_qiniu_content` VALUES (26, 'yixiang', '5ca0786c5d2c1', '388.24KB ', '公开', '2020-06-26 18:25:23', 'https://image.dayouqiantu.cn/5ca0786c5d2c1.jpg', 'jpg'); +INSERT INTO `tools_qiniu_content` VALUES (27, 'yixiang', '5ca081af6183f', '339.37KB ', '公开', '2020-06-26 18:25:23', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 'jpg'); + +-- ---------------------------- +-- 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 '创建日期', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + 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', NULL, 0); +INSERT INTO `quartz_job` VALUES (2, 'testTask', '0/5 * * * * ?', b'1', '测试1', 'run1', 'test', '带参测试,多参使用json', '2019-08-22 14:08:29', NULL, 0); +INSERT INTO `quartz_job` VALUES (3, 'testTask', '0/5 * * * * ?', b'1', '测试43', 'run', '44', '不带参测试', '2019-09-26 16:44:39', NULL, 0); + +-- ---------------------------- +-- 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, + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 19 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, NULL, 0); +INSERT INTO `quartz_log` VALUES (2, 'visitsTask', '2020-03-10 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 42, NULL, 0); +INSERT INTO `quartz_log` VALUES (3, 'visitsTask', '2020-04-02 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 60, NULL, 0); +INSERT INTO `quartz_log` VALUES (4, 'visitsTask', '2020-09-01 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 36, NULL, 0); +INSERT INTO `quartz_log` VALUES (5, 'visitsTask', '2020-09-02 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 19, NULL, 0); +INSERT INTO `quartz_log` VALUES (6, 'visitsTask', '2020-09-03 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 39, NULL, 0); +INSERT INTO `quartz_log` VALUES (7, 'visitsTask', '2020-09-04 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 30, NULL, 0); +INSERT INTO `quartz_log` VALUES (8, 'visitsTask', '2020-09-05 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 23, NULL, 0); +INSERT INTO `quartz_log` VALUES (9, 'visitsTask', '2020-09-06 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 70, NULL, 0); +INSERT INTO `quartz_log` VALUES (10, 'visitsTask', '2020-09-07 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 18, NULL, 0); +INSERT INTO `quartz_log` VALUES (11, 'visitsTask', '2020-09-08 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 14, NULL, 0); +INSERT INTO `quartz_log` VALUES (12, 'visitsTask', '2020-09-09 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 31, NULL, 0); +INSERT INTO `quartz_log` VALUES (13, 'visitsTask', '2020-09-10 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 40, NULL, 0); +INSERT INTO `quartz_log` VALUES (14, 'visitsTask', '2020-09-11 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 20, NULL, 0); +INSERT INTO `quartz_log` VALUES (15, 'visitsTask', '2020-09-12 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 39, NULL, 0); +INSERT INTO `quartz_log` VALUES (16, 'visitsTask', '2020-09-13 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 15, NULL, 0); +INSERT INTO `quartz_log` VALUES (17, 'visitsTask', '2020-09-14 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 15, NULL, 0); +INSERT INTO `quartz_log` VALUES (18, 'visitsTask', '2020-09-15 00:00:00', '0 0 0 * * ?', NULL, b'1', '更新访客记录', 'run', NULL, 35, NULL, 0); + +-- ---------------------------- +-- Table structure for sys_role +-- ---------------------------- +DROP TABLE IF EXISTS `sys_role`; +CREATE TABLE `sys_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 '功能权限', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色表' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of sys_role +-- ---------------------------- +INSERT INTO `sys_role` VALUES (1, '超级管理员', '-', '全部', 1, '2018-11-23 11:04:37', 'admin', NULL, 0); +INSERT INTO `sys_role` VALUES (2, '普通用户', '-', '本级', 2, '2018-11-23 13:09:06', 'common', NULL, 0); +INSERT INTO `sys_role` VALUES (3, '管理员2', '222', '全部', 3, '2020-01-31 16:53:25', '22', NULL, 0); + +-- ---------------------------- +-- Table structure for sys_roles_depts +-- ---------------------------- +DROP TABLE IF EXISTS `sys_roles_depts`; +CREATE TABLE `sys_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 `sys_dept` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FKrg1ci4cxxfbja0sb0pddju7k` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色部门关联' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of sys_roles_depts +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_roles_menus +-- ---------------------------- +DROP TABLE IF EXISTS `sys_roles_menus`; +CREATE TABLE `sys_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 `sys_menu` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FKtag324maketmxffly3pdyh193` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '角色菜单关联' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of sys_roles_menus +-- ---------------------------- +INSERT INTO `sys_roles_menus` VALUES (1, 1); +INSERT INTO `sys_roles_menus` VALUES (2, 1); +INSERT INTO `sys_roles_menus` VALUES (3, 1); +INSERT INTO `sys_roles_menus` VALUES (5, 1); +INSERT INTO `sys_roles_menus` VALUES (6, 1); +INSERT INTO `sys_roles_menus` VALUES (7, 1); +INSERT INTO `sys_roles_menus` VALUES (9, 1); +INSERT INTO `sys_roles_menus` VALUES (14, 1); +INSERT INTO `sys_roles_menus` VALUES (18, 1); +INSERT INTO `sys_roles_menus` VALUES (19, 1); +INSERT INTO `sys_roles_menus` VALUES (28, 1); +INSERT INTO `sys_roles_menus` VALUES (30, 1); +INSERT INTO `sys_roles_menus` VALUES (32, 1); +INSERT INTO `sys_roles_menus` VALUES (35, 1); +INSERT INTO `sys_roles_menus` VALUES (36, 1); +INSERT INTO `sys_roles_menus` VALUES (37, 1); +INSERT INTO `sys_roles_menus` VALUES (39, 1); +INSERT INTO `sys_roles_menus` VALUES (40, 1); +INSERT INTO `sys_roles_menus` VALUES (41, 1); +INSERT INTO `sys_roles_menus` VALUES (45, 1); +INSERT INTO `sys_roles_menus` VALUES (46, 1); +INSERT INTO `sys_roles_menus` VALUES (47, 1); +INSERT INTO `sys_roles_menus` VALUES (48, 1); +INSERT INTO `sys_roles_menus` VALUES (49, 1); +INSERT INTO `sys_roles_menus` VALUES (50, 1); +INSERT INTO `sys_roles_menus` VALUES (51, 1); +INSERT INTO `sys_roles_menus` VALUES (52, 1); +INSERT INTO `sys_roles_menus` VALUES (53, 1); +INSERT INTO `sys_roles_menus` VALUES (54, 1); +INSERT INTO `sys_roles_menus` VALUES (55, 1); +INSERT INTO `sys_roles_menus` VALUES (56, 1); +INSERT INTO `sys_roles_menus` VALUES (57, 1); +INSERT INTO `sys_roles_menus` VALUES (59, 1); +INSERT INTO `sys_roles_menus` VALUES (60, 1); +INSERT INTO `sys_roles_menus` VALUES (61, 1); +INSERT INTO `sys_roles_menus` VALUES (62, 1); +INSERT INTO `sys_roles_menus` VALUES (63, 1); +INSERT INTO `sys_roles_menus` VALUES (64, 1); +INSERT INTO `sys_roles_menus` VALUES (65, 1); +INSERT INTO `sys_roles_menus` VALUES (66, 1); +INSERT INTO `sys_roles_menus` VALUES (68, 1); +INSERT INTO `sys_roles_menus` VALUES (69, 1); +INSERT INTO `sys_roles_menus` VALUES (70, 1); +INSERT INTO `sys_roles_menus` VALUES (72, 1); +INSERT INTO `sys_roles_menus` VALUES (73, 1); +INSERT INTO `sys_roles_menus` VALUES (74, 1); +INSERT INTO `sys_roles_menus` VALUES (75, 1); +INSERT INTO `sys_roles_menus` VALUES (76, 1); +INSERT INTO `sys_roles_menus` VALUES (77, 1); +INSERT INTO `sys_roles_menus` VALUES (78, 1); +INSERT INTO `sys_roles_menus` VALUES (79, 1); +INSERT INTO `sys_roles_menus` VALUES (80, 1); +INSERT INTO `sys_roles_menus` VALUES (81, 1); +INSERT INTO `sys_roles_menus` VALUES (82, 1); +INSERT INTO `sys_roles_menus` VALUES (83, 1); +INSERT INTO `sys_roles_menus` VALUES (84, 1); +INSERT INTO `sys_roles_menus` VALUES (86, 1); +INSERT INTO `sys_roles_menus` VALUES (87, 1); +INSERT INTO `sys_roles_menus` VALUES (88, 1); +INSERT INTO `sys_roles_menus` VALUES (116, 1); +INSERT INTO `sys_roles_menus` VALUES (118, 1); +INSERT INTO `sys_roles_menus` VALUES (119, 1); +INSERT INTO `sys_roles_menus` VALUES (120, 1); +INSERT INTO `sys_roles_menus` VALUES (121, 1); +INSERT INTO `sys_roles_menus` VALUES (123, 1); +INSERT INTO `sys_roles_menus` VALUES (124, 1); +INSERT INTO `sys_roles_menus` VALUES (126, 1); +INSERT INTO `sys_roles_menus` VALUES (127, 1); +INSERT INTO `sys_roles_menus` VALUES (128, 1); +INSERT INTO `sys_roles_menus` VALUES (129, 1); +INSERT INTO `sys_roles_menus` VALUES (130, 1); +INSERT INTO `sys_roles_menus` VALUES (131, 1); +INSERT INTO `sys_roles_menus` VALUES (132, 1); +INSERT INTO `sys_roles_menus` VALUES (133, 1); +INSERT INTO `sys_roles_menus` VALUES (134, 1); +INSERT INTO `sys_roles_menus` VALUES (135, 1); +INSERT INTO `sys_roles_menus` VALUES (136, 1); +INSERT INTO `sys_roles_menus` VALUES (137, 1); +INSERT INTO `sys_roles_menus` VALUES (138, 1); +INSERT INTO `sys_roles_menus` VALUES (139, 1); +INSERT INTO `sys_roles_menus` VALUES (140, 1); +INSERT INTO `sys_roles_menus` VALUES (141, 1); +INSERT INTO `sys_roles_menus` VALUES (142, 1); +INSERT INTO `sys_roles_menus` VALUES (143, 1); +INSERT INTO `sys_roles_menus` VALUES (144, 1); +INSERT INTO `sys_roles_menus` VALUES (147, 1); +INSERT INTO `sys_roles_menus` VALUES (148, 1); +INSERT INTO `sys_roles_menus` VALUES (149, 1); +INSERT INTO `sys_roles_menus` VALUES (150, 1); +INSERT INTO `sys_roles_menus` VALUES (151, 1); +INSERT INTO `sys_roles_menus` VALUES (152, 1); +INSERT INTO `sys_roles_menus` VALUES (153, 1); +INSERT INTO `sys_roles_menus` VALUES (154, 1); +INSERT INTO `sys_roles_menus` VALUES (155, 1); +INSERT INTO `sys_roles_menus` VALUES (156, 1); +INSERT INTO `sys_roles_menus` VALUES (157, 1); +INSERT INTO `sys_roles_menus` VALUES (158, 1); +INSERT INTO `sys_roles_menus` VALUES (159, 1); +INSERT INTO `sys_roles_menus` VALUES (160, 1); +INSERT INTO `sys_roles_menus` VALUES (161, 1); +INSERT INTO `sys_roles_menus` VALUES (162, 1); +INSERT INTO `sys_roles_menus` VALUES (163, 1); +INSERT INTO `sys_roles_menus` VALUES (164, 1); +INSERT INTO `sys_roles_menus` VALUES (165, 1); +INSERT INTO `sys_roles_menus` VALUES (166, 1); +INSERT INTO `sys_roles_menus` VALUES (167, 1); +INSERT INTO `sys_roles_menus` VALUES (168, 1); +INSERT INTO `sys_roles_menus` VALUES (169, 1); +INSERT INTO `sys_roles_menus` VALUES (170, 1); +INSERT INTO `sys_roles_menus` VALUES (171, 1); +INSERT INTO `sys_roles_menus` VALUES (172, 1); +INSERT INTO `sys_roles_menus` VALUES (173, 1); +INSERT INTO `sys_roles_menus` VALUES (174, 1); +INSERT INTO `sys_roles_menus` VALUES (175, 1); +INSERT INTO `sys_roles_menus` VALUES (176, 1); +INSERT INTO `sys_roles_menus` VALUES (177, 1); +INSERT INTO `sys_roles_menus` VALUES (178, 1); +INSERT INTO `sys_roles_menus` VALUES (179, 1); +INSERT INTO `sys_roles_menus` VALUES (180, 1); +INSERT INTO `sys_roles_menus` VALUES (181, 1); +INSERT INTO `sys_roles_menus` VALUES (182, 1); +INSERT INTO `sys_roles_menus` VALUES (183, 1); +INSERT INTO `sys_roles_menus` VALUES (184, 1); +INSERT INTO `sys_roles_menus` VALUES (185, 1); +INSERT INTO `sys_roles_menus` VALUES (186, 1); +INSERT INTO `sys_roles_menus` VALUES (187, 1); +INSERT INTO `sys_roles_menus` VALUES (188, 1); +INSERT INTO `sys_roles_menus` VALUES (189, 1); +INSERT INTO `sys_roles_menus` VALUES (190, 1); +INSERT INTO `sys_roles_menus` VALUES (191, 1); +INSERT INTO `sys_roles_menus` VALUES (192, 1); +INSERT INTO `sys_roles_menus` VALUES (193, 1); +INSERT INTO `sys_roles_menus` VALUES (194, 1); +INSERT INTO `sys_roles_menus` VALUES (195, 1); +INSERT INTO `sys_roles_menus` VALUES (196, 1); +INSERT INTO `sys_roles_menus` VALUES (197, 1); +INSERT INTO `sys_roles_menus` VALUES (198, 1); +INSERT INTO `sys_roles_menus` VALUES (199, 1); +INSERT INTO `sys_roles_menus` VALUES (200, 1); +INSERT INTO `sys_roles_menus` VALUES (201, 1); +INSERT INTO `sys_roles_menus` VALUES (202, 1); +INSERT INTO `sys_roles_menus` VALUES (203, 1); +INSERT INTO `sys_roles_menus` VALUES (204, 1); +INSERT INTO `sys_roles_menus` VALUES (205, 1); +INSERT INTO `sys_roles_menus` VALUES (206, 1); +INSERT INTO `sys_roles_menus` VALUES (208, 1); +INSERT INTO `sys_roles_menus` VALUES (209, 1); +INSERT INTO `sys_roles_menus` VALUES (210, 1); +INSERT INTO `sys_roles_menus` VALUES (211, 1); +INSERT INTO `sys_roles_menus` VALUES (212, 1); +INSERT INTO `sys_roles_menus` VALUES (213, 1); +INSERT INTO `sys_roles_menus` VALUES (214, 1); +INSERT INTO `sys_roles_menus` VALUES (215, 1); +INSERT INTO `sys_roles_menus` VALUES (216, 1); +INSERT INTO `sys_roles_menus` VALUES (217, 1); +INSERT INTO `sys_roles_menus` VALUES (218, 1); +INSERT INTO `sys_roles_menus` VALUES (219, 1); +INSERT INTO `sys_roles_menus` VALUES (220, 1); +INSERT INTO `sys_roles_menus` VALUES (221, 1); +INSERT INTO `sys_roles_menus` VALUES (222, 1); +INSERT INTO `sys_roles_menus` VALUES (223, 1); +INSERT INTO `sys_roles_menus` VALUES (224, 1); +INSERT INTO `sys_roles_menus` VALUES (225, 1); +INSERT INTO `sys_roles_menus` VALUES (226, 1); +INSERT INTO `sys_roles_menus` VALUES (227, 1); +INSERT INTO `sys_roles_menus` VALUES (228, 1); +INSERT INTO `sys_roles_menus` VALUES (229, 1); +INSERT INTO `sys_roles_menus` VALUES (230, 1); +INSERT INTO `sys_roles_menus` VALUES (231, 1); +INSERT INTO `sys_roles_menus` VALUES (232, 1); +INSERT INTO `sys_roles_menus` VALUES (233, 1); +INSERT INTO `sys_roles_menus` VALUES (234, 1); +INSERT INTO `sys_roles_menus` VALUES (235, 1); +INSERT INTO `sys_roles_menus` VALUES (236, 1); +INSERT INTO `sys_roles_menus` VALUES (237, 1); +INSERT INTO `sys_roles_menus` VALUES (238, 1); +INSERT INTO `sys_roles_menus` VALUES (240, 1); +INSERT INTO `sys_roles_menus` VALUES (241, 1); +INSERT INTO `sys_roles_menus` VALUES (242, 1); +INSERT INTO `sys_roles_menus` VALUES (243, 1); +INSERT INTO `sys_roles_menus` VALUES (244, 1); +INSERT INTO `sys_roles_menus` VALUES (245, 1); +INSERT INTO `sys_roles_menus` VALUES (246, 1); +INSERT INTO `sys_roles_menus` VALUES (247, 1); +INSERT INTO `sys_roles_menus` VALUES (248, 1); +INSERT INTO `sys_roles_menus` VALUES (249, 1); +INSERT INTO `sys_roles_menus` VALUES (250, 1); +INSERT INTO `sys_roles_menus` VALUES (251, 1); +INSERT INTO `sys_roles_menus` VALUES (252, 1); +INSERT INTO `sys_roles_menus` VALUES (253, 1); +INSERT INTO `sys_roles_menus` VALUES (256, 1); +INSERT INTO `sys_roles_menus` VALUES (257, 1); +INSERT INTO `sys_roles_menus` VALUES (258, 1); +INSERT INTO `sys_roles_menus` VALUES (259, 1); +INSERT INTO `sys_roles_menus` VALUES (260, 1); +INSERT INTO `sys_roles_menus` VALUES (261, 1); +INSERT INTO `sys_roles_menus` VALUES (262, 1); +INSERT INTO `sys_roles_menus` VALUES (263, 1); +INSERT INTO `sys_roles_menus` VALUES (264, 1); +INSERT INTO `sys_roles_menus` VALUES (265, 1); +INSERT INTO `sys_roles_menus` VALUES (266, 1); +INSERT INTO `sys_roles_menus` VALUES (267, 1); +INSERT INTO `sys_roles_menus` VALUES (268, 1); +INSERT INTO `sys_roles_menus` VALUES (269, 1); + + +-- ---------------------------- +-- Table structure for user +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user`; +CREATE TABLE `sys_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, + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + 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 `sys_dept` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FKfftoc2abhot8f2wu6cl9a5iky` FOREIGN KEY (`job_id`) REFERENCES `sys_job` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FKpq2dhypk2qgt68nauh2by22jb` FOREIGN KEY (`avatar_id`) REFERENCES `sys_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 `sys_user` VALUES (1, 1, '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', '管理员', '男', '2020-06-27 12:05:56', 0); +INSERT INTO `sys_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', '测试', '男', NULL, 0); +INSERT INTO `sys_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', '男', NULL, 0); +INSERT INTO `sys_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', '男', NULL, 0); +INSERT INTO `sys_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', '男', NULL, 0); + +-- ---------------------------- +-- Table structure for sys_user_avatar +-- ---------------------------- +DROP TABLE IF EXISTS `sys_user_avatar`; +CREATE TABLE `sys_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 = 2 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '系统用户头像' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of sys_user_avatar +-- ---------------------------- +INSERT INTO `sys_user_avatar` VALUES (1, '20200627120555818410.png', 'D:\\yshop\\avatar\\20200627120555818410.png', '12.93KB ', '2020-06-27 12:05:56'); + +-- ---------------------------- +-- Table structure for sys_users_roles +-- ---------------------------- +DROP TABLE IF EXISTS `sys_users_roles`; +CREATE TABLE `sys_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 `sys_user` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT, + CONSTRAINT `FKt4v0rrweyk393bdgt107vdx0x` FOREIGN KEY (`role_id`) REFERENCES `sys_role` (`id`) ON DELETE RESTRICT ON UPDATE RESTRICT +) ENGINE = InnoDB CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户角色关联' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of sys_users_roles +-- ---------------------------- +INSERT INTO `sys_users_roles` VALUES (1, 1); +INSERT INTO `sys_users_roles` VALUES (3, 2); +INSERT INTO `sys_users_roles` VALUES (4, 2); +INSERT INTO `sys_users_roles` VALUES (5, 2); +INSERT INTO `sys_users_roles` VALUES (6, 2); + +-- ---------------------------- +-- Table structure for tools_verification_code +-- ---------------------------- +DROP TABLE IF EXISTS `tools_verification_code`; +CREATE TABLE `tools_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; + +-- ---------------------------- +-- Records of tools_verification_code +-- ---------------------------- + +-- ---------------------------- +-- Table structure for sys_visits +-- ---------------------------- +DROP TABLE IF EXISTS `sys_visits`; +CREATE TABLE `sys_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 = 1266934639347150881 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '访客记录' ROW_FORMAT = COMPACT; + +-- ---------------------------- +-- Records of sys_visits +-- ---------------------------- +INSERT INTO `sys_visits` VALUES (1265104717297319937, '2020-05-26 10:17:24', '2020-05-26', 1, 1, 'Tue'); +INSERT INTO `sys_visits` VALUES (1265104717297319938, '2020-05-27 16:32:32', '2020-05-27', 1, 2, 'Wed'); +INSERT INTO `sys_visits` VALUES (1265104717297319939, '2020-05-29 14:18:55', '2020-05-29', 1, 1, 'Fri'); +INSERT INTO `sys_visits` VALUES (1266934639347150849, '2020-05-31 11:28:51', '2020-05-31', 1, 1, 'Sun'); +INSERT INTO `sys_visits` VALUES (1266934639347150850, '2020-06-01 15:37:07', '2020-06-01', 1, 1, 'Mon'); +INSERT INTO `sys_visits` VALUES (1266934639347150851, '2020-06-09 11:52:36', '2020-06-09', 1, 2, 'Tue'); +INSERT INTO `sys_visits` VALUES (1266934639347150852, '2020-06-12 16:23:50', '2020-06-12', 1, 2, 'Fri'); +INSERT INTO `sys_visits` VALUES (1266934639347150853, '2020-06-13 16:49:12', '2020-06-13', 1, 1, 'Sat'); +INSERT INTO `sys_visits` VALUES (1266934639347150854, '2020-06-25 16:12:58', '2020-06-25', 1, 8, 'Thu'); +INSERT INTO `sys_visits` VALUES (1266934639347150855, '2020-06-26 10:15:43', '2020-06-26', 2, 7, 'Fri'); +INSERT INTO `sys_visits` VALUES (1266934639347150856, '2020-06-27 11:38:14', '2020-06-27', 1, 5, 'Sat'); +INSERT INTO `sys_visits` VALUES (1266934639347150857, '2020-06-28 15:59:08', '2020-06-28', 1, 6, 'Sun'); +INSERT INTO `sys_visits` VALUES (1266934639347150858, '2020-06-29 09:19:53', '2020-06-29', 1, 4, 'Mon'); +INSERT INTO `sys_visits` VALUES (1266934639347150859, '2020-06-30 09:55:25', '2020-06-30', 1, 5, 'Tue'); +INSERT INTO `sys_visits` VALUES (1266934639347150860, '2020-07-01 10:02:51', '2020-07-01', 1, 9, 'Wed'); +INSERT INTO `sys_visits` VALUES (1266934639347150861, '2020-07-02 10:55:09', '2020-07-02', 1, 7, 'Thu'); +INSERT INTO `sys_visits` VALUES (1266934639347150862, '2020-07-03 10:40:46', '2020-07-03', 1, 8, 'Fri'); +INSERT INTO `sys_visits` VALUES (1266934639347150863, '2020-07-04 10:03:30', '2020-07-04', 1, 4, 'Sat'); +INSERT INTO `sys_visits` VALUES (1266934639347150864, '2020-07-05 09:56:06', '2020-07-05', 1, 4, 'Sun'); +INSERT INTO `sys_visits` VALUES (1266934639347150865, '2020-07-06 14:35:25', '2020-07-06', 1, 2, 'Mon'); +INSERT INTO `sys_visits` VALUES (1266934639347150866, '2020-09-01 00:00:00', '2020-09-01', 4, 4, 'Tue'); +INSERT INTO `sys_visits` VALUES (1266934639347150867, '2020-09-02 00:00:00', '2020-09-02', 1, 4, 'Wed'); +INSERT INTO `sys_visits` VALUES (1266934639347150868, '2020-09-03 00:00:00', '2020-09-03', 1, 2, 'Thu'); +INSERT INTO `sys_visits` VALUES (1266934639347150869, '2020-09-04 00:00:00', '2020-09-04', 1, 3, 'Fri'); +INSERT INTO `sys_visits` VALUES (1266934639347150870, '2020-09-05 00:00:00', '2020-09-05', 5, 2, 'Sat'); +INSERT INTO `sys_visits` VALUES (1266934639347150871, '2020-09-06 00:00:00', '2020-09-06', 4, 2, 'Sun'); +INSERT INTO `sys_visits` VALUES (1266934639347150872, '2020-09-07 00:00:00', '2020-09-07', 5, 3, 'Mon'); +INSERT INTO `sys_visits` VALUES (1266934639347150873, '2020-09-08 00:00:00', '2020-09-08', 7, 15, 'Tue'); +INSERT INTO `sys_visits` VALUES (1266934639347150874, '2020-09-09 00:00:00', '2020-09-09', 5, 3, 'Wed'); +INSERT INTO `sys_visits` VALUES (1266934639347150875, '2020-09-10 00:00:00', '2020-09-10', 2, 4, 'Thu'); +INSERT INTO `sys_visits` VALUES (1266934639347150876, '2020-09-11 00:00:00', '2020-09-11', 12, 5, 'Fri'); +INSERT INTO `sys_visits` VALUES (1266934639347150877, '2020-09-12 00:00:00', '2020-09-12', 3, 4, 'Sat'); +INSERT INTO `sys_visits` VALUES (1266934639347150878, '2020-09-13 00:00:00', '2020-09-13', 10, 4, 'Sun'); +INSERT INTO `sys_visits` VALUES (1266934639347150879, '2020-09-14 00:00:00', '2020-09-14', 1, 1, 'Mon'); +INSERT INTO `sys_visits` VALUES (1266934639347150880, '2020-09-15 00:00:00', '2020-09-15', 1, 1, 'Tue'); + +-- ---------------------------- +-- Table structure for yx_app_version +-- ---------------------------- +DROP TABLE IF EXISTS `yx_app_version`; +CREATE TABLE `yx_app_version` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `version_code` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本code', + `version_name` varchar(64) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本名称', + `version_info` varchar(600) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '版本描述', + `ios_url` varchar(10000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'ios store应用商店链接', + `android_url` varchar(10000) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '安卓下载链接', + `force_update` tinyint(4) NULL DEFAULT NULL COMMENT '是否强制升级', + `create_time` datetime(0) NULL DEFAULT NULL, + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = 'app版本' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_app_version +-- ---------------------------- + +-- ---------------------------- +-- 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 '状态', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + `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 = 5 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '文章管理表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_article +-- ---------------------------- +INSERT INTO `yx_article` VALUES (2, '', 'yshop2版本上线了', 'yshop', 'http://127.0.0.1:8000/file/pic/20200527164526793230.png', 'yshop1.3版本上线了', '

yshop1.3版本上线了

', '', '', '8', NULL, '', NULL, '2019-08-22 12:26:00', '2020-06-25 19:12:53', 0, NULL, NULL, NULL, NULL, NULL, NULL); +INSERT INTO `yx_article` VALUES (3, '', '44', '444', 'http://127.0.0.1:8000/file/pic/20200527164543489004.png', '4444', '

55555

', '', '', '', 0, '', NULL, '2020-06-25 19:12:35', NULL, 1, 0, 0, 0, 0, 0, 0); +INSERT INTO `yx_article` VALUES (4, '', 'yshop3.0', 'yshop', 'https://image.dayouqiantu.cn/news.png', 'yshop3.0', '


yshop3.0

', '', '', '3', 0, '', NULL, '2020-07-02 12:15:13', '2020-07-03 17:58:19', 0, 0, 0, 0, 0, 0, 0); + +-- ---------------------------- +-- 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 '是否显示', + `create_time` datetime(0) NULL DEFAULT NULL, + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(255) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `is_show`(`is_show`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 433 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '快递公司表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_express +-- ---------------------------- +INSERT INTO `yx_express` VALUES (426, 'STO', '申通快递', 0, 0, NULL, NULL, 0); +INSERT INTO `yx_express` VALUES (427, 'SF', '顺丰速运', 0, 0, NULL, NULL, 0); +INSERT INTO `yx_express` VALUES (428, 'ZTO', '中通快递', 0, 0, NULL, NULL, 0); +INSERT INTO `yx_express` VALUES (429, 'YTO', '圆通速递', 0, 0, NULL, '2020-09-06 09:59:36', 0); +INSERT INTO `yx_express` VALUES (430, '555', '555555', 0, 0, NULL, NULL, 1); +INSERT INTO `yx_express` VALUES (431, '555', '5555', 0, 0, NULL, NULL, 1); +INSERT INTO `yx_express` VALUES (432, '555', '555', 0, 0, '2020-06-26 12:29:48', NULL, 1); + +-- ---------------------------- +-- 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', + `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) 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 '素材链接', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + 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 ('05bf470c271f73fe2f572cad60b356f4', '2020-09-03 17:13:52', 'admin', '1', NULL, '1.jpg', 'https://app2.yixiang.co/file/pic/20200903171351713145.jpg', NULL, 0); +INSERT INTO `yx_material` VALUES ('1888a13fdeca0d85dcc6bef413c531b9', '2020-06-26 17:22:21', 'admin', '1', NULL, 'list_16.png', 'http://127.0.0.1:8000/file/pic/20200626172220229003.png', NULL, 1); +INSERT INTO `yx_material` VALUES ('353760137dad5526444c01074f9490e0', '2020-09-03 17:18:08', 'admin', '1', NULL, '3.jpg', 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg', NULL, 0); +INSERT INTO `yx_material` VALUES ('3e2aa47438e059b06eea6327ae2260ec', '2020-06-26 18:25:07', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'news.png', 'https://image.dayouqiantu.cn/news.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('612f4f924840739f0ebdfbdce21d878b', '2020-06-26 18:25:07', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'sign.png', 'https://image.dayouqiantu.cn/sign.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('658cff7a98834617e46adfd105db0a3c', '2020-05-27 16:45:44', 'admin', '1', NULL, 'list_18.png', 'http://127.0.0.1:8000/file/pic/20200527164543489004.png', NULL, 1); +INSERT INTO `yx_material` VALUES ('6d2c5511b87631ffa6c5eecb9e4d736f', '2020-06-26 18:25:23', 'admin', '1', '8cc5996f6c4b54fcf5c0f2845a5d9afa', '5ca04fa9c08ef.jpg', 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', NULL, 0); +INSERT INTO `yx_material` VALUES ('6d4adf87cbb42bac277edf212dcbf2a7', '2020-06-26 18:20:58', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'collect.png', 'https://image.dayouqiantu.cn/collect.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('700a8cade3e6ff35a5e0d12b55849735', '2020-09-03 17:18:08', 'admin', '1', NULL, '7.jpg', 'https://app2.yixiang.co/file/pic/20200903171807647067.jpg', NULL, 0); +INSERT INTO `yx_material` VALUES ('7492896114a45879b88c08f02ef88a3e', '2020-06-26 18:25:07', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'pink.png', 'https://image.dayouqiantu.cn/pink.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('77b45342d9861a25323f284b155c4c9d', '2020-09-03 17:18:08', 'admin', '1', NULL, '6.jpg', 'https://app2.yixiang.co/file/pic/20200903171807641535.jpg', NULL, 0); +INSERT INTO `yx_material` VALUES ('7cc18f371ebcfaeb63d95f734251453b', '2020-06-26 18:25:24', 'admin', '1', '8cc5996f6c4b54fcf5c0f2845a5d9afa', '5ca0786c5d2c1.jpg', 'https://image.dayouqiantu.cn/5ca0786c5d2c1.jpg', NULL, 1); +INSERT INTO `yx_material` VALUES ('80116a9fea6f899d4530e82bc4d9b97b', '2020-09-03 17:12:09', 'admin', '1', NULL, 'avatar_default.png', 'https://app2.yixiang.co/file/pic/20200903171208889668.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('808cbc928e818b2c0d12f5919042cdc2', '2020-06-26 11:08:09', 'admin', '1', NULL, 'list_34.png', 'http://127.0.0.1:8000/file/pic/20200626110808157592.png', NULL, 1); +INSERT INTO `yx_material` VALUES ('8a599a4721469bfcd1c313241c88bee0', '2020-06-26 18:20:58', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'buy.png', 'https://image.dayouqiantu.cn/buy.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('8e19af4d16b717574d863e6316cf15e4', '2020-06-26 18:24:51', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'add.png', 'https://image.dayouqiantu.cn/add.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('9ddc310b8b6e224cd1ee2f27f1d19017', '2020-06-26 18:25:07', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'sekill.png', 'https://image.dayouqiantu.cn/sekill.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('a0fc29a301a72712802ef38efe011fc4', '2020-09-11 09:39:13', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'avatar_default.png', 'https://app2.yixiang.co/file/pic/20200911093912577832.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('a961d6c0f255083294c27bed47330ad9', '2020-05-27 16:45:27', 'admin', '1', '83ee56004ff88fd1ecdde5a43469ef2e', 'list_13.png', 'http://127.0.0.1:8000/file/pic/20200527164526793230.png', NULL, 1); +INSERT INTO `yx_material` VALUES ('b36ab3797cd310a210f5d3dec2d05349', '2020-09-03 17:18:08', 'admin', '1', NULL, '5.jpg', 'https://app2.yixiang.co/file/pic/20200903171807625149.jpg', NULL, 0); +INSERT INTO `yx_material` VALUES ('bd6c9dc5a3373fe377b4aeb0579ed1bb', '2020-06-26 17:35:22', 'admin', '1', NULL, 'list_18.png', 'http://127.0.0.1:8009/api/api/file/pic/20200626173520849370.png', NULL, 1); +INSERT INTO `yx_material` VALUES ('c246328a65ecb0170b67334e8ef4683e', '2020-06-26 18:20:58', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'goods.png', 'https://image.dayouqiantu.cn/goods.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('c48c27553f32321e5b5e6cdc2b934484', '2020-09-15 07:41:40', 'admin', '1', NULL, '1600126884(1).jpg', 'https://app2.yixiang.co/file/pic/20200915074139926178.jpg', NULL, 0); +INSERT INTO `yx_material` VALUES ('c83bb0d55e101f6ab525acb1f524b10b', '2020-06-26 17:39:44', 'admin', '1', NULL, 'list_34.png', 'http://127.0.0.1:8000/file/pic/20200626173943611335.png', NULL, 1); +INSERT INTO `yx_material` VALUES ('d63a722c0a0e55e73126ff9411ae1224', '2020-06-26 18:20:58', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'coupon.png', 'https://image.dayouqiantu.cn/coupon.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('d98b9f8ad2daa9e9a7567b3ae31b81d7', '2020-06-26 18:24:51', 'admin', '1', 'd9b1b9d69f5b72cda63e26dc9f087623', 'bargin.png', 'https://image.dayouqiantu.cn/bargin.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('eb8aa8d0846009f5b685e9f07a05c836', '2020-09-03 17:10:04', 'admin', '1', NULL, 'avatar_default.png', 'https://app2.yixiang.co/file/pic/20200903171003417769.png', NULL, 0); +INSERT INTO `yx_material` VALUES ('f04dcbf4b61ab35d0f08f85a27ee92ff', '2020-06-26 18:25:24', 'admin', '1', '8cc5996f6c4b54fcf5c0f2845a5d9afa', '5ca081af6183f.jpg', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', NULL, 0); +INSERT INTO `yx_material` VALUES ('f0e8dddf88c587f638e5a7859d8cc7a3', '2020-09-03 17:18:08', 'admin', '1', NULL, '4.jpg', 'https://app2.yixiang.co/file/pic/20200903171807568739.jpg', NULL, 0); + +-- ---------------------------- +-- 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', + `create_time` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) 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 '分组名', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + 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 ('83ee56004ff88fd1ecdde5a43469ef2e', '2020-05-27 16:45:08', NULL, 'test', '2020-06-26 18:20:00', 0); +INSERT INTO `yx_material_group` VALUES ('8cc5996f6c4b54fcf5c0f2845a5d9afa', '2020-06-26 11:07:26', NULL, '商品', '2020-06-26 18:20:14', 0); +INSERT INTO `yx_material_group` VALUES ('d9b1b9d69f5b72cda63e26dc9f087623', '2020-06-26 18:20:19', NULL, 'icon', NULL, 0); +INSERT INTO `yx_material_group` VALUES ('fe2e32c3ce27983c298ab344c6e1c4fa', '2020-05-27 16:45:13', NULL, 'bb', NULL, 1); + +-- ---------------------------- +-- Table structure for yx_shipping_templates +-- ---------------------------- +DROP TABLE IF EXISTS `yx_shipping_templates`; +CREATE TABLE `yx_shipping_templates` ( + `id` int(10) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '模板ID', + `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '模板名称', + `type` tinyint(1) NULL DEFAULT NULL COMMENT '计费方式', + `region_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '地域以及费用', + `appoint` tinyint(1) NULL DEFAULT NULL COMMENT '指定包邮开关', + `appoint_info` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '指定包邮内容', + `create_time` datetime(0) NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + `sort` int(11) NULL DEFAULT NULL COMMENT '排序', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 37 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '运费模板表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_shipping_templates +-- ---------------------------- +INSERT INTO `yx_shipping_templates` VALUES (32, '9999', 1, '[{\"_continue\":\"1\",\"continue_price\":\"0\",\"first\":\"1\",\"price\":\"0\",\"region\":[{\"city_id\":\"0\",\"name\":\"默认全国\"}],\"regionName\":\"默认全国\"}]', 0, '[]', '2020-07-01 14:03:59', NULL, 1, 0); +INSERT INTO `yx_shipping_templates` VALUES (33, '8888', 1, '[{\"_continue\":\"1\",\"continue_price\":\"0\",\"first\":\"1\",\"price\":\"0\",\"region\":[{\"city_id\":\"0\",\"name\":\"默认全国\"}],\"regionName\":\"默认全国\"}]', 0, '[]', '2020-07-01 14:08:19', NULL, 1, 0); +INSERT INTO `yx_shipping_templates` VALUES (34, '默认全国运费模板', 1, '[{\"_continue\":\"1\",\"continue_price\":\"2\",\"first\":\"1\",\"price\":\"1\",\"region\":[{\"city_id\":\"0\",\"name\":\"默认全国\"}],\"regionName\":\"默认全国\"}]', 0, '[]', '2020-07-01 15:20:44', '2020-07-05 17:06:47', 0, 0); +INSERT INTO `yx_shipping_templates` VALUES (35, '包邮湖北省,河南省特例', 1, '[{\"_continue\":\"1\",\"continue_price\":\"1\",\"first\":\"1\",\"price\":\"1\",\"region\":[{\"city_id\":\"0\",\"name\":\"默认全国\"}],\"regionName\":\"默认全国\"},{\"_continue\":\"1\",\"continue_price\":\"5\",\"first\":\"1\",\"price\":\"2\",\"region\":[{\"children\":[{\"city_id\":\"367396\"},{\"city_id\":\"370304\"},{\"city_id\":\"372971\"},{\"city_id\":\"376365\"},{\"city_id\":\"379245\"},{\"city_id\":\"382878\"},{\"city_id\":\"383890\"},{\"city_id\":\"387707\"},{\"city_id\":\"389719\"},{\"city_id\":\"392737\"},{\"city_id\":\"395254\"},{\"city_id\":\"396611\"},{\"city_id\":\"398169\"},{\"city_id\":\"403311\"},{\"city_id\":\"408287\"},{\"city_id\":\"411925\"},{\"city_id\":\"417174\"},{\"city_id\":\"420258\"}],\"city_id\":\"367395\",\"name\":\"河南省\"}],\"regionName\":\"河南省\"}]', 1, '[{\"a_num\":\"2\",\"a_price\":\"100\",\"place\":[{\"children\":[{\"city_id\":\"420825\"},{\"city_id\":\"424449\"},{\"city_id\":\"425508\"},{\"city_id\":\"427710\"},{\"city_id\":\"429501\"},{\"city_id\":\"432415\"},{\"city_id\":\"432829\"},{\"city_id\":\"434548\"},{\"city_id\":\"437779\"},{\"city_id\":\"440639\"},{\"city_id\":\"445040\"},{\"city_id\":\"446212\"},{\"city_id\":\"447268\"},{\"city_id\":\"449865\"}],\"city_id\":\"420824\",\"name\":\"湖北省\"}],\"placeName\":\"湖北省\"}]', '2020-07-01 15:26:38', '2020-07-05 17:08:39', 0, 0); +INSERT INTO `yx_shipping_templates` VALUES (36, '8888', 1, '[{\"_continue\":\"1\",\"continue_price\":\"1\",\"first\":\"1\",\"price\":\"1\",\"region\":[{\"city_id\":\"0\",\"name\":\"默认全国\"}],\"regionName\":\"默认全国\"}]', 1, '[]', '2020-07-01 16:04:28', '2020-07-01 16:07:31', 1, 0); + +-- ---------------------------- +-- Table structure for yx_shipping_templates_free +-- ---------------------------- +DROP TABLE IF EXISTS `yx_shipping_templates_free`; +CREATE TABLE `yx_shipping_templates_free` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `province_id` int(11) NOT NULL DEFAULT 0 COMMENT '省ID', + `temp_id` int(11) NOT NULL DEFAULT 0 COMMENT '模板ID', + `city_id` int(11) NOT NULL DEFAULT 0 COMMENT '城市ID', + `number` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '包邮件数', + `price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '包邮金额', + `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '计费方式', + `uniqid` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '分组唯一值', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 198 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_shipping_templates_free +-- ---------------------------- +INSERT INTO `yx_shipping_templates_free` VALUES (158, 13267, 36, 13268, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (159, 13267, 36, 18128, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (160, 13267, 36, 24371, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (161, 13267, 36, 26779, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (162, 13267, 36, 32688, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (163, 13267, 36, 38160, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (164, 13267, 36, 44570, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (165, 13267, 36, 49190, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (166, 13267, 36, 52018, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (167, 13267, 36, 58247, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (168, 13267, 36, 61804, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (169, 13267, 36, 66813, 1.00, 1.00, 1, 'ddd9604e6fb54edab5ced2e32c41db61'); +INSERT INTO `yx_shipping_templates_free` VALUES (184, 420824, 35, 420825, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (185, 420824, 35, 424449, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (186, 420824, 35, 425508, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (187, 420824, 35, 427710, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (188, 420824, 35, 429501, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (189, 420824, 35, 432415, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (190, 420824, 35, 432829, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (191, 420824, 35, 434548, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (192, 420824, 35, 437779, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (193, 420824, 35, 440639, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (194, 420824, 35, 445040, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (195, 420824, 35, 446212, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (196, 420824, 35, 447268, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); +INSERT INTO `yx_shipping_templates_free` VALUES (197, 420824, 35, 449865, 2.00, 100.00, 1, '5a3c9a0dbe084d568b6f70e19e28c695'); + +-- ---------------------------- +-- Table structure for yx_shipping_templates_region +-- ---------------------------- +DROP TABLE IF EXISTS `yx_shipping_templates_region`; +CREATE TABLE `yx_shipping_templates_region` ( + `id` int(11) NOT NULL AUTO_INCREMENT COMMENT '编号', + `province_id` int(11) NOT NULL DEFAULT 0 COMMENT '省ID', + `temp_id` int(11) NOT NULL DEFAULT 0 COMMENT '模板ID', + `city_id` int(11) NOT NULL DEFAULT 0 COMMENT '城市ID', + `first` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '首件', + `first_price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '首件运费', + `continues` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '续件', + `continue_price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '续件运费', + `type` tinyint(1) NOT NULL DEFAULT 1 COMMENT '计费方式', + `uniqid` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '分组唯一值', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 250 CHARACTER SET = utf8 COLLATE = utf8_general_ci ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_shipping_templates_region +-- ---------------------------- +INSERT INTO `yx_shipping_templates_region` VALUES (175, 0, 32, 0, 1.00, 0.00, 1.00, 0.00, 1, 'da4f15807a2e47b880d8db454a350a5e'); +INSERT INTO `yx_shipping_templates_region` VALUES (176, 0, 33, 0, 1.00, 0.00, 1.00, 0.00, 1, '6ddd27e504e3451aad294cfb9e105fa2'); +INSERT INTO `yx_shipping_templates_region` VALUES (210, 0, 36, 0, 1.00, 1.00, 1.00, 1.00, 1, '14e3da43097248c29ed0d41eded5d9c0'); +INSERT INTO `yx_shipping_templates_region` VALUES (211, 0, 34, 0, 1.00, 1.00, 1.00, 2.00, 1, '2c8ea986f1a149329a72951c7670e9b4'); +INSERT INTO `yx_shipping_templates_region` VALUES (231, 0, 35, 0, 1.00, 1.00, 1.00, 1.00, 1, 'cc8ca17c6a7145adbf78498b2bdc07fe'); +INSERT INTO `yx_shipping_templates_region` VALUES (232, 367395, 35, 367396, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (233, 367395, 35, 370304, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (234, 367395, 35, 372971, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (235, 367395, 35, 376365, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (236, 367395, 35, 379245, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (237, 367395, 35, 382878, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (238, 367395, 35, 383890, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (239, 367395, 35, 387707, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (240, 367395, 35, 389719, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (241, 367395, 35, 392737, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (242, 367395, 35, 395254, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (243, 367395, 35, 396611, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (244, 367395, 35, 398169, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (245, 367395, 35, 403311, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (246, 367395, 35, 408287, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (247, 367395, 35, 411925, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (248, 367395, 35, 417174, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); +INSERT INTO `yx_shipping_templates_region` VALUES (249, 367395, 35, 420258, 1.00, 2.00, 1.00, 5.00, 1, 'f883508219224a6d8a10ccbf99c0e9ba'); + +-- ---------------------------- +-- Table structure for yx_store_bargain +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_bargain`; +CREATE TABLE `yx_store_bargain` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '砍价产品ID', + `product_id` bigint(20) 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` datetime(0) NOT NULL COMMENT '砍价开启时间', + `stop_time` datetime(0) 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删除', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `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 '砍价产品分享量', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 13 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '砍价表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_bargain +-- ---------------------------- +INSERT INTO `yx_store_bargain` VALUES (12, 7, '专属测试商品', 'https://app2.yixiang.co/file/pic/20200903171208889668.png', '张', 7, 3, 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg,https://image.dayouqiantu.cn/5ca081af6183f.jpg', '2020-09-12 18:20:56', '2020-09-30 00:00:00', NULL, 100.00, 1.00, 1, 10.00, 1.00, 1, 1, '


', 0.00, '结算', 110.00, 0, 0, 0, '2020-09-12 18:22:14', NULL, 1, 0.00, '

1、规则1

2、规则2

', 40, 23); + +-- ---------------------------- +-- Table structure for yx_store_bargain_user +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_bargain_user`; +CREATE TABLE `yx_store_bargain_user` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户参与砍价表ID', + `uid` bigint(20) UNSIGNED NULL DEFAULT NULL COMMENT '用户ID', + `bargain_id` bigint(20) 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活动结束参与成功', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '参与时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否取消', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户参与砍价表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_bargain_user +-- ---------------------------- + +-- ---------------------------- +-- 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` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '砍价用户帮助表ID', + `uid` bigint(20) UNSIGNED NULL DEFAULT NULL COMMENT '帮助的用户id', + `bargain_id` bigint(20) UNSIGNED NULL DEFAULT NULL COMMENT '砍价产品ID', + `bargain_user_id` bigint(20) UNSIGNED NULL DEFAULT NULL COMMENT '用户参与砍价表id', + `price` decimal(8, 2) UNSIGNED NULL DEFAULT NULL COMMENT '帮助砍价多少金额', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '砍价用户帮助表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_bargain_user_help +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_store_cart +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_cart`; +CREATE TABLE `yx_store_cart` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '购物车表ID', + `uid` bigint(20) UNSIGNED NOT NULL COMMENT '用户ID', + `type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT 'product' COMMENT '类型', + `product_id` bigint(20) 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 '商品数量', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `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 = 150 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '购物车表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_cart +-- ---------------------------- +INSERT INTO `yx_store_cart` VALUES (86, 40, 'product', 6, '91d12632e2c047d7b34dab48cfc5a34e', 1, '2020-09-12 14:54:08', '2020-09-12 14:54:45', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (87, 43, 'product', 7, '789984b858bb489bb6313107e11fdc15', 1, '2020-09-12 17:04:12', '2020-09-12 17:06:04', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (88, 43, 'product', 7, '789984b858bb489bb6313107e11fdc15', 1, '2020-09-12 17:06:54', '2020-09-12 17:07:00', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (89, 43, 'product', 7, '789984b858bb489bb6313107e11fdc15', 1, '2020-09-12 17:07:53', '2020-09-12 17:07:57', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (90, 43, 'product', 8, '2f7ee7305cfe43f782ea28c0235256db', 1, '2020-09-12 17:27:03', '2020-09-12 17:27:24', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (91, 43, 'product', 8, '183fcbaffb3849c48de2e87a226209b9', 1, '2020-09-12 17:48:03', '2020-09-12 17:48:14', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (92, 43, 'product', 7, '789984b858bb489bb6313107e11fdc15', 1, '2020-09-12 17:54:50', NULL, 0, 0, 0, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (93, 43, 'product', 8, '67138eee0bed408abe7d32b0ab2060b0', 1, '2020-09-12 17:56:08', NULL, 0, 0, 0, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (94, 43, 'product', 7, '789984b858bb489bb6313107e11fdc15', 1, '2020-09-12 18:10:27', NULL, 0, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (95, 43, 'product', 8, '183fcbaffb3849c48de2e87a226209b9', 1, '2020-09-12 18:10:44', '2020-09-12 18:11:05', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (96, 43, 'product', 8, 'f25af180071742458622febf7dde528b', 1, '2020-09-12 18:18:27', '2020-09-12 18:18:37', 1, 0, 1, 10, 0, 0); +INSERT INTO `yx_store_cart` VALUES (97, 42, 'product', 3, 'b951f8e2ed4641f08be1bce99b716a6d', 1, '2020-09-12 19:27:31', NULL, 0, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (98, 42, 'product', 8, '013f89ec740f478d8144f052909c0807', 1, '2020-09-12 19:42:36', NULL, 0, 0, 1, 10, 0, 0); +INSERT INTO `yx_store_cart` VALUES (99, 40, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-12 23:18:58', '2020-09-13 15:01:09', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (100, 53, 'product', 5, '4dd9ea6fb9f1414aabf18b713f0f6832', 1, '2020-09-13 02:29:15', '2020-09-13 02:29:37', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (101, 53, 'product', 8, '013f89ec740f478d8144f052909c0807', 1, '2020-09-13 03:54:24', '2020-09-13 03:54:28', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (102, 42, 'product', 8, '8112da382da7420f961203372f7c1d31', 1, '2020-09-13 06:59:31', NULL, 0, 0, 1, 0, 7, 0); +INSERT INTO `yx_store_cart` VALUES (103, 44, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-13 10:15:35', '2020-09-13 10:18:02', 1, 0, 1, 0, 6, 0); +INSERT INTO `yx_store_cart` VALUES (104, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 10:41:44', '2020-09-13 10:41:49', 1, 0, 1, 5, 0, 0); +INSERT INTO `yx_store_cart` VALUES (105, 53, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-13 10:42:37', '2020-09-13 10:42:42', 1, 0, 1, 0, 6, 0); +INSERT INTO `yx_store_cart` VALUES (106, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 10:58:02', '2020-09-13 11:04:18', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (107, 42, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:04:15', '2020-09-14 10:59:22', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (108, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:05:22', '2020-09-13 11:05:26', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (109, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:06:59', '2020-09-13 11:07:03', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (110, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:07:24', '2020-09-13 11:07:29', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (111, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:08:49', '2020-09-13 11:08:53', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (112, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:09:01', '2020-09-13 11:09:05', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (113, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:11:33', '2020-09-13 11:11:38', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (114, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:18:03', '2020-09-13 11:18:06', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (115, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:42:10', '2020-09-13 11:42:13', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (116, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:43:03', '2020-09-13 11:43:09', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (117, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:46:23', '2020-09-13 11:46:28', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (118, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:56:22', '2020-09-13 11:56:24', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (119, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 11:57:35', '2020-09-13 11:57:38', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (120, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 12:00:39', '2020-09-13 12:00:42', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (121, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 20:00:13', '2020-09-13 20:00:16', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (122, 53, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 20:01:24', '2020-09-13 20:01:49', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (123, 42, 'product', 2, '04e9d586cef8464aaee0a45439f12520', 1, '2020-09-13 21:32:46', '2020-09-13 21:33:38', 1, 0, 1, 16, 0, 0); +INSERT INTO `yx_store_cart` VALUES (124, 42, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 21:33:49', '2020-09-13 21:33:51', 1, 0, 1, 5, 0, 0); +INSERT INTO `yx_store_cart` VALUES (125, 54, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-13 22:04:08', '2020-09-13 22:05:10', 1, 0, 1, 5, 0, 0); +INSERT INTO `yx_store_cart` VALUES (126, 50, 'product', 3, 'b951f8e2ed4641f08be1bce99b716a6d', 1, '2020-09-13 22:04:30', '2020-09-13 22:04:52', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (127, 50, 'product', 4, '6a1919d9178b48f3a75fe4640e51693e', 1, '2020-09-13 22:12:38', '2020-09-13 22:12:44', 1, 0, 1, 7, 0, 0); +INSERT INTO `yx_store_cart` VALUES (128, 49, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-13 23:59:44', '2020-09-14 00:01:07', 1, 0, 1, 6, 0, 0); +INSERT INTO `yx_store_cart` VALUES (129, 49, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 00:02:41', '2020-09-14 00:02:42', 1, 0, 1, 6, 0, 0); +INSERT INTO `yx_store_cart` VALUES (130, 49, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 00:02:48', '2020-09-14 00:02:50', 1, 0, 1, 6, 0, 0); +INSERT INTO `yx_store_cart` VALUES (131, 59, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 00:03:19', '2020-09-14 00:04:08', 1, 0, 1, 6, 0, 0); +INSERT INTO `yx_store_cart` VALUES (132, 49, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 00:03:36', '2020-09-14 00:03:39', 1, 0, 1, 6, 0, 0); +INSERT INTO `yx_store_cart` VALUES (133, 55, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 00:18:43', NULL, 0, 0, 1, 6, 0, 0); +INSERT INTO `yx_store_cart` VALUES (134, 42, 'product', 3, '43cdbd1043474b4e97a1cffffa18071c', 1, '2020-09-14 08:40:57', '2020-09-14 08:41:02', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (135, 42, 'product', 3, '43cdbd1043474b4e97a1cffffa18071c', 1, '2020-09-14 08:41:11', '2020-09-14 08:41:17', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (136, 42, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-14 09:56:15', NULL, 0, 0, 1, 5, 0, 0); +INSERT INTO `yx_store_cart` VALUES (137, 61, 'product', 2, '04e9d586cef8464aaee0a45439f12520', 1, '2020-09-14 10:01:46', '2020-09-14 10:02:55', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (138, 61, 'product', 2, '04e9d586cef8464aaee0a45439f12520', 1, '2020-09-14 10:08:05', '2020-09-14 10:08:07', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (139, 40, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-14 10:13:05', '2020-09-14 10:13:17', 1, 0, 1, 5, 0, 0); +INSERT INTO `yx_store_cart` VALUES (140, 42, 'product', 1, 'd4ce8cd4bda84d479c11348e060afb8e', 1, '2020-09-14 10:18:05', '2020-09-14 10:18:12', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (141, 42, 'product', 1, 'd4ce8cd4bda84d479c11348e060afb8e', 1, '2020-09-14 10:20:20', '2020-09-14 10:20:24', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (142, 42, 'product', 1, 'd4ce8cd4bda84d479c11348e060afb8e', 1, '2020-09-14 10:22:06', '2020-09-14 10:22:12', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (143, 42, 'product', 4, '6a1919d9178b48f3a75fe4640e51693e', 1, '2020-09-14 10:50:38', '2020-09-14 10:50:44', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (144, 42, 'product', 3, '43cdbd1043474b4e97a1cffffa18071c', 1, '2020-09-14 11:00:30', '2020-09-14 11:00:36', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (145, 71, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-14 12:52:02', '2020-09-14 12:53:06', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (146, 71, 'product', 5, '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1, '2020-09-14 13:16:45', '2020-09-14 13:16:46', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (147, 76, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-14 22:20:51', NULL, 0, 0, 0, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (148, 76, 'product', 6, '90babee9cea24645870c6027fc420d42', 1, '2020-09-14 22:20:55', '2020-09-14 22:21:11', 1, 0, 1, 0, 0, 0); +INSERT INTO `yx_store_cart` VALUES (149, 54, 'product', 2, '04e9d586cef8464aaee0a45439f12520', 1, '2020-09-14 22:34:54', '2020-09-14 22:34:59', 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 '是否推荐', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `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`(`create_time`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 10 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, '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_store_category` VALUES (2, 1, '写真', 1, 'http://localhost:8000/file/pic/资讯-20200311043727918.png', 1, '2020-06-25 18:54:35', NULL, 1); +INSERT INTO `yx_store_category` VALUES (3, 1, '平面设计', 1, 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg', 1, '2020-06-25 18:54:35', '2020-09-09 21:00:17', 0); +INSERT INTO `yx_store_category` VALUES (5, 1, '名片', 1, 'https://app2.yixiang.co/file/pic/20200903171807647067.jpg', 1, '2020-06-25 18:54:35', '2020-09-09 21:00:32', 0); +INSERT INTO `yx_store_category` VALUES (6, 0, '666', 1, '', 1, '2020-06-25 18:54:35', NULL, 1); +INSERT INTO `yx_store_category` VALUES (7, 0, '99995', 1, '', 1, '2020-06-25 18:54:35', NULL, 1); +INSERT INTO `yx_store_category` VALUES (8, 7, '8888', 1, 'http://localhost:8000/file/pic/钻石-20200328094531898.jpg', 1, '2020-06-25 18:54:35', NULL, 1); +INSERT INTO `yx_store_category` VALUES (9, 0, '3333', 1, '', 1, '2020-06-25 17:11:45', NULL, 1); + +-- ---------------------------- +-- Table structure for yx_store_combination +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_combination`; +CREATE TABLE `yx_store_combination` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `product_id` bigint(20) 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 NULL DEFAULT NULL COMMENT '价格', + `product_price` decimal(10, 2) NULL DEFAULT NULL COMMENT '商品原价', + `sort` int(10) UNSIGNED NOT NULL COMMENT '排序', + `sales` int(10) UNSIGNED NOT NULL DEFAULT 0 COMMENT '销量', + `stock` int(10) UNSIGNED NULL DEFAULT NULL COMMENT '库存', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `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不可用', + `description` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '拼团内容', + `start_time` datetime(0) NOT NULL COMMENT '拼团开始时间', + `stop_time` datetime(0) 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 NULL DEFAULT '' COMMENT '单位名', + `spec_type` tinyint(1) NULL DEFAULT NULL COMMENT '规格 0单 1多', + `temp_id` int(10) NULL DEFAULT NULL COMMENT '运费模板ID', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '拼团产品表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_combination +-- ---------------------------- + +-- ---------------------------- +-- 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:开启)', + `product_id` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品ids', + `type` tinyint(255) NULL DEFAULT 0 COMMENT '优惠券类型 0-通用 1-商品券', + `create_time` datetime(0) NOT NULL COMMENT '兑换项目添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) UNSIGNED NOT NULL DEFAULT 0 COMMENT '是否删除', + PRIMARY KEY (`id`) USING BTREE, + INDEX `state`(`status`) USING BTREE, + INDEX `add_time`(`create_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; + +-- ---------------------------- +-- Records of yx_store_coupon +-- ---------------------------- +INSERT INTO `yx_store_coupon` VALUES (6, '全场通用', 0, 1.00, 10.00, 100, 0, 1, '', 0, '2020-09-12 17:57:02', NULL, 0); +INSERT INTO `yx_store_coupon` VALUES (7, '多规格商品券', 0, 1.00, 5.00, 100, 0, 1, '8', 1, '2020-09-12 17:57:46', NULL, 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', + `ctype` tinyint(1) NULL DEFAULT NULL COMMENT '优惠券类型 0-通用 1-商品券', + `start_time` datetime(0) NULL DEFAULT NULL COMMENT '优惠券领取开启时间', + `end_time` datetime(0) 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, + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '优惠券添加时间', + `update_time` datetime(0) NULL DEFAULT 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 = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券前台领取表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_coupon_issue +-- ---------------------------- +INSERT INTO `yx_store_coupon_issue` VALUES (6, '多规格商品券', 7, 1, '2020-09-12 18:07:10', '2020-09-30 00:00:00', 100, 99, 0, 1, 0, '2020-09-12 18:07:19', NULL); +INSERT INTO `yx_store_coupon_issue` VALUES (7, '全场通用', 6, 0, '2020-09-12 18:07:25', '2020-09-29 00:00:00', 100, 100, 0, 1, 0, '2020-09-12 18:07:34', NULL); + +-- ---------------------------- +-- 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` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `uid` bigint(20) NULL DEFAULT NULL COMMENT '领取优惠券用户ID', + `issue_coupon_id` int(10) NULL DEFAULT NULL COMMENT '优惠券前台领取ID', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '领取时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `uid`(`uid`, `issue_coupon_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券前台用户领取记录表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_coupon_issue_user +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_store_coupon_user +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_coupon_user`; +CREATE TABLE `yx_store_coupon_user` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '优惠券发放记录id', + `cid` int(11) UNSIGNED NOT NULL DEFAULT 0 COMMENT '兑换的项目id', + `uid` bigint(20) 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 '最低消费多少金额可用优惠券', + `create_time` datetime(0) NOT NULL COMMENT '优惠券创建时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `end_time` datetime(0) NOT NULL COMMENT '优惠券结束时间', + `use_time` datetime(0) NULL DEFAULT NULL 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 '是否有效', + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `cid`(`cid`) USING BTREE, + INDEX `uid`(`uid`) USING BTREE, + INDEX `add_time`(`create_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 = 6 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '优惠券发放记录表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_coupon_user +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_store_customer +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_customer`; +CREATE TABLE `yx_store_customer` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT 'id', + `nick_name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户昵称', + `open_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT 'openId', + `remark` varchar(128) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '备注', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '修改时间', + `is_del` tinyint(1) NULL DEFAULT 0, + `is_enable` tinyint(1) NULL DEFAULT 1 COMMENT '是否启用', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 88 CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '订单通知用户表 接收订单通知的用户' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_customer +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_store_order +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_order`; +CREATE TABLE `yx_store_order` ( + `id` bigint(20) 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` bigint(20) 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` datetime(0) NULL DEFAULT NULL COMMENT '支付时间', + `pay_type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '支付方式', + `create_time` datetime(0) NOT NULL COMMENT '创建时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `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` datetime(0) 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 '使用积分', + `pay_integral` decimal(8, 2) UNSIGNED NOT NULL DEFAULT 0.00 COMMENT '实际支付积分', + `back_integral` decimal(8, 2) UNSIGNED NULL DEFAULT 0.00 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` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '拼团产品id0一般产品', + `pink_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '拼团id 0没有拼团', + `cost` decimal(8, 2) UNSIGNED NOT NULL COMMENT '成本价', + `seckill_id` bigint(20) 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`(`create_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 = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_order +-- ---------------------------- + +-- ---------------------------- +-- 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` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `oid` bigint(20) UNSIGNED NOT NULL COMMENT '订单id', + `order_id` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '订单号', + `cart_id` bigint(20) UNSIGNED NOT NULL DEFAULT 0 COMMENT '购物车id', + `product_id` bigint(20) 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', + `is_after_sales` tinyint(1) DEFAULT '0' COMMENT '是否能售后0不能1能', + 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 = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单购物详情表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_order_cart_info +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_store_order_status +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_order_status`; +CREATE TABLE `yx_store_order_status` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `oid` bigint(20) 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` datetime(0) NOT NULL DEFAULT CURRENT_TIMESTAMP(0) COMMENT '操作时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `oid`(`oid`) USING BTREE, + INDEX `change_type`(`change_type`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '订单操作记录表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_order_status +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_store_pink +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_pink`; +CREATE TABLE `yx_store_pink` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `uid` bigint(20) 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` bigint(20) UNSIGNED NOT NULL COMMENT '拼团产品id', + `pid` bigint(20) UNSIGNED NOT NULL COMMENT '产品id', + `people` int(10) UNSIGNED NOT NULL COMMENT '拼团总人数', + `price` decimal(10, 2) UNSIGNED NOT NULL COMMENT '拼团产品单价', + `create_time` datetime(0) NOT NULL COMMENT '开始时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `stop_time` datetime(0) NULL DEFAULT NULL, + `k_id` bigint(20) 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未完成', + `is_del` tinyint(1) NULL DEFAULT 0 COMMENT '是否删除1删除 0否', + `unique_id` varchar(128) 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; + +-- ---------------------------- +-- Records of yx_store_pink +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_store_product +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_product`; +CREATE TABLE `yx_store_product` ( + `id` bigint(20) 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 '产品描述', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `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 '产品二维码地址(用户小程序海报)', + `is_sub` tinyint(1) NULL DEFAULT 0 COMMENT '是否单独分佣', + `temp_id` int(10) NULL DEFAULT NULL COMMENT '运费模板ID', + `spec_type` tinyint(1) NULL DEFAULT 0 COMMENT '规格 0单 1多', + `is_integral` tinyint(1) UNSIGNED ZEROFILL NULL DEFAULT NULL COMMENT '是开启积分兑换', + `integral` int(11) NULL DEFAULT 0 COMMENT '需要多少积分兑换 只在开启积分兑换时生效', + 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`(`create_time`) USING BTREE, + INDEX `is_postage`(`is_postage`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_product +-- ---------------------------- +INSERT INTO `yx_store_product` VALUES (1, 0, 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '照片打印', '照片打印', '照片打印', '', '5', 2.00, 0.00, 1.00, 0.00, '张', 0, 8, 992, 1, 0, 0, 0, 0, '


', '2020-09-04 17:41:30', '2020-09-05 20:57:49', 0, 0, 0, 0.00, 3.00, 0, NULL, 0, 0, 3, '', 0, 34, 0, 0,0); +INSERT INTO `yx_store_product` VALUES (2, 0, 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg', 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg,https://app2.yixiang.co/file/pic/20200903171807647067.jpg,https://app2.yixiang.co/file/pic/20200903171807641535.jpg', 'X型展架', 'X型展架', 'X型展架', '', '3', 10.00, 0.00, 12.00, 0.00, '张', 0, 20, 3310, 1, 1, 1, 0, 0, '


', '2020-09-04 17:55:16', '2020-09-05 20:57:41', 0, 0, 0, 0.00, 11.00, 0, NULL, 0, 69, 25, '', 0, 34, 1, 0,0); +INSERT INTO `yx_store_product` VALUES (3, 0, 'https://app2.yixiang.co/file/pic/20200903171807647067.jpg', 'https://app2.yixiang.co/file/pic/20200903171807647067.jpg', '彩色复印-量大有优惠', '彩色复印', '彩色复印', '', '3', 2.00, 0.00, 1.00, 0.00, '张', 0, 8, 9996, 1, 1, 1, 0, 0, '

1111

', '2020-09-07 13:14:50', '2020-09-13 22:18:46', 0, 0, 0, 0.00, 1.00, 0, NULL, 0, 0, 43, '', 0, 34, 0, 0,0); +INSERT INTO `yx_store_product` VALUES (4, 0, 'https://app2.yixiang.co/file/pic/20200903171807625149.jpg', 'https://app2.yixiang.co/file/pic/20200903171807625149.jpg', '户外写真背胶', '户外写真背胶', '户外写真背胶', '', '3', 2.00, 0.00, 1.00, 0.00, '米', 0, 24, 87, 1, 1, 1, 0, 0, '

户外写真背胶

', '2020-09-07 13:16:02', NULL, 0, 0, 0, 0.00, 1.00, 0, NULL, 0, 0, 32, '', 0, 34, 0, 0,0); +INSERT INTO `yx_store_product` VALUES (5, 0, 'https://app2.yixiang.co/file/pic/20200903171807568739.jpg', 'https://app2.yixiang.co/file/pic/20200903171807568739.jpg', '广告版定制', '广告版定制', '广告版定制', '', '3', 2.00, 0.00, 11.00, 0.00, '米', 0, 16, 2, 1, 1, 1, 1, 1, '

广告版定制

', '2020-09-07 13:17:49', '2020-09-12 00:14:32', 0, 0, 0, 0.00, 1.00, 0, NULL, 0, 0, 26, '', 0, 34, 0, 0,0); +INSERT INTO `yx_store_product` VALUES (6, 0, 'https://app2.yixiang.co/file/pic/20200903171807641535.jpg', 'https://app2.yixiang.co/file/pic/20200903171807641535.jpg', '印刷各种印刷', '印刷各种印刷', '印刷各种印刷', '', '3', 11.00, 0.00, 33.00, 0.00, '张', 1, 35, 9989, 1, 1, 1, 0, 0, '

印刷各种印刷

', '2020-09-07 13:18:45', '2020-12-20 20:58:32', 0, 0, 0, 1.00, 22.00, 0, NULL, 0, 1, 139, '', 0, 34, 0, 0,0); +INSERT INTO `yx_store_product` VALUES (7, 0, 'https://app2.yixiang.co/file/pic/20200903171208889668.png', 'https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg,https://image.dayouqiantu.cn/5ca081af6183f.jpg', '专属测试商品', '', '专属测试商品', '', '3', 100.00, 0.00, 120.00, 0.00, '张', 0, 3, 7, 1, 0, 0, 0, 0, '


', '2020-09-12 16:11:05', '2020-09-12 17:03:58', 0, 0, 0, 10.00, 110.00, 0, NULL, 0, 9, 9, '', 0, 34, 0, 0,0); + +-- ---------------------------- +-- Table structure for yx_store_product_attr +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_product_attr`; +CREATE TABLE `yx_store_product_attr` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `product_id` bigint(20) 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 = 78 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品属性表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_product_attr +-- ---------------------------- +INSERT INTO `yx_store_product_attr` VALUES (32, 1, '规格', '默认'); +INSERT INTO `yx_store_product_attr` VALUES (55, 4, '规格', '默认'); +INSERT INTO `yx_store_product_attr` VALUES (57, 2, '纸张', 'A4,A3'); +INSERT INTO `yx_store_product_attr` VALUES (58, 2, '颜色', '白色,红色'); +INSERT INTO `yx_store_product_attr` VALUES (59, 0, '规格', '默认'); +INSERT INTO `yx_store_product_attr` VALUES (62, 7, '规格', '默认'); +INSERT INTO `yx_store_product_attr` VALUES (69, 5, '规格', '默认'); +INSERT INTO `yx_store_product_attr` VALUES (70, 3, '规格', '默认'); +INSERT INTO `yx_store_product_attr` VALUES (71, 6, '规格', '默认'); +INSERT INTO `yx_store_product_attr` VALUES (76, 8, '纸张', 'A4,A3,A5'); +INSERT INTO `yx_store_product_attr` VALUES (77, 8, '颜色', '白色,红色'); + +-- ---------------------------- +-- 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` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `product_id` bigint(20) UNSIGNED NOT NULL COMMENT '商品ID', + `result` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '商品属性参数', + `change_time` datetime(0) NOT NULL COMMENT '上次修改时间', + PRIMARY KEY (`id`) USING BTREE, + INDEX `product_id`(`product_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 60 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 (26, 1, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"00005\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":3.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":1.0,\"pic\":\"\",\"pinkPrice\":0.1,\"pinkStock\":100,\"price\":2.0,\"seckillPrice\":0.2,\"seckillStock\":100,\"stock\":999,\"value1\":\"规格\",\"value2\":\"\",\"volume\":0.0,\"weight\":0.0,\"integral\":0}]}', '2020-09-08 21:18:03'); +INSERT INTO `yx_store_product_attr_result` VALUES (44, 4, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":0.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":0.0,\"pic\":\"https://app2.yixiang.co/file/pic/20200903171807584910.jpg\",\"pinkPrice\":22.0,\"pinkStock\":18,\"price\":0.0,\"seckillPrice\":0.0,\"seckillStock\":0,\"stock\":93,\"value1\":\"规格\",\"volume\":0.0,\"weight\":0.0,\"integral\":0}]}', '2020-09-12 15:55:17'); +INSERT INTO `yx_store_product_attr_result` VALUES (54, 5, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"1231321\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":1.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":11.0,\"pic\":\"https://app2.yixiang.co/file/pic/20200903171807641535.jpg\",\"pinkPrice\":29.0,\"pinkStock\":10,\"price\":2.0,\"seckillPrice\":11.99,\"seckillStock\":10,\"stock\":11,\"value1\":\"规格\",\"volume\":1.0,\"weight\":1.0,\"integral\":0}]}', '2020-09-13 10:15:24'); +INSERT INTO `yx_store_product_attr_result` VALUES (55, 3, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":1.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":1.0,\"pic\":\"https://app2.yixiang.co/file/pic/20200903171807647067.jpg\",\"pinkPrice\":119.99,\"pinkStock\":10,\"price\":2.0,\"seckillPrice\":0.0,\"seckillStock\":0,\"stock\":9999,\"value1\":\"规格\",\"volume\":0.0,\"weight\":0.0,\"integral\":0}]}', '2020-09-13 22:18:46'); +INSERT INTO `yx_store_product_attr_result` VALUES (59, 6, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"00002\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":22.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":33.0,\"pic\":\"https://app2.yixiang.co/file/pic/20200903171807641535.jpg\",\"pinkPrice\":19.9,\"pinkStock\":99,\"price\":11.0,\"seckillPrice\":22.98,\"seckillStock\":2000,\"stock\":9989,\"value1\":\"规格\",\"volume\":1.0,\"weight\":1.0,\"integral\":0}]}', '2020-10-13 17:09:28'); +INSERT INTO `yx_store_product_attr_result` VALUES (60, 7, '{\"attr\":[{\"attrHidden\":\"\",\"detail\":[\"默认\"],\"detailValue\":\"\",\"value\":\"规格\"}],\"value\":[{\"barCode\":\"\",\"brokerage\":0.0,\"brokerageTwo\":0.0,\"cost\":110.0,\"detail\":{\"规格\":\"默认\"},\"otPrice\":120.0,\"pic\":\"https://app2.yixiang.co/file/pic/20200911093912577832.png\",\"pinkPrice\":1.0,\"pinkStock\":10,\"price\":100.0,\"seckillPrice\":0.0,\"seckillStock\":0,\"stock\":10,\"value1\":\"规格\",\"volume\":0.0,\"weight\":0.0,\"integral\":0}]}', '2020-11-17 11:49:09'); + +-- ---------------------------- +-- 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` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `product_id` bigint(20) UNSIGNED NOT NULL COMMENT '商品ID', + `sku` 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 '成本价', + `bar_code` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '商品条码', + `ot_price` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '原价', + `weight` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '重量', + `volume` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '体积', + `brokerage` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '一级返佣', + `brokerage_two` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '二级返佣', + `pink_price` decimal(8, 2) NOT NULL DEFAULT 0.00 COMMENT '拼团价', + `pink_stock` int(10) NOT NULL DEFAULT 0 COMMENT '拼团库存', + `seckill_price` decimal(10, 2) NOT NULL DEFAULT 0.00 COMMENT '秒杀价', + `seckill_stock` int(10) NOT NULL DEFAULT 0 COMMENT '秒杀库存', + `integral` int(10) UNSIGNED ZEROFILL NULL DEFAULT 0000000000 COMMENT '需要多少积分兑换', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `unique`(`unique`, `sku`) USING BTREE, + INDEX `store_id`(`product_id`, `sku`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 126 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 (44, 1, '默认', 993, 6, 2.00, 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg', 'd4ce8cd4bda84d479c11348e060afb8e', 3.00, '00005', 1.00, 0.00, 0.00, 0.00, 0.00, 0.10, 100, 0.20, 97, NULL); +INSERT INTO `yx_store_product_attr_value` VALUES (77, 4, '默认', 91, 2, 0.00, 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg', '6a1919d9178b48f3a75fe4640e51693e', 0.00, '', 0.00, 0.00, 0.00, 0.00, 0.00, 22.00, 17, 0.00, 0, NULL); +INSERT INTO `yx_store_product_attr_value` VALUES (79, 2, 'A4,白色', 987, 4, 10.00, 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg', '04e9d586cef8464aaee0a45439f12520', 11.00, '00001', 12.00, 0.00, 0.00, 0.00, 0.00, 11.09, 99, 1.00, 100, NULL); +INSERT INTO `yx_store_product_attr_value` VALUES (80, 2, 'A4,红色', 661, 0, 11.00, 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg', '3d1ffa92e6064c36b614d3046c268968', 11.00, '00002', 12.00, 0.00, 0.00, 0.00, 0.00, 22.88, 99, 2.00, 100, NULL); +INSERT INTO `yx_store_product_attr_value` VALUES (81, 2, 'A3,白色', 995, 0, 12.00, 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg', '344f3a0e9d644845ae483c8b9a84a112', 11.00, '00003', 12.00, 0.00, 0.00, 0.00, 0.00, 33.89, 99, 3.00, 100, NULL); +INSERT INTO `yx_store_product_attr_value` VALUES (82, 2, 'A3,红色', 665, 0, 13.00, 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg', '4a9ca8587855412ea7be9ba53f829052', 11.00, '00004', 12.00, 0.00, 0.00, 0.00, 0.00, 45.66, 100, 4.00, 100, NULL); +INSERT INTO `yx_store_product_attr_value` VALUES (83, 0, '默认', 10, 0, 100.00, 'https://app2.yixiang.co/file/pic/20200911093912577832.png', 'bbdc071ff67c4892839eac9f62e7eb18', 110.00, '', 120.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0.00, 0, NULL); +INSERT INTO `yx_store_product_attr_value` VALUES (86, 7, '默认', 7, 3, 100.00, 'https://app2.yixiang.co/file/pic/20200911093912577832.png', '789984b858bb489bb6313107e11fdc15', 110.00, '', 120.00, 0.00, 0.00, 0.00, 0.00, 0.00, 0, 0.00, 0, NULL); +INSERT INTO `yx_store_product_attr_value` VALUES (105, 5, '默认', 3, 8, 2.00, 'https://app2.yixiang.co/file/pic/20200903171807641535.jpg', '040fb7ab2a8b4ff3b6c9d1c78ea3e889', 1.00, '1231321', 11.00, 1.00, 1.00, 0.00, 0.00, 29.00, 5, 11.99, 8, NULL); +INSERT INTO `yx_store_product_attr_value` VALUES (106, 3, '默认', 9996, 3, 2.00, 'https://app2.yixiang.co/file/pic/20200903171807647067.jpg', '43cdbd1043474b4e97a1cffffa18071c', 1.00, '', 1.00, 0.00, 0.00, 0.00, 0.00, 119.99, 10, 0.00, 0, NULL); +INSERT INTO `yx_store_product_attr_value` VALUES (107, 6, '默认', 9989, 0, 11.00, 'https://app2.yixiang.co/file/pic/20200903171807641535.jpg', '4dcb457a13924be7b246f72f03ea7931', 22.00, '00002', 33.00, 1.00, 1.00, 0.00, 0.00, 19.90, 99, 22.98, 2000, 0000000000); +INSERT INTO `yx_store_product_attr_value` VALUES (120, 8, 'A4,白色', 95, 0, 9.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', '9306b671348a41d2966392578a31e00b', 1.00, '', 12.00, 0.00, 0.00, 1.00, 1.00, 1.00, 9, 1.00, 10, 0000000100); +INSERT INTO `yx_store_product_attr_value` VALUES (121, 8, 'A4,红色', 99, 0, 8.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 'e3fc8496d4a0484a9946d84b03a78eee', 1.00, '', 9.00, 0.00, 0.00, 1.00, 1.00, 2.00, 10, 1.00, 10, 0000000200); +INSERT INTO `yx_store_product_attr_value` VALUES (122, 8, 'A3,白色', 88, 0, 7.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 'a05ff262758548edbef5fda9e6dc26de', 1.00, '', 9.00, 0.00, 0.00, 1.00, 1.00, 0.50, 10, 0.10, 10, 0000000300); +INSERT INTO `yx_store_product_attr_value` VALUES (123, 8, 'A3,红色', 88, 0, 6.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 'dc866a081e2b4a72b2ee9468ad7ba171', 1.00, '', 9.00, 0.00, 0.00, 1.00, 1.00, 1.00, 9, 0.10, 9, 0000000400); +INSERT INTO `yx_store_product_attr_value` VALUES (124, 8, 'A5,白色', 65, 0, 5.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', '094a42db903648acb275c868af2bd6ba', 1.00, '', 9.00, 0.00, 0.00, 1.00, 1.00, 2.00, 9, 0.10, 9, 0000000500); +INSERT INTO `yx_store_product_attr_value` VALUES (125, 8, 'A5,红色', 66, 0, 4.00, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 'c35190bdfb5248ba9a219481adef9b1b', 1.00, '', 9.00, 0.00, 0.00, 1.00, 1.00, 3.00, 9, 0.10, 9, 0000069090); + +-- ---------------------------- +-- Table structure for yx_store_product_relation +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_product_relation`; +CREATE TABLE `yx_store_product_relation` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `uid` bigint(20) UNSIGNED NOT NULL COMMENT '用户ID', + `product_id` bigint(20) UNSIGNED NOT NULL COMMENT '商品ID', + `type` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型(收藏(collect)、点赞(like))', + `category` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '某种类型的商品(普通商品、秒杀商品)', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + 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 = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品点赞和收藏表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_product_relation +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_store_product_reply +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_product_reply`; +CREATE TABLE `yx_store_product_reply` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '评论ID', + `uid` bigint(20) NOT NULL COMMENT '用户ID', + `oid` bigint(20) NOT NULL COMMENT '订单ID', + `unique` char(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '唯一id', + `product_id` bigint(20) 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 utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '评论内容', + `pics` text CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '评论图片', + `create_time` datetime(0) NOT NULL COMMENT '评论时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `merchant_reply_content` varchar(300) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '管理员回复内容', + `merchant_reply_time` datetime(0) 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, + INDEX `add_time`(`create_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 = 4 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '评论表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_product_reply +-- ---------------------------- +INSERT INTO `yx_store_product_reply` VALUES (3, 43, 67, 'c1907f2efeff48168c119ee28ddcac42', 8, 'product', 5, 5, '棒棒哒', '', '2020-09-12 17:45:11', NULL, NULL, NULL, 0, 0); + +-- ---------------------------- +-- Table structure for yx_store_product_rule +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_product_rule`; +CREATE TABLE `yx_store_product_rule` ( + `id` int(10) NOT NULL AUTO_INCREMENT, + `rule_name` varchar(32) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '规格名称', + `rule_value` json NOT NULL COMMENT '规格值', + `create_time` datetime(0) NULL DEFAULT NULL, + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 25 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品规则值(规格)表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_product_rule +-- ---------------------------- +INSERT INTO `yx_store_product_rule` VALUES (10, '图文', '[{\"value\": \"纸张\", \"detail\": [\"A4\", \"A3\"]}, {\"value\": \"颜色\", \"detail\": [\"白色\", \"红色\"]}]', '2020-06-29 13:46:52', '2020-06-29 15:57:28', 0); +INSERT INTO `yx_store_product_rule` VALUES (24, '手机', '[{\"value\": \"颜色\", \"detail\": [\"黑色\", \"白色\"]}, {\"value\": \"尺寸\", \"detail\": [\"5寸\", \"7寸\"]}]', '2020-06-29 15:55:51', '2020-07-04 19:50:14', 0); + +-- ---------------------------- +-- Table structure for yx_store_seckill +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_seckill`; +CREATE TABLE `yx_store_seckill` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '商品秒杀产品表id', + `product_id` bigint(20) 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 NULL DEFAULT NULL COMMENT '价格', + `cost` decimal(8, 2) UNSIGNED NULL DEFAULT 0.00 COMMENT '成本', + `ot_price` decimal(10, 2) UNSIGNED NULL DEFAULT NULL COMMENT '原价', + `give_integral` decimal(10, 2) UNSIGNED NULL DEFAULT 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` date NOT NULL COMMENT '开始时间', + `stop_time` date NOT NULL COMMENT '结束时间', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `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 '显示', + `time_id` int(10) UNSIGNED NULL DEFAULT 0 COMMENT '时间段id', + `spec_type` tinyint(1) NULL DEFAULT NULL COMMENT '规格 0单 1多', + `temp_id` int(10) NULL DEFAULT NULL 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`(`create_time`) USING BTREE, + INDEX `sort`(`sort`) USING BTREE, + INDEX `is_postage`(`is_postage`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 8 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '商品秒杀产品表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_store_seckill +-- ---------------------------- +INSERT INTO `yx_store_seckill` VALUES (5, 6, 'https://app2.yixiang.co/file/pic/20200903171807641535.jpg', 'https://app2.yixiang.co/file/pic/20200903171807641535.jpg,https://app2.yixiang.co/file/pic/20200903171807641535.jpg', '印刷各种印刷', '印刷各种印刷', 11.00, 22.00, 33.00, NULL, 1, 2000, 12, '张', 22.98, '

印刷各种印刷


', '2020-09-12', '2020-09-30', '2020-09-12 16:11:31', NULL, 1, 0, 0, 0, 2, 1, 211, 0, 34); +INSERT INTO `yx_store_seckill` VALUES (6, 5, 'https://app2.yixiang.co/file/pic/20200903171807568739.jpg', 'https://app2.yixiang.co/file/pic/20200903171807568739.jpg', '广告版定制', '广告版定制', 2.00, 1.00, 11.00, NULL, 0, 8, 9, '米', 11.99, '

广告版定制

', '2020-09-12', '2020-09-30', '2020-09-12 16:13:22', '2020-09-13 10:15:24', 1, 0, 0, 0, 2, 1, 212, 0, 34); +INSERT INTO `yx_store_seckill` VALUES (7, 8, 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca081af6183f.jpg,https://image.dayouqiantu.cn/5ca04fa9c08ef.jpg', '多规格商品测试', '多规格商品测试', 4.00, 1.00, 9.00, NULL, 0, 57, 4, '张', 0.10, '


', '2020-09-10', '2020-09-30', '2020-09-12 18:23:33', NULL, 1, 0, 0, 0, 1, 1, 215, 1, 34); + +-- ---------------------------- +-- Table structure for yx_store_visit +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_visit`; +CREATE TABLE `yx_store_visit` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `product_id` bigint(20) 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` bigint(20) 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; + +-- ---------------------------- +-- Records of yx_store_visit +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_system_attachment +-- ---------------------------- +DROP TABLE IF EXISTS `yx_system_attachment`; +CREATE TABLE `yx_system_attachment` ( + `att_id` bigint(20) 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组合数据图', + `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` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '用户id', + `invite_code` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '邀请码', + `create_time` datetime(0) NULL DEFAULT NULL, + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`att_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 121 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '附件管理表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_system_attachment +-- ---------------------------- +INSERT INTO `yx_system_attachment` VALUES (113, '12_55_wechat_bargain_share_wap.jpg', '/home/yshop/file/qrcode/12_55_wechat_bargain_share_wap.jpg', 'qrcode/12_55_wechat_bargain_share_wap.jpg', '3897220', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 13:38:52', NULL, 0); +INSERT INTO `yx_system_attachment` VALUES (114, '12_55_wechat_bargain_user_spread.jpg', '/home/yshop/file/qrcode/12_55_wechat_bargain_user_spread.jpg', 'qrcode/12_55_wechat_bargain_user_spread.jpg', '43231', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 13:38:53', NULL, 0); +INSERT INTO `yx_system_attachment` VALUES (115, '4_59_uniappH5_product_detail_wap.jpg', '/home/yshop/file/qrcode/4_59_uniappH5_product_detail_wap.jpg', 'qrcode/4_59_uniappH5_product_detail_wap.jpg', '3904929', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 13:43:20', NULL, 0); +INSERT INTO `yx_system_attachment` VALUES (116, '4_59_uniappH5_product_user_spread.jpg', '/home/yshop/file/qrcode/4_59_uniappH5_product_user_spread.jpg', 'qrcode/4_59_uniappH5_product_user_spread.jpg', '113247', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 13:43:20', NULL, 0); +INSERT INTO `yx_system_attachment` VALUES (117, '4_75_uniappH5_product_detail_wap.jpg', '/home/yshop/file/qrcode/4_75_uniappH5_product_detail_wap.jpg', 'qrcode/4_75_uniappH5_product_detail_wap.jpg', '4025717', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 17:25:11', NULL, 0); +INSERT INTO `yx_system_attachment` VALUES (118, '4_75_uniappH5_product_user_spread.jpg', '/home/yshop/file/qrcode/4_75_uniappH5_product_user_spread.jpg', 'qrcode/4_75_uniappH5_product_user_spread.jpg', '113146', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 17:25:11', NULL, 0); +INSERT INTO `yx_system_attachment` VALUES (119, '915891458048_yshop.jpg', '/home/yshop/file/qrcode/915891458048_yshop.jpg', 'qrcode/915891458048_yshop.jpg', '4148444', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 22:21:17', NULL, 0); +INSERT INTO `yx_system_attachment` VALUES (120, '915891458048_yshop.jpg', '/home/yshop/file/qrcode/915891458048_yshop.jpg', 'qrcode/915891458048_yshop.jpg', '4148444', 'image/jpeg', 0, 1, 1, 0, '', '2020-09-14 22:21:17', NULL, 0); + +-- ---------------------------- +-- Table structure for yx_system_city +-- ---------------------------- +DROP TABLE IF EXISTS `yx_system_city`; +CREATE TABLE `yx_system_city` ( + `id` int(11) NOT NULL AUTO_INCREMENT, + `city_id` int(11) NOT NULL DEFAULT 0 COMMENT '城市id', + `level` int(11) NOT NULL DEFAULT 0 COMMENT '省市级别', + `parent_id` int(11) NOT NULL DEFAULT 0 COMMENT '父级id', + `area_code` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '区号', + `name` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '名称', + `merger_name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '合并名称', + `lng` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '经度', + `lat` varchar(50) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '纬度', + `is_show` tinyint(1) NOT NULL DEFAULT 1 COMMENT '是否展示', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 3971 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '城市表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_system_city +-- ---------------------------- +INSERT INTO `yx_system_city` VALUES (1, 1, 0, 0, '110000000000', '北京市', '北京', '116.407526', '39.904030', 1); +INSERT INTO `yx_system_city` VALUES (2, 7362, 0, 0, '120000000000', '天津市', '天津', '117.200983', '39.084158', 1); +INSERT INTO `yx_system_city` VALUES (3, 13267, 0, 0, '130000000000', '河北省', '河北', '114.468664', '38.037057', 1); +INSERT INTO `yx_system_city` VALUES (4, 67747, 0, 0, '140000000000', '山西省', '山西', '112.562398', '37.873531', 1); +INSERT INTO `yx_system_city` VALUES (5, 99537, 0, 0, '150000000000', '内蒙古自治区', '内蒙古', '111.765617', '40.817498', 1); +INSERT INTO `yx_system_city` VALUES (6, 115224, 0, 0, '210000000000', '辽宁省', '辽宁', '123.429440', '41.835441', 1); +INSERT INTO `yx_system_city` VALUES (7, 133208, 0, 0, '220000000000', '吉林省', '吉林', '125.325990', '43.896536', 1); +INSERT INTO `yx_system_city` VALUES (8, 145665, 0, 0, '230000000000', '黑龙江省', '黑龙江', '126.661669', '45.742347', 1); +INSERT INTO `yx_system_city` VALUES (9, 161792, 0, 0, '310000000000', '上海市', '上海', '121.473701', '31.230416', 1); +INSERT INTO `yx_system_city` VALUES (10, 167904, 0, 0, '320000000000', '江苏省', '江苏', '118.763232', '32.061707', 1); +INSERT INTO `yx_system_city` VALUES (11, 191019, 0, 0, '330000000000', '浙江省', '浙江', '120.152791', '30.267446', 1); +INSERT INTO `yx_system_city` VALUES (12, 224649, 0, 0, '340000000000', '安徽省', '安徽', '117.284922', '31.861184', 1); +INSERT INTO `yx_system_city` VALUES (13, 244377, 0, 0, '350000000000', '福建省', '福建', '119.295144', '26.100779', 1); +INSERT INTO `yx_system_city` VALUES (14, 262698, 0, 0, '360000000000', '江西省', '江西', '115.909228', '28.675696', 1); +INSERT INTO `yx_system_city` VALUES (15, 285860, 0, 0, '370000000000', '山东省', '山东', '117.020359', '36.668530', 1); +INSERT INTO `yx_system_city` VALUES (16, 367395, 0, 0, '410000000000', '河南省', '河南', '113.753602', '34.765515', 1); +INSERT INTO `yx_system_city` VALUES (17, 420824, 0, 0, '420000000000', '湖北省', '湖北', '114.341861', '30.546498', 1); +INSERT INTO `yx_system_city` VALUES (18, 452123, 0, 0, '430000000000', '湖南省', '湖南', '112.983810', '28.112444', 1); +INSERT INTO `yx_system_city` VALUES (19, 483250, 0, 0, '440000000000', '广东省', '广东', '113.266530', '23.132191', 1); +INSERT INTO `yx_system_city` VALUES (20, 511462, 0, 0, '450000000000', '广西壮族自治区', '广西', '108.327546', '22.815478', 1); +INSERT INTO `yx_system_city` VALUES (21, 529344, 0, 0, '460000000000', '海南省', '海南', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (22, 533328, 0, 0, '500000000000', '重庆市', '重庆', '106.551556', '29.563009', 1); +INSERT INTO `yx_system_city` VALUES (23, 545532, 0, 0, '510000000000', '四川省', '四川', '104.075931', '30.651651', 1); +INSERT INTO `yx_system_city` VALUES (24, 604131, 0, 0, '520000000000', '贵州省', '贵州', '106.707410', '26.598194', 1); +INSERT INTO `yx_system_city` VALUES (25, 624372, 0, 0, '530000000000', '云南省', '云南', '102.710002', '25.045806', 1); +INSERT INTO `yx_system_city` VALUES (26, 640332, 0, 0, '540000000000', '西藏自治区', '西藏', '91.117212', '29.646922', 1); +INSERT INTO `yx_system_city` VALUES (27, 646578, 0, 0, '610000000000', '陕西省', '陕西', '108.954239', '34.265472', 1); +INSERT INTO `yx_system_city` VALUES (28, 671119, 0, 0, '620000000000', '甘肃省', '甘肃', '103.826308', '36.059421', 1); +INSERT INTO `yx_system_city` VALUES (29, 690094, 0, 0, '630000000000', '青海省', '青海', '101.780199', '36.620901', 1); +INSERT INTO `yx_system_city` VALUES (30, 695259, 0, 0, '640000000000', '宁夏回族自治区', '宁夏', '106.258754', '38.471317', 1); +INSERT INTO `yx_system_city` VALUES (31, 698440, 0, 0, '650000000000', '新疆维吾尔自治区', '新疆', '87.627704', '43.793026', 1); +INSERT INTO `yx_system_city` VALUES (32, 714368, 0, 0, '0', '香港特别行政区', '香港', '114.173355', '22.320048', 1); +INSERT INTO `yx_system_city` VALUES (33, 714390, 0, 0, '0', '澳门特别行政区', '澳门', '113.549090', '22.198951', 1); +INSERT INTO `yx_system_city` VALUES (34, 714401, 0, 0, '0', '台湾', '台湾', '121.509062', '25.044332', 1); +INSERT INTO `yx_system_city` VALUES (35, 2, 1, 1, '110100000000', '北京市', '北京', '116.407526', '39.904030', 1); +INSERT INTO `yx_system_city` VALUES (36, 7363, 1, 7362, '120100000000', '天津市', '天津', '117.200983', '39.084158', 1); +INSERT INTO `yx_system_city` VALUES (37, 13268, 1, 13267, '130100000000', '石家庄市', '河北,石家庄', '114.514859', '38.042306', 1); +INSERT INTO `yx_system_city` VALUES (38, 18128, 1, 13267, '130200000000', '唐山市', '河北,唐山', '118.180193', '39.630867', 1); +INSERT INTO `yx_system_city` VALUES (39, 24371, 1, 13267, '130300000000', '秦皇岛市', '河北,秦皇岛', '119.600492', '39.935385', 1); +INSERT INTO `yx_system_city` VALUES (40, 26779, 1, 13267, '130400000000', '邯郸市', '河北,邯郸', '114.538961', '36.625657', 1); +INSERT INTO `yx_system_city` VALUES (41, 32688, 1, 13267, '130500000000', '邢台市', '河北,邢台', '114.504844', '37.070589', 1); +INSERT INTO `yx_system_city` VALUES (42, 38160, 1, 13267, '130600000000', '保定市', '河北,保定', '115.464806', '38.873891', 1); +INSERT INTO `yx_system_city` VALUES (43, 44570, 1, 13267, '130700000000', '张家口市', '河北,张家口', '114.887543', '40.824418', 1); +INSERT INTO `yx_system_city` VALUES (44, 49190, 1, 13267, '130800000000', '承德市', '河北,承德', '117.962410', '40.954071', 1); +INSERT INTO `yx_system_city` VALUES (45, 52018, 1, 13267, '130900000000', '沧州市', '河北,沧州', '116.838834', '38.304477', 1); +INSERT INTO `yx_system_city` VALUES (46, 58247, 1, 13267, '131000000000', '廊坊市', '河北,廊坊', '116.683752', '39.538047', 1); +INSERT INTO `yx_system_city` VALUES (47, 61804, 1, 13267, '131100000000', '衡水市', '河北,衡水', '115.670177', '37.738920', 1); +INSERT INTO `yx_system_city` VALUES (48, 66813, 1, 13267, '139000000000', '直辖县', '河北', '114.468664', '38.037057', 1); +INSERT INTO `yx_system_city` VALUES (49, 67748, 1, 67747, '140100000000', '太原市', '山西,太原', '112.548879', '37.870590', 1); +INSERT INTO `yx_system_city` VALUES (50, 69390, 1, 67747, '140200000000', '大同市', '山西,大同', '113.612440', '40.040295', 1); +INSERT INTO `yx_system_city` VALUES (51, 71850, 1, 67747, '140300000000', '阳泉市', '山西,阳泉', '113.580519', '37.856971', 1); +INSERT INTO `yx_system_city` VALUES (52, 72975, 1, 67747, '140400000000', '长治市', '山西,长治', '113.116255', '36.195386', 1); +INSERT INTO `yx_system_city` VALUES (53, 76726, 1, 67747, '140500000000', '晋城市', '山西,晋城', '112.851831', '35.490701', 1); +INSERT INTO `yx_system_city` VALUES (54, 79163, 1, 67747, '140600000000', '朔州市', '山西,朔州', '112.432825', '39.331595', 1); +INSERT INTO `yx_system_city` VALUES (55, 81000, 1, 67747, '140700000000', '晋中市', '山西,晋中', '112.752694', '37.687024', 1); +INSERT INTO `yx_system_city` VALUES (56, 84092, 1, 67747, '140800000000', '运城市', '山西,运城', '111.007528', '35.026412', 1); +INSERT INTO `yx_system_city` VALUES (57, 87613, 1, 67747, '140900000000', '忻州市', '山西,忻州', '112.734174', '38.416663', 1); +INSERT INTO `yx_system_city` VALUES (58, 92738, 1, 67747, '141000000000', '临汾市', '山西,临汾', '111.518976', '36.088005', 1); +INSERT INTO `yx_system_city` VALUES (59, 96064, 1, 67747, '141100000000', '吕梁市', '山西,吕梁', '111.144319', '37.518314', 1); +INSERT INTO `yx_system_city` VALUES (60, 99538, 1, 99537, '150100000000', '呼和浩特市', '内蒙古,呼和浩特', '111.749180', '40.842585', 1); +INSERT INTO `yx_system_city` VALUES (61, 100904, 1, 99537, '150200000000', '包头市', '内蒙古,包头', '109.840347', '40.657449', 1); +INSERT INTO `yx_system_city` VALUES (62, 101772, 1, 99537, '150300000000', '乌海市', '内蒙古,乌海', '106.794249', '39.655388', 1); +INSERT INTO `yx_system_city` VALUES (63, 101884, 1, 99537, '150400000000', '赤峰市', '内蒙古,赤峰', '118.886856', '42.257817', 1); +INSERT INTO `yx_system_city` VALUES (64, 104457, 1, 99537, '150500000000', '通辽市', '内蒙古,通辽', '122.243444', '43.652890', 1); +INSERT INTO `yx_system_city` VALUES (65, 107065, 1, 99537, '150600000000', '鄂尔多斯市', '内蒙古,鄂尔多斯', '109.781327', '39.608266', 1); +INSERT INTO `yx_system_city` VALUES (66, 108166, 1, 99537, '150700000000', '呼伦贝尔市', '内蒙古,呼伦贝尔', '119.765744', '49.211574', 1); +INSERT INTO `yx_system_city` VALUES (67, 109847, 1, 99537, '150800000000', '巴彦淖尔市', '内蒙古,巴彦淖尔', '107.387657', '40.743213', 1); +INSERT INTO `yx_system_city` VALUES (68, 110889, 1, 99537, '150900000000', '乌兰察布市', '内蒙古,乌兰察布', '113.132585', '40.994785', 1); +INSERT INTO `yx_system_city` VALUES (69, 112552, 1, 99537, '152200000000', '兴安盟', '内蒙古,兴安', '122.067042', '46.077561', 1); +INSERT INTO `yx_system_city` VALUES (70, 113777, 1, 99537, '152500000000', '锡林郭勒盟', '内蒙古,锡林郭勒', '116.048222', '43.933454', 1); +INSERT INTO `yx_system_city` VALUES (71, 114940, 1, 99537, '152900000000', '阿拉善盟', '内蒙古,阿拉善', '105.728969', '38.851892', 1); +INSERT INTO `yx_system_city` VALUES (72, 115225, 1, 115224, '210100000000', '沈阳市', '辽宁,沈阳', '123.431474', '41.805698', 1); +INSERT INTO `yx_system_city` VALUES (73, 117932, 1, 115224, '210200000000', '大连市', '辽宁,大连', '121.614682', '38.914003', 1); +INSERT INTO `yx_system_city` VALUES (74, 119789, 1, 115224, '210300000000', '鞍山市', '辽宁,鞍山', '122.994329', '41.108647', 1); +INSERT INTO `yx_system_city` VALUES (75, 121081, 1, 115224, '210400000000', '抚顺市', '辽宁,抚顺', '123.957208', '41.880872', 1); +INSERT INTO `yx_system_city` VALUES (76, 122142, 1, 115224, '210500000000', '本溪市', '辽宁,本溪', '123.766485', '41.294175', 1); +INSERT INTO `yx_system_city` VALUES (77, 122730, 1, 115224, '210600000000', '丹东市', '辽宁,丹东', '124.354706', '40.000499', 1); +INSERT INTO `yx_system_city` VALUES (78, 123698, 1, 115224, '210700000000', '锦州市', '辽宁,锦州', '121.127003', '41.095119', 1); +INSERT INTO `yx_system_city` VALUES (79, 125249, 1, 115224, '210800000000', '营口市', '辽宁,营口', '122.235417', '40.667012', 1); +INSERT INTO `yx_system_city` VALUES (80, 126156, 1, 115224, '210900000000', '阜新市', '辽宁,阜新', '121.670323', '42.021619', 1); +INSERT INTO `yx_system_city` VALUES (81, 127070, 1, 115224, '211000000000', '辽阳市', '辽宁,辽阳', '123.236944', '41.267244', 1); +INSERT INTO `yx_system_city` VALUES (82, 127834, 1, 115224, '211100000000', '盘锦市', '辽宁,盘锦', '122.070714', '41.119997', 1); +INSERT INTO `yx_system_city` VALUES (83, 128421, 1, 115224, '211200000000', '铁岭市', '辽宁,铁岭', '123.726166', '42.223769', 1); +INSERT INTO `yx_system_city` VALUES (84, 129977, 1, 115224, '211300000000', '朝阳市', '辽宁,朝阳', '120.389862', '41.497767', 1); +INSERT INTO `yx_system_city` VALUES (85, 131738, 1, 115224, '211400000000', '葫芦岛市', '辽宁,葫芦岛', '120.836932', '40.711052', 1); +INSERT INTO `yx_system_city` VALUES (86, 133209, 1, 133208, '220100000000', '长春市', '吉林,长春', '125.323544', '43.817071', 1); +INSERT INTO `yx_system_city` VALUES (87, 135392, 1, 133208, '220200000000', '吉林市', '吉林,吉林', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (88, 137206, 1, 133208, '220300000000', '四平市', '吉林,四平', '124.350398', '43.166419', 1); +INSERT INTO `yx_system_city` VALUES (89, 138721, 1, 133208, '220400000000', '辽源市', '吉林,辽源', '125.143532', '42.887918', 1); +INSERT INTO `yx_system_city` VALUES (90, 139340, 1, 133208, '220500000000', '通化市', '吉林,通化', '125.939697', '41.728401', 1); +INSERT INTO `yx_system_city` VALUES (91, 140601, 1, 133208, '220600000000', '白山市', '吉林,白山', '126.423587', '41.939994', 1); +INSERT INTO `yx_system_city` VALUES (92, 141361, 1, 133208, '220700000000', '松原市', '吉林,松原', '124.825117', '45.141789', 1); +INSERT INTO `yx_system_city` VALUES (93, 142786, 1, 133208, '220800000000', '白城市', '吉林,白城', '122.839024', '45.619641', 1); +INSERT INTO `yx_system_city` VALUES (94, 143990, 1, 133208, '222400000000', '延边朝鲜族自治州', '吉林,延边', '129.508946', '42.891253', 1); +INSERT INTO `yx_system_city` VALUES (95, 145666, 1, 145665, '230100000000', '哈尔滨市', '黑龙江,哈尔滨', '126.534967', '45.803775', 1); +INSERT INTO `yx_system_city` VALUES (96, 149079, 1, 145665, '230200000000', '齐齐哈尔市', '黑龙江,齐齐哈尔', '123.918186', '47.354348', 1); +INSERT INTO `yx_system_city` VALUES (97, 150915, 1, 145665, '230300000000', '鸡西市', '黑龙江,鸡西', '130.969333', '45.295075', 1); +INSERT INTO `yx_system_city` VALUES (98, 151830, 1, 145665, '230400000000', '鹤岗市', '黑龙江,鹤岗', '130.297964', '47.349916', 1); +INSERT INTO `yx_system_city` VALUES (99, 152413, 1, 145665, '230500000000', '双鸭山市', '黑龙江,双鸭山', '131.159133', '46.646508', 1); +INSERT INTO `yx_system_city` VALUES (100, 153313, 1, 145665, '230600000000', '大庆市', '黑龙江,大庆', '125.103784', '46.589309', 1); +INSERT INTO `yx_system_city` VALUES (101, 154201, 1, 145665, '230700000000', '伊春市', '黑龙江,伊春', '128.841147', '47.727536', 1); +INSERT INTO `yx_system_city` VALUES (102, 155076, 1, 145665, '230800000000', '佳木斯市', '黑龙江,佳木斯', '130.318917', '46.799922', 1); +INSERT INTO `yx_system_city` VALUES (103, 156713, 1, 145665, '230900000000', '七台河市', '黑龙江,七台河', '131.003138', '45.771726', 1); +INSERT INTO `yx_system_city` VALUES (104, 157130, 1, 145665, '231000000000', '牡丹江市', '黑龙江,牡丹江', '129.633168', '44.551653', 1); +INSERT INTO `yx_system_city` VALUES (105, 158623, 1, 145665, '231100000000', '黑河市', '黑龙江,黑河', '127.528560', '50.245329', 1); +INSERT INTO `yx_system_city` VALUES (106, 159769, 1, 145665, '231200000000', '绥化市', '黑龙江,绥化', '126.968887', '46.653845', 1); +INSERT INTO `yx_system_city` VALUES (107, 161651, 1, 145665, '232700000000', '大兴安岭地区', '黑龙江,大兴安岭', '124.711080', '52.335206', 1); +INSERT INTO `yx_system_city` VALUES (108, 161793, 1, 161792, '310100000000', '上海市', '上海', '121.473701', '31.230416', 1); +INSERT INTO `yx_system_city` VALUES (109, 167905, 1, 167904, '320100000000', '南京市', '江苏,南京', '118.796877', '32.060255', 1); +INSERT INTO `yx_system_city` VALUES (110, 169375, 1, 167904, '320200000000', '无锡市', '江苏,无锡', '120.311910', '31.491169', 1); +INSERT INTO `yx_system_city` VALUES (111, 170724, 1, 167904, '320300000000', '徐州市', '江苏,徐州', '117.284124', '34.205768', 1); +INSERT INTO `yx_system_city` VALUES (112, 173635, 1, 167904, '320400000000', '常州市', '江苏,常州', '119.973987', '31.810689', 1); +INSERT INTO `yx_system_city` VALUES (113, 174764, 1, 167904, '320500000000', '苏州市', '江苏,苏州', '120.585315', '31.298886', 1); +INSERT INTO `yx_system_city` VALUES (114, 176920, 1, 167904, '320600000000', '南通市', '江苏,南通', '120.894291', '31.980171', 1); +INSERT INTO `yx_system_city` VALUES (115, 178999, 1, 167904, '320700000000', '连云港市', '江苏,连云港', '119.221611', '34.596653', 1); +INSERT INTO `yx_system_city` VALUES (116, 180743, 1, 167904, '320800000000', '淮安市', '江苏,淮安', '119.015285', '33.610353', 1); +INSERT INTO `yx_system_city` VALUES (117, 182538, 1, 167904, '320900000000', '盐城市', '江苏,盐城', '120.163561', '33.347382', 1); +INSERT INTO `yx_system_city` VALUES (118, 185201, 1, 167904, '321000000000', '扬州市', '江苏,扬州', '119.412966', '32.394210', 1); +INSERT INTO `yx_system_city` VALUES (119, 186657, 1, 167904, '321100000000', '镇江市', '江苏,镇江', '119.425836', '32.187849', 1); +INSERT INTO `yx_system_city` VALUES (120, 187441, 1, 167904, '321200000000', '泰州市', '江苏,泰州', '119.923116', '32.455778', 1); +INSERT INTO `yx_system_city` VALUES (121, 189402, 1, 167904, '321300000000', '宿迁市', '江苏,宿迁', '118.275198', '33.963232', 1); +INSERT INTO `yx_system_city` VALUES (122, 191020, 1, 191019, '330100000000', '杭州市', '浙江,杭州', '120.155070', '30.274084', 1); +INSERT INTO `yx_system_city` VALUES (123, 194395, 1, 191019, '330200000000', '宁波市', '浙江,宁波', '121.550357', '29.874556', 1); +INSERT INTO `yx_system_city` VALUES (124, 197850, 1, 191019, '330300000000', '温州市', '浙江,温州', '120.699366', '27.994267', 1); +INSERT INTO `yx_system_city` VALUES (125, 203852, 1, 191019, '330400000000', '嘉兴市', '浙江,嘉兴', '120.755486', '30.746129', 1); +INSERT INTO `yx_system_city` VALUES (126, 205101, 1, 191019, '330500000000', '湖州市', '浙江,湖州', '120.086823', '30.894348', 1); +INSERT INTO `yx_system_city` VALUES (127, 206438, 1, 191019, '330600000000', '绍兴市', '浙江,绍兴', '120.580232', '30.029752', 1); +INSERT INTO `yx_system_city` VALUES (128, 209250, 1, 191019, '330700000000', '金华市', '浙江,金华', '119.647444', '29.079059', 1); +INSERT INTO `yx_system_city` VALUES (129, 214260, 1, 191019, '330800000000', '衢州市', '浙江,衢州', '118.859457', '28.970079', 1); +INSERT INTO `yx_system_city` VALUES (130, 215955, 1, 191019, '330900000000', '舟山市', '浙江,舟山', '122.207215', '29.985295', 1); +INSERT INTO `yx_system_city` VALUES (131, 216449, 1, 191019, '331000000000', '台州市', '浙江,台州', '121.420757', '28.656386', 1); +INSERT INTO `yx_system_city` VALUES (132, 221610, 1, 191019, '331100000000', '丽水市', '浙江,丽水', '119.922796', '28.467630', 1); +INSERT INTO `yx_system_city` VALUES (133, 224650, 1, 224649, '340100000000', '合肥市', '安徽,合肥', '117.227239', '31.820586', 1); +INSERT INTO `yx_system_city` VALUES (134, 226469, 1, 224649, '340200000000', '芜湖市', '安徽,芜湖', '118.432941', '31.352859', 1); +INSERT INTO `yx_system_city` VALUES (135, 227482, 1, 224649, '340300000000', '蚌埠市', '安徽,蚌埠', '117.389719', '32.916287', 1); +INSERT INTO `yx_system_city` VALUES (136, 228630, 1, 224649, '340400000000', '淮南市', '安徽,淮南', '116.999932', '32.625478', 1); +INSERT INTO `yx_system_city` VALUES (137, 229844, 1, 224649, '340500000000', '马鞍山市', '安徽,马鞍山', '118.506759', '31.670452', 1); +INSERT INTO `yx_system_city` VALUES (138, 230476, 1, 224649, '340600000000', '淮北市', '安徽,淮北', '116.798265', '33.955844', 1); +INSERT INTO `yx_system_city` VALUES (139, 230981, 1, 224649, '340700000000', '铜陵市', '安徽,铜陵', '117.812079', '30.945429', 1); +INSERT INTO `yx_system_city` VALUES (140, 231499, 1, 224649, '340800000000', '安庆市', '安徽,安庆', '117.063754', '30.543494', 1); +INSERT INTO `yx_system_city` VALUES (141, 233236, 1, 224649, '341000000000', '黄山市', '安徽,黄山', '118.337481', '29.714655', 1); +INSERT INTO `yx_system_city` VALUES (142, 234109, 1, 224649, '341100000000', '滁州市', '安徽,滁州', '118.317106', '32.301556', 1); +INSERT INTO `yx_system_city` VALUES (143, 235483, 1, 224649, '341200000000', '阜阳市', '安徽,阜阳', '115.814204', '32.890124', 1); +INSERT INTO `yx_system_city` VALUES (144, 237607, 1, 224649, '341300000000', '宿州市', '安徽,宿州', '116.964356', '33.646373', 1); +INSERT INTO `yx_system_city` VALUES (145, 239084, 1, 224649, '341500000000', '六安市', '安徽,六安', '116.521854', '31.733699', 1); +INSERT INTO `yx_system_city` VALUES (146, 241180, 1, 224649, '341600000000', '亳州市', '安徽,亳州', '115.778676', '33.844582', 1); +INSERT INTO `yx_system_city` VALUES (147, 242634, 1, 224649, '341700000000', '池州市', '安徽,池州', '117.491568', '30.664800', 1); +INSERT INTO `yx_system_city` VALUES (148, 243399, 1, 224649, '341800000000', '宣城市', '安徽,宣城', '118.758816', '30.940718', 1); +INSERT INTO `yx_system_city` VALUES (149, 244378, 1, 244377, '350100000000', '福州市', '福建,福州', '119.296494', '26.074507', 1); +INSERT INTO `yx_system_city` VALUES (150, 247478, 1, 244377, '350200000000', '厦门市', '福建,厦门', '118.089425', '24.479833', 1); +INSERT INTO `yx_system_city` VALUES (151, 248059, 1, 244377, '350300000000', '莆田市', '福建,莆田', '119.007777', '25.454084', 1); +INSERT INTO `yx_system_city` VALUES (152, 249098, 1, 244377, '350400000000', '三明市', '福建,三明', '117.638678', '26.263406', 1); +INSERT INTO `yx_system_city` VALUES (153, 251197, 1, 244377, '350500000000', '泉州市', '福建,泉州', '118.675675', '24.874132', 1); +INSERT INTO `yx_system_city` VALUES (154, 253905, 1, 244377, '350600000000', '漳州市', '福建,漳州', '117.647481', '24.512948', 1); +INSERT INTO `yx_system_city` VALUES (155, 256112, 1, 244377, '350700000000', '南平市', '福建,南平', '118.177708', '26.641768', 1); +INSERT INTO `yx_system_city` VALUES (156, 258160, 1, 244377, '350800000000', '龙岩市', '福建,龙岩', '117.017536', '25.075123', 1); +INSERT INTO `yx_system_city` VALUES (157, 260230, 1, 244377, '350900000000', '宁德市', '福建,宁德', '119.547932', '26.665617', 1); +INSERT INTO `yx_system_city` VALUES (158, 262699, 1, 262698, '360100000000', '南昌市', '江西,南昌', '115.858197', '28.682892', 1); +INSERT INTO `yx_system_city` VALUES (159, 264862, 1, 262698, '360200000000', '景德镇市', '江西,景德镇', '117.178419', '29.268835', 1); +INSERT INTO `yx_system_city` VALUES (160, 265677, 1, 262698, '360300000000', '萍乡市', '江西,萍乡', '113.854556', '27.622768', 1); +INSERT INTO `yx_system_city` VALUES (161, 266521, 1, 262698, '360400000000', '九江市', '江西,九江', '116.001930', '29.705077', 1); +INSERT INTO `yx_system_city` VALUES (162, 269107, 1, 262698, '360500000000', '新余市', '江西,新余', '114.917346', '27.817808', 1); +INSERT INTO `yx_system_city` VALUES (163, 269654, 1, 262698, '360600000000', '鹰潭市', '江西,鹰潭', '117.069202', '28.260189', 1); +INSERT INTO `yx_system_city` VALUES (164, 270222, 1, 262698, '360700000000', '赣州市', '江西,赣州', '114.935029', '25.831829', 1); +INSERT INTO `yx_system_city` VALUES (165, 274444, 1, 262698, '360800000000', '吉安市', '江西,吉安', '114.992509', '27.113443', 1); +INSERT INTO `yx_system_city` VALUES (166, 277615, 1, 262698, '360900000000', '宜春市', '江西,宜春', '114.416778', '27.815619', 1); +INSERT INTO `yx_system_city` VALUES (167, 280562, 1, 262698, '361000000000', '抚州市', '江西,抚州', '116.358181', '27.949217', 1); +INSERT INTO `yx_system_city` VALUES (168, 282841, 1, 262698, '361100000000', '上饶市', '江西,上饶', '117.943433', '28.454862', 1); +INSERT INTO `yx_system_city` VALUES (169, 285861, 1, 285860, '370100000000', '济南市', '山东,济南', '117.119999', '36.651216', 1); +INSERT INTO `yx_system_city` VALUES (170, 291235, 1, 285860, '370200000000', '青岛市', '山东,青岛', '120.382639', '36.067082', 1); +INSERT INTO `yx_system_city` VALUES (171, 298025, 1, 285860, '370300000000', '淄博市', '山东,淄博', '118.054927', '36.813487', 1); +INSERT INTO `yx_system_city` VALUES (172, 301711, 1, 285860, '370400000000', '枣庄市', '山东,枣庄', '117.323725', '34.810487', 1); +INSERT INTO `yx_system_city` VALUES (173, 304309, 1, 285860, '370500000000', '东营市', '山东,东营', '118.674767', '37.434751', 1); +INSERT INTO `yx_system_city` VALUES (174, 306339, 1, 285860, '370600000000', '烟台市', '山东,烟台', '121.447935', '37.463822', 1); +INSERT INTO `yx_system_city` VALUES (175, 313063, 1, 285860, '370700000000', '潍坊市', '山东,潍坊', '119.161755', '36.706774', 1); +INSERT INTO `yx_system_city` VALUES (176, 320179, 1, 285860, '370800000000', '济宁市', '山东,济宁', '116.587098', '35.414921', 1); +INSERT INTO `yx_system_city` VALUES (177, 326706, 1, 285860, '370900000000', '泰安市', '山东,泰安', '117.087614', '36.200252', 1); +INSERT INTO `yx_system_city` VALUES (178, 330547, 1, 285860, '371000000000', '威海市', '山东,威海', '122.120419', '37.513068', 1); +INSERT INTO `yx_system_city` VALUES (179, 333140, 1, 285860, '371100000000', '日照市', '山东,日照', '119.526888', '35.416377', 1); +INSERT INTO `yx_system_city` VALUES (180, 336050, 1, 285860, '371200000000', '莱芜市', '山东,莱芜', '117.676723', '36.213813', 1); +INSERT INTO `yx_system_city` VALUES (181, 337144, 1, 285860, '371300000000', '临沂市', '山东,临沂', '118.356448', '35.104672', 1); +INSERT INTO `yx_system_city` VALUES (182, 344133, 1, 285860, '371400000000', '德州市', '山东,德州', '116.357464', '37.434092', 1); +INSERT INTO `yx_system_city` VALUES (183, 349382, 1, 285860, '371500000000', '聊城市', '山东,聊城', '115.985371', '36.456703', 1); +INSERT INTO `yx_system_city` VALUES (184, 355972, 1, 285860, '371600000000', '滨州市', '山东,滨州', '117.970703', '37.381990', 1); +INSERT INTO `yx_system_city` VALUES (185, 361375, 1, 285860, '371700000000', '菏泽市', '山东,菏泽', '115.480656', '35.233750', 1); +INSERT INTO `yx_system_city` VALUES (186, 367396, 1, 367395, '410100000000', '郑州市', '河南,郑州', '113.625368', '34.746599', 1); +INSERT INTO `yx_system_city` VALUES (187, 370304, 1, 367395, '410200000000', '开封市', '河南,开封', '114.307581', '34.797239', 1); +INSERT INTO `yx_system_city` VALUES (188, 372971, 1, 367395, '410300000000', '洛阳市', '河南,洛阳', '112.454040', '34.619682', 1); +INSERT INTO `yx_system_city` VALUES (189, 376365, 1, 367395, '410400000000', '平顶山市', '河南,平顶山', '113.192661', '33.766169', 1); +INSERT INTO `yx_system_city` VALUES (190, 379245, 1, 367395, '410500000000', '安阳市', '河南,安阳', '114.392392', '36.097577', 1); +INSERT INTO `yx_system_city` VALUES (191, 382878, 1, 367395, '410600000000', '鹤壁市', '河南,鹤壁', '114.297272', '35.747225', 1); +INSERT INTO `yx_system_city` VALUES (192, 383890, 1, 367395, '410700000000', '新乡市', '河南,新乡', '113.926800', '35.303004', 1); +INSERT INTO `yx_system_city` VALUES (193, 387707, 1, 367395, '410800000000', '焦作市', '河南,焦作', '113.241823', '35.215892', 1); +INSERT INTO `yx_system_city` VALUES (194, 389719, 1, 367395, '410900000000', '濮阳市', '河南,濮阳', '115.029215', '35.761829', 1); +INSERT INTO `yx_system_city` VALUES (195, 392737, 1, 367395, '411000000000', '许昌市', '河南,许昌', '113.852640', '34.035506', 1); +INSERT INTO `yx_system_city` VALUES (196, 395254, 1, 367395, '411100000000', '漯河市', '河南,漯河', '114.016539', '33.581412', 1); +INSERT INTO `yx_system_city` VALUES (197, 396611, 1, 367395, '411200000000', '三门峡市', '河南,三门峡', '111.200135', '34.772493', 1); +INSERT INTO `yx_system_city` VALUES (198, 398169, 1, 367395, '411300000000', '南阳市', '河南,南阳', '112.528321', '32.990833', 1); +INSERT INTO `yx_system_city` VALUES (199, 403311, 1, 367395, '411400000000', '商丘市', '河南,商丘', '115.656370', '34.414172', 1); +INSERT INTO `yx_system_city` VALUES (200, 408287, 1, 367395, '411500000000', '信阳市', '河南,信阳', '114.091023', '32.146983', 1); +INSERT INTO `yx_system_city` VALUES (201, 411925, 1, 367395, '411600000000', '周口市', '河南,周口', '114.696951', '33.626149', 1); +INSERT INTO `yx_system_city` VALUES (202, 417174, 1, 367395, '411700000000', '驻马店市', '河南,驻马店', '114.022298', '33.011529', 1); +INSERT INTO `yx_system_city` VALUES (203, 420258, 1, 367395, '419000000000', '直辖县', '河南', '113.753602', '34.765515', 1); +INSERT INTO `yx_system_city` VALUES (204, 420825, 1, 420824, '420100000000', '武汉市', '湖北,武汉', '114.305392', '30.593098', 1); +INSERT INTO `yx_system_city` VALUES (205, 424449, 1, 420824, '420200000000', '黄石市', '湖北,黄石', '115.038520', '30.199652', 1); +INSERT INTO `yx_system_city` VALUES (206, 425508, 1, 420824, '420300000000', '十堰市', '湖北,十堰', '110.797990', '32.629397', 1); +INSERT INTO `yx_system_city` VALUES (207, 427710, 1, 420824, '420500000000', '宜昌市', '湖北,宜昌', '111.286471', '30.691967', 1); +INSERT INTO `yx_system_city` VALUES (208, 429501, 1, 420824, '420600000000', '襄阳市', '湖北,襄阳', '112.122414', '32.008986', 1); +INSERT INTO `yx_system_city` VALUES (209, 432415, 1, 420824, '420700000000', '鄂州市', '湖北,鄂州', '114.894843', '30.391940', 1); +INSERT INTO `yx_system_city` VALUES (210, 432829, 1, 420824, '420800000000', '荆门市', '湖北,荆门', '112.199265', '31.035423', 1); +INSERT INTO `yx_system_city` VALUES (211, 434548, 1, 420824, '420900000000', '孝感市', '湖北,孝感', '113.916902', '30.924568', 1); +INSERT INTO `yx_system_city` VALUES (212, 437779, 1, 420824, '421000000000', '荆州市', '湖北,荆州', '112.239741', '30.335165', 1); +INSERT INTO `yx_system_city` VALUES (213, 440639, 1, 420824, '421100000000', '黄冈市', '湖北,黄冈', '114.872316', '30.453905', 1); +INSERT INTO `yx_system_city` VALUES (214, 445040, 1, 420824, '421200000000', '咸宁市', '湖北,咸宁', '114.322492', '29.841443', 1); +INSERT INTO `yx_system_city` VALUES (215, 446212, 1, 420824, '421300000000', '随州市', '湖北,随州', '113.382458', '31.690215', 1); +INSERT INTO `yx_system_city` VALUES (216, 447268, 1, 420824, '422800000000', '恩施土家族苗族自治州', '湖北,恩施', '109.488172', '30.272156', 1); +INSERT INTO `yx_system_city` VALUES (217, 449865, 1, 420824, '429000000000', '直辖县', '湖北', '114.341861', '30.546498', 1); +INSERT INTO `yx_system_city` VALUES (218, 452124, 1, 452123, '430100000000', '长沙市', '湖南,长沙', '112.938814', '28.228209', 1); +INSERT INTO `yx_system_city` VALUES (219, 453799, 1, 452123, '430200000000', '株洲市', '湖南,株洲', '113.134002', '27.827550', 1); +INSERT INTO `yx_system_city` VALUES (220, 455283, 1, 452123, '430300000000', '湘潭市', '湖南,湘潭', '112.944049', '27.829738', 1); +INSERT INTO `yx_system_city` VALUES (221, 456303, 1, 452123, '430400000000', '衡阳市', '湖南,衡阳', '112.571997', '26.893230', 1); +INSERT INTO `yx_system_city` VALUES (222, 459251, 1, 452123, '430500000000', '邵阳市', '湖南,邵阳', '111.467791', '27.238892', 1); +INSERT INTO `yx_system_city` VALUES (223, 463141, 1, 452123, '430600000000', '岳阳市', '湖南,岳阳', '113.128958', '29.357104', 1); +INSERT INTO `yx_system_city` VALUES (224, 465105, 1, 452123, '430700000000', '常德市', '湖南,常德', '111.698497', '29.031673', 1); +INSERT INTO `yx_system_city` VALUES (225, 467562, 1, 452123, '430800000000', '张家界市', '湖南,张家界', '110.479191', '29.117096', 1); +INSERT INTO `yx_system_city` VALUES (226, 468660, 1, 452123, '430900000000', '益阳市', '湖南,益阳', '112.355180', '28.553860', 1); +INSERT INTO `yx_system_city` VALUES (227, 470123, 1, 452123, '431000000000', '郴州市', '湖南,郴州', '113.014717', '25.770509', 1); +INSERT INTO `yx_system_city` VALUES (228, 472709, 1, 452123, '431100000000', '永州市', '湖南,永州', '111.613445', '26.420394', 1); +INSERT INTO `yx_system_city` VALUES (229, 476148, 1, 452123, '431200000000', '怀化市', '湖南,怀化', '109.998488', '27.554978', 1); +INSERT INTO `yx_system_city` VALUES (230, 479103, 1, 452123, '431300000000', '娄底市', '湖南,娄底', '111.993497', '27.700062', 1); +INSERT INTO `yx_system_city` VALUES (231, 481319, 1, 452123, '433100000000', '湘西土家族苗族自治州', '湖南,湘西', '109.739172', '28.311947', 1); +INSERT INTO `yx_system_city` VALUES (232, 483251, 1, 483250, '440100000000', '广州市', '广东,广州', '113.264434', '23.129162', 1); +INSERT INTO `yx_system_city` VALUES (233, 486129, 1, 483250, '440200000000', '韶关市', '广东,韶关', '113.597522', '24.810403', 1); +INSERT INTO `yx_system_city` VALUES (234, 487721, 1, 483250, '440300000000', '深圳市', '广东,深圳', '114.057868', '22.543099', 1); +INSERT INTO `yx_system_city` VALUES (235, 488589, 1, 483250, '440400000000', '珠海市', '广东,珠海', '113.576726', '22.270715', 1); +INSERT INTO `yx_system_city` VALUES (236, 488954, 1, 483250, '440500000000', '汕头市', '广东,汕头', '116.681972', '23.354091', 1); +INSERT INTO `yx_system_city` VALUES (237, 490106, 1, 483250, '440600000000', '佛山市', '广东,佛山', '113.121416', '23.021548', 1); +INSERT INTO `yx_system_city` VALUES (238, 490919, 1, 483250, '440700000000', '江门市', '广东,江门', '113.081901', '22.578738', 1); +INSERT INTO `yx_system_city` VALUES (239, 492341, 1, 483250, '440800000000', '湛江市', '广东,湛江', '110.359377', '21.270707', 1); +INSERT INTO `yx_system_city` VALUES (240, 494394, 1, 483250, '440900000000', '茂名市', '广东,茂名', '110.925456', '21.662999', 1); +INSERT INTO `yx_system_city` VALUES (241, 496438, 1, 483250, '441200000000', '肇庆市', '广东,肇庆', '112.465091', '23.047191', 1); +INSERT INTO `yx_system_city` VALUES (242, 498104, 1, 483250, '441300000000', '惠州市', '广东,惠州', '114.416196', '23.111847', 1); +INSERT INTO `yx_system_city` VALUES (243, 499489, 1, 483250, '441400000000', '梅州市', '广东,梅州', '116.122238', '24.288615', 1); +INSERT INTO `yx_system_city` VALUES (244, 501867, 1, 483250, '441500000000', '汕尾市', '广东,汕尾', '115.375278', '22.786211', 1); +INSERT INTO `yx_system_city` VALUES (245, 502828, 1, 483250, '441600000000', '河源市', '广东,河源', '114.700447', '23.743538', 1); +INSERT INTO `yx_system_city` VALUES (246, 504366, 1, 483250, '441700000000', '阳江市', '广东,阳江', '111.982232', '21.857958', 1); +INSERT INTO `yx_system_city` VALUES (247, 505298, 1, 483250, '441800000000', '清远市', '广东,清远', '113.056031', '23.681763', 1); +INSERT INTO `yx_system_city` VALUES (248, 506616, 1, 483250, '441900000000', '东莞市', '广东,东莞', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (249, 507255, 1, 483250, '442000000000', '中山市', '广东,中山', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (250, 507557, 1, 483250, '445100000000', '潮州市', '广东,潮州', '116.622603', '23.656950', 1); +INSERT INTO `yx_system_city` VALUES (251, 508648, 1, 483250, '445200000000', '揭阳市', '广东,揭阳', '116.372831', '23.549993', 1); +INSERT INTO `yx_system_city` VALUES (252, 510408, 1, 483250, '445300000000', '云浮市', '广东,云浮', '112.044491', '22.915094', 1); +INSERT INTO `yx_system_city` VALUES (253, 511463, 1, 511462, '450100000000', '南宁市', '广西,南宁', '108.366543', '22.817002', 1); +INSERT INTO `yx_system_city` VALUES (254, 513434, 1, 511462, '450200000000', '柳州市', '广西,柳州', '109.415953', '24.325502', 1); +INSERT INTO `yx_system_city` VALUES (255, 514790, 1, 511462, '450300000000', '桂林市', '广西,桂林', '110.290194', '25.273566', 1); +INSERT INTO `yx_system_city` VALUES (256, 516858, 1, 511462, '450400000000', '梧州市', '广西,梧州', '111.279115', '23.476962', 1); +INSERT INTO `yx_system_city` VALUES (257, 517933, 1, 511462, '450500000000', '北海市', '广西,北海', '109.119927', '21.481254', 1); +INSERT INTO `yx_system_city` VALUES (258, 518407, 1, 511462, '450600000000', '防城港市', '广西,防城港', '108.353846', '21.686860', 1); +INSERT INTO `yx_system_city` VALUES (259, 518808, 1, 511462, '450700000000', '钦州市', '广西,钦州', '108.654146', '21.979933', 1); +INSERT INTO `yx_system_city` VALUES (260, 519929, 1, 511462, '450800000000', '贵港市', '广西,贵港', '109.598926', '23.111530', 1); +INSERT INTO `yx_system_city` VALUES (261, 521166, 1, 511462, '450900000000', '玉林市', '广西,玉林', '110.164756', '22.636379', 1); +INSERT INTO `yx_system_city` VALUES (262, 522786, 1, 511462, '451000000000', '百色市', '广西,百色', '106.618201', '23.902333', 1); +INSERT INTO `yx_system_city` VALUES (263, 524814, 1, 511462, '451100000000', '贺州市', '广西,贺州', '111.566694', '24.403582', 1); +INSERT INTO `yx_system_city` VALUES (264, 525638, 1, 511462, '451200000000', '河池市', '广西,河池', '108.085261', '24.692931', 1); +INSERT INTO `yx_system_city` VALUES (265, 527443, 1, 511462, '451300000000', '来宾市', '广西,来宾', '109.221465', '23.750306', 1); +INSERT INTO `yx_system_city` VALUES (266, 528339, 1, 511462, '451400000000', '崇左市', '广西,崇左', '107.364711', '22.376532', 1); +INSERT INTO `yx_system_city` VALUES (267, 529345, 1, 529344, '460100000000', '海口市', '海南,海口', '110.198293', '20.044001', 1); +INSERT INTO `yx_system_city` VALUES (268, 529878, 1, 529344, '460200000000', '三亚市', '海南,三亚', '109.511909', '18.252847', 1); +INSERT INTO `yx_system_city` VALUES (269, 530060, 1, 529344, '460300000000', '三沙市', '海南,三沙', '112.338695', '16.831839', 1); +INSERT INTO `yx_system_city` VALUES (270, 530070, 1, 529344, '460400000000', '儋州市', '海南,儋州', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (271, 530468, 1, 529344, '469000000000', '省直辖县级行政区域', '海南', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (272, 533329, 1, 533328, '500100000000', '重庆市', '重庆', '106.551556', '29.563009', 1); +INSERT INTO `yx_system_city` VALUES (273, 540700, 1, 533328, '500200000000', '县', '重庆', '106.551556', '29.563009', 1); +INSERT INTO `yx_system_city` VALUES (274, 545533, 1, 545532, '510100000000', '成都市', '四川,成都', '104.066541', '30.572269', 1); +INSERT INTO `yx_system_city` VALUES (275, 550275, 1, 545532, '510300000000', '自贡市', '四川,自贡', '104.778442', '29.339030', 1); +INSERT INTO `yx_system_city` VALUES (276, 551809, 1, 545532, '510400000000', '攀枝花市', '四川,攀枝花', '101.718637', '26.582347', 1); +INSERT INTO `yx_system_city` VALUES (277, 552358, 1, 545532, '510500000000', '泸州市', '四川,泸州', '105.442258', '28.871810', 1); +INSERT INTO `yx_system_city` VALUES (278, 554142, 1, 545532, '510600000000', '德阳市', '四川,德阳', '104.397894', '31.126855', 1); +INSERT INTO `yx_system_city` VALUES (279, 556077, 1, 545532, '510700000000', '绵阳市', '四川,绵阳', '104.679114', '31.467450', 1); +INSERT INTO `yx_system_city` VALUES (280, 560191, 1, 545532, '510800000000', '广元市', '四川,广元', '105.843357', '32.435435', 1); +INSERT INTO `yx_system_city` VALUES (281, 563242, 1, 545532, '510900000000', '遂宁市', '四川,遂宁', '105.592898', '30.532847', 1); +INSERT INTO `yx_system_city` VALUES (282, 565735, 1, 545532, '511000000000', '内江市', '四川,内江', '105.058433', '29.580228', 1); +INSERT INTO `yx_system_city` VALUES (283, 568202, 1, 545532, '511100000000', '乐山市', '四川,乐山', '103.765568', '29.552106', 1); +INSERT INTO `yx_system_city` VALUES (284, 570733, 1, 545532, '511300000000', '南充市', '四川,南充', '106.110698', '30.837793', 1); +INSERT INTO `yx_system_city` VALUES (285, 576992, 1, 545532, '511400000000', '眉山市', '四川,眉山', '103.848538', '30.075439', 1); +INSERT INTO `yx_system_city` VALUES (286, 578485, 1, 545532, '511500000000', '宜宾市', '四川,宜宾', '104.643215', '28.751768', 1); +INSERT INTO `yx_system_city` VALUES (287, 581870, 1, 545532, '511600000000', '广安市', '四川,广安', '106.633212', '30.455961', 1); +INSERT INTO `yx_system_city` VALUES (288, 585049, 1, 545532, '511700000000', '达州市', '四川,达州', '107.468023', '31.209571', 1); +INSERT INTO `yx_system_city` VALUES (289, 588538, 1, 545532, '511800000000', '雅安市', '四川,雅安', '103.013261', '29.980537', 1); +INSERT INTO `yx_system_city` VALUES (290, 589779, 1, 545532, '511900000000', '巴中市', '四川,巴中', '106.747477', '31.867903', 1); +INSERT INTO `yx_system_city` VALUES (291, 592598, 1, 545532, '512000000000', '资阳市', '四川,资阳', '104.627636', '30.128901', 1); +INSERT INTO `yx_system_city` VALUES (292, 594864, 1, 545532, '513200000000', '阿坝藏族羌族自治州', '四川,阿坝', '102.224653', '31.899413', 1); +INSERT INTO `yx_system_city` VALUES (293, 596525, 1, 545532, '513300000000', '甘孜藏族自治州', '四川,甘孜', '101.962310', '30.049520', 1); +INSERT INTO `yx_system_city` VALUES (294, 599659, 1, 545532, '513400000000', '凉山彝族自治州', '四川,凉山', '102.267335', '27.881610', 1); +INSERT INTO `yx_system_city` VALUES (295, 604132, 1, 604131, '520100000000', '贵阳市', '贵州,贵阳', '106.630153', '26.647661', 1); +INSERT INTO `yx_system_city` VALUES (296, 605834, 1, 604131, '520200000000', '六盘水市', '贵州,六盘水', '104.830359', '26.592666', 1); +INSERT INTO `yx_system_city` VALUES (297, 607029, 1, 604131, '520300000000', '遵义市', '贵州,遵义', '106.927389', '27.725654', 1); +INSERT INTO `yx_system_city` VALUES (298, 609309, 1, 604131, '520400000000', '安顺市', '贵州,安顺', '105.947593', '26.253072', 1); +INSERT INTO `yx_system_city` VALUES (299, 610607, 1, 604131, '520500000000', '毕节市', '贵州,毕节', '105.283992', '27.302589', 1); +INSERT INTO `yx_system_city` VALUES (300, 614530, 1, 604131, '520600000000', '铜仁市', '贵州,铜仁', '109.189598', '27.731514', 1); +INSERT INTO `yx_system_city` VALUES (301, 617670, 1, 604131, '522300000000', '黔西南布依族苗族自治州', '贵州,黔西南', '104.906396', '25.087825', 1); +INSERT INTO `yx_system_city` VALUES (302, 619017, 1, 604131, '522600000000', '黔东南苗族侗族自治州', '贵州,黔东南', '107.982859', '26.583442', 1); +INSERT INTO `yx_system_city` VALUES (303, 622734, 1, 604131, '522700000000', '黔南布依族苗族自治州', '贵州,黔南', '107.522097', '26.254092', 1); +INSERT INTO `yx_system_city` VALUES (304, 624373, 1, 624372, '530100000000', '昆明市', '云南,昆明', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (305, 626181, 1, 624372, '530300000000', '曲靖市', '云南,曲靖', '103.796167', '25.489999', 1); +INSERT INTO `yx_system_city` VALUES (306, 627981, 1, 624372, '530400000000', '玉溪市', '云南,玉溪', '102.546543', '24.352036', 1); +INSERT INTO `yx_system_city` VALUES (307, 628776, 1, 624372, '530500000000', '保山市', '云南,保山', '99.161761', '25.112046', 1); +INSERT INTO `yx_system_city` VALUES (308, 629781, 1, 624372, '530600000000', '昭通市', '云南,昭通', '103.717465', '27.338257', 1); +INSERT INTO `yx_system_city` VALUES (309, 631276, 1, 624372, '530700000000', '丽江市', '云南,丽江', '100.227750', '26.855047', 1); +INSERT INTO `yx_system_city` VALUES (310, 631811, 1, 624372, '530800000000', '普洱市', '云南,普洱', '100.966512', '22.825065', 1); +INSERT INTO `yx_system_city` VALUES (311, 632971, 1, 624372, '530900000000', '临沧市', '云南,临沧', '100.079583', '23.877573', 1); +INSERT INTO `yx_system_city` VALUES (312, 634006, 1, 624372, '532300000000', '楚雄彝族自治州', '云南,楚雄', '101.528069', '25.045532', 1); +INSERT INTO `yx_system_city` VALUES (313, 635219, 1, 624372, '532500000000', '红河哈尼族彝族自治州', '云南,红河', '103.374799', '23.363130', 1); +INSERT INTO `yx_system_city` VALUES (314, 636688, 1, 624372, '532600000000', '文山壮族苗族自治州', '云南,文山', '104.216248', '23.400734', 1); +INSERT INTO `yx_system_city` VALUES (315, 637778, 1, 624372, '532800000000', '西双版纳傣族自治州', '云南,西双版纳', '100.797777', '22.007351', 1); +INSERT INTO `yx_system_city` VALUES (316, 638092, 1, 624372, '532900000000', '大理白族自治州', '云南,大理', '100.267639', '25.606485', 1); +INSERT INTO `yx_system_city` VALUES (317, 639368, 1, 624372, '533100000000', '德宏傣族景颇族自治州', '云南,德宏', '98.584895', '24.433353', 1); +INSERT INTO `yx_system_city` VALUES (318, 639802, 1, 624372, '533300000000', '怒江傈僳族自治州', '云南,怒江', '98.853097', '25.852547', 1); +INSERT INTO `yx_system_city` VALUES (319, 640107, 1, 624372, '533400000000', '迪庆藏族自治州', '云南,迪庆', '99.702234', '27.818882', 1); +INSERT INTO `yx_system_city` VALUES (320, 640333, 1, 640332, '540100000000', '拉萨市', '西藏,拉萨', '91.140856', '29.645554', 1); +INSERT INTO `yx_system_city` VALUES (321, 640675, 1, 640332, '540200000000', '日喀则市', '西藏,日喀则', '88.880583', '29.266869', 1); +INSERT INTO `yx_system_city` VALUES (322, 642571, 1, 640332, '540300000000', '昌都市', '西藏,昌都', '97.172020', '31.140969', 1); +INSERT INTO `yx_system_city` VALUES (323, 643863, 1, 640332, '540400000000', '林芝市', '西藏,林芝', '94.361490', '29.649128', 1); +INSERT INTO `yx_system_city` VALUES (324, 644423, 1, 640332, '540500000000', '山南市', '西藏,山南', '91.117212', '29.646922', 1); +INSERT INTO `yx_system_city` VALUES (325, 645076, 1, 640332, '542400000000', '那曲地区', '西藏,那曲', '92.051239', '31.476202', 1); +INSERT INTO `yx_system_city` VALUES (326, 646392, 1, 640332, '542500000000', '阿里地区', '西藏,阿里', '80.105804', '32.501111', 1); +INSERT INTO `yx_system_city` VALUES (327, 646579, 1, 646578, '610100000000', '西安市', '陕西,西安', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (328, 649979, 1, 646578, '610200000000', '铜川市', '陕西,铜川', '108.945233', '34.896756', 1); +INSERT INTO `yx_system_city` VALUES (329, 650575, 1, 646578, '610300000000', '宝鸡市', '陕西,宝鸡', '107.237974', '34.361979', 1); +INSERT INTO `yx_system_city` VALUES (330, 652581, 1, 646578, '610400000000', '咸阳市', '陕西,咸阳', '108.708991', '34.329605', 1); +INSERT INTO `yx_system_city` VALUES (331, 655295, 1, 646578, '610500000000', '渭南市', '陕西,渭南', '109.509786', '34.499995', 1); +INSERT INTO `yx_system_city` VALUES (332, 657848, 1, 646578, '610600000000', '延安市', '陕西,延安', '109.489727', '36.585455', 1); +INSERT INTO `yx_system_city` VALUES (333, 660643, 1, 646578, '610700000000', '汉中市', '陕西,汉中', '107.023323', '33.067480', 1); +INSERT INTO `yx_system_city` VALUES (334, 663046, 1, 646578, '610800000000', '榆林市', '陕西,榆林', '109.734589', '38.285390', 1); +INSERT INTO `yx_system_city` VALUES (335, 667681, 1, 646578, '610900000000', '安康市', '陕西,安康', '109.029022', '32.684714', 1); +INSERT INTO `yx_system_city` VALUES (336, 669707, 1, 646578, '611000000000', '商洛市', '陕西,商洛', '109.940477', '33.870422', 1); +INSERT INTO `yx_system_city` VALUES (337, 671120, 1, 671119, '620100000000', '兰州市', '甘肃,兰州', '103.834303', '36.061089', 1); +INSERT INTO `yx_system_city` VALUES (338, 672330, 1, 671119, '620200000000', '嘉峪关市', '甘肃,嘉峪关', '98.289152', '39.773130', 1); +INSERT INTO `yx_system_city` VALUES (339, 672385, 1, 671119, '620300000000', '金昌市', '甘肃,金昌', '102.188043', '38.520089', 1); +INSERT INTO `yx_system_city` VALUES (340, 672577, 1, 671119, '620400000000', '白银市', '甘肃,白银', '104.138559', '36.544756', 1); +INSERT INTO `yx_system_city` VALUES (341, 673463, 1, 671119, '620500000000', '天水市', '甘肃,天水', '105.724947', '34.580863', 1); +INSERT INTO `yx_system_city` VALUES (342, 676215, 1, 671119, '620600000000', '武威市', '甘肃,武威', '102.638011', '37.928264', 1); +INSERT INTO `yx_system_city` VALUES (343, 677568, 1, 671119, '620700000000', '张掖市', '甘肃,张掖', '100.449818', '38.925875', 1); +INSERT INTO `yx_system_city` VALUES (344, 678560, 1, 671119, '620800000000', '平凉市', '甘肃,平凉', '106.665240', '35.543051', 1); +INSERT INTO `yx_system_city` VALUES (345, 680191, 1, 671119, '620900000000', '酒泉市', '甘肃,酒泉', '98.494483', '39.732410', 1); +INSERT INTO `yx_system_city` VALUES (346, 680815, 1, 671119, '621000000000', '庆阳市', '甘肃,庆阳', '107.643631', '35.709077', 1); +INSERT INTO `yx_system_city` VALUES (347, 682322, 1, 671119, '621100000000', '定西市', '甘肃,定西', '104.626282', '35.580662', 1); +INSERT INTO `yx_system_city` VALUES (348, 684415, 1, 671119, '621200000000', '陇南市', '甘肃,陇南', '104.921841', '33.400684', 1); +INSERT INTO `yx_system_city` VALUES (349, 687916, 1, 671119, '622900000000', '临夏回族自治州', '甘肃,临夏', '103.210538', '35.601182', 1); +INSERT INTO `yx_system_city` VALUES (350, 689265, 1, 671119, '623000000000', '甘南藏族自治州', '甘肃,甘南', '102.911027', '34.983385', 1); +INSERT INTO `yx_system_city` VALUES (351, 690095, 1, 690094, '630100000000', '西宁市', '青海,西宁', '101.778228', '36.617144', 1); +INSERT INTO `yx_system_city` VALUES (352, 691278, 1, 690094, '630200000000', '海东市', '青海,海东', '102.104287', '36.502039', 1); +INSERT INTO `yx_system_city` VALUES (353, 693040, 1, 690094, '632200000000', '海北藏族自治州', '青海,海北', '100.900997', '36.954413', 1); +INSERT INTO `yx_system_city` VALUES (354, 693342, 1, 690094, '632300000000', '黄南藏族自治州', '青海,黄南', '102.015248', '35.519548', 1); +INSERT INTO `yx_system_city` VALUES (355, 693672, 1, 690094, '632500000000', '海南藏族自治州', '青海,海南', '101.780199', '36.620901', 1); +INSERT INTO `yx_system_city` VALUES (356, 694220, 1, 690094, '632600000000', '果洛藏族自治州', '青海,果洛', '100.244808', '34.471431', 1); +INSERT INTO `yx_system_city` VALUES (357, 694478, 1, 690094, '632700000000', '玉树藏族自治州', '青海,玉树', '97.091934', '33.011674', 1); +INSERT INTO `yx_system_city` VALUES (358, 694846, 1, 690094, '632800000000', '海西蒙古族藏族自治州', '青海,海西', '97.369751', '37.377139', 1); +INSERT INTO `yx_system_city` VALUES (359, 695260, 1, 695259, '640100000000', '银川市', '宁夏,银川', '106.230909', '38.487193', 1); +INSERT INTO `yx_system_city` VALUES (360, 695883, 1, 695259, '640200000000', '石嘴山市', '宁夏,石嘴山', '106.383303', '38.983236', 1); +INSERT INTO `yx_system_city` VALUES (361, 696252, 1, 695259, '640300000000', '吴忠市', '宁夏,吴忠', '106.198393', '37.997460', 1); +INSERT INTO `yx_system_city` VALUES (362, 696928, 1, 695259, '640400000000', '固原市', '宁夏,固原', '106.242610', '36.015855', 1); +INSERT INTO `yx_system_city` VALUES (363, 697887, 1, 695259, '640500000000', '中卫市', '宁夏,中卫', '105.196902', '37.499972', 1); +INSERT INTO `yx_system_city` VALUES (364, 698441, 1, 698440, '650100000000', '乌鲁木齐市', '新疆,乌鲁木齐', '87.616848', '43.825592', 1); +INSERT INTO `yx_system_city` VALUES (365, 699583, 1, 698440, '650200000000', '克拉玛依市', '新疆,克拉玛依', '84.889207', '45.579888', 1); +INSERT INTO `yx_system_city` VALUES (366, 699773, 1, 698440, '650400000000', '吐鲁番市', '新疆,吐鲁番', '89.189655', '42.951384', 1); +INSERT INTO `yx_system_city` VALUES (367, 700070, 1, 698440, '650500000000', '哈密市', '新疆,哈密', '93.514916', '42.818501', 1); +INSERT INTO `yx_system_city` VALUES (368, 700489, 1, 698440, '652300000000', '昌吉回族自治州', '新疆,昌吉', '87.308224', '44.011182', 1); +INSERT INTO `yx_system_city` VALUES (369, 701559, 1, 698440, '652700000000', '博尔塔拉蒙古自治州', '新疆,博尔塔拉', '82.066159', '44.905588', 1); +INSERT INTO `yx_system_city` VALUES (370, 702104, 1, 698440, '652800000000', '巴音郭楞蒙古自治州', '新疆,巴音郭楞', '86.145298', '41.764115', 1); +INSERT INTO `yx_system_city` VALUES (371, 703119, 1, 698440, '652900000000', '阿克苏地区', '新疆,阿克苏', '80.260605', '41.168779', 1); +INSERT INTO `yx_system_city` VALUES (372, 704779, 1, 698440, '653000000000', '克孜勒苏柯尔克孜自治州', '新疆,克孜勒苏', '76.167819', '39.714526', 1); +INSERT INTO `yx_system_city` VALUES (373, 705145, 1, 698440, '653100000000', '喀什地区', '新疆,喀什', '75.989755', '39.470400', 1); +INSERT INTO `yx_system_city` VALUES (374, 708117, 1, 698440, '653200000000', '和田地区', '新疆,和田', '79.922211', '37.114157', 1); +INSERT INTO `yx_system_city` VALUES (375, 709792, 1, 698440, '654000000000', '伊犁哈萨克自治州', '新疆,伊犁', '81.324136', '43.916823', 1); +INSERT INTO `yx_system_city` VALUES (376, 711218, 1, 698440, '654200000000', '塔城地区', '新疆,塔城', '82.980316', '46.745364', 1); +INSERT INTO `yx_system_city` VALUES (377, 712893, 1, 698440, '654300000000', '阿勒泰地区', '新疆,阿勒泰', '88.141253', '47.844924', 1); +INSERT INTO `yx_system_city` VALUES (378, 713697, 1, 698440, '659000000000', '直辖县', '新疆', '87.627704', '43.793026', 1); +INSERT INTO `yx_system_city` VALUES (385, 714402, 1, 714401, '0', '彰化县', '台湾,彰化', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (386, 717531, 1, 714401, '0', '新北市', '台湾,新北', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (387, 719868, 1, 714401, '0', '澎湖县', '台湾,澎湖', '119.566417', '23.569733', 1); +INSERT INTO `yx_system_city` VALUES (388, 720118, 1, 714401, '0', '屏东县', '台湾,屏东', '120.487928', '22.682802', 1); +INSERT INTO `yx_system_city` VALUES (389, 722024, 1, 714401, '0', '臺中市', '台湾,臺中', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (390, 725488, 1, 714401, '0', '臺南市', '台湾,臺南', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (391, 727730, 1, 714401, '0', '臺北市', '台湾,臺北', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (392, 729928, 1, 714401, '0', '臺东县', '台湾,臺东', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (393, 730843, 1, 714401, '0', '桃园市', '台湾,桃园', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (394, 734179, 1, 714401, '0', '宜兰县', '台湾,宜兰', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (395, 736051, 1, 714401, '0', '南投县', '台湾,南投', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (396, 737856, 1, 714401, '0', '南海岛', '台湾,南海岛', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (397, 737861, 1, 714401, '0', '苗栗县', '台湾,苗栗', '120.818985', '24.561601', 1); +INSERT INTO `yx_system_city` VALUES (398, 739957, 1, 714401, '0', '嘉义市', '台湾,嘉义', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (399, 740510, 1, 714401, '0', '嘉义县', '台湾,嘉义', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (400, 742126, 1, 714401, '0', '新竹市', '台湾,新竹', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (401, 742636, 1, 714401, '0', '新竹县', '台湾,新竹', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (402, 743938, 1, 714401, '0', '花莲县', '台湾,花莲', '121.300000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (403, 745674, 1, 714401, '0', '高雄市', '台湾,高雄', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (404, 748553, 1, 714401, '0', '基隆市', '台湾,基隆', '121.746248', '25.130741', 1); +INSERT INTO `yx_system_city` VALUES (405, 749571, 1, 714401, '0', '金门县', '台湾,金门', '118.317089', '24.432706', 1); +INSERT INTO `yx_system_city` VALUES (406, 749930, 1, 714401, '0', '连江县', '台湾,连江', '119.539704', '26.197364', 1); +INSERT INTO `yx_system_city` VALUES (407, 749957, 1, 714401, '0', '云林县', '台湾,云林', '120.527173', '23.696887', 1); +INSERT INTO `yx_system_city` VALUES (408, 3, 2, 2, '110101000000', '东城区', '北京,东城', '116.416357', '39.928353', 1); +INSERT INTO `yx_system_city` VALUES (409, 203, 2, 2, '110102000000', '西城区', '北京,西城', '116.365868', '39.912289', 1); +INSERT INTO `yx_system_city` VALUES (410, 480, 2, 2, '110105000000', '朝阳区', '北京,朝阳', '116.443108', '39.921470', 1); +INSERT INTO `yx_system_city` VALUES (411, 1122, 2, 2, '110106000000', '丰台区', '北京,丰台', '116.287149', '39.858427', 1); +INSERT INTO `yx_system_city` VALUES (412, 1533, 2, 2, '110107000000', '石景山区', '北京,石景山', '116.222982', '39.906611', 1); +INSERT INTO `yx_system_city` VALUES (413, 1692, 2, 2, '110108000000', '海淀区', '北京,海淀', '116.298056', '39.959912', 1); +INSERT INTO `yx_system_city` VALUES (414, 2376, 2, 2, '110109000000', '门头沟区', '北京,门头沟', '116.102009', '39.940646', 1); +INSERT INTO `yx_system_city` VALUES (415, 2689, 2, 2, '110111000000', '房山区', '北京,房山', '116.143267', '39.749144', 1); +INSERT INTO `yx_system_city` VALUES (416, 3324, 2, 2, '110112000000', '通州区', '北京,通州', '116.656435', '39.909946', 1); +INSERT INTO `yx_system_city` VALUES (417, 3927, 2, 2, '110113000000', '顺义区', '北京,顺义', '116.654651', '40.130347', 1); +INSERT INTO `yx_system_city` VALUES (418, 4498, 2, 2, '110114000000', '昌平区', '北京,昌平', '116.231204', '40.220660', 1); +INSERT INTO `yx_system_city` VALUES (419, 5042, 2, 2, '110115000000', '大兴区', '北京,大兴', '116.341395', '39.726929', 1); +INSERT INTO `yx_system_city` VALUES (420, 5800, 2, 2, '110116000000', '怀柔区', '北京,怀柔', '116.642349', '40.315704', 1); +INSERT INTO `yx_system_city` VALUES (421, 6138, 2, 2, '110117000000', '平谷区', '北京,平谷', '117.121383', '40.140701', 1); +INSERT INTO `yx_system_city` VALUES (422, 6466, 2, 2, '110118000000', '密云区', '北京,密云', '116.843177', '40.376834', 1); +INSERT INTO `yx_system_city` VALUES (423, 6921, 2, 2, '110119000000', '延庆区', '北京,延庆', '115.974848', '40.456951', 1); +INSERT INTO `yx_system_city` VALUES (424, 7364, 2, 7363, '120101000000', '和平区', '天津,和平', '117.214510', '39.116949', 1); +INSERT INTO `yx_system_city` VALUES (425, 7434, 2, 7363, '120102000000', '河东区', '天津,河东', '117.251587', '39.128291', 1); +INSERT INTO `yx_system_city` VALUES (426, 7607, 2, 7363, '120103000000', '河西区', '天津,河西', '117.223372', '39.109563', 1); +INSERT INTO `yx_system_city` VALUES (427, 7763, 2, 7363, '120104000000', '南开区', '天津,南开', '117.150738', '39.138203', 1); +INSERT INTO `yx_system_city` VALUES (428, 7954, 2, 7363, '120105000000', '河北区', '天津,河北', '117.200983', '39.084158', 1); +INSERT INTO `yx_system_city` VALUES (429, 8079, 2, 7363, '120106000000', '红桥区', '天津,红桥', '117.151533', '39.167345', 1); +INSERT INTO `yx_system_city` VALUES (430, 8298, 2, 7363, '120110000000', '东丽区', '天津,东丽', '117.314324', '39.086569', 1); +INSERT INTO `yx_system_city` VALUES (431, 8563, 2, 7363, '120111000000', '西青区', '天津,西青', '117.008827', '39.141152', 1); +INSERT INTO `yx_system_city` VALUES (432, 8835, 2, 7363, '120112000000', '津南区', '天津,津南', '117.357260', '38.937928', 1); +INSERT INTO `yx_system_city` VALUES (433, 9102, 2, 7363, '120113000000', '北辰区', '天津,北辰', '117.135488', '39.224792', 1); +INSERT INTO `yx_system_city` VALUES (434, 9378, 2, 7363, '120114000000', '武清区', '天津,武清', '117.044388', '39.384119', 1); +INSERT INTO `yx_system_city` VALUES (435, 10143, 2, 7363, '120115000000', '宝坻区', '天津,宝坻', '117.309863', '39.717379', 1); +INSERT INTO `yx_system_city` VALUES (436, 10983, 2, 7363, '120116000000', '滨海新区', '天津,滨海', '117.517969', '38.719936', 1); +INSERT INTO `yx_system_city` VALUES (437, 11454, 2, 7363, '120117000000', '宁河区', '天津,宁河', '117.826625', '39.329858', 1); +INSERT INTO `yx_system_city` VALUES (438, 11795, 2, 7363, '120118000000', '静海区', '天津,静海', '116.974130', '38.947512', 1); +INSERT INTO `yx_system_city` VALUES (439, 12251, 2, 7363, '120119000000', '蓟州区', '天津,蓟州', '117.200983', '39.084158', 1); +INSERT INTO `yx_system_city` VALUES (440, 13269, 2, 13268, '130101000000', '市辖区', '河北,石家庄', '114.514859', '38.042306', 1); +INSERT INTO `yx_system_city` VALUES (441, 13270, 2, 13268, '130102000000', '长安区', '河北,石家庄,长安', '114.539060', '38.036654', 1); +INSERT INTO `yx_system_city` VALUES (442, 13444, 2, 13268, '130104000000', '桥西区', '河北,石家庄,桥西', '114.461154', '38.004043', 1); +INSERT INTO `yx_system_city` VALUES (443, 13601, 2, 13268, '130105000000', '新华区', '河北,石家庄,新华', '114.463347', '38.051060', 1); +INSERT INTO `yx_system_city` VALUES (444, 13728, 2, 13268, '130107000000', '井陉矿区', '河北,石家庄,井陉', '114.145240', '38.032148', 1); +INSERT INTO `yx_system_city` VALUES (445, 13788, 2, 13268, '130108000000', '裕华区', '河北,石家庄,裕华', '114.531362', '38.006453', 1); +INSERT INTO `yx_system_city` VALUES (446, 13895, 2, 13268, '130109000000', '藁城区', '河北,石家庄,藁城', '114.847075', '38.021567', 1); +INSERT INTO `yx_system_city` VALUES (447, 14142, 2, 13268, '130110000000', '鹿泉区', '河北,石家庄,鹿泉', '114.313724', '38.085958', 1); +INSERT INTO `yx_system_city` VALUES (448, 14377, 2, 13268, '130111000000', '栾城区', '河北,石家庄,栾城', '114.648318', '37.900200', 1); +INSERT INTO `yx_system_city` VALUES (449, 14562, 2, 13268, '130121000000', '井陉县', '河北,石家庄,井陉', '114.145240', '38.032148', 1); +INSERT INTO `yx_system_city` VALUES (450, 14902, 2, 13268, '130123000000', '正定县', '河北,石家庄,正定', '114.570941', '38.146445', 1); +INSERT INTO `yx_system_city` VALUES (451, 15100, 2, 13268, '130125000000', '行唐县', '河北,石家庄,行唐', '114.552692', '38.438411', 1); +INSERT INTO `yx_system_city` VALUES (452, 15447, 2, 13268, '130126000000', '灵寿县', '河北,石家庄,灵寿', '114.382645', '38.308628', 1); +INSERT INTO `yx_system_city` VALUES (453, 15747, 2, 13268, '130127000000', '高邑县', '河北,石家庄,高邑', '114.611433', '37.615159', 1); +INSERT INTO `yx_system_city` VALUES (454, 15860, 2, 13268, '130128000000', '深泽县', '河北,石家庄,深泽', '115.200910', '38.184072', 1); +INSERT INTO `yx_system_city` VALUES (455, 15993, 2, 13268, '130129000000', '赞皇县', '河北,石家庄,赞皇', '114.386155', '37.665576', 1); +INSERT INTO `yx_system_city` VALUES (456, 16218, 2, 13268, '130130000000', '无极县', '河北,石家庄,无极', '114.976337', '38.179141', 1); +INSERT INTO `yx_system_city` VALUES (457, 16447, 2, 13268, '130131000000', '平山县', '河北,石家庄,平山', '114.199134', '38.247144', 1); +INSERT INTO `yx_system_city` VALUES (458, 17188, 2, 13268, '130132000000', '元氏县', '河北,石家庄,元氏', '114.525580', '37.766651', 1); +INSERT INTO `yx_system_city` VALUES (459, 17417, 2, 13268, '130133000000', '赵县', '河北,石家庄,赵县', '114.776187', '37.756498', 1); +INSERT INTO `yx_system_city` VALUES (460, 17710, 2, 13268, '130183000000', '晋州市', '河北,石家庄,晋州', '115.044185', '38.033629', 1); +INSERT INTO `yx_system_city` VALUES (461, 17945, 2, 13268, '130184000000', '新乐市', '河北,石家庄,新乐', '114.684014', '38.343296', 1); +INSERT INTO `yx_system_city` VALUES (462, 18129, 2, 18128, '130201000000', '市辖区', '河北,唐山', '118.180193', '39.630867', 1); +INSERT INTO `yx_system_city` VALUES (463, 18130, 2, 18128, '130202000000', '路南区', '河北,唐山,路南', '118.154354', '39.625059', 1); +INSERT INTO `yx_system_city` VALUES (464, 18297, 2, 18128, '130203000000', '路北区', '河北,唐山,路北', '118.200692', '39.624437', 1); +INSERT INTO `yx_system_city` VALUES (465, 18542, 2, 18128, '130204000000', '古冶区', '河北,唐山,古冶', '118.447635', '39.733578', 1); +INSERT INTO `yx_system_city` VALUES (466, 18754, 2, 18128, '130205000000', '开平区', '河北,唐山,开平', '118.261842', '39.671001', 1); +INSERT INTO `yx_system_city` VALUES (467, 18938, 2, 18128, '130207000000', '丰南区', '河北,唐山,丰南', '118.085169', '39.576031', 1); +INSERT INTO `yx_system_city` VALUES (468, 19436, 2, 18128, '130208000000', '丰润区', '河北,唐山,丰润', '118.162216', '39.832582', 1); +INSERT INTO `yx_system_city` VALUES (469, 19987, 2, 18128, '130209000000', '曹妃甸区', '河北,唐山,曹妃甸', '118.460379', '39.273070', 1); +INSERT INTO `yx_system_city` VALUES (470, 20152, 2, 18128, '130223000000', '滦县', '河北,唐山,滦县', '118.703598', '39.740593', 1); +INSERT INTO `yx_system_city` VALUES (471, 20696, 2, 18128, '130224000000', '滦南县', '河北,唐山,滦南', '118.682379', '39.518997', 1); +INSERT INTO `yx_system_city` VALUES (472, 21321, 2, 18128, '130225000000', '乐亭县', '河北,唐山,乐亭', '118.912571', '39.425608', 1); +INSERT INTO `yx_system_city` VALUES (473, 21825, 2, 18128, '130227000000', '迁西县', '河北,唐山,迁西', '118.314715', '40.141500', 1); +INSERT INTO `yx_system_city` VALUES (474, 22273, 2, 18128, '130229000000', '玉田县', '河北,唐山,玉田', '117.738658', '39.900401', 1); +INSERT INTO `yx_system_city` VALUES (475, 23067, 2, 18128, '130281000000', '遵化市', '河北,唐山,遵化', '117.965892', '40.189202', 1); +INSERT INTO `yx_system_city` VALUES (476, 23787, 2, 18128, '130283000000', '迁安市', '河北,唐山,迁安', '118.701144', '39.999175', 1); +INSERT INTO `yx_system_city` VALUES (477, 24372, 2, 24371, '130301000000', '市辖区', '河北,秦皇岛', '119.600492', '39.935385', 1); +INSERT INTO `yx_system_city` VALUES (478, 24373, 2, 24371, '130302000000', '海港区', '河北,秦皇岛,海港', '119.564962', '39.947560', 1); +INSERT INTO `yx_system_city` VALUES (479, 24760, 2, 24371, '130303000000', '山海关区', '河北,秦皇岛,山海关', '119.775799', '39.978849', 1); +INSERT INTO `yx_system_city` VALUES (480, 24891, 2, 24371, '130304000000', '北戴河区', '河北,秦皇岛,北戴河', '119.488914', '39.834751', 1); +INSERT INTO `yx_system_city` VALUES (481, 24951, 2, 24371, '130306000000', '抚宁区', '河北,秦皇岛,抚宁', '119.244848', '39.876254', 1); +INSERT INTO `yx_system_city` VALUES (482, 25332, 2, 24371, '130321000000', '青龙满族自治县', '河北,秦皇岛,青龙', '118.949684', '40.407578', 1); +INSERT INTO `yx_system_city` VALUES (483, 25758, 2, 24371, '130322000000', '昌黎县', '河北,秦皇岛,昌黎', '119.162694', '39.712813', 1); +INSERT INTO `yx_system_city` VALUES (484, 26216, 2, 24371, '130324000000', '卢龙县', '河北,秦皇岛,卢龙', '118.892986', '39.891947', 1); +INSERT INTO `yx_system_city` VALUES (485, 26780, 2, 26779, '130401000000', '市辖区', '河北,邯郸', '114.538961', '36.625657', 1); +INSERT INTO `yx_system_city` VALUES (486, 26781, 2, 26779, '130402000000', '邯山区', '河北,邯郸,邯山', '114.490431', '36.580358', 1); +INSERT INTO `yx_system_city` VALUES (487, 26877, 2, 26779, '130403000000', '丛台区', '河北,邯郸,丛台', '114.492897', '36.636410', 1); +INSERT INTO `yx_system_city` VALUES (488, 27018, 2, 26779, '130404000000', '复兴区', '河北,邯郸,复兴', '114.462058', '36.639022', 1); +INSERT INTO `yx_system_city` VALUES (489, 27135, 2, 26779, '130406000000', '峰峰矿区', '河北,邯郸,峰峰', '114.214634', '36.472281', 1); +INSERT INTO `yx_system_city` VALUES (490, 27372, 2, 26779, '130421000000', '邯郸县', '河北,邯郸,邯郸', '114.530925', '36.593881', 1); +INSERT INTO `yx_system_city` VALUES (491, 27538, 2, 26779, '130423000000', '临漳县', '河北,邯郸,临漳', '114.619544', '36.335300', 1); +INSERT INTO `yx_system_city` VALUES (492, 27978, 2, 26779, '130424000000', '成安县', '河北,邯郸,成安', '114.670032', '36.444317', 1); +INSERT INTO `yx_system_city` VALUES (493, 28222, 2, 26779, '130425000000', '大名县', '河北,邯郸,大名', '115.147814', '36.285616', 1); +INSERT INTO `yx_system_city` VALUES (494, 28894, 2, 26779, '130426000000', '涉县', '河北,邯郸,涉县', '113.691401', '36.584995', 1); +INSERT INTO `yx_system_city` VALUES (495, 29226, 2, 26779, '130427000000', '磁县', '河北,邯郸,磁县', '114.373947', '36.374012', 1); +INSERT INTO `yx_system_city` VALUES (496, 29613, 2, 26779, '130428000000', '肥乡县', '河北,邯郸,肥乡', '114.800166', '36.548132', 1); +INSERT INTO `yx_system_city` VALUES (497, 29888, 2, 26779, '130429000000', '永年县', '河北,邯郸,永年', '114.543804', '36.744120', 1); +INSERT INTO `yx_system_city` VALUES (498, 30335, 2, 26779, '130430000000', '邱县', '河北,邯郸,邱县', '115.186792', '36.811133', 1); +INSERT INTO `yx_system_city` VALUES (499, 30568, 2, 26779, '130431000000', '鸡泽县', '河北,邯郸,鸡泽', '114.878299', '36.920350', 1); +INSERT INTO `yx_system_city` VALUES (500, 30747, 2, 26779, '130432000000', '广平县', '河北,邯郸,广平', '114.948607', '36.483484', 1); +INSERT INTO `yx_system_city` VALUES (501, 30924, 2, 26779, '130433000000', '馆陶县', '河北,邯郸,馆陶', '115.282468', '36.547557', 1); +INSERT INTO `yx_system_city` VALUES (502, 31210, 2, 26779, '130434000000', '魏县', '河北,邯郸,魏县', '114.938921', '36.359869', 1); +INSERT INTO `yx_system_city` VALUES (503, 31793, 2, 26779, '130435000000', '曲周县', '河北,邯郸,曲周', '114.945113', '36.780175', 1); +INSERT INTO `yx_system_city` VALUES (504, 32146, 2, 26779, '130481000000', '武安市', '河北,邯郸,武安', '114.203697', '36.696506', 1); +INSERT INTO `yx_system_city` VALUES (505, 32689, 2, 32688, '130501000000', '市辖区', '河北,邢台', '114.504844', '37.070589', 1); +INSERT INTO `yx_system_city` VALUES (506, 32690, 2, 32688, '130502000000', '桥东区', '河北,邢台,桥东', '114.507254', '37.068017', 1); +INSERT INTO `yx_system_city` VALUES (507, 32795, 2, 32688, '130503000000', '桥西区', '河北,邢台,桥西', '114.468435', '37.059882', 1); +INSERT INTO `yx_system_city` VALUES (508, 32922, 2, 32688, '130521000000', '邢台县', '河北,邢台,邢台', '114.561132', '37.050730', 1); +INSERT INTO `yx_system_city` VALUES (509, 33459, 2, 32688, '130522000000', '临城县', '河北,邢台,临城', '114.498762', '37.444499', 1); +INSERT INTO `yx_system_city` VALUES (510, 33688, 2, 32688, '130523000000', '内丘县', '河北,邢台,内丘', '114.512128', '37.286669', 1); +INSERT INTO `yx_system_city` VALUES (511, 34011, 2, 32688, '130524000000', '柏乡县', '河北,邢台,柏乡', '114.693426', '37.482423', 1); +INSERT INTO `yx_system_city` VALUES (512, 34139, 2, 32688, '130525000000', '隆尧县', '河北,邢台,隆尧', '114.770419', '37.350173', 1); +INSERT INTO `yx_system_city` VALUES (513, 34431, 2, 32688, '130526000000', '任县', '河北,邢台,任县', '114.671936', '37.120983', 1); +INSERT INTO `yx_system_city` VALUES (514, 34635, 2, 32688, '130527000000', '南和县', '河北,邢台,南和', '114.683762', '37.005041', 1); +INSERT INTO `yx_system_city` VALUES (515, 34866, 2, 32688, '130528000000', '宁晋县', '河北,邢台,宁晋', '114.919301', '37.619886', 1); +INSERT INTO `yx_system_city` VALUES (516, 35240, 2, 32688, '130529000000', '巨鹿县', '河北,邢台,巨鹿', '115.037478', '37.221112', 1); +INSERT INTO `yx_system_city` VALUES (517, 35542, 2, 32688, '130530000000', '新河县', '河北,邢台,新河', '115.242070', '37.528719', 1); +INSERT INTO `yx_system_city` VALUES (518, 35718, 2, 32688, '130531000000', '广宗县', '河北,邢台,广宗', '115.142607', '37.074660', 1); +INSERT INTO `yx_system_city` VALUES (519, 35940, 2, 32688, '130532000000', '平乡县', '河北,邢台,平乡', '115.030076', '37.063148', 1); +INSERT INTO `yx_system_city` VALUES (520, 36202, 2, 32688, '130533000000', '威县', '河北,邢台,威县', '115.266780', '36.975377', 1); +INSERT INTO `yx_system_city` VALUES (521, 36748, 2, 32688, '130534000000', '清河县', '河北,邢台,清河', '115.667576', '37.040087', 1); +INSERT INTO `yx_system_city` VALUES (522, 37086, 2, 32688, '130535000000', '临西县', '河北,邢台,临西', '115.501048', '36.870813', 1); +INSERT INTO `yx_system_city` VALUES (523, 37403, 2, 32688, '130581000000', '南宫市', '河北,邢台,南宫', '115.408748', '37.359264', 1); +INSERT INTO `yx_system_city` VALUES (524, 37883, 2, 32688, '130582000000', '沙河市', '河北,邢台,沙河', '114.503335', '36.854922', 1); +INSERT INTO `yx_system_city` VALUES (525, 38161, 2, 38160, '130601000000', '市辖区', '河北,保定', '115.464806', '38.873891', 1); +INSERT INTO `yx_system_city` VALUES (526, 38162, 2, 38160, '130602000000', '竞秀区', '河北,保定,竞秀', '115.458669', '38.877561', 1); +INSERT INTO `yx_system_city` VALUES (527, 38327, 2, 38160, '130606000000', '莲池区', '河北,保定,莲池', '115.497342', '38.883209', 1); +INSERT INTO `yx_system_city` VALUES (528, 38578, 2, 38160, '130607000000', '满城区', '河北,保定,满城', '115.322351', '38.948955', 1); +INSERT INTO `yx_system_city` VALUES (529, 38786, 2, 38160, '130608000000', '清苑区', '河北,保定,清苑', '115.489968', '38.765041', 1); +INSERT INTO `yx_system_city` VALUES (530, 39082, 2, 38160, '130609000000', '徐水区', '河北,保定,徐水', '115.655778', '39.018737', 1); +INSERT INTO `yx_system_city` VALUES (531, 39426, 2, 38160, '130623000000', '涞水县', '河北,保定,涞水', '115.713905', '39.394317', 1); +INSERT INTO `yx_system_city` VALUES (532, 39736, 2, 38160, '130624000000', '阜平县', '河北,保定,阜平', '114.195104', '38.849152', 1); +INSERT INTO `yx_system_city` VALUES (533, 39960, 2, 38160, '130626000000', '定兴县', '河北,保定,定兴', '115.808175', '39.263018', 1); +INSERT INTO `yx_system_city` VALUES (534, 40258, 2, 38160, '130627000000', '唐县', '河北,保定,唐县', '114.982972', '38.748204', 1); +INSERT INTO `yx_system_city` VALUES (535, 40632, 2, 38160, '130628000000', '高阳县', '河北,保定,高阳', '115.778965', '38.700088', 1); +INSERT INTO `yx_system_city` VALUES (536, 40825, 2, 38160, '130629000000', '容城县', '河北,保定,容城', '115.861657', '39.042784', 1); +INSERT INTO `yx_system_city` VALUES (537, 40961, 2, 38160, '130630000000', '涞源县', '河北,保定,涞源', '114.694284', '39.360247', 1); +INSERT INTO `yx_system_city` VALUES (538, 41272, 2, 38160, '130631000000', '望都县', '河北,保定,望都', '115.154511', '38.695736', 1); +INSERT INTO `yx_system_city` VALUES (539, 41433, 2, 38160, '130632000000', '安新县', '河北,保定,安新', '115.935603', '38.935369', 1); +INSERT INTO `yx_system_city` VALUES (540, 41658, 2, 38160, '130633000000', '易县', '河北,保定,易县', '115.497457', '39.349393', 1); +INSERT INTO `yx_system_city` VALUES (541, 42155, 2, 38160, '130634000000', '曲阳县', '河北,保定,曲阳', '114.744926', '38.622244', 1); +INSERT INTO `yx_system_city` VALUES (542, 42550, 2, 38160, '130635000000', '蠡县', '河北,保定,蠡县', '115.583855', '38.488056', 1); +INSERT INTO `yx_system_city` VALUES (543, 42802, 2, 38160, '130636000000', '顺平县', '河北,保定,顺平', '115.135470', '38.837487', 1); +INSERT INTO `yx_system_city` VALUES (544, 43054, 2, 38160, '130637000000', '博野县', '河北,保定,博野', '115.464380', '38.457364', 1); +INSERT INTO `yx_system_city` VALUES (545, 43196, 2, 38160, '130638000000', '雄县', '河北,保定,雄县', '116.108650', '38.994550', 1); +INSERT INTO `yx_system_city` VALUES (546, 43441, 2, 38160, '130681000000', '涿州市', '河北,保定,涿州', '115.974422', '39.485283', 1); +INSERT INTO `yx_system_city` VALUES (547, 43905, 2, 38160, '130683000000', '安国市', '河北,保定,安国', '115.326647', '38.418440', 1); +INSERT INTO `yx_system_city` VALUES (548, 44124, 2, 38160, '130684000000', '高碑店市', '河北,保定,高碑店', '115.873758', '39.326521', 1); +INSERT INTO `yx_system_city` VALUES (549, 44571, 2, 44570, '130701000000', '市辖区', '河北,张家口', '114.887543', '40.824418', 1); +INSERT INTO `yx_system_city` VALUES (550, 44572, 2, 44570, '130702000000', '桥东区', '河北,张家口,桥东', '114.894341', '40.788457', 1); +INSERT INTO `yx_system_city` VALUES (551, 44634, 2, 44570, '130703000000', '桥西区', '河北,张家口,桥西', '114.869407', '40.819564', 1); +INSERT INTO `yx_system_city` VALUES (552, 44704, 2, 44570, '130705000000', '宣化区', '河北,张家口,宣化', '115.099510', '40.608726', 1); +INSERT INTO `yx_system_city` VALUES (553, 45133, 2, 44570, '130706000000', '下花园区', '河北,张家口,下花园', '115.287352', '40.502652', 1); +INSERT INTO `yx_system_city` VALUES (554, 45197, 2, 44570, '130708000000', '万全区', '河北,张家口,万全', '114.740560', '40.766898', 1); +INSERT INTO `yx_system_city` VALUES (555, 45395, 2, 44570, '130709000000', '崇礼区', '河北,张家口,崇礼', '115.282669', '40.974676', 1); +INSERT INTO `yx_system_city` VALUES (556, 45623, 2, 44570, '130722000000', '张北县', '河北,张家口,张北', '114.720086', '41.158557', 1); +INSERT INTO `yx_system_city` VALUES (557, 46018, 2, 44570, '130723000000', '康保县', '河北,张家口,康保', '114.600404', '41.852368', 1); +INSERT INTO `yx_system_city` VALUES (558, 46371, 2, 44570, '130724000000', '沽源县', '河北,张家口,沽源', '115.688692', '41.669668', 1); +INSERT INTO `yx_system_city` VALUES (559, 46619, 2, 44570, '130725000000', '尚义县', '河北,张家口,尚义', '113.969619', '41.076227', 1); +INSERT INTO `yx_system_city` VALUES (560, 46812, 2, 44570, '130726000000', '蔚县', '河北,张家口,蔚县', '114.588903', '39.840843', 1); +INSERT INTO `yx_system_city` VALUES (561, 47396, 2, 44570, '130727000000', '阳原县', '河北,张家口,阳原', '114.150388', '40.103742', 1); +INSERT INTO `yx_system_city` VALUES (562, 47718, 2, 44570, '130728000000', '怀安县', '河北,张家口,怀安', '114.385791', '40.674193', 1); +INSERT INTO `yx_system_city` VALUES (563, 48013, 2, 44570, '130730000000', '怀来县', '河北,张家口,怀来', '115.517862', '40.415343', 1); +INSERT INTO `yx_system_city` VALUES (564, 48331, 2, 44570, '130731000000', '涿鹿县', '河北,张家口,涿鹿', '115.205345', '40.379563', 1); +INSERT INTO `yx_system_city` VALUES (565, 48731, 2, 44570, '130732000000', '赤城县', '河北,张家口,赤城', '115.831499', '40.912921', 1); +INSERT INTO `yx_system_city` VALUES (566, 49191, 2, 49190, '130801000000', '市辖区', '河北,承德', '117.962410', '40.954071', 1); +INSERT INTO `yx_system_city` VALUES (567, 49192, 2, 49190, '130802000000', '双桥区', '河北,承德,双桥', '117.943348', '40.974650', 1); +INSERT INTO `yx_system_city` VALUES (568, 49328, 2, 49190, '130803000000', '双滦区', '河北,承德,双滦', '117.799912', '40.959196', 1); +INSERT INTO `yx_system_city` VALUES (569, 49425, 2, 49190, '130804000000', '鹰手营子矿区', '河北,承德,鹰手营子', '117.663471', '40.546436', 1); +INSERT INTO `yx_system_city` VALUES (570, 49456, 2, 49190, '130821000000', '承德县', '河北,承德,承德', '118.173825', '40.768238', 1); +INSERT INTO `yx_system_city` VALUES (571, 49866, 2, 49190, '130822000000', '兴隆县', '河北,承德,兴隆', '117.500558', '40.417358', 1); +INSERT INTO `yx_system_city` VALUES (572, 50185, 2, 49190, '130823000000', '平泉县', '河北,承德,平泉', '118.701951', '41.018405', 1); +INSERT INTO `yx_system_city` VALUES (573, 50455, 2, 49190, '130824000000', '滦平县', '河北,承德,滦平', '117.332801', '40.941482', 1); +INSERT INTO `yx_system_city` VALUES (574, 50690, 2, 49190, '130825000000', '隆化县', '河北,承德,隆化', '117.738938', '41.313791', 1); +INSERT INTO `yx_system_city` VALUES (575, 51081, 2, 49190, '130826000000', '丰宁满族自治县', '河北,承德,丰宁', '117.962410', '40.954071', 1); +INSERT INTO `yx_system_city` VALUES (576, 51428, 2, 49190, '130827000000', '宽城满族自治县', '河北,承德,宽城', '118.485313', '40.611391', 1); +INSERT INTO `yx_system_city` VALUES (577, 51657, 2, 49190, '130828000000', '围场满族蒙古族自治县', '河北,承德,围场', '117.760159', '41.938529', 1); +INSERT INTO `yx_system_city` VALUES (578, 52019, 2, 52018, '130901000000', '市辖区', '河北,沧州', '116.838834', '38.304477', 1); +INSERT INTO `yx_system_city` VALUES (579, 52020, 2, 52018, '130902000000', '新华区', '河北,沧州,新华', '116.866284', '38.314416', 1); +INSERT INTO `yx_system_city` VALUES (580, 52086, 2, 52018, '130903000000', '运河区', '河北,沧州,运河', '116.832276', '38.310143', 1); +INSERT INTO `yx_system_city` VALUES (581, 52214, 2, 52018, '130921000000', '沧县', '河北,沧州,沧县', '117.007478', '38.219856', 1); +INSERT INTO `yx_system_city` VALUES (582, 52753, 2, 52018, '130922000000', '青县', '河北,沧州,青县', '116.804306', '38.583021', 1); +INSERT INTO `yx_system_city` VALUES (583, 53128, 2, 52018, '130923000000', '东光县', '河北,沧州,东光', '116.537067', '37.888248', 1); +INSERT INTO `yx_system_city` VALUES (584, 53595, 2, 52018, '130924000000', '海兴县', '河北,沧州,海兴', '117.496606', '38.141582', 1); +INSERT INTO `yx_system_city` VALUES (585, 53810, 2, 52018, '130925000000', '盐山县', '河北,沧州,盐山', '117.230603', '38.058088', 1); +INSERT INTO `yx_system_city` VALUES (586, 54277, 2, 52018, '130926000000', '肃宁县', '河北,沧州,肃宁', '115.829758', '38.422802', 1); +INSERT INTO `yx_system_city` VALUES (587, 54547, 2, 52018, '130927000000', '南皮县', '河北,沧州,南皮', '116.708104', '38.038584', 1); +INSERT INTO `yx_system_city` VALUES (588, 54875, 2, 52018, '130928000000', '吴桥县', '河北,沧州,吴桥', '116.391508', '37.627661', 1); +INSERT INTO `yx_system_city` VALUES (589, 55369, 2, 52018, '130929000000', '献县', '河北,沧州,献县', '116.122802', '38.190144', 1); +INSERT INTO `yx_system_city` VALUES (590, 55902, 2, 52018, '130930000000', '孟村回族自治县', '河北,沧州,孟村', '117.104298', '38.053409', 1); +INSERT INTO `yx_system_city` VALUES (591, 56037, 2, 52018, '130981000000', '泊头市', '河北,沧州,泊头', '116.578368', '38.083437', 1); +INSERT INTO `yx_system_city` VALUES (592, 56764, 2, 52018, '130982000000', '任丘市', '河北,沧州,任丘', '116.082918', '38.683592', 1); +INSERT INTO `yx_system_city` VALUES (593, 57238, 2, 52018, '130983000000', '黄骅市', '河北,沧州,黄骅', '117.330048', '38.371383', 1); +INSERT INTO `yx_system_city` VALUES (594, 57596, 2, 52018, '130984000000', '河间市', '河北,沧州,河间', '116.099518', '38.446624', 1); +INSERT INTO `yx_system_city` VALUES (595, 58248, 2, 58247, '131001000000', '市辖区', '河北,廊坊', '116.683752', '39.538047', 1); +INSERT INTO `yx_system_city` VALUES (596, 58249, 2, 58247, '131002000000', '安次区', '河北,廊坊,安次', '116.694544', '39.502569', 1); +INSERT INTO `yx_system_city` VALUES (597, 58567, 2, 58247, '131003000000', '广阳区', '河北,廊坊,广阳', '116.710690', '39.522786', 1); +INSERT INTO `yx_system_city` VALUES (598, 58789, 2, 58247, '131022000000', '固安县', '河北,廊坊,固安', '116.298657', '39.438214', 1); +INSERT INTO `yx_system_city` VALUES (599, 59228, 2, 58247, '131023000000', '永清县', '河北,廊坊,永清', '116.499028', '39.321794', 1); +INSERT INTO `yx_system_city` VALUES (600, 59639, 2, 58247, '131024000000', '香河县', '河北,廊坊,香河', '117.006093', '39.761424', 1); +INSERT INTO `yx_system_city` VALUES (601, 59963, 2, 58247, '131025000000', '大城县', '河北,廊坊,大城', '116.653794', '38.705449', 1); +INSERT INTO `yx_system_city` VALUES (602, 60378, 2, 58247, '131026000000', '文安县', '河北,廊坊,文安', '116.457858', '38.873281', 1); +INSERT INTO `yx_system_city` VALUES (603, 60784, 2, 58247, '131028000000', '大厂回族自治县', '河北,廊坊,大厂', '116.970154', '39.897785', 1); +INSERT INTO `yx_system_city` VALUES (604, 60904, 2, 58247, '131081000000', '霸州市', '河北,廊坊,霸州', '116.391386', '39.125898', 1); +INSERT INTO `yx_system_city` VALUES (605, 61311, 2, 58247, '131082000000', '三河市', '河北,廊坊,三河', '117.078295', '39.982718', 1); +INSERT INTO `yx_system_city` VALUES (606, 61805, 2, 61804, '131101000000', '市辖区', '河北,衡水', '115.670177', '37.738920', 1); +INSERT INTO `yx_system_city` VALUES (607, 61806, 2, 61804, '131102000000', '桃城区', '河北,衡水,桃城', '115.675422', '37.735369', 1); +INSERT INTO `yx_system_city` VALUES (608, 62086, 2, 61804, '131103000000', '冀州区', '河北,衡水,冀州', '115.670177', '37.738920', 1); +INSERT INTO `yx_system_city` VALUES (609, 62479, 2, 61804, '131121000000', '枣强县', '河北,衡水,枣强', '115.724260', '37.513417', 1); +INSERT INTO `yx_system_city` VALUES (610, 63050, 2, 61804, '131122000000', '武邑县', '河北,衡水,武邑', '115.887655', '37.801658', 1); +INSERT INTO `yx_system_city` VALUES (611, 63584, 2, 61804, '131123000000', '武强县', '河北,衡水,武强', '115.982461', '38.041368', 1); +INSERT INTO `yx_system_city` VALUES (612, 63832, 2, 61804, '131124000000', '饶阳县', '河北,衡水,饶阳', '115.725833', '38.235892', 1); +INSERT INTO `yx_system_city` VALUES (613, 64040, 2, 61804, '131125000000', '安平县', '河北,衡水,安平', '115.519216', '38.234510', 1); +INSERT INTO `yx_system_city` VALUES (614, 64281, 2, 61804, '131126000000', '故城县', '河北,衡水,故城', '115.965874', '37.347410', 1); +INSERT INTO `yx_system_city` VALUES (615, 64833, 2, 61804, '131127000000', '景县', '河北,衡水,景县', '116.270648', '37.692290', 1); +INSERT INTO `yx_system_city` VALUES (616, 65702, 2, 61804, '131128000000', '阜城县', '河北,衡水,阜城', '116.144418', '37.868872', 1); +INSERT INTO `yx_system_city` VALUES (617, 66323, 2, 61804, '131182000000', '深州市', '河北,衡水,深州', '115.559574', '38.001536', 1); +INSERT INTO `yx_system_city` VALUES (618, 66814, 2, 66813, '139001000000', '定州市', '河北,定州', '114.990159', '38.516174', 1); +INSERT INTO `yx_system_city` VALUES (619, 67371, 2, 66813, '139002000000', '辛集市', '河北,辛集', '115.218057', '37.943315', 1); +INSERT INTO `yx_system_city` VALUES (620, 67749, 2, 67748, '140101000000', '市辖区', '山西,太原', '112.548879', '37.870590', 1); +INSERT INTO `yx_system_city` VALUES (621, 67750, 2, 67748, '140105000000', '小店区', '山西,太原,小店', '112.565659', '37.736526', 1); +INSERT INTO `yx_system_city` VALUES (622, 67921, 2, 67748, '140106000000', '迎泽区', '山西,太原,迎泽', '112.563400', '37.863451', 1); +INSERT INTO `yx_system_city` VALUES (623, 68043, 2, 67748, '140107000000', '杏花岭区', '山西,太原,杏花岭', '112.570605', '37.893955', 1); +INSERT INTO `yx_system_city` VALUES (624, 68203, 2, 67748, '140108000000', '尖草坪区', '山西,太原,尖草坪', '112.486691', '37.940387', 1); +INSERT INTO `yx_system_city` VALUES (625, 68368, 2, 67748, '140109000000', '万柏林区', '山西,太原,万柏林', '112.515748', '37.859447', 1); +INSERT INTO `yx_system_city` VALUES (626, 68542, 2, 67748, '140110000000', '晋源区', '山西,太原,晋源', '112.477940', '37.715193', 1); +INSERT INTO `yx_system_city` VALUES (627, 68671, 2, 67748, '140121000000', '清徐县', '山西,太原,清徐', '112.358667', '37.607443', 1); +INSERT INTO `yx_system_city` VALUES (628, 68893, 2, 67748, '140122000000', '阳曲县', '山西,太原,阳曲', '112.672953', '38.058489', 1); +INSERT INTO `yx_system_city` VALUES (629, 69032, 2, 67748, '140123000000', '娄烦县', '山西,太原,娄烦', '111.797083', '38.067932', 1); +INSERT INTO `yx_system_city` VALUES (630, 69190, 2, 67748, '140181000000', '古交市', '山西,太原,古交', '112.175875', '37.907109', 1); +INSERT INTO `yx_system_city` VALUES (631, 69391, 2, 69390, '140201000000', '市辖区', '山西,大同', '113.612440', '40.040295', 1); +INSERT INTO `yx_system_city` VALUES (632, 69392, 2, 69390, '140202000000', '城区', '山西,大同,城区', '113.298027', '40.075667', 1); +INSERT INTO `yx_system_city` VALUES (633, 69546, 2, 69390, '140203000000', '矿区', '山西,大同,矿区', '113.612440', '40.040295', 1); +INSERT INTO `yx_system_city` VALUES (634, 69691, 2, 69390, '140211000000', '南郊区', '山西,大同,南郊', '113.149693', '40.005405', 1); +INSERT INTO `yx_system_city` VALUES (635, 69891, 2, 69390, '140212000000', '新荣区', '山西,大同,新荣', '113.140005', '40.255866', 1); +INSERT INTO `yx_system_city` VALUES (636, 70045, 2, 69390, '140221000000', '阳高县', '山西,大同,阳高', '113.748945', '40.361060', 1); +INSERT INTO `yx_system_city` VALUES (637, 70336, 2, 69390, '140222000000', '天镇县', '山西,大同,天镇', '114.090867', '40.420237', 1); +INSERT INTO `yx_system_city` VALUES (638, 70582, 2, 69390, '140223000000', '广灵县', '山西,大同,广灵', '114.282758', '39.760281', 1); +INSERT INTO `yx_system_city` VALUES (639, 70778, 2, 69390, '140224000000', '灵丘县', '山西,大同,灵丘', '114.234350', '39.442406', 1); +INSERT INTO `yx_system_city` VALUES (640, 71059, 2, 69390, '140225000000', '浑源县', '山西,大同,浑源', '113.699475', '39.693407', 1); +INSERT INTO `yx_system_city` VALUES (641, 71402, 2, 69390, '140226000000', '左云县', '山西,大同,左云', '112.703008', '40.013442', 1); +INSERT INTO `yx_system_city` VALUES (642, 71649, 2, 69390, '140227000000', '大同县', '山西,大同,大同', '113.397170', '40.067276', 1); +INSERT INTO `yx_system_city` VALUES (643, 71851, 2, 71850, '140301000000', '市辖区', '山西,阳泉', '113.580519', '37.856971', 1); +INSERT INTO `yx_system_city` VALUES (644, 71852, 2, 71850, '140302000000', '城区', '山西,阳泉,城区', '113.600670', '37.847437', 1); +INSERT INTO `yx_system_city` VALUES (645, 71905, 2, 71850, '140303000000', '矿区', '山西,阳泉,矿区', '113.580519', '37.856971', 1); +INSERT INTO `yx_system_city` VALUES (646, 71950, 2, 71850, '140311000000', '郊区', '山西,阳泉,郊区', '113.594164', '37.944679', 1); +INSERT INTO `yx_system_city` VALUES (647, 72145, 2, 71850, '140321000000', '平定县', '山西,阳泉,平定', '113.657841', '37.786653', 1); +INSERT INTO `yx_system_city` VALUES (648, 72497, 2, 71850, '140322000000', '盂县', '山西,阳泉,盂县', '113.412330', '38.085619', 1); +INSERT INTO `yx_system_city` VALUES (649, 72976, 2, 72975, '140401000000', '市辖区', '山西,长治', '113.116255', '36.195386', 1); +INSERT INTO `yx_system_city` VALUES (650, 72977, 2, 72975, '140402000000', '城区', '山西,长治,城区', '113.123085', '36.203519', 1); +INSERT INTO `yx_system_city` VALUES (651, 73071, 2, 72975, '140411000000', '郊区', '山西,长治,郊区', '113.101211', '36.218388', 1); +INSERT INTO `yx_system_city` VALUES (652, 73222, 2, 72975, '140421000000', '长治县', '山西,长治,长治', '113.051407', '36.052858', 1); +INSERT INTO `yx_system_city` VALUES (653, 73495, 2, 72975, '140423000000', '襄垣县', '山西,长治,襄垣', '113.051491', '36.535817', 1); +INSERT INTO `yx_system_city` VALUES (654, 73840, 2, 72975, '140424000000', '屯留县', '山西,长治,屯留', '112.892151', '36.315929', 1); +INSERT INTO `yx_system_city` VALUES (655, 74151, 2, 72975, '140425000000', '平顺县', '山西,长治,平顺', '113.435961', '36.200179', 1); +INSERT INTO `yx_system_city` VALUES (656, 74429, 2, 72975, '140426000000', '黎城县', '山西,长治,黎城', '113.387155', '36.502328', 1); +INSERT INTO `yx_system_city` VALUES (657, 74694, 2, 72975, '140427000000', '壶关县', '山西,长治,壶关', '113.207049', '36.115449', 1); +INSERT INTO `yx_system_city` VALUES (658, 75101, 2, 72975, '140428000000', '长子县', '山西,长治,长子', '112.877900', '36.122334', 1); +INSERT INTO `yx_system_city` VALUES (659, 75515, 2, 72975, '140429000000', '武乡县', '山西,长治,武乡', '112.864562', '36.837625', 1); +INSERT INTO `yx_system_city` VALUES (660, 75911, 2, 72975, '140430000000', '沁县', '山西,长治,沁县', '112.699226', '36.756064', 1); +INSERT INTO `yx_system_city` VALUES (661, 76237, 2, 72975, '140431000000', '沁源县', '山西,长治,沁源', '112.337446', '36.500200', 1); +INSERT INTO `yx_system_city` VALUES (662, 76512, 2, 72975, '140481000000', '潞城市', '山西,长治,潞城', '113.228852', '36.334104', 1); +INSERT INTO `yx_system_city` VALUES (663, 76727, 2, 76726, '140501000000', '市辖区', '山西,晋城', '112.851831', '35.490701', 1); +INSERT INTO `yx_system_city` VALUES (664, 76728, 2, 76726, '140502000000', '城区', '山西,晋城,城区', '112.853555', '35.501572', 1); +INSERT INTO `yx_system_city` VALUES (665, 76874, 2, 76726, '140521000000', '沁水县', '山西,晋城,沁水', '112.186739', '35.690141', 1); +INSERT INTO `yx_system_city` VALUES (666, 77140, 2, 76726, '140522000000', '阳城县', '山西,晋城,阳城', '112.414738', '35.486029', 1); +INSERT INTO `yx_system_city` VALUES (667, 77632, 2, 76726, '140524000000', '陵川县', '山西,晋城,陵川', '113.280688', '35.775685', 1); +INSERT INTO `yx_system_city` VALUES (668, 78024, 2, 76726, '140525000000', '泽州县', '山西,晋城,泽州', '112.899137', '35.617221', 1); +INSERT INTO `yx_system_city` VALUES (669, 78678, 2, 76726, '140581000000', '高平市', '山西,晋城,高平', '112.923920', '35.797997', 1); +INSERT INTO `yx_system_city` VALUES (670, 79164, 2, 79163, '140601000000', '市辖区', '山西,朔州', '112.432825', '39.331595', 1); +INSERT INTO `yx_system_city` VALUES (671, 79165, 2, 79163, '140602000000', '朔城区', '山西,朔州,朔城', '112.432250', '39.318940', 1); +INSERT INTO `yx_system_city` VALUES (672, 79533, 2, 79163, '140603000000', '平鲁区', '山西,朔州,平鲁', '112.288331', '39.512155', 1); +INSERT INTO `yx_system_city` VALUES (673, 79843, 2, 79163, '140621000000', '山阴县', '山西,朔州,山阴', '112.816600', '39.526227', 1); +INSERT INTO `yx_system_city` VALUES (674, 80134, 2, 79163, '140622000000', '应县', '山西,朔州,应县', '113.191099', '39.554247', 1); +INSERT INTO `yx_system_city` VALUES (675, 80454, 2, 79163, '140623000000', '右玉县', '山西,朔州,右玉', '112.466989', '39.989064', 1); +INSERT INTO `yx_system_city` VALUES (676, 80799, 2, 79163, '140624000000', '怀仁县', '山西,朔州,怀仁', '113.099958', '39.827916', 1); +INSERT INTO `yx_system_city` VALUES (677, 81001, 2, 81000, '140701000000', '市辖区', '山西,晋中', '112.752694', '37.687024', 1); +INSERT INTO `yx_system_city` VALUES (678, 81002, 2, 81000, '140702000000', '榆次区', '山西,晋中,榆次', '112.708241', '37.697792', 1); +INSERT INTO `yx_system_city` VALUES (679, 81361, 2, 81000, '140721000000', '榆社县', '山西,晋中,榆社', '112.975287', '37.070788', 1); +INSERT INTO `yx_system_city` VALUES (680, 81649, 2, 81000, '140722000000', '左权县', '山西,晋中,左权', '113.379372', '37.082681', 1); +INSERT INTO `yx_system_city` VALUES (681, 81872, 2, 81000, '140723000000', '和顺县', '山西,晋中,和顺', '113.570438', '37.329664', 1); +INSERT INTO `yx_system_city` VALUES (682, 82183, 2, 81000, '140724000000', '昔阳县', '山西,晋中,昔阳', '113.706875', '37.611210', 1); +INSERT INTO `yx_system_city` VALUES (683, 82535, 2, 81000, '140725000000', '寿阳县', '山西,晋中,寿阳', '113.176434', '37.895325', 1); +INSERT INTO `yx_system_city` VALUES (684, 82765, 2, 81000, '140726000000', '太谷县', '山西,晋中,太谷', '112.551357', '37.421308', 1); +INSERT INTO `yx_system_city` VALUES (685, 82986, 2, 81000, '140727000000', '祁县', '山西,晋中,祁县', '112.335297', '37.358317', 1); +INSERT INTO `yx_system_city` VALUES (686, 83165, 2, 81000, '140728000000', '平遥县', '山西,晋中,平遥', '112.176273', '37.189559', 1); +INSERT INTO `yx_system_city` VALUES (687, 83472, 2, 81000, '140729000000', '灵石县', '山西,晋中,灵石', '111.778685', '36.847860', 1); +INSERT INTO `yx_system_city` VALUES (688, 83810, 2, 81000, '140781000000', '介休市', '山西,晋中,介休', '111.916712', '37.026945', 1); +INSERT INTO `yx_system_city` VALUES (689, 84093, 2, 84092, '140801000000', '市辖区', '山西,运城', '111.007528', '35.026412', 1); +INSERT INTO `yx_system_city` VALUES (690, 84094, 2, 84092, '140802000000', '盐湖区', '山西,运城,盐湖', '111.007528', '35.026412', 1); +INSERT INTO `yx_system_city` VALUES (691, 84483, 2, 84092, '140821000000', '临猗县', '山西,运城,临猗', '110.774547', '35.144277', 1); +INSERT INTO `yx_system_city` VALUES (692, 84893, 2, 84092, '140822000000', '万荣县', '山西,运城,万荣', '110.838024', '35.415254', 1); +INSERT INTO `yx_system_city` VALUES (693, 85194, 2, 84092, '140823000000', '闻喜县', '山西,运城,闻喜', '111.224720', '35.356644', 1); +INSERT INTO `yx_system_city` VALUES (694, 85569, 2, 84092, '140824000000', '稷山县', '山西,运城,稷山', '110.983333', '35.604025', 1); +INSERT INTO `yx_system_city` VALUES (695, 85780, 2, 84092, '140825000000', '新绛县', '山西,运城,新绛', '111.224778', '35.616288', 1); +INSERT INTO `yx_system_city` VALUES (696, 86023, 2, 84092, '140826000000', '绛县', '山西,运城,绛县', '111.568236', '35.491190', 1); +INSERT INTO `yx_system_city` VALUES (697, 86238, 2, 84092, '140827000000', '垣曲县', '山西,运城,垣曲', '111.669917', '35.297620', 1); +INSERT INTO `yx_system_city` VALUES (698, 86448, 2, 84092, '140828000000', '夏县', '山西,运城,夏县', '111.220456', '35.141363', 1); +INSERT INTO `yx_system_city` VALUES (699, 86706, 2, 84092, '140829000000', '平陆县', '山西,运城,平陆', '111.194133', '34.829260', 1); +INSERT INTO `yx_system_city` VALUES (700, 86949, 2, 84092, '140830000000', '芮城县', '山西,运城,芮城', '110.694369', '34.693580', 1); +INSERT INTO `yx_system_city` VALUES (701, 87129, 2, 84092, '140881000000', '永济市', '山西,运城,永济', '110.447549', '34.867050', 1); +INSERT INTO `yx_system_city` VALUES (702, 87434, 2, 84092, '140882000000', '河津市', '山西,运城,河津', '110.712063', '35.596383', 1); +INSERT INTO `yx_system_city` VALUES (703, 87614, 2, 87613, '140901000000', '市辖区', '山西,忻州', '112.734174', '38.416663', 1); +INSERT INTO `yx_system_city` VALUES (704, 87615, 2, 87613, '140902000000', '忻府区', '山西,忻州,忻府', '112.746046', '38.404243', 1); +INSERT INTO `yx_system_city` VALUES (705, 88061, 2, 87613, '140921000000', '定襄县', '山西,忻州,定襄', '112.957215', '38.473548', 1); +INSERT INTO `yx_system_city` VALUES (706, 88227, 2, 87613, '140922000000', '五台县', '山西,忻州,五台', '113.255309', '38.728315', 1); +INSERT INTO `yx_system_city` VALUES (707, 88754, 2, 87613, '140923000000', '代县', '山西,忻州,代县', '112.960282', '39.066917', 1); +INSERT INTO `yx_system_city` VALUES (708, 89144, 2, 87613, '140924000000', '繁峙县', '山西,忻州,繁峙', '113.265564', '39.188811', 1); +INSERT INTO `yx_system_city` VALUES (709, 89570, 2, 87613, '140925000000', '宁武县', '山西,忻州,宁武', '112.304722', '39.001524', 1); +INSERT INTO `yx_system_city` VALUES (710, 90066, 2, 87613, '140926000000', '静乐县', '山西,忻州,静乐', '111.939440', '38.359036', 1); +INSERT INTO `yx_system_city` VALUES (711, 90462, 2, 87613, '140927000000', '神池县', '山西,忻州,神池', '112.211297', '39.090553', 1); +INSERT INTO `yx_system_city` VALUES (712, 90715, 2, 87613, '140928000000', '五寨县', '山西,忻州,五寨', '111.846905', '38.910726', 1); +INSERT INTO `yx_system_city` VALUES (713, 90978, 2, 87613, '140929000000', '岢岚县', '山西,忻州,岢岚', '111.572850', '38.704180', 1); +INSERT INTO `yx_system_city` VALUES (714, 91193, 2, 87613, '140930000000', '河曲县', '山西,忻州,河曲', '111.138472', '39.384482', 1); +INSERT INTO `yx_system_city` VALUES (715, 91548, 2, 87613, '140931000000', '保德县', '山西,忻州,保德', '111.086564', '39.022488', 1); +INSERT INTO `yx_system_city` VALUES (716, 91912, 2, 87613, '140932000000', '偏关县', '山西,忻州,偏关', '111.508831', '39.436306', 1); +INSERT INTO `yx_system_city` VALUES (717, 92172, 2, 87613, '140981000000', '原平市', '山西,忻州,原平', '112.711059', '38.731402', 1); +INSERT INTO `yx_system_city` VALUES (718, 92739, 2, 92738, '141001000000', '市辖区', '山西,临汾', '111.518976', '36.088005', 1); +INSERT INTO `yx_system_city` VALUES (719, 92740, 2, 92738, '141002000000', '尧都区', '山西,临汾,尧都', '111.579554', '36.078841', 1); +INSERT INTO `yx_system_city` VALUES (720, 93208, 2, 92738, '141021000000', '曲沃县', '山西,临汾,曲沃', '111.475861', '35.641087', 1); +INSERT INTO `yx_system_city` VALUES (721, 93375, 2, 92738, '141022000000', '翼城县', '山西,临汾,翼城', '111.718951', '35.738576', 1); +INSERT INTO `yx_system_city` VALUES (722, 93604, 2, 92738, '141023000000', '襄汾县', '山西,临汾,襄汾', '111.441725', '35.876293', 1); +INSERT INTO `yx_system_city` VALUES (723, 93972, 2, 92738, '141024000000', '洪洞县', '山西,临汾,洪洞', '111.674966', '36.253748', 1); +INSERT INTO `yx_system_city` VALUES (724, 94457, 2, 92738, '141025000000', '古县', '山西,临汾,古县', '111.920466', '36.266914', 1); +INSERT INTO `yx_system_city` VALUES (725, 94580, 2, 92738, '141026000000', '安泽县', '山西,临汾,安泽', '112.250144', '36.147787', 1); +INSERT INTO `yx_system_city` VALUES (726, 94696, 2, 92738, '141027000000', '浮山县', '山西,临汾,浮山', '111.848883', '35.968124', 1); +INSERT INTO `yx_system_city` VALUES (727, 94893, 2, 92738, '141028000000', '吉县', '山西,临汾,吉县', '110.681763', '36.098188', 1); +INSERT INTO `yx_system_city` VALUES (728, 94981, 2, 92738, '141029000000', '乡宁县', '山西,临汾,乡宁', '110.847021', '35.970389', 1); +INSERT INTO `yx_system_city` VALUES (729, 95181, 2, 92738, '141030000000', '大宁县', '山西,临汾,大宁', '110.752903', '36.465133', 1); +INSERT INTO `yx_system_city` VALUES (730, 95272, 2, 92738, '141031000000', '隰县', '山西,临汾,隰县', '110.940638', '36.693331', 1); +INSERT INTO `yx_system_city` VALUES (731, 95381, 2, 92738, '141032000000', '永和县', '山西,临汾,永和', '110.632007', '36.759507', 1); +INSERT INTO `yx_system_city` VALUES (732, 95472, 2, 92738, '141033000000', '蒲县', '山西,临汾,蒲县', '111.096439', '36.411827', 1); +INSERT INTO `yx_system_city` VALUES (733, 95579, 2, 92738, '141034000000', '汾西县', '山西,临汾,汾西', '111.563951', '36.652854', 1); +INSERT INTO `yx_system_city` VALUES (734, 95715, 2, 92738, '141081000000', '侯马市', '山西,临汾,侯马', '111.372002', '35.619105', 1); +INSERT INTO `yx_system_city` VALUES (735, 95828, 2, 92738, '141082000000', '霍州市', '山西,临汾,霍州', '111.755398', '36.568931', 1); +INSERT INTO `yx_system_city` VALUES (736, 96065, 2, 96064, '141101000000', '市辖区', '山西,吕梁', '111.144319', '37.518314', 1); +INSERT INTO `yx_system_city` VALUES (737, 96066, 2, 96064, '141102000000', '离石区', '山西,吕梁,离石', '111.150733', '37.517641', 1); +INSERT INTO `yx_system_city` VALUES (738, 96332, 2, 96064, '141121000000', '文水县', '山西,吕梁,文水', '112.028866', '37.438102', 1); +INSERT INTO `yx_system_city` VALUES (739, 96548, 2, 96064, '141122000000', '交城县', '山西,吕梁,交城', '112.155841', '37.551970', 1); +INSERT INTO `yx_system_city` VALUES (740, 96711, 2, 96064, '141123000000', '兴县', '山西,吕梁,兴县', '111.127668', '38.462390', 1); +INSERT INTO `yx_system_city` VALUES (741, 97113, 2, 96064, '141124000000', '临县', '山西,吕梁,临县', '110.992094', '37.950758', 1); +INSERT INTO `yx_system_city` VALUES (742, 97779, 2, 96064, '141125000000', '柳林县', '山西,吕梁,柳林', '110.889071', '37.429832', 1); +INSERT INTO `yx_system_city` VALUES (743, 98056, 2, 96064, '141126000000', '石楼县', '山西,吕梁,石楼', '110.834561', '36.997412', 1); +INSERT INTO `yx_system_city` VALUES (744, 98201, 2, 96064, '141127000000', '岚县', '山西,吕梁,岚县', '111.671917', '38.279299', 1); +INSERT INTO `yx_system_city` VALUES (745, 98383, 2, 96064, '141128000000', '方山县', '山西,吕梁,方山', '111.244098', '37.894631', 1); +INSERT INTO `yx_system_city` VALUES (746, 98562, 2, 96064, '141129000000', '中阳县', '山西,吕梁,中阳', '111.179657', '37.357058', 1); +INSERT INTO `yx_system_city` VALUES (747, 98670, 2, 96064, '141130000000', '交口县', '山西,吕梁,交口', '111.181151', '36.982186', 1); +INSERT INTO `yx_system_city` VALUES (748, 98774, 2, 96064, '141181000000', '孝义市', '山西,吕梁,孝义', '111.778818', '37.146294', 1); +INSERT INTO `yx_system_city` VALUES (749, 99219, 2, 96064, '141182000000', '汾阳市', '山西,吕梁,汾阳', '111.769894', '37.261564', 1); +INSERT INTO `yx_system_city` VALUES (750, 99539, 2, 99538, '150101000000', '市辖区', '内蒙古,呼和浩特', '111.749180', '40.842585', 1); +INSERT INTO `yx_system_city` VALUES (751, 99540, 2, 99538, '150102000000', '新城区', '内蒙古,呼和浩特,新城', '111.665544', '40.858289', 1); +INSERT INTO `yx_system_city` VALUES (752, 99624, 2, 99538, '150103000000', '回民区', '内蒙古,呼和浩特,回民', '111.623692', '40.808608', 1); +INSERT INTO `yx_system_city` VALUES (753, 99696, 2, 99538, '150104000000', '玉泉区', '内蒙古,呼和浩特,玉泉', '111.673881', '40.753655', 1); +INSERT INTO `yx_system_city` VALUES (754, 99807, 2, 99538, '150105000000', '赛罕区', '内蒙古,呼和浩特,赛罕', '111.701857', '40.792097', 1); +INSERT INTO `yx_system_city` VALUES (755, 100011, 2, 99538, '150121000000', '土默特左旗', '内蒙古,呼和浩特,土默特左旗', '111.163902', '40.729573', 1); +INSERT INTO `yx_system_city` VALUES (756, 100358, 2, 99538, '150122000000', '托克托县', '内蒙古,呼和浩特,托克托', '111.194313', '40.277431', 1); +INSERT INTO `yx_system_city` VALUES (757, 100502, 2, 99538, '150123000000', '和林格尔县', '内蒙古,呼和浩特,和林格尔', '111.821843', '40.378787', 1); +INSERT INTO `yx_system_city` VALUES (758, 100672, 2, 99538, '150124000000', '清水河县', '内蒙古,呼和浩特,清水河', '111.647609', '39.921095', 1); +INSERT INTO `yx_system_city` VALUES (759, 100790, 2, 99538, '150125000000', '武川县', '内蒙古,呼和浩特,武川', '111.451303', '41.096471', 1); +INSERT INTO `yx_system_city` VALUES (760, 100905, 2, 100904, '150201000000', '市辖区', '内蒙古,包头', '109.840347', '40.657449', 1); +INSERT INTO `yx_system_city` VALUES (761, 100906, 2, 100904, '150202000000', '东河区', '内蒙古,包头,东河', '110.044142', '40.575948', 1); +INSERT INTO `yx_system_city` VALUES (762, 101033, 2, 100904, '150203000000', '昆都仑区', '内蒙古,包头,昆都仑', '109.838178', '40.642236', 1); +INSERT INTO `yx_system_city` VALUES (763, 101148, 2, 100904, '150204000000', '青山区', '内蒙古,包头,青山', '109.901572', '40.643246', 1); +INSERT INTO `yx_system_city` VALUES (764, 101235, 2, 100904, '150205000000', '石拐区', '内蒙古,包头,石拐', '110.060686', '40.676645', 1); +INSERT INTO `yx_system_city` VALUES (765, 101268, 2, 100904, '150206000000', '白云鄂博矿区', '内蒙古,包头,白云鄂博', '109.840347', '40.657449', 1); +INSERT INTO `yx_system_city` VALUES (766, 101275, 2, 100904, '150207000000', '九原区', '内蒙古,包头,九原', '109.968122', '40.600581', 1); +INSERT INTO `yx_system_city` VALUES (767, 101359, 2, 100904, '150221000000', '土默特右旗', '内蒙古,包头,土默特右旗', '110.524263', '40.569426', 1); +INSERT INTO `yx_system_city` VALUES (768, 101583, 2, 100904, '150222000000', '固阳县', '内蒙古,包头,固阳', '110.060514', '41.034106', 1); +INSERT INTO `yx_system_city` VALUES (769, 101673, 2, 100904, '150223000000', '达尔罕茂明安联合旗', '内蒙古,包头,达尔罕茂明安联合旗', '110.432626', '41.698992', 1); +INSERT INTO `yx_system_city` VALUES (770, 101773, 2, 101772, '150301000000', '市辖区', '内蒙古,乌海', '106.794249', '39.655388', 1); +INSERT INTO `yx_system_city` VALUES (771, 101774, 2, 101772, '150302000000', '海勃湾区', '内蒙古,乌海,海勃湾', '106.822779', '39.691156', 1); +INSERT INTO `yx_system_city` VALUES (772, 101824, 2, 101772, '150303000000', '海南区', '内蒙古,乌海,海南', '106.891424', '39.441364', 1); +INSERT INTO `yx_system_city` VALUES (773, 101850, 2, 101772, '150304000000', '乌达区', '内蒙古,乌海,乌达', '106.726099', '39.505925', 1); +INSERT INTO `yx_system_city` VALUES (774, 101885, 2, 101884, '150401000000', '市辖区', '内蒙古,赤峰', '118.886856', '42.257817', 1); +INSERT INTO `yx_system_city` VALUES (775, 101886, 2, 101884, '150402000000', '红山区', '内蒙古,赤峰,红山', '118.955528', '42.295818', 1); +INSERT INTO `yx_system_city` VALUES (776, 101986, 2, 101884, '150403000000', '元宝山区', '内蒙古,赤峰,元宝山', '119.288611', '42.038902', 1); +INSERT INTO `yx_system_city` VALUES (777, 102110, 2, 101884, '150404000000', '松山区', '内蒙古,赤峰,松山', '118.931962', '42.286873', 1); +INSERT INTO `yx_system_city` VALUES (778, 102434, 2, 101884, '150421000000', '阿鲁科尔沁旗', '内蒙古,赤峰,阿鲁科尔沁旗', '120.065700', '43.872299', 1); +INSERT INTO `yx_system_city` VALUES (779, 102714, 2, 101884, '150422000000', '巴林左旗', '内蒙古,赤峰,巴林左旗', '119.379490', '43.971126', 1); +INSERT INTO `yx_system_city` VALUES (780, 102913, 2, 101884, '150423000000', '巴林右旗', '内蒙古,赤峰,巴林右旗', '118.665180', '43.534414', 1); +INSERT INTO `yx_system_city` VALUES (781, 103097, 2, 101884, '150424000000', '林西县', '内蒙古,赤峰,林西', '118.055450', '43.618120', 1); +INSERT INTO `yx_system_city` VALUES (782, 103225, 2, 101884, '150425000000', '克什克腾旗', '内蒙古,赤峰,克什克腾旗', '117.545798', '43.264989', 1); +INSERT INTO `yx_system_city` VALUES (783, 103385, 2, 101884, '150426000000', '翁牛特旗', '内蒙古,赤峰,翁牛特旗', '119.006580', '42.936188', 1); +INSERT INTO `yx_system_city` VALUES (784, 103647, 2, 101884, '150428000000', '喀喇沁旗', '内蒙古,赤峰,喀喇沁旗', '118.701938', '41.927364', 1); +INSERT INTO `yx_system_city` VALUES (785, 103835, 2, 101884, '150429000000', '宁城县', '内蒙古,赤峰,宁城', '119.318876', '41.601375', 1); +INSERT INTO `yx_system_city` VALUES (786, 104189, 2, 101884, '150430000000', '敖汉旗', '内蒙古,赤峰,敖汉旗', '119.921604', '42.290782', 1); +INSERT INTO `yx_system_city` VALUES (787, 104458, 2, 104457, '150501000000', '市辖区', '内蒙古,通辽', '122.243444', '43.652890', 1); +INSERT INTO `yx_system_city` VALUES (788, 104459, 2, 104457, '150502000000', '科尔沁区', '内蒙古,通辽,科尔沁', '122.255675', '43.623077', 1); +INSERT INTO `yx_system_city` VALUES (789, 104954, 2, 104457, '150521000000', '科尔沁左翼中旗', '内蒙古,通辽,科尔沁左翼中旗', '123.312265', '44.126626', 1); +INSERT INTO `yx_system_city` VALUES (790, 105531, 2, 104457, '150522000000', '科尔沁左翼后旗', '内蒙古,通辽,科尔沁左翼后旗', '122.356749', '42.935159', 1); +INSERT INTO `yx_system_city` VALUES (791, 105865, 2, 104457, '150523000000', '开鲁县', '内蒙古,通辽,开鲁', '121.319309', '43.601244', 1); +INSERT INTO `yx_system_city` VALUES (792, 106150, 2, 104457, '150524000000', '库伦旗', '内蒙古,通辽,库伦旗', '121.810701', '42.735657', 1); +INSERT INTO `yx_system_city` VALUES (793, 106356, 2, 104457, '150525000000', '奈曼旗', '内蒙古,通辽,奈曼旗', '120.658283', '42.867226', 1); +INSERT INTO `yx_system_city` VALUES (794, 106746, 2, 104457, '150526000000', '扎鲁特旗', '内蒙古,通辽,扎鲁特旗', '120.911676', '44.556389', 1); +INSERT INTO `yx_system_city` VALUES (795, 107028, 2, 104457, '150581000000', '霍林郭勒市', '内蒙古,通辽,霍林郭勒', '119.663534', '45.531726', 1); +INSERT INTO `yx_system_city` VALUES (796, 107066, 2, 107065, '150601000000', '市辖区', '内蒙古,鄂尔多斯', '109.781327', '39.608266', 1); +INSERT INTO `yx_system_city` VALUES (797, 107067, 2, 107065, '150602000000', '东胜区', '内蒙古,鄂尔多斯,东胜', '109.963339', '39.822507', 1); +INSERT INTO `yx_system_city` VALUES (798, 107193, 2, 107065, '150603000000', '康巴什区', '内蒙古,鄂尔多斯,康巴什', '109.999325', '39.809941', 1); +INSERT INTO `yx_system_city` VALUES (799, 107213, 2, 107065, '150621000000', '达拉特旗', '内蒙古,鄂尔多斯,达拉特旗', '110.033833', '40.412438', 1); +INSERT INTO `yx_system_city` VALUES (800, 107388, 2, 107065, '150622000000', '准格尔旗', '内蒙古,鄂尔多斯,准格尔旗', '111.240171', '39.864362', 1); +INSERT INTO `yx_system_city` VALUES (801, 107593, 2, 107065, '150623000000', '鄂托克前旗', '内蒙古,鄂尔多斯,鄂托克前旗', '107.477515', '38.182362', 1); +INSERT INTO `yx_system_city` VALUES (802, 107684, 2, 107065, '150624000000', '鄂托克旗', '内蒙古,鄂尔多斯,鄂托克旗', '107.976161', '39.089650', 1); +INSERT INTO `yx_system_city` VALUES (803, 107792, 2, 107065, '150625000000', '杭锦旗', '内蒙古,鄂尔多斯,杭锦旗', '108.736208', '39.833309', 1); +INSERT INTO `yx_system_city` VALUES (804, 107892, 2, 107065, '150626000000', '乌审旗', '内蒙古,鄂尔多斯,乌审旗', '108.817607', '38.604136', 1); +INSERT INTO `yx_system_city` VALUES (805, 107982, 2, 107065, '150627000000', '伊金霍洛旗', '内蒙古,鄂尔多斯,伊金霍洛旗', '109.747740', '39.564660', 1); +INSERT INTO `yx_system_city` VALUES (806, 108167, 2, 108166, '150701000000', '市辖区', '内蒙古,呼伦贝尔', '119.765744', '49.211574', 1); +INSERT INTO `yx_system_city` VALUES (807, 108168, 2, 108166, '150702000000', '海拉尔区', '内蒙古,呼伦贝尔,海拉尔', '119.736279', '49.212189', 1); +INSERT INTO `yx_system_city` VALUES (808, 108232, 2, 108166, '150703000000', '扎赉诺尔区', '内蒙古,呼伦贝尔,扎赉诺尔', '117.670248', '49.510375', 1); +INSERT INTO `yx_system_city` VALUES (809, 108260, 2, 108166, '150721000000', '阿荣旗', '内蒙古,呼伦贝尔,阿荣旗', '123.459050', '48.126585', 1); +INSERT INTO `yx_system_city` VALUES (810, 108483, 2, 108166, '150722000000', '莫力达瓦达斡尔族自治旗', '内蒙古,呼伦贝尔,莫力达瓦', '123.810423', '48.852112', 1); +INSERT INTO `yx_system_city` VALUES (811, 108785, 2, 108166, '150723000000', '鄂伦春自治旗', '内蒙古,呼伦贝尔,鄂伦春自治旗', '123.726201', '50.591842', 1); +INSERT INTO `yx_system_city` VALUES (812, 109030, 2, 108166, '150724000000', '鄂温克族自治旗', '内蒙古,呼伦贝尔,鄂温克族自治旗', '119.755213', '49.146588', 1); +INSERT INTO `yx_system_city` VALUES (813, 109113, 2, 108166, '150725000000', '陈巴尔虎旗', '内蒙古,呼伦贝尔,陈巴尔虎旗', '119.424026', '49.328916', 1); +INSERT INTO `yx_system_city` VALUES (814, 109205, 2, 108166, '150726000000', '新巴尔虎左旗', '内蒙古,呼伦贝尔,新巴尔虎左旗', '118.269820', '48.218241', 1); +INSERT INTO `yx_system_city` VALUES (815, 109281, 2, 108166, '150727000000', '新巴尔虎右旗', '内蒙古,呼伦贝尔,新巴尔虎右旗', '116.823690', '48.672101', 1); +INSERT INTO `yx_system_city` VALUES (816, 109355, 2, 108166, '150781000000', '满洲里市', '内蒙古,呼伦贝尔,满洲里', '117.378530', '49.597841', 1); +INSERT INTO `yx_system_city` VALUES (817, 109393, 2, 108166, '150782000000', '牙克石市', '内蒙古,呼伦贝尔,牙克石', '120.711770', '49.285568', 1); +INSERT INTO `yx_system_city` VALUES (818, 109490, 2, 108166, '150783000000', '扎兰屯市', '内蒙古,呼伦贝尔,扎兰屯', '122.737467', '48.013733', 1); +INSERT INTO `yx_system_city` VALUES (819, 109738, 2, 108166, '150784000000', '额尔古纳市', '内蒙古,呼伦贝尔,额尔古纳', '120.180506', '50.243102', 1); +INSERT INTO `yx_system_city` VALUES (820, 109813, 2, 108166, '150785000000', '根河市', '内蒙古,呼伦贝尔,根河', '121.520388', '50.780345', 1); +INSERT INTO `yx_system_city` VALUES (821, 109848, 2, 109847, '150801000000', '市辖区', '内蒙古,巴彦淖尔', '107.387657', '40.743213', 1); +INSERT INTO `yx_system_city` VALUES (822, 109849, 2, 109847, '150802000000', '临河区', '内蒙古,巴彦淖尔,临河', '107.363919', '40.751187', 1); +INSERT INTO `yx_system_city` VALUES (823, 110095, 2, 109847, '150821000000', '五原县', '内蒙古,巴彦淖尔,五原', '108.267562', '41.088422', 1); +INSERT INTO `yx_system_city` VALUES (824, 110255, 2, 109847, '150822000000', '磴口县', '内蒙古,巴彦淖尔,磴口', '107.008248', '40.330524', 1); +INSERT INTO `yx_system_city` VALUES (825, 110372, 2, 109847, '150823000000', '乌拉特前旗', '内蒙古,巴彦淖尔,乌拉特前旗', '108.652119', '40.737030', 1); +INSERT INTO `yx_system_city` VALUES (826, 110557, 2, 109847, '150824000000', '乌拉特中旗', '内蒙古,巴彦淖尔,乌拉特中旗', '108.513645', '41.587732', 1); +INSERT INTO `yx_system_city` VALUES (827, 110676, 2, 109847, '150825000000', '乌拉特后旗', '内蒙古,巴彦淖尔,乌拉特后旗', '107.074621', '41.084283', 1); +INSERT INTO `yx_system_city` VALUES (828, 110743, 2, 109847, '150826000000', '杭锦后旗', '内蒙古,巴彦淖尔,杭锦后旗', '107.150909', '40.885896', 1); +INSERT INTO `yx_system_city` VALUES (829, 110890, 2, 110889, '150901000000', '市辖区', '内蒙古,乌兰察布', '113.132585', '40.994785', 1); +INSERT INTO `yx_system_city` VALUES (830, 110891, 2, 110889, '150902000000', '集宁区', '内蒙古,乌兰察布,集宁', '113.123779', '40.990689', 1); +INSERT INTO `yx_system_city` VALUES (831, 110998, 2, 110889, '150921000000', '卓资县', '内蒙古,乌兰察布,卓资', '112.577528', '40.894692', 1); +INSERT INTO `yx_system_city` VALUES (832, 111127, 2, 110889, '150922000000', '化德县', '内蒙古,乌兰察布,化德', '114.010438', '41.904560', 1); +INSERT INTO `yx_system_city` VALUES (833, 111237, 2, 110889, '150923000000', '商都县', '内蒙古,乌兰察布,商都', '113.577816', '41.562113', 1); +INSERT INTO `yx_system_city` VALUES (834, 111481, 2, 110889, '150924000000', '兴和县', '内蒙古,乌兰察布,兴和', '113.834173', '40.872301', 1); +INSERT INTO `yx_system_city` VALUES (835, 111666, 2, 110889, '150925000000', '凉城县', '内蒙古,乌兰察布,凉城', '112.503971', '40.531555', 1); +INSERT INTO `yx_system_city` VALUES (836, 111824, 2, 110889, '150926000000', '察哈尔右翼前旗', '内蒙古,乌兰察布,察哈尔右翼前旗', '113.214733', '40.785631', 1); +INSERT INTO `yx_system_city` VALUES (837, 111969, 2, 110889, '150927000000', '察哈尔右翼中旗', '内蒙古,乌兰察布,察哈尔右翼中旗', '112.635577', '41.277462', 1); +INSERT INTO `yx_system_city` VALUES (838, 112164, 2, 110889, '150928000000', '察哈尔右翼后旗', '内蒙古,乌兰察布,察哈尔右翼后旗', '113.191035', '41.436069', 1); +INSERT INTO `yx_system_city` VALUES (839, 112277, 2, 110889, '150929000000', '四子王旗', '内蒙古,乌兰察布,四子王旗', '111.706618', '41.533462', 1); +INSERT INTO `yx_system_city` VALUES (840, 112427, 2, 110889, '150981000000', '丰镇市', '内蒙古,乌兰察布,丰镇', '113.109892', '40.436983', 1); +INSERT INTO `yx_system_city` VALUES (841, 112553, 2, 112552, '152201000000', '乌兰浩特市', '内蒙古,兴安,乌兰浩特', '122.093123', '46.072732', 1); +INSERT INTO `yx_system_city` VALUES (842, 112694, 2, 112552, '152202000000', '阿尔山市', '内蒙古,兴安,阿尔山', '119.943575', '47.177440', 1); +INSERT INTO `yx_system_city` VALUES (843, 112734, 2, 112552, '152221000000', '科尔沁右翼前旗', '内蒙古,兴安,科尔沁右翼前旗', '121.952550', '46.079810', 1); +INSERT INTO `yx_system_city` VALUES (844, 113051, 2, 112552, '152222000000', '科尔沁右翼中旗', '内蒙古,兴安,科尔沁右翼中旗', '121.476530', '45.060837', 1); +INSERT INTO `yx_system_city` VALUES (845, 113294, 2, 112552, '152223000000', '扎赉特旗', '内蒙古,兴安,扎赉特旗', '122.899656', '46.723237', 1); +INSERT INTO `yx_system_city` VALUES (846, 113554, 2, 112552, '152224000000', '突泉县', '内蒙古,兴安,突泉', '121.593799', '45.381930', 1); +INSERT INTO `yx_system_city` VALUES (847, 113778, 2, 113777, '152501000000', '二连浩特市', '内蒙古,锡林郭勒,二连浩特', '111.977943', '43.653170', 1); +INSERT INTO `yx_system_city` VALUES (848, 113796, 2, 113777, '152502000000', '锡林浩特市', '内蒙古,锡林郭勒,锡林浩特', '116.086032', '43.933411', 1); +INSERT INTO `yx_system_city` VALUES (849, 113912, 2, 113777, '152522000000', '阿巴嘎旗', '内蒙古,锡林郭勒,阿巴嘎旗', '114.950248', '44.022995', 1); +INSERT INTO `yx_system_city` VALUES (850, 113999, 2, 113777, '152523000000', '苏尼特左旗', '内蒙古,锡林郭勒,苏尼特左旗', '113.667248', '43.859880', 1); +INSERT INTO `yx_system_city` VALUES (851, 114065, 2, 113777, '152524000000', '苏尼特右旗', '内蒙古,锡林郭勒,苏尼特右旗', '112.641783', '42.742892', 1); +INSERT INTO `yx_system_city` VALUES (852, 114152, 2, 113777, '152525000000', '东乌珠穆沁旗', '内蒙古,锡林郭勒,东乌珠穆沁旗', '116.974494', '45.498221', 1); +INSERT INTO `yx_system_city` VALUES (853, 114239, 2, 113777, '152526000000', '西乌珠穆沁旗', '内蒙古,锡林郭勒,西乌珠穆沁旗', '117.608911', '44.587882', 1); +INSERT INTO `yx_system_city` VALUES (854, 114358, 2, 113777, '152527000000', '太仆寺旗', '内蒙古,锡林郭勒,太仆寺旗', '115.282986', '41.877136', 1); +INSERT INTO `yx_system_city` VALUES (855, 114557, 2, 113777, '152528000000', '镶黄旗', '内蒙古,锡林郭勒,镶黄旗', '113.847287', '42.232371', 1); +INSERT INTO `yx_system_city` VALUES (856, 114628, 2, 113777, '152529000000', '正镶白旗', '内蒙古,锡林郭勒,正镶白旗', '115.029849', '42.287471', 1); +INSERT INTO `yx_system_city` VALUES (857, 114722, 2, 113777, '152530000000', '正蓝旗', '内蒙古,锡林郭勒,正蓝旗', '115.992470', '42.241638', 1); +INSERT INTO `yx_system_city` VALUES (858, 114859, 2, 113777, '152531000000', '多伦县', '内蒙古,锡林郭勒,多伦', '116.485556', '42.203591', 1); +INSERT INTO `yx_system_city` VALUES (859, 114941, 2, 114940, '152921000000', '阿拉善左旗', '内蒙古,阿拉善,阿拉善左旗', '105.666293', '38.833411', 1); +INSERT INTO `yx_system_city` VALUES (860, 115132, 2, 114940, '152922000000', '阿拉善右旗', '内蒙古,阿拉善,阿拉善右旗', '101.666917', '39.216186', 1); +INSERT INTO `yx_system_city` VALUES (861, 115189, 2, 114940, '152923000000', '额济纳旗', '内蒙古,阿拉善,额济纳旗', '101.055590', '41.954347', 1); +INSERT INTO `yx_system_city` VALUES (862, 115226, 2, 115225, '210101000000', '市辖区', '辽宁,沈阳', '123.431474', '41.805698', 1); +INSERT INTO `yx_system_city` VALUES (863, 115227, 2, 115225, '210102000000', '和平区', '辽宁,沈阳,和平', '123.420382', '41.789809', 1); +INSERT INTO `yx_system_city` VALUES (864, 115347, 2, 115225, '210103000000', '沈河区', '辽宁,沈阳,沈河', '123.458897', '41.795655', 1); +INSERT INTO `yx_system_city` VALUES (865, 115474, 2, 115225, '210104000000', '大东区', '辽宁,沈阳,大东', '123.469949', '41.805137', 1); +INSERT INTO `yx_system_city` VALUES (866, 115612, 2, 115225, '210105000000', '皇姑区', '辽宁,沈阳,皇姑', '123.441970', '41.824796', 1); +INSERT INTO `yx_system_city` VALUES (867, 115752, 2, 115225, '210106000000', '铁西区', '辽宁,沈阳,铁西', '123.376301', '41.802914', 1); +INSERT INTO `yx_system_city` VALUES (868, 115964, 2, 115225, '210111000000', '苏家屯区', '辽宁,沈阳,苏家屯', '123.344031', '41.664757', 1); +INSERT INTO `yx_system_city` VALUES (869, 116159, 2, 115225, '210112000000', '浑南区', '辽宁,沈阳,浑南', '123.449715', '41.714914', 1); +INSERT INTO `yx_system_city` VALUES (870, 116399, 2, 115225, '210113000000', '沈北新区', '辽宁,沈阳,沈北', '123.431474', '41.805698', 1); +INSERT INTO `yx_system_city` VALUES (871, 116614, 2, 115225, '210114000000', '于洪区', '辽宁,沈阳,于洪', '123.308136', '41.793743', 1); +INSERT INTO `yx_system_city` VALUES (872, 116820, 2, 115225, '210115000000', '辽中区', '辽宁,沈阳,辽中', '122.765409', '41.516827', 1); +INSERT INTO `yx_system_city` VALUES (873, 117075, 2, 115225, '210123000000', '康平县', '辽宁,沈阳,康平', '123.355701', '42.741005', 1); +INSERT INTO `yx_system_city` VALUES (874, 117268, 2, 115225, '210124000000', '法库县', '辽宁,沈阳,法库', '123.440495', '42.500730', 1); +INSERT INTO `yx_system_city` VALUES (875, 117530, 2, 115225, '210181000000', '新民市', '辽宁,沈阳,新民', '122.836726', '41.985193', 1); +INSERT INTO `yx_system_city` VALUES (876, 117933, 2, 117932, '210201000000', '市辖区', '辽宁,大连', '121.614682', '38.914003', 1); +INSERT INTO `yx_system_city` VALUES (877, 117934, 2, 117932, '210202000000', '中山区', '辽宁,大连,中山', '121.644927', '38.918574', 1); +INSERT INTO `yx_system_city` VALUES (878, 117997, 2, 117932, '210203000000', '西岗区', '辽宁,大连,西岗', '121.612325', '38.914687', 1); +INSERT INTO `yx_system_city` VALUES (879, 118050, 2, 117932, '210204000000', '沙河口区', '辽宁,大连,沙河口', '121.594200', '38.904808', 1); +INSERT INTO `yx_system_city` VALUES (880, 118150, 2, 117932, '210211000000', '甘井子区', '辽宁,大连,甘井子', '121.525461', '38.953351', 1); +INSERT INTO `yx_system_city` VALUES (881, 118405, 2, 117932, '210212000000', '旅顺口区', '辽宁,大连,旅顺口', '121.261953', '38.851705', 1); +INSERT INTO `yx_system_city` VALUES (882, 118523, 2, 117932, '210213000000', '金州区', '辽宁,大连,金州', '121.782769', '39.050460', 1); +INSERT INTO `yx_system_city` VALUES (883, 118884, 2, 117932, '210214000000', '普兰店区', '辽宁,大连,普兰店', '121.970512', '39.401551', 1); +INSERT INTO `yx_system_city` VALUES (884, 119090, 2, 117932, '210224000000', '长海县', '辽宁,大连,长海', '122.588494', '39.272728', 1); +INSERT INTO `yx_system_city` VALUES (885, 119126, 2, 117932, '210281000000', '瓦房店市', '辽宁,大连,瓦房店', '121.979603', '39.627114', 1); +INSERT INTO `yx_system_city` VALUES (886, 119483, 2, 117932, '210283000000', '庄河市', '辽宁,大连,庄河', '122.967328', '39.680811', 1); +INSERT INTO `yx_system_city` VALUES (887, 119790, 2, 119789, '210301000000', '市辖区', '辽宁,鞍山', '122.994329', '41.108647', 1); +INSERT INTO `yx_system_city` VALUES (888, 119791, 2, 119789, '210302000000', '铁东区', '辽宁,鞍山,铁东', '122.991052', '41.089933', 1); +INSERT INTO `yx_system_city` VALUES (889, 119915, 2, 119789, '210303000000', '铁西区', '辽宁,鞍山,铁西', '122.969630', '41.119885', 1); +INSERT INTO `yx_system_city` VALUES (890, 120021, 2, 119789, '210304000000', '立山区', '辽宁,鞍山,立山', '123.029091', '41.150401', 1); +INSERT INTO `yx_system_city` VALUES (891, 120150, 2, 119789, '210311000000', '千山区', '辽宁,鞍山,千山', '122.949298', '41.068909', 1); +INSERT INTO `yx_system_city` VALUES (892, 120221, 2, 119789, '210321000000', '台安县', '辽宁,鞍山,台安', '122.436196', '41.412768', 1); +INSERT INTO `yx_system_city` VALUES (893, 120401, 2, 119789, '210323000000', '岫岩满族自治县', '辽宁,鞍山,岫岩', '123.280935', '40.290880', 1); +INSERT INTO `yx_system_city` VALUES (894, 120634, 2, 119789, '210381000000', '海城市', '辽宁,鞍山,海城', '122.685217', '40.882377', 1); +INSERT INTO `yx_system_city` VALUES (895, 121082, 2, 121081, '210401000000', '市辖区', '辽宁,抚顺', '123.957208', '41.880872', 1); +INSERT INTO `yx_system_city` VALUES (896, 121083, 2, 121081, '210402000000', '新抚区', '辽宁,抚顺,新抚', '123.912861', '41.862080', 1); +INSERT INTO `yx_system_city` VALUES (897, 121181, 2, 121081, '210403000000', '东洲区', '辽宁,抚顺,东洲', '124.038685', '41.853192', 1); +INSERT INTO `yx_system_city` VALUES (898, 121326, 2, 121081, '210404000000', '望花区', '辽宁,抚顺,望花', '123.784206', '41.853646', 1); +INSERT INTO `yx_system_city` VALUES (899, 121484, 2, 121081, '210411000000', '顺城区', '辽宁,抚顺,顺城', '123.945040', '41.883375', 1); +INSERT INTO `yx_system_city` VALUES (900, 121604, 2, 121081, '210421000000', '抚顺县', '辽宁,抚顺,抚顺', '124.097979', '41.922644', 1); +INSERT INTO `yx_system_city` VALUES (901, 121710, 2, 121081, '210422000000', '新宾满族自治县', '辽宁,抚顺,新宾', '125.039978', '41.734256', 1); +INSERT INTO `yx_system_city` VALUES (902, 121920, 2, 121081, '210423000000', '清原满族自治县', '辽宁,抚顺,清原', '124.924083', '42.100539', 1); +INSERT INTO `yx_system_city` VALUES (903, 122143, 2, 122142, '210501000000', '市辖区', '辽宁,本溪', '123.766485', '41.294175', 1); +INSERT INTO `yx_system_city` VALUES (904, 122144, 2, 122142, '210502000000', '平山区', '辽宁,本溪,平山', '123.768926', '41.299702', 1); +INSERT INTO `yx_system_city` VALUES (905, 122216, 2, 122142, '210503000000', '溪湖区', '辽宁,本溪,溪湖', '123.767647', '41.329219', 1); +INSERT INTO `yx_system_city` VALUES (906, 122310, 2, 122142, '210504000000', '明山区', '辽宁,本溪,明山', '123.817212', '41.308710', 1); +INSERT INTO `yx_system_city` VALUES (907, 122400, 2, 122142, '210505000000', '南芬区', '辽宁,本溪,南芬', '123.744802', '41.100445', 1); +INSERT INTO `yx_system_city` VALUES (908, 122444, 2, 122142, '210521000000', '本溪满族自治县', '辽宁,本溪,本溪', '124.120436', '41.301892', 1); +INSERT INTO `yx_system_city` VALUES (909, 122591, 2, 122142, '210522000000', '桓仁满族自治县', '辽宁,本溪,桓仁', '125.361007', '41.267128', 1); +INSERT INTO `yx_system_city` VALUES (910, 122731, 2, 122730, '210601000000', '市辖区', '辽宁,丹东', '124.354706', '40.000499', 1); +INSERT INTO `yx_system_city` VALUES (911, 122732, 2, 122730, '210602000000', '元宝区', '辽宁,丹东,元宝', '124.395757', '40.136520', 1); +INSERT INTO `yx_system_city` VALUES (912, 122785, 2, 122730, '210603000000', '振兴区', '辽宁,丹东,振兴', '124.360264', '40.105194', 1); +INSERT INTO `yx_system_city` VALUES (913, 122886, 2, 122730, '210604000000', '振安区', '辽宁,丹东,振安', '124.428162', '40.158267', 1); +INSERT INTO `yx_system_city` VALUES (914, 122958, 2, 122730, '210624000000', '宽甸满族自治县', '辽宁,丹东,宽甸', '124.783660', '40.731317', 1); +INSERT INTO `yx_system_city` VALUES (915, 123177, 2, 122730, '210681000000', '东港市', '辽宁,丹东,东港', '124.152705', '39.863008', 1); +INSERT INTO `yx_system_city` VALUES (916, 123438, 2, 122730, '210682000000', '凤城市', '辽宁,丹东,凤城', '124.066919', '40.452298', 1); +INSERT INTO `yx_system_city` VALUES (917, 123699, 2, 123698, '210701000000', '市辖区', '辽宁,锦州', '121.127003', '41.095119', 1); +INSERT INTO `yx_system_city` VALUES (918, 123700, 2, 123698, '210702000000', '古塔区', '辽宁,锦州,古塔', '121.128279', '41.117245', 1); +INSERT INTO `yx_system_city` VALUES (919, 123778, 2, 123698, '210703000000', '凌河区', '辽宁,锦州,凌河', '121.150877', '41.114990', 1); +INSERT INTO `yx_system_city` VALUES (920, 123869, 2, 123698, '210711000000', '太和区', '辽宁,锦州,太和', '121.103892', '41.109147', 1); +INSERT INTO `yx_system_city` VALUES (921, 124044, 2, 123698, '210726000000', '黑山县', '辽宁,锦州,黑山', '122.123443', '41.666028', 1); +INSERT INTO `yx_system_city` VALUES (922, 124398, 2, 123698, '210727000000', '义县', '辽宁,锦州,义县', '121.239080', '41.533087', 1); +INSERT INTO `yx_system_city` VALUES (923, 124670, 2, 123698, '210781000000', '凌海市', '辽宁,锦州,凌海', '121.357730', '41.173400', 1); +INSERT INTO `yx_system_city` VALUES (924, 124980, 2, 123698, '210782000000', '北镇市', '辽宁,锦州,北镇', '121.795962', '41.598764', 1); +INSERT INTO `yx_system_city` VALUES (925, 125250, 2, 125249, '210801000000', '市辖区', '辽宁,营口', '122.235417', '40.667012', 1); +INSERT INTO `yx_system_city` VALUES (926, 125251, 2, 125249, '210802000000', '站前区', '辽宁,营口,站前', '122.258961', '40.672670', 1); +INSERT INTO `yx_system_city` VALUES (927, 125305, 2, 125249, '210803000000', '西市区', '辽宁,营口,西市', '122.206414', '40.666408', 1); +INSERT INTO `yx_system_city` VALUES (928, 125353, 2, 125249, '210804000000', '鲅鱼圈区', '辽宁,营口,鲅鱼圈', '122.107814', '40.230636', 1); +INSERT INTO `yx_system_city` VALUES (929, 125454, 2, 125249, '210811000000', '老边区', '辽宁,营口,老边', '122.379967', '40.680303', 1); +INSERT INTO `yx_system_city` VALUES (930, 125520, 2, 125249, '210881000000', '盖州市', '辽宁,营口,盖州', '122.348936', '40.400611', 1); +INSERT INTO `yx_system_city` VALUES (931, 125849, 2, 125249, '210882000000', '大石桥市', '辽宁,营口,大石桥', '122.509131', '40.644622', 1); +INSERT INTO `yx_system_city` VALUES (932, 126157, 2, 126156, '210901000000', '市辖区', '辽宁,阜新', '121.670323', '42.021619', 1); +INSERT INTO `yx_system_city` VALUES (933, 126158, 2, 126156, '210902000000', '海州区', '辽宁,阜新,海州', '121.656255', '42.013242', 1); +INSERT INTO `yx_system_city` VALUES (934, 126236, 2, 126156, '210903000000', '新邱区', '辽宁,阜新,新邱', '121.792535', '42.087632', 1); +INSERT INTO `yx_system_city` VALUES (935, 126264, 2, 126156, '210904000000', '太平区', '辽宁,阜新,太平', '121.678512', '42.010600', 1); +INSERT INTO `yx_system_city` VALUES (936, 126314, 2, 126156, '210905000000', '清河门区', '辽宁,阜新,清河门', '121.416105', '41.783100', 1); +INSERT INTO `yx_system_city` VALUES (937, 126349, 2, 126156, '210911000000', '细河区', '辽宁,阜新,细河', '121.680540', '42.025495', 1); +INSERT INTO `yx_system_city` VALUES (938, 126417, 2, 126156, '210921000000', '阜新蒙古族自治县', '辽宁,阜新,阜新', '121.757901', '42.065175', 1); +INSERT INTO `yx_system_city` VALUES (939, 126845, 2, 126156, '210922000000', '彰武县', '辽宁,阜新,彰武', '122.538793', '42.386544', 1); +INSERT INTO `yx_system_city` VALUES (940, 127071, 2, 127070, '211001000000', '市辖区', '辽宁,辽阳', '123.236944', '41.267244', 1); +INSERT INTO `yx_system_city` VALUES (941, 127072, 2, 127070, '211002000000', '白塔区', '辽宁,辽阳,白塔', '123.174325', '41.270347', 1); +INSERT INTO `yx_system_city` VALUES (942, 127152, 2, 127070, '211003000000', '文圣区', '辽宁,辽阳,文圣', '123.185386', '41.262608', 1); +INSERT INTO `yx_system_city` VALUES (943, 127218, 2, 127070, '211004000000', '宏伟区', '辽宁,辽阳,宏伟', '123.196672', '41.217649', 1); +INSERT INTO `yx_system_city` VALUES (944, 127266, 2, 127070, '211005000000', '弓长岭区', '辽宁,辽阳,弓长岭', '123.419804', '41.151847', 1); +INSERT INTO `yx_system_city` VALUES (945, 127305, 2, 127070, '211011000000', '太子河区', '辽宁,辽阳,太子河', '123.181782', '41.253277', 1); +INSERT INTO `yx_system_city` VALUES (946, 127386, 2, 127070, '211021000000', '辽阳县', '辽宁,辽阳,辽阳', '123.105695', '41.205329', 1); +INSERT INTO `yx_system_city` VALUES (947, 127612, 2, 127070, '211081000000', '灯塔市', '辽宁,辽阳,灯塔', '123.339312', '41.426372', 1); +INSERT INTO `yx_system_city` VALUES (948, 127835, 2, 127834, '211101000000', '市辖区', '辽宁,盘锦', '122.070714', '41.119997', 1); +INSERT INTO `yx_system_city` VALUES (949, 127836, 2, 127834, '211102000000', '双台子区', '辽宁,盘锦,双台子', '122.060112', '41.190606', 1); +INSERT INTO `yx_system_city` VALUES (950, 127896, 2, 127834, '211103000000', '兴隆台区', '辽宁,盘锦,兴隆台', '122.069897', '41.158678', 1); +INSERT INTO `yx_system_city` VALUES (951, 128037, 2, 127834, '211104000000', '大洼区', '辽宁,盘锦,大洼', '122.082575', '41.002279', 1); +INSERT INTO `yx_system_city` VALUES (952, 128231, 2, 127834, '211122000000', '盘山县', '辽宁,盘锦,盘山', '121.996499', '41.242873', 1); +INSERT INTO `yx_system_city` VALUES (953, 128422, 2, 128421, '211201000000', '市辖区', '辽宁,铁岭', '123.726166', '42.223769', 1); +INSERT INTO `yx_system_city` VALUES (954, 128423, 2, 128421, '211202000000', '银州区', '辽宁,铁岭,银州', '123.842305', '42.286130', 1); +INSERT INTO `yx_system_city` VALUES (955, 128530, 2, 128421, '211204000000', '清河区', '辽宁,铁岭,清河', '123.726166', '42.223769', 1); +INSERT INTO `yx_system_city` VALUES (956, 128591, 2, 128421, '211221000000', '铁岭县', '辽宁,铁岭,铁岭', '123.729004', '42.223383', 1); +INSERT INTO `yx_system_city` VALUES (957, 128839, 2, 128421, '211223000000', '西丰县', '辽宁,铁岭,西丰', '124.727393', '42.738030', 1); +INSERT INTO `yx_system_city` VALUES (958, 129043, 2, 128421, '211224000000', '昌图县', '辽宁,铁岭,昌图', '124.111100', '42.785791', 1); +INSERT INTO `yx_system_city` VALUES (959, 129592, 2, 128421, '211281000000', '调兵山市', '辽宁,铁岭,调兵山', '123.567117', '42.467521', 1); +INSERT INTO `yx_system_city` VALUES (960, 129661, 2, 128421, '211282000000', '开原市', '辽宁,铁岭,开原', '124.038268', '42.546307', 1); +INSERT INTO `yx_system_city` VALUES (961, 129978, 2, 129977, '211301000000', '市辖区', '辽宁,朝阳', '120.389862', '41.497767', 1); +INSERT INTO `yx_system_city` VALUES (962, 129979, 2, 129977, '211302000000', '双塔区', '辽宁,朝阳,双塔', '120.453744', '41.565628', 1); +INSERT INTO `yx_system_city` VALUES (963, 130102, 2, 129977, '211303000000', '龙城区', '辽宁,朝阳,龙城', '120.413376', '41.576749', 1); +INSERT INTO `yx_system_city` VALUES (964, 130205, 2, 129977, '211321000000', '朝阳县', '辽宁,朝阳,朝阳', '120.389862', '41.497767', 1); +INSERT INTO `yx_system_city` VALUES (965, 130534, 2, 129977, '211322000000', '建平县', '辽宁,朝阳,建平', '119.643280', '41.403128', 1); +INSERT INTO `yx_system_city` VALUES (966, 130860, 2, 129977, '211324000000', '喀喇沁左翼蒙古族自治县', '辽宁,朝阳,喀喇沁左翼', '120.389862', '41.497767', 1); +INSERT INTO `yx_system_city` VALUES (967, 131089, 2, 129977, '211381000000', '北票市', '辽宁,朝阳,北票', '120.770730', '41.800684', 1); +INSERT INTO `yx_system_city` VALUES (968, 131425, 2, 129977, '211382000000', '凌源市', '辽宁,朝阳,凌源', '119.401574', '41.245445', 1); +INSERT INTO `yx_system_city` VALUES (969, 131739, 2, 131738, '211401000000', '市辖区', '辽宁,葫芦岛', '120.836932', '40.711052', 1); +INSERT INTO `yx_system_city` VALUES (970, 131740, 2, 131738, '211402000000', '连山区', '辽宁,葫芦岛,连山', '120.869231', '40.774461', 1); +INSERT INTO `yx_system_city` VALUES (971, 131976, 2, 131738, '211403000000', '龙港区', '辽宁,葫芦岛,龙港', '120.893786', '40.735519', 1); +INSERT INTO `yx_system_city` VALUES (972, 132073, 2, 131738, '211404000000', '南票区', '辽宁,葫芦岛,南票', '120.749728', '41.107108', 1); +INSERT INTO `yx_system_city` VALUES (973, 132258, 2, 131738, '211421000000', '绥中县', '辽宁,葫芦岛,绥中', '120.344229', '40.325659', 1); +INSERT INTO `yx_system_city` VALUES (974, 132590, 2, 131738, '211422000000', '建昌县', '辽宁,葫芦岛,建昌', '119.837124', '40.824368', 1); +INSERT INTO `yx_system_city` VALUES (975, 132912, 2, 131738, '211481000000', '兴城市', '辽宁,葫芦岛,兴城', '120.728310', '40.614762', 1); +INSERT INTO `yx_system_city` VALUES (976, 133210, 2, 133209, '220101000000', '市辖区', '吉林,长春', '125.323544', '43.817071', 1); +INSERT INTO `yx_system_city` VALUES (977, 133211, 2, 133209, '220102000000', '南关区', '吉林,长春,南关', '125.350173', '43.863989', 1); +INSERT INTO `yx_system_city` VALUES (978, 133289, 2, 133209, '220103000000', '宽城区', '吉林,长春,宽城', '125.326578', '43.943614', 1); +INSERT INTO `yx_system_city` VALUES (979, 133453, 2, 133209, '220104000000', '朝阳区', '吉林,长春,朝阳', '125.288319', '43.833513', 1); +INSERT INTO `yx_system_city` VALUES (980, 133543, 2, 133209, '220105000000', '二道区', '吉林,长春,二道', '125.374217', '43.865596', 1); +INSERT INTO `yx_system_city` VALUES (981, 133631, 2, 133209, '220106000000', '绿园区', '吉林,长春,绿园', '125.256136', '43.880975', 1); +INSERT INTO `yx_system_city` VALUES (982, 133719, 2, 133209, '220112000000', '双阳区', '吉林,长春,双阳', '125.664662', '43.525311', 1); +INSERT INTO `yx_system_city` VALUES (983, 133881, 2, 133209, '220113000000', '九台区', '吉林,长春,九台', '125.839574', '44.151742', 1); +INSERT INTO `yx_system_city` VALUES (984, 134236, 2, 133209, '220122000000', '农安县', '吉林,长春,农安', '125.184742', '44.432889', 1); +INSERT INTO `yx_system_city` VALUES (985, 134628, 2, 133209, '220182000000', '榆树市', '吉林,长春,榆树', '126.533146', '44.840288', 1); +INSERT INTO `yx_system_city` VALUES (986, 135061, 2, 133209, '220183000000', '德惠市', '吉林,长春,德惠', '125.728620', '44.521785', 1); +INSERT INTO `yx_system_city` VALUES (987, 135393, 2, 135392, '220201000000', '市辖区', '吉林,吉林', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (988, 135394, 2, 135392, '220202000000', '昌邑区', '吉林,吉林,昌邑', '126.574710', '43.881818', 1); +INSERT INTO `yx_system_city` VALUES (989, 135568, 2, 135392, '220203000000', '龙潭区', '吉林,吉林,龙潭', '126.562197', '43.910803', 1); +INSERT INTO `yx_system_city` VALUES (990, 135755, 2, 135392, '220204000000', '船营区', '吉林,吉林,船营', '126.540966', '43.833445', 1); +INSERT INTO `yx_system_city` VALUES (991, 135885, 2, 135392, '220211000000', '丰满区', '吉林,吉林,丰满', '126.562274', '43.821601', 1); +INSERT INTO `yx_system_city` VALUES (992, 135986, 2, 135392, '220221000000', '永吉县', '吉林,吉林,永吉', '126.497741', '43.672582', 1); +INSERT INTO `yx_system_city` VALUES (993, 136136, 2, 135392, '220281000000', '蛟河市', '吉林,吉林,蛟河', '127.344501', '43.723713', 1); +INSERT INTO `yx_system_city` VALUES (994, 136439, 2, 135392, '220282000000', '桦甸市', '吉林,吉林,桦甸', '126.746310', '42.972097', 1); +INSERT INTO `yx_system_city` VALUES (995, 136629, 2, 135392, '220283000000', '舒兰市', '吉林,吉林,舒兰', '126.965607', '44.406106', 1); +INSERT INTO `yx_system_city` VALUES (996, 136889, 2, 135392, '220284000000', '磐石市', '吉林,吉林,磐石', '126.060427', '42.946285', 1); +INSERT INTO `yx_system_city` VALUES (997, 137207, 2, 137206, '220301000000', '市辖区', '吉林,四平', '124.350398', '43.166419', 1); +INSERT INTO `yx_system_city` VALUES (998, 137208, 2, 137206, '220302000000', '铁西区', '吉林,四平,铁西', '124.345722', '43.146155', 1); +INSERT INTO `yx_system_city` VALUES (999, 137275, 2, 137206, '220303000000', '铁东区', '吉林,四平,铁东', '124.409622', '43.162048', 1); +INSERT INTO `yx_system_city` VALUES (1000, 137386, 2, 137206, '220322000000', '梨树县', '吉林,四平,梨树', '124.335390', '43.307060', 1); +INSERT INTO `yx_system_city` VALUES (1001, 137756, 2, 137206, '220323000000', '伊通满族自治县', '吉林,四平,伊通', '125.305394', '43.345754', 1); +INSERT INTO `yx_system_city` VALUES (1002, 137973, 2, 137206, '220381000000', '公主岭市', '吉林,四平,公主岭', '124.822830', '43.504687', 1); +INSERT INTO `yx_system_city` VALUES (1003, 138477, 2, 137206, '220382000000', '双辽市', '吉林,四平,双辽', '123.502724', '43.518302', 1); +INSERT INTO `yx_system_city` VALUES (1004, 138722, 2, 138721, '220401000000', '市辖区', '吉林,辽源', '125.143532', '42.887918', 1); +INSERT INTO `yx_system_city` VALUES (1005, 138723, 2, 138721, '220402000000', '龙山区', '吉林,辽源,龙山', '125.136452', '42.901534', 1); +INSERT INTO `yx_system_city` VALUES (1006, 138780, 2, 138721, '220403000000', '西安区', '吉林,辽源,西安', '125.149283', '42.927265', 1); +INSERT INTO `yx_system_city` VALUES (1007, 138818, 2, 138721, '220421000000', '东丰县', '吉林,辽源,东丰', '125.530991', '42.676935', 1); +INSERT INTO `yx_system_city` VALUES (1008, 139072, 2, 138721, '220422000000', '东辽县', '吉林,辽源,东辽', '124.991521', '42.926331', 1); +INSERT INTO `yx_system_city` VALUES (1009, 139341, 2, 139340, '220501000000', '市辖区', '吉林,通化', '125.939697', '41.728401', 1); +INSERT INTO `yx_system_city` VALUES (1010, 139342, 2, 139340, '220502000000', '东昌区', '吉林,通化,东昌', '125.955102', '41.728498', 1); +INSERT INTO `yx_system_city` VALUES (1011, 139405, 2, 139340, '220503000000', '二道江区', '吉林,通化,二道江', '126.042535', '41.774053', 1); +INSERT INTO `yx_system_city` VALUES (1012, 139453, 2, 139340, '220521000000', '通化县', '吉林,通化,通化', '125.759259', '41.679808', 1); +INSERT INTO `yx_system_city` VALUES (1013, 139654, 2, 139340, '220523000000', '辉南县', '吉林,通化,辉南', '126.046912', '42.684993', 1); +INSERT INTO `yx_system_city` VALUES (1014, 139824, 2, 139340, '220524000000', '柳河县', '吉林,通化,柳河', '125.744735', '42.284606', 1); +INSERT INTO `yx_system_city` VALUES (1015, 140077, 2, 139340, '220581000000', '梅河口市', '吉林,通化,梅河口', '125.683832', '42.530341', 1); +INSERT INTO `yx_system_city` VALUES (1016, 140432, 2, 139340, '220582000000', '集安市', '吉林,通化,集安', '126.194031', '41.125307', 1); +INSERT INTO `yx_system_city` VALUES (1017, 140602, 2, 140601, '220601000000', '市辖区', '吉林,白山', '126.423587', '41.939994', 1); +INSERT INTO `yx_system_city` VALUES (1018, 140603, 2, 140601, '220602000000', '浑江区', '吉林,白山,浑江', '126.416094', '41.945409', 1); +INSERT INTO `yx_system_city` VALUES (1019, 140714, 2, 140601, '220605000000', '江源区', '吉林,白山,江源', '126.591144', '42.056773', 1); +INSERT INTO `yx_system_city` VALUES (1020, 140816, 2, 140601, '220621000000', '抚松县', '吉林,白山,抚松', '127.449764', '42.221208', 1); +INSERT INTO `yx_system_city` VALUES (1021, 141003, 2, 140601, '220622000000', '靖宇县', '吉林,白山,靖宇', '126.813625', '42.388760', 1); +INSERT INTO `yx_system_city` VALUES (1022, 141140, 2, 140601, '220623000000', '长白朝鲜族自治县', '吉林,白山,长白', '128.200789', '41.420018', 1); +INSERT INTO `yx_system_city` VALUES (1023, 141237, 2, 140601, '220681000000', '临江市', '吉林,白山,临江', '126.918087', '41.811979', 1); +INSERT INTO `yx_system_city` VALUES (1024, 141362, 2, 141361, '220701000000', '市辖区', '吉林,松原', '124.825117', '45.141789', 1); +INSERT INTO `yx_system_city` VALUES (1025, 141363, 2, 141361, '220702000000', '宁江区', '吉林,松原,宁江', '124.817054', '45.171792', 1); +INSERT INTO `yx_system_city` VALUES (1026, 141560, 2, 141361, '220721000000', '前郭尔罗斯蒙古族自治县', '吉林,松原,前郭尔罗斯', '124.823242', '45.118030', 1); +INSERT INTO `yx_system_city` VALUES (1027, 141870, 2, 141361, '220722000000', '长岭县', '吉林,松原,长岭', '123.967484', '44.275895', 1); +INSERT INTO `yx_system_city` VALUES (1028, 142157, 2, 141361, '220723000000', '乾安县', '吉林,松原,乾安', '124.041139', '45.003774', 1); +INSERT INTO `yx_system_city` VALUES (1029, 142353, 2, 141361, '220781000000', '扶余市', '吉林,松原,扶余', '126.049774', '44.988449', 1); +INSERT INTO `yx_system_city` VALUES (1030, 142787, 2, 142786, '220801000000', '市辖区', '吉林,白城', '122.839024', '45.619641', 1); +INSERT INTO `yx_system_city` VALUES (1031, 142788, 2, 142786, '220802000000', '洮北区', '吉林,白城,洮北', '122.851029', '45.621716', 1); +INSERT INTO `yx_system_city` VALUES (1032, 143021, 2, 142786, '220821000000', '镇赉县', '吉林,白城,镇赉', '123.199890', '45.847435', 1); +INSERT INTO `yx_system_city` VALUES (1033, 143209, 2, 142786, '220822000000', '通榆县', '吉林,白城,通榆', '123.088239', '44.812911', 1); +INSERT INTO `yx_system_city` VALUES (1034, 143428, 2, 142786, '220881000000', '洮南市', '吉林,白城,洮南', '122.783779', '45.339113', 1); +INSERT INTO `yx_system_city` VALUES (1035, 143702, 2, 142786, '220882000000', '大安市', '吉林,白城,大安', '124.292626', '45.506996', 1); +INSERT INTO `yx_system_city` VALUES (1036, 143991, 2, 143990, '222401000000', '延吉市', '吉林,延边,延吉', '129.508946', '42.891255', 1); +INSERT INTO `yx_system_city` VALUES (1037, 144147, 2, 143990, '222402000000', '图们市', '吉林,延边,图们', '129.843710', '42.968044', 1); +INSERT INTO `yx_system_city` VALUES (1038, 144226, 2, 143990, '222403000000', '敦化市', '吉林,延边,敦化', '128.232013', '43.372413', 1); +INSERT INTO `yx_system_city` VALUES (1039, 144665, 2, 143990, '222404000000', '珲春市', '吉林,延边,珲春', '130.366036', '42.862821', 1); +INSERT INTO `yx_system_city` VALUES (1040, 144844, 2, 143990, '222405000000', '龙井市', '吉林,延边,龙井', '129.427066', '42.766311', 1); +INSERT INTO `yx_system_city` VALUES (1041, 144953, 2, 143990, '222406000000', '和龙市', '吉林,延边,和龙', '129.010106', '42.546675', 1); +INSERT INTO `yx_system_city` VALUES (1042, 145096, 2, 143990, '222424000000', '汪清县', '吉林,延边,汪清', '129.771607', '43.312522', 1); +INSERT INTO `yx_system_city` VALUES (1043, 145421, 2, 143990, '222426000000', '安图县', '吉林,延边,安图', '128.899807', '43.111964', 1); +INSERT INTO `yx_system_city` VALUES (1044, 145667, 2, 145666, '230101000000', '市辖区', '黑龙江,哈尔滨', '126.534967', '45.803775', 1); +INSERT INTO `yx_system_city` VALUES (1045, 145668, 2, 145666, '230102000000', '道里区', '黑龙江,哈尔滨,道里', '126.616957', '45.755777', 1); +INSERT INTO `yx_system_city` VALUES (1046, 145864, 2, 145666, '230103000000', '南岗区', '黑龙江,哈尔滨,南岗', '126.668788', '45.759970', 1); +INSERT INTO `yx_system_city` VALUES (1047, 146071, 2, 145666, '230104000000', '道外区', '黑龙江,哈尔滨,道外', '126.649451', '45.792113', 1); +INSERT INTO `yx_system_city` VALUES (1048, 146266, 2, 145666, '230108000000', '平房区', '黑龙江,哈尔滨,平房', '126.534967', '45.803775', 1); +INSERT INTO `yx_system_city` VALUES (1049, 146313, 2, 145666, '230109000000', '松北区', '黑龙江,哈尔滨,松北', '126.510275', '45.802756', 1); +INSERT INTO `yx_system_city` VALUES (1050, 146399, 2, 145666, '230110000000', '香坊区', '黑龙江,哈尔滨,香坊', '126.662593', '45.707716', 1); +INSERT INTO `yx_system_city` VALUES (1051, 146587, 2, 145666, '230111000000', '呼兰区', '黑龙江,哈尔滨,呼兰', '126.587709', '45.889427', 1); +INSERT INTO `yx_system_city` VALUES (1052, 146825, 2, 145666, '230112000000', '阿城区', '黑龙江,哈尔滨,阿城', '126.958098', '45.548670', 1); +INSERT INTO `yx_system_city` VALUES (1053, 147032, 2, 145666, '230113000000', '双城区', '黑龙江,哈尔滨,双城', '126.312745', '45.383263', 1); +INSERT INTO `yx_system_city` VALUES (1054, 147391, 2, 145666, '230123000000', '依兰县', '黑龙江,哈尔滨,依兰', '129.567985', '46.324534', 1); +INSERT INTO `yx_system_city` VALUES (1055, 147571, 2, 145666, '230124000000', '方正县', '黑龙江,哈尔滨,方正', '128.829536', '45.851695', 1); +INSERT INTO `yx_system_city` VALUES (1056, 147676, 2, 145666, '230125000000', '宾县', '黑龙江,哈尔滨,宾县', '127.466634', '45.745918', 1); +INSERT INTO `yx_system_city` VALUES (1057, 147884, 2, 145666, '230126000000', '巴彦县', '黑龙江,哈尔滨,巴彦', '127.403182', '46.085379', 1); +INSERT INTO `yx_system_city` VALUES (1058, 148060, 2, 145666, '230127000000', '木兰县', '黑龙江,哈尔滨,木兰', '128.043466', '45.950582', 1); +INSERT INTO `yx_system_city` VALUES (1059, 148178, 2, 145666, '230128000000', '通河县', '黑龙江,哈尔滨,通河', '128.749352', '45.972425', 1); +INSERT INTO `yx_system_city` VALUES (1060, 148351, 2, 145666, '230129000000', '延寿县', '黑龙江,哈尔滨,延寿', '128.331644', '45.451897', 1); +INSERT INTO `yx_system_city` VALUES (1061, 148502, 2, 145666, '230183000000', '尚志市', '黑龙江,哈尔滨,尚志', '128.009895', '45.209586', 1); +INSERT INTO `yx_system_city` VALUES (1062, 148755, 2, 145666, '230184000000', '五常市', '黑龙江,哈尔滨,五常', '127.167619', '44.931992', 1); +INSERT INTO `yx_system_city` VALUES (1063, 149080, 2, 149079, '230201000000', '市辖区', '黑龙江,齐齐哈尔', '123.918186', '47.354348', 1); +INSERT INTO `yx_system_city` VALUES (1064, 149081, 2, 149079, '230202000000', '龙沙区', '黑龙江,齐齐哈尔,龙沙', '123.957531', '47.317309', 1); +INSERT INTO `yx_system_city` VALUES (1065, 149129, 2, 149079, '230203000000', '建华区', '黑龙江,齐齐哈尔,建华', '123.955464', '47.354364', 1); +INSERT INTO `yx_system_city` VALUES (1066, 149173, 2, 149079, '230204000000', '铁锋区', '黑龙江,齐齐哈尔,铁锋', '123.978293', '47.340518', 1); +INSERT INTO `yx_system_city` VALUES (1067, 149231, 2, 149079, '230205000000', '昂昂溪区', '黑龙江,齐齐哈尔,昂昂溪', '123.822401', '47.155160', 1); +INSERT INTO `yx_system_city` VALUES (1068, 149266, 2, 149079, '230206000000', '富拉尔基区', '黑龙江,齐齐哈尔,富拉尔基', '123.629190', '47.208843', 1); +INSERT INTO `yx_system_city` VALUES (1069, 149317, 2, 149079, '230207000000', '碾子山区', '黑龙江,齐齐哈尔,碾子山', '122.887775', '47.516872', 1); +INSERT INTO `yx_system_city` VALUES (1070, 149338, 2, 149079, '230208000000', '梅里斯达斡尔族区', '黑龙江,齐齐哈尔,梅里斯', '123.752910', '47.309537', 1); +INSERT INTO `yx_system_city` VALUES (1071, 149404, 2, 149079, '230221000000', '龙江县', '黑龙江,齐齐哈尔,龙江', '123.205323', '47.338665', 1); +INSERT INTO `yx_system_city` VALUES (1072, 149588, 2, 149079, '230223000000', '依安县', '黑龙江,齐齐哈尔,依安', '125.306279', '47.893548', 1); +INSERT INTO `yx_system_city` VALUES (1073, 149767, 2, 149079, '230224000000', '泰来县', '黑龙江,齐齐哈尔,泰来', '123.416631', '46.393694', 1); +INSERT INTO `yx_system_city` VALUES (1074, 149896, 2, 149079, '230225000000', '甘南县', '黑龙江,齐齐哈尔,甘南', '123.507429', '47.922406', 1); +INSERT INTO `yx_system_city` VALUES (1075, 150046, 2, 149079, '230227000000', '富裕县', '黑龙江,齐齐哈尔,富裕', '124.473793', '47.774347', 1); +INSERT INTO `yx_system_city` VALUES (1076, 150168, 2, 149079, '230229000000', '克山县', '黑龙江,齐齐哈尔,克山', '125.875705', '48.037031', 1); +INSERT INTO `yx_system_city` VALUES (1077, 150337, 2, 149079, '230230000000', '克东县', '黑龙江,齐齐哈尔,克东', '126.248721', '48.042060', 1); +INSERT INTO `yx_system_city` VALUES (1078, 150471, 2, 149079, '230231000000', '拜泉县', '黑龙江,齐齐哈尔,拜泉', '126.100213', '47.595851', 1); +INSERT INTO `yx_system_city` VALUES (1079, 150680, 2, 149079, '230281000000', '讷河市', '黑龙江,齐齐哈尔,讷河', '124.884244', '48.484099', 1); +INSERT INTO `yx_system_city` VALUES (1080, 150916, 2, 150915, '230301000000', '市辖区', '黑龙江,鸡西', '130.969333', '45.295075', 1); +INSERT INTO `yx_system_city` VALUES (1081, 150917, 2, 150915, '230302000000', '鸡冠区', '黑龙江,鸡西,鸡冠', '130.980894', '45.304073', 1); +INSERT INTO `yx_system_city` VALUES (1082, 150984, 2, 150915, '230303000000', '恒山区', '黑龙江,鸡西,恒山', '130.904963', '45.210668', 1); +INSERT INTO `yx_system_city` VALUES (1083, 151039, 2, 150915, '230304000000', '滴道区', '黑龙江,鸡西,滴道', '130.843613', '45.348764', 1); +INSERT INTO `yx_system_city` VALUES (1084, 151084, 2, 150915, '230305000000', '梨树区', '黑龙江,鸡西,梨树', '130.696990', '45.092046', 1); +INSERT INTO `yx_system_city` VALUES (1085, 151113, 2, 150915, '230306000000', '城子河区', '黑龙江,鸡西,城子河', '131.011304', '45.336970', 1); +INSERT INTO `yx_system_city` VALUES (1086, 151154, 2, 150915, '230307000000', '麻山区', '黑龙江,鸡西,麻山', '130.478187', '45.212088', 1); +INSERT INTO `yx_system_city` VALUES (1087, 151177, 2, 150915, '230321000000', '鸡东县', '黑龙江,鸡西,鸡东', '131.124080', '45.260412', 1); +INSERT INTO `yx_system_city` VALUES (1088, 151347, 2, 150915, '230381000000', '虎林市', '黑龙江,鸡西,虎林', '132.937210', '45.762686', 1); +INSERT INTO `yx_system_city` VALUES (1089, 151577, 2, 150915, '230382000000', '密山市', '黑龙江,鸡西,密山', '131.846636', '45.529775', 1); +INSERT INTO `yx_system_city` VALUES (1090, 151831, 2, 151830, '230401000000', '市辖区', '黑龙江,鹤岗', '130.297964', '47.349916', 1); +INSERT INTO `yx_system_city` VALUES (1091, 151832, 2, 151830, '230402000000', '向阳区', '黑龙江,鹤岗,向阳', '130.294309', '47.342478', 1); +INSERT INTO `yx_system_city` VALUES (1092, 151855, 2, 151830, '230403000000', '工农区', '黑龙江,鹤岗,工农', '130.274684', '47.318781', 1); +INSERT INTO `yx_system_city` VALUES (1093, 151880, 2, 151830, '230404000000', '南山区', '黑龙江,鹤岗,南山', '130.287057', '47.315127', 1); +INSERT INTO `yx_system_city` VALUES (1094, 151912, 2, 151830, '230405000000', '兴安区', '黑龙江,鹤岗,兴安', '130.239245', '47.252850', 1); +INSERT INTO `yx_system_city` VALUES (1095, 151947, 2, 151830, '230406000000', '东山区', '黑龙江,鹤岗,东山', '130.317062', '47.338535', 1); +INSERT INTO `yx_system_city` VALUES (1096, 152026, 2, 151830, '230407000000', '兴山区', '黑龙江,鹤岗,兴山', '130.303574', '47.357666', 1); +INSERT INTO `yx_system_city` VALUES (1097, 152047, 2, 151830, '230421000000', '萝北县', '黑龙江,鹤岗,萝北', '130.828626', '47.577495', 1); +INSERT INTO `yx_system_city` VALUES (1098, 152237, 2, 151830, '230422000000', '绥滨县', '黑龙江,鹤岗,绥滨', '131.852759', '47.289116', 1); +INSERT INTO `yx_system_city` VALUES (1099, 152414, 2, 152413, '230501000000', '市辖区', '黑龙江,双鸭山', '131.159133', '46.646508', 1); +INSERT INTO `yx_system_city` VALUES (1100, 152415, 2, 152413, '230502000000', '尖山区', '黑龙江,双鸭山,尖山', '131.158416', '46.646350', 1); +INSERT INTO `yx_system_city` VALUES (1101, 152469, 2, 152413, '230503000000', '岭东区', '黑龙江,双鸭山,岭东', '131.164724', '46.592721', 1); +INSERT INTO `yx_system_city` VALUES (1102, 152508, 2, 152413, '230505000000', '四方台区', '黑龙江,双鸭山,四方台', '131.334503', '46.594316', 1); +INSERT INTO `yx_system_city` VALUES (1103, 152544, 2, 152413, '230506000000', '宝山区', '黑龙江,双鸭山,宝山', '131.401589', '46.577167', 1); +INSERT INTO `yx_system_city` VALUES (1104, 152590, 2, 152413, '230521000000', '集贤县', '黑龙江,双鸭山,集贤', '131.140483', '46.728377', 1); +INSERT INTO `yx_system_city` VALUES (1105, 152810, 2, 152413, '230522000000', '友谊县', '黑龙江,双鸭山,友谊', '131.808064', '46.767299', 1); +INSERT INTO `yx_system_city` VALUES (1106, 152910, 2, 152413, '230523000000', '宝清县', '黑龙江,双鸭山,宝清', '132.197243', '46.326925', 1); +INSERT INTO `yx_system_city` VALUES (1107, 153142, 2, 152413, '230524000000', '饶河县', '黑龙江,双鸭山,饶河', '134.013872', '46.798164', 1); +INSERT INTO `yx_system_city` VALUES (1108, 153314, 2, 153313, '230601000000', '市辖区', '黑龙江,大庆', '125.103784', '46.589309', 1); +INSERT INTO `yx_system_city` VALUES (1109, 153315, 2, 153313, '230602000000', '萨尔图区', '黑龙江,大庆,萨尔图', '125.114643', '46.596356', 1); +INSERT INTO `yx_system_city` VALUES (1110, 153371, 2, 153313, '230603000000', '龙凤区', '黑龙江,大庆,龙凤', '125.135326', '46.562247', 1); +INSERT INTO `yx_system_city` VALUES (1111, 153423, 2, 153313, '230604000000', '让胡路区', '黑龙江,大庆,让胡路', '124.870597', '46.652358', 1); +INSERT INTO `yx_system_city` VALUES (1112, 153513, 2, 153313, '230605000000', '红岗区', '黑龙江,大庆,红岗', '124.891039', '46.398418', 1); +INSERT INTO `yx_system_city` VALUES (1113, 153561, 2, 153313, '230606000000', '大同区', '黑龙江,大庆,大同', '124.812364', '46.039828', 1); +INSERT INTO `yx_system_city` VALUES (1114, 153659, 2, 153313, '230621000000', '肇州县', '黑龙江,大庆,肇州', '125.268643', '45.699066', 1); +INSERT INTO `yx_system_city` VALUES (1115, 153791, 2, 153313, '230622000000', '肇源县', '黑龙江,大庆,肇源', '125.078223', '45.519320', 1); +INSERT INTO `yx_system_city` VALUES (1116, 153974, 2, 153313, '230623000000', '林甸县', '黑龙江,大庆,林甸', '124.863603', '47.171717', 1); +INSERT INTO `yx_system_city` VALUES (1117, 154082, 2, 153313, '230624000000', '杜尔伯特蒙古族自治县', '黑龙江,大庆,杜尔伯特', '124.446705', '46.866580', 1); +INSERT INTO `yx_system_city` VALUES (1118, 154202, 2, 154201, '230701000000', '市辖区', '黑龙江,伊春', '128.841147', '47.727536', 1); +INSERT INTO `yx_system_city` VALUES (1119, 154203, 2, 154201, '230702000000', '伊春区', '黑龙江,伊春,伊春', '128.907303', '47.728171', 1); +INSERT INTO `yx_system_city` VALUES (1120, 154252, 2, 154201, '230703000000', '南岔区', '黑龙江,伊春,南岔', '129.283467', '47.138035', 1); +INSERT INTO `yx_system_city` VALUES (1121, 154342, 2, 154201, '230704000000', '友好区', '黑龙江,伊春,友好', '128.840750', '47.853778', 1); +INSERT INTO `yx_system_city` VALUES (1122, 154389, 2, 154201, '230705000000', '西林区', '黑龙江,伊春,西林', '129.312851', '47.480735', 1); +INSERT INTO `yx_system_city` VALUES (1123, 154404, 2, 154201, '230706000000', '翠峦区', '黑龙江,伊春,翠峦', '128.669859', '47.726728', 1); +INSERT INTO `yx_system_city` VALUES (1124, 154434, 2, 154201, '230707000000', '新青区', '黑龙江,伊春,新青', '129.533600', '48.290455', 1); +INSERT INTO `yx_system_city` VALUES (1125, 154473, 2, 154201, '230708000000', '美溪区', '黑龙江,伊春,美溪', '129.129314', '47.635090', 1); +INSERT INTO `yx_system_city` VALUES (1126, 154511, 2, 154201, '230709000000', '金山屯区', '黑龙江,伊春,金山屯', '129.429117', '47.413074', 1); +INSERT INTO `yx_system_city` VALUES (1127, 154547, 2, 154201, '230710000000', '五营区', '黑龙江,伊春,五营', '129.245344', '48.107910', 1); +INSERT INTO `yx_system_city` VALUES (1128, 154579, 2, 154201, '230711000000', '乌马河区', '黑龙江,伊春,乌马河', '128.799478', '47.727687', 1); +INSERT INTO `yx_system_city` VALUES (1129, 154616, 2, 154201, '230712000000', '汤旺河区', '黑龙江,伊春,汤旺河', '129.571108', '48.454651', 1); +INSERT INTO `yx_system_city` VALUES (1130, 154659, 2, 154201, '230713000000', '带岭区', '黑龙江,伊春,带岭', '129.020793', '47.028397', 1); +INSERT INTO `yx_system_city` VALUES (1131, 154695, 2, 154201, '230714000000', '乌伊岭区', '黑龙江,伊春,乌伊岭', '129.437920', '48.590323', 1); +INSERT INTO `yx_system_city` VALUES (1132, 154729, 2, 154201, '230715000000', '红星区', '黑龙江,伊春,红星', '129.390983', '48.239432', 1); +INSERT INTO `yx_system_city` VALUES (1133, 154759, 2, 154201, '230716000000', '上甘岭区', '黑龙江,伊春,上甘岭', '129.024260', '47.974708', 1); +INSERT INTO `yx_system_city` VALUES (1134, 154793, 2, 154201, '230722000000', '嘉荫县', '黑龙江,伊春,嘉荫', '130.403564', '48.889109', 1); +INSERT INTO `yx_system_city` VALUES (1135, 154899, 2, 154201, '230781000000', '铁力市', '黑龙江,伊春,铁力', '128.032422', '46.986640', 1); +INSERT INTO `yx_system_city` VALUES (1136, 155077, 2, 155076, '230801000000', '市辖区', '黑龙江,佳木斯', '130.318917', '46.799922', 1); +INSERT INTO `yx_system_city` VALUES (1137, 155078, 2, 155076, '230803000000', '向阳区', '黑龙江,佳木斯,向阳', '130.365346', '46.807790', 1); +INSERT INTO `yx_system_city` VALUES (1138, 155166, 2, 155076, '230804000000', '前进区', '黑龙江,佳木斯,前进', '130.375063', '46.814103', 1); +INSERT INTO `yx_system_city` VALUES (1139, 155191, 2, 155076, '230805000000', '东风区', '黑龙江,佳木斯,东风', '130.403664', '46.822572', 1); +INSERT INTO `yx_system_city` VALUES (1140, 155254, 2, 155076, '230811000000', '郊区', '黑龙江,佳木斯,郊区', '130.327195', '46.810086', 1); +INSERT INTO `yx_system_city` VALUES (1141, 155435, 2, 155076, '230822000000', '桦南县', '黑龙江,佳木斯,桦南', '130.553343', '46.239185', 1); +INSERT INTO `yx_system_city` VALUES (1142, 155702, 2, 155076, '230826000000', '桦川县', '黑龙江,佳木斯,桦川', '130.719081', '47.023001', 1); +INSERT INTO `yx_system_city` VALUES (1143, 155838, 2, 155076, '230828000000', '汤原县', '黑龙江,佳木斯,汤原', '129.905072', '46.730706', 1); +INSERT INTO `yx_system_city` VALUES (1144, 156034, 2, 155076, '230881000000', '同江市', '黑龙江,佳木斯,同江', '132.510919', '47.642707', 1); +INSERT INTO `yx_system_city` VALUES (1145, 156209, 2, 155076, '230882000000', '富锦市', '黑龙江,佳木斯,富锦', '132.037686', '47.250108', 1); +INSERT INTO `yx_system_city` VALUES (1146, 156599, 2, 155076, '230883000000', '抚远市', '黑龙江,佳木斯,抚远', '134.307884', '48.364687', 1); +INSERT INTO `yx_system_city` VALUES (1147, 156714, 2, 156713, '230901000000', '市辖区', '黑龙江,七台河', '131.003138', '45.771726', 1); +INSERT INTO `yx_system_city` VALUES (1148, 156715, 2, 156713, '230902000000', '新兴区', '黑龙江,七台河,新兴', '130.932143', '45.815930', 1); +INSERT INTO `yx_system_city` VALUES (1149, 156815, 2, 156713, '230903000000', '桃山区', '黑龙江,七台河,桃山', '131.020275', '45.765594', 1); +INSERT INTO `yx_system_city` VALUES (1150, 156865, 2, 156713, '230904000000', '茄子河区', '黑龙江,七台河,茄子河', '131.068075', '45.785215', 1); +INSERT INTO `yx_system_city` VALUES (1151, 156956, 2, 156713, '230921000000', '勃利县', '黑龙江,七台河,勃利', '130.592093', '45.755507', 1); +INSERT INTO `yx_system_city` VALUES (1152, 157131, 2, 157130, '231001000000', '市辖区', '黑龙江,牡丹江', '129.633168', '44.551653', 1); +INSERT INTO `yx_system_city` VALUES (1153, 157132, 2, 157130, '231002000000', '东安区', '黑龙江,牡丹江,东安', '129.626642', '44.581360', 1); +INSERT INTO `yx_system_city` VALUES (1154, 157170, 2, 157130, '231003000000', '阳明区', '黑龙江,牡丹江,阳明', '129.635615', '44.596104', 1); +INSERT INTO `yx_system_city` VALUES (1155, 157273, 2, 157130, '231004000000', '爱民区', '黑龙江,牡丹江,爱民', '129.591657', '44.596053', 1); +INSERT INTO `yx_system_city` VALUES (1156, 157321, 2, 157130, '231005000000', '西安区', '黑龙江,牡丹江,西安', '129.616121', '44.577625', 1); +INSERT INTO `yx_system_city` VALUES (1157, 157406, 2, 157130, '231025000000', '林口县', '黑龙江,牡丹江,林口', '130.284033', '45.278046', 1); +INSERT INTO `yx_system_city` VALUES (1158, 157646, 2, 157130, '231081000000', '绥芬河市', '黑龙江,牡丹江,绥芬河', '131.152546', '44.412309', 1); +INSERT INTO `yx_system_city` VALUES (1159, 157678, 2, 157130, '231083000000', '海林市', '黑龙江,牡丹江,海林', '129.380482', '44.594213', 1); +INSERT INTO `yx_system_city` VALUES (1160, 157911, 2, 157130, '231084000000', '宁安市', '黑龙江,牡丹江,宁安', '129.482851', '44.340720', 1); +INSERT INTO `yx_system_city` VALUES (1161, 158233, 2, 157130, '231085000000', '穆棱市', '黑龙江,牡丹江,穆棱', '130.524437', '44.918813', 1); +INSERT INTO `yx_system_city` VALUES (1162, 158470, 2, 157130, '231086000000', '东宁市', '黑龙江,牡丹江,东宁', '131.122915', '44.087585', 1); +INSERT INTO `yx_system_city` VALUES (1163, 158624, 2, 158623, '231101000000', '市辖区', '黑龙江,黑河', '127.528560', '50.245329', 1); +INSERT INTO `yx_system_city` VALUES (1164, 158625, 2, 158623, '231102000000', '爱辉区', '黑龙江,黑河,爱辉', '127.500451', '50.252106', 1); +INSERT INTO `yx_system_city` VALUES (1165, 158797, 2, 158623, '231121000000', '嫩江县', '黑龙江,黑河,嫩江', '125.221192', '49.185766', 1); +INSERT INTO `yx_system_city` VALUES (1166, 159105, 2, 158623, '231123000000', '逊克县', '黑龙江,黑河,逊克', '128.478750', '49.564252', 1); +INSERT INTO `yx_system_city` VALUES (1167, 159220, 2, 158623, '231124000000', '孙吴县', '黑龙江,黑河,孙吴', '127.336304', '49.425652', 1); +INSERT INTO `yx_system_city` VALUES (1168, 159359, 2, 158623, '231181000000', '北安市', '黑龙江,黑河,北安', '126.491199', '48.241374', 1); +INSERT INTO `yx_system_city` VALUES (1169, 159526, 2, 158623, '231182000000', '五大连池市', '黑龙江,黑河,五大连池', '126.205516', '48.517257', 1); +INSERT INTO `yx_system_city` VALUES (1170, 159770, 2, 159769, '231201000000', '市辖区', '黑龙江,绥化', '126.968887', '46.653845', 1); +INSERT INTO `yx_system_city` VALUES (1171, 159771, 2, 159769, '231202000000', '北林区', '黑龙江,绥化,北林', '126.985593', '46.637344', 1); +INSERT INTO `yx_system_city` VALUES (1172, 159985, 2, 159769, '231221000000', '望奎县', '黑龙江,绥化,望奎', '126.486076', '46.832719', 1); +INSERT INTO `yx_system_city` VALUES (1173, 160128, 2, 159769, '231222000000', '兰西县', '黑龙江,绥化,兰西', '126.288113', '46.252447', 1); +INSERT INTO `yx_system_city` VALUES (1174, 160271, 2, 159769, '231223000000', '青冈县', '黑龙江,绥化,青冈', '126.113860', '46.689671', 1); +INSERT INTO `yx_system_city` VALUES (1175, 160478, 2, 159769, '231224000000', '庆安县', '黑龙江,绥化,庆安', '127.507825', '46.880102', 1); +INSERT INTO `yx_system_city` VALUES (1176, 160610, 2, 159769, '231225000000', '明水县', '黑龙江,绥化,明水', '125.906301', '47.173426', 1); +INSERT INTO `yx_system_city` VALUES (1177, 160744, 2, 159769, '231226000000', '绥棱县', '黑龙江,绥化,绥棱', '127.114832', '47.236015', 1); +INSERT INTO `yx_system_city` VALUES (1178, 160910, 2, 159769, '231281000000', '安达市', '黑龙江,绥化,安达', '125.352188', '46.423508', 1); +INSERT INTO `yx_system_city` VALUES (1179, 161079, 2, 159769, '231282000000', '肇东市', '黑龙江,绥化,肇东', '125.961814', '46.051126', 1); +INSERT INTO `yx_system_city` VALUES (1180, 161331, 2, 159769, '231283000000', '海伦市', '黑龙江,绥化,海伦', '126.973143', '47.461971', 1); +INSERT INTO `yx_system_city` VALUES (1181, 161652, 2, 161651, '232721000000', '呼玛县', '黑龙江,大兴安岭,呼玛', '126.665319', '51.725637', 1); +INSERT INTO `yx_system_city` VALUES (1182, 161720, 2, 161651, '232722000000', '塔河县', '黑龙江,大兴安岭,塔河', '124.709996', '52.334457', 1); +INSERT INTO `yx_system_city` VALUES (1183, 161754, 2, 161651, '232723000000', '漠河县', '黑龙江,大兴安岭,漠河', '122.538592', '52.972272', 1); +INSERT INTO `yx_system_city` VALUES (1184, 161794, 2, 161793, '310101000000', '黄浦区', '上海,黄浦', '121.484443', '31.231763', 1); +INSERT INTO `yx_system_city` VALUES (1185, 161988, 2, 161793, '310104000000', '徐汇区', '上海,徐汇', '121.436525', '31.188523', 1); +INSERT INTO `yx_system_city` VALUES (1186, 162309, 2, 161793, '310105000000', '长宁区', '上海,长宁', '121.424624', '31.220367', 1); +INSERT INTO `yx_system_city` VALUES (1187, 162505, 2, 161793, '310106000000', '静安区', '上海,静安', '121.459384', '31.247105', 1); +INSERT INTO `yx_system_city` VALUES (1188, 162794, 2, 161793, '310107000000', '普陀区', '上海,普陀', '121.395555', '31.249840', 1); +INSERT INTO `yx_system_city` VALUES (1189, 163069, 2, 161793, '310109000000', '虹口区', '上海,虹口', '121.505133', '31.264600', 1); +INSERT INTO `yx_system_city` VALUES (1190, 163290, 2, 161793, '310110000000', '杨浦区', '上海,杨浦', '121.526077', '31.259541', 1); +INSERT INTO `yx_system_city` VALUES (1191, 163621, 2, 161793, '310112000000', '闵行区', '上海,闵行', '121.381709', '31.112813', 1); +INSERT INTO `yx_system_city` VALUES (1192, 164194, 2, 161793, '310113000000', '宝山区', '上海,宝山', '121.489612', '31.405457', 1); +INSERT INTO `yx_system_city` VALUES (1193, 164682, 2, 161793, '310114000000', '嘉定区', '上海,嘉定', '121.265300', '31.375602', 1); +INSERT INTO `yx_system_city` VALUES (1194, 165026, 2, 161793, '310115000000', '浦东新区', '上海,浦东', '121.544379', '31.221517', 1); +INSERT INTO `yx_system_city` VALUES (1195, 166350, 2, 161793, '310116000000', '金山区', '上海,金山', '121.341970', '30.741991', 1); +INSERT INTO `yx_system_city` VALUES (1196, 166585, 2, 161793, '310117000000', '松江区', '上海,松江', '121.227747', '31.032243', 1); +INSERT INTO `yx_system_city` VALUES (1197, 166927, 2, 161793, '310118000000', '青浦区', '上海,青浦', '121.124178', '31.150681', 1); +INSERT INTO `yx_system_city` VALUES (1198, 167228, 2, 161793, '310120000000', '奉贤区', '上海,奉贤', '121.474042', '30.917795', 1); +INSERT INTO `yx_system_city` VALUES (1199, 167533, 2, 161793, '310151000000', '崇明区', '上海,崇明', '121.473701', '31.230416', 1); +INSERT INTO `yx_system_city` VALUES (1200, 167906, 2, 167905, '320101000000', '市辖区', '江苏,南京', '118.796877', '32.060255', 1); +INSERT INTO `yx_system_city` VALUES (1201, 167907, 2, 167905, '320102000000', '玄武区', '江苏,南京,玄武', '118.797861', '32.048687', 1); +INSERT INTO `yx_system_city` VALUES (1202, 167974, 2, 167905, '320104000000', '秦淮区', '江苏,南京,秦淮', '118.794744', '32.039133', 1); +INSERT INTO `yx_system_city` VALUES (1203, 168104, 2, 167905, '320105000000', '建邺区', '江苏,南京,建邺', '118.731694', '32.003552', 1); +INSERT INTO `yx_system_city` VALUES (1204, 168174, 2, 167905, '320106000000', '鼓楼区', '江苏,南京,鼓楼', '118.769790', '32.066336', 1); +INSERT INTO `yx_system_city` VALUES (1205, 168310, 2, 167905, '320111000000', '浦口区', '江苏,南京,浦口', '118.627895', '32.059093', 1); +INSERT INTO `yx_system_city` VALUES (1206, 168451, 2, 167905, '320113000000', '栖霞区', '江苏,南京,栖霞', '118.909246', '32.096228', 1); +INSERT INTO `yx_system_city` VALUES (1207, 168604, 2, 167905, '320114000000', '雨花台区', '江苏,南京,雨花台', '118.779073', '31.991347', 1); +INSERT INTO `yx_system_city` VALUES (1208, 168704, 2, 167905, '320115000000', '江宁区', '江苏,南京,江宁', '118.839685', '31.953702', 1); +INSERT INTO `yx_system_city` VALUES (1209, 168925, 2, 167905, '320116000000', '六合区', '江苏,南京,六合', '118.821401', '32.322247', 1); +INSERT INTO `yx_system_city` VALUES (1210, 169096, 2, 167905, '320117000000', '溧水区', '江苏,南京,溧水', '119.028296', '31.651125', 1); +INSERT INTO `yx_system_city` VALUES (1211, 169214, 2, 167905, '320118000000', '高淳区', '江苏,南京,高淳', '118.892085', '31.328471', 1); +INSERT INTO `yx_system_city` VALUES (1212, 169376, 2, 169375, '320201000000', '市辖区', '江苏,无锡', '120.311910', '31.491169', 1); +INSERT INTO `yx_system_city` VALUES (1213, 169377, 2, 169375, '320205000000', '锡山区', '江苏,无锡,锡山', '120.357858', '31.589715', 1); +INSERT INTO `yx_system_city` VALUES (1214, 169507, 2, 169375, '320206000000', '惠山区', '江苏,无锡,惠山', '120.298500', '31.681012', 1); +INSERT INTO `yx_system_city` VALUES (1215, 169628, 2, 169375, '320211000000', '滨湖区', '江苏,无锡,滨湖', '120.282692', '31.527954', 1); +INSERT INTO `yx_system_city` VALUES (1216, 169751, 2, 169375, '320213000000', '梁溪区', '江苏,无锡,梁溪', '120.296591', '31.575719', 1); +INSERT INTO `yx_system_city` VALUES (1217, 169924, 2, 169375, '320214000000', '新吴区', '江苏,无锡,新吴', '120.352778', '31.550957', 1); +INSERT INTO `yx_system_city` VALUES (1218, 170064, 2, 169375, '320281000000', '江阴市', '江苏,无锡,江阴', '120.284939', '31.920658', 1); +INSERT INTO `yx_system_city` VALUES (1219, 170390, 2, 169375, '320282000000', '宜兴市', '江苏,无锡,宜兴', '119.823308', '31.340637', 1); +INSERT INTO `yx_system_city` VALUES (1220, 170725, 2, 170724, '320301000000', '市辖区', '江苏,徐州', '117.284124', '34.205768', 1); +INSERT INTO `yx_system_city` VALUES (1221, 170726, 2, 170724, '320302000000', '鼓楼区', '江苏,徐州,鼓楼', '117.185591', '34.288511', 1); +INSERT INTO `yx_system_city` VALUES (1222, 170800, 2, 170724, '320303000000', '云龙区', '江苏,徐州,云龙', '117.251560', '34.253167', 1); +INSERT INTO `yx_system_city` VALUES (1223, 170886, 2, 170724, '320305000000', '贾汪区', '江苏,徐州,贾汪', '117.466687', '34.435506', 1); +INSERT INTO `yx_system_city` VALUES (1224, 171049, 2, 170724, '320311000000', '泉山区', '江苏,徐州,泉山', '117.193805', '34.244258', 1); +INSERT INTO `yx_system_city` VALUES (1225, 171182, 2, 170724, '320312000000', '铜山区', '江苏,徐州,铜山', '117.169421', '34.180700', 1); +INSERT INTO `yx_system_city` VALUES (1226, 171537, 2, 170724, '320321000000', '丰县', '江苏,徐州,丰县', '116.595391', '34.693906', 1); +INSERT INTO `yx_system_city` VALUES (1227, 171966, 2, 170724, '320322000000', '沛县', '江苏,徐州,沛县', '116.937532', '34.721656', 1); +INSERT INTO `yx_system_city` VALUES (1228, 172381, 2, 170724, '320324000000', '睢宁县', '江苏,徐州,睢宁', '117.941563', '33.912598', 1); +INSERT INTO `yx_system_city` VALUES (1229, 172804, 2, 170724, '320381000000', '新沂市', '江苏,徐州,新沂', '118.354537', '34.369580', 1); +INSERT INTO `yx_system_city` VALUES (1230, 173105, 2, 170724, '320382000000', '邳州市', '江苏,徐州,邳州', '118.012531', '34.338888', 1); +INSERT INTO `yx_system_city` VALUES (1231, 173636, 2, 173635, '320401000000', '市辖区', '江苏,常州', '119.973987', '31.810689', 1); +INSERT INTO `yx_system_city` VALUES (1232, 173637, 2, 173635, '320402000000', '天宁区', '江苏,常州,天宁', '119.974991', '31.779619', 1); +INSERT INTO `yx_system_city` VALUES (1233, 173773, 2, 173635, '320404000000', '钟楼区', '江苏,常州,钟楼', '119.902112', '31.802192', 1); +INSERT INTO `yx_system_city` VALUES (1234, 173891, 2, 173635, '320411000000', '新北区', '江苏,常州,新北', '119.972182', '31.830641', 1); +INSERT INTO `yx_system_city` VALUES (1235, 174038, 2, 173635, '320412000000', '武进区', '江苏,常州,武进', '119.942437', '31.701188', 1); +INSERT INTO `yx_system_city` VALUES (1236, 174347, 2, 173635, '320413000000', '金坛区', '江苏,常州,金坛', '119.597897', '31.723247', 1); +INSERT INTO `yx_system_city` VALUES (1237, 174508, 2, 173635, '320481000000', '溧阳市', '江苏,常州,溧阳', '119.484211', '31.416911', 1); +INSERT INTO `yx_system_city` VALUES (1238, 174765, 2, 174764, '320501000000', '市辖区', '江苏,苏州', '120.585315', '31.298886', 1); +INSERT INTO `yx_system_city` VALUES (1239, 174766, 2, 174764, '320505000000', '虎丘区', '江苏,苏州,虎丘', '120.566833', '31.294845', 1); +INSERT INTO `yx_system_city` VALUES (1240, 174872, 2, 174764, '320506000000', '吴中区', '江苏,苏州,吴中', '120.631898', '31.264212', 1); +INSERT INTO `yx_system_city` VALUES (1241, 175088, 2, 174764, '320507000000', '相城区', '江苏,苏州,相城', '120.642663', '31.369088', 1); +INSERT INTO `yx_system_city` VALUES (1242, 175247, 2, 174764, '320508000000', '姑苏区', '江苏,苏州,姑苏', '120.617296', '31.336392', 1); +INSERT INTO `yx_system_city` VALUES (1243, 175444, 2, 174764, '320509000000', '吴江区', '江苏,苏州,吴江', '120.645158', '31.138677', 1); +INSERT INTO `yx_system_city` VALUES (1244, 175765, 2, 174764, '320581000000', '常熟市', '江苏,苏州,常熟', '120.752481', '31.654376', 1); +INSERT INTO `yx_system_city` VALUES (1245, 176120, 2, 174764, '320582000000', '张家港市', '江苏,苏州,张家港', '120.553200', '31.870405', 1); +INSERT INTO `yx_system_city` VALUES (1246, 176424, 2, 174764, '320583000000', '昆山市', '江苏,苏州,昆山', '120.980737', '31.385598', 1); +INSERT INTO `yx_system_city` VALUES (1247, 176763, 2, 174764, '320585000000', '太仓市', '江苏,苏州,太仓', '121.130550', '31.457735', 1); +INSERT INTO `yx_system_city` VALUES (1248, 176921, 2, 176920, '320601000000', '市辖区', '江苏,南通', '120.894291', '31.980171', 1); +INSERT INTO `yx_system_city` VALUES (1249, 176922, 2, 176920, '320602000000', '崇川区', '江苏,南通,崇川', '120.857434', '32.009875', 1); +INSERT INTO `yx_system_city` VALUES (1250, 177040, 2, 176920, '320611000000', '港闸区', '江苏,南通,港闸', '120.818527', '32.032442', 1); +INSERT INTO `yx_system_city` VALUES (1251, 177119, 2, 176920, '320612000000', '通州区', '江苏,南通,通州', '121.075087', '32.064161', 1); +INSERT INTO `yx_system_city` VALUES (1252, 177415, 2, 176920, '320621000000', '海安县', '江苏,南通,海安', '120.467370', '32.533549', 1); +INSERT INTO `yx_system_city` VALUES (1253, 177665, 2, 176920, '320623000000', '如东县', '江苏,南通,如东', '121.185201', '32.331766', 1); +INSERT INTO `yx_system_city` VALUES (1254, 177946, 2, 176920, '320681000000', '启东市', '江苏,南通,启东', '121.657441', '31.808026', 1); +INSERT INTO `yx_system_city` VALUES (1255, 178291, 2, 176920, '320682000000', '如皋市', '江苏,南通,如皋', '120.574946', '32.370557', 1); +INSERT INTO `yx_system_city` VALUES (1256, 178669, 2, 176920, '320684000000', '海门市', '江苏,南通,海门', '121.181615', '31.871173', 1); +INSERT INTO `yx_system_city` VALUES (1257, 179000, 2, 178999, '320701000000', '市辖区', '江苏,连云港', '119.221611', '34.596653', 1); +INSERT INTO `yx_system_city` VALUES (1258, 179001, 2, 178999, '320703000000', '连云区', '江苏,连云港,连云', '119.338788', '34.760249', 1); +INSERT INTO `yx_system_city` VALUES (1259, 179081, 2, 178999, '320706000000', '海州区', '江苏,连云港,海州', '119.193710', '34.606756', 1); +INSERT INTO `yx_system_city` VALUES (1260, 179296, 2, 178999, '320707000000', '赣榆区', '江苏,连云港,赣榆', '119.173331', '34.841349', 1); +INSERT INTO `yx_system_city` VALUES (1261, 179786, 2, 178999, '320722000000', '东海县', '江苏,连云港,东海', '118.752842', '34.542309', 1); +INSERT INTO `yx_system_city` VALUES (1262, 180136, 2, 178999, '320723000000', '灌云县', '江苏,连云港,灌云', '119.239381', '34.284381', 1); +INSERT INTO `yx_system_city` VALUES (1263, 180493, 2, 178999, '320724000000', '灌南县', '江苏,连云港,灌南', '119.315651', '34.087135', 1); +INSERT INTO `yx_system_city` VALUES (1264, 180744, 2, 180743, '320801000000', '市辖区', '江苏,淮安', '119.015285', '33.610353', 1); +INSERT INTO `yx_system_city` VALUES (1265, 180745, 2, 180743, '320803000000', '淮安区', '江苏,淮安,淮安', '119.141099', '33.502869', 1); +INSERT INTO `yx_system_city` VALUES (1266, 181117, 2, 180743, '320804000000', '淮阴区', '江苏,淮安,淮阴', '119.034725', '33.631893', 1); +INSERT INTO `yx_system_city` VALUES (1267, 181401, 2, 180743, '320812000000', '清江浦区', '江苏,淮安,清江浦', '119.028099', '33.624341', 1); +INSERT INTO `yx_system_city` VALUES (1268, 181547, 2, 180743, '320813000000', '洪泽区', '江苏,淮安,洪泽', '119.015285', '33.610353', 1); +INSERT INTO `yx_system_city` VALUES (1269, 181681, 2, 180743, '320826000000', '涟水县', '江苏,淮安,涟水', '119.260335', '33.780960', 1); +INSERT INTO `yx_system_city` VALUES (1270, 182092, 2, 180743, '320830000000', '盱眙县', '江苏,淮安,盱眙', '118.544360', '33.011971', 1); +INSERT INTO `yx_system_city` VALUES (1271, 182372, 2, 180743, '320831000000', '金湖县', '江苏,淮安,金湖', '119.020585', '33.025433', 1); +INSERT INTO `yx_system_city` VALUES (1272, 182539, 2, 182538, '320901000000', '市辖区', '江苏,盐城', '120.163561', '33.347382', 1); +INSERT INTO `yx_system_city` VALUES (1273, 182540, 2, 182538, '320902000000', '亭湖区', '江苏,盐城,亭湖', '120.197358', '33.390536', 1); +INSERT INTO `yx_system_city` VALUES (1274, 182762, 2, 182538, '320903000000', '盐都区', '江苏,盐城,盐都', '120.153898', '33.338094', 1); +INSERT INTO `yx_system_city` VALUES (1275, 183048, 2, 182538, '320904000000', '大丰区', '江苏,盐城,大丰', '120.500858', '33.200331', 1); +INSERT INTO `yx_system_city` VALUES (1276, 183334, 2, 182538, '320921000000', '响水县', '江苏,盐城,响水', '119.578364', '34.199479', 1); +INSERT INTO `yx_system_city` VALUES (1277, 183510, 2, 182538, '320922000000', '滨海县', '江苏,盐城,滨海', '119.820831', '33.990334', 1); +INSERT INTO `yx_system_city` VALUES (1278, 183829, 2, 182538, '320923000000', '阜宁县', '江苏,盐城,阜宁', '119.802527', '33.759325', 1); +INSERT INTO `yx_system_city` VALUES (1279, 184188, 2, 182538, '320924000000', '射阳县', '江苏,盐城,射阳', '120.258053', '33.774806', 1); +INSERT INTO `yx_system_city` VALUES (1280, 184485, 2, 182538, '320925000000', '建湖县', '江苏,盐城,建湖', '119.798581', '33.464204', 1); +INSERT INTO `yx_system_city` VALUES (1281, 184748, 2, 182538, '320981000000', '东台市', '江苏,盐城,东台', '120.320331', '32.868440', 1); +INSERT INTO `yx_system_city` VALUES (1282, 185202, 2, 185201, '321001000000', '市辖区', '江苏,扬州', '119.412966', '32.394210', 1); +INSERT INTO `yx_system_city` VALUES (1283, 185203, 2, 185201, '321002000000', '广陵区', '江苏,扬州,广陵', '119.431849', '32.394720', 1); +INSERT INTO `yx_system_city` VALUES (1284, 185360, 2, 185201, '321003000000', '邗江区', '江苏,扬州,邗江', '119.398015', '32.377528', 1); +INSERT INTO `yx_system_city` VALUES (1285, 185555, 2, 185201, '321012000000', '江都区', '江苏,扬州,江都', '119.569989', '32.434672', 1); +INSERT INTO `yx_system_city` VALUES (1286, 185905, 2, 185201, '321023000000', '宝应县', '江苏,扬州,宝应', '119.360729', '33.240392', 1); +INSERT INTO `yx_system_city` VALUES (1287, 186203, 2, 185201, '321081000000', '仪征市', '江苏,扬州,仪征', '119.184766', '32.272258', 1); +INSERT INTO `yx_system_city` VALUES (1288, 186414, 2, 185201, '321084000000', '高邮市', '江苏,扬州,高邮', '119.459161', '32.781659', 1); +INSERT INTO `yx_system_city` VALUES (1289, 186658, 2, 186657, '321101000000', '市辖区', '江苏,镇江', '119.425836', '32.187849', 1); +INSERT INTO `yx_system_city` VALUES (1290, 186659, 2, 186657, '321102000000', '京口区', '江苏,镇江,京口', '119.470160', '32.198280', 1); +INSERT INTO `yx_system_city` VALUES (1291, 186734, 2, 186657, '321111000000', '润州区', '江苏,镇江,润州', '119.411945', '32.195333', 1); +INSERT INTO `yx_system_city` VALUES (1292, 186817, 2, 186657, '321112000000', '丹徒区', '江苏,镇江,丹徒', '119.433854', '32.131962', 1); +INSERT INTO `yx_system_city` VALUES (1293, 186919, 2, 186657, '321181000000', '丹阳市', '江苏,镇江,丹阳', '119.606536', '32.010117', 1); +INSERT INTO `yx_system_city` VALUES (1294, 187149, 2, 186657, '321182000000', '扬中市', '江苏,镇江,扬中', '119.797635', '32.234831', 1); +INSERT INTO `yx_system_city` VALUES (1295, 187235, 2, 186657, '321183000000', '句容市', '江苏,镇江,句容', '119.168695', '31.944999', 1); +INSERT INTO `yx_system_city` VALUES (1296, 187442, 2, 187441, '321201000000', '市辖区', '江苏,泰州', '119.923116', '32.455778', 1); +INSERT INTO `yx_system_city` VALUES (1297, 187443, 2, 187441, '321202000000', '海陵区', '江苏,泰州,海陵', '119.919425', '32.491016', 1); +INSERT INTO `yx_system_city` VALUES (1298, 187593, 2, 187441, '321203000000', '高港区', '江苏,泰州,高港', '119.881717', '32.318822', 1); +INSERT INTO `yx_system_city` VALUES (1299, 187693, 2, 187441, '321204000000', '姜堰区', '江苏,泰州,姜堰', '120.127934', '32.509155', 1); +INSERT INTO `yx_system_city` VALUES (1300, 188035, 2, 187441, '321281000000', '兴化市', '江苏,泰州,兴化', '119.852541', '32.910459', 1); +INSERT INTO `yx_system_city` VALUES (1301, 188752, 2, 187441, '321282000000', '靖江市', '江苏,泰州,靖江', '120.277138', '31.982751', 1); +INSERT INTO `yx_system_city` VALUES (1302, 189026, 2, 187441, '321283000000', '泰兴市', '江苏,泰州,泰兴', '120.051744', '32.171854', 1); +INSERT INTO `yx_system_city` VALUES (1303, 189403, 2, 189402, '321301000000', '市辖区', '江苏,宿迁', '118.275198', '33.963232', 1); +INSERT INTO `yx_system_city` VALUES (1304, 189404, 2, 189402, '321302000000', '宿城区', '江苏,宿迁,宿城', '118.242534', '33.963029', 1); +INSERT INTO `yx_system_city` VALUES (1305, 189637, 2, 189402, '321311000000', '宿豫区', '江苏,宿迁,宿豫', '118.330782', '33.946822', 1); +INSERT INTO `yx_system_city` VALUES (1306, 189850, 2, 189402, '321322000000', '沭阳县', '江苏,宿迁,沭阳', '118.804784', '34.111022', 1); +INSERT INTO `yx_system_city` VALUES (1307, 190377, 2, 189402, '321323000000', '泗阳县', '江苏,宿迁,泗阳', '118.703038', '33.723140', 1); +INSERT INTO `yx_system_city` VALUES (1308, 190642, 2, 189402, '321324000000', '泗洪县', '江苏,宿迁,泗洪', '118.223591', '33.476051', 1); +INSERT INTO `yx_system_city` VALUES (1309, 191021, 2, 191020, '330101000000', '市辖区', '浙江,杭州', '120.155070', '30.274084', 1); +INSERT INTO `yx_system_city` VALUES (1310, 191022, 2, 191020, '330102000000', '上城区', '浙江,杭州,上城', '120.169329', '30.242312', 1); +INSERT INTO `yx_system_city` VALUES (1311, 191083, 2, 191020, '330103000000', '下城区', '浙江,杭州,下城', '120.180895', '30.281714', 1); +INSERT INTO `yx_system_city` VALUES (1312, 191166, 2, 191020, '330104000000', '江干区', '浙江,杭州,江干', '120.205001', '30.257012', 1); +INSERT INTO `yx_system_city` VALUES (1313, 191360, 2, 191020, '330105000000', '拱墅区', '浙江,杭州,拱墅', '120.141406', '30.319037', 1); +INSERT INTO `yx_system_city` VALUES (1314, 191479, 2, 191020, '330106000000', '西湖区', '浙江,杭州,西湖', '120.130203', '30.259324', 1); +INSERT INTO `yx_system_city` VALUES (1315, 191693, 2, 191020, '330108000000', '滨江区', '浙江,杭州,滨江', '120.211816', '30.208560', 1); +INSERT INTO `yx_system_city` VALUES (1316, 191756, 2, 191020, '330109000000', '萧山区', '浙江,杭州,萧山', '120.264253', '30.183806', 1); +INSERT INTO `yx_system_city` VALUES (1317, 192388, 2, 191020, '330110000000', '余杭区', '浙江,杭州,余杭', '120.299402', '30.419045', 1); +INSERT INTO `yx_system_city` VALUES (1318, 192753, 2, 191020, '330111000000', '富阳区', '浙江,杭州,富阳', '119.960076', '30.048692', 1); +INSERT INTO `yx_system_city` VALUES (1319, 193085, 2, 191020, '330122000000', '桐庐县', '浙江,杭州,桐庐', '119.691434', '29.793535', 1); +INSERT INTO `yx_system_city` VALUES (1320, 193304, 2, 191020, '330127000000', '淳安县', '浙江,杭州,淳安', '119.041864', '29.608772', 1); +INSERT INTO `yx_system_city` VALUES (1321, 193766, 2, 191020, '330182000000', '建德市', '浙江,杭州,建德', '119.281164', '29.474871', 1); +INSERT INTO `yx_system_city` VALUES (1322, 194060, 2, 191020, '330185000000', '临安市', '浙江,杭州,临安', '119.724733', '30.233873', 1); +INSERT INTO `yx_system_city` VALUES (1323, 194396, 2, 194395, '330201000000', '市辖区', '浙江,宁波', '121.550357', '29.874556', 1); +INSERT INTO `yx_system_city` VALUES (1324, 194397, 2, 194395, '330203000000', '海曙区', '浙江,宁波,海曙', '121.551066', '29.859772', 1); +INSERT INTO `yx_system_city` VALUES (1325, 194484, 2, 194395, '330204000000', '江东区', '浙江,宁波,江东', '121.570383', '29.866819', 1); +INSERT INTO `yx_system_city` VALUES (1326, 194568, 2, 194395, '330205000000', '江北区', '浙江,宁波,江北', '121.555227', '29.886757', 1); +INSERT INTO `yx_system_city` VALUES (1327, 194747, 2, 194395, '330206000000', '北仑区', '浙江,宁波,北仑', '121.844618', '29.899044', 1); +INSERT INTO `yx_system_city` VALUES (1328, 195023, 2, 194395, '330211000000', '镇海区', '浙江,宁波,镇海', '121.716540', '29.948998', 1); +INSERT INTO `yx_system_city` VALUES (1329, 195132, 2, 194395, '330212000000', '鄞州区', '浙江,宁波,鄞州', '121.546603', '29.816511', 1); +INSERT INTO `yx_system_city` VALUES (1330, 195703, 2, 194395, '330225000000', '象山县', '浙江,宁波,象山', '121.869339', '29.476705', 1); +INSERT INTO `yx_system_city` VALUES (1331, 196257, 2, 194395, '330226000000', '宁海县', '浙江,宁波,宁海', '121.429477', '29.287939', 1); +INSERT INTO `yx_system_city` VALUES (1332, 196686, 2, 194395, '330281000000', '余姚市', '浙江,宁波,余姚', '121.154634', '30.037192', 1); +INSERT INTO `yx_system_city` VALUES (1333, 197031, 2, 194395, '330282000000', '慈溪市', '浙江,宁波,慈溪', '121.266579', '30.169665', 1); +INSERT INTO `yx_system_city` VALUES (1334, 197440, 2, 194395, '330283000000', '奉化市', '浙江,宁波,奉化', '121.406995', '29.655143', 1); +INSERT INTO `yx_system_city` VALUES (1335, 197851, 2, 197850, '330301000000', '市辖区', '浙江,温州', '120.699366', '27.994267', 1); +INSERT INTO `yx_system_city` VALUES (1336, 197852, 2, 197850, '330302000000', '鹿城区', '浙江,温州,鹿城', '120.655135', '28.015455', 1); +INSERT INTO `yx_system_city` VALUES (1337, 198091, 2, 197850, '330303000000', '龙湾区', '浙江,温州,龙湾', '120.811213', '27.932747', 1); +INSERT INTO `yx_system_city` VALUES (1338, 198210, 2, 197850, '330304000000', '瓯海区', '浙江,温州,瓯海', '120.614910', '27.966844', 1); +INSERT INTO `yx_system_city` VALUES (1339, 198508, 2, 197850, '330305000000', '洞头区', '浙江,温州,洞头', '121.157249', '27.836154', 1); +INSERT INTO `yx_system_city` VALUES (1340, 198619, 2, 197850, '330324000000', '永嘉县', '浙江,温州,永嘉', '120.682144', '28.150591', 1); +INSERT INTO `yx_system_city` VALUES (1341, 199581, 2, 197850, '330326000000', '平阳县', '浙江,温州,平阳', '120.565793', '27.661918', 1); +INSERT INTO `yx_system_city` VALUES (1342, 200239, 2, 197850, '330327000000', '苍南县', '浙江,温州,苍南', '120.425766', '27.518280', 1); +INSERT INTO `yx_system_city` VALUES (1343, 201140, 2, 197850, '330328000000', '文成县', '浙江,温州,文成', '120.091498', '27.786996', 1); +INSERT INTO `yx_system_city` VALUES (1344, 201556, 2, 197850, '330329000000', '泰顺县', '浙江,温州,泰顺', '119.717649', '27.556884', 1); +INSERT INTO `yx_system_city` VALUES (1345, 201882, 2, 197850, '330381000000', '瑞安市', '浙江,温州,瑞安', '120.655148', '27.778657', 1); +INSERT INTO `yx_system_city` VALUES (1346, 202864, 2, 197850, '330382000000', '乐清市', '浙江,温州,乐清', '120.967147', '28.116083', 1); +INSERT INTO `yx_system_city` VALUES (1347, 203853, 2, 203852, '330401000000', '市辖区', '浙江,嘉兴', '120.755486', '30.746129', 1); +INSERT INTO `yx_system_city` VALUES (1348, 203854, 2, 203852, '330402000000', '南湖区', '浙江,嘉兴,南湖', '120.783025', '30.747842', 1); +INSERT INTO `yx_system_city` VALUES (1349, 204008, 2, 203852, '330411000000', '秀洲区', '浙江,嘉兴,秀洲', '120.709018', '30.765168', 1); +INSERT INTO `yx_system_city` VALUES (1350, 204177, 2, 203852, '330421000000', '嘉善县', '浙江,嘉兴,嘉善', '120.925850', '30.830898', 1); +INSERT INTO `yx_system_city` VALUES (1351, 204341, 2, 203852, '330424000000', '海盐县', '浙江,嘉兴,海盐', '120.946263', '30.526436', 1); +INSERT INTO `yx_system_city` VALUES (1352, 204486, 2, 203852, '330481000000', '海宁市', '浙江,嘉兴,海宁', '120.680757', '30.510659', 1); +INSERT INTO `yx_system_city` VALUES (1353, 204723, 2, 203852, '330482000000', '平湖市', '浙江,嘉兴,平湖', '121.015142', '30.677233', 1); +INSERT INTO `yx_system_city` VALUES (1354, 204877, 2, 203852, '330483000000', '桐乡市', '浙江,嘉兴,桐乡', '120.565099', '30.630173', 1); +INSERT INTO `yx_system_city` VALUES (1355, 205102, 2, 205101, '330501000000', '市辖区', '浙江,湖州', '120.086823', '30.894348', 1); +INSERT INTO `yx_system_city` VALUES (1356, 205103, 2, 205101, '330502000000', '吴兴区', '浙江,湖州,吴兴', '120.185838', '30.857151', 1); +INSERT INTO `yx_system_city` VALUES (1357, 205449, 2, 205101, '330503000000', '南浔区', '浙江,湖州,南浔', '120.418512', '30.849690', 1); +INSERT INTO `yx_system_city` VALUES (1358, 205717, 2, 205101, '330521000000', '德清县', '浙江,湖州,德清', '119.977401', '30.542510', 1); +INSERT INTO `yx_system_city` VALUES (1359, 205910, 2, 205101, '330522000000', '长兴县', '浙江,湖州,长兴', '119.910952', '31.026666', 1); +INSERT INTO `yx_system_city` VALUES (1360, 206213, 2, 205101, '330523000000', '安吉县', '浙江,湖州,安吉', '119.680353', '30.638675', 1); +INSERT INTO `yx_system_city` VALUES (1361, 206439, 2, 206438, '330601000000', '市辖区', '浙江,绍兴', '120.580232', '30.029752', 1); +INSERT INTO `yx_system_city` VALUES (1362, 206440, 2, 206438, '330602000000', '越城区', '浙江,绍兴,越城', '120.582633', '29.988245', 1); +INSERT INTO `yx_system_city` VALUES (1363, 206875, 2, 206438, '330603000000', '柯桥区', '浙江,绍兴,柯桥', '120.495065', '30.081942', 1); +INSERT INTO `yx_system_city` VALUES (1364, 207247, 2, 206438, '330604000000', '上虞区', '浙江,绍兴,上虞', '120.868122', '30.033121', 1); +INSERT INTO `yx_system_city` VALUES (1365, 207715, 2, 206438, '330624000000', '新昌县', '浙江,绍兴,新昌', '120.903866', '29.499832', 1); +INSERT INTO `yx_system_city` VALUES (1366, 208171, 2, 206438, '330681000000', '诸暨市', '浙江,绍兴,诸暨', '120.246863', '29.708692', 1); +INSERT INTO `yx_system_city` VALUES (1367, 208733, 2, 206438, '330683000000', '嵊州市', '浙江,绍兴,嵊州', '120.831025', '29.561410', 1); +INSERT INTO `yx_system_city` VALUES (1368, 209251, 2, 209250, '330701000000', '市辖区', '浙江,金华', '119.647444', '29.079059', 1); +INSERT INTO `yx_system_city` VALUES (1369, 209252, 2, 209250, '330702000000', '婺城区', '浙江,金华,婺城', '119.571633', '29.086221', 1); +INSERT INTO `yx_system_city` VALUES (1370, 209949, 2, 209250, '330703000000', '金东区', '浙江,金华,金东', '119.692862', '29.099122', 1); +INSERT INTO `yx_system_city` VALUES (1371, 210474, 2, 209250, '330723000000', '武义县', '浙江,金华,武义', '119.816318', '28.892721', 1); +INSERT INTO `yx_system_city` VALUES (1372, 211047, 2, 209250, '330726000000', '浦江县', '浙江,金华,浦江', '119.892222', '29.452477', 1); +INSERT INTO `yx_system_city` VALUES (1373, 211492, 2, 209250, '330727000000', '磐安县', '浙江,金华,磐安', '120.450178', '29.054048', 1); +INSERT INTO `yx_system_city` VALUES (1374, 211883, 2, 209250, '330781000000', '兰溪市', '浙江,金华,兰溪', '119.460526', '29.208919', 1); +INSERT INTO `yx_system_city` VALUES (1375, 212256, 2, 209250, '330782000000', '义乌市', '浙江,金华,义乌', '120.075058', '29.306841', 1); +INSERT INTO `yx_system_city` VALUES (1376, 213076, 2, 209250, '330783000000', '东阳市', '浙江,金华,东阳', '120.241566', '29.289648', 1); +INSERT INTO `yx_system_city` VALUES (1377, 213485, 2, 209250, '330784000000', '永康市', '浙江,金华,永康', '120.047651', '28.888555', 1); +INSERT INTO `yx_system_city` VALUES (1378, 214261, 2, 214260, '330801000000', '市辖区', '浙江,衢州', '118.859457', '28.970079', 1); +INSERT INTO `yx_system_city` VALUES (1379, 214262, 2, 214260, '330802000000', '柯城区', '浙江,衢州,柯城', '118.871333', '28.968504', 1); +INSERT INTO `yx_system_city` VALUES (1380, 214536, 2, 214260, '330803000000', '衢江区', '浙江,衢州,衢江', '118.959460', '28.979780', 1); +INSERT INTO `yx_system_city` VALUES (1381, 214843, 2, 214260, '330822000000', '常山县', '浙江,衢州,常山', '118.511287', '28.901343', 1); +INSERT INTO `yx_system_city` VALUES (1382, 215051, 2, 214260, '330824000000', '开化县', '浙江,衢州,开化', '118.415495', '29.137337', 1); +INSERT INTO `yx_system_city` VALUES (1383, 215332, 2, 214260, '330825000000', '龙游县', '浙江,衢州,龙游', '119.172304', '29.028319', 1); +INSERT INTO `yx_system_city` VALUES (1384, 215624, 2, 214260, '330881000000', '江山市', '浙江,衢州,江山', '118.626974', '28.737223', 1); +INSERT INTO `yx_system_city` VALUES (1385, 215956, 2, 215955, '330901000000', '市辖区', '浙江,舟山', '122.207215', '29.985295', 1); +INSERT INTO `yx_system_city` VALUES (1386, 215957, 2, 215955, '330902000000', '定海区', '浙江,舟山,定海', '122.106773', '30.019858', 1); +INSERT INTO `yx_system_city` VALUES (1387, 216139, 2, 215955, '330903000000', '普陀区', '浙江,舟山,普陀', '122.323867', '29.971760', 1); +INSERT INTO `yx_system_city` VALUES (1388, 216290, 2, 215955, '330921000000', '岱山县', '浙江,舟山,岱山', '122.226237', '30.264139', 1); +INSERT INTO `yx_system_city` VALUES (1389, 216394, 2, 215955, '330922000000', '嵊泗县', '浙江,舟山,嵊泗', '122.451382', '30.725686', 1); +INSERT INTO `yx_system_city` VALUES (1390, 216450, 2, 216449, '331001000000', '市辖区', '浙江,台州', '121.420757', '28.656386', 1); +INSERT INTO `yx_system_city` VALUES (1391, 216451, 2, 216449, '331002000000', '椒江区', '浙江,台州,椒江', '121.442676', '28.673726', 1); +INSERT INTO `yx_system_city` VALUES (1392, 216788, 2, 216449, '331003000000', '黄岩区', '浙江,台州,黄岩', '121.261893', '28.650117', 1); +INSERT INTO `yx_system_city` VALUES (1393, 217324, 2, 216449, '331004000000', '路桥区', '浙江,台州,路桥', '121.365123', '28.582655', 1); +INSERT INTO `yx_system_city` VALUES (1394, 217666, 2, 216449, '331021000000', '玉环县', '浙江,台州,玉环', '121.231805', '28.135930', 1); +INSERT INTO `yx_system_city` VALUES (1395, 217998, 2, 216449, '331022000000', '三门县', '浙江,台州,三门', '121.395777', '29.104873', 1); +INSERT INTO `yx_system_city` VALUES (1396, 218534, 2, 216449, '331023000000', '天台县', '浙江,台州,天台', '121.006725', '29.144079', 1); +INSERT INTO `yx_system_city` VALUES (1397, 219162, 2, 216449, '331024000000', '仙居县', '浙江,台州,仙居', '120.735081', '28.849213', 1); +INSERT INTO `yx_system_city` VALUES (1398, 219609, 2, 216449, '331081000000', '温岭市', '浙江,台州,温岭', '121.385604', '28.372506', 1); +INSERT INTO `yx_system_city` VALUES (1399, 220555, 2, 216449, '331082000000', '临海市', '浙江,台州,临海', '121.145047', '28.858457', 1); +INSERT INTO `yx_system_city` VALUES (1400, 221611, 2, 221610, '331101000000', '市辖区', '浙江,丽水', '119.922796', '28.467630', 1); +INSERT INTO `yx_system_city` VALUES (1401, 221612, 2, 221610, '331102000000', '莲都区', '浙江,丽水,莲都', '119.912612', '28.445836', 1); +INSERT INTO `yx_system_city` VALUES (1402, 221903, 2, 221610, '331121000000', '青田县', '浙江,丽水,青田', '120.289597', '28.139059', 1); +INSERT INTO `yx_system_city` VALUES (1403, 222380, 2, 221610, '331122000000', '缙云县', '浙江,丽水,缙云', '120.091573', '28.659279', 1); +INSERT INTO `yx_system_city` VALUES (1404, 222658, 2, 221610, '331123000000', '遂昌县', '浙江,丽水,遂昌', '119.276104', '28.592119', 1); +INSERT INTO `yx_system_city` VALUES (1405, 222890, 2, 221610, '331124000000', '松阳县', '浙江,丽水,松阳', '119.482015', '28.449171', 1); +INSERT INTO `yx_system_city` VALUES (1406, 223324, 2, 221610, '331125000000', '云和县', '浙江,丽水,云和', '119.573397', '28.115790', 1); +INSERT INTO `yx_system_city` VALUES (1407, 223512, 2, 221610, '331126000000', '庆元县', '浙江,丽水,庆元', '119.062590', '27.619220', 1); +INSERT INTO `yx_system_city` VALUES (1408, 223885, 2, 221610, '331127000000', '景宁畲族自治县', '浙江,丽水,景宁', '119.635697', '27.973312', 1); +INSERT INTO `yx_system_city` VALUES (1409, 224172, 2, 221610, '331181000000', '龙泉市', '浙江,丽水,龙泉', '119.141461', '28.074623', 1); +INSERT INTO `yx_system_city` VALUES (1410, 224651, 2, 224650, '340101000000', '市辖区', '安徽,合肥', '117.227239', '31.820586', 1); +INSERT INTO `yx_system_city` VALUES (1411, 224652, 2, 224650, '340102000000', '瑶海区', '安徽,合肥,瑶海', '117.309229', '31.858048', 1); +INSERT INTO `yx_system_city` VALUES (1412, 224755, 2, 224650, '340103000000', '庐阳区', '安徽,合肥,庐阳', '117.264595', '31.878641', 1); +INSERT INTO `yx_system_city` VALUES (1413, 224838, 2, 224650, '340104000000', '蜀山区', '安徽,合肥,蜀山', '117.260536', '31.851158', 1); +INSERT INTO `yx_system_city` VALUES (1414, 224946, 2, 224650, '340111000000', '包河区', '安徽,合肥,包河', '117.309658', '31.793093', 1); +INSERT INTO `yx_system_city` VALUES (1415, 225062, 2, 224650, '340121000000', '长丰县', '安徽,合肥,长丰', '117.167564', '32.478018', 1); +INSERT INTO `yx_system_city` VALUES (1416, 225352, 2, 224650, '340122000000', '肥东县', '安徽,合肥,肥东', '117.469383', '31.887940', 1); +INSERT INTO `yx_system_city` VALUES (1417, 225705, 2, 224650, '340123000000', '肥西县', '安徽,合肥,肥西', '117.157981', '31.706810', 1); +INSERT INTO `yx_system_city` VALUES (1418, 225998, 2, 224650, '340124000000', '庐江县', '安徽,合肥,庐江', '117.287800', '31.255550', 1); +INSERT INTO `yx_system_city` VALUES (1419, 226249, 2, 224650, '340181000000', '巢湖市', '安徽,合肥,巢湖', '117.861800', '31.598628', 1); +INSERT INTO `yx_system_city` VALUES (1420, 226470, 2, 226469, '340201000000', '市辖区', '安徽,芜湖', '118.432941', '31.352859', 1); +INSERT INTO `yx_system_city` VALUES (1421, 226471, 2, 226469, '340202000000', '镜湖区', '安徽,芜湖,镜湖', '118.385146', '31.340404', 1); +INSERT INTO `yx_system_city` VALUES (1422, 226550, 2, 226469, '340203000000', '弋江区', '安徽,芜湖,弋江', '118.372655', '31.311757', 1); +INSERT INTO `yx_system_city` VALUES (1423, 226612, 2, 226469, '340207000000', '鸠江区', '安徽,芜湖,鸠江', '118.391734', '31.369373', 1); +INSERT INTO `yx_system_city` VALUES (1424, 226735, 2, 226469, '340208000000', '三山区', '安徽,芜湖,三山', '118.268101', '31.219568', 1); +INSERT INTO `yx_system_city` VALUES (1425, 226786, 2, 226469, '340221000000', '芜湖县', '安徽,芜湖,芜湖', '118.576124', '31.134809', 1); +INSERT INTO `yx_system_city` VALUES (1426, 226891, 2, 226469, '340222000000', '繁昌县', '安徽,芜湖,繁昌', '118.201349', '31.080896', 1); +INSERT INTO `yx_system_city` VALUES (1427, 226995, 2, 226469, '340223000000', '南陵县', '安徽,芜湖,南陵', '118.334360', '30.914923', 1); +INSERT INTO `yx_system_city` VALUES (1428, 227183, 2, 226469, '340225000000', '无为县', '安徽,芜湖,无为', '117.902366', '31.303168', 1); +INSERT INTO `yx_system_city` VALUES (1429, 227483, 2, 227482, '340301000000', '市辖区', '安徽,蚌埠', '117.389719', '32.916287', 1); +INSERT INTO `yx_system_city` VALUES (1430, 227484, 2, 227482, '340302000000', '龙子湖区', '安徽,蚌埠,龙子湖', '117.393790', '32.943014', 1); +INSERT INTO `yx_system_city` VALUES (1431, 227551, 2, 227482, '340303000000', '蚌山区', '安徽,蚌埠,蚌山', '117.367614', '32.944198', 1); +INSERT INTO `yx_system_city` VALUES (1432, 227598, 2, 227482, '340304000000', '禹会区', '安徽,蚌埠,禹会', '117.342451', '32.929711', 1); +INSERT INTO `yx_system_city` VALUES (1433, 227677, 2, 227482, '340311000000', '淮上区', '安徽,蚌埠,淮上', '117.359331', '32.965435', 1); +INSERT INTO `yx_system_city` VALUES (1434, 227769, 2, 227482, '340321000000', '怀远县', '安徽,蚌埠,怀远', '117.205234', '32.970031', 1); +INSERT INTO `yx_system_city` VALUES (1435, 228155, 2, 227482, '340322000000', '五河县', '安徽,蚌埠,五河', '117.879486', '33.127823', 1); +INSERT INTO `yx_system_city` VALUES (1436, 228388, 2, 227482, '340323000000', '固镇县', '安徽,蚌埠,固镇', '117.316955', '33.316899', 1); +INSERT INTO `yx_system_city` VALUES (1437, 228631, 2, 228630, '340401000000', '市辖区', '安徽,淮南', '116.999932', '32.625478', 1); +INSERT INTO `yx_system_city` VALUES (1438, 228632, 2, 228630, '340402000000', '大通区', '安徽,淮南,大通', '117.053273', '32.631533', 1); +INSERT INTO `yx_system_city` VALUES (1439, 228710, 2, 228630, '340403000000', '田家庵区', '安徽,淮南,田家庵', '117.017409', '32.647155', 1); +INSERT INTO `yx_system_city` VALUES (1440, 228853, 2, 228630, '340404000000', '谢家集区', '安徽,淮南,谢家集', '116.859048', '32.599901', 1); +INSERT INTO `yx_system_city` VALUES (1441, 228960, 2, 228630, '340405000000', '八公山区', '安徽,淮南,八公山', '116.833490', '32.631379', 1); +INSERT INTO `yx_system_city` VALUES (1442, 229029, 2, 228630, '340406000000', '潘集区', '安徽,淮南,潘集', '116.834716', '32.772080', 1); +INSERT INTO `yx_system_city` VALUES (1443, 229221, 2, 228630, '340421000000', '凤台县', '安徽,淮南,凤台', '116.711051', '32.709445', 1); +INSERT INTO `yx_system_city` VALUES (1444, 229527, 2, 228630, '340422000000', '寿县', '安徽,淮南,寿县', '116.787141', '32.573306', 1); +INSERT INTO `yx_system_city` VALUES (1445, 229845, 2, 229844, '340501000000', '市辖区', '安徽,马鞍山', '118.506759', '31.670452', 1); +INSERT INTO `yx_system_city` VALUES (1446, 229846, 2, 229844, '340503000000', '花山区', '安徽,马鞍山,花山', '118.492562', '31.719710', 1); +INSERT INTO `yx_system_city` VALUES (1447, 229922, 2, 229844, '340504000000', '雨山区', '安徽,马鞍山,雨山', '118.498560', '31.682208', 1); +INSERT INTO `yx_system_city` VALUES (1448, 229992, 2, 229844, '340506000000', '博望区', '安徽,马鞍山,博望', '118.844538', '31.558471', 1); +INSERT INTO `yx_system_city` VALUES (1449, 230041, 2, 229844, '340521000000', '当涂县', '安徽,马鞍山,当涂', '118.497972', '31.571213', 1); +INSERT INTO `yx_system_city` VALUES (1450, 230213, 2, 229844, '340522000000', '含山县', '安徽,马鞍山,含山', '118.101421', '31.735599', 1); +INSERT INTO `yx_system_city` VALUES (1451, 230345, 2, 229844, '340523000000', '和县', '安徽,马鞍山,和县', '118.351405', '31.741794', 1); +INSERT INTO `yx_system_city` VALUES (1452, 230477, 2, 230476, '340601000000', '市辖区', '安徽,淮北', '116.798265', '33.955844', 1); +INSERT INTO `yx_system_city` VALUES (1453, 230478, 2, 230476, '340602000000', '杜集区', '安徽,淮北,杜集', '116.828134', '33.991451', 1); +INSERT INTO `yx_system_city` VALUES (1454, 230539, 2, 230476, '340603000000', '相山区', '安徽,淮北,相山', '116.794345', '33.959893', 1); +INSERT INTO `yx_system_city` VALUES (1455, 230648, 2, 230476, '340604000000', '烈山区', '安徽,淮北,烈山', '116.813042', '33.895139', 1); +INSERT INTO `yx_system_city` VALUES (1456, 230720, 2, 230476, '340621000000', '濉溪县', '安徽,淮北,濉溪', '116.766299', '33.915477', 1); +INSERT INTO `yx_system_city` VALUES (1457, 230982, 2, 230981, '340701000000', '市辖区', '安徽,铜陵', '117.812079', '30.945429', 1); +INSERT INTO `yx_system_city` VALUES (1458, 230983, 2, 230981, '340705000000', '铜官区', '安徽,铜陵,铜官', '117.816174', '30.927608', 1); +INSERT INTO `yx_system_city` VALUES (1459, 231043, 2, 230981, '340706000000', '义安区', '安徽,铜陵,义安', '117.791544', '30.952823', 1); +INSERT INTO `yx_system_city` VALUES (1460, 231171, 2, 230981, '340711000000', '郊区', '安徽,铜陵,郊区', '117.807070', '30.908927', 1); +INSERT INTO `yx_system_city` VALUES (1461, 231216, 2, 230981, '340722000000', '枞阳县', '安徽,铜陵,枞阳', '117.220200', '30.700733', 1); +INSERT INTO `yx_system_city` VALUES (1462, 231500, 2, 231499, '340801000000', '市辖区', '安徽,安庆', '117.063754', '30.543494', 1); +INSERT INTO `yx_system_city` VALUES (1463, 231501, 2, 231499, '340802000000', '迎江区', '安徽,安庆,迎江', '117.091150', '30.511548', 1); +INSERT INTO `yx_system_city` VALUES (1464, 231558, 2, 231499, '340803000000', '大观区', '安徽,安庆,大观', '117.021670', '30.553957', 1); +INSERT INTO `yx_system_city` VALUES (1465, 231646, 2, 231499, '340811000000', '宜秀区', '安徽,安庆,宜秀', '117.070003', '30.541323', 1); +INSERT INTO `yx_system_city` VALUES (1466, 231710, 2, 231499, '340822000000', '怀宁县', '安徽,安庆,怀宁', '116.829475', '30.733825', 1); +INSERT INTO `yx_system_city` VALUES (1467, 231974, 2, 231499, '340824000000', '潜山县', '安徽,安庆,潜山', '116.581270', '30.631129', 1); +INSERT INTO `yx_system_city` VALUES (1468, 232180, 2, 231499, '340825000000', '太湖县', '安徽,安庆,太湖', '116.308795', '30.454220', 1); +INSERT INTO `yx_system_city` VALUES (1469, 232386, 2, 231499, '340826000000', '宿松县', '安徽,安庆,宿松', '116.129105', '30.153746', 1); +INSERT INTO `yx_system_city` VALUES (1470, 232631, 2, 231499, '340827000000', '望江县', '安徽,安庆,望江', '116.694183', '30.124428', 1); +INSERT INTO `yx_system_city` VALUES (1471, 232781, 2, 231499, '340828000000', '岳西县', '安徽,安庆,岳西', '116.359921', '30.849442', 1); +INSERT INTO `yx_system_city` VALUES (1472, 232996, 2, 231499, '340881000000', '桐城市', '安徽,安庆,桐城', '116.974120', '31.035800', 1); +INSERT INTO `yx_system_city` VALUES (1473, 233237, 2, 233236, '341001000000', '市辖区', '安徽,黄山', '118.337481', '29.714655', 1); +INSERT INTO `yx_system_city` VALUES (1474, 233238, 2, 233236, '341002000000', '屯溪区', '安徽,黄山,屯溪', '118.315329', '29.696109', 1); +INSERT INTO `yx_system_city` VALUES (1475, 233321, 2, 233236, '341003000000', '黄山区', '安徽,黄山,黄山', '118.141568', '30.272942', 1); +INSERT INTO `yx_system_city` VALUES (1476, 233423, 2, 233236, '341004000000', '徽州区', '安徽,黄山,徽州', '118.336751', '29.827279', 1); +INSERT INTO `yx_system_city` VALUES (1477, 233487, 2, 233236, '341021000000', '歙县', '安徽,黄山,歙县', '118.415356', '29.861308', 1); +INSERT INTO `yx_system_city` VALUES (1478, 233714, 2, 233236, '341022000000', '休宁县', '安徽,黄山,休宁', '118.199179', '29.789095', 1); +INSERT INTO `yx_system_city` VALUES (1479, 233894, 2, 233236, '341023000000', '黟县', '安徽,黄山,黟县', '117.938373', '29.924805', 1); +INSERT INTO `yx_system_city` VALUES (1480, 233973, 2, 233236, '341024000000', '祁门县', '安徽,黄山,祁门', '117.717396', '29.854055', 1); +INSERT INTO `yx_system_city` VALUES (1481, 234110, 2, 234109, '341101000000', '市辖区', '安徽,滁州', '118.317106', '32.301556', 1); +INSERT INTO `yx_system_city` VALUES (1482, 234111, 2, 234109, '341102000000', '琅琊区', '安徽,滁州,琅琊', '118.305843', '32.294530', 1); +INSERT INTO `yx_system_city` VALUES (1483, 234174, 2, 234109, '341103000000', '南谯区', '安徽,滁州,南谯', '118.296955', '32.329842', 1); +INSERT INTO `yx_system_city` VALUES (1484, 234274, 2, 234109, '341122000000', '来安县', '安徽,滁州,来安', '118.435792', '32.452172', 1); +INSERT INTO `yx_system_city` VALUES (1485, 234434, 2, 234109, '341124000000', '全椒县', '安徽,滁州,全椒', '118.273090', '32.085407', 1); +INSERT INTO `yx_system_city` VALUES (1486, 234560, 2, 234109, '341125000000', '定远县', '安徽,滁州,定远', '117.698563', '32.530982', 1); +INSERT INTO `yx_system_city` VALUES (1487, 234847, 2, 234109, '341126000000', '凤阳县', '安徽,滁州,凤阳', '117.531623', '32.874735', 1); +INSERT INTO `yx_system_city` VALUES (1488, 235112, 2, 234109, '341181000000', '天长市', '安徽,滁州,天长', '119.004817', '32.667571', 1); +INSERT INTO `yx_system_city` VALUES (1489, 235305, 2, 234109, '341182000000', '明光市', '安徽,滁州,明光', '118.018276', '32.781995', 1); +INSERT INTO `yx_system_city` VALUES (1490, 235484, 2, 235483, '341201000000', '市辖区', '安徽,阜阳', '115.814204', '32.890124', 1); +INSERT INTO `yx_system_city` VALUES (1491, 235485, 2, 235483, '341202000000', '颍州区', '安徽,阜阳,颍州', '115.806942', '32.883468', 1); +INSERT INTO `yx_system_city` VALUES (1492, 235646, 2, 235483, '341203000000', '颍东区', '安徽,阜阳,颍东', '115.856687', '32.912478', 1); +INSERT INTO `yx_system_city` VALUES (1493, 235778, 2, 235483, '341204000000', '颍泉区', '安徽,阜阳,颍泉', '115.808327', '32.924918', 1); +INSERT INTO `yx_system_city` VALUES (1494, 235909, 2, 235483, '341221000000', '临泉县', '安徽,阜阳,临泉', '115.261473', '33.040261', 1); +INSERT INTO `yx_system_city` VALUES (1495, 236338, 2, 235483, '341222000000', '太和县', '安徽,阜阳,太和', '115.621934', '33.160326', 1); +INSERT INTO `yx_system_city` VALUES (1496, 236685, 2, 235483, '341225000000', '阜南县', '安徽,阜阳,阜南', '115.595644', '32.658297', 1); +INSERT INTO `yx_system_city` VALUES (1497, 237046, 2, 235483, '341226000000', '颍上县', '安徽,阜阳,颍上', '116.256789', '32.653255', 1); +INSERT INTO `yx_system_city` VALUES (1498, 237428, 2, 235483, '341282000000', '界首市', '安徽,阜阳,界首', '115.374564', '33.257013', 1); +INSERT INTO `yx_system_city` VALUES (1499, 237608, 2, 237607, '341301000000', '市辖区', '安徽,宿州', '116.964356', '33.646373', 1); +INSERT INTO `yx_system_city` VALUES (1500, 237609, 2, 237607, '341302000000', '埇桥区', '安徽,宿州,埇桥', '116.977463', '33.640061', 1); +INSERT INTO `yx_system_city` VALUES (1501, 238022, 2, 237607, '341321000000', '砀山县', '安徽,宿州,砀山', '116.367095', '34.442561', 1); +INSERT INTO `yx_system_city` VALUES (1502, 238207, 2, 237607, '341322000000', '萧县', '安徽,宿州,萧县', '116.947290', '34.188728', 1); +INSERT INTO `yx_system_city` VALUES (1503, 238533, 2, 237607, '341323000000', '灵璧县', '安徽,宿州,灵璧', '117.552462', '33.552998', 1); +INSERT INTO `yx_system_city` VALUES (1504, 238872, 2, 237607, '341324000000', '泗县', '安徽,宿州,泗县', '117.910629', '33.482982', 1); +INSERT INTO `yx_system_city` VALUES (1505, 239085, 2, 239084, '341501000000', '市辖区', '安徽,六安', '116.521854', '31.733699', 1); +INSERT INTO `yx_system_city` VALUES (1506, 239086, 2, 239084, '341502000000', '金安区', '安徽,六安,金安', '116.539679', '31.749265', 1); +INSERT INTO `yx_system_city` VALUES (1507, 239450, 2, 239084, '341503000000', '裕安区', '安徽,六安,裕安', '116.479920', '31.737813', 1); +INSERT INTO `yx_system_city` VALUES (1508, 239780, 2, 239084, '341504000000', '叶集区', '安徽,六安,叶集', '116.521854', '31.733699', 1); +INSERT INTO `yx_system_city` VALUES (1509, 239834, 2, 239084, '341522000000', '霍邱县', '安徽,六安,霍邱', '116.277912', '32.353038', 1); +INSERT INTO `yx_system_city` VALUES (1510, 240310, 2, 239084, '341523000000', '舒城县', '安徽,六安,舒城', '116.948623', '31.462027', 1); +INSERT INTO `yx_system_city` VALUES (1511, 240759, 2, 239084, '341524000000', '金寨县', '安徽,六安,金寨', '115.934366', '31.727170', 1); +INSERT INTO `yx_system_city` VALUES (1512, 241016, 2, 239084, '341525000000', '霍山县', '安徽,六安,霍山', '116.332951', '31.392786', 1); +INSERT INTO `yx_system_city` VALUES (1513, 241181, 2, 241180, '341601000000', '市辖区', '安徽,亳州', '115.778676', '33.844582', 1); +INSERT INTO `yx_system_city` VALUES (1514, 241182, 2, 241180, '341602000000', '谯城区', '安徽,亳州,谯城', '115.779025', '33.876235', 1); +INSERT INTO `yx_system_city` VALUES (1515, 241517, 2, 241180, '341621000000', '涡阳县', '安徽,亳州,涡阳', '116.215665', '33.492921', 1); +INSERT INTO `yx_system_city` VALUES (1516, 241927, 2, 241180, '341622000000', '蒙城县', '安徽,亳州,蒙城', '116.564248', '33.265831', 1); +INSERT INTO `yx_system_city` VALUES (1517, 242245, 2, 241180, '341623000000', '利辛县', '安徽,亳州,利辛', '116.208635', '33.144724', 1); +INSERT INTO `yx_system_city` VALUES (1518, 242635, 2, 242634, '341701000000', '市辖区', '安徽,池州', '117.491568', '30.664800', 1); +INSERT INTO `yx_system_city` VALUES (1519, 242636, 2, 242634, '341702000000', '贵池区', '安徽,池州,贵池', '117.567379', '30.687181', 1); +INSERT INTO `yx_system_city` VALUES (1520, 242888, 2, 242634, '341721000000', '东至县', '安徽,池州,东至', '117.027533', '30.111182', 1); +INSERT INTO `yx_system_city` VALUES (1521, 243159, 2, 242634, '341722000000', '石台县', '安徽,池州,石台', '117.486306', '30.210313', 1); +INSERT INTO `yx_system_city` VALUES (1522, 243254, 2, 242634, '341723000000', '青阳县', '安徽,池州,青阳', '117.847362', '30.639230', 1); +INSERT INTO `yx_system_city` VALUES (1523, 243400, 2, 243399, '341801000000', '市辖区', '安徽,宣城', '118.758816', '30.940718', 1); +INSERT INTO `yx_system_city` VALUES (1524, 243401, 2, 243399, '341802000000', '宣州区', '安徽,宣城,宣州', '118.756328', '30.946319', 1); +INSERT INTO `yx_system_city` VALUES (1525, 243636, 2, 243399, '341821000000', '郎溪县', '安徽,宣城,郎溪', '119.179657', '31.126412', 1); +INSERT INTO `yx_system_city` VALUES (1526, 243753, 2, 243399, '341822000000', '广德县', '安徽,宣城,广德', '119.420935', '30.877555', 1); +INSERT INTO `yx_system_city` VALUES (1527, 243902, 2, 243399, '341823000000', '泾县', '安徽,宣城,泾县', '118.419864', '30.688578', 1); +INSERT INTO `yx_system_city` VALUES (1528, 244058, 2, 243399, '341824000000', '绩溪县', '安徽,宣城,绩溪', '118.578519', '30.067533', 1); +INSERT INTO `yx_system_city` VALUES (1529, 244153, 2, 243399, '341825000000', '旌德县', '安徽,宣城,旌德', '118.540487', '30.286350', 1); +INSERT INTO `yx_system_city` VALUES (1530, 244232, 2, 243399, '341881000000', '宁国市', '安徽,宣城,宁国', '118.982915', '30.633571', 1); +INSERT INTO `yx_system_city` VALUES (1531, 244379, 2, 244378, '350101000000', '市辖区', '福建,福州', '119.296494', '26.074507', 1); +INSERT INTO `yx_system_city` VALUES (1532, 244380, 2, 244378, '350102000000', '鼓楼区', '福建,福州,鼓楼', '119.303822', '26.082294', 1); +INSERT INTO `yx_system_city` VALUES (1533, 244460, 2, 244378, '350103000000', '台江区', '福建,福州,台江', '119.314054', '26.052842', 1); +INSERT INTO `yx_system_city` VALUES (1534, 244523, 2, 244378, '350104000000', '仓山区', '福建,福州,仓山', '119.273546', '26.046744', 1); +INSERT INTO `yx_system_city` VALUES (1535, 244713, 2, 244378, '350105000000', '马尾区', '福建,福州,马尾', '119.455589', '25.989500', 1); +INSERT INTO `yx_system_city` VALUES (1536, 244793, 2, 244378, '350111000000', '晋安区', '福建,福州,晋安', '119.328515', '26.082105', 1); +INSERT INTO `yx_system_city` VALUES (1537, 244987, 2, 244378, '350121000000', '闽侯县', '福建,福州,闽侯', '119.131725', '26.150047', 1); +INSERT INTO `yx_system_city` VALUES (1538, 245329, 2, 244378, '350122000000', '连江县', '福建,福州,连江', '119.539704', '26.197364', 1); +INSERT INTO `yx_system_city` VALUES (1539, 245633, 2, 244378, '350123000000', '罗源县', '福建,福州,罗源', '119.549776', '26.489559', 1); +INSERT INTO `yx_system_city` VALUES (1540, 245845, 2, 244378, '350124000000', '闽清县', '福建,福州,闽清', '118.863361', '26.221198', 1); +INSERT INTO `yx_system_city` VALUES (1541, 246154, 2, 244378, '350125000000', '永泰县', '福建,福州,永泰', '118.932592', '25.866695', 1); +INSERT INTO `yx_system_city` VALUES (1542, 246443, 2, 244378, '350128000000', '平潭县', '福建,福州,平潭', '119.790168', '25.498720', 1); +INSERT INTO `yx_system_city` VALUES (1543, 246667, 2, 244378, '350181000000', '福清市', '福建,福州,福清', '119.384334', '25.721143', 1); +INSERT INTO `yx_system_city` VALUES (1544, 247200, 2, 244378, '350182000000', '长乐市', '福建,福州,长乐', '119.523266', '25.962888', 1); +INSERT INTO `yx_system_city` VALUES (1545, 247479, 2, 247478, '350201000000', '市辖区', '福建,厦门', '118.089425', '24.479833', 1); +INSERT INTO `yx_system_city` VALUES (1546, 247480, 2, 247478, '350203000000', '思明区', '福建,厦门,思明', '118.082658', '24.445567', 1); +INSERT INTO `yx_system_city` VALUES (1547, 247590, 2, 247478, '350205000000', '海沧区', '福建,厦门,海沧', '118.032818', '24.484503', 1); +INSERT INTO `yx_system_city` VALUES (1548, 247641, 2, 247478, '350206000000', '湖里区', '福建,厦门,湖里', '118.146769', '24.512905', 1); +INSERT INTO `yx_system_city` VALUES (1549, 247704, 2, 247478, '350211000000', '集美区', '福建,厦门,集美', '118.097337', '24.575970', 1); +INSERT INTO `yx_system_city` VALUES (1550, 247782, 2, 247478, '350212000000', '同安区', '福建,厦门,同安', '118.152149', '24.722747', 1); +INSERT INTO `yx_system_city` VALUES (1551, 247933, 2, 247478, '350213000000', '翔安区', '福建,厦门,翔安', '118.248034', '24.618544', 1); +INSERT INTO `yx_system_city` VALUES (1552, 248060, 2, 248059, '350301000000', '市辖区', '福建,莆田', '119.007777', '25.454084', 1); +INSERT INTO `yx_system_city` VALUES (1553, 248061, 2, 248059, '350302000000', '城厢区', '福建,莆田,城厢', '118.993885', '25.419319', 1); +INSERT INTO `yx_system_city` VALUES (1554, 248189, 2, 248059, '350303000000', '涵江区', '福建,莆田,涵江', '119.116290', '25.458720', 1); +INSERT INTO `yx_system_city` VALUES (1555, 248403, 2, 248059, '350304000000', '荔城区', '福建,莆田,荔城', '119.015123', '25.431979', 1); +INSERT INTO `yx_system_city` VALUES (1556, 248540, 2, 248059, '350305000000', '秀屿区', '福建,莆田,秀屿', '119.105528', '25.318672', 1); +INSERT INTO `yx_system_city` VALUES (1557, 248753, 2, 248059, '350322000000', '仙游县', '福建,莆田,仙游', '118.691601', '25.362094', 1); +INSERT INTO `yx_system_city` VALUES (1558, 249099, 2, 249098, '350401000000', '市辖区', '福建,三明', '117.638678', '26.263406', 1); +INSERT INTO `yx_system_city` VALUES (1559, 249100, 2, 249098, '350402000000', '梅列区', '福建,三明,梅列', '117.645856', '26.271711', 1); +INSERT INTO `yx_system_city` VALUES (1560, 249157, 2, 249098, '350403000000', '三元区', '福建,三明,三元', '117.608045', '26.234020', 1); +INSERT INTO `yx_system_city` VALUES (1561, 249245, 2, 249098, '350421000000', '明溪县', '福建,三明,明溪', '117.201847', '26.357379', 1); +INSERT INTO `yx_system_city` VALUES (1562, 249351, 2, 249098, '350423000000', '清流县', '福建,三明,清流', '116.816909', '26.177797', 1); +INSERT INTO `yx_system_city` VALUES (1563, 249484, 2, 249098, '350424000000', '宁化县', '福建,三明,宁化', '116.654365', '26.261754', 1); +INSERT INTO `yx_system_city` VALUES (1564, 249728, 2, 249098, '350425000000', '大田县', '福建,三明,大田', '117.847115', '25.692699', 1); +INSERT INTO `yx_system_city` VALUES (1565, 250026, 2, 249098, '350426000000', '尤溪县', '福建,三明,尤溪', '118.190467', '26.170171', 1); +INSERT INTO `yx_system_city` VALUES (1566, 250307, 2, 249098, '350427000000', '沙县', '福建,三明,沙县', '117.792450', '26.397300', 1); +INSERT INTO `yx_system_city` VALUES (1567, 250512, 2, 249098, '350428000000', '将乐县', '福建,三明,将乐', '117.471373', '26.728953', 1); +INSERT INTO `yx_system_city` VALUES (1568, 250680, 2, 249098, '350429000000', '泰宁县', '福建,三明,泰宁', '117.175740', '26.900259', 1); +INSERT INTO `yx_system_city` VALUES (1569, 250809, 2, 249098, '350430000000', '建宁县', '福建,三明,建宁', '116.846084', '26.830902', 1); +INSERT INTO `yx_system_city` VALUES (1570, 250920, 2, 249098, '350481000000', '永安市', '福建,三明,永安', '117.365053', '25.941937', 1); +INSERT INTO `yx_system_city` VALUES (1571, 251198, 2, 251197, '350501000000', '市辖区', '福建,泉州', '118.675675', '24.874132', 1); +INSERT INTO `yx_system_city` VALUES (1572, 251199, 2, 251197, '350502000000', '鲤城区', '福建,泉州,鲤城', '118.586884', '24.907581', 1); +INSERT INTO `yx_system_city` VALUES (1573, 251289, 2, 251197, '350503000000', '丰泽区', '福建,泉州,丰泽', '118.613173', '24.891173', 1); +INSERT INTO `yx_system_city` VALUES (1574, 251376, 2, 251197, '350504000000', '洛江区', '福建,泉州,洛江', '118.671193', '24.939796', 1); +INSERT INTO `yx_system_city` VALUES (1575, 251470, 2, 251197, '350505000000', '泉港区', '福建,泉州,泉港', '118.916309', '25.119815', 1); +INSERT INTO `yx_system_city` VALUES (1576, 251580, 2, 251197, '350521000000', '惠安县', '福建,泉州,惠安', '118.796605', '25.030781', 1); +INSERT INTO `yx_system_city` VALUES (1577, 251897, 2, 251197, '350524000000', '安溪县', '福建,泉州,安溪', '118.186289', '25.055955', 1); +INSERT INTO `yx_system_city` VALUES (1578, 252406, 2, 251197, '350525000000', '永春县', '福建,泉州,永春', '118.294048', '25.321565', 1); +INSERT INTO `yx_system_city` VALUES (1579, 252665, 2, 251197, '350526000000', '德化县', '福建,泉州,德化', '118.241094', '25.491494', 1); +INSERT INTO `yx_system_city` VALUES (1580, 252894, 2, 251197, '350527000000', '金门县', '福建,泉州,金门', '118.317089', '24.432706', 1); +INSERT INTO `yx_system_city` VALUES (1581, 252895, 2, 251197, '350581000000', '石狮市', '福建,泉州,石狮', '118.648066', '24.732204', 1); +INSERT INTO `yx_system_city` VALUES (1582, 253032, 2, 251197, '350582000000', '晋江市', '福建,泉州,晋江', '118.552365', '24.781681', 1); +INSERT INTO `yx_system_city` VALUES (1583, 253454, 2, 251197, '350583000000', '南安市', '福建,泉州,南安', '118.386279', '24.960385', 1); +INSERT INTO `yx_system_city` VALUES (1584, 253906, 2, 253905, '350601000000', '市辖区', '福建,漳州', '117.647481', '24.512948', 1); +INSERT INTO `yx_system_city` VALUES (1585, 253907, 2, 253905, '350602000000', '芗城区', '福建,漳州,芗城', '117.653975', '24.510900', 1); +INSERT INTO `yx_system_city` VALUES (1586, 254093, 2, 253905, '350603000000', '龙文区', '福建,漳州,龙文', '117.709755', '24.503113', 1); +INSERT INTO `yx_system_city` VALUES (1587, 254170, 2, 253905, '350622000000', '云霄县', '福建,漳州,云霄', '117.339573', '23.957936', 1); +INSERT INTO `yx_system_city` VALUES (1588, 254394, 2, 253905, '350623000000', '漳浦县', '福建,漳州,漳浦', '117.613808', '24.117102', 1); +INSERT INTO `yx_system_city` VALUES (1589, 254747, 2, 253905, '350624000000', '诏安县', '福建,漳州,诏安', '117.175185', '23.711579', 1); +INSERT INTO `yx_system_city` VALUES (1590, 255011, 2, 253905, '350625000000', '长泰县', '福建,漳州,长泰', '117.759153', '24.625449', 1); +INSERT INTO `yx_system_city` VALUES (1591, 255105, 2, 253905, '350626000000', '东山县', '福建,漳州,东山', '117.430061', '23.701262', 1); +INSERT INTO `yx_system_city` VALUES (1592, 255190, 2, 253905, '350627000000', '南靖县', '福建,漳州,南靖', '117.357321', '24.514654', 1); +INSERT INTO `yx_system_city` VALUES (1593, 255405, 2, 253905, '350628000000', '平和县', '福建,漳州,平和', '117.314891', '24.363437', 1); +INSERT INTO `yx_system_city` VALUES (1594, 255680, 2, 253905, '350629000000', '华安县', '福建,漳州,华安', '117.534103', '25.004425', 1); +INSERT INTO `yx_system_city` VALUES (1595, 255789, 2, 253905, '350681000000', '龙海市', '福建,漳州,龙海', '117.818197', '24.446706', 1); +INSERT INTO `yx_system_city` VALUES (1596, 256113, 2, 256112, '350701000000', '市辖区', '福建,南平', '118.177708', '26.641768', 1); +INSERT INTO `yx_system_city` VALUES (1597, 256114, 2, 256112, '350702000000', '延平区', '福建,南平,延平', '118.181894', '26.637457', 1); +INSERT INTO `yx_system_city` VALUES (1598, 256452, 2, 256112, '350703000000', '建阳区', '福建,南平,建阳', '118.120464', '27.331876', 1); +INSERT INTO `yx_system_city` VALUES (1599, 256687, 2, 256112, '350721000000', '顺昌县', '福建,南平,顺昌', '117.810357', '26.793288', 1); +INSERT INTO `yx_system_city` VALUES (1600, 256849, 2, 256112, '350722000000', '浦城县', '福建,南平,浦城', '118.541256', '27.917263', 1); +INSERT INTO `yx_system_city` VALUES (1601, 257172, 2, 256112, '350723000000', '光泽县', '福建,南平,光泽', '117.334106', '27.540988', 1); +INSERT INTO `yx_system_city` VALUES (1602, 257276, 2, 256112, '350724000000', '松溪县', '福建,南平,松溪', '118.785468', '27.526232', 1); +INSERT INTO `yx_system_city` VALUES (1603, 257395, 2, 256112, '350725000000', '政和县', '福建,南平,政和', '118.857642', '27.366104', 1); +INSERT INTO `yx_system_city` VALUES (1604, 257539, 2, 256112, '350781000000', '邵武市', '福建,南平,邵武', '117.492534', '27.340327', 1); +INSERT INTO `yx_system_city` VALUES (1605, 257733, 2, 256112, '350782000000', '武夷山市', '福建,南平,武夷山', '118.035310', '27.756648', 1); +INSERT INTO `yx_system_city` VALUES (1606, 257886, 2, 256112, '350783000000', '建瓯市', '福建,南平,建瓯', '118.304988', '27.022727', 1); +INSERT INTO `yx_system_city` VALUES (1607, 258161, 2, 258160, '350801000000', '市辖区', '福建,龙岩', '117.017536', '25.075123', 1); +INSERT INTO `yx_system_city` VALUES (1608, 258162, 2, 258160, '350802000000', '新罗区', '福建,龙岩,新罗', '117.037264', '25.098292', 1); +INSERT INTO `yx_system_city` VALUES (1609, 258520, 2, 258160, '350803000000', '永定区', '福建,龙岩,永定', '116.732092', '24.723962', 1); +INSERT INTO `yx_system_city` VALUES (1610, 258825, 2, 258160, '350821000000', '长汀县', '福建,龙岩,长汀', '116.357581', '25.833531', 1); +INSERT INTO `yx_system_city` VALUES (1611, 259144, 2, 258160, '350823000000', '上杭县', '福建,龙岩,上杭', '116.420099', '25.049518', 1); +INSERT INTO `yx_system_city` VALUES (1612, 259512, 2, 258160, '350824000000', '武平县', '福建,龙岩,武平', '116.100342', '25.095277', 1); +INSERT INTO `yx_system_city` VALUES (1613, 259749, 2, 258160, '350825000000', '连城县', '福建,龙岩,连城', '116.754473', '25.710539', 1); +INSERT INTO `yx_system_city` VALUES (1614, 260014, 2, 258160, '350881000000', '漳平市', '福建,龙岩,漳平', '117.419998', '25.290185', 1); +INSERT INTO `yx_system_city` VALUES (1615, 260231, 2, 260230, '350901000000', '市辖区', '福建,宁德', '119.547932', '26.665617', 1); +INSERT INTO `yx_system_city` VALUES (1616, 260232, 2, 260230, '350902000000', '蕉城区', '福建,宁德,蕉城', '119.526299', '26.660611', 1); +INSERT INTO `yx_system_city` VALUES (1617, 260575, 2, 260230, '350921000000', '霞浦县', '福建,宁德,霞浦', '120.005643', '26.885204', 1); +INSERT INTO `yx_system_city` VALUES (1618, 260905, 2, 260230, '350922000000', '古田县', '福建,宁德,古田', '118.746284', '26.577837', 1); +INSERT INTO `yx_system_city` VALUES (1619, 261211, 2, 260230, '350923000000', '屏南县', '福建,宁德,屏南', '118.985895', '26.908276', 1); +INSERT INTO `yx_system_city` VALUES (1620, 261382, 2, 260230, '350924000000', '寿宁县', '福建,宁德,寿宁', '119.514987', '27.454479', 1); +INSERT INTO `yx_system_city` VALUES (1621, 261602, 2, 260230, '350925000000', '周宁县', '福建,宁德,周宁', '119.339025', '27.104591', 1); +INSERT INTO `yx_system_city` VALUES (1622, 261759, 2, 260230, '350926000000', '柘荣县', '福建,宁德,柘荣', '119.900609', '27.233933', 1); +INSERT INTO `yx_system_city` VALUES (1623, 261885, 2, 260230, '350981000000', '福安市', '福建,宁德,福安', '119.647770', '27.088049', 1); +INSERT INTO `yx_system_city` VALUES (1624, 262395, 2, 260230, '350982000000', '福鼎市', '福建,宁德,福鼎', '120.216978', '27.324479', 1); +INSERT INTO `yx_system_city` VALUES (1625, 262700, 2, 262699, '360101000000', '市辖区', '江西,南昌', '115.858197', '28.682892', 1); +INSERT INTO `yx_system_city` VALUES (1626, 262701, 2, 262699, '360102000000', '东湖区', '江西,南昌,东湖', '115.899262', '28.685085', 1); +INSERT INTO `yx_system_city` VALUES (1627, 262889, 2, 262699, '360103000000', '西湖区', '江西,南昌,西湖', '115.877233', '28.657595', 1); +INSERT INTO `yx_system_city` VALUES (1628, 263058, 2, 262699, '360104000000', '青云谱区', '江西,南昌,青云谱', '115.925749', '28.621169', 1); +INSERT INTO `yx_system_city` VALUES (1629, 263152, 2, 262699, '360105000000', '湾里区', '江西,南昌,湾里', '115.730847', '28.714796', 1); +INSERT INTO `yx_system_city` VALUES (1630, 263217, 2, 262699, '360111000000', '青山湖区', '江西,南昌,青山湖', '115.962144', '28.682985', 1); +INSERT INTO `yx_system_city` VALUES (1631, 263496, 2, 262699, '360112000000', '新建区', '江西,南昌,新建', '115.815278', '28.692864', 1); +INSERT INTO `yx_system_city` VALUES (1632, 263948, 2, 262699, '360121000000', '南昌县', '江西,南昌,南昌', '115.944304', '28.545602', 1); +INSERT INTO `yx_system_city` VALUES (1633, 264375, 2, 262699, '360123000000', '安义县', '江西,南昌,安义', '115.549247', '28.844507', 1); +INSERT INTO `yx_system_city` VALUES (1634, 264517, 2, 262699, '360124000000', '进贤县', '江西,南昌,进贤', '116.240924', '28.376918', 1); +INSERT INTO `yx_system_city` VALUES (1635, 264863, 2, 264862, '360201000000', '市辖区', '江西,景德镇', '117.178419', '29.268835', 1); +INSERT INTO `yx_system_city` VALUES (1636, 264864, 2, 264862, '360202000000', '昌江区', '江西,景德镇,昌江', '117.183748', '29.273435', 1); +INSERT INTO `yx_system_city` VALUES (1637, 264962, 2, 264862, '360203000000', '珠山区', '江西,景德镇,珠山', '117.202893', '29.299923', 1); +INSERT INTO `yx_system_city` VALUES (1638, 265083, 2, 264862, '360222000000', '浮梁县', '江西,景德镇,浮梁', '117.215086', '29.351681', 1); +INSERT INTO `yx_system_city` VALUES (1639, 265297, 2, 264862, '360281000000', '乐平市', '江西,景德镇,乐平', '117.151796', '28.978440', 1); +INSERT INTO `yx_system_city` VALUES (1640, 265678, 2, 265677, '360301000000', '市辖区', '江西,萍乡', '113.854556', '27.622768', 1); +INSERT INTO `yx_system_city` VALUES (1641, 265679, 2, 265677, '360302000000', '安源区', '江西,萍乡,安源', '113.870730', '27.615202', 1); +INSERT INTO `yx_system_city` VALUES (1642, 265826, 2, 265677, '360313000000', '湘东区', '江西,萍乡,湘东', '113.733047', '27.640075', 1); +INSERT INTO `yx_system_city` VALUES (1643, 265994, 2, 265677, '360321000000', '莲花县', '江西,萍乡,莲花', '113.961465', '27.127669', 1); +INSERT INTO `yx_system_city` VALUES (1644, 266171, 2, 265677, '360322000000', '上栗县', '江西,萍乡,上栗', '113.795311', '27.880302', 1); +INSERT INTO `yx_system_city` VALUES (1645, 266356, 2, 265677, '360323000000', '芦溪县', '江西,萍乡,芦溪', '114.029828', '27.630806', 1); +INSERT INTO `yx_system_city` VALUES (1646, 266522, 2, 266521, '360401000000', '市辖区', '江西,九江', '116.001930', '29.705077', 1); +INSERT INTO `yx_system_city` VALUES (1647, 266523, 2, 266521, '360402000000', '濂溪区', '江西,九江,濂溪', '116.011380', '29.678540', 1); +INSERT INTO `yx_system_city` VALUES (1648, 266665, 2, 266521, '360403000000', '浔阳区', '江西,九江,浔阳', '115.990301', '29.727593', 1); +INSERT INTO `yx_system_city` VALUES (1649, 266781, 2, 266521, '360421000000', '九江县', '江西,九江,九江', '115.911323', '29.608431', 1); +INSERT INTO `yx_system_city` VALUES (1650, 266946, 2, 266521, '360423000000', '武宁县', '江西,九江,武宁', '115.100578', '29.256323', 1); +INSERT INTO `yx_system_city` VALUES (1651, 267168, 2, 266521, '360424000000', '修水县', '江西,九江,修水', '114.546702', '29.026022', 1); +INSERT INTO `yx_system_city` VALUES (1652, 267613, 2, 266521, '360425000000', '永修县', '江西,九江,永修', '115.832453', '29.012297', 1); +INSERT INTO `yx_system_city` VALUES (1653, 267868, 2, 266521, '360426000000', '德安县', '江西,九江,德安', '115.767484', '29.298738', 1); +INSERT INTO `yx_system_city` VALUES (1654, 267982, 2, 266521, '360428000000', '都昌县', '江西,九江,都昌', '116.204099', '29.273194', 1); +INSERT INTO `yx_system_city` VALUES (1655, 268318, 2, 266521, '360429000000', '湖口县', '江西,九江,湖口', '116.251947', '29.731101', 1); +INSERT INTO `yx_system_city` VALUES (1656, 268480, 2, 266521, '360430000000', '彭泽县', '江西,九江,彭泽', '116.549359', '29.896061', 1); +INSERT INTO `yx_system_city` VALUES (1657, 268689, 2, 266521, '360481000000', '瑞昌市', '江西,九江,瑞昌', '115.681337', '29.675874', 1); +INSERT INTO `yx_system_city` VALUES (1658, 268926, 2, 266521, '360482000000', '共青城市', '江西,九江,共青城', '115.808844', '29.248317', 1); +INSERT INTO `yx_system_city` VALUES (1659, 268995, 2, 266521, '360483000000', '庐山市', '江西,九江,庐山', '116.045060', '29.448128', 1); +INSERT INTO `yx_system_city` VALUES (1660, 269108, 2, 269107, '360501000000', '市辖区', '江西,新余', '114.917346', '27.817808', 1); +INSERT INTO `yx_system_city` VALUES (1661, 269109, 2, 269107, '360502000000', '渝水区', '江西,新余,渝水', '114.944646', '27.800387', 1); +INSERT INTO `yx_system_city` VALUES (1662, 269465, 2, 269107, '360521000000', '分宜县', '江西,新余,分宜', '114.692050', '27.814758', 1); +INSERT INTO `yx_system_city` VALUES (1663, 269655, 2, 269654, '360601000000', '市辖区', '江西,鹰潭', '117.069202', '28.260189', 1); +INSERT INTO `yx_system_city` VALUES (1664, 269656, 2, 269654, '360602000000', '月湖区', '江西,鹰潭,月湖', '117.037137', '28.239153', 1); +INSERT INTO `yx_system_city` VALUES (1665, 269746, 2, 269654, '360622000000', '余江县', '江西,鹰潭,余江', '116.822763', '28.206177', 1); +INSERT INTO `yx_system_city` VALUES (1666, 269942, 2, 269654, '360681000000', '贵溪市', '江西,鹰潭,贵溪', '117.245497', '28.292519', 1); +INSERT INTO `yx_system_city` VALUES (1667, 270223, 2, 270222, '360701000000', '市辖区', '江西,赣州', '114.935029', '25.831829', 1); +INSERT INTO `yx_system_city` VALUES (1668, 270224, 2, 270222, '360702000000', '章贡区', '江西,赣州,章贡', '114.921171', '25.817816', 1); +INSERT INTO `yx_system_city` VALUES (1669, 270442, 2, 270222, '360703000000', '南康区', '江西,赣州,南康', '114.765403', '25.661471', 1); +INSERT INTO `yx_system_city` VALUES (1670, 270780, 2, 270222, '360721000000', '赣县', '江西,赣州,赣县', '115.011561', '25.860691', 1); +INSERT INTO `yx_system_city` VALUES (1671, 271095, 2, 270222, '360722000000', '信丰县', '江西,赣州,信丰', '114.922830', '25.386704', 1); +INSERT INTO `yx_system_city` VALUES (1672, 271410, 2, 270222, '360723000000', '大余县', '江西,赣州,大余', '114.362112', '25.401314', 1); +INSERT INTO `yx_system_city` VALUES (1673, 271541, 2, 270222, '360724000000', '上犹县', '江西,赣州,上犹', '114.551138', '25.785172', 1); +INSERT INTO `yx_system_city` VALUES (1674, 271699, 2, 270222, '360725000000', '崇义县', '江西,赣州,崇义', '114.308267', '25.681784', 1); +INSERT INTO `yx_system_city` VALUES (1675, 271848, 2, 270222, '360726000000', '安远县', '江西,赣州,安远', '115.393922', '25.136927', 1); +INSERT INTO `yx_system_city` VALUES (1676, 272033, 2, 270222, '360727000000', '龙南县', '江西,赣州,龙南', '114.789873', '24.911069', 1); +INSERT INTO `yx_system_city` VALUES (1677, 272156, 2, 270222, '360728000000', '定南县', '江西,赣州,定南', '115.027845', '24.784410', 1); +INSERT INTO `yx_system_city` VALUES (1678, 272302, 2, 270222, '360729000000', '全南县', '江西,赣州,全南', '114.530125', '24.742403', 1); +INSERT INTO `yx_system_city` VALUES (1679, 272408, 2, 270222, '360730000000', '宁都县', '江西,赣州,宁都', '116.009472', '26.470116', 1); +INSERT INTO `yx_system_city` VALUES (1680, 272767, 2, 270222, '360731000000', '于都县', '江西,赣州,于都', '115.415508', '25.952069', 1); +INSERT INTO `yx_system_city` VALUES (1681, 273183, 2, 270222, '360732000000', '兴国县', '江西,赣州,兴国', '115.363190', '26.337937', 1); +INSERT INTO `yx_system_city` VALUES (1682, 273525, 2, 270222, '360733000000', '会昌县', '江西,赣州,会昌', '115.786057', '25.600272', 1); +INSERT INTO `yx_system_city` VALUES (1683, 273820, 2, 270222, '360734000000', '寻乌县', '江西,赣州,寻乌', '115.646636', '24.963371', 1); +INSERT INTO `yx_system_city` VALUES (1684, 274020, 2, 270222, '360735000000', '石城县', '江西,赣州,石城', '116.346995', '26.314775', 1); +INSERT INTO `yx_system_city` VALUES (1685, 274184, 2, 270222, '360781000000', '瑞金市', '江西,赣州,瑞金', '116.027135', '25.885555', 1); +INSERT INTO `yx_system_city` VALUES (1686, 274445, 2, 274444, '360801000000', '市辖区', '江西,吉安', '114.992509', '27.113443', 1); +INSERT INTO `yx_system_city` VALUES (1687, 274446, 2, 274444, '360802000000', '吉州区', '江西,吉安,吉州', '114.994764', '27.143801', 1); +INSERT INTO `yx_system_city` VALUES (1688, 274592, 2, 274444, '360803000000', '青原区', '江西,吉安,青原', '115.014812', '27.081977', 1); +INSERT INTO `yx_system_city` VALUES (1689, 274736, 2, 274444, '360821000000', '吉安县', '江西,吉安,吉安', '114.907733', '27.039890', 1); +INSERT INTO `yx_system_city` VALUES (1690, 275105, 2, 274444, '360822000000', '吉水县', '江西,吉安,吉水', '115.135507', '27.229632', 1); +INSERT INTO `yx_system_city` VALUES (1691, 275406, 2, 274444, '360823000000', '峡江县', '江西,吉安,峡江', '115.316566', '27.582901', 1); +INSERT INTO `yx_system_city` VALUES (1692, 275511, 2, 274444, '360824000000', '新干县', '江西,吉安,新干', '115.387052', '27.740192', 1); +INSERT INTO `yx_system_city` VALUES (1693, 275694, 2, 274444, '360825000000', '永丰县', '江西,吉安,永丰', '115.444320', '27.318852', 1); +INSERT INTO `yx_system_city` VALUES (1694, 275956, 2, 274444, '360826000000', '泰和县', '江西,吉安,泰和', '114.908869', '26.789960', 1); +INSERT INTO `yx_system_city` VALUES (1695, 276331, 2, 274444, '360827000000', '遂川县', '江西,吉安,遂川', '114.520537', '26.313737', 1); +INSERT INTO `yx_system_city` VALUES (1696, 276700, 2, 274444, '360828000000', '万安县', '江西,吉安,万安', '114.786182', '26.458254', 1); +INSERT INTO `yx_system_city` VALUES (1697, 276874, 2, 274444, '360829000000', '安福县', '江西,吉安,安福', '114.619893', '27.392874', 1); +INSERT INTO `yx_system_city` VALUES (1698, 277170, 2, 274444, '360830000000', '永新县', '江西,吉安,永新', '114.243096', '26.945002', 1); +INSERT INTO `yx_system_city` VALUES (1699, 277459, 2, 274444, '360881000000', '井冈山市', '江西,吉安,井冈山', '114.289228', '26.748081', 1); +INSERT INTO `yx_system_city` VALUES (1700, 277616, 2, 277615, '360901000000', '市辖区', '江西,宜春', '114.416778', '27.815619', 1); +INSERT INTO `yx_system_city` VALUES (1701, 277617, 2, 277615, '360902000000', '袁州区', '江西,宜春,袁州', '114.424657', '27.798846', 1); +INSERT INTO `yx_system_city` VALUES (1702, 278033, 2, 277615, '360921000000', '奉新县', '江西,宜春,奉新', '115.400491', '28.688423', 1); +INSERT INTO `yx_system_city` VALUES (1703, 278249, 2, 277615, '360922000000', '万载县', '江西,宜春,万载', '114.445523', '28.106004', 1); +INSERT INTO `yx_system_city` VALUES (1704, 278471, 2, 277615, '360923000000', '上高县', '江西,宜春,上高', '114.947594', '28.238509', 1); +INSERT INTO `yx_system_city` VALUES (1705, 278710, 2, 277615, '360924000000', '宜丰县', '江西,宜春,宜丰', '114.803515', '28.393666', 1); +INSERT INTO `yx_system_city` VALUES (1706, 278975, 2, 277615, '360925000000', '靖安县', '江西,宜春,靖安', '115.362629', '28.861479', 1); +INSERT INTO `yx_system_city` VALUES (1707, 279095, 2, 277615, '360926000000', '铜鼓县', '江西,宜春,铜鼓', '114.371172', '28.520770', 1); +INSERT INTO `yx_system_city` VALUES (1708, 279220, 2, 277615, '360981000000', '丰城市', '江西,宜春,丰城', '115.771094', '28.159142', 1); +INSERT INTO `yx_system_city` VALUES (1709, 279845, 2, 277615, '360982000000', '樟树市', '江西,宜春,樟树', '115.546385', '28.054814', 1); +INSERT INTO `yx_system_city` VALUES (1710, 280166, 2, 277615, '360983000000', '高安市', '江西,宜春,高安', '115.375616', '28.417255', 1); +INSERT INTO `yx_system_city` VALUES (1711, 280563, 2, 280562, '361001000000', '市辖区', '江西,抚州', '116.358181', '27.949217', 1); +INSERT INTO `yx_system_city` VALUES (1712, 280564, 2, 280562, '361002000000', '临川区', '江西,抚州,临川', '116.312167', '27.934573', 1); +INSERT INTO `yx_system_city` VALUES (1713, 281098, 2, 280562, '361021000000', '南城县', '江西,抚州,南城', '116.637040', '27.569678', 1); +INSERT INTO `yx_system_city` VALUES (1714, 281285, 2, 280562, '361022000000', '黎川县', '江西,抚州,黎川', '116.907681', '27.282333', 1); +INSERT INTO `yx_system_city` VALUES (1715, 281443, 2, 280562, '361023000000', '南丰县', '江西,抚州,南丰', '116.525725', '27.218445', 1); +INSERT INTO `yx_system_city` VALUES (1716, 281641, 2, 280562, '361024000000', '崇仁县', '江西,抚州,崇仁', '116.061101', '27.764394', 1); +INSERT INTO `yx_system_city` VALUES (1717, 281827, 2, 280562, '361025000000', '乐安县', '江西,抚州,乐安', '115.830481', '27.428765', 1); +INSERT INTO `yx_system_city` VALUES (1718, 282036, 2, 280562, '361026000000', '宜黄县', '江西,抚州,宜黄', '116.222128', '27.546146', 1); +INSERT INTO `yx_system_city` VALUES (1719, 282206, 2, 280562, '361027000000', '金溪县', '江西,抚州,金溪', '116.755058', '27.918959', 1); +INSERT INTO `yx_system_city` VALUES (1720, 282391, 2, 280562, '361028000000', '资溪县', '江西,抚州,资溪', '117.060264', '27.706102', 1); +INSERT INTO `yx_system_city` VALUES (1721, 282482, 2, 280562, '361029000000', '东乡县', '江西,抚州,东乡县', '116.603560', '28.247697', 1); +INSERT INTO `yx_system_city` VALUES (1722, 282684, 2, 280562, '361030000000', '广昌县', '江西,抚州,广昌', '116.325757', '26.837267', 1); +INSERT INTO `yx_system_city` VALUES (1723, 282842, 2, 282841, '361101000000', '市辖区', '江西,上饶', '117.943433', '28.454862', 1); +INSERT INTO `yx_system_city` VALUES (1724, 282843, 2, 282841, '361102000000', '信州区', '江西,上饶,信州', '117.966460', '28.431002', 1); +INSERT INTO `yx_system_city` VALUES (1725, 282978, 2, 282841, '361103000000', '广丰区', '江西,上饶,广丰', '118.191240', '28.436286', 1); +INSERT INTO `yx_system_city` VALUES (1726, 283240, 2, 282841, '361121000000', '上饶县', '江西,上饶,上饶', '117.907850', '28.448983', 1); +INSERT INTO `yx_system_city` VALUES (1727, 283511, 2, 282841, '361123000000', '玉山县', '江西,上饶,玉山', '118.245124', '28.682055', 1); +INSERT INTO `yx_system_city` VALUES (1728, 283769, 2, 282841, '361124000000', '铅山县', '江西,上饶,铅山', '117.709451', '28.315217', 1); +INSERT INTO `yx_system_city` VALUES (1729, 283970, 2, 282841, '361125000000', '横峰县', '江西,上饶,横峰', '117.596452', '28.407118', 1); +INSERT INTO `yx_system_city` VALUES (1730, 284066, 2, 282841, '361126000000', '弋阳县', '江西,上饶,弋阳', '117.449588', '28.378044', 1); +INSERT INTO `yx_system_city` VALUES (1731, 284239, 2, 282841, '361127000000', '余干县', '江西,上饶,余干', '116.695647', '28.702302', 1); +INSERT INTO `yx_system_city` VALUES (1732, 284706, 2, 282841, '361128000000', '鄱阳县', '江西,上饶,鄱阳', '116.699746', '29.011699', 1); +INSERT INTO `yx_system_city` VALUES (1733, 285319, 2, 282841, '361129000000', '万年县', '江西,上饶,万年', '117.058445', '28.694582', 1); +INSERT INTO `yx_system_city` VALUES (1734, 285488, 2, 282841, '361130000000', '婺源县', '江西,上饶,婺源', '117.861798', '29.248086', 1); +INSERT INTO `yx_system_city` VALUES (1735, 285711, 2, 282841, '361181000000', '德兴市', '江西,上饶,德兴', '117.578713', '28.946464', 1); +INSERT INTO `yx_system_city` VALUES (1736, 285862, 2, 285861, '370101000000', '市辖区', '山东,济南', '117.119999', '36.651216', 1); +INSERT INTO `yx_system_city` VALUES (1737, 285863, 2, 285861, '370102000000', '历下区', '山东,济南,历下', '117.076455', '36.666412', 1); +INSERT INTO `yx_system_city` VALUES (1738, 285991, 2, 285861, '370103000000', '市中区', '山东,济南,市中', '116.997777', '36.651474', 1); +INSERT INTO `yx_system_city` VALUES (1739, 286215, 2, 285861, '370104000000', '槐荫区', '山东,济南,槐荫', '116.901224', '36.651441', 1); +INSERT INTO `yx_system_city` VALUES (1740, 286404, 2, 285861, '370105000000', '天桥区', '山东,济南,天桥', '116.987492', '36.678016', 1); +INSERT INTO `yx_system_city` VALUES (1741, 286683, 2, 285861, '370112000000', '历城区', '山东,济南,历城', '117.065237', '36.680017', 1); +INSERT INTO `yx_system_city` VALUES (1742, 287424, 2, 285861, '370113000000', '长清区', '山东,济南,长清', '116.751937', '36.553571', 1); +INSERT INTO `yx_system_city` VALUES (1743, 288084, 2, 285861, '370124000000', '平阴县', '山东,济南,平阴', '116.456187', '36.289265', 1); +INSERT INTO `yx_system_city` VALUES (1744, 288448, 2, 285861, '370125000000', '济阳县', '山东,济南,济阳', '117.173525', '36.978537', 1); +INSERT INTO `yx_system_city` VALUES (1745, 289313, 2, 285861, '370126000000', '商河县', '山东,济南,商河', '117.157183', '37.309045', 1); +INSERT INTO `yx_system_city` VALUES (1746, 290291, 2, 285861, '370181000000', '章丘市', '山东,济南,章丘', '117.526228', '36.681259', 1); +INSERT INTO `yx_system_city` VALUES (1747, 291236, 2, 291235, '370201000000', '市辖区', '山东,青岛', '120.382639', '36.067082', 1); +INSERT INTO `yx_system_city` VALUES (1748, 291237, 2, 291235, '370202000000', '市南区', '山东,青岛,市南', '120.412392', '36.075651', 1); +INSERT INTO `yx_system_city` VALUES (1749, 291313, 2, 291235, '370203000000', '市北区', '山东,青岛,市北', '120.374731', '36.087609', 1); +INSERT INTO `yx_system_city` VALUES (1750, 291468, 2, 291235, '370211000000', '黄岛区', '山东,青岛,黄岛', '120.046190', '35.872664', 1); +INSERT INTO `yx_system_city` VALUES (1751, 292713, 2, 291235, '370212000000', '崂山区', '山东,青岛,崂山', '120.468956', '36.107538', 1); +INSERT INTO `yx_system_city` VALUES (1752, 292879, 2, 291235, '370213000000', '李沧区', '山东,青岛,李沧', '120.432697', '36.145463', 1); +INSERT INTO `yx_system_city` VALUES (1753, 293008, 2, 291235, '370214000000', '城阳区', '山东,青岛,城阳', '120.396310', '36.307064', 1); +INSERT INTO `yx_system_city` VALUES (1754, 293241, 2, 291235, '370281000000', '胶州市', '山东,青岛,胶州', '120.033382', '36.264680', 1); +INSERT INTO `yx_system_city` VALUES (1755, 294138, 2, 291235, '370282000000', '即墨市', '山东,青岛,即墨', '120.447128', '36.389639', 1); +INSERT INTO `yx_system_city` VALUES (1756, 295251, 2, 291235, '370283000000', '平度市', '山东,青岛,平度', '119.988420', '36.776358', 1); +INSERT INTO `yx_system_city` VALUES (1757, 297121, 2, 291235, '370285000000', '莱西市', '山东,青岛,莱西', '120.517690', '36.889084', 1); +INSERT INTO `yx_system_city` VALUES (1758, 298026, 2, 298025, '370301000000', '市辖区', '山东,淄博', '118.054927', '36.813487', 1); +INSERT INTO `yx_system_city` VALUES (1759, 298027, 2, 298025, '370302000000', '淄川区', '山东,淄博,淄川', '117.966723', '36.643452', 1); +INSERT INTO `yx_system_city` VALUES (1760, 298507, 2, 298025, '370303000000', '张店区', '山东,淄博,张店', '118.017913', '36.806674', 1); +INSERT INTO `yx_system_city` VALUES (1761, 298821, 2, 298025, '370304000000', '博山区', '山东,淄博,博山', '117.861677', '36.494721', 1); +INSERT INTO `yx_system_city` VALUES (1762, 299159, 2, 298025, '370305000000', '临淄区', '山东,淄博,临淄', '118.309118', '36.826981', 1); +INSERT INTO `yx_system_city` VALUES (1763, 299652, 2, 298025, '370306000000', '周村区', '山东,淄博,周村', '117.869886', '36.803072', 1); +INSERT INTO `yx_system_city` VALUES (1764, 299919, 2, 298025, '370321000000', '桓台县', '山东,淄博,桓台', '118.097923', '36.959804', 1); +INSERT INTO `yx_system_city` VALUES (1765, 300276, 2, 298025, '370322000000', '高青县', '山东,淄博,高青', '117.826916', '37.171063', 1); +INSERT INTO `yx_system_city` VALUES (1766, 301056, 2, 298025, '370323000000', '沂源县', '山东,淄博,沂源', '118.170856', '36.185038', 1); +INSERT INTO `yx_system_city` VALUES (1767, 301712, 2, 301711, '370401000000', '市辖区', '山东,枣庄', '117.323725', '34.810487', 1); +INSERT INTO `yx_system_city` VALUES (1768, 301713, 2, 301711, '370402000000', '市中区', '山东,枣庄,市中', '117.556123', '34.864114', 1); +INSERT INTO `yx_system_city` VALUES (1769, 301888, 2, 301711, '370403000000', '薛城区', '山东,枣庄,薛城', '117.263164', '34.795063', 1); +INSERT INTO `yx_system_city` VALUES (1770, 302179, 2, 301711, '370404000000', '峄城区', '山东,枣庄,峄城', '117.590816', '34.773263', 1); +INSERT INTO `yx_system_city` VALUES (1771, 302532, 2, 301711, '370405000000', '台儿庄区', '山东,枣庄,台儿庄', '117.733832', '34.562528', 1); +INSERT INTO `yx_system_city` VALUES (1772, 302750, 2, 301711, '370406000000', '山亭区', '山东,枣庄,山亭', '117.461517', '35.099528', 1); +INSERT INTO `yx_system_city` VALUES (1773, 303037, 2, 301711, '370481000000', '滕州市', '山东,枣庄,滕州', '117.165824', '35.114156', 1); +INSERT INTO `yx_system_city` VALUES (1774, 304310, 2, 304309, '370501000000', '市辖区', '山东,东营', '118.674767', '37.434751', 1); +INSERT INTO `yx_system_city` VALUES (1775, 304311, 2, 304309, '370502000000', '东营区', '山东,东营,东营', '118.582184', '37.448963', 1); +INSERT INTO `yx_system_city` VALUES (1776, 304647, 2, 304309, '370503000000', '河口区', '山东,东营,河口', '118.525543', '37.886162', 1); +INSERT INTO `yx_system_city` VALUES (1777, 304845, 2, 304309, '370505000000', '垦利区', '山东,东营,垦利', '118.674767', '37.434751', 1); +INSERT INTO `yx_system_city` VALUES (1778, 305208, 2, 304309, '370522000000', '利津县', '山东,东营,利津', '118.255273', '37.490260', 1); +INSERT INTO `yx_system_city` VALUES (1779, 305747, 2, 304309, '370523000000', '广饶县', '山东,东营,广饶', '118.407107', '37.053555', 1); +INSERT INTO `yx_system_city` VALUES (1780, 306340, 2, 306339, '370601000000', '市辖区', '山东,烟台', '121.447935', '37.463822', 1); +INSERT INTO `yx_system_city` VALUES (1781, 306341, 2, 306339, '370602000000', '芝罘区', '山东,烟台,芝罘', '121.400031', '37.540687', 1); +INSERT INTO `yx_system_city` VALUES (1782, 306496, 2, 306339, '370611000000', '福山区', '山东,烟台,福山', '121.267741', '37.498246', 1); +INSERT INTO `yx_system_city` VALUES (1783, 306743, 2, 306339, '370612000000', '牟平区', '山东,烟台,牟平', '121.600512', '37.386901', 1); +INSERT INTO `yx_system_city` VALUES (1784, 307348, 2, 306339, '370613000000', '莱山区', '山东,烟台,莱山', '121.445151', '37.511361', 1); +INSERT INTO `yx_system_city` VALUES (1785, 307481, 2, 306339, '370634000000', '长岛县', '山东,烟台,长岛', '120.736580', '37.921368', 1); +INSERT INTO `yx_system_city` VALUES (1786, 307530, 2, 306339, '370681000000', '龙口市', '山东,烟台,龙口', '120.477813', '37.646108', 1); +INSERT INTO `yx_system_city` VALUES (1787, 308140, 2, 306339, '370682000000', '莱阳市', '山东,烟台,莱阳', '120.711673', '36.978941', 1); +INSERT INTO `yx_system_city` VALUES (1788, 308953, 2, 306339, '370683000000', '莱州市', '山东,烟台,莱州', '119.942327', '37.177017', 1); +INSERT INTO `yx_system_city` VALUES (1789, 309985, 2, 306339, '370684000000', '蓬莱市', '山东,烟台,蓬莱', '120.758848', '37.810661', 1); +INSERT INTO `yx_system_city` VALUES (1790, 310581, 2, 306339, '370685000000', '招远市', '山东,烟台,招远', '120.434072', '37.355469', 1); +INSERT INTO `yx_system_city` VALUES (1791, 311342, 2, 306339, '370686000000', '栖霞市', '山东,烟台,栖霞', '120.849675', '37.335123', 1); +INSERT INTO `yx_system_city` VALUES (1792, 312312, 2, 306339, '370687000000', '海阳市', '山东,烟台,海阳', '121.158434', '36.776378', 1); +INSERT INTO `yx_system_city` VALUES (1793, 313064, 2, 313063, '370701000000', '市辖区', '山东,潍坊', '119.161755', '36.706774', 1); +INSERT INTO `yx_system_city` VALUES (1794, 313065, 2, 313063, '370702000000', '潍城区', '山东,潍坊,潍城', '119.024836', '36.728100', 1); +INSERT INTO `yx_system_city` VALUES (1795, 313327, 2, 313063, '370703000000', '寒亭区', '山东,潍坊,寒亭', '119.219734', '36.775491', 1); +INSERT INTO `yx_system_city` VALUES (1796, 313701, 2, 313063, '370704000000', '坊子区', '山东,潍坊,坊子', '119.166485', '36.654448', 1); +INSERT INTO `yx_system_city` VALUES (1797, 314288, 2, 313063, '370705000000', '奎文区', '山东,潍坊,奎文', '119.132486', '36.707676', 1); +INSERT INTO `yx_system_city` VALUES (1798, 314533, 2, 313063, '370724000000', '临朐县', '山东,潍坊,临朐', '118.542982', '36.512506', 1); +INSERT INTO `yx_system_city` VALUES (1799, 314894, 2, 313063, '370725000000', '昌乐县', '山东,潍坊,昌乐', '118.829914', '36.706945', 1); +INSERT INTO `yx_system_city` VALUES (1800, 315273, 2, 313063, '370781000000', '青州市', '山东,潍坊,青州', '118.479636', '36.684600', 1); +INSERT INTO `yx_system_city` VALUES (1801, 316361, 2, 313063, '370782000000', '诸城市', '山东,潍坊,诸城', '119.410103', '35.995654', 1); +INSERT INTO `yx_system_city` VALUES (1802, 316642, 2, 313063, '370783000000', '寿光市', '山东,潍坊,寿光', '118.790652', '36.855480', 1); +INSERT INTO `yx_system_city` VALUES (1803, 317633, 2, 313063, '370784000000', '安丘市', '山东,潍坊,安丘', '119.218978', '36.478494', 1); +INSERT INTO `yx_system_city` VALUES (1804, 318512, 2, 313063, '370785000000', '高密市', '山东,潍坊,高密', '119.755597', '36.382595', 1); +INSERT INTO `yx_system_city` VALUES (1805, 319478, 2, 313063, '370786000000', '昌邑市', '山东,潍坊,昌邑', '119.398525', '36.858820', 1); +INSERT INTO `yx_system_city` VALUES (1806, 320180, 2, 320179, '370801000000', '市辖区', '山东,济宁', '116.587098', '35.414921', 1); +INSERT INTO `yx_system_city` VALUES (1807, 320181, 2, 320179, '370811000000', '任城区', '山东,济宁,任城', '116.595050', '35.406596', 1); +INSERT INTO `yx_system_city` VALUES (1808, 320795, 2, 320179, '370812000000', '兖州区', '山东,济宁,兖州', '116.783834', '35.553144', 1); +INSERT INTO `yx_system_city` VALUES (1809, 321246, 2, 320179, '370826000000', '微山县', '山东,济宁,微山', '117.128828', '34.806554', 1); +INSERT INTO `yx_system_city` VALUES (1810, 321804, 2, 320179, '370827000000', '鱼台县', '山东,济宁,鱼台', '116.650608', '35.012749', 1); +INSERT INTO `yx_system_city` VALUES (1811, 322209, 2, 320179, '370828000000', '金乡县', '山东,济宁,金乡', '116.311532', '35.066620', 1); +INSERT INTO `yx_system_city` VALUES (1812, 322882, 2, 320179, '370829000000', '嘉祥县', '山东,济宁,嘉祥', '116.342442', '35.407829', 1); +INSERT INTO `yx_system_city` VALUES (1813, 323607, 2, 320179, '370830000000', '汶上县', '山东,济宁,汶上', '116.489043', '35.732799', 1); +INSERT INTO `yx_system_city` VALUES (1814, 324118, 2, 320179, '370831000000', '泗水县', '山东,济宁,泗水', '117.251195', '35.664323', 1); +INSERT INTO `yx_system_city` VALUES (1815, 324729, 2, 320179, '370832000000', '梁山县', '山东,济宁,梁山', '116.096044', '35.802306', 1); +INSERT INTO `yx_system_city` VALUES (1816, 325372, 2, 320179, '370881000000', '曲阜市', '山东,济宁,曲阜', '116.986503', '35.580996', 1); +INSERT INTO `yx_system_city` VALUES (1817, 325791, 2, 320179, '370883000000', '邹城市', '山东,济宁,邹城', '117.003743', '35.405185', 1); +INSERT INTO `yx_system_city` VALUES (1818, 326707, 2, 326706, '370901000000', '市辖区', '山东,泰安', '117.087614', '36.200252', 1); +INSERT INTO `yx_system_city` VALUES (1819, 326708, 2, 326706, '370902000000', '泰山区', '山东,泰安,泰山', '117.135354', '36.192084', 1); +INSERT INTO `yx_system_city` VALUES (1820, 326926, 2, 326706, '370911000000', '岱岳区', '山东,泰安,岱岳', '117.041582', '36.187990', 1); +INSERT INTO `yx_system_city` VALUES (1821, 327655, 2, 326706, '370921000000', '宁阳县', '山东,泰安,宁阳', '116.805797', '35.758787', 1); +INSERT INTO `yx_system_city` VALUES (1822, 328231, 2, 326706, '370923000000', '东平县', '山东,泰安,东平', '116.470304', '35.937102', 1); +INSERT INTO `yx_system_city` VALUES (1823, 328962, 2, 326706, '370982000000', '新泰市', '山东,泰安,新泰', '117.767953', '35.909032', 1); +INSERT INTO `yx_system_city` VALUES (1824, 329897, 2, 326706, '370983000000', '肥城市', '山东,泰安,肥城', '116.768358', '36.182572', 1); +INSERT INTO `yx_system_city` VALUES (1825, 330548, 2, 330547, '371001000000', '市辖区', '山东,威海', '122.120419', '37.513068', 1); +INSERT INTO `yx_system_city` VALUES (1826, 330549, 2, 330547, '371002000000', '环翠区', '山东,威海,环翠', '122.123444', '37.501991', 1); +INSERT INTO `yx_system_city` VALUES (1827, 330748, 2, 330547, '371003000000', '文登区', '山东,威海,文登', '122.057941', '37.193886', 1); +INSERT INTO `yx_system_city` VALUES (1828, 331529, 2, 330547, '371082000000', '荣成市', '山东,威海,荣成', '122.486658', '37.165160', 1); +INSERT INTO `yx_system_city` VALUES (1829, 332496, 2, 330547, '371083000000', '乳山市', '山东,威海,乳山', '121.539765', '36.919816', 1); +INSERT INTO `yx_system_city` VALUES (1830, 333141, 2, 333140, '371101000000', '市辖区', '山东,日照', '119.526888', '35.416377', 1); +INSERT INTO `yx_system_city` VALUES (1831, 333142, 2, 333140, '371102000000', '东港区', '山东,日照,东港', '119.462228', '35.425475', 1); +INSERT INTO `yx_system_city` VALUES (1832, 333755, 2, 333140, '371103000000', '岚山区', '山东,日照,岚山', '119.318929', '35.121884', 1); +INSERT INTO `yx_system_city` VALUES (1833, 334188, 2, 333140, '371121000000', '五莲县', '山东,日照,五莲', '119.206763', '35.751927', 1); +INSERT INTO `yx_system_city` VALUES (1834, 334833, 2, 333140, '371122000000', '莒县', '山东,日照,莒县', '118.837064', '35.579868', 1); +INSERT INTO `yx_system_city` VALUES (1835, 336051, 2, 336050, '371201000000', '市辖区', '山东,莱芜', '117.676723', '36.213813', 1); +INSERT INTO `yx_system_city` VALUES (1836, 336052, 2, 336050, '371202000000', '莱城区', '山东,莱芜,莱城', '117.659884', '36.203180', 1); +INSERT INTO `yx_system_city` VALUES (1837, 336908, 2, 336050, '371203000000', '钢城区', '山东,莱芜,钢城', '117.811355', '36.058572', 1); +INSERT INTO `yx_system_city` VALUES (1838, 337145, 2, 337144, '371301000000', '市辖区', '山东,临沂', '118.356448', '35.104672', 1); +INSERT INTO `yx_system_city` VALUES (1839, 337146, 2, 337144, '371302000000', '兰山区', '山东,临沂,兰山', '118.347731', '35.051734', 1); +INSERT INTO `yx_system_city` VALUES (1840, 337621, 2, 337144, '371311000000', '罗庄区', '山东,临沂,罗庄', '118.284786', '34.996741', 1); +INSERT INTO `yx_system_city` VALUES (1841, 337844, 2, 337144, '371312000000', '河东区', '山东,临沂,河东', '118.402893', '35.089917', 1); +INSERT INTO `yx_system_city` VALUES (1842, 338188, 2, 337144, '371321000000', '沂南县', '山东,临沂,沂南', '118.465213', '35.549976', 1); +INSERT INTO `yx_system_city` VALUES (1843, 338778, 2, 337144, '371322000000', '郯城县', '山东,临沂,郯城', '118.367263', '34.613557', 1); +INSERT INTO `yx_system_city` VALUES (1844, 339408, 2, 337144, '371323000000', '沂水县', '山东,临沂,沂水', '118.627918', '35.790450', 1); +INSERT INTO `yx_system_city` VALUES (1845, 340490, 2, 337144, '371324000000', '兰陵县', '山东,临沂,兰陵', '118.070650', '34.857149', 1); +INSERT INTO `yx_system_city` VALUES (1846, 341532, 2, 337144, '371325000000', '费县', '山东,临沂,费县', '117.977325', '35.265961', 1); +INSERT INTO `yx_system_city` VALUES (1847, 342020, 2, 337144, '371326000000', '平邑县', '山东,临沂,平邑', '117.640352', '35.505943', 1); +INSERT INTO `yx_system_city` VALUES (1848, 342766, 2, 337144, '371327000000', '莒南县', '山东,临沂,莒南', '118.835163', '35.174846', 1); +INSERT INTO `yx_system_city` VALUES (1849, 343361, 2, 337144, '371328000000', '蒙阴县', '山东,临沂,蒙阴', '117.945085', '35.710032', 1); +INSERT INTO `yx_system_city` VALUES (1850, 343836, 2, 337144, '371329000000', '临沭县', '山东,临沂,临沭', '118.650782', '34.919852', 1); +INSERT INTO `yx_system_city` VALUES (1851, 344134, 2, 344133, '371401000000', '市辖区', '山东,德州', '116.357464', '37.434092', 1); +INSERT INTO `yx_system_city` VALUES (1852, 344135, 2, 344133, '371402000000', '德城区', '山东,德州,德城', '116.299471', '37.450805', 1); +INSERT INTO `yx_system_city` VALUES (1853, 344244, 2, 344133, '371403000000', '陵城区', '山东,德州,陵城', '116.576092', '37.335794', 1); +INSERT INTO `yx_system_city` VALUES (1854, 345248, 2, 344133, '371422000000', '宁津县', '山东,德州,宁津', '116.800306', '37.652190', 1); +INSERT INTO `yx_system_city` VALUES (1855, 346117, 2, 344133, '371423000000', '庆云县', '山东,德州,庆云', '117.385257', '37.775350', 1); +INSERT INTO `yx_system_city` VALUES (1856, 346518, 2, 344133, '371424000000', '临邑县', '山东,德州,临邑', '116.866800', '37.189798', 1); +INSERT INTO `yx_system_city` VALUES (1857, 346715, 2, 344133, '371425000000', '齐河县', '山东,德州,齐河', '116.762810', '36.783415', 1); +INSERT INTO `yx_system_city` VALUES (1858, 347749, 2, 344133, '371426000000', '平原县', '山东,德州,平原', '116.434056', '37.165314', 1); +INSERT INTO `yx_system_city` VALUES (1859, 347943, 2, 344133, '371427000000', '夏津县', '山东,德州,夏津', '116.001726', '36.948371', 1); +INSERT INTO `yx_system_city` VALUES (1860, 348268, 2, 344133, '371428000000', '武城县', '山东,德州,武城', '116.069302', '37.213311', 1); +INSERT INTO `yx_system_city` VALUES (1861, 348472, 2, 344133, '371481000000', '乐陵市', '山东,德州,乐陵', '117.231935', '37.729907', 1); +INSERT INTO `yx_system_city` VALUES (1862, 348980, 2, 344133, '371482000000', '禹城市', '山东,德州,禹城', '116.638327', '36.933812', 1); +INSERT INTO `yx_system_city` VALUES (1863, 349383, 2, 349382, '371501000000', '市辖区', '山东,聊城', '115.985371', '36.456703', 1); +INSERT INTO `yx_system_city` VALUES (1864, 349384, 2, 349382, '371502000000', '东昌府区', '山东,聊城,东昌府', '115.988491', '36.434645', 1); +INSERT INTO `yx_system_city` VALUES (1865, 350543, 2, 349382, '371521000000', '阳谷县', '山东,聊城,阳谷', '115.791820', '36.114392', 1); +INSERT INTO `yx_system_city` VALUES (1866, 351436, 2, 349382, '371522000000', '莘县', '山东,聊城,莘县', '115.671191', '36.233598', 1); +INSERT INTO `yx_system_city` VALUES (1867, 352587, 2, 349382, '371523000000', '茌平县', '山东,聊城,茌平', '115.985371', '36.456703', 1); +INSERT INTO `yx_system_city` VALUES (1868, 353334, 2, 349382, '371524000000', '东阿县', '山东,聊城,东阿', '116.247580', '36.334917', 1); +INSERT INTO `yx_system_city` VALUES (1869, 353863, 2, 349382, '371525000000', '冠县', '山东,聊城,冠县', '115.442740', '36.484009', 1); +INSERT INTO `yx_system_city` VALUES (1870, 354643, 2, 349382, '371526000000', '高唐县', '山东,聊城,高唐', '116.230158', '36.846755', 1); +INSERT INTO `yx_system_city` VALUES (1871, 355301, 2, 349382, '371581000000', '临清市', '山东,聊城,临清', '115.704881', '36.838277', 1); +INSERT INTO `yx_system_city` VALUES (1872, 355973, 2, 355972, '371601000000', '市辖区', '山东,滨州', '117.970703', '37.381990', 1); +INSERT INTO `yx_system_city` VALUES (1873, 355974, 2, 355972, '371602000000', '滨城区', '山东,滨州,滨城', '118.019326', '37.430724', 1); +INSERT INTO `yx_system_city` VALUES (1874, 356960, 2, 355972, '371603000000', '沾化区', '山东,滨州,沾化', '118.098902', '37.699260', 1); +INSERT INTO `yx_system_city` VALUES (1875, 357420, 2, 355972, '371621000000', '惠民县', '山东,滨州,惠民', '117.509921', '37.489877', 1); +INSERT INTO `yx_system_city` VALUES (1876, 358556, 2, 355972, '371622000000', '阳信县', '山东,滨州,阳信', '117.578262', '37.641106', 1); +INSERT INTO `yx_system_city` VALUES (1877, 359424, 2, 355972, '371623000000', '无棣县', '山东,滨州,无棣', '117.625696', '37.770260', 1); +INSERT INTO `yx_system_city` VALUES (1878, 360038, 2, 355972, '371625000000', '博兴县', '山东,滨州,博兴', '118.131815', '37.150226', 1); +INSERT INTO `yx_system_city` VALUES (1879, 360507, 2, 355972, '371626000000', '邹平县', '山东,滨州,邹平', '117.743109', '36.862989', 1); +INSERT INTO `yx_system_city` VALUES (1880, 361376, 2, 361375, '371701000000', '市辖区', '山东,菏泽', '115.480656', '35.233750', 1); +INSERT INTO `yx_system_city` VALUES (1881, 361377, 2, 361375, '371702000000', '牡丹区', '山东,菏泽,牡丹', '115.417827', '35.252512', 1); +INSERT INTO `yx_system_city` VALUES (1882, 361988, 2, 361375, '371703000000', '定陶区', '山东,菏泽,定陶', '115.569619', '35.072701', 1); +INSERT INTO `yx_system_city` VALUES (1883, 362368, 2, 361375, '371721000000', '曹县', '山东,菏泽,曹县', '115.542328', '34.825508', 1); +INSERT INTO `yx_system_city` VALUES (1884, 363576, 2, 361375, '371722000000', '单县', '山东,菏泽,单县', '116.107428', '34.778808', 1); +INSERT INTO `yx_system_city` VALUES (1885, 364107, 2, 361375, '371723000000', '成武县', '山东,菏泽,成武', '115.889765', '34.952459', 1); +INSERT INTO `yx_system_city` VALUES (1886, 364606, 2, 361375, '371724000000', '巨野县', '山东,菏泽,巨野', '116.065396', '35.387374', 1); +INSERT INTO `yx_system_city` VALUES (1887, 365498, 2, 361375, '371725000000', '郓城县', '山东,菏泽,郓城', '115.943613', '35.599758', 1); +INSERT INTO `yx_system_city` VALUES (1888, 366562, 2, 361375, '371726000000', '鄄城县', '山东,菏泽,鄄城', '115.510193', '35.563408', 1); +INSERT INTO `yx_system_city` VALUES (1889, 366971, 2, 361375, '371728000000', '东明县', '山东,菏泽,东明', '115.089905', '35.289368', 1); +INSERT INTO `yx_system_city` VALUES (1890, 367397, 2, 367396, '410101000000', '市辖区', '河南,郑州', '113.625368', '34.746599', 1); +INSERT INTO `yx_system_city` VALUES (1891, 367398, 2, 367396, '410102000000', '中原区', '河南,郑州,中原', '113.612850', '34.748257', 1); +INSERT INTO `yx_system_city` VALUES (1892, 367563, 2, 367396, '410103000000', '二七区', '河南,郑州,二七', '113.640179', '34.723930', 1); +INSERT INTO `yx_system_city` VALUES (1893, 367741, 2, 367396, '410104000000', '管城回族区', '河南,郑州,管城', '113.625368', '34.746599', 1); +INSERT INTO `yx_system_city` VALUES (1894, 367877, 2, 367396, '410105000000', '金水区', '河南,郑州,金水', '113.660555', '34.800156', 1); +INSERT INTO `yx_system_city` VALUES (1895, 368151, 2, 367396, '410106000000', '上街区', '河南,郑州,上街', '113.308961', '34.802780', 1); +INSERT INTO `yx_system_city` VALUES (1896, 368217, 2, 367396, '410108000000', '惠济区', '河南,郑州,惠济', '113.616901', '34.867458', 1); +INSERT INTO `yx_system_city` VALUES (1897, 368291, 2, 367396, '410122000000', '中牟县', '河南,郑州,中牟', '113.976254', '34.718937', 1); +INSERT INTO `yx_system_city` VALUES (1898, 368635, 2, 367396, '410181000000', '巩义市', '河南,郑州,巩义', '113.022497', '34.747834', 1); +INSERT INTO `yx_system_city` VALUES (1899, 368975, 2, 367396, '410182000000', '荥阳市', '河南,郑州,荥阳', '113.383221', '34.787375', 1); +INSERT INTO `yx_system_city` VALUES (1900, 369293, 2, 367396, '410183000000', '新密市', '河南,郑州,新密', '113.390891', '34.539443', 1); +INSERT INTO `yx_system_city` VALUES (1901, 369663, 2, 367396, '410184000000', '新郑市', '河南,郑州,新郑', '113.740529', '34.395562', 1); +INSERT INTO `yx_system_city` VALUES (1902, 369963, 2, 367396, '410185000000', '登封市', '河南,郑州,登封', '113.050492', '34.453667', 1); +INSERT INTO `yx_system_city` VALUES (1903, 370305, 2, 370304, '410201000000', '市辖区', '河南,开封', '114.307581', '34.797239', 1); +INSERT INTO `yx_system_city` VALUES (1904, 370306, 2, 370304, '410202000000', '龙亭区', '河南,开封,龙亭', '114.354730', '34.815784', 1); +INSERT INTO `yx_system_city` VALUES (1905, 370373, 2, 370304, '410203000000', '顺河回族区', '河南,开封,顺河', '114.369716', '34.811344', 1); +INSERT INTO `yx_system_city` VALUES (1906, 370450, 2, 370304, '410204000000', '鼓楼区', '河南,开封,鼓楼', '114.348307', '34.788561', 1); +INSERT INTO `yx_system_city` VALUES (1907, 370501, 2, 370304, '410205000000', '禹王台区', '河南,开封,禹王台', '114.348170', '34.777104', 1); +INSERT INTO `yx_system_city` VALUES (1908, 370557, 2, 370304, '410211000000', '金明区', '河南,开封,金明', '114.307581', '34.797239', 1); +INSERT INTO `yx_system_city` VALUES (1909, 370634, 2, 370304, '410212000000', '祥符区', '河南,开封,祥符', '114.441327', '34.756921', 1); +INSERT INTO `yx_system_city` VALUES (1910, 370995, 2, 370304, '410221000000', '杞县', '河南,开封,杞县', '114.783041', '34.549166', 1); +INSERT INTO `yx_system_city` VALUES (1911, 371618, 2, 370304, '410222000000', '通许县', '河南,开封,通许', '114.467467', '34.480433', 1); +INSERT INTO `yx_system_city` VALUES (1912, 371942, 2, 370304, '410223000000', '尉氏县', '河南,开封,尉氏', '114.193081', '34.411494', 1); +INSERT INTO `yx_system_city` VALUES (1913, 372481, 2, 370304, '410225000000', '兰考县', '河南,开封,兰考', '114.821348', '34.822211', 1); +INSERT INTO `yx_system_city` VALUES (1914, 372972, 2, 372971, '410301000000', '市辖区', '河南,洛阳', '112.454040', '34.619682', 1); +INSERT INTO `yx_system_city` VALUES (1915, 372973, 2, 372971, '410302000000', '老城区', '河南,洛阳,老城', '112.469024', '34.683646', 1); +INSERT INTO `yx_system_city` VALUES (1916, 373030, 2, 372971, '410303000000', '西工区', '河南,洛阳,西工', '112.428413', '34.659900', 1); +INSERT INTO `yx_system_city` VALUES (1917, 373105, 2, 372971, '410304000000', '瀍河回族区', '河南,洛阳,瀍河', '112.479653', '34.714976', 1); +INSERT INTO `yx_system_city` VALUES (1918, 373143, 2, 372971, '410305000000', '涧西区', '河南,洛阳,涧西', '112.395756', '34.658034', 1); +INSERT INTO `yx_system_city` VALUES (1919, 373227, 2, 372971, '410306000000', '吉利区', '河南,洛阳,吉利', '112.589052', '34.900889', 1); +INSERT INTO `yx_system_city` VALUES (1920, 373268, 2, 372971, '410311000000', '洛龙区', '河南,洛阳,洛龙', '112.464173', '34.619404', 1); +INSERT INTO `yx_system_city` VALUES (1921, 373554, 2, 372971, '410322000000', '孟津县', '河南,洛阳,孟津', '112.445252', '34.825307', 1); +INSERT INTO `yx_system_city` VALUES (1922, 373799, 2, 372971, '410323000000', '新安县', '河南,洛阳,新安', '112.132488', '34.728584', 1); +INSERT INTO `yx_system_city` VALUES (1923, 374121, 2, 372971, '410324000000', '栾川县', '河南,洛阳,栾川', '111.615769', '33.785698', 1); +INSERT INTO `yx_system_city` VALUES (1924, 374349, 2, 372971, '410325000000', '嵩县', '河南,洛阳,嵩县', '112.085634', '34.134517', 1); +INSERT INTO `yx_system_city` VALUES (1925, 374694, 2, 372971, '410326000000', '汝阳县', '河南,洛阳,汝阳', '112.473139', '34.153940', 1); +INSERT INTO `yx_system_city` VALUES (1926, 374929, 2, 372971, '410327000000', '宜阳县', '河南,洛阳,宜阳', '112.179238', '34.514645', 1); +INSERT INTO `yx_system_city` VALUES (1927, 375308, 2, 372971, '410328000000', '洛宁县', '河南,洛阳,洛宁', '111.653039', '34.389414', 1); +INSERT INTO `yx_system_city` VALUES (1928, 375717, 2, 372971, '410329000000', '伊川县', '河南,洛阳,伊川', '112.425651', '34.421460', 1); +INSERT INTO `yx_system_city` VALUES (1929, 376105, 2, 372971, '410381000000', '偃师市', '河南,洛阳,偃师', '112.789535', '34.727220', 1); +INSERT INTO `yx_system_city` VALUES (1930, 376366, 2, 376365, '410401000000', '市辖区', '河南,平顶山', '113.192661', '33.766169', 1); +INSERT INTO `yx_system_city` VALUES (1931, 376367, 2, 376365, '410402000000', '新华区', '河南,平顶山,新华', '113.293999', '33.737365', 1); +INSERT INTO `yx_system_city` VALUES (1932, 376442, 2, 376365, '410403000000', '卫东区', '河南,平顶山,卫东', '113.335193', '33.734707', 1); +INSERT INTO `yx_system_city` VALUES (1933, 376513, 2, 376365, '410404000000', '石龙区', '河南,平顶山,石龙', '112.898818', '33.898713', 1); +INSERT INTO `yx_system_city` VALUES (1934, 376532, 2, 376365, '410411000000', '湛河区', '河南,平顶山,湛河', '113.320873', '33.725681', 1); +INSERT INTO `yx_system_city` VALUES (1935, 376643, 2, 376365, '410421000000', '宝丰县', '河南,平顶山,宝丰', '113.054754', '33.868441', 1); +INSERT INTO `yx_system_city` VALUES (1936, 376984, 2, 376365, '410422000000', '叶县', '河南,平顶山,叶县', '113.357239', '33.626731', 1); +INSERT INTO `yx_system_city` VALUES (1937, 377555, 2, 376365, '410423000000', '鲁山县', '河南,平顶山,鲁山', '112.908023', '33.738518', 1); +INSERT INTO `yx_system_city` VALUES (1938, 378139, 2, 376365, '410425000000', '郏县', '河南,平顶山,郏县', '113.212609', '33.971787', 1); +INSERT INTO `yx_system_city` VALUES (1939, 378532, 2, 376365, '410481000000', '舞钢市', '河南,平顶山,舞钢', '113.524794', '33.307776', 1); +INSERT INTO `yx_system_city` VALUES (1940, 378764, 2, 376365, '410482000000', '汝州市', '河南,平顶山,汝州', '112.844517', '34.167030', 1); +INSERT INTO `yx_system_city` VALUES (1941, 379246, 2, 379245, '410501000000', '市辖区', '河南,安阳', '114.392392', '36.097577', 1); +INSERT INTO `yx_system_city` VALUES (1942, 379247, 2, 379245, '410502000000', '文峰区', '河南,安阳,文峰', '114.357082', '36.090468', 1); +INSERT INTO `yx_system_city` VALUES (1943, 379400, 2, 379245, '410503000000', '北关区', '河南,安阳,北关', '114.355822', '36.107255', 1); +INSERT INTO `yx_system_city` VALUES (1944, 379488, 2, 379245, '410505000000', '殷都区', '河南,安阳,殷都', '114.303410', '36.109890', 1); +INSERT INTO `yx_system_city` VALUES (1945, 379584, 2, 379245, '410506000000', '龙安区', '河南,安阳,龙安', '114.323522', '36.095568', 1); +INSERT INTO `yx_system_city` VALUES (1946, 379742, 2, 379245, '410522000000', '安阳县', '河南,安阳,安阳', '114.130207', '36.130585', 1); +INSERT INTO `yx_system_city` VALUES (1947, 380371, 2, 379245, '410523000000', '汤阴县', '河南,安阳,汤阴', '114.357763', '35.924515', 1); +INSERT INTO `yx_system_city` VALUES (1948, 380688, 2, 379245, '410526000000', '滑县', '河南,安阳,滑县', '114.518997', '35.575002', 1); +INSERT INTO `yx_system_city` VALUES (1949, 381731, 2, 379245, '410527000000', '内黄县', '河南,安阳,内黄', '114.901492', '35.971653', 1); +INSERT INTO `yx_system_city` VALUES (1950, 382281, 2, 379245, '410581000000', '林州市', '河南,安阳,林州', '113.820130', '36.083047', 1); +INSERT INTO `yx_system_city` VALUES (1951, 382879, 2, 382878, '410601000000', '市辖区', '河南,鹤壁', '114.297272', '35.747225', 1); +INSERT INTO `yx_system_city` VALUES (1952, 382880, 2, 382878, '410602000000', '鹤山区', '河南,鹤壁,鹤山', '114.163367', '35.954582', 1); +INSERT INTO `yx_system_city` VALUES (1953, 382969, 2, 382878, '410603000000', '山城区', '河南,鹤壁,山城', '114.184428', '35.897703', 1); +INSERT INTO `yx_system_city` VALUES (1954, 383079, 2, 382878, '410611000000', '淇滨区', '河南,鹤壁,淇滨', '114.298694', '35.741296', 1); +INSERT INTO `yx_system_city` VALUES (1955, 383228, 2, 382878, '410621000000', '浚县', '河南,鹤壁,浚县', '114.550813', '35.676240', 1); +INSERT INTO `yx_system_city` VALUES (1956, 383704, 2, 382878, '410622000000', '淇县', '河南,鹤壁,淇县', '114.197651', '35.607762', 1); +INSERT INTO `yx_system_city` VALUES (1957, 383891, 2, 383890, '410701000000', '市辖区', '河南,新乡', '113.926800', '35.303004', 1); +INSERT INTO `yx_system_city` VALUES (1958, 383892, 2, 383890, '410702000000', '红旗区', '河南,新乡,红旗', '113.875245', '35.303851', 1); +INSERT INTO `yx_system_city` VALUES (1959, 383978, 2, 383890, '410703000000', '卫滨区', '河南,新乡,卫滨', '113.865780', '35.302117', 1); +INSERT INTO `yx_system_city` VALUES (1960, 384041, 2, 383890, '410704000000', '凤泉区', '河南,新乡,凤泉', '113.915184', '35.383978', 1); +INSERT INTO `yx_system_city` VALUES (1961, 384093, 2, 383890, '410711000000', '牧野区', '河南,新乡,牧野', '113.908772', '35.315039', 1); +INSERT INTO `yx_system_city` VALUES (1962, 384193, 2, 383890, '410721000000', '新乡县', '河南,新乡,新乡', '113.805205', '35.190836', 1); +INSERT INTO `yx_system_city` VALUES (1963, 384380, 2, 383890, '410724000000', '获嘉县', '河南,新乡,获嘉', '113.657433', '35.259808', 1); +INSERT INTO `yx_system_city` VALUES (1964, 384622, 2, 383890, '410725000000', '原阳县', '河南,新乡,原阳', '113.940115', '35.065587', 1); +INSERT INTO `yx_system_city` VALUES (1965, 385122, 2, 383890, '410726000000', '延津县', '河南,新乡,延津', '114.205197', '35.141956', 1); +INSERT INTO `yx_system_city` VALUES (1966, 385485, 2, 383890, '410727000000', '封丘县', '河南,新乡,封丘', '114.418882', '35.041198', 1); +INSERT INTO `yx_system_city` VALUES (1967, 386113, 2, 383890, '410728000000', '长垣县', '河南,新乡,长垣', '114.668936', '35.201548', 1); +INSERT INTO `yx_system_city` VALUES (1968, 386744, 2, 383890, '410781000000', '卫辉市', '河南,新乡,卫辉', '114.064907', '35.398494', 1); +INSERT INTO `yx_system_city` VALUES (1969, 387125, 2, 383890, '410782000000', '辉县市', '河南,新乡,辉', '113.926800', '35.303004', 1); +INSERT INTO `yx_system_city` VALUES (1970, 387708, 2, 387707, '410801000000', '市辖区', '河南,焦作', '113.241823', '35.215892', 1); +INSERT INTO `yx_system_city` VALUES (1971, 387709, 2, 387707, '410802000000', '解放区', '河南,焦作,解放', '113.230817', '35.240282', 1); +INSERT INTO `yx_system_city` VALUES (1972, 387776, 2, 387707, '410803000000', '中站区', '河南,焦作,中站', '113.182946', '35.236820', 1); +INSERT INTO `yx_system_city` VALUES (1973, 387836, 2, 387707, '410804000000', '马村区', '河南,焦作,马村', '113.322332', '35.256108', 1); +INSERT INTO `yx_system_city` VALUES (1974, 387922, 2, 387707, '410811000000', '山阳区', '河南,焦作,山阳', '113.254881', '35.214507', 1); +INSERT INTO `yx_system_city` VALUES (1975, 387985, 2, 387707, '410821000000', '修武县', '河南,焦作,修武', '113.447755', '35.223514', 1); +INSERT INTO `yx_system_city` VALUES (1976, 388187, 2, 387707, '410822000000', '博爱县', '河南,焦作,博爱', '113.064379', '35.171045', 1); +INSERT INTO `yx_system_city` VALUES (1977, 388415, 2, 387707, '410823000000', '武陟县', '河南,焦作,武陟', '113.401679', '35.099378', 1); +INSERT INTO `yx_system_city` VALUES (1978, 388783, 2, 387707, '410825000000', '温县', '河南,焦作,温县', '113.080530', '34.940189', 1); +INSERT INTO `yx_system_city` VALUES (1979, 389064, 2, 387707, '410882000000', '沁阳市', '河南,焦作,沁阳', '112.950716', '35.087539', 1); +INSERT INTO `yx_system_city` VALUES (1980, 389418, 2, 387707, '410883000000', '孟州市', '河南,焦作,孟州', '112.789612', '34.907970', 1); +INSERT INTO `yx_system_city` VALUES (1981, 389720, 2, 389719, '410901000000', '市辖区', '河南,濮阳', '115.029215', '35.761829', 1); +INSERT INTO `yx_system_city` VALUES (1982, 389721, 2, 389719, '410902000000', '华龙区', '河南,濮阳,华龙', '115.074151', '35.777346', 1); +INSERT INTO `yx_system_city` VALUES (1983, 389884, 2, 389719, '410922000000', '清丰县', '河南,濮阳,清丰', '115.104389', '35.885180', 1); +INSERT INTO `yx_system_city` VALUES (1984, 390411, 2, 389719, '410923000000', '南乐县', '河南,濮阳,南乐', '115.204752', '36.069664', 1); +INSERT INTO `yx_system_city` VALUES (1985, 390751, 2, 389719, '410926000000', '范县', '河南,濮阳,范县', '115.504201', '35.851907', 1); +INSERT INTO `yx_system_city` VALUES (1986, 391345, 2, 389719, '410927000000', '台前县', '河南,濮阳,台前', '115.871906', '35.969390', 1); +INSERT INTO `yx_system_city` VALUES (1987, 391730, 2, 389719, '410928000000', '濮阳县', '河南,濮阳,濮阳', '115.029078', '35.712193', 1); +INSERT INTO `yx_system_city` VALUES (1988, 392738, 2, 392737, '411001000000', '市辖区', '河南,许昌', '113.852640', '34.035506', 1); +INSERT INTO `yx_system_city` VALUES (1989, 392739, 2, 392737, '411002000000', '魏都区', '河南,许昌,魏都', '113.822647', '34.025342', 1); +INSERT INTO `yx_system_city` VALUES (1990, 392850, 2, 392737, '411023000000', '许昌县', '河南,许昌,许昌', '113.822983', '34.124660', 1); +INSERT INTO `yx_system_city` VALUES (1991, 393306, 2, 392737, '411024000000', '鄢陵县', '河南,许昌,鄢陵', '114.177400', '34.102332', 1); +INSERT INTO `yx_system_city` VALUES (1992, 393705, 2, 392737, '411025000000', '襄城县', '河南,许昌,襄城', '113.482453', '33.846369', 1); +INSERT INTO `yx_system_city` VALUES (1993, 394170, 2, 392737, '411081000000', '禹州市', '河南,许昌,禹州', '113.488478', '34.140701', 1); +INSERT INTO `yx_system_city` VALUES (1994, 394863, 2, 392737, '411082000000', '长葛市', '河南,许昌,长葛', '113.819888', '34.194136', 1); +INSERT INTO `yx_system_city` VALUES (1995, 395255, 2, 395254, '411101000000', '市辖区', '河南,漯河', '114.016539', '33.581412', 1); +INSERT INTO `yx_system_city` VALUES (1996, 395256, 2, 395254, '411102000000', '源汇区', '河南,漯河,源汇', '114.017948', '33.565441', 1); +INSERT INTO `yx_system_city` VALUES (1997, 395392, 2, 395254, '411103000000', '郾城区', '河南,漯河,郾城', '114.006944', '33.587409', 1); +INSERT INTO `yx_system_city` VALUES (1998, 395601, 2, 395254, '411104000000', '召陵区', '河南,漯河,召陵', '114.093902', '33.586565', 1); +INSERT INTO `yx_system_city` VALUES (1999, 395816, 2, 395254, '411121000000', '舞阳县', '河南,漯河,舞阳', '113.609286', '33.437877', 1); +INSERT INTO `yx_system_city` VALUES (2000, 396228, 2, 395254, '411122000000', '临颍县', '河南,漯河,临颍', '113.931203', '33.827304', 1); +INSERT INTO `yx_system_city` VALUES (2001, 396612, 2, 396611, '411201000000', '市辖区', '河南,三门峡', '111.200135', '34.772493', 1); +INSERT INTO `yx_system_city` VALUES (2002, 396613, 2, 396611, '411202000000', '湖滨区', '河南,三门峡,湖滨', '111.188398', '34.770886', 1); +INSERT INTO `yx_system_city` VALUES (2003, 396710, 2, 396611, '411203000000', '陕州区', '河南,三门峡,陕州', '111.103563', '34.720548', 1); +INSERT INTO `yx_system_city` VALUES (2004, 396996, 2, 396611, '411221000000', '渑池县', '河南,三门峡,渑池', '111.761504', '34.767244', 1); +INSERT INTO `yx_system_city` VALUES (2005, 397257, 2, 396611, '411224000000', '卢氏县', '河南,三门峡,卢氏', '111.047858', '34.054324', 1); +INSERT INTO `yx_system_city` VALUES (2006, 397644, 2, 396611, '411281000000', '义马市', '河南,三门峡,义马', '111.874393', '34.747129', 1); +INSERT INTO `yx_system_city` VALUES (2007, 397687, 2, 396611, '411282000000', '灵宝市', '河南,三门峡,灵宝', '110.894220', '34.516828', 1); +INSERT INTO `yx_system_city` VALUES (2008, 398170, 2, 398169, '411301000000', '市辖区', '河南,南阳', '112.528321', '32.990833', 1); +INSERT INTO `yx_system_city` VALUES (2009, 398171, 2, 398169, '411302000000', '宛城区', '河南,南阳,宛城', '112.539559', '33.003784', 1); +INSERT INTO `yx_system_city` VALUES (2010, 398437, 2, 398169, '411303000000', '卧龙区', '河南,南阳,卧龙', '112.528789', '32.989877', 1); +INSERT INTO `yx_system_city` VALUES (2011, 398747, 2, 398169, '411321000000', '南召县', '河南,南阳,南召', '112.429133', '33.489877', 1); +INSERT INTO `yx_system_city` VALUES (2012, 399117, 2, 398169, '411322000000', '方城县', '河南,南阳,方城', '113.012494', '33.254391', 1); +INSERT INTO `yx_system_city` VALUES (2013, 399702, 2, 398169, '411323000000', '西峡县', '河南,南阳,西峡', '111.473530', '33.307294', 1); +INSERT INTO `yx_system_city` VALUES (2014, 400021, 2, 398169, '411324000000', '镇平县', '河南,南阳,镇平', '112.234698', '33.034111', 1); +INSERT INTO `yx_system_city` VALUES (2015, 400474, 2, 398169, '411325000000', '内乡县', '河南,南阳,内乡', '111.849392', '33.044865', 1); +INSERT INTO `yx_system_city` VALUES (2016, 400787, 2, 398169, '411326000000', '淅川县', '河南,南阳,淅川', '111.490964', '33.137820', 1); +INSERT INTO `yx_system_city` VALUES (2017, 401305, 2, 398169, '411327000000', '社旗县', '河南,南阳,社旗', '112.948245', '33.056109', 1); +INSERT INTO `yx_system_city` VALUES (2018, 401579, 2, 398169, '411328000000', '唐河县', '河南,南阳,唐河', '112.807637', '32.681335', 1); +INSERT INTO `yx_system_city` VALUES (2019, 402141, 2, 398169, '411329000000', '新野县', '河南,南阳,新野', '112.360026', '32.520805', 1); +INSERT INTO `yx_system_city` VALUES (2020, 402429, 2, 398169, '411330000000', '桐柏县', '河南,南阳,桐柏', '113.428287', '32.380073', 1); +INSERT INTO `yx_system_city` VALUES (2021, 402668, 2, 398169, '411381000000', '邓州市', '河南,南阳,邓州', '112.087278', '32.687938', 1); +INSERT INTO `yx_system_city` VALUES (2022, 403312, 2, 403311, '411401000000', '市辖区', '河南,商丘', '115.656370', '34.414172', 1); +INSERT INTO `yx_system_city` VALUES (2023, 403313, 2, 403311, '411402000000', '梁园区', '河南,商丘,梁园', '115.613965', '34.443893', 1); +INSERT INTO `yx_system_city` VALUES (2024, 403577, 2, 403311, '411403000000', '睢阳区', '河南,商丘,睢阳', '115.653302', '34.388390', 1); +INSERT INTO `yx_system_city` VALUES (2025, 403992, 2, 403311, '411421000000', '民权县', '河南,商丘,民权', '115.179594', '34.647758', 1); +INSERT INTO `yx_system_city` VALUES (2026, 404572, 2, 403311, '411422000000', '睢县', '河南,商丘,睢县', '115.071879', '34.445656', 1); +INSERT INTO `yx_system_city` VALUES (2027, 405150, 2, 403311, '411423000000', '宁陵县', '河南,商丘,宁陵', '115.313690', '34.460232', 1); +INSERT INTO `yx_system_city` VALUES (2028, 405530, 2, 403311, '411424000000', '柘城县', '河南,商丘,柘城', '115.305843', '34.091045', 1); +INSERT INTO `yx_system_city` VALUES (2029, 406070, 2, 403311, '411425000000', '虞城县', '河南,商丘,虞城', '115.840511', '34.402512', 1); +INSERT INTO `yx_system_city` VALUES (2030, 406717, 2, 403311, '411426000000', '夏邑县', '河南,商丘,夏邑', '116.131447', '34.237554', 1); +INSERT INTO `yx_system_city` VALUES (2031, 407487, 2, 403311, '411481000000', '永城市', '河南,商丘,永城', '116.449500', '33.929291', 1); +INSERT INTO `yx_system_city` VALUES (2032, 408288, 2, 408287, '411501000000', '市辖区', '河南,信阳', '114.091023', '32.146983', 1); +INSERT INTO `yx_system_city` VALUES (2033, 408289, 2, 408287, '411502000000', '浉河区', '河南,信阳,浉河', '114.058713', '32.116803', 1); +INSERT INTO `yx_system_city` VALUES (2034, 408566, 2, 408287, '411503000000', '平桥区', '河南,信阳,平桥', '114.125656', '32.101031', 1); +INSERT INTO `yx_system_city` VALUES (2035, 408914, 2, 408287, '411521000000', '罗山县', '河南,信阳,罗山', '114.513012', '32.203073', 1); +INSERT INTO `yx_system_city` VALUES (2036, 409241, 2, 408287, '411522000000', '光山县', '河南,信阳,光山', '114.919033', '32.011103', 1); +INSERT INTO `yx_system_city` VALUES (2037, 409621, 2, 408287, '411523000000', '新县', '河南,信阳,新县', '114.879239', '31.643918', 1); +INSERT INTO `yx_system_city` VALUES (2038, 409844, 2, 408287, '411524000000', '商城县', '河南,信阳,商城', '115.406862', '31.798378', 1); +INSERT INTO `yx_system_city` VALUES (2039, 410235, 2, 408287, '411525000000', '固始县', '河南,信阳,固始', '115.654482', '32.168137', 1); +INSERT INTO `yx_system_city` VALUES (2040, 410916, 2, 408287, '411526000000', '潢川县', '河南,信阳,潢川', '115.051808', '32.131383', 1); +INSERT INTO `yx_system_city` VALUES (2041, 411226, 2, 408287, '411527000000', '淮滨县', '河南,信阳,淮滨', '115.419538', '32.473258', 1); +INSERT INTO `yx_system_city` VALUES (2042, 411541, 2, 408287, '411528000000', '息县', '河南,信阳,息县', '114.740456', '32.342792', 1); +INSERT INTO `yx_system_city` VALUES (2043, 411926, 2, 411925, '411601000000', '市辖区', '河南,周口', '114.696951', '33.626149', 1); +INSERT INTO `yx_system_city` VALUES (2044, 411927, 2, 411925, '411602000000', '川汇区', '河南,周口,川汇', '114.650628', '33.647598', 1); +INSERT INTO `yx_system_city` VALUES (2045, 412097, 2, 411925, '411621000000', '扶沟县', '河南,周口,扶沟', '114.394915', '34.059862', 1); +INSERT INTO `yx_system_city` VALUES (2046, 412526, 2, 411925, '411622000000', '西华县', '河南,周口,西华', '114.529756', '33.767408', 1); +INSERT INTO `yx_system_city` VALUES (2047, 413030, 2, 411925, '411623000000', '商水县', '河南,周口,商水', '114.611596', '33.542480', 1); +INSERT INTO `yx_system_city` VALUES (2048, 413644, 2, 411925, '411624000000', '沈丘县', '河南,周口,沈丘', '115.098583', '33.409369', 1); +INSERT INTO `yx_system_city` VALUES (2049, 414239, 2, 411925, '411625000000', '郸城县', '河南,周口,郸城', '115.177189', '33.644743', 1); +INSERT INTO `yx_system_city` VALUES (2050, 414779, 2, 411925, '411626000000', '淮阳县', '河南,周口,淮阳', '114.886154', '33.731561', 1); +INSERT INTO `yx_system_city` VALUES (2051, 415271, 2, 411925, '411627000000', '太康县', '河南,周口,太康', '114.837887', '34.063798', 1); +INSERT INTO `yx_system_city` VALUES (2052, 416070, 2, 411925, '411628000000', '鹿邑县', '河南,周口,鹿邑', '115.484454', '33.860000', 1); +INSERT INTO `yx_system_city` VALUES (2053, 416651, 2, 411925, '411681000000', '项城市', '河南,周口,项城', '114.875333', '33.465838', 1); +INSERT INTO `yx_system_city` VALUES (2054, 417175, 2, 417174, '411701000000', '市辖区', '河南,驻马店', '114.022298', '33.011529', 1); +INSERT INTO `yx_system_city` VALUES (2055, 417176, 2, 417174, '411702000000', '驿城区', '河南,驻马店,驿城', '113.993914', '32.973054', 1); +INSERT INTO `yx_system_city` VALUES (2056, 417405, 2, 417174, '411721000000', '西平县', '河南,驻马店,西平', '114.021539', '33.387685', 1); +INSERT INTO `yx_system_city` VALUES (2057, 417712, 2, 417174, '411722000000', '上蔡县', '河南,驻马店,上蔡', '114.264381', '33.262439', 1); +INSERT INTO `yx_system_city` VALUES (2058, 418199, 2, 417174, '411723000000', '平舆县', '河南,驻马店,平舆', '114.619159', '32.962710', 1); +INSERT INTO `yx_system_city` VALUES (2059, 418443, 2, 417174, '411724000000', '正阳县', '河南,驻马店,正阳', '114.392774', '32.605697', 1); +INSERT INTO `yx_system_city` VALUES (2060, 418759, 2, 417174, '411725000000', '确山县', '河南,驻马店,确山', '114.026430', '32.802065', 1); +INSERT INTO `yx_system_city` VALUES (2061, 418973, 2, 417174, '411726000000', '泌阳县', '河南,驻马店,泌阳', '113.327144', '32.723975', 1); +INSERT INTO `yx_system_city` VALUES (2062, 419354, 2, 417174, '411727000000', '汝南县', '河南,驻马店,汝南', '114.362379', '33.006729', 1); +INSERT INTO `yx_system_city` VALUES (2063, 419654, 2, 417174, '411728000000', '遂平县', '河南,驻马店,遂平', '114.013182', '33.145649', 1); +INSERT INTO `yx_system_city` VALUES (2064, 419874, 2, 417174, '411729000000', '新蔡县', '河南,驻马店,新蔡', '114.965469', '32.744855', 1); +INSERT INTO `yx_system_city` VALUES (2065, 420259, 2, 420258, '419001000000', '济源市', '河南,济源', '112.602341', '35.069031', 1); +INSERT INTO `yx_system_city` VALUES (2066, 420826, 2, 420825, '420101000000', '市辖区', '湖北,武汉', '114.305392', '30.593098', 1); +INSERT INTO `yx_system_city` VALUES (2067, 420827, 2, 420825, '420102000000', '江岸区', '湖北,武汉,江岸', '114.309091', '30.600064', 1); +INSERT INTO `yx_system_city` VALUES (2068, 420996, 2, 420825, '420103000000', '江汉区', '湖北,武汉,江汉', '114.270871', '30.601430', 1); +INSERT INTO `yx_system_city` VALUES (2069, 421122, 2, 420825, '420104000000', '硚口区', '湖北,武汉,硚口', '114.214920', '30.582202', 1); +INSERT INTO `yx_system_city` VALUES (2070, 421270, 2, 420825, '420105000000', '汉阳区', '湖北,武汉,汉阳', '114.218724', '30.553905', 1); +INSERT INTO `yx_system_city` VALUES (2071, 421400, 2, 420825, '420106000000', '武昌区', '湖北,武汉,武昌', '114.316223', '30.554235', 1); +INSERT INTO `yx_system_city` VALUES (2072, 421559, 2, 420825, '420107000000', '青山区', '湖北,武汉,青山', '114.385539', '30.639630', 1); +INSERT INTO `yx_system_city` VALUES (2073, 421676, 2, 420825, '420111000000', '洪山区', '湖北,武汉,洪山', '114.343913', '30.500317', 1); +INSERT INTO `yx_system_city` VALUES (2074, 421983, 2, 420825, '420112000000', '东西湖区', '湖北,武汉,东西湖', '114.136886', '30.620020', 1); +INSERT INTO `yx_system_city` VALUES (2075, 422149, 2, 420825, '420113000000', '汉南区', '湖北,武汉,汉南', '114.084445', '30.308856', 1); +INSERT INTO `yx_system_city` VALUES (2076, 422220, 2, 420825, '420114000000', '蔡甸区', '湖北,武汉,蔡甸', '114.029328', '30.582271', 1); +INSERT INTO `yx_system_city` VALUES (2077, 422631, 2, 420825, '420115000000', '江夏区', '湖北,武汉,江夏', '114.321551', '30.375748', 1); +INSERT INTO `yx_system_city` VALUES (2078, 423075, 2, 420825, '420116000000', '黄陂区', '湖北,武汉,黄陂', '114.375743', '30.882557', 1); +INSERT INTO `yx_system_city` VALUES (2079, 423775, 2, 420825, '420117000000', '新洲区', '湖北,武汉,新洲', '114.801107', '30.841544', 1); +INSERT INTO `yx_system_city` VALUES (2080, 424450, 2, 424449, '420201000000', '市辖区', '湖北,黄石', '115.038520', '30.199652', 1); +INSERT INTO `yx_system_city` VALUES (2081, 424451, 2, 424449, '420202000000', '黄石港区', '湖北,黄石,黄石港', '115.065978', '30.223003', 1); +INSERT INTO `yx_system_city` VALUES (2082, 424489, 2, 424449, '420203000000', '西塞山区', '湖北,黄石,西塞山', '115.109955', '30.204924', 1); +INSERT INTO `yx_system_city` VALUES (2083, 424531, 2, 424449, '420204000000', '下陆区', '湖北,黄石,下陆', '114.961327', '30.173913', 1); +INSERT INTO `yx_system_city` VALUES (2084, 424574, 2, 424449, '420205000000', '铁山区', '湖北,黄石,铁山', '114.901412', '30.206592', 1); +INSERT INTO `yx_system_city` VALUES (2085, 424590, 2, 424449, '420222000000', '阳新县', '湖北,黄石,阳新', '115.215227', '29.830258', 1); +INSERT INTO `yx_system_city` VALUES (2086, 425070, 2, 424449, '420281000000', '大冶市', '湖北,黄石,大冶', '114.979875', '30.095643', 1); +INSERT INTO `yx_system_city` VALUES (2087, 425509, 2, 425508, '420301000000', '市辖区', '湖北,十堰', '110.797990', '32.629397', 1); +INSERT INTO `yx_system_city` VALUES (2088, 425510, 2, 425508, '420302000000', '茅箭区', '湖北,十堰,茅箭', '110.813621', '32.591929', 1); +INSERT INTO `yx_system_city` VALUES (2089, 425592, 2, 425508, '420303000000', '张湾区', '湖北,十堰,张湾', '110.769133', '32.652297', 1); +INSERT INTO `yx_system_city` VALUES (2090, 425709, 2, 425508, '420304000000', '郧阳区', '湖北,十堰,郧阳', '110.812050', '32.834776', 1); +INSERT INTO `yx_system_city` VALUES (2091, 426078, 2, 425508, '420322000000', '郧西县', '湖北,十堰,郧西', '110.425983', '32.993182', 1); +INSERT INTO `yx_system_city` VALUES (2092, 426440, 2, 425508, '420323000000', '竹山县', '湖北,十堰,竹山', '110.228694', '32.224875', 1); +INSERT INTO `yx_system_city` VALUES (2093, 426708, 2, 425508, '420324000000', '竹溪县', '湖北,十堰,竹溪', '109.715304', '32.318255', 1); +INSERT INTO `yx_system_city` VALUES (2094, 427085, 2, 425508, '420325000000', '房县', '湖北,十堰,房县', '110.726670', '32.040085', 1); +INSERT INTO `yx_system_city` VALUES (2095, 427420, 2, 425508, '420381000000', '丹江口市', '湖北,十堰,丹江口', '111.513127', '32.540157', 1); +INSERT INTO `yx_system_city` VALUES (2096, 427711, 2, 427710, '420501000000', '市辖区', '湖北,宜昌', '111.286471', '30.691967', 1); +INSERT INTO `yx_system_city` VALUES (2097, 427712, 2, 427710, '420502000000', '西陵区', '湖北,宜昌,西陵', '111.285646', '30.710782', 1); +INSERT INTO `yx_system_city` VALUES (2098, 427828, 2, 427710, '420503000000', '伍家岗区', '湖北,宜昌,伍家岗', '111.361037', '30.644334', 1); +INSERT INTO `yx_system_city` VALUES (2099, 427894, 2, 427710, '420504000000', '点军区', '湖北,宜昌,点军', '111.268120', '30.693247', 1); +INSERT INTO `yx_system_city` VALUES (2100, 427953, 2, 427710, '420505000000', '猇亭区', '湖北,宜昌,猇亭', '111.434620', '30.530903', 1); +INSERT INTO `yx_system_city` VALUES (2101, 427983, 2, 427710, '420506000000', '夷陵区', '湖北,宜昌,夷陵', '111.326380', '30.770006', 1); +INSERT INTO `yx_system_city` VALUES (2102, 428194, 2, 427710, '420525000000', '远安县', '湖北,宜昌,远安', '111.640508', '31.060869', 1); +INSERT INTO `yx_system_city` VALUES (2103, 428319, 2, 427710, '420526000000', '兴山县', '湖北,宜昌,兴山', '110.746805', '31.348196', 1); +INSERT INTO `yx_system_city` VALUES (2104, 428424, 2, 427710, '420527000000', '秭归县', '湖北,宜昌,秭归', '110.977711', '30.825897', 1); +INSERT INTO `yx_system_city` VALUES (2105, 428630, 2, 427710, '420528000000', '长阳土家族自治县', '湖北,宜昌,长阳', '111.207242', '30.472763', 1); +INSERT INTO `yx_system_city` VALUES (2106, 428807, 2, 427710, '420529000000', '五峰土家族自治县', '湖北,宜昌,五峰', '110.674706', '30.199688', 1); +INSERT INTO `yx_system_city` VALUES (2107, 428924, 2, 427710, '420581000000', '宜都市', '湖北,宜昌,宜都', '111.450006', '30.378327', 1); +INSERT INTO `yx_system_city` VALUES (2108, 429089, 2, 427710, '420582000000', '当阳市', '湖北,宜昌,当阳', '111.788312', '30.821266', 1); +INSERT INTO `yx_system_city` VALUES (2109, 429273, 2, 427710, '420583000000', '枝江市', '湖北,宜昌,枝江', '111.760530', '30.425940', 1); +INSERT INTO `yx_system_city` VALUES (2110, 429502, 2, 429501, '420601000000', '市辖区', '湖北,襄阳', '112.122414', '32.008986', 1); +INSERT INTO `yx_system_city` VALUES (2111, 429503, 2, 429501, '420602000000', '襄城区', '湖北,襄阳,襄城', '112.133974', '32.010351', 1); +INSERT INTO `yx_system_city` VALUES (2112, 429687, 2, 429501, '420606000000', '樊城区', '湖北,襄阳,樊城', '112.135684', '32.044833', 1); +INSERT INTO `yx_system_city` VALUES (2113, 429907, 2, 429501, '420607000000', '襄州区', '湖北,襄阳,襄州', '112.211899', '32.087298', 1); +INSERT INTO `yx_system_city` VALUES (2114, 430402, 2, 429501, '420624000000', '南漳县', '湖北,襄阳,南漳', '111.838905', '31.774636', 1); +INSERT INTO `yx_system_city` VALUES (2115, 430723, 2, 429501, '420625000000', '谷城县', '湖北,襄阳,谷城', '111.652982', '32.263849', 1); +INSERT INTO `yx_system_city` VALUES (2116, 431025, 2, 429501, '420626000000', '保康县', '湖北,襄阳,保康', '111.261309', '31.878310', 1); +INSERT INTO `yx_system_city` VALUES (2117, 431301, 2, 429501, '420682000000', '老河口市', '湖北,襄阳,老河口', '111.683861', '32.359068', 1); +INSERT INTO `yx_system_city` VALUES (2118, 431575, 2, 429501, '420683000000', '枣阳市', '湖北,襄阳,枣阳', '112.771959', '32.128818', 1); +INSERT INTO `yx_system_city` VALUES (2119, 432166, 2, 429501, '420684000000', '宜城市', '湖北,襄阳,宜城', '112.257788', '31.719806', 1); +INSERT INTO `yx_system_city` VALUES (2120, 432416, 2, 432415, '420701000000', '市辖区', '湖北,鄂州', '114.894843', '30.391940', 1); +INSERT INTO `yx_system_city` VALUES (2121, 432417, 2, 432415, '420702000000', '梁子湖区', '湖北,鄂州,梁子湖', '114.684731', '30.100141', 1); +INSERT INTO `yx_system_city` VALUES (2122, 432510, 2, 432415, '420703000000', '华容区', '湖北,鄂州,华容', '114.729878', '30.534310', 1); +INSERT INTO `yx_system_city` VALUES (2123, 432633, 2, 432415, '420704000000', '鄂城区', '湖北,鄂州,鄂城', '114.891615', '30.400572', 1); +INSERT INTO `yx_system_city` VALUES (2124, 432830, 2, 432829, '420801000000', '市辖区', '湖北,荆门', '112.199265', '31.035423', 1); +INSERT INTO `yx_system_city` VALUES (2125, 432831, 2, 432829, '420802000000', '东宝区', '湖北,荆门,东宝', '112.201493', '31.051852', 1); +INSERT INTO `yx_system_city` VALUES (2126, 433052, 2, 432829, '420804000000', '掇刀区', '湖北,荆门,掇刀', '112.207833', '30.973431', 1); +INSERT INTO `yx_system_city` VALUES (2127, 433182, 2, 432829, '420821000000', '京山县', '湖北,荆门,京山', '113.119566', '31.018457', 1); +INSERT INTO `yx_system_city` VALUES (2128, 433634, 2, 432829, '420822000000', '沙洋县', '湖北,荆门,沙洋', '112.588581', '30.709221', 1); +INSERT INTO `yx_system_city` VALUES (2129, 433944, 2, 432829, '420881000000', '钟祥市', '湖北,荆门,钟祥', '112.588121', '31.167820', 1); +INSERT INTO `yx_system_city` VALUES (2130, 434549, 2, 434548, '420901000000', '市辖区', '湖北,孝感', '113.916902', '30.924568', 1); +INSERT INTO `yx_system_city` VALUES (2131, 434550, 2, 434548, '420902000000', '孝南区', '湖北,孝感,孝南', '113.910958', '30.916874', 1); +INSERT INTO `yx_system_city` VALUES (2132, 435091, 2, 434548, '420921000000', '孝昌县', '湖北,孝感,孝昌', '113.998010', '31.258159', 1); +INSERT INTO `yx_system_city` VALUES (2133, 435563, 2, 434548, '420922000000', '大悟县', '湖北,孝感,大悟', '114.127022', '31.561165', 1); +INSERT INTO `yx_system_city` VALUES (2134, 435956, 2, 434548, '420923000000', '云梦县', '湖北,孝感,云梦', '113.753554', '31.020983', 1); +INSERT INTO `yx_system_city` VALUES (2135, 436267, 2, 434548, '420981000000', '应城市', '湖北,孝感,应城', '113.572707', '30.928370', 1); +INSERT INTO `yx_system_city` VALUES (2136, 436706, 2, 434548, '420982000000', '安陆市', '湖北,孝感,安陆', '113.688941', '31.255610', 1); +INSERT INTO `yx_system_city` VALUES (2137, 437119, 2, 434548, '420984000000', '汉川市', '湖北,孝感,汉川', '113.839149', '30.661244', 1); +INSERT INTO `yx_system_city` VALUES (2138, 437780, 2, 437779, '421001000000', '市辖区', '湖北,荆州', '112.239741', '30.335165', 1); +INSERT INTO `yx_system_city` VALUES (2139, 437781, 2, 437779, '421002000000', '沙市区', '湖北,荆州,沙市', '112.255583', '30.311056', 1); +INSERT INTO `yx_system_city` VALUES (2140, 437909, 2, 437779, '421003000000', '荆州区', '湖北,荆州,荆州', '112.190185', '30.352832', 1); +INSERT INTO `yx_system_city` VALUES (2141, 438103, 2, 437779, '421022000000', '公安县', '湖北,荆州,公安', '112.229648', '30.058336', 1); +INSERT INTO `yx_system_city` VALUES (2142, 438512, 2, 437779, '421023000000', '监利县', '湖北,荆州,监利', '112.897465', '29.811574', 1); +INSERT INTO `yx_system_city` VALUES (2143, 439263, 2, 437779, '421024000000', '江陵县', '湖北,荆州,江陵', '112.424664', '30.041822', 1); +INSERT INTO `yx_system_city` VALUES (2144, 439491, 2, 437779, '421081000000', '石首市', '湖北,荆州,石首', '112.425454', '29.720938', 1); +INSERT INTO `yx_system_city` VALUES (2145, 439836, 2, 437779, '421083000000', '洪湖市', '湖北,荆州,洪湖', '113.475980', '29.825458', 1); +INSERT INTO `yx_system_city` VALUES (2146, 440344, 2, 437779, '421087000000', '松滋市', '湖北,荆州,松滋', '111.756773', '30.174522', 1); +INSERT INTO `yx_system_city` VALUES (2147, 440640, 2, 440639, '421101000000', '市辖区', '湖北,黄冈', '114.872316', '30.453905', 1); +INSERT INTO `yx_system_city` VALUES (2148, 440641, 2, 440639, '421102000000', '黄州区', '湖北,黄冈,黄州', '114.879398', '30.434050', 1); +INSERT INTO `yx_system_city` VALUES (2149, 440797, 2, 440639, '421121000000', '团风县', '湖北,黄冈,团风', '114.872191', '30.643569', 1); +INSERT INTO `yx_system_city` VALUES (2150, 441110, 2, 440639, '421122000000', '红安县', '湖北,黄冈,红安', '114.618236', '31.288153', 1); +INSERT INTO `yx_system_city` VALUES (2151, 441550, 2, 440639, '421123000000', '罗田县', '湖北,黄冈,罗田', '115.399492', '30.783100', 1); +INSERT INTO `yx_system_city` VALUES (2152, 442017, 2, 440639, '421124000000', '英山县', '湖北,黄冈,英山', '115.681259', '30.734959', 1); +INSERT INTO `yx_system_city` VALUES (2153, 442351, 2, 440639, '421125000000', '浠水县', '湖北,黄冈,浠水', '115.265535', '30.451867', 1); +INSERT INTO `yx_system_city` VALUES (2154, 443040, 2, 440639, '421126000000', '蕲春县', '湖北,黄冈,蕲春', '115.437008', '30.225964', 1); +INSERT INTO `yx_system_city` VALUES (2155, 443641, 2, 440639, '421127000000', '黄梅县', '湖北,黄冈,黄梅', '115.944219', '30.070454', 1); +INSERT INTO `yx_system_city` VALUES (2156, 444186, 2, 440639, '421181000000', '麻城市', '湖北,黄冈,麻城', '115.008163', '31.172740', 1); +INSERT INTO `yx_system_city` VALUES (2157, 444684, 2, 440639, '421182000000', '武穴市', '湖北,黄冈,武穴', '115.561217', '29.844107', 1); +INSERT INTO `yx_system_city` VALUES (2158, 445041, 2, 445040, '421201000000', '市辖区', '湖北,咸宁', '114.322492', '29.841443', 1); +INSERT INTO `yx_system_city` VALUES (2159, 445042, 2, 445040, '421202000000', '咸安区', '湖北,咸宁,咸安', '114.298711', '29.852892', 1); +INSERT INTO `yx_system_city` VALUES (2160, 445249, 2, 445040, '421221000000', '嘉鱼县', '湖北,咸宁,嘉鱼', '113.939277', '29.970737', 1); +INSERT INTO `yx_system_city` VALUES (2161, 445363, 2, 445040, '421222000000', '通城县', '湖北,咸宁,通城', '113.816966', '29.245269', 1); +INSERT INTO `yx_system_city` VALUES (2162, 445569, 2, 445040, '421223000000', '崇阳县', '湖北,咸宁,崇阳', '114.039828', '29.555605', 1); +INSERT INTO `yx_system_city` VALUES (2163, 445786, 2, 445040, '421224000000', '通山县', '湖北,咸宁,通山', '114.482606', '29.605376', 1); +INSERT INTO `yx_system_city` VALUES (2164, 446007, 2, 445040, '421281000000', '赤壁市', '湖北,咸宁,赤壁', '113.900628', '29.724692', 1); +INSERT INTO `yx_system_city` VALUES (2165, 446213, 2, 446212, '421301000000', '市辖区', '湖北,随州', '113.382458', '31.690215', 1); +INSERT INTO `yx_system_city` VALUES (2166, 446214, 2, 446212, '421303000000', '曾都区', '湖北,随州,曾都', '113.371121', '31.716280', 1); +INSERT INTO `yx_system_city` VALUES (2167, 446433, 2, 446212, '421321000000', '随县', '湖北,随州,随县', '113.299528', '31.853833', 1); +INSERT INTO `yx_system_city` VALUES (2168, 446847, 2, 446212, '421381000000', '广水市', '湖北,随州,广水', '113.825890', '31.616854', 1); +INSERT INTO `yx_system_city` VALUES (2169, 447269, 2, 447268, '422801000000', '恩施市', '湖北,恩施,恩施', '109.479665', '30.294680', 1); +INSERT INTO `yx_system_city` VALUES (2170, 447495, 2, 447268, '422802000000', '利川市', '湖北,恩施,利川', '108.936376', '30.290996', 1); +INSERT INTO `yx_system_city` VALUES (2171, 448099, 2, 447268, '422822000000', '建始县', '湖北,恩施,建始', '109.726667', '30.601555', 1); +INSERT INTO `yx_system_city` VALUES (2172, 448521, 2, 447268, '422823000000', '巴东县', '湖北,恩施,巴东', '110.340756', '31.042324', 1); +INSERT INTO `yx_system_city` VALUES (2173, 448856, 2, 447268, '422825000000', '宣恩县', '湖北,恩施,宣恩', '109.491485', '29.986899', 1); +INSERT INTO `yx_system_city` VALUES (2174, 449150, 2, 447268, '422826000000', '咸丰县', '湖北,恩施,咸丰', '109.139726', '29.665203', 1); +INSERT INTO `yx_system_city` VALUES (2175, 449431, 2, 447268, '422827000000', '来凤县', '湖北,恩施,来凤', '109.407828', '29.493485', 1); +INSERT INTO `yx_system_city` VALUES (2176, 449636, 2, 447268, '422828000000', '鹤峰县', '湖北,恩施,鹤峰', '110.033662', '29.890171', 1); +INSERT INTO `yx_system_city` VALUES (2177, 449866, 2, 449865, '429004000000', '仙桃市', '湖北,仙桃', '113.442970', '30.328407', 1); +INSERT INTO `yx_system_city` VALUES (2178, 450653, 2, 449865, '429005000000', '潜江市', '湖北,潜江', '112.900284', '30.401947', 1); +INSERT INTO `yx_system_city` VALUES (2179, 451150, 2, 449865, '429006000000', '天门市', '湖北,天门', '113.166557', '30.663719', 1); +INSERT INTO `yx_system_city` VALUES (2180, 452034, 2, 449865, '429021000000', '神农架林区', '湖北,神农架林', '110.675758', '31.744898', 1); +INSERT INTO `yx_system_city` VALUES (2181, 452125, 2, 452124, '430101000000', '市辖区', '湖南,长沙', '112.938814', '28.228209', 1); +INSERT INTO `yx_system_city` VALUES (2182, 452126, 2, 452124, '430102000000', '芙蓉区', '湖南,长沙,芙蓉', '113.032539', '28.185386', 1); +INSERT INTO `yx_system_city` VALUES (2183, 452213, 2, 452124, '430103000000', '天心区', '湖南,长沙,天心', '112.989855', '28.112525', 1); +INSERT INTO `yx_system_city` VALUES (2184, 452314, 2, 452124, '430104000000', '岳麓区', '湖南,长沙,岳麓', '112.931383', '28.235243', 1); +INSERT INTO `yx_system_city` VALUES (2185, 452486, 2, 452124, '430105000000', '开福区', '湖南,长沙,开福', '112.985545', '28.257269', 1); +INSERT INTO `yx_system_city` VALUES (2186, 452610, 2, 452124, '430111000000', '雨花区', '湖南,长沙,雨花', '113.038017', '28.137710', 1); +INSERT INTO `yx_system_city` VALUES (2187, 452771, 2, 452124, '430112000000', '望城区', '湖南,长沙,望城', '112.819549', '28.347458', 1); +INSERT INTO `yx_system_city` VALUES (2188, 452924, 2, 452124, '430121000000', '长沙县', '湖南,长沙,长沙', '113.080810', '28.246150', 1); +INSERT INTO `yx_system_city` VALUES (2189, 453140, 2, 452124, '430124000000', '宁乡县', '湖南,长沙,宁乡', '112.551885', '28.277483', 1); +INSERT INTO `yx_system_city` VALUES (2190, 453444, 2, 452124, '430181000000', '浏阳市', '湖南,长沙,浏阳', '113.643076', '28.162833', 1); +INSERT INTO `yx_system_city` VALUES (2191, 453800, 2, 453799, '430201000000', '市辖区', '湖南,株洲', '113.134002', '27.827550', 1); +INSERT INTO `yx_system_city` VALUES (2192, 453801, 2, 453799, '430202000000', '荷塘区', '湖南,株洲,荷塘', '113.173487', '27.855929', 1); +INSERT INTO `yx_system_city` VALUES (2193, 453867, 2, 453799, '430203000000', '芦淞区', '湖南,株洲,芦淞', '113.152724', '27.785070', 1); +INSERT INTO `yx_system_city` VALUES (2194, 453957, 2, 453799, '430204000000', '石峰区', '湖南,株洲,石峰', '113.117732', '27.875445', 1); +INSERT INTO `yx_system_city` VALUES (2195, 454008, 2, 453799, '430211000000', '天元区', '湖南,株洲,天元', '113.082216', '27.826867', 1); +INSERT INTO `yx_system_city` VALUES (2196, 454113, 2, 453799, '430221000000', '株洲县', '湖南,株洲,株洲', '113.144006', '27.699346', 1); +INSERT INTO `yx_system_city` VALUES (2197, 454261, 2, 453799, '430223000000', '攸县', '湖南,株洲,攸县', '113.345309', '27.000227', 1); +INSERT INTO `yx_system_city` VALUES (2198, 454580, 2, 453799, '430224000000', '茶陵县', '湖南,株洲,茶陵', '113.539280', '26.777492', 1); +INSERT INTO `yx_system_city` VALUES (2199, 454845, 2, 453799, '430225000000', '炎陵县', '湖南,株洲,炎陵', '113.772655', '26.489902', 1); +INSERT INTO `yx_system_city` VALUES (2200, 454989, 2, 453799, '430281000000', '醴陵市', '湖南,株洲,醴陵', '113.496894', '27.646130', 1); +INSERT INTO `yx_system_city` VALUES (2201, 455284, 2, 455283, '430301000000', '市辖区', '湖南,湘潭', '112.944049', '27.829738', 1); +INSERT INTO `yx_system_city` VALUES (2202, 455285, 2, 455283, '430302000000', '雨湖区', '湖南,湘潭,雨湖', '112.907238', '27.856250', 1); +INSERT INTO `yx_system_city` VALUES (2203, 455426, 2, 455283, '430304000000', '岳塘区', '湖南,湘潭,岳塘', '112.969480', '27.872028', 1); +INSERT INTO `yx_system_city` VALUES (2204, 455515, 2, 455283, '430321000000', '湘潭县', '湖南,湘潭,湘潭', '112.950831', '27.778958', 1); +INSERT INTO `yx_system_city` VALUES (2205, 455889, 2, 455283, '430381000000', '湘乡市', '湖南,湘潭,湘乡', '112.535028', '27.734120', 1); +INSERT INTO `yx_system_city` VALUES (2206, 456260, 2, 455283, '430382000000', '韶山市', '湖南,湘潭,韶山', '112.526671', '27.915009', 1); +INSERT INTO `yx_system_city` VALUES (2207, 456304, 2, 456303, '430401000000', '市辖区', '湖南,衡阳', '112.571997', '26.893230', 1); +INSERT INTO `yx_system_city` VALUES (2208, 456305, 2, 456303, '430405000000', '珠晖区', '湖南,衡阳,珠晖', '112.620112', '26.894657', 1); +INSERT INTO `yx_system_city` VALUES (2209, 456391, 2, 456303, '430406000000', '雁峰区', '湖南,衡阳,雁峰', '112.616546', '26.888666', 1); +INSERT INTO `yx_system_city` VALUES (2210, 456449, 2, 456303, '430407000000', '石鼓区', '湖南,衡阳,石鼓', '112.598089', '26.943215', 1); +INSERT INTO `yx_system_city` VALUES (2211, 456502, 2, 456303, '430408000000', '蒸湘区', '湖南,衡阳,蒸湘', '112.567064', '26.911404', 1); +INSERT INTO `yx_system_city` VALUES (2212, 456558, 2, 456303, '430412000000', '南岳区', '湖南,衡阳,南岳', '112.738604', '27.232444', 1); +INSERT INTO `yx_system_city` VALUES (2213, 456587, 2, 456303, '430421000000', '衡阳县', '湖南,衡阳,衡阳', '112.370532', '26.969635', 1); +INSERT INTO `yx_system_city` VALUES (2214, 457104, 2, 456303, '430422000000', '衡南县', '湖南,衡阳,衡南', '112.677877', '26.738248', 1); +INSERT INTO `yx_system_city` VALUES (2215, 457576, 2, 456303, '430423000000', '衡山县', '湖南,衡阳,衡山', '112.868268', '27.230291', 1); +INSERT INTO `yx_system_city` VALUES (2216, 457742, 2, 456303, '430424000000', '衡东县', '湖南,衡阳,衡东', '112.953168', '27.081170', 1); +INSERT INTO `yx_system_city` VALUES (2217, 458018, 2, 456303, '430426000000', '祁东县', '湖南,衡阳,祁东', '112.090357', '26.799896', 1); +INSERT INTO `yx_system_city` VALUES (2218, 458411, 2, 456303, '430481000000', '耒阳市', '湖南,衡阳,耒阳', '112.859795', '26.422275', 1); +INSERT INTO `yx_system_city` VALUES (2219, 458820, 2, 456303, '430482000000', '常宁市', '湖南,衡阳,常宁', '112.399995', '26.420932', 1); +INSERT INTO `yx_system_city` VALUES (2220, 459252, 2, 459251, '430501000000', '市辖区', '湖南,邵阳', '111.467791', '27.238892', 1); +INSERT INTO `yx_system_city` VALUES (2221, 459253, 2, 459251, '430502000000', '双清区', '湖南,邵阳,双清', '111.496341', '27.232708', 1); +INSERT INTO `yx_system_city` VALUES (2222, 459357, 2, 459251, '430503000000', '大祥区', '湖南,邵阳,大祥', '111.439091', '27.221452', 1); +INSERT INTO `yx_system_city` VALUES (2223, 459470, 2, 459251, '430511000000', '北塔区', '湖南,邵阳,北塔', '111.452197', '27.246489', 1); +INSERT INTO `yx_system_city` VALUES (2224, 459517, 2, 459251, '430521000000', '邵东县', '湖南,邵阳,邵东', '111.744258', '27.258942', 1); +INSERT INTO `yx_system_city` VALUES (2225, 460126, 2, 459251, '430522000000', '新邵县', '湖南,邵阳,新邵', '111.458657', '27.320918', 1); +INSERT INTO `yx_system_city` VALUES (2226, 460558, 2, 459251, '430523000000', '邵阳县', '湖南,邵阳,邵阳', '111.273806', '26.990637', 1); +INSERT INTO `yx_system_city` VALUES (2227, 461014, 2, 459251, '430524000000', '隆回县', '湖南,邵阳,隆回', '111.032438', '27.113978', 1); +INSERT INTO `yx_system_city` VALUES (2228, 461613, 2, 459251, '430525000000', '洞口县', '湖南,邵阳,洞口', '110.575846', '27.060321', 1); +INSERT INTO `yx_system_city` VALUES (2229, 462000, 2, 459251, '430527000000', '绥宁县', '湖南,邵阳,绥宁', '110.155655', '26.581955', 1); +INSERT INTO `yx_system_city` VALUES (2230, 462257, 2, 459251, '430528000000', '新宁县', '湖南,邵阳,新宁', '110.856623', '26.433418', 1); +INSERT INTO `yx_system_city` VALUES (2231, 462600, 2, 459251, '430529000000', '城步苗族自治县', '湖南,邵阳,城步', '111.467791', '27.238892', 1); +INSERT INTO `yx_system_city` VALUES (2232, 462807, 2, 459251, '430581000000', '武冈市', '湖南,邵阳,武冈', '110.631884', '26.726599', 1); +INSERT INTO `yx_system_city` VALUES (2233, 463142, 2, 463141, '430601000000', '市辖区', '湖南,岳阳', '113.128958', '29.357104', 1); +INSERT INTO `yx_system_city` VALUES (2234, 463143, 2, 463141, '430602000000', '岳阳楼区', '湖南,岳阳,岳阳楼', '113.129702', '29.371903', 1); +INSERT INTO `yx_system_city` VALUES (2235, 463333, 2, 463141, '430603000000', '云溪区', '湖南,岳阳,云溪', '113.272313', '29.472746', 1); +INSERT INTO `yx_system_city` VALUES (2236, 463397, 2, 463141, '430611000000', '君山区', '湖南,岳阳,君山', '113.006435', '29.461106', 1); +INSERT INTO `yx_system_city` VALUES (2237, 463489, 2, 463141, '430621000000', '岳阳县', '湖南,岳阳,岳阳', '113.116418', '29.144067', 1); +INSERT INTO `yx_system_city` VALUES (2238, 463722, 2, 463141, '430623000000', '华容县', '湖南,岳阳,华容', '112.540463', '29.531057', 1); +INSERT INTO `yx_system_city` VALUES (2239, 463961, 2, 463141, '430624000000', '湘阴县', '湖南,岳阳,湘阴', '112.909426', '28.689105', 1); +INSERT INTO `yx_system_city` VALUES (2240, 464180, 2, 463141, '430626000000', '平江县', '湖南,岳阳,平江', '113.581234', '28.701868', 1); +INSERT INTO `yx_system_city` VALUES (2241, 464747, 2, 463141, '430681000000', '汨罗市', '湖南,岳阳,汨罗', '113.067259', '28.806890', 1); +INSERT INTO `yx_system_city` VALUES (2242, 464944, 2, 463141, '430682000000', '临湘市', '湖南,岳阳,临湘', '113.450423', '29.476849', 1); +INSERT INTO `yx_system_city` VALUES (2243, 465106, 2, 465105, '430701000000', '市辖区', '湖南,常德', '111.698497', '29.031673', 1); +INSERT INTO `yx_system_city` VALUES (2244, 465107, 2, 465105, '430702000000', '武陵区', '湖南,常德,武陵', '111.683153', '29.055163', 1); +INSERT INTO `yx_system_city` VALUES (2245, 465295, 2, 465105, '430703000000', '鼎城区', '湖南,常德,鼎城', '111.680783', '29.018593', 1); +INSERT INTO `yx_system_city` VALUES (2246, 465661, 2, 465105, '430721000000', '安乡县', '湖南,常德,安乡', '112.171131', '29.411309', 1); +INSERT INTO `yx_system_city` VALUES (2247, 465844, 2, 465105, '430722000000', '汉寿县', '湖南,常德,汉寿', '111.970514', '28.906107', 1); +INSERT INTO `yx_system_city` VALUES (2248, 466173, 2, 465105, '430723000000', '澧县', '湖南,常德,澧县', '111.758702', '29.633237', 1); +INSERT INTO `yx_system_city` VALUES (2249, 466483, 2, 465105, '430724000000', '临澧县', '湖南,常德,临澧', '111.647518', '29.440793', 1); +INSERT INTO `yx_system_city` VALUES (2250, 466654, 2, 465105, '430725000000', '桃源县', '湖南,常德,桃源', '111.488925', '28.902503', 1); +INSERT INTO `yx_system_city` VALUES (2251, 467112, 2, 465105, '430726000000', '石门县', '湖南,常德,石门', '111.380014', '29.584293', 1); +INSERT INTO `yx_system_city` VALUES (2252, 467471, 2, 465105, '430781000000', '津市市', '湖南,常德,津', '111.698497', '29.031673', 1); +INSERT INTO `yx_system_city` VALUES (2253, 467563, 2, 467562, '430801000000', '市辖区', '湖南,张家界', '110.479191', '29.117096', 1); +INSERT INTO `yx_system_city` VALUES (2254, 467564, 2, 467562, '430802000000', '永定区', '湖南,张家界,永定', '110.537138', '29.119856', 1); +INSERT INTO `yx_system_city` VALUES (2255, 467841, 2, 467562, '430811000000', '武陵源区', '湖南,张家界,武陵源', '110.550434', '29.345730', 1); +INSERT INTO `yx_system_city` VALUES (2256, 467881, 2, 467562, '430821000000', '慈利县', '湖南,张家界,慈利', '111.139711', '29.429972', 1); +INSERT INTO `yx_system_city` VALUES (2257, 468338, 2, 467562, '430822000000', '桑植县', '湖南,张家界,桑植', '110.204911', '29.414264', 1); +INSERT INTO `yx_system_city` VALUES (2258, 468661, 2, 468660, '430901000000', '市辖区', '湖南,益阳', '112.355180', '28.553860', 1); +INSERT INTO `yx_system_city` VALUES (2259, 468662, 2, 468660, '430902000000', '资阳区', '湖南,益阳,资阳', '112.324322', '28.590966', 1); +INSERT INTO `yx_system_city` VALUES (2260, 468790, 2, 468660, '430903000000', '赫山区', '湖南,益阳,赫山', '112.374024', '28.579343', 1); +INSERT INTO `yx_system_city` VALUES (2261, 469015, 2, 468660, '430921000000', '南县', '湖南,益阳,南县', '112.396241', '29.361338', 1); +INSERT INTO `yx_system_city` VALUES (2262, 469192, 2, 468660, '430922000000', '桃江县', '湖南,益阳,桃江', '112.155822', '28.518085', 1); +INSERT INTO `yx_system_city` VALUES (2263, 469452, 2, 468660, '430923000000', '安化县', '湖南,益阳,安化', '111.212846', '28.374107', 1); +INSERT INTO `yx_system_city` VALUES (2264, 469909, 2, 468660, '430981000000', '沅江市', '湖南,益阳,沅江', '112.355954', '28.847045', 1); +INSERT INTO `yx_system_city` VALUES (2265, 470124, 2, 470123, '431001000000', '市辖区', '湖南,郴州', '113.014717', '25.770509', 1); +INSERT INTO `yx_system_city` VALUES (2266, 470125, 2, 470123, '431002000000', '北湖区', '湖南,郴州,北湖', '113.011035', '25.784054', 1); +INSERT INTO `yx_system_city` VALUES (2267, 470300, 2, 470123, '431003000000', '苏仙区', '湖南,郴州,苏仙', '113.042441', '25.800370', 1); +INSERT INTO `yx_system_city` VALUES (2268, 470500, 2, 470123, '431021000000', '桂阳县', '湖南,郴州,桂阳', '112.734176', '25.754167', 1); +INSERT INTO `yx_system_city` VALUES (2269, 470894, 2, 470123, '431022000000', '宜章县', '湖南,郴州,宜章', '112.948772', '25.399792', 1); +INSERT INTO `yx_system_city` VALUES (2270, 471178, 2, 470123, '431023000000', '永兴县', '湖南,郴州,永兴', '113.116528', '26.127151', 1); +INSERT INTO `yx_system_city` VALUES (2271, 471473, 2, 470123, '431024000000', '嘉禾县', '湖南,郴州,嘉禾', '112.369021', '25.587520', 1); +INSERT INTO `yx_system_city` VALUES (2272, 471685, 2, 470123, '431025000000', '临武县', '湖南,郴州,临武', '112.563456', '25.275560', 1); +INSERT INTO `yx_system_city` VALUES (2273, 471908, 2, 470123, '431026000000', '汝城县', '湖南,郴州,汝城', '113.684727', '25.532816', 1); +INSERT INTO `yx_system_city` VALUES (2274, 472174, 2, 470123, '431027000000', '桂东县', '湖南,郴州,桂东', '113.944614', '26.077616', 1); +INSERT INTO `yx_system_city` VALUES (2275, 472301, 2, 470123, '431028000000', '安仁县', '湖南,郴州,安仁', '113.269441', '26.709056', 1); +INSERT INTO `yx_system_city` VALUES (2276, 472477, 2, 470123, '431081000000', '资兴市', '湖南,郴州,资兴', '113.236146', '25.976243', 1); +INSERT INTO `yx_system_city` VALUES (2277, 472710, 2, 472709, '431101000000', '市辖区', '湖南,永州', '111.613445', '26.420394', 1); +INSERT INTO `yx_system_city` VALUES (2278, 472711, 2, 472709, '431102000000', '零陵区', '湖南,永州,零陵', '111.631109', '26.221936', 1); +INSERT INTO `yx_system_city` VALUES (2279, 473062, 2, 472709, '431103000000', '冷水滩区', '湖南,永州,冷水滩', '111.592143', '26.461077', 1); +INSERT INTO `yx_system_city` VALUES (2280, 473284, 2, 472709, '431121000000', '祁阳县', '湖南,永州,祁阳', '111.840657', '26.580120', 1); +INSERT INTO `yx_system_city` VALUES (2281, 473871, 2, 472709, '431122000000', '东安县', '湖南,永州,东安', '111.314117', '26.394404', 1); +INSERT INTO `yx_system_city` VALUES (2282, 474233, 2, 472709, '431123000000', '双牌县', '湖南,永州,双牌', '111.659967', '25.961910', 1); +INSERT INTO `yx_system_city` VALUES (2283, 474367, 2, 472709, '431124000000', '道县', '湖南,永州,道县', '111.600796', '25.526438', 1); +INSERT INTO `yx_system_city` VALUES (2284, 474761, 2, 472709, '431125000000', '江永县', '湖南,永州,江永', '111.343911', '25.273539', 1); +INSERT INTO `yx_system_city` VALUES (2285, 474883, 2, 472709, '431126000000', '宁远县', '湖南,永州,宁远', '111.945805', '25.570976', 1); +INSERT INTO `yx_system_city` VALUES (2286, 475326, 2, 472709, '431127000000', '蓝山县', '湖南,永州,蓝山', '112.196731', '25.369898', 1); +INSERT INTO `yx_system_city` VALUES (2287, 475574, 2, 472709, '431128000000', '新田县', '湖南,永州,新田', '112.203287', '25.904305', 1); +INSERT INTO `yx_system_city` VALUES (2288, 475819, 2, 472709, '431129000000', '江华瑶族自治县', '湖南,永州,江华', '111.579305', '25.185590', 1); +INSERT INTO `yx_system_city` VALUES (2289, 476149, 2, 476148, '431201000000', '市辖区', '湖南,怀化', '109.998488', '27.554978', 1); +INSERT INTO `yx_system_city` VALUES (2290, 476150, 2, 476148, '431202000000', '鹤城区', '湖南,怀化,鹤城', '110.040315', '27.578926', 1); +INSERT INTO `yx_system_city` VALUES (2291, 476288, 2, 476148, '431221000000', '中方县', '湖南,怀化,中方', '109.944712', '27.440139', 1); +INSERT INTO `yx_system_city` VALUES (2292, 476449, 2, 476148, '431222000000', '沅陵县', '湖南,怀化,沅陵', '110.393844', '28.452686', 1); +INSERT INTO `yx_system_city` VALUES (2293, 476874, 2, 476148, '431223000000', '辰溪县', '湖南,怀化,辰溪', '110.183917', '28.006336', 1); +INSERT INTO `yx_system_city` VALUES (2294, 477191, 2, 476148, '431224000000', '溆浦县', '湖南,怀化,溆浦', '110.594921', '27.908281', 1); +INSERT INTO `yx_system_city` VALUES (2295, 477633, 2, 476148, '431225000000', '会同县', '湖南,怀化,会同', '109.735661', '26.887239', 1); +INSERT INTO `yx_system_city` VALUES (2296, 477895, 2, 476148, '431226000000', '麻阳苗族自治县', '湖南,怀化,麻阳', '109.802587', '27.865548', 1); +INSERT INTO `yx_system_city` VALUES (2297, 478135, 2, 476148, '431227000000', '新晃侗族自治县', '湖南,怀化,新晃', '109.174932', '27.352673', 1); +INSERT INTO `yx_system_city` VALUES (2298, 478299, 2, 476148, '431228000000', '芷江侗族自治县', '湖南,怀化,芷江', '109.684629', '27.443499', 1); +INSERT INTO `yx_system_city` VALUES (2299, 478536, 2, 476148, '431229000000', '靖州苗族侗族自治县', '湖南,怀化,靖州', '109.696311', '26.575052', 1); +INSERT INTO `yx_system_city` VALUES (2300, 478685, 2, 476148, '431230000000', '通道侗族自治县', '湖南,怀化,通道', '109.784412', '26.158054', 1); +INSERT INTO `yx_system_city` VALUES (2301, 478864, 2, 476148, '431281000000', '洪江市', '湖南,怀化,洪江', '109.836669', '27.208609', 1); +INSERT INTO `yx_system_city` VALUES (2302, 479104, 2, 479103, '431301000000', '市辖区', '湖南,娄底', '111.993497', '27.700062', 1); +INSERT INTO `yx_system_city` VALUES (2303, 479105, 2, 479103, '431302000000', '娄星区', '湖南,娄底,娄星', '112.001936', '27.729924', 1); +INSERT INTO `yx_system_city` VALUES (2304, 479285, 2, 479103, '431321000000', '双峰县', '湖南,娄底,双峰', '112.175246', '27.456658', 1); +INSERT INTO `yx_system_city` VALUES (2305, 479889, 2, 479103, '431322000000', '新化县', '湖南,娄底,新化', '111.327412', '27.726515', 1); +INSERT INTO `yx_system_city` VALUES (2306, 480606, 2, 479103, '431381000000', '冷水江市', '湖南,娄底,冷水江', '111.435623', '27.685850', 1); +INSERT INTO `yx_system_city` VALUES (2307, 480767, 2, 479103, '431382000000', '涟源市', '湖南,娄底,涟源', '111.664316', '27.692542', 1); +INSERT INTO `yx_system_city` VALUES (2308, 481320, 2, 481319, '433101000000', '吉首市', '湖南,湘西,吉首', '109.698055', '28.262507', 1); +INSERT INTO `yx_system_city` VALUES (2309, 481465, 2, 481319, '433122000000', '泸溪县', '湖南,湘西,泸溪', '110.219610', '28.216641', 1); +INSERT INTO `yx_system_city` VALUES (2310, 481626, 2, 481319, '433123000000', '凤凰县', '湖南,湘西,凤凰', '109.598719', '27.948116', 1); +INSERT INTO `yx_system_city` VALUES (2311, 481925, 2, 481319, '433124000000', '花垣县', '湖南,湘西,花垣', '109.482078', '28.572030', 1); +INSERT INTO `yx_system_city` VALUES (2312, 482179, 2, 481319, '433125000000', '保靖县', '湖南,湘西,保靖', '109.660577', '28.699774', 1); +INSERT INTO `yx_system_city` VALUES (2313, 482377, 2, 481319, '433126000000', '古丈县', '湖南,湘西,古丈', '109.950728', '28.616935', 1); +INSERT INTO `yx_system_city` VALUES (2314, 482506, 2, 481319, '433127000000', '永顺县', '湖南,湘西,永顺', '109.851254', '29.001440', 1); +INSERT INTO `yx_system_city` VALUES (2315, 482831, 2, 481319, '433130000000', '龙山县', '湖南,湘西,龙山', '109.443939', '29.457663', 1); +INSERT INTO `yx_system_city` VALUES (2316, 483252, 2, 483251, '440101000000', '市辖区', '广东,广州', '113.264434', '23.129162', 1); +INSERT INTO `yx_system_city` VALUES (2317, 483253, 2, 483251, '440103000000', '荔湾区', '广东,广州,荔湾', '113.244261', '23.125981', 1); +INSERT INTO `yx_system_city` VALUES (2318, 483462, 2, 483251, '440104000000', '越秀区', '广东,广州,越秀', '113.266841', '23.128524', 1); +INSERT INTO `yx_system_city` VALUES (2319, 483703, 2, 483251, '440105000000', '海珠区', '广东,广州,海珠', '113.317388', '23.083801', 1); +INSERT INTO `yx_system_city` VALUES (2320, 483979, 2, 483251, '440106000000', '天河区', '广东,广州,天河', '113.361200', '23.124680', 1); +INSERT INTO `yx_system_city` VALUES (2321, 484218, 2, 483251, '440111000000', '白云区', '广东,广州,白云', '113.273289', '23.157290', 1); +INSERT INTO `yx_system_city` VALUES (2322, 484627, 2, 483251, '440112000000', '黄埔区', '广东,广州,黄埔', '113.459749', '23.106402', 1); +INSERT INTO `yx_system_city` VALUES (2323, 484770, 2, 483251, '440113000000', '番禺区', '广东,广州,番禺', '113.384129', '22.937244', 1); +INSERT INTO `yx_system_city` VALUES (2324, 485059, 2, 483251, '440114000000', '花都区', '广东,广州,花都', '113.220218', '23.404165', 1); +INSERT INTO `yx_system_city` VALUES (2325, 485312, 2, 483251, '440115000000', '南沙区', '广东,广州,南沙', '113.525172', '22.801627', 1); +INSERT INTO `yx_system_city` VALUES (2326, 485489, 2, 483251, '440117000000', '从化区', '广东,广州,从化', '113.586605', '23.548852', 1); +INSERT INTO `yx_system_city` VALUES (2327, 485776, 2, 483251, '440118000000', '增城区', '广东,广州,增城', '113.810860', '23.261141', 1); +INSERT INTO `yx_system_city` VALUES (2328, 486130, 2, 486129, '440201000000', '市辖区', '广东,韶关', '113.597522', '24.810403', 1); +INSERT INTO `yx_system_city` VALUES (2329, 486131, 2, 486129, '440203000000', '武江区', '广东,韶关,武江', '113.587774', '24.792924', 1); +INSERT INTO `yx_system_city` VALUES (2330, 486223, 2, 486129, '440204000000', '浈江区', '广东,韶关,浈江', '113.611098', '24.804381', 1); +INSERT INTO `yx_system_city` VALUES (2331, 486345, 2, 486129, '440205000000', '曲江区', '广东,韶关,曲江', '113.604549', '24.682728', 1); +INSERT INTO `yx_system_city` VALUES (2332, 486469, 2, 486129, '440222000000', '始兴县', '广东,韶关,始兴', '114.061789', '24.952977', 1); +INSERT INTO `yx_system_city` VALUES (2333, 486609, 2, 486129, '440224000000', '仁化县', '广东,韶关,仁化', '113.749027', '25.085621', 1); +INSERT INTO `yx_system_city` VALUES (2334, 486746, 2, 486129, '440229000000', '翁源县', '广东,韶关,翁源', '114.130342', '24.350347', 1); +INSERT INTO `yx_system_city` VALUES (2335, 486929, 2, 486129, '440232000000', '乳源瑶族自治县', '广东,韶关,乳源', '113.275883', '24.776078', 1); +INSERT INTO `yx_system_city` VALUES (2336, 487058, 2, 486129, '440233000000', '新丰县', '广东,韶关,新丰', '114.206867', '24.059760', 1); +INSERT INTO `yx_system_city` VALUES (2337, 487223, 2, 486129, '440281000000', '乐昌市', '广东,韶关,乐昌', '113.347519', '25.130136', 1); +INSERT INTO `yx_system_city` VALUES (2338, 487468, 2, 486129, '440282000000', '南雄市', '广东,韶关,南雄', '114.311982', '25.117753', 1); +INSERT INTO `yx_system_city` VALUES (2339, 487722, 2, 487721, '440301000000', '市辖区', '广东,深圳', '114.057868', '22.543099', 1); +INSERT INTO `yx_system_city` VALUES (2340, 487723, 2, 487721, '440303000000', '罗湖区', '广东,深圳,罗湖', '114.131764', '22.548171', 1); +INSERT INTO `yx_system_city` VALUES (2341, 487849, 2, 487721, '440304000000', '福田区', '广东,深圳,福田', '114.055036', '22.521530', 1); +INSERT INTO `yx_system_city` VALUES (2342, 487977, 2, 487721, '440305000000', '南山区', '广东,深圳,南山', '113.930476', '22.533013', 1); +INSERT INTO `yx_system_city` VALUES (2343, 488090, 2, 487721, '440306000000', '宝安区', '广东,深圳,宝安', '113.884020', '22.555259', 1); +INSERT INTO `yx_system_city` VALUES (2344, 488375, 2, 487721, '440307000000', '龙岗区', '广东,深圳,龙岗', '114.246899', '22.720968', 1); +INSERT INTO `yx_system_city` VALUES (2345, 488558, 2, 487721, '440308000000', '盐田区', '广东,深圳,盐田', '114.236875', '22.556499', 1); +INSERT INTO `yx_system_city` VALUES (2346, 488590, 2, 488589, '440401000000', '市辖区', '广东,珠海', '113.576726', '22.270715', 1); +INSERT INTO `yx_system_city` VALUES (2347, 488591, 2, 488589, '440402000000', '香洲区', '广东,珠海,香洲', '113.543785', '22.265811', 1); +INSERT INTO `yx_system_city` VALUES (2348, 488768, 2, 488589, '440403000000', '斗门区', '广东,珠海,斗门', '113.296467', '22.209200', 1); +INSERT INTO `yx_system_city` VALUES (2349, 488905, 2, 488589, '440404000000', '金湾区', '广东,珠海,金湾', '113.363393', '22.146874', 1); +INSERT INTO `yx_system_city` VALUES (2350, 488955, 2, 488954, '440501000000', '市辖区', '广东,汕头', '116.681972', '23.354091', 1); +INSERT INTO `yx_system_city` VALUES (2351, 488956, 2, 488954, '440507000000', '龙湖区', '广东,汕头,龙湖', '116.716534', '23.371476', 1); +INSERT INTO `yx_system_city` VALUES (2352, 489082, 2, 488954, '440511000000', '金平区', '广东,汕头,金平', '116.703426', '23.365613', 1); +INSERT INTO `yx_system_city` VALUES (2353, 489270, 2, 488954, '440512000000', '濠江区', '广东,汕头,濠江', '116.726973', '23.286079', 1); +INSERT INTO `yx_system_city` VALUES (2354, 489338, 2, 488954, '440513000000', '潮阳区', '广东,汕头,潮阳', '116.601515', '23.264936', 1); +INSERT INTO `yx_system_city` VALUES (2355, 489624, 2, 488954, '440514000000', '潮南区', '广东,汕头,潮南', '116.433017', '23.250425', 1); +INSERT INTO `yx_system_city` VALUES (2356, 489868, 2, 488954, '440515000000', '澄海区', '广东,汕头,澄海', '116.756092', '23.465960', 1); +INSERT INTO `yx_system_city` VALUES (2357, 490064, 2, 488954, '440523000000', '南澳县', '广东,汕头,南澳', '117.023374', '23.421724', 1); +INSERT INTO `yx_system_city` VALUES (2358, 490107, 2, 490106, '440601000000', '市辖区', '广东,佛山', '113.121416', '23.021548', 1); +INSERT INTO `yx_system_city` VALUES (2359, 490108, 2, 490106, '440604000000', '禅城区', '广东,佛山,禅城', '113.122440', '23.009505', 1); +INSERT INTO `yx_system_city` VALUES (2360, 490257, 2, 490106, '440605000000', '南海区', '广东,佛山,南海', '113.143441', '23.028956', 1); +INSERT INTO `yx_system_city` VALUES (2361, 490531, 2, 490106, '440606000000', '顺德区', '广东,佛山,顺德', '113.293359', '22.805240', 1); +INSERT INTO `yx_system_city` VALUES (2362, 490746, 2, 490106, '440607000000', '三水区', '广东,佛山,三水', '112.896668', '23.156065', 1); +INSERT INTO `yx_system_city` VALUES (2363, 490834, 2, 490106, '440608000000', '高明区', '广东,佛山,高明', '112.892578', '22.900182', 1); +INSERT INTO `yx_system_city` VALUES (2364, 490920, 2, 490919, '440701000000', '市辖区', '广东,江门', '113.081901', '22.578738', 1); +INSERT INTO `yx_system_city` VALUES (2365, 490921, 2, 490919, '440703000000', '蓬江区', '广东,江门,蓬江', '113.078521', '22.595149', 1); +INSERT INTO `yx_system_city` VALUES (2366, 491070, 2, 490919, '440704000000', '江海区', '广东,江门,江海', '113.111612', '22.560474', 1); +INSERT INTO `yx_system_city` VALUES (2367, 491136, 2, 490919, '440705000000', '新会区', '广东,江门,新会', '113.034187', '22.458300', 1); +INSERT INTO `yx_system_city` VALUES (2368, 491380, 2, 490919, '440781000000', '台山市', '广东,江门,台山', '112.794065', '22.251924', 1); +INSERT INTO `yx_system_city` VALUES (2369, 491711, 2, 490919, '440783000000', '开平市', '广东,江门,开平', '112.698545', '22.376395', 1); +INSERT INTO `yx_system_city` VALUES (2370, 492000, 2, 490919, '440784000000', '鹤山市', '广东,江门,鹤山', '112.964446', '22.765392', 1); +INSERT INTO `yx_system_city` VALUES (2371, 492153, 2, 490919, '440785000000', '恩平市', '广东,江门,恩平', '112.305145', '22.183206', 1); +INSERT INTO `yx_system_city` VALUES (2372, 492342, 2, 492341, '440801000000', '市辖区', '广东,湛江', '110.359377', '21.270707', 1); +INSERT INTO `yx_system_city` VALUES (2373, 492343, 2, 492341, '440802000000', '赤坎区', '广东,湛江,赤坎', '110.365900', '21.266119', 1); +INSERT INTO `yx_system_city` VALUES (2374, 492393, 2, 492341, '440803000000', '霞山区', '广东,湛江,霞山', '110.398070', '21.191720', 1); +INSERT INTO `yx_system_city` VALUES (2375, 492484, 2, 492341, '440804000000', '坡头区', '广东,湛江,坡头', '110.455332', '21.244721', 1); +INSERT INTO `yx_system_city` VALUES (2376, 492563, 2, 492341, '440811000000', '麻章区', '广东,湛江,麻章', '110.334387', '21.263443', 1); +INSERT INTO `yx_system_city` VALUES (2377, 492716, 2, 492341, '440823000000', '遂溪县', '广东,湛江,遂溪', '110.250124', '21.377246', 1); +INSERT INTO `yx_system_city` VALUES (2378, 493015, 2, 492341, '440825000000', '徐闻县', '广东,湛江,徐闻', '110.176750', '20.325489', 1); +INSERT INTO `yx_system_city` VALUES (2379, 493241, 2, 492341, '440881000000', '廉江市', '广东,湛江,廉江', '110.286209', '21.609700', 1); +INSERT INTO `yx_system_city` VALUES (2380, 493663, 2, 492341, '440882000000', '雷州市', '广东,湛江,雷州', '110.096749', '20.914278', 1); +INSERT INTO `yx_system_city` VALUES (2381, 494182, 2, 492341, '440883000000', '吴川市', '广东,湛江,吴川', '110.778411', '21.441808', 1); +INSERT INTO `yx_system_city` VALUES (2382, 494395, 2, 494394, '440901000000', '市辖区', '广东,茂名', '110.925456', '21.662999', 1); +INSERT INTO `yx_system_city` VALUES (2383, 494396, 2, 494394, '440902000000', '茂南区', '广东,茂名,茂南', '110.918026', '21.641337', 1); +INSERT INTO `yx_system_city` VALUES (2384, 494629, 2, 494394, '440904000000', '电白区', '广东,茂名,电白', '111.013556', '21.514164', 1); +INSERT INTO `yx_system_city` VALUES (2385, 495088, 2, 494394, '440981000000', '高州市', '广东,茂名,高州', '110.853302', '21.917982', 1); +INSERT INTO `yx_system_city` VALUES (2386, 495611, 2, 494394, '440982000000', '化州市', '广东,茂名,化州', '110.639569', '21.664044', 1); +INSERT INTO `yx_system_city` VALUES (2387, 496016, 2, 494394, '440983000000', '信宜市', '广东,茂名,信宜', '110.947044', '22.354385', 1); +INSERT INTO `yx_system_city` VALUES (2388, 496439, 2, 496438, '441201000000', '市辖区', '广东,肇庆', '112.465091', '23.047191', 1); +INSERT INTO `yx_system_city` VALUES (2389, 496440, 2, 496438, '441202000000', '端州区', '广东,肇庆,端州', '112.484848', '23.052101', 1); +INSERT INTO `yx_system_city` VALUES (2390, 496505, 2, 496438, '441203000000', '鼎湖区', '广东,肇庆,鼎湖', '112.567588', '23.158447', 1); +INSERT INTO `yx_system_city` VALUES (2391, 496594, 2, 496438, '441204000000', '高要区', '广东,肇庆,高要', '112.457771', '23.025668', 1); +INSERT INTO `yx_system_city` VALUES (2392, 496964, 2, 496438, '441223000000', '广宁县', '广东,肇庆,广宁', '112.440690', '23.634676', 1); +INSERT INTO `yx_system_city` VALUES (2393, 497158, 2, 496438, '441224000000', '怀集县', '广东,肇庆,怀集', '112.184652', '23.911899', 1); +INSERT INTO `yx_system_city` VALUES (2394, 497503, 2, 496438, '441225000000', '封开县', '广东,肇庆,封开', '111.512343', '23.424033', 1); +INSERT INTO `yx_system_city` VALUES (2395, 497719, 2, 496438, '441226000000', '德庆县', '广东,肇庆,德庆', '111.785937', '23.143722', 1); +INSERT INTO `yx_system_city` VALUES (2396, 497926, 2, 496438, '441284000000', '四会市', '广东,肇庆,四会', '112.733773', '23.326504', 1); +INSERT INTO `yx_system_city` VALUES (2397, 498105, 2, 498104, '441301000000', '市辖区', '广东,惠州', '114.416196', '23.111847', 1); +INSERT INTO `yx_system_city` VALUES (2398, 498106, 2, 498104, '441302000000', '惠城区', '广东,惠州,惠城', '114.382541', '23.084122', 1); +INSERT INTO `yx_system_city` VALUES (2399, 498397, 2, 498104, '441303000000', '惠阳区', '广东,惠州,惠阳', '114.456696', '22.788734', 1); +INSERT INTO `yx_system_city` VALUES (2400, 498578, 2, 498104, '441322000000', '博罗县', '广东,惠州,博罗', '114.289496', '23.172899', 1); +INSERT INTO `yx_system_city` VALUES (2401, 498978, 2, 498104, '441323000000', '惠东县', '广东,惠州,惠东', '114.720079', '22.984975', 1); +INSERT INTO `yx_system_city` VALUES (2402, 499292, 2, 498104, '441324000000', '龙门县', '广东,惠州,龙门', '114.254863', '23.727737', 1); +INSERT INTO `yx_system_city` VALUES (2403, 499490, 2, 499489, '441401000000', '市辖区', '广东,梅州', '116.122238', '24.288615', 1); +INSERT INTO `yx_system_city` VALUES (2404, 499491, 2, 499489, '441402000000', '梅江区', '广东,梅州,梅江', '116.116616', '24.310384', 1); +INSERT INTO `yx_system_city` VALUES (2405, 499625, 2, 499489, '441403000000', '梅县区', '广东,梅州,梅县', '116.082183', '24.265312', 1); +INSERT INTO `yx_system_city` VALUES (2406, 500036, 2, 499489, '441422000000', '大埔县', '广东,梅州,大埔', '116.695195', '24.347783', 1); +INSERT INTO `yx_system_city` VALUES (2407, 500312, 2, 499489, '441423000000', '丰顺县', '广东,梅州,丰顺', '116.182299', '23.739526', 1); +INSERT INTO `yx_system_city` VALUES (2408, 500611, 2, 499489, '441424000000', '五华县', '广东,梅州,五华', '115.775788', '23.932409', 1); +INSERT INTO `yx_system_city` VALUES (2409, 501074, 2, 499489, '441426000000', '平远县', '广东,梅州,平远', '115.891638', '24.567262', 1); +INSERT INTO `yx_system_city` VALUES (2410, 501230, 2, 499489, '441427000000', '蕉岭县', '广东,梅州,蕉岭', '116.171356', '24.658700', 1); +INSERT INTO `yx_system_city` VALUES (2411, 501351, 2, 499489, '441481000000', '兴宁市', '广东,梅州,兴宁', '115.731110', '24.136630', 1); +INSERT INTO `yx_system_city` VALUES (2412, 501868, 2, 501867, '441501000000', '市辖区', '广东,汕尾', '115.375278', '22.786211', 1); +INSERT INTO `yx_system_city` VALUES (2413, 501869, 2, 501867, '441502000000', '城区', '广东,汕尾,城区', '115.365029', '22.778699', 1); +INSERT INTO `yx_system_city` VALUES (2414, 502002, 2, 501867, '441521000000', '海丰县', '广东,汕尾,海丰', '115.323436', '22.966586', 1); +INSERT INTO `yx_system_city` VALUES (2415, 502303, 2, 501867, '441523000000', '陆河县', '广东,汕尾,陆河', '115.660143', '23.301617', 1); +INSERT INTO `yx_system_city` VALUES (2416, 502439, 2, 501867, '441581000000', '陆丰市', '广东,汕尾,陆丰', '115.652260', '22.917576', 1); +INSERT INTO `yx_system_city` VALUES (2417, 502829, 2, 502828, '441601000000', '市辖区', '广东,河源', '114.700447', '23.743538', 1); +INSERT INTO `yx_system_city` VALUES (2418, 502830, 2, 502828, '441602000000', '源城区', '广东,河源,源城', '114.702517', '23.733969', 1); +INSERT INTO `yx_system_city` VALUES (2419, 502907, 2, 502828, '441621000000', '紫金县', '广东,河源,紫金', '115.184061', '23.635271', 1); +INSERT INTO `yx_system_city` VALUES (2420, 503226, 2, 502828, '441622000000', '龙川县', '广东,河源,龙川', '115.259872', '24.100066', 1); +INSERT INTO `yx_system_city` VALUES (2421, 503608, 2, 502828, '441623000000', '连平县', '广东,河源,连平', '114.488714', '24.369588', 1); +INSERT INTO `yx_system_city` VALUES (2422, 503797, 2, 502828, '441624000000', '和平县', '广东,河源,和平', '114.938684', '24.442180', 1); +INSERT INTO `yx_system_city` VALUES (2423, 504060, 2, 502828, '441625000000', '东源县', '广东,河源,东源', '114.746380', '23.788393', 1); +INSERT INTO `yx_system_city` VALUES (2424, 504367, 2, 504366, '441701000000', '市辖区', '广东,阳江', '111.982232', '21.857958', 1); +INSERT INTO `yx_system_city` VALUES (2425, 504368, 2, 504366, '441702000000', '江城区', '广东,阳江,江城', '111.955059', '21.861787', 1); +INSERT INTO `yx_system_city` VALUES (2426, 504549, 2, 504366, '441704000000', '阳东区', '广东,阳江,阳东', '112.006338', '21.868358', 1); +INSERT INTO `yx_system_city` VALUES (2427, 504749, 2, 504366, '441721000000', '阳西县', '广东,阳江,阳西', '111.617849', '21.752396', 1); +INSERT INTO `yx_system_city` VALUES (2428, 504911, 2, 504366, '441781000000', '阳春市', '广东,阳江,阳春', '111.791539', '22.170438', 1); +INSERT INTO `yx_system_city` VALUES (2429, 505299, 2, 505298, '441801000000', '市辖区', '广东,清远', '113.056031', '23.681763', 1); +INSERT INTO `yx_system_city` VALUES (2430, 505300, 2, 505298, '441802000000', '清城区', '广东,清远,清城', '113.062692', '23.697899', 1); +INSERT INTO `yx_system_city` VALUES (2431, 505466, 2, 505298, '441803000000', '清新区', '广东,清远,清新', '113.017749', '23.734673', 1); +INSERT INTO `yx_system_city` VALUES (2432, 505685, 2, 505298, '441821000000', '佛冈县', '广东,清远,佛冈', '113.531607', '23.879192', 1); +INSERT INTO `yx_system_city` VALUES (2433, 505782, 2, 505298, '441823000000', '阳山县', '广东,清远,阳山', '112.641363', '24.465359', 1); +INSERT INTO `yx_system_city` VALUES (2434, 505963, 2, 505298, '441825000000', '连山壮族瑶族自治县', '广东,清远,连山', '112.093617', '24.570491', 1); +INSERT INTO `yx_system_city` VALUES (2435, 506027, 2, 505298, '441826000000', '连南瑶族自治县', '广东,清远,连南', '112.287012', '24.726017', 1); +INSERT INTO `yx_system_city` VALUES (2436, 506106, 2, 505298, '441881000000', '英德市', '广东,清远,英德', '113.402376', '24.205024', 1); +INSERT INTO `yx_system_city` VALUES (2437, 506430, 2, 505298, '441882000000', '连州市', '广东,清远,连州', '112.377361', '24.780966', 1); +INSERT INTO `yx_system_city` VALUES (2438, 506617, 2, 506616, '441900003000', '东城街道办事处', '广东,东莞,东城', '113.754635', '23.002896', 1); +INSERT INTO `yx_system_city` VALUES (2439, 506643, 2, 506616, '441900004000', '南城街道办事处', '广东,东莞,南城', '113.753133', '22.987560', 1); +INSERT INTO `yx_system_city` VALUES (2440, 506662, 2, 506616, '441900005000', '万江街道办事处', '广东,东莞,万江', '113.740409', '23.052146', 1); +INSERT INTO `yx_system_city` VALUES (2441, 506691, 2, 506616, '441900006000', '莞城街道办事处', '广东,东莞,莞城', '113.751050', '23.053413', 1); +INSERT INTO `yx_system_city` VALUES (2442, 506700, 2, 506616, '441900101000', '石碣镇', '广东,东莞,石碣', '113.802109', '23.094111', 1); +INSERT INTO `yx_system_city` VALUES (2443, 506716, 2, 506616, '441900102000', '石龙镇', '广东,东莞,石龙', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2444, 506727, 2, 506616, '441900103000', '茶山镇', '广东,东莞,茶山', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2445, 506746, 2, 506616, '441900104000', '石排镇', '广东,东莞,石排', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2446, 506766, 2, 506616, '441900105000', '企石镇', '广东,东莞,企石', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2447, 506787, 2, 506616, '441900106000', '横沥镇', '广东,东莞,横沥', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2448, 506805, 2, 506616, '441900107000', '桥头镇', '广东,东莞,桥头', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2449, 506823, 2, 506616, '441900108000', '谢岗镇', '广东,东莞,谢岗', '114.141456', '22.972083', 1); +INSERT INTO `yx_system_city` VALUES (2450, 506836, 2, 506616, '441900109000', '东坑镇', '广东,东莞,东坑', '113.948089', '22.989033', 1); +INSERT INTO `yx_system_city` VALUES (2451, 506853, 2, 506616, '441900110000', '常平镇', '广东,东莞,常平', '113.992186', '22.975601', 1); +INSERT INTO `yx_system_city` VALUES (2452, 506887, 2, 506616, '441900111000', '寮步镇', '广东,东莞,寮步', '113.818996', '23.025373', 1); +INSERT INTO `yx_system_city` VALUES (2453, 506918, 2, 506616, '441900112000', '樟木头镇', '广东,东莞,樟木头镇', '114.083278', '22.914909', 1); +INSERT INTO `yx_system_city` VALUES (2454, 506930, 2, 506616, '441900113000', '大朗镇', '广东,东莞,大朗', '113.915820', '22.915996', 1); +INSERT INTO `yx_system_city` VALUES (2455, 506959, 2, 506616, '441900114000', '黄江镇', '广东,东莞,黄江', '113.996039', '22.877840', 1); +INSERT INTO `yx_system_city` VALUES (2456, 506967, 2, 506616, '441900115000', '清溪镇', '广东,东莞,清溪', '114.164330', '22.844557', 1); +INSERT INTO `yx_system_city` VALUES (2457, 506990, 2, 506616, '441900116000', '塘厦镇', '广东,东莞,塘厦', '113.774481', '22.791051', 1); +INSERT INTO `yx_system_city` VALUES (2458, 507015, 2, 506616, '441900117000', '凤岗镇', '广东,东莞,凤岗', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2459, 507028, 2, 506616, '441900118000', '大岭山镇', '广东,东莞,大岭山镇', '113.842223', '22.899965', 1); +INSERT INTO `yx_system_city` VALUES (2460, 507052, 2, 506616, '441900119000', '长安镇', '广东,东莞,长安', '113.794060', '22.803590', 1); +INSERT INTO `yx_system_city` VALUES (2461, 507066, 2, 506616, '441900121000', '虎门镇', '广东,东莞,虎门', '113.672560', '22.814835', 1); +INSERT INTO `yx_system_city` VALUES (2462, 507099, 2, 506616, '441900122000', '厚街镇', '广东,东莞,厚街', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2463, 507124, 2, 506616, '441900123000', '沙田镇', '广东,东莞,沙田', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2464, 507143, 2, 506616, '441900124000', '道滘镇', '广东,东莞,道滘', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2465, 507158, 2, 506616, '441900125000', '洪梅镇', '广东,东莞,洪梅', '113.608903', '22.994717', 1); +INSERT INTO `yx_system_city` VALUES (2466, 507169, 2, 506616, '441900126000', '麻涌镇', '广东,东莞,麻涌', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2467, 507185, 2, 506616, '441900127000', '望牛墩镇', '广东,东莞,望牛墩镇', '113.656243', '23.055331', 1); +INSERT INTO `yx_system_city` VALUES (2468, 507208, 2, 506616, '441900128000', '中堂镇', '广东,东莞,中堂', '113.751765', '23.020536', 1); +INSERT INTO `yx_system_city` VALUES (2469, 507229, 2, 506616, '441900129000', '高埗镇', '广东,东莞,高埗', '113.722126', '23.078713', 1); +INSERT INTO `yx_system_city` VALUES (2470, 507249, 2, 506616, '441900401000', '松山湖管委会', '广东,东莞,松山湖', '113.909208', '22.960541', 1); +INSERT INTO `yx_system_city` VALUES (2471, 507251, 2, 506616, '441900402000', '虎门港管委会', '广东,东莞,虎门港', '113.583070', '22.864175', 1); +INSERT INTO `yx_system_city` VALUES (2472, 507253, 2, 506616, '441900403000', '东莞生态园', '广东,东莞,东莞生态园', '113.927452', '23.063210', 1); +INSERT INTO `yx_system_city` VALUES (2473, 507256, 2, 507255, '442000001000', '石岐区街道办事处', '广东,中山,石岐区', '113.384930', '22.532046', 1); +INSERT INTO `yx_system_city` VALUES (2474, 507276, 2, 507255, '442000002000', '东区街道办事处', '广东,中山,东区', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (2475, 507287, 2, 507255, '442000003000', '火炬开发区街道办事处', '广东,中山,火炬开发区', '113.480528', '22.566086', 1); +INSERT INTO `yx_system_city` VALUES (2476, 507295, 2, 507255, '442000004000', '西区街道办事处', '广东,中山,西区', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (2477, 507305, 2, 507255, '442000005000', '南区街道办事处', '广东,中山,南区', '113.358509', '22.472530', 1); +INSERT INTO `yx_system_city` VALUES (2478, 507310, 2, 507255, '442000006000', '五桂山街道办事处', '广东,中山,五桂山', '113.463397', '22.421549', 1); +INSERT INTO `yx_system_city` VALUES (2479, 507316, 2, 507255, '442000100000', '小榄镇', '广东,中山,小榄', '113.250897', '22.672099', 1); +INSERT INTO `yx_system_city` VALUES (2480, 507332, 2, 507255, '442000101000', '黄圃镇', '广东,中山,黄圃', '113.335242', '22.709897', 1); +INSERT INTO `yx_system_city` VALUES (2481, 507349, 2, 507255, '442000102000', '民众镇', '广东,中山,民众', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (2482, 507369, 2, 507255, '442000103000', '东凤镇', '广东,中山,东凤', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (2483, 507384, 2, 507255, '442000104000', '东升镇', '广东,中山,东升', '113.294393', '22.616908', 1); +INSERT INTO `yx_system_city` VALUES (2484, 507399, 2, 507255, '442000105000', '古镇镇', '广东,中山,古镇', '113.190869', '22.613406', 1); +INSERT INTO `yx_system_city` VALUES (2485, 507413, 2, 507255, '442000106000', '沙溪镇', '广东,中山,沙溪', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (2486, 507430, 2, 507255, '442000107000', '坦洲镇', '广东,中山,坦洲', '113.460373', '22.265182', 1); +INSERT INTO `yx_system_city` VALUES (2487, 507445, 2, 507255, '442000108000', '港口镇', '广东,中山,港口', '113.247148', '22.683616', 1); +INSERT INTO `yx_system_city` VALUES (2488, 507455, 2, 507255, '442000109000', '三角镇', '广东,中山,三角', '113.422371', '22.684688', 1); +INSERT INTO `yx_system_city` VALUES (2489, 507464, 2, 507255, '442000110000', '横栏镇', '广东,中山,横栏', '113.265845', '22.523201', 1); +INSERT INTO `yx_system_city` VALUES (2490, 507476, 2, 507255, '442000111000', '南头镇', '广东,中山,南头', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (2491, 507483, 2, 507255, '442000112000', '阜沙镇', '广东,中山,阜沙', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (2492, 507493, 2, 507255, '442000113000', '南朗镇', '广东,中山,南朗', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (2493, 507509, 2, 507255, '442000114000', '三乡镇', '广东,中山,三乡', '113.441614', '22.357754', 1); +INSERT INTO `yx_system_city` VALUES (2494, 507526, 2, 507255, '442000115000', '板芙镇', '广东,中山,板芙', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (2495, 507538, 2, 507255, '442000116000', '大涌镇', '广东,中山,大涌', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (2496, 507550, 2, 507255, '442000117000', '神湾镇', '广东,中山,神湾', '113.392782', '22.517645', 1); +INSERT INTO `yx_system_city` VALUES (2497, 507558, 2, 507557, '445101000000', '市辖区', '广东,潮州', '116.622603', '23.656950', 1); +INSERT INTO `yx_system_city` VALUES (2498, 507559, 2, 507557, '445102000000', '湘桥区', '广东,潮州,湘桥', '116.628632', '23.674536', 1); +INSERT INTO `yx_system_city` VALUES (2499, 507748, 2, 507557, '445103000000', '潮安区', '广东,潮州,潮安', '116.678204', '23.462613', 1); +INSERT INTO `yx_system_city` VALUES (2500, 508223, 2, 507557, '445122000000', '饶平县', '广东,潮州,饶平', '117.003900', '23.663824', 1); +INSERT INTO `yx_system_city` VALUES (2501, 508649, 2, 508648, '445201000000', '市辖区', '广东,揭阳', '116.372831', '23.549993', 1); +INSERT INTO `yx_system_city` VALUES (2502, 508650, 2, 508648, '445202000000', '榕城区', '广东,揭阳,榕城', '116.367026', '23.525153', 1); +INSERT INTO `yx_system_city` VALUES (2503, 508863, 2, 508648, '445203000000', '揭东区', '广东,揭阳,揭东', '116.412015', '23.566127', 1); +INSERT INTO `yx_system_city` VALUES (2504, 509101, 2, 508648, '445222000000', '揭西县', '广东,揭阳,揭西', '115.841838', '23.431294', 1); +INSERT INTO `yx_system_city` VALUES (2505, 509449, 2, 508648, '445224000000', '惠来县', '广东,揭阳,惠来', '116.295150', '23.033267', 1); +INSERT INTO `yx_system_city` VALUES (2506, 509796, 2, 508648, '445281000000', '普宁市', '广东,揭阳,普宁', '116.166004', '23.297642', 1); +INSERT INTO `yx_system_city` VALUES (2507, 510409, 2, 510408, '445301000000', '市辖区', '广东,云浮', '112.044491', '22.915094', 1); +INSERT INTO `yx_system_city` VALUES (2508, 510410, 2, 510408, '445302000000', '云城区', '广东,云浮,云城', '112.043857', '22.928115', 1); +INSERT INTO `yx_system_city` VALUES (2509, 510536, 2, 510408, '445303000000', '云安区', '广东,云浮,云安', '112.003209', '23.071020', 1); +INSERT INTO `yx_system_city` VALUES (2510, 510660, 2, 510408, '445321000000', '新兴县', '广东,云浮,新兴', '112.225335', '22.695690', 1); +INSERT INTO `yx_system_city` VALUES (2511, 510878, 2, 510408, '445322000000', '郁南县', '广东,云浮,郁南', '111.535249', '23.234627', 1); +INSERT INTO `yx_system_city` VALUES (2512, 511102, 2, 510408, '445381000000', '罗定市', '广东,云浮,罗定', '111.570010', '22.768595', 1); +INSERT INTO `yx_system_city` VALUES (2513, 511464, 2, 511463, '450101000000', '市辖区', '广西,南宁', '108.366543', '22.817002', 1); +INSERT INTO `yx_system_city` VALUES (2514, 511465, 2, 511463, '450102000000', '兴宁区', '广西,南宁,兴宁', '108.368871', '22.854021', 1); +INSERT INTO `yx_system_city` VALUES (2515, 511545, 2, 511463, '450103000000', '青秀区', '广西,南宁,青秀', '108.494024', '22.785879', 1); +INSERT INTO `yx_system_city` VALUES (2516, 511662, 2, 511463, '450105000000', '江南区', '广西,南宁,江南', '108.273158', '22.781632', 1); +INSERT INTO `yx_system_city` VALUES (2517, 511790, 2, 511463, '450107000000', '西乡塘区', '广西,南宁,西乡塘', '108.306886', '22.832770', 1); +INSERT INTO `yx_system_city` VALUES (2518, 511960, 2, 511463, '450108000000', '良庆区', '广西,南宁,良庆', '108.322102', '22.759090', 1); +INSERT INTO `yx_system_city` VALUES (2519, 512044, 2, 511463, '450109000000', '邕宁区', '广西,南宁,邕宁', '108.487369', '22.758390', 1); +INSERT INTO `yx_system_city` VALUES (2520, 512124, 2, 511463, '450110000000', '武鸣区', '广西,南宁,武鸣', '108.274712', '23.158693', 1); +INSERT INTO `yx_system_city` VALUES (2521, 512381, 2, 511463, '450123000000', '隆安县', '广西,南宁,隆安', '107.696153', '23.166028', 1); +INSERT INTO `yx_system_city` VALUES (2522, 512530, 2, 511463, '450124000000', '马山县', '广西,南宁,马山', '108.176979', '23.708192', 1); +INSERT INTO `yx_system_city` VALUES (2523, 512695, 2, 511463, '450125000000', '上林县', '广西,南宁,上林', '108.604921', '23.431936', 1); +INSERT INTO `yx_system_city` VALUES (2524, 512838, 2, 511463, '450126000000', '宾阳县', '广西,南宁,宾阳', '108.810326', '23.217787', 1); +INSERT INTO `yx_system_city` VALUES (2525, 513091, 2, 511463, '450127000000', '横县', '广西,南宁,横县', '109.261384', '22.679932', 1); +INSERT INTO `yx_system_city` VALUES (2526, 513435, 2, 513434, '450201000000', '市辖区', '广西,柳州', '109.415953', '24.325502', 1); +INSERT INTO `yx_system_city` VALUES (2527, 513436, 2, 513434, '450202000000', '城中区', '广西,柳州,城中', '109.410736', '24.315602', 1); +INSERT INTO `yx_system_city` VALUES (2528, 513477, 2, 513434, '450203000000', '鱼峰区', '广西,柳州,鱼峰', '109.452442', '24.318517', 1); +INSERT INTO `yx_system_city` VALUES (2529, 513569, 2, 513434, '450204000000', '柳南区', '广西,柳州,柳南', '109.385519', '24.336229', 1); +INSERT INTO `yx_system_city` VALUES (2530, 513661, 2, 513434, '450205000000', '柳北区', '广西,柳州,柳北', '109.402050', '24.362691', 1); +INSERT INTO `yx_system_city` VALUES (2531, 513772, 2, 513434, '450206000000', '柳江区', '广西,柳州,柳江', '109.326380', '24.254892', 1); +INSERT INTO `yx_system_city` VALUES (2532, 513938, 2, 513434, '450222000000', '柳城县', '广西,柳州,柳城', '109.244730', '24.651518', 1); +INSERT INTO `yx_system_city` VALUES (2533, 514091, 2, 513434, '450223000000', '鹿寨县', '广西,柳州,鹿寨', '109.750638', '24.472897', 1); +INSERT INTO `yx_system_city` VALUES (2534, 514219, 2, 513434, '450224000000', '融安县', '广西,柳州,融安', '109.397538', '25.224550', 1); +INSERT INTO `yx_system_city` VALUES (2535, 514380, 2, 513434, '450225000000', '融水苗族自治县', '广西,柳州,融水', '109.256334', '25.065934', 1); +INSERT INTO `yx_system_city` VALUES (2536, 514607, 2, 513434, '450226000000', '三江侗族自治县', '广西,柳州,三江', '109.607675', '25.783198', 1); +INSERT INTO `yx_system_city` VALUES (2537, 514791, 2, 514790, '450301000000', '市辖区', '广西,桂林', '110.290194', '25.273566', 1); +INSERT INTO `yx_system_city` VALUES (2538, 514792, 2, 514790, '450302000000', '秀峰区', '广西,桂林,秀峰', '110.264183', '25.273625', 1); +INSERT INTO `yx_system_city` VALUES (2539, 514824, 2, 514790, '450303000000', '叠彩区', '广西,桂林,叠彩', '110.301723', '25.314001', 1); +INSERT INTO `yx_system_city` VALUES (2540, 514864, 2, 514790, '450304000000', '象山区', '广西,桂林,象山', '110.281082', '25.261687', 1); +INSERT INTO `yx_system_city` VALUES (2541, 514911, 2, 514790, '450305000000', '七星区', '广西,桂林,七星', '110.317826', '25.252701', 1); +INSERT INTO `yx_system_city` VALUES (2542, 514964, 2, 514790, '450311000000', '雁山区', '广西,桂林,雁山', '110.286690', '25.101935', 1); +INSERT INTO `yx_system_city` VALUES (2543, 515012, 2, 514790, '450312000000', '临桂区', '广西,桂林,临桂', '110.212463', '25.238628', 1); +INSERT INTO `yx_system_city` VALUES (2544, 515195, 2, 514790, '450321000000', '阳朔县', '广西,桂林,阳朔', '110.496593', '24.778481', 1); +INSERT INTO `yx_system_city` VALUES (2545, 515319, 2, 514790, '450323000000', '灵川县', '广西,桂林,灵川', '110.325636', '25.409747', 1); +INSERT INTO `yx_system_city` VALUES (2546, 515481, 2, 514790, '450324000000', '全州县', '广西,桂林,全州', '111.072926', '25.928617', 1); +INSERT INTO `yx_system_city` VALUES (2547, 515784, 2, 514790, '450325000000', '兴安县', '广西,桂林,兴安', '110.671670', '25.611705', 1); +INSERT INTO `yx_system_city` VALUES (2548, 515920, 2, 514790, '450326000000', '永福县', '广西,桂林,永福', '109.983076', '24.979856', 1); +INSERT INTO `yx_system_city` VALUES (2549, 516029, 2, 514790, '450327000000', '灌阳县', '广西,桂林,灌阳', '111.160851', '25.489383', 1); +INSERT INTO `yx_system_city` VALUES (2550, 516180, 2, 514790, '450328000000', '龙胜各族自治县', '广西,桂林,龙胜各族', '110.011238', '25.797931', 1); +INSERT INTO `yx_system_city` VALUES (2551, 516317, 2, 514790, '450329000000', '资源县', '广西,桂林,资源', '110.652700', '26.042443', 1); +INSERT INTO `yx_system_city` VALUES (2552, 516399, 2, 514790, '450330000000', '平乐县', '广西,桂林,平乐', '110.643305', '24.633362', 1); +INSERT INTO `yx_system_city` VALUES (2553, 516563, 2, 514790, '450331000000', '荔浦县', '广西,桂林,荔浦', '110.395287', '24.487824', 1); +INSERT INTO `yx_system_city` VALUES (2554, 516721, 2, 514790, '450332000000', '恭城瑶族自治县', '广西,桂林,恭城', '110.830193', '24.822522', 1); +INSERT INTO `yx_system_city` VALUES (2555, 516859, 2, 516858, '450401000000', '市辖区', '广西,梧州', '111.279115', '23.476962', 1); +INSERT INTO `yx_system_city` VALUES (2556, 516860, 2, 516858, '450403000000', '万秀区', '广西,梧州,万秀', '111.320542', '23.472962', 1); +INSERT INTO `yx_system_city` VALUES (2557, 516945, 2, 516858, '450405000000', '长洲区', '广西,梧州,长洲', '111.274777', '23.485695', 1); +INSERT INTO `yx_system_city` VALUES (2558, 516991, 2, 516858, '450406000000', '龙圩区', '广西,梧州,龙圩', '111.246035', '23.409960', 1); +INSERT INTO `yx_system_city` VALUES (2559, 517075, 2, 516858, '450421000000', '苍梧县', '广西,梧州,苍梧', '111.544008', '23.845097', 1); +INSERT INTO `yx_system_city` VALUES (2560, 517230, 2, 516858, '450422000000', '藤县', '广西,梧州,藤县', '110.914849', '23.374984', 1); +INSERT INTO `yx_system_city` VALUES (2561, 517542, 2, 516858, '450423000000', '蒙山县', '广西,梧州,蒙山', '110.525003', '24.193570', 1); +INSERT INTO `yx_system_city` VALUES (2562, 517636, 2, 516858, '450481000000', '岑溪市', '广西,梧州,岑溪', '110.994913', '22.918350', 1); +INSERT INTO `yx_system_city` VALUES (2563, 517934, 2, 517933, '450501000000', '市辖区', '广西,北海', '109.119927', '21.481254', 1); +INSERT INTO `yx_system_city` VALUES (2564, 517935, 2, 517933, '450502000000', '海城区', '广西,北海,海城', '109.117210', '21.475005', 1); +INSERT INTO `yx_system_city` VALUES (2565, 518010, 2, 517933, '450503000000', '银海区', '广西,北海,银海', '109.139990', '21.449219', 1); +INSERT INTO `yx_system_city` VALUES (2566, 518067, 2, 517933, '450512000000', '铁山港区', '广西,北海,铁山港', '109.421581', '21.529128', 1); +INSERT INTO `yx_system_city` VALUES (2567, 518115, 2, 517933, '450521000000', '合浦县', '广西,北海,合浦', '109.207336', '21.660936', 1); +INSERT INTO `yx_system_city` VALUES (2568, 518408, 2, 518407, '450601000000', '市辖区', '广西,防城港', '108.353846', '21.686860', 1); +INSERT INTO `yx_system_city` VALUES (2569, 518409, 2, 518407, '450602000000', '港口区', '广西,防城港,港口', '108.380144', '21.643384', 1); +INSERT INTO `yx_system_city` VALUES (2570, 518455, 2, 518407, '450603000000', '防城区', '广西,防城港,防城', '108.353499', '21.769212', 1); +INSERT INTO `yx_system_city` VALUES (2571, 518641, 2, 518407, '450621000000', '上思县', '广西,防城港,上思', '107.983626', '22.153672', 1); +INSERT INTO `yx_system_city` VALUES (2572, 518762, 2, 518407, '450681000000', '东兴市', '广西,防城港,东兴', '107.971826', '21.547822', 1); +INSERT INTO `yx_system_city` VALUES (2573, 518809, 2, 518808, '450701000000', '市辖区', '广西,钦州', '108.654146', '21.979933', 1); +INSERT INTO `yx_system_city` VALUES (2574, 518810, 2, 518808, '450702000000', '钦南区', '广西,钦州,钦南', '108.657210', '21.938860', 1); +INSERT INTO `yx_system_city` VALUES (2575, 519003, 2, 518808, '450703000000', '钦北区', '广西,钦州,钦北', '108.449110', '22.132761', 1); +INSERT INTO `yx_system_city` VALUES (2576, 519201, 2, 518808, '450721000000', '灵山县', '广西,钦州,灵山', '109.291007', '22.416537', 1); +INSERT INTO `yx_system_city` VALUES (2577, 519637, 2, 518808, '450722000000', '浦北县', '广西,钦州,浦北', '109.556953', '22.271651', 1); +INSERT INTO `yx_system_city` VALUES (2578, 519930, 2, 519929, '450801000000', '市辖区', '广西,贵港', '109.598926', '23.111530', 1); +INSERT INTO `yx_system_city` VALUES (2579, 519931, 2, 519929, '450802000000', '港北区', '广西,贵港,港北', '109.572240', '23.111531', 1); +INSERT INTO `yx_system_city` VALUES (2580, 520063, 2, 519929, '450803000000', '港南区', '广西,贵港,港南', '109.599557', '23.075573', 1); +INSERT INTO `yx_system_city` VALUES (2581, 520240, 2, 519929, '450804000000', '覃塘区', '广西,贵港,覃塘', '109.452662', '23.127149', 1); +INSERT INTO `yx_system_city` VALUES (2582, 520397, 2, 519929, '450821000000', '平南县', '广西,贵港,平南', '110.392168', '23.539127', 1); +INSERT INTO `yx_system_city` VALUES (2583, 520707, 2, 519929, '450881000000', '桂平市', '广西,贵港,桂平', '110.079379', '23.394326', 1); +INSERT INTO `yx_system_city` VALUES (2584, 521167, 2, 521166, '450901000000', '市辖区', '广西,玉林', '110.164756', '22.636379', 1); +INSERT INTO `yx_system_city` VALUES (2585, 521168, 2, 521166, '450902000000', '玉州区', '广西,玉林,玉州', '110.151147', '22.628102', 1); +INSERT INTO `yx_system_city` VALUES (2586, 521286, 2, 521166, '450903000000', '福绵区', '广西,玉林,福绵', '110.059439', '22.585557', 1); +INSERT INTO `yx_system_city` VALUES (2587, 521409, 2, 521166, '450921000000', '容县', '广西,玉林,容县', '110.557874', '22.857823', 1); +INSERT INTO `yx_system_city` VALUES (2588, 521652, 2, 521166, '450922000000', '陆川县', '广西,玉林,陆川', '110.264052', '22.321048', 1); +INSERT INTO `yx_system_city` VALUES (2589, 521832, 2, 521166, '450923000000', '博白县', '广西,玉林,博白', '109.975985', '22.273048', 1); +INSERT INTO `yx_system_city` VALUES (2590, 522220, 2, 521166, '450924000000', '兴业县', '广西,玉林,兴业', '109.875304', '22.736421', 1); +INSERT INTO `yx_system_city` VALUES (2591, 522448, 2, 521166, '450981000000', '北流市', '广西,玉林,北流', '110.354215', '22.708311', 1); +INSERT INTO `yx_system_city` VALUES (2592, 522787, 2, 522786, '451001000000', '市辖区', '广西,百色', '106.618201', '23.902333', 1); +INSERT INTO `yx_system_city` VALUES (2593, 522788, 2, 522786, '451002000000', '右江区', '广西,百色,右江', '106.618645', '23.901383', 1); +INSERT INTO `yx_system_city` VALUES (2594, 522918, 2, 522786, '451021000000', '田阳县', '广西,百色,田阳', '106.915418', '23.735682', 1); +INSERT INTO `yx_system_city` VALUES (2595, 523086, 2, 522786, '451022000000', '田东县', '广西,百色,田东', '107.126081', '23.597194', 1); +INSERT INTO `yx_system_city` VALUES (2596, 523265, 2, 522786, '451023000000', '平果县', '广西,百色,平果', '107.589810', '23.329376', 1); +INSERT INTO `yx_system_city` VALUES (2597, 523461, 2, 522786, '451024000000', '德保县', '广西,百色,德保', '106.615374', '23.323450', 1); +INSERT INTO `yx_system_city` VALUES (2598, 523661, 2, 522786, '451026000000', '那坡县', '广西,百色,那坡', '105.832530', '23.387441', 1); +INSERT INTO `yx_system_city` VALUES (2599, 523801, 2, 522786, '451027000000', '凌云县', '广西,百色,凌云', '106.561310', '24.347557', 1); +INSERT INTO `yx_system_city` VALUES (2600, 523920, 2, 522786, '451028000000', '乐业县', '广西,百色,乐业', '106.556519', '24.776827', 1); +INSERT INTO `yx_system_city` VALUES (2601, 524017, 2, 522786, '451029000000', '田林县', '广西,百色,田林', '106.228538', '24.294488', 1); +INSERT INTO `yx_system_city` VALUES (2602, 524200, 2, 522786, '451030000000', '西林县', '广西,百色,西林', '105.093837', '24.489810', 1); +INSERT INTO `yx_system_city` VALUES (2603, 524306, 2, 522786, '451031000000', '隆林各族自治县', '广西,百色,隆林各族', '105.344040', '24.770896', 1); +INSERT INTO `yx_system_city` VALUES (2604, 524502, 2, 522786, '451081000000', '靖西市', '广西,百色,靖西', '106.417549', '23.134766', 1); +INSERT INTO `yx_system_city` VALUES (2605, 524815, 2, 524814, '451101000000', '市辖区', '广西,贺州', '111.566694', '24.403582', 1); +INSERT INTO `yx_system_city` VALUES (2606, 524816, 2, 524814, '451102000000', '八步区', '广西,贺州,八步', '111.552096', '24.411805', 1); +INSERT INTO `yx_system_city` VALUES (2607, 525035, 2, 524814, '451103000000', '平桂区', '广西,贺州,平桂', '111.566694', '24.403582', 1); +INSERT INTO `yx_system_city` VALUES (2608, 525169, 2, 524814, '451121000000', '昭平县', '广西,贺州,昭平', '110.811287', '24.169480', 1); +INSERT INTO `yx_system_city` VALUES (2609, 525341, 2, 524814, '451122000000', '钟山县', '广西,贺州,钟山', '111.303111', '24.526022', 1); +INSERT INTO `yx_system_city` VALUES (2610, 525470, 2, 524814, '451123000000', '富川瑶族自治县', '广西,贺州,富川', '111.277389', '24.814444', 1); +INSERT INTO `yx_system_city` VALUES (2611, 525639, 2, 525638, '451201000000', '市辖区', '广西,河池', '108.085261', '24.692931', 1); +INSERT INTO `yx_system_city` VALUES (2612, 525640, 2, 525638, '451202000000', '金城江区', '广西,河池,金城江', '108.037277', '24.689703', 1); +INSERT INTO `yx_system_city` VALUES (2613, 525798, 2, 525638, '451221000000', '南丹县', '广西,河池,南丹', '107.540722', '24.974486', 1); +INSERT INTO `yx_system_city` VALUES (2614, 525961, 2, 525638, '451222000000', '天峨县', '广西,河池,天峨', '107.173802', '24.999108', 1); +INSERT INTO `yx_system_city` VALUES (2615, 526066, 2, 525638, '451223000000', '凤山县', '广西,河池,凤山', '107.042191', '24.546876', 1); +INSERT INTO `yx_system_city` VALUES (2616, 526174, 2, 525638, '451224000000', '东兰县', '广西,河池,东兰', '107.374294', '24.510842', 1); +INSERT INTO `yx_system_city` VALUES (2617, 526338, 2, 525638, '451225000000', '罗城仫佬族自治县', '广西,河池,罗城', '108.904707', '24.777413', 1); +INSERT INTO `yx_system_city` VALUES (2618, 526493, 2, 525638, '451226000000', '环江毛南族自治县', '广西,河池,环江', '108.258028', '24.825664', 1); +INSERT INTO `yx_system_city` VALUES (2619, 526654, 2, 525638, '451227000000', '巴马瑶族自治县', '广西,河池,巴马', '107.258588', '24.142299', 1); +INSERT INTO `yx_system_city` VALUES (2620, 526772, 2, 525638, '451228000000', '都安瑶族自治县', '广西,河池,都安', '108.128403', '23.919338', 1); +INSERT INTO `yx_system_city` VALUES (2621, 527041, 2, 525638, '451229000000', '大化瑶族自治县', '广西,河池,大化', '108.085261', '24.692931', 1); +INSERT INTO `yx_system_city` VALUES (2622, 527216, 2, 525638, '451281000000', '宜州市', '广西,河池,宜州', '108.636415', '24.485214', 1); +INSERT INTO `yx_system_city` VALUES (2623, 527444, 2, 527443, '451301000000', '市辖区', '广西,来宾', '109.221465', '23.750306', 1); +INSERT INTO `yx_system_city` VALUES (2624, 527445, 2, 527443, '451302000000', '兴宾区', '广西,来宾,兴宾', '109.230541', '23.732926', 1); +INSERT INTO `yx_system_city` VALUES (2625, 527762, 2, 527443, '451321000000', '忻城县', '广西,来宾,忻城', '108.665666', '24.066235', 1); +INSERT INTO `yx_system_city` VALUES (2626, 527905, 2, 527443, '451322000000', '象州县', '广西,来宾,象州', '109.683985', '23.958528', 1); +INSERT INTO `yx_system_city` VALUES (2627, 528042, 2, 527443, '451323000000', '武宣县', '广西,来宾,武宣', '109.663207', '23.594110', 1); +INSERT INTO `yx_system_city` VALUES (2628, 528205, 2, 527443, '451324000000', '金秀瑶族自治县', '广西,来宾,金秀', '110.189462', '24.130374', 1); +INSERT INTO `yx_system_city` VALUES (2629, 528299, 2, 527443, '451381000000', '合山市', '广西,来宾,合山', '108.886082', '23.806536', 1); +INSERT INTO `yx_system_city` VALUES (2630, 528340, 2, 528339, '451401000000', '市辖区', '广西,崇左', '107.364711', '22.376532', 1); +INSERT INTO `yx_system_city` VALUES (2631, 528341, 2, 528339, '451402000000', '江州区', '广西,崇左,江州', '107.353437', '22.405325', 1); +INSERT INTO `yx_system_city` VALUES (2632, 528494, 2, 528339, '451421000000', '扶绥县', '广西,崇左,扶绥', '107.904187', '22.635013', 1); +INSERT INTO `yx_system_city` VALUES (2633, 528647, 2, 528339, '451422000000', '宁明县', '广西,崇左,宁明', '107.076457', '22.140192', 1); +INSERT INTO `yx_system_city` VALUES (2634, 528845, 2, 528339, '451423000000', '龙州县', '广西,崇左,龙州', '106.854451', '22.342797', 1); +INSERT INTO `yx_system_city` VALUES (2635, 528986, 2, 528339, '451424000000', '大新县', '广西,崇左,大新', '107.200654', '22.829288', 1); +INSERT INTO `yx_system_city` VALUES (2636, 529159, 2, 528339, '451425000000', '天等县', '广西,崇左,天等', '107.143433', '23.081394', 1); +INSERT INTO `yx_system_city` VALUES (2637, 529297, 2, 528339, '451481000000', '凭祥市', '广西,崇左,凭祥', '106.766293', '22.094485', 1); +INSERT INTO `yx_system_city` VALUES (2638, 529346, 2, 529345, '460101000000', '市辖区', '海南,海口', '110.198293', '20.044001', 1); +INSERT INTO `yx_system_city` VALUES (2639, 529347, 2, 529345, '460105000000', '秀英区', '海南,海口,秀英', '110.293561', '20.007969', 1); +INSERT INTO `yx_system_city` VALUES (2640, 529451, 2, 529345, '460106000000', '龙华区', '海南,海口,龙华', '110.328492', '20.031007', 1); +INSERT INTO `yx_system_city` VALUES (2641, 529589, 2, 529345, '460107000000', '琼山区', '海南,海口,琼山', '110.353972', '20.003170', 1); +INSERT INTO `yx_system_city` VALUES (2642, 529720, 2, 529345, '460108000000', '美兰区', '海南,海口,美兰', '110.366357', '20.029083', 1); +INSERT INTO `yx_system_city` VALUES (2643, 529879, 2, 529878, '460201000000', '市辖区', '海南,三亚', '109.511909', '18.252847', 1); +INSERT INTO `yx_system_city` VALUES (2644, 529910, 2, 529878, '460202000000', '海棠区', '海南,三亚,海棠', '109.760778', '18.407516', 1); +INSERT INTO `yx_system_city` VALUES (2645, 529934, 2, 529878, '460203000000', '吉阳区', '海南,三亚,吉阳', '109.578330', '18.281397', 1); +INSERT INTO `yx_system_city` VALUES (2646, 529973, 2, 529878, '460204000000', '天涯区', '海南,三亚,天涯', '109.506357', '18.247340', 1); +INSERT INTO `yx_system_city` VALUES (2647, 530027, 2, 529878, '460205000000', '崖州区', '海南,三亚,崖州', '109.174313', '18.352212', 1); +INSERT INTO `yx_system_city` VALUES (2648, 530061, 2, 530060, '460321000000', '西沙群岛', '海南,三沙,西沙群岛', '112.338695', '16.831839', 1); +INSERT INTO `yx_system_city` VALUES (2649, 530064, 2, 530060, '460322000000', '南沙群岛', '海南,三沙,南沙群岛', '112.338695', '16.831839', 1); +INSERT INTO `yx_system_city` VALUES (2650, 530067, 2, 530060, '460323000000', '中沙群岛的岛礁及其海域', '海南,三沙,中沙群岛的岛礁及其海域', '112.338695', '16.831839', 1); +INSERT INTO `yx_system_city` VALUES (2651, 530071, 2, 530070, '460400100000', '那大镇', '海南,儋州,那大', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2652, 530112, 2, 530070, '460400101000', '和庆镇', '海南,儋州,和庆', '109.640856', '19.525399', 1); +INSERT INTO `yx_system_city` VALUES (2653, 530126, 2, 530070, '460400102000', '南丰镇', '海南,儋州,南丰', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2654, 530139, 2, 530070, '460400103000', '大成镇', '海南,儋州,大成', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2655, 530162, 2, 530070, '460400104000', '雅星镇', '海南,儋州,雅星', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2656, 530188, 2, 530070, '460400105000', '兰洋镇', '海南,儋州,兰洋', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2657, 530207, 2, 530070, '460400106000', '光村镇', '海南,儋州,光村', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2658, 530220, 2, 530070, '460400107000', '木棠镇', '海南,儋州,木棠', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2659, 530246, 2, 530070, '460400108000', '海头镇', '海南,儋州,海头', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2660, 530261, 2, 530070, '460400109000', '峨蔓镇', '海南,儋州,峨蔓', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2661, 530275, 2, 530070, '460400110000', '三都镇', '海南,儋州,三都', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2662, 530285, 2, 530070, '460400111000', '王五镇', '海南,儋州,王五', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2663, 530295, 2, 530070, '460400112000', '白马井镇', '海南,儋州,白马井镇', '109.218734', '19.696407', 1); +INSERT INTO `yx_system_city` VALUES (2664, 530318, 2, 530070, '460400113000', '中和镇', '海南,儋州,中和', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2665, 530331, 2, 530070, '460400114000', '排浦镇', '海南,儋州,排浦', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2666, 530340, 2, 530070, '460400115000', '东成镇', '海南,儋州,东成', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2667, 530361, 2, 530070, '460400116000', '新州镇', '海南,儋州,新州', '110.349228', '20.017377', 1); +INSERT INTO `yx_system_city` VALUES (2668, 530394, 2, 530070, '460400400000', '国营西培农场', '海南,儋州,国营西培农场', '109.455554', '19.476422', 1); +INSERT INTO `yx_system_city` VALUES (2669, 530410, 2, 530070, '460400404000', '国营西联农场', '海南,儋州,国营西联农场', '109.539074', '19.673015', 1); +INSERT INTO `yx_system_city` VALUES (2670, 530431, 2, 530070, '460400405000', '国营蓝洋农场', '海南,儋州,国营蓝洋农场', '109.670723', '19.458984', 1); +INSERT INTO `yx_system_city` VALUES (2671, 530437, 2, 530070, '460400407000', '国营八一农场', '海南,儋州,国营八一农场', '109.364519', '19.413460', 1); +INSERT INTO `yx_system_city` VALUES (2672, 530447, 2, 530070, '460400499000', '洋浦经济开发区', '海南,儋州,洋浦经济开发', '109.202064', '19.736941', 1); +INSERT INTO `yx_system_city` VALUES (2673, 530466, 2, 530070, '460400500000', '华南热作学院', '海南,儋州,华南热作学院', '109.494073', '19.505382', 1); +INSERT INTO `yx_system_city` VALUES (2674, 530469, 2, 530468, '469001000000', '五指山市', '海南,五指山', '109.516922', '18.775146', 1); +INSERT INTO `yx_system_city` VALUES (2675, 530552, 2, 530468, '469002000000', '琼海市', '海南,琼海', '110.474579', '19.259140', 1); +INSERT INTO `yx_system_city` VALUES (2676, 530809, 2, 530468, '469005000000', '文昌市', '海南,文昌', '110.797714', '19.543423', 1); +INSERT INTO `yx_system_city` VALUES (2677, 531148, 2, 530468, '469006000000', '万宁市', '海南,万宁', '110.391075', '18.795143', 1); +INSERT INTO `yx_system_city` VALUES (2678, 531426, 2, 530468, '469007000000', '东方市', '海南,东方', '108.651817', '19.095350', 1); +INSERT INTO `yx_system_city` VALUES (2679, 531647, 2, 530468, '469021000000', '定安县', '海南,定安', '110.358891', '19.681434', 1); +INSERT INTO `yx_system_city` VALUES (2680, 531811, 2, 530468, '469022000000', '屯昌县', '海南,屯昌', '110.103415', '19.351766', 1); +INSERT INTO `yx_system_city` VALUES (2681, 531971, 2, 530468, '469023000000', '澄迈县', '海南,澄迈', '110.006755', '19.738521', 1); +INSERT INTO `yx_system_city` VALUES (2682, 532200, 2, 530468, '469024000000', '临高县', '海南,临高', '109.690508', '19.912026', 1); +INSERT INTO `yx_system_city` VALUES (2683, 532409, 2, 530468, '469025000000', '白沙黎族自治县', '海南,白沙', '109.451484', '19.224823', 1); +INSERT INTO `yx_system_city` VALUES (2684, 532558, 2, 530468, '469026000000', '昌江黎族自治县', '海南,昌江', '109.055724', '19.298062', 1); +INSERT INTO `yx_system_city` VALUES (2685, 532672, 2, 530468, '469027000000', '乐东黎族自治县', '海南,乐东', '109.173055', '18.750260', 1); +INSERT INTO `yx_system_city` VALUES (2686, 532906, 2, 530468, '469028000000', '陵水黎族自治县', '海南,陵水', '110.037504', '18.506048', 1); +INSERT INTO `yx_system_city` VALUES (2687, 533053, 2, 530468, '469029000000', '保亭黎族苗族自治县', '海南,保亭', '109.702590', '18.639130', 1); +INSERT INTO `yx_system_city` VALUES (2688, 533161, 2, 530468, '469030000000', '琼中黎族苗族自治县', '海南,琼中', '109.838389', '19.033369', 1); +INSERT INTO `yx_system_city` VALUES (2689, 533330, 2, 533329, '500101000000', '万州区', '重庆,万州', '108.408661', '30.807667', 1); +INSERT INTO `yx_system_city` VALUES (2690, 534019, 2, 533329, '500102000000', '涪陵区', '重庆,涪陵', '107.389298', '29.703113', 1); +INSERT INTO `yx_system_city` VALUES (2691, 534468, 2, 533329, '500103000000', '渝中区', '重庆,渝中', '106.568892', '29.552750', 1); +INSERT INTO `yx_system_city` VALUES (2692, 534558, 2, 533329, '500104000000', '大渡口区', '重庆,大渡口', '106.482347', '29.484527', 1); +INSERT INTO `yx_system_city` VALUES (2693, 534656, 2, 533329, '500105000000', '江北区', '重庆,江北', '106.574271', '29.606703', 1); +INSERT INTO `yx_system_city` VALUES (2694, 534799, 2, 533329, '500106000000', '沙坪坝区', '重庆,沙坪坝', '106.456878', '29.541145', 1); +INSERT INTO `yx_system_city` VALUES (2695, 535021, 2, 533329, '500107000000', '九龙坡区', '重庆,九龙坡', '106.510676', '29.502272', 1); +INSERT INTO `yx_system_city` VALUES (2696, 535262, 2, 533329, '500108000000', '南岸区', '重庆,南岸', '106.644428', '29.500297', 1); +INSERT INTO `yx_system_city` VALUES (2697, 535428, 2, 533329, '500109000000', '北碚区', '重庆,北碚', '106.395612', '29.805108', 1); +INSERT INTO `yx_system_city` VALUES (2698, 535629, 2, 533329, '500110000000', '綦江区', '重庆,綦江', '106.651362', '29.028067', 1); +INSERT INTO `yx_system_city` VALUES (2699, 536131, 2, 533329, '500111000000', '大足区', '重庆,大足', '105.721733', '29.707032', 1); +INSERT INTO `yx_system_city` VALUES (2700, 536468, 2, 533329, '500112000000', '渝北区', '重庆,渝北', '106.631187', '29.718143', 1); +INSERT INTO `yx_system_city` VALUES (2701, 536890, 2, 533329, '500113000000', '巴南区', '重庆,巴南', '106.540257', '29.402408', 1); +INSERT INTO `yx_system_city` VALUES (2702, 537212, 2, 533329, '500114000000', '黔江区', '重庆,黔江', '108.770678', '29.533610', 1); +INSERT INTO `yx_system_city` VALUES (2703, 537461, 2, 533329, '500115000000', '长寿区', '重庆,长寿', '107.081283', '29.857996', 1); +INSERT INTO `yx_system_city` VALUES (2704, 537745, 2, 533329, '500116000000', '江津区', '重庆,江津', '106.259281', '29.290069', 1); +INSERT INTO `yx_system_city` VALUES (2705, 538050, 2, 533329, '500117000000', '合川区', '重庆,合川', '106.276130', '29.972084', 1); +INSERT INTO `yx_system_city` VALUES (2706, 538493, 2, 533329, '500118000000', '永川区', '重庆,永川', '105.927376', '29.356117', 1); +INSERT INTO `yx_system_city` VALUES (2707, 538778, 2, 533329, '500119000000', '南川区', '重庆,南川', '107.099266', '29.157891', 1); +INSERT INTO `yx_system_city` VALUES (2708, 539057, 2, 533329, '500120000000', '璧山区', '重庆,璧山', '106.227305', '29.592024', 1); +INSERT INTO `yx_system_city` VALUES (2709, 539260, 2, 533329, '500151000000', '铜梁区', '重庆,铜梁', '106.056404', '29.844811', 1); +INSERT INTO `yx_system_city` VALUES (2710, 539615, 2, 533329, '500152000000', '潼南区', '重庆,潼南', '105.840556', '30.191013', 1); +INSERT INTO `yx_system_city` VALUES (2711, 539942, 2, 533329, '500153000000', '荣昌区', '重庆,荣昌', '105.594623', '29.405002', 1); +INSERT INTO `yx_system_city` VALUES (2712, 540131, 2, 533329, '500154000000', '开州区', '重庆,开州', '106.551556', '29.563009', 1); +INSERT INTO `yx_system_city` VALUES (2713, 540701, 2, 540700, '500228000000', '梁平县', '重庆,梁平', '107.769312', '30.654203', 1); +INSERT INTO `yx_system_city` VALUES (2714, 541080, 2, 540700, '500229000000', '城口县', '重庆,城口', '108.664214', '31.947633', 1); +INSERT INTO `yx_system_city` VALUES (2715, 541310, 2, 540700, '500230000000', '丰都县', '重庆,丰都', '107.730895', '29.863500', 1); +INSERT INTO `yx_system_city` VALUES (2716, 541671, 2, 540700, '500231000000', '垫江县', '重庆,垫江', '107.333390', '30.327717', 1); +INSERT INTO `yx_system_city` VALUES (2717, 541999, 2, 540700, '500232000000', '武隆县', '重庆,武隆', '107.760025', '29.325601', 1); +INSERT INTO `yx_system_city` VALUES (2718, 542236, 2, 540700, '500233000000', '忠县', '重庆,忠县', '108.039002', '30.299560', 1); +INSERT INTO `yx_system_city` VALUES (2719, 542631, 2, 540700, '500235000000', '云阳县', '重庆,云阳', '108.697324', '30.930613', 1); +INSERT INTO `yx_system_city` VALUES (2720, 543152, 2, 540700, '500236000000', '奉节县', '重庆,奉节', '109.463987', '31.018498', 1); +INSERT INTO `yx_system_city` VALUES (2721, 543575, 2, 540700, '500237000000', '巫山县', '重庆,巫山', '109.879153', '31.074834', 1); +INSERT INTO `yx_system_city` VALUES (2722, 543943, 2, 540700, '500238000000', '巫溪县', '重庆,巫溪', '109.570062', '31.398604', 1); +INSERT INTO `yx_system_city` VALUES (2723, 544307, 2, 540700, '500240000000', '石柱土家族自治县', '重庆,石柱', '108.114069', '29.999285', 1); +INSERT INTO `yx_system_city` VALUES (2724, 544583, 2, 540700, '500241000000', '秀山土家族苗族自治县', '重庆,秀山', '109.007094', '28.447997', 1); +INSERT INTO `yx_system_city` VALUES (2725, 544878, 2, 540700, '500242000000', '酉阳土家族苗族自治县', '重庆,酉阳', '108.767747', '28.841244', 1); +INSERT INTO `yx_system_city` VALUES (2726, 545196, 2, 540700, '500243000000', '彭水苗族土家族自治县', '重庆,彭水', '108.165538', '29.293902', 1); +INSERT INTO `yx_system_city` VALUES (2727, 545534, 2, 545533, '510101000000', '市辖区', '四川,成都', '104.066541', '30.572269', 1); +INSERT INTO `yx_system_city` VALUES (2728, 545535, 2, 545533, '510104000000', '锦江区', '四川,成都,锦江', '104.080989', '30.657689', 1); +INSERT INTO `yx_system_city` VALUES (2729, 545669, 2, 545533, '510105000000', '青羊区', '四川,成都,青羊', '104.062499', '30.674406', 1); +INSERT INTO `yx_system_city` VALUES (2730, 545763, 2, 545533, '510106000000', '金牛区', '四川,成都,金牛', '104.052236', '30.691359', 1); +INSERT INTO `yx_system_city` VALUES (2731, 545889, 2, 545533, '510107000000', '武侯区', '四川,成都,武侯', '104.043390', '30.641982', 1); +INSERT INTO `yx_system_city` VALUES (2732, 546035, 2, 545533, '510108000000', '成华区', '四川,成都,成华', '104.101255', '30.660122', 1); +INSERT INTO `yx_system_city` VALUES (2733, 546151, 2, 545533, '510112000000', '龙泉驿区', '四川,成都,龙泉驿', '104.274632', '30.556507', 1); +INSERT INTO `yx_system_city` VALUES (2734, 546306, 2, 545533, '510113000000', '青白江区', '四川,成都,青白江', '104.250877', '30.878681', 1); +INSERT INTO `yx_system_city` VALUES (2735, 546441, 2, 545533, '510114000000', '新都区', '四川,成都,新都', '104.158705', '30.823499', 1); +INSERT INTO `yx_system_city` VALUES (2736, 546710, 2, 545533, '510115000000', '温江区', '四川,成都,温江', '103.856646', '30.682203', 1); +INSERT INTO `yx_system_city` VALUES (2737, 546835, 2, 545533, '510116000000', '双流区', '四川,成都,双流', '103.923588', '30.574488', 1); +INSERT INTO `yx_system_city` VALUES (2738, 547144, 2, 545533, '510121000000', '金堂县', '四川,成都,金堂', '104.412005', '30.862017', 1); +INSERT INTO `yx_system_city` VALUES (2739, 547398, 2, 545533, '510124000000', '郫县', '四川,成都,郫县', '103.901092', '30.795854', 1); +INSERT INTO `yx_system_city` VALUES (2740, 547634, 2, 545533, '510129000000', '大邑县', '四川,成都,大邑', '103.511875', '30.572269', 1); +INSERT INTO `yx_system_city` VALUES (2741, 547873, 2, 545533, '510131000000', '蒲江县', '四川,成都,蒲江', '103.506498', '30.196789', 1); +INSERT INTO `yx_system_city` VALUES (2742, 548018, 2, 545533, '510132000000', '新津县', '四川,成都,新津', '103.811345', '30.410222', 1); +INSERT INTO `yx_system_city` VALUES (2743, 548137, 2, 545533, '510181000000', '都江堰市', '四川,成都,都江堰', '103.646912', '30.988435', 1); +INSERT INTO `yx_system_city` VALUES (2744, 548412, 2, 545533, '510182000000', '彭州市', '四川,成都,彭州', '103.958013', '30.990165', 1); +INSERT INTO `yx_system_city` VALUES (2745, 548788, 2, 545533, '510183000000', '邛崃市', '四川,成都,邛崃', '103.464156', '30.410275', 1); +INSERT INTO `yx_system_city` VALUES (2746, 549084, 2, 545533, '510184000000', '崇州市', '四川,成都,崇州', '103.673001', '30.630122', 1); +INSERT INTO `yx_system_city` VALUES (2747, 549363, 2, 545533, '510185000000', '简阳市', '四川,成都,简阳', '104.546774', '30.410755', 1); +INSERT INTO `yx_system_city` VALUES (2748, 550276, 2, 550275, '510301000000', '市辖区', '四川,自贡', '104.778442', '29.339030', 1); +INSERT INTO `yx_system_city` VALUES (2749, 550277, 2, 550275, '510302000000', '自流井区', '四川,自贡,自流井', '104.777191', '29.337430', 1); +INSERT INTO `yx_system_city` VALUES (2750, 550413, 2, 550275, '510303000000', '贡井区', '四川,自贡,贡井', '104.715117', '29.345546', 1); +INSERT INTO `yx_system_city` VALUES (2751, 550609, 2, 550275, '510304000000', '大安区', '四川,自贡,大安', '104.773968', '29.363634', 1); +INSERT INTO `yx_system_city` VALUES (2752, 550816, 2, 550275, '510311000000', '沿滩区', '四川,自贡,沿滩', '104.874073', '29.272581', 1); +INSERT INTO `yx_system_city` VALUES (2753, 551023, 2, 550275, '510321000000', '荣县', '四川,自贡,荣县', '104.417388', '29.445410', 1); +INSERT INTO `yx_system_city` VALUES (2754, 551398, 2, 550275, '510322000000', '富顺县', '四川,自贡,富顺', '104.975048', '29.181430', 1); +INSERT INTO `yx_system_city` VALUES (2755, 551810, 2, 551809, '510401000000', '市辖区', '四川,攀枝花', '101.718637', '26.582347', 1); +INSERT INTO `yx_system_city` VALUES (2756, 551811, 2, 551809, '510402000000', '东区', '四川,攀枝花,东区', '101.718637', '26.582347', 1); +INSERT INTO `yx_system_city` VALUES (2757, 551891, 2, 551809, '510403000000', '西区', '四川,攀枝花,西区', '101.718637', '26.582347', 1); +INSERT INTO `yx_system_city` VALUES (2758, 551941, 2, 551809, '510411000000', '仁和区', '四川,攀枝花,仁和', '101.738528', '26.497765', 1); +INSERT INTO `yx_system_city` VALUES (2759, 552057, 2, 551809, '510421000000', '米易县', '四川,攀枝花,米易', '102.110339', '26.890689', 1); +INSERT INTO `yx_system_city` VALUES (2760, 552169, 2, 551809, '510422000000', '盐边县', '四川,攀枝花,盐边', '101.855071', '26.683213', 1); +INSERT INTO `yx_system_city` VALUES (2761, 552359, 2, 552358, '510501000000', '市辖区', '四川,泸州', '105.442258', '28.871810', 1); +INSERT INTO `yx_system_city` VALUES (2762, 552360, 2, 552358, '510502000000', '江阳区', '四川,泸州,江阳', '105.435009', '28.878818', 1); +INSERT INTO `yx_system_city` VALUES (2763, 552536, 2, 552358, '510503000000', '纳溪区', '四川,泸州,纳溪', '105.371151', '28.773428', 1); +INSERT INTO `yx_system_city` VALUES (2764, 552755, 2, 552358, '510504000000', '龙马潭区', '四川,泸州,龙马潭', '105.437765', '28.913221', 1); +INSERT INTO `yx_system_city` VALUES (2765, 552858, 2, 552358, '510521000000', '泸县', '四川,泸州,泸县', '105.381893', '29.151534', 1); +INSERT INTO `yx_system_city` VALUES (2766, 553181, 2, 552358, '510522000000', '合江县', '四川,泸州,合江', '105.831067', '28.811203', 1); +INSERT INTO `yx_system_city` VALUES (2767, 553536, 2, 552358, '510524000000', '叙永县', '四川,泸州,叙永', '105.444765', '28.155801', 1); +INSERT INTO `yx_system_city` VALUES (2768, 553823, 2, 552358, '510525000000', '古蔺县', '四川,泸州,古蔺', '105.812602', '28.038802', 1); +INSERT INTO `yx_system_city` VALUES (2769, 554143, 2, 554142, '510601000000', '市辖区', '四川,德阳', '104.397894', '31.126855', 1); +INSERT INTO `yx_system_city` VALUES (2770, 554144, 2, 554142, '510603000000', '旌阳区', '四川,德阳,旌阳', '104.416943', '31.142498', 1); +INSERT INTO `yx_system_city` VALUES (2771, 554397, 2, 554142, '510623000000', '中江县', '四川,德阳,中江', '104.678749', '31.033051', 1); +INSERT INTO `yx_system_city` VALUES (2772, 555280, 2, 554142, '510626000000', '罗江县', '四川,德阳,罗江', '104.510249', '31.317045', 1); +INSERT INTO `yx_system_city` VALUES (2773, 555418, 2, 554142, '510681000000', '广汉市', '四川,德阳,广汉', '104.282331', '30.976165', 1); +INSERT INTO `yx_system_city` VALUES (2774, 555660, 2, 554142, '510682000000', '什邡市', '四川,德阳,什邡', '104.167501', '31.126780', 1); +INSERT INTO `yx_system_city` VALUES (2775, 555848, 2, 554142, '510683000000', '绵竹市', '四川,德阳,绵竹', '104.220750', '31.338077', 1); +INSERT INTO `yx_system_city` VALUES (2776, 556078, 2, 556077, '510701000000', '市辖区', '四川,绵阳', '104.679114', '31.467450', 1); +INSERT INTO `yx_system_city` VALUES (2777, 556079, 2, 556077, '510703000000', '涪城区', '四川,绵阳,涪城', '104.756944', '31.455101', 1); +INSERT INTO `yx_system_city` VALUES (2778, 556357, 2, 556077, '510704000000', '游仙区', '四川,绵阳,游仙', '104.766393', '31.473779', 1); +INSERT INTO `yx_system_city` VALUES (2779, 556705, 2, 556077, '510705000000', '安州区', '四川,绵阳,安州', '104.679114', '31.467450', 1); +INSERT INTO `yx_system_city` VALUES (2780, 556985, 2, 556077, '510722000000', '三台县', '四川,绵阳,三台', '105.094586', '31.095979', 1); +INSERT INTO `yx_system_city` VALUES (2781, 558091, 2, 556077, '510723000000', '盐亭县', '四川,绵阳,盐亭', '105.389453', '31.208363', 1); +INSERT INTO `yx_system_city` VALUES (2782, 558648, 2, 556077, '510725000000', '梓潼县', '四川,绵阳,梓潼', '105.170845', '31.642718', 1); +INSERT INTO `yx_system_city` VALUES (2783, 559030, 2, 556077, '510726000000', '北川羌族自治县', '四川,绵阳,北川', '104.467970', '31.617203', 1); +INSERT INTO `yx_system_city` VALUES (2784, 559397, 2, 556077, '510727000000', '平武县', '四川,绵阳,平武', '104.555583', '32.409675', 1); +INSERT INTO `yx_system_city` VALUES (2785, 559687, 2, 556077, '510781000000', '江油市', '四川,绵阳,江油', '104.745877', '31.778025', 1); +INSERT INTO `yx_system_city` VALUES (2786, 560192, 2, 560191, '510801000000', '市辖区', '四川,广元', '105.843357', '32.435435', 1); +INSERT INTO `yx_system_city` VALUES (2787, 560193, 2, 560191, '510802000000', '利州区', '四川,广元,利州', '105.845218', '32.433898', 1); +INSERT INTO `yx_system_city` VALUES (2788, 560469, 2, 560191, '510811000000', '昭化区', '四川,广元,昭化', '105.964121', '32.322788', 1); +INSERT INTO `yx_system_city` VALUES (2789, 560735, 2, 560191, '510812000000', '朝天区', '四川,广元,朝天', '105.890445', '32.643982', 1); +INSERT INTO `yx_system_city` VALUES (2790, 560982, 2, 560191, '510821000000', '旺苍县', '四川,广元,旺苍', '106.289905', '32.228917', 1); +INSERT INTO `yx_system_city` VALUES (2791, 561413, 2, 560191, '510822000000', '青川县', '四川,广元,青川', '105.238842', '32.575485', 1); +INSERT INTO `yx_system_city` VALUES (2792, 561756, 2, 560191, '510823000000', '剑阁县', '四川,广元,剑阁', '105.524766', '32.287723', 1); +INSERT INTO `yx_system_city` VALUES (2793, 562393, 2, 560191, '510824000000', '苍溪县', '四川,广元,苍溪', '105.934801', '31.732432', 1); +INSERT INTO `yx_system_city` VALUES (2794, 563243, 2, 563242, '510901000000', '市辖区', '四川,遂宁', '105.592898', '30.532847', 1); +INSERT INTO `yx_system_city` VALUES (2795, 563244, 2, 563242, '510903000000', '船山区', '四川,遂宁,船山', '105.568297', '30.525475', 1); +INSERT INTO `yx_system_city` VALUES (2796, 563569, 2, 563242, '510904000000', '安居区', '四川,遂宁,安居', '105.456342', '30.355379', 1); +INSERT INTO `yx_system_city` VALUES (2797, 564115, 2, 563242, '510921000000', '蓬溪县', '四川,遂宁,蓬溪', '105.707570', '30.757575', 1); +INSERT INTO `yx_system_city` VALUES (2798, 564699, 2, 563242, '510922000000', '射洪县', '四川,遂宁,射洪', '105.388405', '30.870986', 1); +INSERT INTO `yx_system_city` VALUES (2799, 565387, 2, 563242, '510923000000', '大英县', '四川,遂宁,大英', '105.236904', '30.594337', 1); +INSERT INTO `yx_system_city` VALUES (2800, 565736, 2, 565735, '511001000000', '市辖区', '四川,内江', '105.058433', '29.580228', 1); +INSERT INTO `yx_system_city` VALUES (2801, 565737, 2, 565735, '511002000000', '市中区', '四川,内江,市中', '105.067597', '29.587053', 1); +INSERT INTO `yx_system_city` VALUES (2802, 565956, 2, 565735, '511011000000', '东兴区', '四川,内江,东兴', '105.075490', '29.592756', 1); +INSERT INTO `yx_system_city` VALUES (2803, 566504, 2, 565735, '511024000000', '威远县', '四川,内江,威远', '104.668879', '29.527440', 1); +INSERT INTO `yx_system_city` VALUES (2804, 566895, 2, 565735, '511025000000', '资中县', '四川,内江,资中', '104.851944', '29.764059', 1); +INSERT INTO `yx_system_city` VALUES (2805, 567769, 2, 565735, '511028000000', '隆昌县', '四川,内江,隆昌', '105.287612', '29.339476', 1); +INSERT INTO `yx_system_city` VALUES (2806, 568203, 2, 568202, '511101000000', '市辖区', '四川,乐山', '103.765568', '29.552106', 1); +INSERT INTO `yx_system_city` VALUES (2807, 568204, 2, 568202, '511102000000', '市中区', '四川,乐山,市中', '103.761330', '29.555375', 1); +INSERT INTO `yx_system_city` VALUES (2808, 568549, 2, 568202, '511111000000', '沙湾区', '四川,乐山,沙湾', '103.549991', '29.413091', 1); +INSERT INTO `yx_system_city` VALUES (2809, 568712, 2, 568202, '511112000000', '五通桥区', '四川,乐山,五通桥', '103.818009', '29.406932', 1); +INSERT INTO `yx_system_city` VALUES (2810, 568897, 2, 568202, '511113000000', '金口河区', '四川,乐山,金口河', '103.078621', '29.244345', 1); +INSERT INTO `yx_system_city` VALUES (2811, 568949, 2, 568202, '511123000000', '犍为县', '四川,乐山,犍为', '103.949326', '29.208171', 1); +INSERT INTO `yx_system_city` VALUES (2812, 569368, 2, 568202, '511124000000', '井研县', '四川,乐山,井研', '104.069726', '29.651287', 1); +INSERT INTO `yx_system_city` VALUES (2813, 569627, 2, 568202, '511126000000', '夹江县', '四川,乐山,夹江', '103.571657', '29.737630', 1); +INSERT INTO `yx_system_city` VALUES (2814, 569905, 2, 568202, '511129000000', '沐川县', '四川,乐山,沐川', '103.902335', '28.956647', 1); +INSERT INTO `yx_system_city` VALUES (2815, 570138, 2, 568202, '511132000000', '峨边彝族自治县', '四川,乐山,峨边', '103.765568', '29.552106', 1); +INSERT INTO `yx_system_city` VALUES (2816, 570296, 2, 568202, '511133000000', '马边彝族自治县', '四川,乐山,马边', '103.546348', '28.835521', 1); +INSERT INTO `yx_system_city` VALUES (2817, 570440, 2, 568202, '511181000000', '峨眉山市', '四川,乐山,峨眉山', '103.484504', '29.601199', 1); +INSERT INTO `yx_system_city` VALUES (2818, 570734, 2, 570733, '511301000000', '市辖区', '四川,南充', '106.110698', '30.837793', 1); +INSERT INTO `yx_system_city` VALUES (2819, 570735, 2, 570733, '511302000000', '顺庆区', '四川,南充,顺庆', '106.092399', '30.796486', 1); +INSERT INTO `yx_system_city` VALUES (2820, 571078, 2, 570733, '511303000000', '高坪区', '四川,南充,高坪', '106.118808', '30.781623', 1); +INSERT INTO `yx_system_city` VALUES (2821, 571510, 2, 570733, '511304000000', '嘉陵区', '四川,南充,嘉陵', '106.071793', '30.758748', 1); +INSERT INTO `yx_system_city` VALUES (2822, 572146, 2, 570733, '511321000000', '南部县', '四川,南充,南部', '106.036584', '31.347467', 1); +INSERT INTO `yx_system_city` VALUES (2823, 573339, 2, 570733, '511322000000', '营山县', '四川,南充,营山', '106.565473', '31.076458', 1); +INSERT INTO `yx_system_city` VALUES (2824, 574080, 2, 570733, '511323000000', '蓬安县', '四川,南充,蓬安', '106.412151', '31.029097', 1); +INSERT INTO `yx_system_city` VALUES (2825, 574767, 2, 570733, '511324000000', '仪陇县', '四川,南充,仪陇', '106.303042', '31.271562', 1); +INSERT INTO `yx_system_city` VALUES (2826, 575761, 2, 570733, '511325000000', '西充县', '四川,南充,西充', '105.900878', '30.995669', 1); +INSERT INTO `yx_system_city` VALUES (2827, 576427, 2, 570733, '511381000000', '阆中市', '四川,南充,阆中', '106.005047', '31.558357', 1); +INSERT INTO `yx_system_city` VALUES (2828, 576993, 2, 576992, '511401000000', '市辖区', '四川,眉山', '103.848538', '30.075439', 1); +INSERT INTO `yx_system_city` VALUES (2829, 576994, 2, 576992, '511402000000', '东坡区', '四川,眉山,东坡', '103.831752', '30.042345', 1); +INSERT INTO `yx_system_city` VALUES (2830, 577323, 2, 576992, '511403000000', '彭山区', '四川,眉山,彭山', '103.872950', '30.193056', 1); +INSERT INTO `yx_system_city` VALUES (2831, 577445, 2, 576992, '511421000000', '仁寿县', '四川,眉山,仁寿', '104.134082', '29.995630', 1); +INSERT INTO `yx_system_city` VALUES (2832, 578124, 2, 576992, '511423000000', '洪雅县', '四川,眉山,洪雅', '103.372863', '29.904890', 1); +INSERT INTO `yx_system_city` VALUES (2833, 578299, 2, 576992, '511424000000', '丹棱县', '四川,眉山,丹棱', '103.512733', '30.014448', 1); +INSERT INTO `yx_system_city` VALUES (2834, 578385, 2, 576992, '511425000000', '青神县', '四川,眉山,青神', '103.846688', '29.831358', 1); +INSERT INTO `yx_system_city` VALUES (2835, 578486, 2, 578485, '511501000000', '市辖区', '四川,宜宾', '104.643215', '28.751768', 1); +INSERT INTO `yx_system_city` VALUES (2836, 578487, 2, 578485, '511502000000', '翠屏区', '四川,宜宾,翠屏', '104.620009', '28.765690', 1); +INSERT INTO `yx_system_city` VALUES (2837, 578857, 2, 578485, '511503000000', '南溪区', '四川,宜宾,南溪', '104.969882', '28.845626', 1); +INSERT INTO `yx_system_city` VALUES (2838, 579114, 2, 578485, '511521000000', '宜宾县', '四川,宜宾,宜宾', '104.533213', '28.690045', 1); +INSERT INTO `yx_system_city` VALUES (2839, 579727, 2, 578485, '511523000000', '江安县', '四川,宜宾,江安', '105.066943', '28.723999', 1); +INSERT INTO `yx_system_city` VALUES (2840, 580070, 2, 578485, '511524000000', '长宁县', '四川,宜宾,长宁', '104.921174', '28.582169', 1); +INSERT INTO `yx_system_city` VALUES (2841, 580388, 2, 578485, '511525000000', '高县', '四川,宜宾,高县', '104.517739', '28.436226', 1); +INSERT INTO `yx_system_city` VALUES (2842, 580725, 2, 578485, '511526000000', '珙县', '四川,宜宾,珙县', '104.709202', '28.438630', 1); +INSERT INTO `yx_system_city` VALUES (2843, 581025, 2, 578485, '511527000000', '筠连县', '四川,宜宾,筠连', '104.510988', '28.163860', 1); +INSERT INTO `yx_system_city` VALUES (2844, 581304, 2, 578485, '511528000000', '兴文县', '四川,宜宾,兴文', '105.236325', '28.303614', 1); +INSERT INTO `yx_system_city` VALUES (2845, 581579, 2, 578485, '511529000000', '屏山县', '四川,宜宾,屏山', '104.345974', '28.828482', 1); +INSERT INTO `yx_system_city` VALUES (2846, 581871, 2, 581870, '511601000000', '市辖区', '四川,广安', '106.633212', '30.455961', 1); +INSERT INTO `yx_system_city` VALUES (2847, 581872, 2, 581870, '511602000000', '广安区', '四川,广安,广安', '106.641608', '30.474003', 1); +INSERT INTO `yx_system_city` VALUES (2848, 582526, 2, 581870, '511603000000', '前锋区', '四川,广安,前锋', '106.893277', '30.496300', 1); +INSERT INTO `yx_system_city` VALUES (2849, 582827, 2, 581870, '511621000000', '岳池县', '四川,广安,岳池', '106.440114', '30.537863', 1); +INSERT INTO `yx_system_city` VALUES (2850, 583751, 2, 581870, '511622000000', '武胜县', '四川,广安,武胜', '106.295764', '30.348772', 1); +INSERT INTO `yx_system_city` VALUES (2851, 584332, 2, 581870, '511623000000', '邻水县', '四川,广安,邻水', '106.930380', '30.334769', 1); +INSERT INTO `yx_system_city` VALUES (2852, 584900, 2, 581870, '511681000000', '华蓥市', '四川,广安,华蓥', '106.783088', '30.390435', 1); +INSERT INTO `yx_system_city` VALUES (2853, 585050, 2, 585049, '511701000000', '市辖区', '四川,达州', '107.468023', '31.209571', 1); +INSERT INTO `yx_system_city` VALUES (2854, 585051, 2, 585049, '511702000000', '通川区', '四川,达州,通川', '107.504517', '31.214724', 1); +INSERT INTO `yx_system_city` VALUES (2855, 585347, 2, 585049, '511703000000', '达川区', '四川,达州,达川', '107.511845', '31.196118', 1); +INSERT INTO `yx_system_city` VALUES (2856, 586085, 2, 585049, '511722000000', '宣汉县', '四川,达州,宣汉', '107.727191', '31.353835', 1); +INSERT INTO `yx_system_city` VALUES (2857, 586709, 2, 585049, '511723000000', '开江县', '四川,达州,开江', '107.868736', '31.082987', 1); +INSERT INTO `yx_system_city` VALUES (2858, 586957, 2, 585049, '511724000000', '大竹县', '四川,达州,大竹', '107.204744', '30.736266', 1); +INSERT INTO `yx_system_city` VALUES (2859, 587452, 2, 585049, '511725000000', '渠县', '四川,达州,渠县', '106.972996', '30.836659', 1); +INSERT INTO `yx_system_city` VALUES (2860, 588071, 2, 585049, '511781000000', '万源市', '四川,达州,万源', '108.034657', '32.081631', 1); +INSERT INTO `yx_system_city` VALUES (2861, 588539, 2, 588538, '511801000000', '市辖区', '四川,雅安', '103.013261', '29.980537', 1); +INSERT INTO `yx_system_city` VALUES (2862, 588540, 2, 588538, '511802000000', '雨城区', '四川,雅安,雨城', '103.033083', '30.005447', 1); +INSERT INTO `yx_system_city` VALUES (2863, 588771, 2, 588538, '511803000000', '名山区', '四川,雅安,名山', '103.109185', '30.069954', 1); +INSERT INTO `yx_system_city` VALUES (2864, 589001, 2, 588538, '511822000000', '荥经县', '四川,雅安,荥经', '102.846738', '29.792931', 1); +INSERT INTO `yx_system_city` VALUES (2865, 589135, 2, 588538, '511823000000', '汉源县', '四川,雅安,汉源', '102.645453', '29.347187', 1); +INSERT INTO `yx_system_city` VALUES (2866, 589376, 2, 588538, '511824000000', '石棉县', '四川,雅安,石棉', '102.359462', '29.227874', 1); +INSERT INTO `yx_system_city` VALUES (2867, 589494, 2, 588538, '511825000000', '天全县', '四川,雅安,天全', '102.758317', '30.066713', 1); +INSERT INTO `yx_system_city` VALUES (2868, 589654, 2, 588538, '511826000000', '芦山县', '四川,雅安,芦山', '102.928260', '30.144084', 1); +INSERT INTO `yx_system_city` VALUES (2869, 589711, 2, 588538, '511827000000', '宝兴县', '四川,雅安,宝兴', '102.814531', '30.368126', 1); +INSERT INTO `yx_system_city` VALUES (2870, 589780, 2, 589779, '511901000000', '市辖区', '四川,巴中', '106.747477', '31.867903', 1); +INSERT INTO `yx_system_city` VALUES (2871, 589781, 2, 589779, '511902000000', '巴州区', '四川,巴中,巴州', '106.768878', '31.851478', 1); +INSERT INTO `yx_system_city` VALUES (2872, 590246, 2, 589779, '511903000000', '恩阳区', '四川,巴中,恩阳', '106.655347', '31.786691', 1); +INSERT INTO `yx_system_city` VALUES (2873, 590712, 2, 589779, '511921000000', '通江县', '四川,巴中,通江', '107.245033', '31.911705', 1); +INSERT INTO `yx_system_city` VALUES (2874, 591330, 2, 589779, '511922000000', '南江县', '四川,巴中,南江', '106.828697', '32.346589', 1); +INSERT INTO `yx_system_city` VALUES (2875, 592003, 2, 589779, '511923000000', '平昌县', '四川,巴中,平昌', '107.104008', '31.560874', 1); +INSERT INTO `yx_system_city` VALUES (2876, 592599, 2, 592598, '512001000000', '市辖区', '四川,资阳', '104.627636', '30.128901', 1); +INSERT INTO `yx_system_city` VALUES (2877, 592600, 2, 592598, '512002000000', '雁江区', '四川,资阳,雁江', '104.677096', '30.108210', 1); +INSERT INTO `yx_system_city` VALUES (2878, 593157, 2, 592598, '512021000000', '安岳县', '四川,资阳,安岳', '105.335613', '30.097246', 1); +INSERT INTO `yx_system_city` VALUES (2879, 594205, 2, 592598, '512022000000', '乐至县', '四川,资阳,乐至', '105.020204', '30.276120', 1); +INSERT INTO `yx_system_city` VALUES (2880, 594865, 2, 594864, '513201000000', '马尔康市', '四川,阿坝,马尔康', '102.206504', '31.905813', 1); +INSERT INTO `yx_system_city` VALUES (2881, 594988, 2, 594864, '513221000000', '汶川县', '四川,阿坝,汶川', '103.590387', '31.476822', 1); +INSERT INTO `yx_system_city` VALUES (2882, 595128, 2, 594864, '513222000000', '理县', '四川,阿坝,理县', '103.166853', '31.436473', 1); +INSERT INTO `yx_system_city` VALUES (2883, 595230, 2, 594864, '513223000000', '茂县', '四川,阿坝,茂县', '103.853522', '31.681154', 1); +INSERT INTO `yx_system_city` VALUES (2884, 595404, 2, 594864, '513224000000', '松潘县', '四川,阿坝,松潘', '103.604698', '32.655325', 1); +INSERT INTO `yx_system_city` VALUES (2885, 595579, 2, 594864, '513225000000', '九寨沟县', '四川,阿坝,九寨沟', '104.243841', '33.252056', 1); +INSERT INTO `yx_system_city` VALUES (2886, 595731, 2, 594864, '513226000000', '金川县', '四川,阿坝,金川', '102.063829', '31.476277', 1); +INSERT INTO `yx_system_city` VALUES (2887, 595864, 2, 594864, '513227000000', '小金县', '四川,阿坝,小金', '102.364373', '30.999031', 1); +INSERT INTO `yx_system_city` VALUES (2888, 596022, 2, 594864, '513228000000', '黑水县', '四川,阿坝,黑水', '102.990108', '32.061895', 1); +INSERT INTO `yx_system_city` VALUES (2889, 596167, 2, 594864, '513230000000', '壤塘县', '四川,阿坝,壤塘', '100.978526', '32.265796', 1); +INSERT INTO `yx_system_city` VALUES (2890, 596243, 2, 594864, '513231000000', '阿坝县', '四川,阿坝,阿坝', '101.706655', '32.902459', 1); +INSERT INTO `yx_system_city` VALUES (2891, 596354, 2, 594864, '513232000000', '若尔盖县', '四川,阿坝,若尔盖', '102.961798', '33.575892', 1); +INSERT INTO `yx_system_city` VALUES (2892, 596475, 2, 594864, '513233000000', '红原县', '四川,阿坝,红原', '102.544405', '32.790891', 1); +INSERT INTO `yx_system_city` VALUES (2893, 596526, 2, 596525, '513301000000', '康定市', '四川,甘孜,康定', '101.957146', '29.998436', 1); +INSERT INTO `yx_system_city` VALUES (2894, 596792, 2, 596525, '513322000000', '泸定县', '四川,甘孜,泸定', '102.234618', '29.914160', 1); +INSERT INTO `yx_system_city` VALUES (2895, 596957, 2, 596525, '513323000000', '丹巴县', '四川,甘孜,丹巴', '101.890358', '30.878577', 1); +INSERT INTO `yx_system_city` VALUES (2896, 597158, 2, 596525, '513324000000', '九龙县', '四川,甘孜,九龙', '101.507294', '29.000348', 1); +INSERT INTO `yx_system_city` VALUES (2897, 597242, 2, 596525, '513325000000', '雅江县', '四川,甘孜,雅江', '101.014425', '30.031533', 1); +INSERT INTO `yx_system_city` VALUES (2898, 597374, 2, 596525, '513326000000', '道孚县', '四川,甘孜,道孚', '101.125237', '30.979545', 1); +INSERT INTO `yx_system_city` VALUES (2899, 597557, 2, 596525, '513327000000', '炉霍县', '四川,甘孜,炉霍', '100.676372', '31.391790', 1); +INSERT INTO `yx_system_city` VALUES (2900, 597749, 2, 596525, '513328000000', '甘孜县', '四川,甘孜,甘孜', '99.992671', '31.622934', 1); +INSERT INTO `yx_system_city` VALUES (2901, 597992, 2, 596525, '513329000000', '新龙县', '四川,甘孜,新龙', '100.311369', '30.939169', 1); +INSERT INTO `yx_system_city` VALUES (2902, 598162, 2, 596525, '513330000000', '德格县', '四川,甘孜,德格', '98.580915', '31.806118', 1); +INSERT INTO `yx_system_city` VALUES (2903, 598363, 2, 596525, '513331000000', '白玉县', '四川,甘孜,白玉', '98.824182', '31.209913', 1); +INSERT INTO `yx_system_city` VALUES (2904, 598540, 2, 596525, '513332000000', '石渠县', '四川,甘孜,石渠', '98.102900', '32.978960', 1); +INSERT INTO `yx_system_city` VALUES (2905, 598733, 2, 596525, '513333000000', '色达县', '四川,甘孜,色达', '100.332743', '32.268129', 1); +INSERT INTO `yx_system_city` VALUES (2906, 598889, 2, 596525, '513334000000', '理塘县', '四川,甘孜,理塘', '100.269818', '29.996049', 1); +INSERT INTO `yx_system_city` VALUES (2907, 599129, 2, 596525, '513335000000', '巴塘县', '四川,甘孜,巴塘', '99.110712', '30.004677', 1); +INSERT INTO `yx_system_city` VALUES (2908, 599272, 2, 596525, '513336000000', '乡城县', '四川,甘孜,乡城', '99.798435', '28.931172', 1); +INSERT INTO `yx_system_city` VALUES (2909, 599377, 2, 596525, '513337000000', '稻城县', '四川,甘孜,稻城', '100.298403', '29.037007', 1); +INSERT INTO `yx_system_city` VALUES (2910, 599516, 2, 596525, '513338000000', '得荣县', '四川,甘孜,得荣', '99.286335', '28.713037', 1); +INSERT INTO `yx_system_city` VALUES (2911, 599660, 2, 599659, '513401000000', '西昌市', '四川,凉山,西昌', '102.264449', '27.894504', 1); +INSERT INTO `yx_system_city` VALUES (2912, 599974, 2, 599659, '513422000000', '木里藏族自治县', '四川,凉山,木里', '101.280206', '27.928835', 1); +INSERT INTO `yx_system_city` VALUES (2913, 600127, 2, 599659, '513423000000', '盐源县', '四川,凉山,盐源', '101.509188', '27.422645', 1); +INSERT INTO `yx_system_city` VALUES (2914, 600415, 2, 599659, '513424000000', '德昌县', '四川,凉山,德昌', '102.175670', '27.402839', 1); +INSERT INTO `yx_system_city` VALUES (2915, 600579, 2, 599659, '513425000000', '会理县', '四川,凉山,会理', '102.244683', '26.655026', 1); +INSERT INTO `yx_system_city` VALUES (2916, 600938, 2, 599659, '513426000000', '会东县', '四川,凉山,会东', '102.577961', '26.634669', 1); +INSERT INTO `yx_system_city` VALUES (2917, 601284, 2, 599659, '513427000000', '宁南县', '四川,凉山,宁南', '102.759634', '27.066384', 1); +INSERT INTO `yx_system_city` VALUES (2918, 601444, 2, 599659, '513428000000', '普格县', '四川,凉山,普格', '102.540901', '27.376413', 1); +INSERT INTO `yx_system_city` VALUES (2919, 601640, 2, 599659, '513429000000', '布拖县', '四川,凉山,布拖', '102.811631', '27.706192', 1); +INSERT INTO `yx_system_city` VALUES (2920, 601863, 2, 599659, '513430000000', '金阳县', '四川,凉山,金阳', '103.248772', '27.696861', 1); +INSERT INTO `yx_system_city` VALUES (2921, 602076, 2, 599659, '513431000000', '昭觉县', '四川,凉山,昭觉', '102.842611', '28.014088', 1); +INSERT INTO `yx_system_city` VALUES (2922, 602396, 2, 599659, '513432000000', '喜德县', '四川,凉山,喜德', '102.412518', '28.306726', 1); +INSERT INTO `yx_system_city` VALUES (2923, 602594, 2, 599659, '513433000000', '冕宁县', '四川,凉山,冕宁', '102.177010', '28.549657', 1); +INSERT INTO `yx_system_city` VALUES (2924, 602865, 2, 599659, '513434000000', '越西县', '四川,凉山,越西', '102.507680', '28.639801', 1); +INSERT INTO `yx_system_city` VALUES (2925, 603201, 2, 599659, '513435000000', '甘洛县', '四川,凉山,甘洛', '102.771749', '28.966069', 1); +INSERT INTO `yx_system_city` VALUES (2926, 603460, 2, 599659, '513436000000', '美姑县', '四川,凉山,美姑', '103.132180', '28.328640', 1); +INSERT INTO `yx_system_city` VALUES (2927, 603792, 2, 599659, '513437000000', '雷波县', '四川,凉山,雷波', '103.571696', '28.262683', 1); +INSERT INTO `yx_system_city` VALUES (2928, 604133, 2, 604132, '520101000000', '市辖区', '贵州,贵阳', '106.630153', '26.647661', 1); +INSERT INTO `yx_system_city` VALUES (2929, 604134, 2, 604132, '520102000000', '南明区', '贵州,贵阳,南明', '106.714371', '26.567944', 1); +INSERT INTO `yx_system_city` VALUES (2930, 604342, 2, 604132, '520103000000', '云岩区', '贵州,贵阳,云岩', '106.630153', '26.647661', 1); +INSERT INTO `yx_system_city` VALUES (2931, 604530, 2, 604132, '520111000000', '花溪区', '贵州,贵阳,花溪', '106.670258', '26.409817', 1); +INSERT INTO `yx_system_city` VALUES (2932, 604769, 2, 604132, '520112000000', '乌当区', '贵州,贵阳,乌当', '106.630153', '26.647661', 1); +INSERT INTO `yx_system_city` VALUES (2933, 604883, 2, 604132, '520113000000', '白云区', '贵州,贵阳,白云', '106.630153', '26.647661', 1); +INSERT INTO `yx_system_city` VALUES (2934, 604989, 2, 604132, '520115000000', '观山湖区', '贵州,贵阳,观山湖', '106.622452', '26.601450', 1); +INSERT INTO `yx_system_city` VALUES (2935, 605114, 2, 604132, '520121000000', '开阳县', '贵州,贵阳,开阳', '106.965088', '27.057764', 1); +INSERT INTO `yx_system_city` VALUES (2936, 605264, 2, 604132, '520122000000', '息烽县', '贵州,贵阳,息烽', '106.740410', '27.090479', 1); +INSERT INTO `yx_system_city` VALUES (2937, 605453, 2, 604132, '520123000000', '修文县', '贵州,贵阳,修文', '106.592110', '26.838926', 1); +INSERT INTO `yx_system_city` VALUES (2938, 605593, 2, 604132, '520181000000', '清镇市', '贵州,贵阳,清镇', '106.470711', '26.556080', 1); +INSERT INTO `yx_system_city` VALUES (2939, 605835, 2, 605834, '520201000000', '钟山区', '贵州,六盘水,钟山', '104.843555', '26.574979', 1); +INSERT INTO `yx_system_city` VALUES (2940, 605994, 2, 605834, '520203000000', '六枝特区', '贵州,六盘水,六枝特', '105.480029', '26.201228', 1); +INSERT INTO `yx_system_city` VALUES (2941, 606258, 2, 605834, '520221000000', '水城县', '贵州,六盘水,水城', '104.957831', '26.547904', 1); +INSERT INTO `yx_system_city` VALUES (2942, 606493, 2, 605834, '520222000000', '盘县', '贵州,六盘水,盘县', '104.471535', '25.710002', 1); +INSERT INTO `yx_system_city` VALUES (2943, 607030, 2, 607029, '520301000000', '市辖区', '贵州,遵义', '106.927389', '27.725654', 1); +INSERT INTO `yx_system_city` VALUES (2944, 607031, 2, 607029, '520302000000', '红花岗区', '贵州,遵义,红花岗', '106.893709', '27.644755', 1); +INSERT INTO `yx_system_city` VALUES (2945, 607235, 2, 607029, '520303000000', '汇川区', '贵州,遵义,汇川', '106.934270', '27.750125', 1); +INSERT INTO `yx_system_city` VALUES (2946, 607385, 2, 607029, '520304000000', '播州区', '贵州,遵义,播州', '106.927389', '27.725654', 1); +INSERT INTO `yx_system_city` VALUES (2947, 607584, 2, 607029, '520322000000', '桐梓县', '贵州,遵义,桐梓', '106.825644', '28.133583', 1); +INSERT INTO `yx_system_city` VALUES (2948, 607833, 2, 607029, '520323000000', '绥阳县', '贵州,遵义,绥阳', '107.191222', '27.946222', 1); +INSERT INTO `yx_system_city` VALUES (2949, 607966, 2, 607029, '520324000000', '正安县', '贵州,遵义,正安', '107.453945', '28.553285', 1); +INSERT INTO `yx_system_city` VALUES (2950, 608138, 2, 607029, '520325000000', '道真仡佬族苗族自治县', '贵州,遵义,道真', '106.927389', '27.725654', 1); +INSERT INTO `yx_system_city` VALUES (2951, 608236, 2, 607029, '520326000000', '务川仡佬族苗族自治县', '贵州,遵义,务川', '107.898957', '28.563086', 1); +INSERT INTO `yx_system_city` VALUES (2952, 608370, 2, 607029, '520327000000', '凤冈县', '贵州,遵义,凤冈', '107.716356', '27.954695', 1); +INSERT INTO `yx_system_city` VALUES (2953, 608471, 2, 607029, '520328000000', '湄潭县', '贵州,遵义,湄潭', '107.465407', '27.749055', 1); +INSERT INTO `yx_system_city` VALUES (2954, 608620, 2, 607029, '520329000000', '余庆县', '贵州,遵义,余庆', '107.905278', '27.215420', 1); +INSERT INTO `yx_system_city` VALUES (2955, 608701, 2, 607029, '520330000000', '习水县', '贵州,遵义,习水', '106.197138', '28.331270', 1); +INSERT INTO `yx_system_city` VALUES (2956, 608974, 2, 607029, '520381000000', '赤水市', '贵州,遵义,赤水', '105.697472', '28.590337', 1); +INSERT INTO `yx_system_city` VALUES (2957, 609114, 2, 607029, '520382000000', '仁怀市', '贵州,遵义,仁怀', '106.400342', '27.791650', 1); +INSERT INTO `yx_system_city` VALUES (2958, 609310, 2, 609309, '520401000000', '市辖区', '贵州,安顺', '105.947593', '26.253072', 1); +INSERT INTO `yx_system_city` VALUES (2959, 609311, 2, 609309, '520402000000', '西秀区', '贵州,安顺,西秀', '105.965535', '26.245433', 1); +INSERT INTO `yx_system_city` VALUES (2960, 609686, 2, 609309, '520403000000', '平坝区', '贵州,安顺,平坝', '106.255557', '26.405502', 1); +INSERT INTO `yx_system_city` VALUES (2961, 609845, 2, 609309, '520422000000', '普定县', '贵州,安顺,普定', '105.743196', '26.301446', 1); +INSERT INTO `yx_system_city` VALUES (2962, 610030, 2, 609309, '520423000000', '镇宁布依族苗族自治县', '贵州,安顺,镇宁', '105.770402', '26.057362', 1); +INSERT INTO `yx_system_city` VALUES (2963, 610256, 2, 609309, '520424000000', '关岭布依族苗族自治县', '贵州,安顺,关岭', '105.622053', '25.940378', 1); +INSERT INTO `yx_system_city` VALUES (2964, 610426, 2, 609309, '520425000000', '紫云苗族布依族自治县', '贵州,安顺,紫云', '106.087216', '25.755886', 1); +INSERT INTO `yx_system_city` VALUES (2965, 610608, 2, 610607, '520501000000', '市辖区', '贵州,毕节', '105.283992', '27.302589', 1); +INSERT INTO `yx_system_city` VALUES (2966, 610609, 2, 610607, '520502000000', '七星关区', '贵州,毕节,七星关', '105.305138', '27.298494', 1); +INSERT INTO `yx_system_city` VALUES (2967, 611207, 2, 610607, '520521000000', '大方县', '贵州,毕节,大方', '105.613174', '27.141682', 1); +INSERT INTO `yx_system_city` VALUES (2968, 611627, 2, 610607, '520522000000', '黔西县', '贵州,毕节,黔西', '106.033544', '27.007713', 1); +INSERT INTO `yx_system_city` VALUES (2969, 612043, 2, 610607, '520523000000', '金沙县', '贵州,毕节,金沙', '106.220228', '27.459214', 1); +INSERT INTO `yx_system_city` VALUES (2970, 612308, 2, 610607, '520524000000', '织金县', '贵州,毕节,织金', '105.770542', '26.663450', 1); +INSERT INTO `yx_system_city` VALUES (2971, 612915, 2, 610607, '520525000000', '纳雍县', '贵州,毕节,纳雍', '105.382715', '26.777645', 1); +INSERT INTO `yx_system_city` VALUES (2972, 613369, 2, 610607, '520526000000', '威宁彝族回族苗族自治县', '贵州,毕节,威宁', '104.278740', '26.856210', 1); +INSERT INTO `yx_system_city` VALUES (2973, 614035, 2, 610607, '520527000000', '赫章县', '贵州,毕节,赫章', '104.727418', '27.123079', 1); +INSERT INTO `yx_system_city` VALUES (2974, 614531, 2, 614530, '520601000000', '市辖区', '贵州,铜仁', '109.189598', '27.731514', 1); +INSERT INTO `yx_system_city` VALUES (2975, 614532, 2, 614530, '520602000000', '碧江区', '贵州,铜仁,碧江', '109.181122', '27.690653', 1); +INSERT INTO `yx_system_city` VALUES (2976, 614636, 2, 614530, '520603000000', '万山区', '贵州,铜仁,万山', '109.213644', '27.517896', 1); +INSERT INTO `yx_system_city` VALUES (2977, 614733, 2, 614530, '520621000000', '江口县', '贵州,铜仁,江口', '108.839557', '27.699650', 1); +INSERT INTO `yx_system_city` VALUES (2978, 614900, 2, 614530, '520622000000', '玉屏侗族自治县', '贵州,铜仁,玉屏', '108.914680', '27.243012', 1); +INSERT INTO `yx_system_city` VALUES (2979, 615001, 2, 614530, '520623000000', '石阡县', '贵州,铜仁,石阡', '108.223612', '27.513829', 1); +INSERT INTO `yx_system_city` VALUES (2980, 615331, 2, 614530, '520624000000', '思南县', '贵州,铜仁,思南', '108.253873', '27.937560', 1); +INSERT INTO `yx_system_city` VALUES (2981, 615886, 2, 614530, '520625000000', '印江土家族苗族自治县', '贵州,铜仁,印江', '108.409752', '27.994247', 1); +INSERT INTO `yx_system_city` VALUES (2982, 616278, 2, 614530, '520626000000', '德江县', '贵州,铜仁,德江', '108.119807', '28.263964', 1); +INSERT INTO `yx_system_city` VALUES (2983, 616644, 2, 614530, '520627000000', '沿河土家族自治县', '贵州,铜仁,沿河', '108.503870', '28.563928', 1); +INSERT INTO `yx_system_city` VALUES (2984, 617116, 2, 614530, '520628000000', '松桃苗族自治县', '贵州,铜仁,松桃', '109.202886', '28.154071', 1); +INSERT INTO `yx_system_city` VALUES (2985, 617671, 2, 617670, '522301000000', '兴义市', '贵州,黔西南,兴义', '104.895467', '25.092040', 1); +INSERT INTO `yx_system_city` VALUES (2986, 617923, 2, 617670, '522322000000', '兴仁县', '贵州,黔西南,兴仁', '105.186238', '25.435183', 1); +INSERT INTO `yx_system_city` VALUES (2987, 618102, 2, 617670, '522323000000', '普安县', '贵州,黔西南,普安', '104.953063', '25.784135', 1); +INSERT INTO `yx_system_city` VALUES (2988, 618205, 2, 617670, '522324000000', '晴隆县', '贵州,黔西南,晴隆', '105.218991', '25.834784', 1); +INSERT INTO `yx_system_city` VALUES (2989, 618316, 2, 617670, '522325000000', '贞丰县', '贵州,黔西南,贞丰', '105.649864', '25.385760', 1); +INSERT INTO `yx_system_city` VALUES (2990, 618489, 2, 617670, '522326000000', '望谟县', '贵州,黔西南,望谟', '106.099617', '25.178422', 1); +INSERT INTO `yx_system_city` VALUES (2991, 618671, 2, 617670, '522327000000', '册亨县', '贵州,黔西南,册亨', '105.811593', '24.983663', 1); +INSERT INTO `yx_system_city` VALUES (2992, 618816, 2, 617670, '522328000000', '安龙县', '贵州,黔西南,安龙', '105.442701', '25.099014', 1); +INSERT INTO `yx_system_city` VALUES (2993, 619018, 2, 619017, '522601000000', '凯里市', '贵州,黔东南,凯里', '107.981212', '26.566867', 1); +INSERT INTO `yx_system_city` VALUES (2994, 619308, 2, 619017, '522622000000', '黄平县', '贵州,黔东南,黄平', '107.916412', '26.905396', 1); +INSERT INTO `yx_system_city` VALUES (2995, 619574, 2, 619017, '522623000000', '施秉县', '贵州,黔东南,施秉', '108.124380', '27.032920', 1); +INSERT INTO `yx_system_city` VALUES (2996, 619657, 2, 619017, '522624000000', '三穗县', '贵州,黔东南,三穗', '108.675267', '26.952968', 1); +INSERT INTO `yx_system_city` VALUES (2997, 619831, 2, 619017, '522625000000', '镇远县', '贵州,黔东南,镇远', '108.429691', '27.049110', 1); +INSERT INTO `yx_system_city` VALUES (2998, 619970, 2, 619017, '522626000000', '岑巩县', '贵州,黔东南,岑巩', '108.816060', '27.173887', 1); +INSERT INTO `yx_system_city` VALUES (2999, 620122, 2, 619017, '522627000000', '天柱县', '贵州,黔东南,天柱', '109.207757', '26.909678', 1); +INSERT INTO `yx_system_city` VALUES (3000, 620465, 2, 619017, '522628000000', '锦屏县', '贵州,黔东南,锦屏', '109.200534', '26.676233', 1); +INSERT INTO `yx_system_city` VALUES (3001, 620673, 2, 619017, '522629000000', '剑河县', '贵州,黔东南,剑河', '108.441501', '26.728274', 1); +INSERT INTO `yx_system_city` VALUES (3002, 620996, 2, 619017, '522630000000', '台江县', '贵州,黔东南,台江', '108.321245', '26.667525', 1); +INSERT INTO `yx_system_city` VALUES (3003, 621166, 2, 619017, '522631000000', '黎平县', '贵州,黔东南,黎平', '109.136658', '26.230424', 1); +INSERT INTO `yx_system_city` VALUES (3004, 621616, 2, 619017, '522632000000', '榕江县', '贵州,黔东南,榕江', '108.521881', '25.931893', 1); +INSERT INTO `yx_system_city` VALUES (3005, 621906, 2, 619017, '522633000000', '从江县', '贵州,黔东南,从江', '108.905329', '25.753009', 1); +INSERT INTO `yx_system_city` VALUES (3006, 622312, 2, 619017, '522634000000', '雷山县', '贵州,黔东南,雷山', '108.077540', '26.378443', 1); +INSERT INTO `yx_system_city` VALUES (3007, 622484, 2, 619017, '522635000000', '麻江县', '贵州,黔东南,麻江', '107.589359', '26.491105', 1); +INSERT INTO `yx_system_city` VALUES (3008, 622561, 2, 619017, '522636000000', '丹寨县', '贵州,黔东南,丹寨', '107.788728', '26.198320', 1); +INSERT INTO `yx_system_city` VALUES (3009, 622735, 2, 622734, '522701000000', '都匀市', '贵州,黔南,都匀', '107.518847', '26.259427', 1); +INSERT INTO `yx_system_city` VALUES (3010, 622888, 2, 622734, '522702000000', '福泉市', '贵州,黔南,福泉', '107.520386', '26.686335', 1); +INSERT INTO `yx_system_city` VALUES (3011, 622973, 2, 622734, '522722000000', '荔波县', '贵州,黔南,荔波', '107.886450', '25.410654', 1); +INSERT INTO `yx_system_city` VALUES (3012, 623082, 2, 622734, '522723000000', '贵定县', '贵州,黔南,贵定', '107.232889', '26.557071', 1); +INSERT INTO `yx_system_city` VALUES (3013, 623205, 2, 622734, '522725000000', '瓮安县', '贵州,黔南,瓮安', '107.471555', '27.078472', 1); +INSERT INTO `yx_system_city` VALUES (3014, 623318, 2, 622734, '522726000000', '独山县', '贵州,黔南,独山', '107.545048', '25.822132', 1); +INSERT INTO `yx_system_city` VALUES (3015, 623391, 2, 622734, '522727000000', '平塘县', '贵州,黔南,平塘', '107.323077', '25.831955', 1); +INSERT INTO `yx_system_city` VALUES (3016, 623530, 2, 622734, '522728000000', '罗甸县', '贵州,黔南,罗甸', '106.751418', '25.424845', 1); +INSERT INTO `yx_system_city` VALUES (3017, 623723, 2, 622734, '522729000000', '长顺县', '贵州,黔南,长顺', '106.447376', '26.022116', 1); +INSERT INTO `yx_system_city` VALUES (3018, 623813, 2, 622734, '522730000000', '龙里县', '贵州,黔南,龙里', '106.979524', '26.453154', 1); +INSERT INTO `yx_system_city` VALUES (3019, 623901, 2, 622734, '522731000000', '惠水县', '贵州,黔南,惠水', '106.657089', '26.132061', 1); +INSERT INTO `yx_system_city` VALUES (3020, 624122, 2, 622734, '522732000000', '三都水族自治县', '贵州,黔南,三都', '107.869749', '25.983202', 1); +INSERT INTO `yx_system_city` VALUES (3021, 624374, 2, 624373, '530101000000', '市辖区', '云南,昆明', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (3022, 624375, 2, 624373, '530102000000', '五华区', '云南,昆明,五华', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (3023, 624486, 2, 624373, '530103000000', '盘龙区', '云南,昆明,盘龙', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (3024, 624599, 2, 624373, '530111000000', '官渡区', '云南,昆明,官渡', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (3025, 624730, 2, 624373, '530112000000', '西山区', '云南,昆明,西山', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (3026, 624860, 2, 624373, '530113000000', '东川区', '云南,昆明,东川', '103.187820', '26.082872', 1); +INSERT INTO `yx_system_city` VALUES (3027, 625034, 2, 624373, '530114000000', '呈贡区', '云南,昆明,呈贡', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (3028, 625111, 2, 624373, '530122000000', '晋宁县', '云南,昆明,晋宁', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (3029, 625255, 2, 624373, '530124000000', '富民县', '云南,昆明,富民', '102.497681', '25.222046', 1); +INSERT INTO `yx_system_city` VALUES (3030, 625337, 2, 624373, '530125000000', '宜良县', '云南,昆明,宜良', '103.141304', '24.919704', 1); +INSERT INTO `yx_system_city` VALUES (3031, 625486, 2, 624373, '530126000000', '石林彝族自治县', '云南,昆明,石林', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (3032, 625585, 2, 624373, '530127000000', '嵩明县', '云南,昆明,嵩明', '103.036911', '25.338642', 1); +INSERT INTO `yx_system_city` VALUES (3033, 625669, 2, 624373, '530128000000', '禄劝彝族苗族自治县', '云南,昆明,禄劝', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (3034, 625883, 2, 624373, '530129000000', '寻甸回族彝族自治县', '云南,昆明,寻甸', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (3035, 626074, 2, 624373, '530181000000', '安宁市', '云南,昆明,安宁', '102.832891', '24.880095', 1); +INSERT INTO `yx_system_city` VALUES (3036, 626182, 2, 626181, '530301000000', '市辖区', '云南,曲靖', '103.796167', '25.489999', 1); +INSERT INTO `yx_system_city` VALUES (3037, 626183, 2, 626181, '530302000000', '麒麟区', '云南,曲靖,麒麟', '103.805012', '25.495241', 1); +INSERT INTO `yx_system_city` VALUES (3038, 626343, 2, 626181, '530303000000', '沾益区', '云南,曲靖,沾益', '103.822324', '25.600507', 1); +INSERT INTO `yx_system_city` VALUES (3039, 626485, 2, 626181, '530321000000', '马龙县', '云南,曲靖,马龙', '103.578454', '25.428130', 1); +INSERT INTO `yx_system_city` VALUES (3040, 626569, 2, 626181, '530322000000', '陆良县', '云南,曲靖,陆良', '103.666663', '25.030051', 1); +INSERT INTO `yx_system_city` VALUES (3041, 626731, 2, 626181, '530323000000', '师宗县', '云南,曲靖,师宗', '103.985478', '24.822403', 1); +INSERT INTO `yx_system_city` VALUES (3042, 626852, 2, 626181, '530324000000', '罗平县', '云南,曲靖,罗平', '104.308675', '24.884626', 1); +INSERT INTO `yx_system_city` VALUES (3043, 627020, 2, 626181, '530325000000', '富源县', '云南,曲靖,富源', '104.255015', '25.674238', 1); +INSERT INTO `yx_system_city` VALUES (3044, 627194, 2, 626181, '530326000000', '会泽县', '云南,曲靖,会泽', '103.297361', '26.417947', 1); +INSERT INTO `yx_system_city` VALUES (3045, 627596, 2, 626181, '530381000000', '宣威市', '云南,曲靖,宣威', '104.104475', '26.219767', 1); +INSERT INTO `yx_system_city` VALUES (3046, 627982, 2, 627981, '530401000000', '市辖区', '云南,玉溪', '102.546543', '24.352036', 1); +INSERT INTO `yx_system_city` VALUES (3047, 627983, 2, 627981, '530402000000', '红塔区', '云南,玉溪,红塔', '102.540179', '24.341098', 1); +INSERT INTO `yx_system_city` VALUES (3048, 628099, 2, 627981, '530403000000', '江川区', '云南,玉溪,江川', '102.753734', '24.287534', 1); +INSERT INTO `yx_system_city` VALUES (3049, 628181, 2, 627981, '530422000000', '澄江县', '云南,玉溪,澄江', '102.908248', '24.673734', 1); +INSERT INTO `yx_system_city` VALUES (3050, 628228, 2, 627981, '530423000000', '通海县', '云南,玉溪,通海', '102.760039', '24.112205', 1); +INSERT INTO `yx_system_city` VALUES (3051, 628314, 2, 627981, '530424000000', '华宁县', '云南,玉溪,华宁', '102.928835', '24.192761', 1); +INSERT INTO `yx_system_city` VALUES (3052, 628397, 2, 627981, '530425000000', '易门县', '云南,玉溪,易门', '102.162531', '24.671651', 1); +INSERT INTO `yx_system_city` VALUES (3053, 628463, 2, 627981, '530426000000', '峨山彝族自治县', '云南,玉溪,峨山', '102.397333', '24.169401', 1); +INSERT INTO `yx_system_city` VALUES (3054, 628548, 2, 627981, '530427000000', '新平彝族傣族自治县', '云南,玉溪,新平', '101.990157', '24.070051', 1); +INSERT INTO `yx_system_city` VALUES (3055, 628684, 2, 627981, '530428000000', '元江哈尼族彝族傣族自治县', '云南,玉溪,元江', '101.998103', '23.596503', 1); +INSERT INTO `yx_system_city` VALUES (3056, 628777, 2, 628776, '530501000000', '市辖区', '云南,保山', '99.161761', '25.112046', 1); +INSERT INTO `yx_system_city` VALUES (3057, 628778, 2, 628776, '530502000000', '隆阳区', '云南,保山,隆阳', '99.165607', '25.121154', 1); +INSERT INTO `yx_system_city` VALUES (3058, 629117, 2, 628776, '530521000000', '施甸县', '云南,保山,施甸', '99.189221', '24.723064', 1); +INSERT INTO `yx_system_city` VALUES (3059, 629271, 2, 628776, '530523000000', '龙陵县', '云南,保山,龙陵', '98.689230', '24.586766', 1); +INSERT INTO `yx_system_city` VALUES (3060, 629403, 2, 628776, '530524000000', '昌宁县', '云南,保山,昌宁', '99.605142', '24.827839', 1); +INSERT INTO `yx_system_city` VALUES (3061, 629541, 2, 628776, '530581000000', '腾冲市', '云南,保山,腾冲', '98.497291', '25.017570', 1); +INSERT INTO `yx_system_city` VALUES (3062, 629782, 2, 629781, '530601000000', '市辖区', '云南,昭通', '103.717465', '27.338257', 1); +INSERT INTO `yx_system_city` VALUES (3063, 629783, 2, 629781, '530602000000', '昭阳区', '云南,昭通,昭阳', '103.706539', '27.320075', 1); +INSERT INTO `yx_system_city` VALUES (3064, 629988, 2, 629781, '530621000000', '鲁甸县', '云南,昭通,鲁甸', '103.558042', '27.186659', 1); +INSERT INTO `yx_system_city` VALUES (3065, 630098, 2, 629781, '530622000000', '巧家县', '云南,昭通,巧家', '102.930164', '26.908461', 1); +INSERT INTO `yx_system_city` VALUES (3066, 630299, 2, 629781, '530623000000', '盐津县', '云南,昭通,盐津', '104.234442', '28.108710', 1); +INSERT INTO `yx_system_city` VALUES (3067, 630404, 2, 629781, '530624000000', '大关县', '云南,昭通,大关', '103.891146', '27.747978', 1); +INSERT INTO `yx_system_city` VALUES (3068, 630498, 2, 629781, '530625000000', '永善县', '云南,昭通,永善', '103.638067', '28.229113', 1); +INSERT INTO `yx_system_city` VALUES (3069, 630656, 2, 629781, '530626000000', '绥江县', '云南,昭通,绥江', '103.968978', '28.592100', 1); +INSERT INTO `yx_system_city` VALUES (3070, 630704, 2, 629781, '530627000000', '镇雄县', '云南,昭通,镇雄', '104.873579', '27.441668', 1); +INSERT INTO `yx_system_city` VALUES (3071, 630989, 2, 629781, '530628000000', '彝良县', '云南,昭通,彝良', '104.048289', '27.625419', 1); +INSERT INTO `yx_system_city` VALUES (3072, 631144, 2, 629781, '530629000000', '威信县', '云南,昭通,威信', '105.049027', '27.846901', 1); +INSERT INTO `yx_system_city` VALUES (3073, 631242, 2, 629781, '530630000000', '水富县', '云南,昭通,水富', '104.416031', '28.629880', 1); +INSERT INTO `yx_system_city` VALUES (3074, 631277, 2, 631276, '530701000000', '市辖区', '云南,丽江', '100.227750', '26.855047', 1); +INSERT INTO `yx_system_city` VALUES (3075, 631278, 2, 631276, '530702000000', '古城区', '云南,丽江,古城', '100.225766', '26.877190', 1); +INSERT INTO `yx_system_city` VALUES (3076, 631349, 2, 631276, '530721000000', '玉龙纳西族自治县', '云南,丽江,玉龙', '100.236955', '26.821460', 1); +INSERT INTO `yx_system_city` VALUES (3077, 631469, 2, 631276, '530722000000', '永胜县', '云南,丽江,永胜', '100.750795', '26.684225', 1); +INSERT INTO `yx_system_city` VALUES (3078, 631634, 2, 631276, '530723000000', '华坪县', '云南,丽江,华坪', '101.266195', '26.629211', 1); +INSERT INTO `yx_system_city` VALUES (3079, 631704, 2, 631276, '530724000000', '宁蒗彝族自治县', '云南,丽江,宁蒗', '100.852001', '27.282071', 1); +INSERT INTO `yx_system_city` VALUES (3080, 631812, 2, 631811, '530801000000', '市辖区', '云南,普洱', '100.966512', '22.825065', 1); +INSERT INTO `yx_system_city` VALUES (3081, 631813, 2, 631811, '530802000000', '思茅区', '云南,普洱,思茅', '100.977165', '22.786910', 1); +INSERT INTO `yx_system_city` VALUES (3082, 631894, 2, 631811, '530821000000', '宁洱哈尼族彝族自治县', '云南,普洱,宁洱', '100.980485', '22.781242', 1); +INSERT INTO `yx_system_city` VALUES (3083, 631993, 2, 631811, '530822000000', '墨江哈尼族自治县', '云南,普洱,墨江', '101.692461', '23.431894', 1); +INSERT INTO `yx_system_city` VALUES (3084, 632177, 2, 631811, '530823000000', '景东彝族自治县', '云南,普洱,景东', '100.833877', '24.446731', 1); +INSERT INTO `yx_system_city` VALUES (3085, 632361, 2, 631811, '530824000000', '景谷傣族彝族自治县', '云南,普洱,景谷', '100.702871', '23.497028', 1); +INSERT INTO `yx_system_city` VALUES (3086, 632513, 2, 631811, '530825000000', '镇沅彝族哈尼族拉祜族自治县', '云南,普洱,镇沅', '101.108595', '24.004442', 1); +INSERT INTO `yx_system_city` VALUES (3087, 632634, 2, 631811, '530826000000', '江城哈尼族彝族自治县', '云南,普洱,江城', '101.862120', '22.585868', 1); +INSERT INTO `yx_system_city` VALUES (3088, 632693, 2, 631811, '530827000000', '孟连傣族拉祜族佤族自治县', '云南,普洱,孟连', '99.584157', '22.329100', 1); +INSERT INTO `yx_system_city` VALUES (3089, 632742, 2, 631811, '530828000000', '澜沧拉祜族自治县', '云南,普洱,澜沧', '99.931975', '22.555905', 1); +INSERT INTO `yx_system_city` VALUES (3090, 632924, 2, 631811, '530829000000', '西盟佤族自治县', '云南,普洱,西', '100.966512', '22.825065', 1); +INSERT INTO `yx_system_city` VALUES (3091, 632972, 2, 632971, '530901000000', '市辖区', '云南,临沧', '100.079583', '23.877573', 1); +INSERT INTO `yx_system_city` VALUES (3092, 632973, 2, 632971, '530902000000', '临翔区', '云南,临沧,临翔', '100.082523', '23.895137', 1); +INSERT INTO `yx_system_city` VALUES (3093, 633086, 2, 632971, '530921000000', '凤庆县', '云南,临沧,凤庆', '99.928460', '24.580424', 1); +INSERT INTO `yx_system_city` VALUES (3094, 633287, 2, 632971, '530922000000', '云县', '云南,临沧,云县', '100.123248', '24.437061', 1); +INSERT INTO `yx_system_city` VALUES (3095, 633498, 2, 632971, '530923000000', '永德县', '云南,临沧,永德', '99.259340', '24.018357', 1); +INSERT INTO `yx_system_city` VALUES (3096, 633629, 2, 632971, '530924000000', '镇康县', '云南,临沧,镇康', '98.825285', '23.762584', 1); +INSERT INTO `yx_system_city` VALUES (3097, 633711, 2, 632971, '530925000000', '双江拉祜族佤族布朗族傣族自治县', '云南,临沧,双江', '99.827698', '23.473499', 1); +INSERT INTO `yx_system_city` VALUES (3098, 633793, 2, 632971, '530926000000', '耿马傣族佤族自治县', '云南,临沧,耿马', '99.395366', '23.529249', 1); +INSERT INTO `yx_system_city` VALUES (3099, 633898, 2, 632971, '530927000000', '沧源佤族自治县', '云南,临沧,沧源', '99.246197', '23.146712', 1); +INSERT INTO `yx_system_city` VALUES (3100, 634007, 2, 634006, '532301000000', '楚雄市', '云南,楚雄,楚雄', '101.545906', '25.032889', 1); +INSERT INTO `yx_system_city` VALUES (3101, 634176, 2, 634006, '532322000000', '双柏县', '云南,楚雄,双柏', '101.641937', '24.688875', 1); +INSERT INTO `yx_system_city` VALUES (3102, 634269, 2, 634006, '532323000000', '牟定县', '云南,楚雄,牟定', '101.546566', '25.313122', 1); +INSERT INTO `yx_system_city` VALUES (3103, 634366, 2, 634006, '532324000000', '南华县', '云南,楚雄,南华', '101.273577', '25.192293', 1); +INSERT INTO `yx_system_city` VALUES (3104, 634505, 2, 634006, '532325000000', '姚安县', '云南,楚雄,姚安', '101.241728', '25.504173', 1); +INSERT INTO `yx_system_city` VALUES (3105, 634592, 2, 634006, '532326000000', '大姚县', '云南,楚雄,大姚', '101.336617', '25.729513', 1); +INSERT INTO `yx_system_city` VALUES (3106, 634734, 2, 634006, '532327000000', '永仁县', '云南,楚雄,永仁', '101.666133', '26.049464', 1); +INSERT INTO `yx_system_city` VALUES (3107, 634805, 2, 634006, '532328000000', '元谋县', '云南,楚雄,元谋', '101.874520', '25.704338', 1); +INSERT INTO `yx_system_city` VALUES (3108, 634894, 2, 634006, '532329000000', '武定县', '云南,楚雄,武定', '102.404338', '25.530389', 1); +INSERT INTO `yx_system_city` VALUES (3109, 635039, 2, 634006, '532331000000', '禄丰县', '云南,楚雄,禄丰', '102.079027', '25.150111', 1); +INSERT INTO `yx_system_city` VALUES (3110, 635220, 2, 635219, '532501000000', '个旧市', '云南,红河,个旧', '103.160034', '23.359121', 1); +INSERT INTO `yx_system_city` VALUES (3111, 635347, 2, 635219, '532502000000', '开远市', '云南,红河,开远', '103.267143', '23.714316', 1); +INSERT INTO `yx_system_city` VALUES (3112, 635435, 2, 635219, '532503000000', '蒙自市', '云南,红河,蒙自', '103.364905', '23.396201', 1); +INSERT INTO `yx_system_city` VALUES (3113, 635548, 2, 635219, '532504000000', '弥勒市', '云南,红河,弥勒', '103.414874', '24.411912', 1); +INSERT INTO `yx_system_city` VALUES (3114, 635698, 2, 635219, '532523000000', '屏边苗族自治县', '云南,红河,屏边', '103.687612', '22.983560', 1); +INSERT INTO `yx_system_city` VALUES (3115, 635786, 2, 635219, '532524000000', '建水县', '云南,红河,建水', '102.826557', '23.634700', 1); +INSERT INTO `yx_system_city` VALUES (3116, 635955, 2, 635219, '532525000000', '石屏县', '云南,红河,石屏', '102.494984', '23.705936', 1); +INSERT INTO `yx_system_city` VALUES (3117, 636080, 2, 635219, '532527000000', '泸西县', '云南,红河,泸西', '103.766196', '24.532025', 1); +INSERT INTO `yx_system_city` VALUES (3118, 636176, 2, 635219, '532528000000', '元阳县', '云南,红河,元阳', '102.835223', '23.219932', 1); +INSERT INTO `yx_system_city` VALUES (3119, 636329, 2, 635219, '532529000000', '红河县', '云南,红河,红河', '102.420600', '23.369161', 1); +INSERT INTO `yx_system_city` VALUES (3120, 636434, 2, 635219, '532530000000', '金平苗族瑶族傣族自治县', '云南,红河,金平', '103.226448', '22.779543', 1); +INSERT INTO `yx_system_city` VALUES (3121, 636546, 2, 635219, '532531000000', '绿春县', '云南,红河,绿春', '102.392463', '22.993718', 1); +INSERT INTO `yx_system_city` VALUES (3122, 636647, 2, 635219, '532532000000', '河口瑶族自治县', '云南,红河,河口', '103.960560', '22.509593', 1); +INSERT INTO `yx_system_city` VALUES (3123, 636689, 2, 636688, '532601000000', '文山市', '云南,文山,文山', '104.232510', '23.386306', 1); +INSERT INTO `yx_system_city` VALUES (3124, 636850, 2, 636688, '532622000000', '砚山县', '云南,文山,砚山', '104.337244', '23.605740', 1); +INSERT INTO `yx_system_city` VALUES (3125, 636970, 2, 636688, '532623000000', '西畴县', '云南,文山,西畴', '104.672597', '23.437782', 1); +INSERT INTO `yx_system_city` VALUES (3126, 637052, 2, 636688, '532624000000', '麻栗坡县', '云南,文山,麻栗坡', '104.702799', '23.125714', 1); +INSERT INTO `yx_system_city` VALUES (3127, 637166, 2, 636688, '532625000000', '马关县', '云南,文山,马关', '104.394158', '23.012915', 1); +INSERT INTO `yx_system_city` VALUES (3128, 637312, 2, 636688, '532626000000', '丘北县', '云南,文山,丘北', '104.195820', '24.041919', 1); +INSERT INTO `yx_system_city` VALUES (3129, 637426, 2, 636688, '532627000000', '广南县', '云南,文山,广南', '105.054981', '24.045941', 1); +INSERT INTO `yx_system_city` VALUES (3130, 637619, 2, 636688, '532628000000', '富宁县', '云南,文山,富宁', '105.630999', '23.625283', 1); +INSERT INTO `yx_system_city` VALUES (3131, 637779, 2, 637778, '532801000000', '景洪市', '云南,西双版纳,景洪', '100.771679', '22.000143', 1); +INSERT INTO `yx_system_city` VALUES (3132, 637910, 2, 637778, '532822000000', '勐海县', '云南,西双版纳,勐海', '100.452548', '21.957354', 1); +INSERT INTO `yx_system_city` VALUES (3133, 638015, 2, 637778, '532823000000', '勐腊县', '云南,西双版纳,勐腊', '101.564636', '21.459233', 1); +INSERT INTO `yx_system_city` VALUES (3134, 638093, 2, 638092, '532901000000', '大理市', '云南,大理,大理', '100.241369', '25.593067', 1); +INSERT INTO `yx_system_city` VALUES (3135, 638249, 2, 638092, '532922000000', '漾濞彝族自治县', '云南,大理,漾濞', '99.958015', '25.670148', 1); +INSERT INTO `yx_system_city` VALUES (3136, 638325, 2, 638092, '532923000000', '祥云县', '云南,大理,祥云', '100.550946', '25.483850', 1); +INSERT INTO `yx_system_city` VALUES (3137, 638475, 2, 638092, '532924000000', '宾川县', '云南,大理,宾川', '100.575412', '25.827182', 1); +INSERT INTO `yx_system_city` VALUES (3138, 638576, 2, 638092, '532925000000', '弥渡县', '云南,大理,弥渡', '100.490991', '25.343804', 1); +INSERT INTO `yx_system_city` VALUES (3139, 638674, 2, 638092, '532926000000', '南涧彝族自治县', '云南,大理,南涧', '100.509036', '25.043510', 1); +INSERT INTO `yx_system_city` VALUES (3140, 638764, 2, 638092, '532927000000', '巍山彝族回族自治县', '云南,大理,巍山', '100.307175', '25.227212', 1); +INSERT INTO `yx_system_city` VALUES (3141, 638858, 2, 638092, '532928000000', '永平县', '云南,大理,永平', '99.541236', '25.464681', 1); +INSERT INTO `yx_system_city` VALUES (3142, 638941, 2, 638092, '532929000000', '云龙县', '云南,大理,云龙', '99.371121', '25.885596', 1); +INSERT INTO `yx_system_city` VALUES (3143, 639039, 2, 638092, '532930000000', '洱源县', '云南,大理,洱源', '99.951054', '26.111160', 1); +INSERT INTO `yx_system_city` VALUES (3144, 639139, 2, 638092, '532931000000', '剑川县', '云南,大理,剑川', '99.905559', '26.537033', 1); +INSERT INTO `yx_system_city` VALUES (3145, 639241, 2, 638092, '532932000000', '鹤庆县', '云南,大理,鹤庆', '100.176498', '26.560231', 1); +INSERT INTO `yx_system_city` VALUES (3146, 639369, 2, 639368, '533102000000', '瑞丽市', '云南,德宏,瑞丽', '97.855477', '24.017836', 1); +INSERT INTO `yx_system_city` VALUES (3147, 639416, 2, 639368, '533103000000', '芒市', '云南,德宏,芒市', '98.588086', '24.433690', 1); +INSERT INTO `yx_system_city` VALUES (3148, 639524, 2, 639368, '533122000000', '梁河县', '云南,德宏,梁河', '98.296657', '24.804232', 1); +INSERT INTO `yx_system_city` VALUES (3149, 639600, 2, 639368, '533123000000', '盈江县', '云南,德宏,盈江', '97.931955', '24.705211', 1); +INSERT INTO `yx_system_city` VALUES (3150, 639719, 2, 639368, '533124000000', '陇川县', '云南,德宏,陇川', '97.792105', '24.182965', 1); +INSERT INTO `yx_system_city` VALUES (3151, 639803, 2, 639802, '533301000000', '泸水市', '云南,怒江,泸水', '98.853097', '25.852547', 1); +INSERT INTO `yx_system_city` VALUES (3152, 639889, 2, 639802, '533323000000', '福贡县', '云南,怒江,福贡', '98.869132', '26.901832', 1); +INSERT INTO `yx_system_city` VALUES (3153, 639956, 2, 639802, '533324000000', '贡山独龙族怒族自治县', '云南,怒江,贡山', '98.853097', '25.852547', 1); +INSERT INTO `yx_system_city` VALUES (3154, 639990, 2, 639802, '533325000000', '兰坪白族普米族自治县', '云南,怒江,兰坪', '99.416677', '26.453571', 1); +INSERT INTO `yx_system_city` VALUES (3155, 640108, 2, 640107, '533401000000', '香格里拉市', '云南,迪庆,香格里拉', '99.700836', '27.829743', 1); +INSERT INTO `yx_system_city` VALUES (3156, 640184, 2, 640107, '533422000000', '德钦县', '云南,迪庆,德钦', '98.911561', '28.486162', 1); +INSERT INTO `yx_system_city` VALUES (3157, 640239, 2, 640107, '533423000000', '维西傈僳族自治县', '云南,迪庆,维西', '99.287173', '27.177162', 1); +INSERT INTO `yx_system_city` VALUES (3158, 640334, 2, 640333, '540101000000', '市辖区', '西藏,拉萨', '91.140856', '29.645554', 1); +INSERT INTO `yx_system_city` VALUES (3159, 640335, 2, 640333, '540102000000', '城关区', '西藏,拉萨,城关', '91.140856', '29.645554', 1); +INSERT INTO `yx_system_city` VALUES (3160, 640399, 2, 640333, '540103000000', '堆龙德庆区', '西藏,拉萨,堆龙德庆', '91.140856', '29.645554', 1); +INSERT INTO `yx_system_city` VALUES (3161, 640441, 2, 640333, '540121000000', '林周县', '西藏,拉萨,林周', '91.140856', '29.645554', 1); +INSERT INTO `yx_system_city` VALUES (3162, 640497, 2, 640333, '540122000000', '当雄县', '西藏,拉萨,当雄', '91.140856', '29.645554', 1); +INSERT INTO `yx_system_city` VALUES (3163, 640534, 2, 640333, '540123000000', '尼木县', '西藏,拉萨,尼木', '91.140856', '29.645554', 1); +INSERT INTO `yx_system_city` VALUES (3164, 640575, 2, 640333, '540124000000', '曲水县', '西藏,拉萨,曲水', '91.140856', '29.645554', 1); +INSERT INTO `yx_system_city` VALUES (3165, 640599, 2, 640333, '540126000000', '达孜县', '西藏,拉萨,达孜', '91.140856', '29.645554', 1); +INSERT INTO `yx_system_city` VALUES (3166, 640626, 2, 640333, '540127000000', '墨竹工卡县', '西藏,拉萨,墨竹工卡', '91.140856', '29.645554', 1); +INSERT INTO `yx_system_city` VALUES (3167, 640676, 2, 640675, '540202000000', '桑珠孜区', '西藏,日喀则,桑珠孜', '88.887270', '29.270389', 1); +INSERT INTO `yx_system_city` VALUES (3168, 640865, 2, 640675, '540221000000', '南木林县', '西藏,日喀则,南木林', '89.099243', '29.682331', 1); +INSERT INTO `yx_system_city` VALUES (3169, 641029, 2, 640675, '540222000000', '江孜县', '西藏,日喀则,江孜', '89.605574', '28.911659', 1); +INSERT INTO `yx_system_city` VALUES (3170, 641204, 2, 640675, '540223000000', '定日县', '西藏,日喀则,定日', '87.126120', '28.658743', 1); +INSERT INTO `yx_system_city` VALUES (3171, 641393, 2, 640675, '540224000000', '萨迦县', '西藏,日喀则,萨迦', '88.021674', '28.899664', 1); +INSERT INTO `yx_system_city` VALUES (3172, 641512, 2, 640675, '540225000000', '拉孜县', '西藏,日喀则,拉孜', '87.637041', '29.081660', 1); +INSERT INTO `yx_system_city` VALUES (3173, 641622, 2, 640675, '540226000000', '昂仁县', '西藏,日喀则,昂仁', '87.236051', '29.294802', 1); +INSERT INTO `yx_system_city` VALUES (3174, 641825, 2, 640675, '540227000000', '谢通门县', '西藏,日喀则,谢通门', '88.261620', '29.432641', 1); +INSERT INTO `yx_system_city` VALUES (3175, 641940, 2, 640675, '540228000000', '白朗县', '西藏,日喀则,白朗', '89.261977', '29.107688', 1); +INSERT INTO `yx_system_city` VALUES (3176, 642063, 2, 640675, '540229000000', '仁布县', '西藏,日喀则,仁布', '89.841984', '29.230933', 1); +INSERT INTO `yx_system_city` VALUES (3177, 642146, 2, 640675, '540230000000', '康马县', '西藏,日喀则,康马', '89.681663', '28.555627', 1); +INSERT INTO `yx_system_city` VALUES (3178, 642203, 2, 640675, '540231000000', '定结县', '西藏,日喀则,定结', '87.765872', '28.364159', 1); +INSERT INTO `yx_system_city` VALUES (3179, 642284, 2, 640675, '540232000000', '仲巴县', '西藏,日喀则,仲巴', '84.031530', '29.770279', 1); +INSERT INTO `yx_system_city` VALUES (3180, 642356, 2, 640675, '540233000000', '亚东县', '西藏,日喀则,亚东', '88.907094', '27.484806', 1); +INSERT INTO `yx_system_city` VALUES (3181, 642389, 2, 640675, '540234000000', '吉隆县', '西藏,日喀则,吉隆', '85.297535', '28.852394', 1); +INSERT INTO `yx_system_city` VALUES (3182, 642437, 2, 640675, '540235000000', '聂拉木县', '西藏,日喀则,聂拉木', '85.982237', '28.155186', 1); +INSERT INTO `yx_system_city` VALUES (3183, 642489, 2, 640675, '540236000000', '萨嘎县', '西藏,日喀则,萨嘎', '85.232941', '29.328818', 1); +INSERT INTO `yx_system_city` VALUES (3184, 642536, 2, 640675, '540237000000', '岗巴县', '西藏,日喀则,岗巴', '88.520031', '28.274601', 1); +INSERT INTO `yx_system_city` VALUES (3185, 642572, 2, 642571, '540302000000', '卡若区', '西藏,昌都,卡若', '97.180437', '31.138507', 1); +INSERT INTO `yx_system_city` VALUES (3186, 642755, 2, 642571, '540321000000', '江达县', '西藏,昌都,江达', '98.218430', '31.499202', 1); +INSERT INTO `yx_system_city` VALUES (3187, 642864, 2, 642571, '540322000000', '贡觉县', '西藏,昌都,贡觉', '98.270970', '30.860099', 1); +INSERT INTO `yx_system_city` VALUES (3188, 643026, 2, 642571, '540323000000', '类乌齐县', '西藏,昌都,类乌齐', '96.600246', '31.211601', 1); +INSERT INTO `yx_system_city` VALUES (3189, 643119, 2, 642571, '540324000000', '丁青县', '西藏,昌都,丁青', '95.595761', '31.412405', 1); +INSERT INTO `yx_system_city` VALUES (3190, 643197, 2, 642571, '540325000000', '察雅县', '西藏,昌都,察雅', '97.568752', '30.653943', 1); +INSERT INTO `yx_system_city` VALUES (3191, 643349, 2, 642571, '540326000000', '八宿县', '西藏,昌都,八宿', '96.917836', '30.053209', 1); +INSERT INTO `yx_system_city` VALUES (3192, 643474, 2, 642571, '540327000000', '左贡县', '西藏,昌都,左贡', '97.841022', '29.671069', 1); +INSERT INTO `yx_system_city` VALUES (3193, 643613, 2, 642571, '540328000000', '芒康县', '西藏,昌都,芒康', '98.593113', '29.679908', 1); +INSERT INTO `yx_system_city` VALUES (3194, 643691, 2, 642571, '540329000000', '洛隆县', '西藏,昌都,洛隆', '95.824567', '30.741571', 1); +INSERT INTO `yx_system_city` VALUES (3195, 643769, 2, 642571, '540330000000', '边坝县', '西藏,昌都,边坝', '94.707800', '30.933652', 1); +INSERT INTO `yx_system_city` VALUES (3196, 643864, 2, 643863, '540402000000', '巴宜区', '西藏,林芝,巴宜', '94.360994', '29.653727', 1); +INSERT INTO `yx_system_city` VALUES (3197, 643943, 2, 643863, '540421000000', '工布江达县', '西藏,林芝,工布江达', '93.246077', '29.885280', 1); +INSERT INTO `yx_system_city` VALUES (3198, 644033, 2, 643863, '540422000000', '米林县', '西藏,林芝,米林', '94.213486', '29.215833', 1); +INSERT INTO `yx_system_city` VALUES (3199, 644109, 2, 643863, '540423000000', '墨脱县', '西藏,林芝,墨脱', '95.332241', '29.325734', 1); +INSERT INTO `yx_system_city` VALUES (3200, 644164, 2, 643863, '540424000000', '波密县', '西藏,林芝,波密', '95.768158', '29.858766', 1); +INSERT INTO `yx_system_city` VALUES (3201, 644260, 2, 643863, '540425000000', '察隅县', '西藏,林芝,察隅', '94.361490', '29.649128', 1); +INSERT INTO `yx_system_city` VALUES (3202, 644364, 2, 643863, '540426000000', '朗县', '西藏,林芝,朗县', '93.074702', '29.046337', 1); +INSERT INTO `yx_system_city` VALUES (3203, 644424, 2, 644423, '540501000000', '市辖区', '西藏,山南', '91.117212', '29.646922', 1); +INSERT INTO `yx_system_city` VALUES (3204, 644425, 2, 644423, '540502000000', '乃东区', '西藏,山南,乃东', '91.761539', '29.224904', 1); +INSERT INTO `yx_system_city` VALUES (3205, 644480, 2, 644423, '540521000000', '扎囊县', '西藏,山南,扎囊', '91.337250', '29.245114', 1); +INSERT INTO `yx_system_city` VALUES (3206, 644548, 2, 644423, '540522000000', '贡嘎县', '西藏,山南,贡嘎', '90.984140', '29.289455', 1); +INSERT INTO `yx_system_city` VALUES (3207, 644600, 2, 644423, '540523000000', '桑日县', '西藏,山南,桑日', '92.015818', '29.259189', 1); +INSERT INTO `yx_system_city` VALUES (3208, 644647, 2, 644423, '540524000000', '琼结县', '西藏,山南,琼结', '91.683881', '29.024625', 1); +INSERT INTO `yx_system_city` VALUES (3209, 644672, 2, 644423, '540525000000', '曲松县', '西藏,山南,曲松', '92.203739', '29.062826', 1); +INSERT INTO `yx_system_city` VALUES (3210, 644699, 2, 644423, '540526000000', '措美县', '西藏,山南,措美', '91.433509', '28.438202', 1); +INSERT INTO `yx_system_city` VALUES (3211, 644720, 2, 644423, '540527000000', '洛扎县', '西藏,山南,洛扎', '90.859992', '28.385713', 1); +INSERT INTO `yx_system_city` VALUES (3212, 644755, 2, 644423, '540528000000', '加查县', '西藏,山南,加查', '92.593993', '29.140290', 1); +INSERT INTO `yx_system_city` VALUES (3213, 644840, 2, 644423, '540529000000', '隆子县', '西藏,山南,隆子', '92.463305', '28.408552', 1); +INSERT INTO `yx_system_city` VALUES (3214, 644932, 2, 644423, '540530000000', '错那县', '西藏,山南,错那', '91.960139', '27.991716', 1); +INSERT INTO `yx_system_city` VALUES (3215, 644967, 2, 644423, '540531000000', '浪卡子县', '西藏,山南,浪卡子', '90.397977', '28.968031', 1); +INSERT INTO `yx_system_city` VALUES (3216, 645077, 2, 645076, '542421000000', '那曲县', '西藏,那曲,那曲', '92.053500', '31.469643', 1); +INSERT INTO `yx_system_city` VALUES (3217, 645231, 2, 645076, '542422000000', '嘉黎县', '西藏,那曲,嘉黎', '93.232528', '30.640815', 1); +INSERT INTO `yx_system_city` VALUES (3218, 645364, 2, 645076, '542423000000', '比如县', '西藏,那曲,比如', '93.679639', '31.480250', 1); +INSERT INTO `yx_system_city` VALUES (3219, 645550, 2, 645076, '542424000000', '聂荣县', '西藏,那曲,聂荣', '92.303346', '32.107772', 1); +INSERT INTO `yx_system_city` VALUES (3220, 645703, 2, 645076, '542425000000', '安多县', '西藏,那曲,安多', '91.682330', '32.265176', 1); +INSERT INTO `yx_system_city` VALUES (3221, 645791, 2, 645076, '542426000000', '申扎县', '西藏,那曲,申扎', '88.709853', '30.930505', 1); +INSERT INTO `yx_system_city` VALUES (3222, 645862, 2, 645076, '542427000000', '索县', '西藏,那曲,索县', '93.785631', '31.886918', 1); +INSERT INTO `yx_system_city` VALUES (3223, 645997, 2, 645076, '542428000000', '班戈县', '西藏,那曲,班戈', '90.009957', '31.392411', 1); +INSERT INTO `yx_system_city` VALUES (3224, 646094, 2, 645076, '542429000000', '巴青县', '西藏,那曲,巴青', '94.053463', '31.918563', 1); +INSERT INTO `yx_system_city` VALUES (3225, 646261, 2, 645076, '542430000000', '尼玛县', '西藏,那曲,尼玛', '87.236772', '31.784701', 1); +INSERT INTO `yx_system_city` VALUES (3226, 646353, 2, 645076, '542431000000', '双湖县', '西藏,那曲,双湖', '88.837642', '33.188515', 1); +INSERT INTO `yx_system_city` VALUES (3227, 646393, 2, 646392, '542521000000', '普兰县', '西藏,阿里,普兰', '81.176237', '30.294402', 1); +INSERT INTO `yx_system_city` VALUES (3228, 646407, 2, 646392, '542522000000', '札达县', '西藏,阿里,札达', '79.802706', '31.479217', 1); +INSERT INTO `yx_system_city` VALUES (3229, 646431, 2, 646392, '542523000000', '噶尔县', '西藏,阿里,噶尔', '80.096419', '32.491488', 1); +INSERT INTO `yx_system_city` VALUES (3230, 646451, 2, 646392, '542524000000', '日土县', '西藏,阿里,日土', '79.732427', '33.381359', 1); +INSERT INTO `yx_system_city` VALUES (3231, 646470, 2, 646392, '542525000000', '革吉县', '西藏,阿里,革吉', '81.145433', '32.387233', 1); +INSERT INTO `yx_system_city` VALUES (3232, 646495, 2, 646392, '542526000000', '改则县', '西藏,阿里,改则', '84.062590', '32.302713', 1); +INSERT INTO `yx_system_city` VALUES (3233, 646551, 2, 646392, '542527000000', '措勤县', '西藏,阿里,措勤', '85.159494', '31.016769', 1); +INSERT INTO `yx_system_city` VALUES (3234, 646580, 2, 646579, '610101000000', '市辖区', '陕西,西安', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3235, 646581, 2, 646579, '610102000000', '新城区', '陕西,西安,新城', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3236, 646694, 2, 646579, '610103000000', '碑林区', '陕西,西安,碑林', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3237, 646800, 2, 646579, '610104000000', '莲湖区', '陕西,西安,莲湖', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3238, 646944, 2, 646579, '610111000000', '灞桥区', '陕西,西安,灞桥', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3239, 647214, 2, 646579, '610112000000', '未央区', '陕西,西安,未央', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3240, 647486, 2, 646579, '610113000000', '雁塔区', '陕西,西安,雁塔', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3241, 647710, 2, 646579, '610114000000', '阎良区', '陕西,西安,阎良', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3242, 647821, 2, 646579, '610115000000', '临潼区', '陕西,西安,临潼', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3243, 648113, 2, 646579, '610116000000', '长安区', '陕西,西安,长安', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3244, 648645, 2, 646579, '610117000000', '高陵区', '陕西,西安,高陵', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3245, 648756, 2, 646579, '610122000000', '蓝田县', '陕西,西安,蓝田', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3246, 649123, 2, 646579, '610124000000', '周至县', '陕西,西安,周至', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3247, 649424, 2, 646579, '610125000000', '户县', '陕西,西安,户县', '108.940174', '34.341568', 1); +INSERT INTO `yx_system_city` VALUES (3248, 649980, 2, 649979, '610201000000', '市辖区', '陕西,铜川', '108.945233', '34.896756', 1); +INSERT INTO `yx_system_city` VALUES (3249, 649981, 2, 649979, '610202000000', '王益区', '陕西,铜川,王益', '109.075578', '35.068964', 1); +INSERT INTO `yx_system_city` VALUES (3250, 650048, 2, 649979, '610203000000', '印台区', '陕西,铜川,印台', '109.099975', '35.114492', 1); +INSERT INTO `yx_system_city` VALUES (3251, 650189, 2, 649979, '610204000000', '耀州区', '陕西,铜川,耀州', '108.980514', '34.908916', 1); +INSERT INTO `yx_system_city` VALUES (3252, 650386, 2, 649979, '610222000000', '宜君县', '陕西,铜川,宜君', '109.116932', '35.398577', 1); +INSERT INTO `yx_system_city` VALUES (3253, 650576, 2, 650575, '610301000000', '市辖区', '陕西,宝鸡', '107.237974', '34.361979', 1); +INSERT INTO `yx_system_city` VALUES (3254, 650577, 2, 650575, '610302000000', '渭滨区', '陕西,宝鸡,渭滨', '107.149968', '34.371184', 1); +INSERT INTO `yx_system_city` VALUES (3255, 650747, 2, 650575, '610303000000', '金台区', '陕西,宝鸡,金台', '107.146806', '34.376069', 1); +INSERT INTO `yx_system_city` VALUES (3256, 650913, 2, 650575, '610304000000', '陈仓区', '陕西,宝鸡,陈仓', '107.387436', '34.354456', 1); +INSERT INTO `yx_system_city` VALUES (3257, 651278, 2, 650575, '610322000000', '凤翔县', '陕西,宝鸡,凤翔', '107.400737', '34.521218', 1); +INSERT INTO `yx_system_city` VALUES (3258, 651528, 2, 650575, '610323000000', '岐山县', '陕西,宝鸡,岐山', '107.621054', '34.443459', 1); +INSERT INTO `yx_system_city` VALUES (3259, 651697, 2, 650575, '610324000000', '扶风县', '陕西,宝鸡,扶风', '107.900219', '34.375411', 1); +INSERT INTO `yx_system_city` VALUES (3260, 651872, 2, 650575, '610326000000', '眉县', '陕西,宝鸡,眉县', '107.749767', '34.274247', 1); +INSERT INTO `yx_system_city` VALUES (3261, 652014, 2, 650575, '610327000000', '陇县', '陕西,宝鸡,陇县', '106.864397', '34.893050', 1); +INSERT INTO `yx_system_city` VALUES (3262, 652186, 2, 650575, '610328000000', '千阳县', '陕西,宝鸡,千阳', '107.132442', '34.642381', 1); +INSERT INTO `yx_system_city` VALUES (3263, 652294, 2, 650575, '610329000000', '麟游县', '陕西,宝鸡,麟游', '107.793525', '34.677902', 1); +INSERT INTO `yx_system_city` VALUES (3264, 652387, 2, 650575, '610330000000', '凤县', '陕西,宝鸡,凤县', '106.515756', '33.908469', 1); +INSERT INTO `yx_system_city` VALUES (3265, 652505, 2, 650575, '610331000000', '太白县', '陕西,宝鸡,太白', '107.319116', '34.058401', 1); +INSERT INTO `yx_system_city` VALUES (3266, 652582, 2, 652581, '610401000000', '市辖区', '陕西,咸阳', '108.708991', '34.329605', 1); +INSERT INTO `yx_system_city` VALUES (3267, 652583, 2, 652581, '610402000000', '秦都区', '陕西,咸阳,秦都', '108.706272', '34.329567', 1); +INSERT INTO `yx_system_city` VALUES (3268, 652779, 2, 652581, '610403000000', '杨陵区', '陕西,咸阳,杨陵', '108.084732', '34.272117', 1); +INSERT INTO `yx_system_city` VALUES (3269, 652863, 2, 652581, '610404000000', '渭城区', '陕西,咸阳,渭城', '108.737213', '34.361988', 1); +INSERT INTO `yx_system_city` VALUES (3270, 653042, 2, 652581, '610422000000', '三原县', '陕西,咸阳,三原', '108.940509', '34.617382', 1); +INSERT INTO `yx_system_city` VALUES (3271, 653234, 2, 652581, '610423000000', '泾阳县', '陕西,咸阳,泾阳', '108.842623', '34.527114', 1); +INSERT INTO `yx_system_city` VALUES (3272, 653470, 2, 652581, '610424000000', '乾县', '陕西,咸阳,乾县', '108.239473', '34.527551', 1); +INSERT INTO `yx_system_city` VALUES (3273, 653679, 2, 652581, '610425000000', '礼泉县', '陕西,咸阳,礼泉', '108.425018', '34.481764', 1); +INSERT INTO `yx_system_city` VALUES (3274, 653918, 2, 652581, '610426000000', '永寿县', '陕西,咸阳,永寿', '108.142311', '34.691979', 1); +INSERT INTO `yx_system_city` VALUES (3275, 654101, 2, 652581, '610427000000', '彬县', '陕西,咸阳,彬县', '108.077658', '35.043911', 1); +INSERT INTO `yx_system_city` VALUES (3276, 654369, 2, 652581, '610428000000', '长武县', '陕西,咸阳,长武', '107.798757', '35.205886', 1); +INSERT INTO `yx_system_city` VALUES (3277, 654525, 2, 652581, '610429000000', '旬邑县', '陕西,咸阳,旬邑', '108.333986', '35.111978', 1); +INSERT INTO `yx_system_city` VALUES (3278, 654661, 2, 652581, '610430000000', '淳化县', '陕西,咸阳,淳化', '108.580681', '34.799250', 1); +INSERT INTO `yx_system_city` VALUES (3279, 654876, 2, 652581, '610431000000', '武功县', '陕西,咸阳,武功', '108.200398', '34.260204', 1); +INSERT INTO `yx_system_city` VALUES (3280, 655081, 2, 652581, '610481000000', '兴平市', '陕西,咸阳,兴平', '108.490475', '34.299221', 1); +INSERT INTO `yx_system_city` VALUES (3281, 655296, 2, 655295, '610501000000', '市辖区', '陕西,渭南', '109.509786', '34.499995', 1); +INSERT INTO `yx_system_city` VALUES (3282, 655297, 2, 655295, '610502000000', '临渭区', '陕西,渭南,临渭', '109.492726', '34.498192', 1); +INSERT INTO `yx_system_city` VALUES (3283, 655724, 2, 655295, '610503000000', '华州区', '陕西,渭南,华州', '109.761417', '34.511949', 1); +INSERT INTO `yx_system_city` VALUES (3284, 655885, 2, 655295, '610522000000', '潼关县', '陕西,渭南,潼关', '110.246350', '34.544296', 1); +INSERT INTO `yx_system_city` VALUES (3285, 655919, 2, 655295, '610523000000', '大荔县', '陕西,渭南,大荔', '109.941658', '34.797184', 1); +INSERT INTO `yx_system_city` VALUES (3286, 656260, 2, 655295, '610524000000', '合阳县', '陕西,渭南,合阳', '110.149466', '35.237986', 1); +INSERT INTO `yx_system_city` VALUES (3287, 656494, 2, 655295, '610525000000', '澄城县', '陕西,渭南,澄城', '109.932350', '35.190245', 1); +INSERT INTO `yx_system_city` VALUES (3288, 656682, 2, 655295, '610526000000', '蒲城县', '陕西,渭南,蒲城', '109.586506', '34.955855', 1); +INSERT INTO `yx_system_city` VALUES (3289, 656988, 2, 655295, '610527000000', '白水县', '陕西,渭南,白水', '109.590671', '35.177452', 1); +INSERT INTO `yx_system_city` VALUES (3290, 657132, 2, 655295, '610528000000', '富平县', '陕西,渭南,富平', '109.180331', '34.751086', 1); +INSERT INTO `yx_system_city` VALUES (3291, 657425, 2, 655295, '610581000000', '韩城市', '陕西,渭南,韩城', '110.442847', '35.476788', 1); +INSERT INTO `yx_system_city` VALUES (3292, 657706, 2, 655295, '610582000000', '华阴市', '陕西,渭南,华阴', '110.092301', '34.566096', 1); +INSERT INTO `yx_system_city` VALUES (3293, 657849, 2, 657848, '610601000000', '市辖区', '陕西,延安', '109.489727', '36.585455', 1); +INSERT INTO `yx_system_city` VALUES (3294, 657850, 2, 657848, '610602000000', '宝塔区', '陕西,延安,宝塔', '109.493106', '36.591266', 1); +INSERT INTO `yx_system_city` VALUES (3295, 658235, 2, 657848, '610603000000', '安塞区', '陕西,延安,安塞', '109.489727', '36.585455', 1); +INSERT INTO `yx_system_city` VALUES (3296, 658462, 2, 657848, '610621000000', '延长县', '陕西,延安,延长', '110.012334', '36.579313', 1); +INSERT INTO `yx_system_city` VALUES (3297, 658765, 2, 657848, '610622000000', '延川县', '陕西,延安,延川', '110.193514', '36.878117', 1); +INSERT INTO `yx_system_city` VALUES (3298, 658951, 2, 657848, '610623000000', '子长县', '陕西,延安,子长', '109.675234', '37.142668', 1); +INSERT INTO `yx_system_city` VALUES (3299, 659327, 2, 657848, '610625000000', '志丹县', '陕西,延安,志丹', '108.768432', '36.822194', 1); +INSERT INTO `yx_system_city` VALUES (3300, 659450, 2, 657848, '610626000000', '吴起县', '陕西,延安,吴起', '108.175933', '36.927216', 1); +INSERT INTO `yx_system_city` VALUES (3301, 659554, 2, 657848, '610627000000', '甘泉县', '陕西,延安,甘泉', '109.351020', '36.276526', 1); +INSERT INTO `yx_system_city` VALUES (3302, 659632, 2, 657848, '610628000000', '富县', '陕西,延安,富县', '109.379711', '35.988010', 1); +INSERT INTO `yx_system_city` VALUES (3303, 659777, 2, 657848, '610629000000', '洛川县', '陕西,延安,洛川', '109.432369', '35.761975', 1); +INSERT INTO `yx_system_city` VALUES (3304, 660160, 2, 657848, '610630000000', '宜川县', '陕西,延安,宜川', '110.168963', '36.050178', 1); +INSERT INTO `yx_system_city` VALUES (3305, 660375, 2, 657848, '610631000000', '黄龙县', '陕西,延安,黄龙', '109.840373', '35.584467', 1); +INSERT INTO `yx_system_city` VALUES (3306, 660433, 2, 657848, '610632000000', '黄陵县', '陕西,延安,黄陵', '109.262961', '35.579428', 1); +INSERT INTO `yx_system_city` VALUES (3307, 660644, 2, 660643, '610701000000', '市辖区', '陕西,汉中', '107.023323', '33.067480', 1); +INSERT INTO `yx_system_city` VALUES (3308, 660645, 2, 660643, '610702000000', '汉台区', '陕西,汉中,汉台', '107.031856', '33.067771', 1); +INSERT INTO `yx_system_city` VALUES (3309, 660909, 2, 660643, '610721000000', '南郑县', '陕西,汉中,南郑', '106.936230', '32.999334', 1); +INSERT INTO `yx_system_city` VALUES (3310, 661244, 2, 660643, '610722000000', '城固县', '陕西,汉中,城固', '107.333930', '33.157131', 1); +INSERT INTO `yx_system_city` VALUES (3311, 661535, 2, 660643, '610723000000', '洋县', '陕西,汉中,洋县', '107.545837', '33.222739', 1); +INSERT INTO `yx_system_city` VALUES (3312, 661839, 2, 660643, '610724000000', '西乡县', '陕西,汉中,西乡', '107.766614', '32.983101', 1); +INSERT INTO `yx_system_city` VALUES (3313, 662072, 2, 660643, '610725000000', '勉县', '陕西,汉中,勉县', '106.673221', '33.153553', 1); +INSERT INTO `yx_system_city` VALUES (3314, 662289, 2, 660643, '610726000000', '宁强县', '陕西,汉中,宁强', '106.257171', '32.829694', 1); +INSERT INTO `yx_system_city` VALUES (3315, 662521, 2, 660643, '610727000000', '略阳县', '陕西,汉中,略阳', '106.156718', '33.327281', 1); +INSERT INTO `yx_system_city` VALUES (3316, 662704, 2, 660643, '610728000000', '镇巴县', '陕西,汉中,镇巴', '107.895035', '32.536704', 1); +INSERT INTO `yx_system_city` VALUES (3317, 662908, 2, 660643, '610729000000', '留坝县', '陕西,汉中,留坝', '106.920808', '33.617571', 1); +INSERT INTO `yx_system_city` VALUES (3318, 662993, 2, 660643, '610730000000', '佛坪县', '陕西,汉中,佛坪', '107.990539', '33.524359', 1); +INSERT INTO `yx_system_city` VALUES (3319, 663047, 2, 663046, '610801000000', '市辖区', '陕西,榆林', '109.734589', '38.285390', 1); +INSERT INTO `yx_system_city` VALUES (3320, 663048, 2, 663046, '610802000000', '榆阳区', '陕西,榆林,榆阳', '109.720309', '38.277029', 1); +INSERT INTO `yx_system_city` VALUES (3321, 663445, 2, 663046, '610803000000', '横山区', '陕西,榆林,横山', '109.294346', '37.962209', 1); +INSERT INTO `yx_system_city` VALUES (3322, 663827, 2, 663046, '610821000000', '神木县', '陕西,榆林,神木', '110.498868', '38.842498', 1); +INSERT INTO `yx_system_city` VALUES (3323, 664184, 2, 663046, '610822000000', '府谷县', '陕西,榆林,府谷', '111.067366', '39.028116', 1); +INSERT INTO `yx_system_city` VALUES (3324, 664441, 2, 663046, '610824000000', '靖边县', '陕西,榆林,靖边', '108.793988', '37.599438', 1); +INSERT INTO `yx_system_city` VALUES (3325, 664686, 2, 663046, '610825000000', '定边县', '陕西,榆林,定边', '107.601267', '37.594612', 1); +INSERT INTO `yx_system_city` VALUES (3326, 665047, 2, 663046, '610826000000', '绥德县', '陕西,榆林,绥德', '110.263362', '37.502940', 1); +INSERT INTO `yx_system_city` VALUES (3327, 665732, 2, 663046, '610827000000', '米脂县', '陕西,榆林,米脂', '110.183754', '37.755417', 1); +INSERT INTO `yx_system_city` VALUES (3328, 665953, 2, 663046, '610828000000', '佳县', '陕西,榆林,佳县', '110.491345', '38.019511', 1); +INSERT INTO `yx_system_city` VALUES (3329, 666627, 2, 663046, '610829000000', '吴堡县', '陕西,榆林,吴堡', '110.739673', '37.452068', 1); +INSERT INTO `yx_system_city` VALUES (3330, 666741, 2, 663046, '610830000000', '清涧县', '陕西,榆林,清涧', '110.121209', '37.088878', 1); +INSERT INTO `yx_system_city` VALUES (3331, 667106, 2, 663046, '610831000000', '子洲县', '陕西,榆林,子洲', '110.035250', '37.610683', 1); +INSERT INTO `yx_system_city` VALUES (3332, 667682, 2, 667681, '610901000000', '市辖区', '陕西,安康', '109.029022', '32.684714', 1); +INSERT INTO `yx_system_city` VALUES (3333, 667683, 2, 667681, '610902000000', '汉滨区', '陕西,安康,汉滨', '109.026836', '32.695173', 1); +INSERT INTO `yx_system_city` VALUES (3334, 668237, 2, 667681, '610921000000', '汉阴县', '陕西,安康,汉阴', '108.508745', '32.893026', 1); +INSERT INTO `yx_system_city` VALUES (3335, 668397, 2, 667681, '610922000000', '石泉县', '陕西,安康,石泉', '108.247887', '33.038408', 1); +INSERT INTO `yx_system_city` VALUES (3336, 668570, 2, 667681, '610923000000', '宁陕县', '陕西,安康,宁陕', '108.314283', '33.310527', 1); +INSERT INTO `yx_system_city` VALUES (3337, 668662, 2, 667681, '610924000000', '紫阳县', '陕西,安康,紫阳', '108.534229', '32.520246', 1); +INSERT INTO `yx_system_city` VALUES (3338, 668877, 2, 667681, '610925000000', '岚皋县', '陕西,安康,岚皋', '108.902049', '32.307001', 1); +INSERT INTO `yx_system_city` VALUES (3339, 669026, 2, 667681, '610926000000', '平利县', '陕西,安康,平利', '109.361864', '32.388854', 1); +INSERT INTO `yx_system_city` VALUES (3340, 669181, 2, 667681, '610927000000', '镇坪县', '陕西,安康,镇坪', '109.526873', '31.883672', 1); +INSERT INTO `yx_system_city` VALUES (3341, 669251, 2, 667681, '610928000000', '旬阳县', '陕西,安康,旬阳', '109.365265', '32.834086', 1); +INSERT INTO `yx_system_city` VALUES (3342, 669578, 2, 667681, '610929000000', '白河县', '陕西,安康,白河', '110.112629', '32.809026', 1); +INSERT INTO `yx_system_city` VALUES (3343, 669708, 2, 669707, '611001000000', '市辖区', '陕西,商洛', '109.940477', '33.870422', 1); +INSERT INTO `yx_system_city` VALUES (3344, 669709, 2, 669707, '611002000000', '商州区', '陕西,商洛,商州', '109.941241', '33.862703', 1); +INSERT INTO `yx_system_city` VALUES (3345, 670030, 2, 669707, '611021000000', '洛南县', '陕西,商洛,洛南', '110.148509', '34.090838', 1); +INSERT INTO `yx_system_city` VALUES (3346, 670291, 2, 669707, '611022000000', '丹凤县', '陕西,商洛,丹凤', '110.327331', '33.695783', 1); +INSERT INTO `yx_system_city` VALUES (3347, 670459, 2, 669707, '611023000000', '商南县', '陕西,商洛,商南', '110.881807', '33.530995', 1); +INSERT INTO `yx_system_city` VALUES (3348, 670594, 2, 669707, '611024000000', '山阳县', '陕西,商洛,山阳', '109.882290', '33.532172', 1); +INSERT INTO `yx_system_city` VALUES (3349, 670852, 2, 669707, '611025000000', '镇安县', '陕西,商洛,镇安', '109.152893', '33.423357', 1); +INSERT INTO `yx_system_city` VALUES (3350, 671028, 2, 669707, '611026000000', '柞水县', '陕西,商洛,柞水', '109.114207', '33.686110', 1); +INSERT INTO `yx_system_city` VALUES (3351, 671121, 2, 671120, '620101000000', '市辖区', '甘肃,兰州', '103.834303', '36.061089', 1); +INSERT INTO `yx_system_city` VALUES (3352, 671122, 2, 671120, '620102000000', '城关区', '甘肃,兰州,城关', '103.834303', '36.061089', 1); +INSERT INTO `yx_system_city` VALUES (3353, 671324, 2, 671120, '620103000000', '七里河区', '甘肃,兰州,七里河', '103.834303', '36.061089', 1); +INSERT INTO `yx_system_city` VALUES (3354, 671477, 2, 671120, '620104000000', '西固区', '甘肃,兰州,西固', '103.834303', '36.061089', 1); +INSERT INTO `yx_system_city` VALUES (3355, 671606, 2, 671120, '620105000000', '安宁区', '甘肃,兰州,安宁', '103.834303', '36.061089', 1); +INSERT INTO `yx_system_city` VALUES (3356, 671675, 2, 671120, '620111000000', '红古区', '甘肃,兰州,红古', '103.834303', '36.061089', 1); +INSERT INTO `yx_system_city` VALUES (3357, 671740, 2, 671120, '620121000000', '永登县', '甘肃,兰州,永登', '103.834303', '36.061089', 1); +INSERT INTO `yx_system_city` VALUES (3358, 671967, 2, 671120, '620122000000', '皋兰县', '甘肃,兰州,皋兰', '103.834303', '36.061089', 1); +INSERT INTO `yx_system_city` VALUES (3359, 672034, 2, 671120, '620123000000', '榆中县', '甘肃,兰州,榆中', '103.834303', '36.061089', 1); +INSERT INTO `yx_system_city` VALUES (3360, 672331, 2, 672330, '620201000000', '市辖区', '甘肃,嘉峪关', '98.289152', '39.773130', 1); +INSERT INTO `yx_system_city` VALUES (3361, 672386, 2, 672385, '620301000000', '市辖区', '甘肃,金昌', '102.188043', '38.520089', 1); +INSERT INTO `yx_system_city` VALUES (3362, 672387, 2, 672385, '620302000000', '金川区', '甘肃,金昌,金川', '102.194089', '38.521085', 1); +INSERT INTO `yx_system_city` VALUES (3363, 672439, 2, 672385, '620321000000', '永昌县', '甘肃,金昌,永昌', '101.984649', '38.243170', 1); +INSERT INTO `yx_system_city` VALUES (3364, 672578, 2, 672577, '620401000000', '市辖区', '甘肃,白银', '104.138559', '36.544756', 1); +INSERT INTO `yx_system_city` VALUES (3365, 672579, 2, 672577, '620402000000', '白银区', '甘肃,白银,白银', '104.148556', '36.535398', 1); +INSERT INTO `yx_system_city` VALUES (3366, 672670, 2, 672577, '620403000000', '平川区', '甘肃,白银,平川', '104.825208', '36.728304', 1); +INSERT INTO `yx_system_city` VALUES (3367, 672773, 2, 672577, '620421000000', '靖远县', '甘肃,白银,靖远', '104.676774', '36.571366', 1); +INSERT INTO `yx_system_city` VALUES (3368, 672978, 2, 672577, '620422000000', '会宁县', '甘肃,白银,会宁', '105.053358', '35.692823', 1); +INSERT INTO `yx_system_city` VALUES (3369, 673307, 2, 672577, '620423000000', '景泰县', '甘肃,白银,景泰', '104.063091', '37.183804', 1); +INSERT INTO `yx_system_city` VALUES (3370, 673464, 2, 673463, '620501000000', '市辖区', '甘肃,天水', '105.724947', '34.580863', 1); +INSERT INTO `yx_system_city` VALUES (3371, 673465, 2, 673463, '620502000000', '秦州区', '甘肃,天水,秦州', '105.724199', '34.580892', 1); +INSERT INTO `yx_system_city` VALUES (3372, 673952, 2, 673463, '620503000000', '麦积区', '甘肃,天水,麦积', '105.889557', '34.570384', 1); +INSERT INTO `yx_system_city` VALUES (3373, 674399, 2, 673463, '620521000000', '清水县', '甘肃,天水,清水', '106.137293', '34.749865', 1); +INSERT INTO `yx_system_city` VALUES (3374, 674684, 2, 673463, '620522000000', '秦安县', '甘肃,天水,秦安', '105.674983', '34.858916', 1); +INSERT INTO `yx_system_city` VALUES (3375, 675138, 2, 673463, '620523000000', '甘谷县', '甘肃,天水,甘谷', '105.340864', '34.745465', 1); +INSERT INTO `yx_system_city` VALUES (3376, 675568, 2, 673463, '620524000000', '武山县', '甘肃,天水,武山', '104.890782', '34.721380', 1); +INSERT INTO `yx_system_city` VALUES (3377, 675938, 2, 673463, '620525000000', '张家川回族自治县', '甘肃,天水,张家川', '106.204518', '34.988037', 1); +INSERT INTO `yx_system_city` VALUES (3378, 676216, 2, 676215, '620601000000', '市辖区', '甘肃,武威', '102.638011', '37.928264', 1); +INSERT INTO `yx_system_city` VALUES (3379, 676217, 2, 676215, '620602000000', '凉州区', '甘肃,武威,凉州', '102.642184', '37.928225', 1); +INSERT INTO `yx_system_city` VALUES (3380, 676751, 2, 676215, '620621000000', '民勤县', '甘肃,武威,民勤', '103.093792', '38.624350', 1); +INSERT INTO `yx_system_city` VALUES (3381, 677055, 2, 676215, '620622000000', '古浪县', '甘肃,武威,古浪', '102.897533', '37.470120', 1); +INSERT INTO `yx_system_city` VALUES (3382, 677344, 2, 676215, '620623000000', '天祝藏族自治县', '甘肃,武威,天祝', '103.141757', '36.971740', 1); +INSERT INTO `yx_system_city` VALUES (3383, 677569, 2, 677568, '620701000000', '市辖区', '甘肃,张掖', '100.449818', '38.925875', 1); +INSERT INTO `yx_system_city` VALUES (3384, 677570, 2, 677568, '620702000000', '甘州区', '甘肃,张掖,甘州', '100.478058', '38.929763', 1); +INSERT INTO `yx_system_city` VALUES (3385, 677865, 2, 677568, '620721000000', '肃南裕固族自治县', '甘肃,张掖,肃南', '99.615601', '38.836932', 1); +INSERT INTO `yx_system_city` VALUES (3386, 677983, 2, 677568, '620722000000', '民乐县', '甘肃,张掖,民乐', '100.812860', '38.430794', 1); +INSERT INTO `yx_system_city` VALUES (3387, 678174, 2, 677568, '620723000000', '临泽县', '甘肃,张掖,临泽', '100.164445', '39.152642', 1); +INSERT INTO `yx_system_city` VALUES (3388, 678270, 2, 677568, '620724000000', '高台县', '甘肃,张掖,高台', '99.819317', '39.377733', 1); +INSERT INTO `yx_system_city` VALUES (3389, 678427, 2, 677568, '620725000000', '山丹县', '甘肃,张掖,山丹', '101.088575', '38.784758', 1); +INSERT INTO `yx_system_city` VALUES (3390, 678561, 2, 678560, '620801000000', '市辖区', '甘肃,平凉', '106.665240', '35.543051', 1); +INSERT INTO `yx_system_city` VALUES (3391, 678562, 2, 678560, '620802000000', '崆峒区', '甘肃,平凉,崆峒', '106.674767', '35.542491', 1); +INSERT INTO `yx_system_city` VALUES (3392, 678825, 2, 678560, '620821000000', '泾川县', '甘肃,平凉,泾川', '107.367850', '35.332666', 1); +INSERT INTO `yx_system_city` VALUES (3393, 679066, 2, 678560, '620822000000', '灵台县', '甘肃,平凉,灵台', '107.621124', '35.065399', 1); +INSERT INTO `yx_system_city` VALUES (3394, 679271, 2, 678560, '620823000000', '崇信县', '甘肃,平凉,崇信', '107.035409', '35.302123', 1); +INSERT INTO `yx_system_city` VALUES (3395, 679368, 2, 678560, '620824000000', '华亭县', '甘肃,平凉,华亭', '106.653158', '35.218292', 1); +INSERT INTO `yx_system_city` VALUES (3396, 679507, 2, 678560, '620825000000', '庄浪县', '甘肃,平凉,庄浪', '106.036687', '35.202385', 1); +INSERT INTO `yx_system_city` VALUES (3397, 679825, 2, 678560, '620826000000', '静宁县', '甘肃,平凉,静宁', '105.732556', '35.521977', 1); +INSERT INTO `yx_system_city` VALUES (3398, 680192, 2, 680191, '620901000000', '市辖区', '甘肃,酒泉', '98.494483', '39.732410', 1); +INSERT INTO `yx_system_city` VALUES (3399, 680193, 2, 680191, '620902000000', '肃州区', '甘肃,酒泉,肃州', '98.507850', '39.745071', 1); +INSERT INTO `yx_system_city` VALUES (3400, 680365, 2, 680191, '620921000000', '金塔县', '甘肃,酒泉,金塔', '98.903270', '39.983599', 1); +INSERT INTO `yx_system_city` VALUES (3401, 680478, 2, 680191, '620922000000', '瓜州县', '甘肃,酒泉,瓜州', '95.782306', '40.520545', 1); +INSERT INTO `yx_system_city` VALUES (3402, 680582, 2, 680191, '620923000000', '肃北蒙古族自治县', '甘肃,酒泉,肃北', '94.876579', '39.512450', 1); +INSERT INTO `yx_system_city` VALUES (3403, 680615, 2, 680191, '620924000000', '阿克塞哈萨克族自治县', '甘肃,酒泉,阿克塞', '94.340204', '39.633943', 1); +INSERT INTO `yx_system_city` VALUES (3404, 680634, 2, 680191, '620981000000', '玉门市', '甘肃,酒泉,玉门', '97.045679', '40.291843', 1); +INSERT INTO `yx_system_city` VALUES (3405, 680736, 2, 680191, '620982000000', '敦煌市', '甘肃,酒泉,敦煌', '94.661967', '40.142128', 1); +INSERT INTO `yx_system_city` VALUES (3406, 680816, 2, 680815, '621001000000', '市辖区', '甘肃,庆阳', '107.643631', '35.709077', 1); +INSERT INTO `yx_system_city` VALUES (3407, 680817, 2, 680815, '621002000000', '西峰区', '甘肃,庆阳,西峰', '107.651077', '35.730652', 1); +INSERT INTO `yx_system_city` VALUES (3408, 680943, 2, 680815, '621021000000', '庆城县', '甘肃,庆阳,庆城', '107.881802', '36.016299', 1); +INSERT INTO `yx_system_city` VALUES (3409, 681132, 2, 680815, '621022000000', '环县', '甘肃,庆阳,环县', '107.308501', '36.568435', 1); +INSERT INTO `yx_system_city` VALUES (3410, 681414, 2, 680815, '621023000000', '华池县', '甘肃,庆阳,华池', '107.990035', '36.461355', 1); +INSERT INTO `yx_system_city` VALUES (3411, 681559, 2, 680815, '621024000000', '合水县', '甘肃,庆阳,合水', '108.019530', '35.819243', 1); +INSERT INTO `yx_system_city` VALUES (3412, 681665, 2, 680815, '621025000000', '正宁县', '甘肃,庆阳,正宁', '108.359976', '35.491890', 1); +INSERT INTO `yx_system_city` VALUES (3413, 681784, 2, 680815, '621026000000', '宁县', '甘肃,庆阳,宁县', '107.928369', '35.502177', 1); +INSERT INTO `yx_system_city` VALUES (3414, 682081, 2, 680815, '621027000000', '镇原县', '甘肃,庆阳,镇原', '107.200832', '35.677462', 1); +INSERT INTO `yx_system_city` VALUES (3415, 682323, 2, 682322, '621101000000', '市辖区', '甘肃,定西', '104.626282', '35.580662', 1); +INSERT INTO `yx_system_city` VALUES (3416, 682324, 2, 682322, '621102000000', '安定区', '甘肃,定西,安定', '104.610668', '35.580629', 1); +INSERT INTO `yx_system_city` VALUES (3417, 682673, 2, 682322, '621121000000', '通渭县', '甘肃,定西,通渭', '105.242061', '35.210831', 1); +INSERT INTO `yx_system_city` VALUES (3418, 683034, 2, 682322, '621122000000', '陇西县', '甘肃,定西,陇西', '104.634984', '35.003940', 1); +INSERT INTO `yx_system_city` VALUES (3419, 683278, 2, 682322, '621123000000', '渭源县', '甘肃,定西,渭源', '104.215467', '35.136755', 1); +INSERT INTO `yx_system_city` VALUES (3420, 683515, 2, 682322, '621124000000', '临洮县', '甘肃,定西,临洮', '103.859565', '35.394989', 1); +INSERT INTO `yx_system_city` VALUES (3421, 683869, 2, 682322, '621125000000', '漳县', '甘肃,定西,漳县', '104.471572', '34.848444', 1); +INSERT INTO `yx_system_city` VALUES (3422, 684024, 2, 682322, '621126000000', '岷县', '甘肃,定西,岷县', '104.036880', '34.438076', 1); +INSERT INTO `yx_system_city` VALUES (3423, 684416, 2, 684415, '621201000000', '市辖区', '甘肃,陇南', '104.921841', '33.400684', 1); +INSERT INTO `yx_system_city` VALUES (3424, 684417, 2, 684415, '621202000000', '武都区', '甘肃,陇南,武都', '104.926337', '33.392211', 1); +INSERT INTO `yx_system_city` VALUES (3425, 685162, 2, 684415, '621221000000', '成县', '甘肃,陇南,成县', '105.742203', '33.750477', 1); +INSERT INTO `yx_system_city` VALUES (3426, 685439, 2, 684415, '621222000000', '文县', '甘肃,陇南,文县', '104.683434', '32.943815', 1); +INSERT INTO `yx_system_city` VALUES (3427, 685772, 2, 684415, '621223000000', '宕昌县', '甘肃,陇南,宕昌', '104.393385', '34.047261', 1); +INSERT INTO `yx_system_city` VALUES (3428, 686138, 2, 684415, '621224000000', '康县', '甘肃,陇南,康县', '105.609169', '33.329136', 1); +INSERT INTO `yx_system_city` VALUES (3429, 686518, 2, 684415, '621225000000', '西和县', '甘肃,陇南,西和', '105.298756', '34.014215', 1); +INSERT INTO `yx_system_city` VALUES (3430, 686933, 2, 684415, '621226000000', '礼县', '甘肃,陇南,礼县', '105.178640', '34.189345', 1); +INSERT INTO `yx_system_city` VALUES (3431, 687542, 2, 684415, '621227000000', '徽县', '甘肃,陇南,徽县', '106.087780', '33.768826', 1); +INSERT INTO `yx_system_city` VALUES (3432, 687781, 2, 684415, '621228000000', '两当县', '甘肃,陇南,两当', '106.304967', '33.908917', 1); +INSERT INTO `yx_system_city` VALUES (3433, 687917, 2, 687916, '622901000000', '临夏市', '甘肃,临夏,临夏', '103.243021', '35.604376', 1); +INSERT INTO `yx_system_city` VALUES (3434, 687999, 2, 687916, '622921000000', '临夏县', '甘肃,临夏,临夏', '103.243021', '35.604376', 1); +INSERT INTO `yx_system_city` VALUES (3435, 688248, 2, 687916, '622922000000', '康乐县', '甘肃,临夏,康乐', '103.708354', '35.370505', 1); +INSERT INTO `yx_system_city` VALUES (3436, 688417, 2, 687916, '622923000000', '永靖县', '甘肃,临夏,永靖', '103.285854', '35.958306', 1); +INSERT INTO `yx_system_city` VALUES (3437, 688588, 2, 687916, '622924000000', '广河县', '甘肃,临夏,广河', '103.575834', '35.488052', 1); +INSERT INTO `yx_system_city` VALUES (3438, 688701, 2, 687916, '622925000000', '和政县', '甘肃,临夏,和政', '103.350997', '35.424603', 1); +INSERT INTO `yx_system_city` VALUES (3439, 688841, 2, 687916, '622926000000', '东乡族自治县', '甘肃,临夏,东乡族自治县', '103.389346', '35.663752', 1); +INSERT INTO `yx_system_city` VALUES (3440, 689096, 2, 687916, '622927000000', '积石山保安族东乡族撒拉族自治县', '甘肃,临夏,积石山', '102.875843', '35.717661', 1); +INSERT INTO `yx_system_city` VALUES (3441, 689266, 2, 689265, '623001000000', '合作市', '甘肃,甘南,合作', '102.910882', '35.000399', 1); +INSERT INTO `yx_system_city` VALUES (3442, 689327, 2, 689265, '623021000000', '临潭县', '甘肃,甘南,临潭', '103.353919', '34.692747', 1); +INSERT INTO `yx_system_city` VALUES (3443, 689488, 2, 689265, '623022000000', '卓尼县', '甘肃,甘南,卓尼', '103.507109', '34.589588', 1); +INSERT INTO `yx_system_city` VALUES (3444, 689610, 2, 689265, '623023000000', '舟曲县', '甘肃,甘南,舟曲', '104.371586', '33.785259', 1); +INSERT INTO `yx_system_city` VALUES (3445, 689845, 2, 689265, '623024000000', '迭部县', '甘肃,甘南,迭部', '103.221870', '34.055939', 1); +INSERT INTO `yx_system_city` VALUES (3446, 689913, 2, 689265, '623025000000', '玛曲县', '甘肃,甘南,玛曲', '102.072698', '33.997712', 1); +INSERT INTO `yx_system_city` VALUES (3447, 689966, 2, 689265, '623026000000', '碌曲县', '甘肃,甘南,碌曲', '102.487327', '34.590944', 1); +INSERT INTO `yx_system_city` VALUES (3448, 690005, 2, 689265, '623027000000', '夏河县', '甘肃,甘南,夏河', '102.521807', '35.202503', 1); +INSERT INTO `yx_system_city` VALUES (3449, 690096, 2, 690095, '630101000000', '市辖区', '青海,西宁', '101.778228', '36.617144', 1); +INSERT INTO `yx_system_city` VALUES (3450, 690097, 2, 690095, '630102000000', '城东区', '青海,西宁,城东', '101.778228', '36.617144', 1); +INSERT INTO `yx_system_city` VALUES (3451, 690164, 2, 690095, '630103000000', '城中区', '青海,西宁,城中', '101.778228', '36.617144', 1); +INSERT INTO `yx_system_city` VALUES (3452, 690235, 2, 690095, '630104000000', '城西区', '青海,西宁,城西', '101.778228', '36.617144', 1); +INSERT INTO `yx_system_city` VALUES (3453, 690283, 2, 690095, '630105000000', '城北区', '青海,西宁,城北', '101.778228', '36.617144', 1); +INSERT INTO `yx_system_city` VALUES (3454, 690357, 2, 690095, '630121000000', '大通回族土族自治县', '青海,西宁,大通', '101.679987', '36.930717', 1); +INSERT INTO `yx_system_city` VALUES (3455, 690689, 2, 690095, '630122000000', '湟中县', '青海,西宁,湟中', '101.778228', '36.617144', 1); +INSERT INTO `yx_system_city` VALUES (3456, 691114, 2, 690095, '630123000000', '湟源县', '青海,西宁,湟源', '101.778228', '36.617144', 1); +INSERT INTO `yx_system_city` VALUES (3457, 691279, 2, 691278, '630202000000', '乐都区', '青海,海东,乐都', '102.401725', '36.482058', 1); +INSERT INTO `yx_system_city` VALUES (3458, 691667, 2, 691278, '630203000000', '平安区', '青海,海东,平安', '102.108835', '36.500563', 1); +INSERT INTO `yx_system_city` VALUES (3459, 691796, 2, 691278, '630222000000', '民和回族土族自治县', '青海,海东,民和', '102.830892', '36.320321', 1); +INSERT INTO `yx_system_city` VALUES (3460, 692148, 2, 691278, '630223000000', '互助土族自治县', '青海,海东,互助', '101.959271', '36.844249', 1); +INSERT INTO `yx_system_city` VALUES (3461, 692479, 2, 691278, '630224000000', '化隆回族自治县', '青海,海东,化隆', '102.264143', '36.094908', 1); +INSERT INTO `yx_system_city` VALUES (3462, 692870, 2, 691278, '630225000000', '循化撒拉族自治县', '青海,海东,循化', '102.485646', '35.848586', 1); +INSERT INTO `yx_system_city` VALUES (3463, 693041, 2, 693040, '632221000000', '门源回族自治县', '青海,海北,门源', '101.622364', '37.376449', 1); +INSERT INTO `yx_system_city` VALUES (3464, 693186, 2, 693040, '632222000000', '祁连县', '青海,海北,祁连', '100.253211', '38.177112', 1); +INSERT INTO `yx_system_city` VALUES (3465, 693243, 2, 693040, '632223000000', '海晏县', '青海,海北,海晏', '100.994430', '36.896467', 1); +INSERT INTO `yx_system_city` VALUES (3466, 693286, 2, 693040, '632224000000', '刚察县', '青海,海北,刚察', '100.145833', '37.325470', 1); +INSERT INTO `yx_system_city` VALUES (3467, 693343, 2, 693342, '632321000000', '同仁县', '青海,黄南,同仁', '102.018323', '35.516063', 1); +INSERT INTO `yx_system_city` VALUES (3468, 693437, 2, 693342, '632322000000', '尖扎县', '青海,黄南,尖扎', '102.031183', '35.938299', 1); +INSERT INTO `yx_system_city` VALUES (3469, 693541, 2, 693342, '632323000000', '泽库县', '青海,黄南,泽库', '101.466689', '35.035313', 1); +INSERT INTO `yx_system_city` VALUES (3470, 693623, 2, 693342, '632324000000', '河南蒙古族自治县', '青海,黄南,河南', '102.015248', '35.519548', 1); +INSERT INTO `yx_system_city` VALUES (3471, 693673, 2, 693672, '632521000000', '共和县', '青海,海南,共和', '100.620031', '36.284107', 1); +INSERT INTO `yx_system_city` VALUES (3472, 693808, 2, 693672, '632522000000', '同德县', '青海,海南,同德', '100.578052', '35.254791', 1); +INSERT INTO `yx_system_city` VALUES (3473, 693906, 2, 693672, '632523000000', '贵德县', '青海,海南,贵德', '101.433298', '36.040150', 1); +INSERT INTO `yx_system_city` VALUES (3474, 694046, 2, 693672, '632524000000', '兴海县', '青海,海南,兴海', '99.987966', '35.588613', 1); +INSERT INTO `yx_system_city` VALUES (3475, 694121, 2, 693672, '632525000000', '贵南县', '青海,海南,贵南', '100.747503', '35.586715', 1); +INSERT INTO `yx_system_city` VALUES (3476, 694221, 2, 694220, '632621000000', '玛沁县', '青海,果洛,玛沁', '100.238888', '34.477433', 1); +INSERT INTO `yx_system_city` VALUES (3477, 694272, 2, 694220, '632622000000', '班玛县', '青海,果洛,班玛', '100.737138', '32.932723', 1); +INSERT INTO `yx_system_city` VALUES (3478, 694315, 2, 694220, '632623000000', '甘德县', '青海,果洛,甘德', '99.900905', '33.969219', 1); +INSERT INTO `yx_system_city` VALUES (3479, 694361, 2, 694220, '632624000000', '达日县', '青海,果洛,达日', '99.651392', '33.748921', 1); +INSERT INTO `yx_system_city` VALUES (3480, 694407, 2, 694220, '632625000000', '久治县', '青海,果洛,久治', '101.482831', '33.429471', 1); +INSERT INTO `yx_system_city` VALUES (3481, 694440, 2, 694220, '632626000000', '玛多县', '青海,果洛,玛多', '98.209206', '34.915946', 1); +INSERT INTO `yx_system_city` VALUES (3482, 694479, 2, 694478, '632701000000', '玉树市', '青海,玉树,玉树', '97.008785', '32.993107', 1); +INSERT INTO `yx_system_city` VALUES (3483, 694572, 2, 694478, '632722000000', '杂多县', '青海,玉树,杂多', '95.300723', '32.893185', 1); +INSERT INTO `yx_system_city` VALUES (3484, 694622, 2, 694478, '632723000000', '称多县', '青海,玉树,称多', '97.110832', '33.369218', 1); +INSERT INTO `yx_system_city` VALUES (3485, 694695, 2, 694478, '632724000000', '治多县', '青海,玉树,治多', '95.613080', '33.852751', 1); +INSERT INTO `yx_system_city` VALUES (3486, 694728, 2, 694478, '632725000000', '囊谦县', '青海,玉树,囊谦', '96.480650', '32.203246', 1); +INSERT INTO `yx_system_city` VALUES (3487, 694816, 2, 694478, '632726000000', '曲麻莱县', '青海,玉树,曲麻莱', '95.797367', '34.126429', 1); +INSERT INTO `yx_system_city` VALUES (3488, 694847, 2, 694846, '632801000000', '格尔木市', '青海,海西,格尔木', '94.928484', '36.406404', 1); +INSERT INTO `yx_system_city` VALUES (3489, 694932, 2, 694846, '632802000000', '德令哈市', '青海,海西,德令哈', '97.360985', '37.369436', 1); +INSERT INTO `yx_system_city` VALUES (3490, 695009, 2, 694846, '632821000000', '乌兰县', '青海,海西,乌兰', '98.480195', '36.929749', 1); +INSERT INTO `yx_system_city` VALUES (3491, 695060, 2, 694846, '632822000000', '都兰县', '青海,海西,都兰', '98.095844', '36.302496', 1); +INSERT INTO `yx_system_city` VALUES (3492, 695184, 2, 694846, '632823000000', '天峻县', '青海,海西,天峻', '99.022984', '37.300851', 1); +INSERT INTO `yx_system_city` VALUES (3493, 695261, 2, 695260, '640101000000', '市辖区', '宁夏,银川', '106.230909', '38.487193', 1); +INSERT INTO `yx_system_city` VALUES (3494, 695262, 2, 695260, '640104000000', '兴庆区', '宁夏,银川,兴庆', '106.230909', '38.487193', 1); +INSERT INTO `yx_system_city` VALUES (3495, 695412, 2, 695260, '640105000000', '西夏区', '宁夏,银川,西夏', '106.230909', '38.487193', 1); +INSERT INTO `yx_system_city` VALUES (3496, 695500, 2, 695260, '640106000000', '金凤区', '宁夏,银川,金凤', '106.230909', '38.487193', 1); +INSERT INTO `yx_system_city` VALUES (3497, 695575, 2, 695260, '640121000000', '永宁县', '宁夏,银川,永宁', '106.230909', '38.487193', 1); +INSERT INTO `yx_system_city` VALUES (3498, 695675, 2, 695260, '640122000000', '贺兰县', '宁夏,银川,贺兰', '106.230909', '38.487193', 1); +INSERT INTO `yx_system_city` VALUES (3499, 695767, 2, 695260, '640181000000', '灵武市', '宁夏,银川,灵武', '106.230909', '38.487193', 1); +INSERT INTO `yx_system_city` VALUES (3500, 695884, 2, 695883, '640201000000', '市辖区', '宁夏,石嘴山', '106.383303', '38.983236', 1); +INSERT INTO `yx_system_city` VALUES (3501, 695885, 2, 695883, '640202000000', '大武口区', '宁夏,石嘴山,大武口', '106.367861', '39.019060', 1); +INSERT INTO `yx_system_city` VALUES (3502, 695959, 2, 695883, '640205000000', '惠农区', '宁夏,石嘴山,惠农', '106.781176', '39.239302', 1); +INSERT INTO `yx_system_city` VALUES (3503, 696058, 2, 695883, '640221000000', '平罗县', '宁夏,石嘴山,平罗', '106.523474', '38.913544', 1); +INSERT INTO `yx_system_city` VALUES (3504, 696253, 2, 696252, '640301000000', '市辖区', '宁夏,吴忠', '106.198393', '37.997460', 1); +INSERT INTO `yx_system_city` VALUES (3505, 696254, 2, 696252, '640302000000', '利通区', '宁夏,吴忠,利通', '106.212566', '37.983458', 1); +INSERT INTO `yx_system_city` VALUES (3506, 696427, 2, 696252, '640303000000', '红寺堡区', '宁夏,吴忠,红寺堡', '106.062114', '37.425702', 1); +INSERT INTO `yx_system_city` VALUES (3507, 696505, 2, 696252, '640323000000', '盐池县', '宁夏,吴忠,盐池', '107.407359', '37.783205', 1); +INSERT INTO `yx_system_city` VALUES (3508, 696633, 2, 696252, '640324000000', '同心县', '宁夏,吴忠,同心', '105.914458', '36.980575', 1); +INSERT INTO `yx_system_city` VALUES (3509, 696803, 2, 696252, '640381000000', '青铜峡市', '宁夏,吴忠,青铜峡', '106.078818', '38.021302', 1); +INSERT INTO `yx_system_city` VALUES (3510, 696929, 2, 696928, '640401000000', '市辖区', '宁夏,固原', '106.242610', '36.015855', 1); +INSERT INTO `yx_system_city` VALUES (3511, 696930, 2, 696928, '640402000000', '原州区', '宁夏,固原,原州', '106.287782', '36.003740', 1); +INSERT INTO `yx_system_city` VALUES (3512, 697133, 2, 696928, '640422000000', '西吉县', '宁夏,固原,西吉', '105.729085', '35.963913', 1); +INSERT INTO `yx_system_city` VALUES (3513, 697457, 2, 696928, '640423000000', '隆德县', '宁夏,固原,隆德', '106.111595', '35.625915', 1); +INSERT INTO `yx_system_city` VALUES (3514, 697594, 2, 696928, '640424000000', '泾源县', '宁夏,固原,泾源', '106.330646', '35.498160', 1); +INSERT INTO `yx_system_city` VALUES (3515, 697714, 2, 696928, '640425000000', '彭阳县', '宁夏,固原,彭阳', '106.638340', '35.849565', 1); +INSERT INTO `yx_system_city` VALUES (3516, 697888, 2, 697887, '640501000000', '市辖区', '宁夏,中卫', '105.196902', '37.499972', 1); +INSERT INTO `yx_system_city` VALUES (3517, 697889, 2, 697887, '640502000000', '沙坡头区', '宁夏,中卫,沙坡头', '105.190536', '37.514564', 1); +INSERT INTO `yx_system_city` VALUES (3518, 698087, 2, 697887, '640521000000', '中宁县', '宁夏,中卫,中宁', '105.685285', '37.491505', 1); +INSERT INTO `yx_system_city` VALUES (3519, 698240, 2, 697887, '640522000000', '海原县', '宁夏,中卫,海原', '105.643487', '36.565033', 1); +INSERT INTO `yx_system_city` VALUES (3520, 698442, 2, 698441, '650101000000', '市辖区', '新疆,乌鲁木齐', '87.616848', '43.825592', 1); +INSERT INTO `yx_system_city` VALUES (3521, 698443, 2, 698441, '650102000000', '天山区', '新疆,乌鲁木齐,天山', '87.616848', '43.825592', 1); +INSERT INTO `yx_system_city` VALUES (3522, 698654, 2, 698441, '650103000000', '沙依巴克区', '新疆,乌鲁木齐,沙依巴克', '87.616848', '43.825592', 1); +INSERT INTO `yx_system_city` VALUES (3523, 698884, 2, 698441, '650104000000', '新市区', '新疆,乌鲁木齐,新市区', '87.616848', '43.825592', 1); +INSERT INTO `yx_system_city` VALUES (3524, 699054, 2, 698441, '650105000000', '水磨沟区', '新疆,乌鲁木齐,水磨沟', '87.616848', '43.825592', 1); +INSERT INTO `yx_system_city` VALUES (3525, 699229, 2, 698441, '650106000000', '头屯河区', '新疆,乌鲁木齐,头屯河', '87.616848', '43.825592', 1); +INSERT INTO `yx_system_city` VALUES (3526, 699313, 2, 698441, '650107000000', '达坂城区', '新疆,乌鲁木齐,达坂城', '87.616848', '43.825592', 1); +INSERT INTO `yx_system_city` VALUES (3527, 699363, 2, 698441, '650109000000', '米东区', '新疆,乌鲁木齐,米东', '87.616848', '43.825592', 1); +INSERT INTO `yx_system_city` VALUES (3528, 699535, 2, 698441, '650121000000', '乌鲁木齐县', '新疆,乌鲁木齐,乌鲁木齐', '87.616848', '43.825592', 1); +INSERT INTO `yx_system_city` VALUES (3529, 699584, 2, 699583, '650201000000', '市辖区', '新疆,克拉玛依', '84.889207', '45.579888', 1); +INSERT INTO `yx_system_city` VALUES (3530, 699585, 2, 699583, '650202000000', '独山子区', '新疆,克拉玛依,独山子', '84.886974', '44.328096', 1); +INSERT INTO `yx_system_city` VALUES (3531, 699606, 2, 699583, '650203000000', '克拉玛依区', '新疆,克拉玛依,克拉玛依', '84.867844', '45.602526', 1); +INSERT INTO `yx_system_city` VALUES (3532, 699730, 2, 699583, '650204000000', '白碱滩区', '新疆,克拉玛依,白碱滩', '85.131696', '45.687855', 1); +INSERT INTO `yx_system_city` VALUES (3533, 699752, 2, 699583, '650205000000', '乌尔禾区', '新疆,克拉玛依,乌尔禾', '85.693742', '46.089148', 1); +INSERT INTO `yx_system_city` VALUES (3534, 699774, 2, 699773, '650402000000', '高昌区', '新疆,吐鲁番,高昌', '89.182342', '42.947635', 1); +INSERT INTO `yx_system_city` VALUES (3535, 699884, 2, 699773, '650421000000', '鄯善县', '新疆,吐鲁番,鄯善', '90.213330', '42.868744', 1); +INSERT INTO `yx_system_city` VALUES (3536, 700000, 2, 699773, '650422000000', '托克逊县', '新疆,吐鲁番,托克逊', '88.653814', '42.792521', 1); +INSERT INTO `yx_system_city` VALUES (3537, 700071, 2, 700070, '650502000000', '伊州区', '新疆,哈密,伊州', '93.514916', '42.818501', 1); +INSERT INTO `yx_system_city` VALUES (3538, 700350, 2, 700070, '650521000000', '巴里坤哈萨克自治县', '新疆,哈密,巴里坤', '93.016625', '43.598763', 1); +INSERT INTO `yx_system_city` VALUES (3539, 700438, 2, 700070, '650522000000', '伊吾县', '新疆,哈密,伊吾', '94.697074', '43.254978', 1); +INSERT INTO `yx_system_city` VALUES (3540, 700490, 2, 700489, '652301000000', '昌吉市', '新疆,昌吉,昌吉', '87.304112', '44.013183', 1); +INSERT INTO `yx_system_city` VALUES (3541, 700685, 2, 700489, '652302000000', '阜康市', '新疆,昌吉,阜康', '87.946894', '44.168576', 1); +INSERT INTO `yx_system_city` VALUES (3542, 700805, 2, 700489, '652323000000', '呼图壁县', '新疆,昌吉,呼图壁', '86.898902', '44.191428', 1); +INSERT INTO `yx_system_city` VALUES (3543, 700956, 2, 700489, '652324000000', '玛纳斯县', '新疆,昌吉,玛纳斯', '86.213997', '44.303893', 1); +INSERT INTO `yx_system_city` VALUES (3544, 701230, 2, 700489, '652325000000', '奇台县', '新疆,昌吉,奇台', '89.593967', '44.022066', 1); +INSERT INTO `yx_system_city` VALUES (3545, 701375, 2, 700489, '652327000000', '吉木萨尔县', '新疆,昌吉,吉木萨尔', '89.180437', '44.000497', 1); +INSERT INTO `yx_system_city` VALUES (3546, 701474, 2, 700489, '652328000000', '木垒哈萨克自治县', '新疆,昌吉,木垒', '90.286028', '43.834689', 1); +INSERT INTO `yx_system_city` VALUES (3547, 701560, 2, 701559, '652701000000', '博乐市', '新疆,博尔塔拉,博乐', '82.051005', '44.853870', 1); +INSERT INTO `yx_system_city` VALUES (3548, 701834, 2, 701559, '652702000000', '阿拉山口市', '新疆,博尔塔拉,阿拉山口', '82.559396', '45.172228', 1); +INSERT INTO `yx_system_city` VALUES (3549, 701839, 2, 701559, '652722000000', '精河县', '新疆,博尔塔拉,精河', '82.894195', '44.600408', 1); +INSERT INTO `yx_system_city` VALUES (3550, 701978, 2, 701559, '652723000000', '温泉县', '新疆,博尔塔拉,温泉', '81.024816', '44.968857', 1); +INSERT INTO `yx_system_city` VALUES (3551, 702105, 2, 702104, '652801000000', '库尔勒市', '新疆,巴音郭楞,库尔勒', '86.174633', '41.725892', 1); +INSERT INTO `yx_system_city` VALUES (3552, 702357, 2, 702104, '652822000000', '轮台县', '新疆,巴音郭楞,轮台', '84.252156', '41.777702', 1); +INSERT INTO `yx_system_city` VALUES (3553, 702447, 2, 702104, '652823000000', '尉犁县', '新疆,巴音郭楞,尉犁', '86.261321', '41.343933', 1); +INSERT INTO `yx_system_city` VALUES (3554, 702573, 2, 702104, '652824000000', '若羌县', '新疆,巴音郭楞,若羌', '88.167152', '39.023242', 1); +INSERT INTO `yx_system_city` VALUES (3555, 702634, 2, 702104, '652825000000', '且末县', '新疆,巴音郭楞,且末', '85.528865', '38.147895', 1); +INSERT INTO `yx_system_city` VALUES (3556, 702727, 2, 702104, '652826000000', '焉耆回族自治县', '新疆,巴音郭楞,焉耆', '86.574067', '42.059759', 1); +INSERT INTO `yx_system_city` VALUES (3557, 702821, 2, 702104, '652827000000', '和静县', '新疆,巴音郭楞,和静', '86.384065', '42.323625', 1); +INSERT INTO `yx_system_city` VALUES (3558, 702995, 2, 702104, '652828000000', '和硕县', '新疆,巴音郭楞,和硕', '86.863963', '42.268371', 1); +INSERT INTO `yx_system_city` VALUES (3559, 703063, 2, 702104, '652829000000', '博湖县', '新疆,巴音郭楞,博湖', '86.631998', '41.980152', 1); +INSERT INTO `yx_system_city` VALUES (3560, 703120, 2, 703119, '652901000000', '阿克苏市', '新疆,阿克苏,阿克苏', '80.260605', '41.168779', 1); +INSERT INTO `yx_system_city` VALUES (3561, 703353, 2, 703119, '652922000000', '温宿县', '新疆,阿克苏,温宿', '80.238959', '41.276688', 1); +INSERT INTO `yx_system_city` VALUES (3562, 703576, 2, 703119, '652923000000', '库车县', '新疆,阿克苏,库车', '82.962016', '41.717906', 1); +INSERT INTO `yx_system_city` VALUES (3563, 703858, 2, 703119, '652924000000', '沙雅县', '新疆,阿克苏,沙雅', '82.781819', '41.221667', 1); +INSERT INTO `yx_system_city` VALUES (3564, 704059, 2, 703119, '652925000000', '新和县', '新疆,阿克苏,新和', '82.609220', '41.548118', 1); +INSERT INTO `yx_system_city` VALUES (3565, 704209, 2, 703119, '652926000000', '拜城县', '新疆,阿克苏,拜城', '81.874156', '41.796910', 1); +INSERT INTO `yx_system_city` VALUES (3566, 704413, 2, 703119, '652927000000', '乌什县', '新疆,阿克苏,乌什', '79.224445', '41.214652', 1); +INSERT INTO `yx_system_city` VALUES (3567, 704556, 2, 703119, '652928000000', '阿瓦提县', '新疆,阿克苏,阿瓦提', '80.373137', '40.644529', 1); +INSERT INTO `yx_system_city` VALUES (3568, 704733, 2, 703119, '652929000000', '柯坪县', '新疆,阿克苏,柯坪', '79.047291', '40.508340', 1); +INSERT INTO `yx_system_city` VALUES (3569, 704780, 2, 704779, '653001000000', '阿图什市', '新疆,克孜勒苏,阿图什', '76.168400', '39.716160', 1); +INSERT INTO `yx_system_city` VALUES (3570, 704893, 2, 704779, '653022000000', '阿克陶县', '新疆,克孜勒苏,阿克陶', '75.962509', '37.993697', 1); +INSERT INTO `yx_system_city` VALUES (3571, 705047, 2, 704779, '653023000000', '阿合奇县', '新疆,克孜勒苏,阿合奇', '78.446253', '40.936936', 1); +INSERT INTO `yx_system_city` VALUES (3572, 705084, 2, 704779, '653024000000', '乌恰县', '新疆,克孜勒苏,乌恰', '76.167819', '39.714526', 1); +INSERT INTO `yx_system_city` VALUES (3573, 705146, 2, 705145, '653101000000', '喀什市', '新疆,喀什,喀什', '75.989755', '39.470400', 1); +INSERT INTO `yx_system_city` VALUES (3574, 705344, 2, 705145, '653121000000', '疏附县', '新疆,喀什,疏附', '75.862814', '39.375044', 1); +INSERT INTO `yx_system_city` VALUES (3575, 705496, 2, 705145, '653122000000', '疏勒县', '新疆,喀什,疏勒', '76.048139', '39.401385', 1); +INSERT INTO `yx_system_city` VALUES (3576, 705764, 2, 705145, '653123000000', '英吉沙县', '新疆,喀什,英吉沙', '76.175729', '38.930382', 1); +INSERT INTO `yx_system_city` VALUES (3577, 705961, 2, 705145, '653124000000', '泽普县', '新疆,喀什,泽普', '77.260103', '38.184955', 1); +INSERT INTO `yx_system_city` VALUES (3578, 706133, 2, 705145, '653125000000', '莎车县', '新疆,喀什,莎车', '77.245761', '38.414217', 1); +INSERT INTO `yx_system_city` VALUES (3579, 706753, 2, 705145, '653126000000', '叶城县', '新疆,喀什,叶城', '77.413836', '37.882989', 1); +INSERT INTO `yx_system_city` VALUES (3580, 707143, 2, 705145, '653127000000', '麦盖提县', '新疆,喀什,麦盖提', '77.610105', '38.898666', 1); +INSERT INTO `yx_system_city` VALUES (3581, 707342, 2, 705145, '653128000000', '岳普湖县', '新疆,喀什,岳普湖', '76.773163', '39.224200', 1); +INSERT INTO `yx_system_city` VALUES (3582, 707464, 2, 705145, '653129000000', '伽师县', '新疆,喀什,伽师', '76.723720', '39.488182', 1); +INSERT INTO `yx_system_city` VALUES (3583, 707806, 2, 705145, '653130000000', '巴楚县', '新疆,喀什,巴楚', '78.549297', '39.785155', 1); +INSERT INTO `yx_system_city` VALUES (3584, 708055, 2, 705145, '653131000000', '塔什库尔干塔吉克自治县', '新疆,喀什,塔什库尔干', '75.989755', '39.470400', 1); +INSERT INTO `yx_system_city` VALUES (3585, 708118, 2, 708117, '653201000000', '和田市', '新疆,和田,和田', '79.913534', '37.112149', 1); +INSERT INTO `yx_system_city` VALUES (3586, 708305, 2, 708117, '653221000000', '和田县', '新疆,和田,和田', '79.913534', '37.112149', 1); +INSERT INTO `yx_system_city` VALUES (3587, 708528, 2, 708117, '653222000000', '墨玉县', '新疆,和田,墨玉', '79.728841', '37.277340', 1); +INSERT INTO `yx_system_city` VALUES (3588, 708940, 2, 708117, '653223000000', '皮山县', '新疆,和田,皮山', '78.283669', '37.621450', 1); +INSERT INTO `yx_system_city` VALUES (3589, 709155, 2, 708117, '653224000000', '洛浦县', '新疆,和田,洛浦', '80.188986', '37.073667', 1); +INSERT INTO `yx_system_city` VALUES (3590, 709393, 2, 708117, '653225000000', '策勒县', '新疆,和田,策勒', '80.806159', '36.998335', 1); +INSERT INTO `yx_system_city` VALUES (3591, 709538, 2, 708117, '653226000000', '于田县', '新疆,和田,于田', '81.677418', '36.857081', 1); +INSERT INTO `yx_system_city` VALUES (3592, 709746, 2, 708117, '653227000000', '民丰县', '新疆,和田,民丰', '82.695862', '37.064080', 1); +INSERT INTO `yx_system_city` VALUES (3593, 709793, 2, 709792, '654002000000', '伊宁市', '新疆,伊犁,伊宁', '81.277950', '43.908558', 1); +INSERT INTO `yx_system_city` VALUES (3594, 709978, 2, 709792, '654003000000', '奎屯市', '新疆,伊犁,奎屯', '84.903267', '44.426529', 1); +INSERT INTO `yx_system_city` VALUES (3595, 710057, 2, 709792, '654004000000', '霍尔果斯市', '新疆,伊犁,霍尔果斯', '80.420759', '44.201669', 1); +INSERT INTO `yx_system_city` VALUES (3596, 710090, 2, 709792, '654021000000', '伊宁县', '新疆,伊犁,伊宁', '81.277950', '43.908558', 1); +INSERT INTO `yx_system_city` VALUES (3597, 710275, 2, 709792, '654022000000', '察布查尔锡伯自治县', '新疆,伊犁,察布查尔', '81.151337', '43.840726', 1); +INSERT INTO `yx_system_city` VALUES (3598, 710410, 2, 709792, '654023000000', '霍城县', '新疆,伊犁,霍城', '80.874181', '44.053592', 1); +INSERT INTO `yx_system_city` VALUES (3599, 710612, 2, 709792, '654024000000', '巩留县', '新疆,伊犁,巩留', '82.231718', '43.482628', 1); +INSERT INTO `yx_system_city` VALUES (3600, 710730, 2, 709792, '654025000000', '新源县', '新疆,伊犁,新源', '83.260770', '43.429930', 1); +INSERT INTO `yx_system_city` VALUES (3601, 710868, 2, 709792, '654026000000', '昭苏县', '新疆,伊犁,昭苏', '81.130975', '43.157293', 1); +INSERT INTO `yx_system_city` VALUES (3602, 711013, 2, 709792, '654027000000', '特克斯县', '新疆,伊犁,特克斯', '81.836206', '43.217184', 1); +INSERT INTO `yx_system_city` VALUES (3603, 711105, 2, 709792, '654028000000', '尼勒克县', '新疆,伊犁,尼勒克', '82.511810', '43.800247', 1); +INSERT INTO `yx_system_city` VALUES (3604, 711219, 2, 711218, '654201000000', '塔城市', '新疆,塔城,塔城', '82.978928', '46.748523', 1); +INSERT INTO `yx_system_city` VALUES (3605, 711436, 2, 711218, '654202000000', '乌苏市', '新疆,塔城,乌苏', '84.713736', '44.418887', 1); +INSERT INTO `yx_system_city` VALUES (3606, 711820, 2, 711218, '654221000000', '额敏县', '新疆,塔城,额敏', '83.628303', '46.524673', 1); +INSERT INTO `yx_system_city` VALUES (3607, 712103, 2, 711218, '654223000000', '沙湾县', '新疆,塔城,沙湾', '85.619416', '44.326388', 1); +INSERT INTO `yx_system_city` VALUES (3608, 712601, 2, 711218, '654224000000', '托里县', '新疆,塔城,托里', '83.606951', '45.947638', 1); +INSERT INTO `yx_system_city` VALUES (3609, 712700, 2, 711218, '654225000000', '裕民县', '新疆,塔城,裕民', '82.982668', '46.201104', 1); +INSERT INTO `yx_system_city` VALUES (3610, 712777, 2, 711218, '654226000000', '和布克赛尔蒙古自治县', '新疆,塔城,和布克赛尔', '85.738335', '46.798895', 1); +INSERT INTO `yx_system_city` VALUES (3611, 712894, 2, 712893, '654301000000', '阿勒泰市', '新疆,阿勒泰,阿勒泰', '88.131842', '47.827309', 1); +INSERT INTO `yx_system_city` VALUES (3612, 713072, 2, 712893, '654321000000', '布尔津县', '新疆,阿勒泰,布尔津', '86.874897', '47.701850', 1); +INSERT INTO `yx_system_city` VALUES (3613, 713161, 2, 712893, '654322000000', '富蕴县', '新疆,阿勒泰,富蕴', '89.525504', '46.994115', 1); +INSERT INTO `yx_system_city` VALUES (3614, 713261, 2, 712893, '654323000000', '福海县', '新疆,阿勒泰,福海', '87.486703', '47.111919', 1); +INSERT INTO `yx_system_city` VALUES (3615, 713426, 2, 712893, '654324000000', '哈巴河县', '新疆,阿勒泰,哈巴河', '86.418621', '48.060846', 1); +INSERT INTO `yx_system_city` VALUES (3616, 713568, 2, 712893, '654325000000', '青河县', '新疆,阿勒泰,青河', '90.382961', '46.674205', 1); +INSERT INTO `yx_system_city` VALUES (3617, 713635, 2, 712893, '654326000000', '吉木乃县', '新疆,阿勒泰,吉木乃', '85.874096', '47.443101', 1); +INSERT INTO `yx_system_city` VALUES (3618, 713698, 2, 713697, '659001000000', '石河子市', '新疆,石河子', '86.080460', '44.305428', 1); +INSERT INTO `yx_system_city` VALUES (3619, 713842, 2, 713697, '659002000000', '阿拉尔市', '新疆,阿拉尔', '81.280525', '40.547653', 1); +INSERT INTO `yx_system_city` VALUES (3620, 714172, 2, 713697, '659003000000', '图木舒克市', '新疆,图木舒克', '79.074089', '39.868969', 1); +INSERT INTO `yx_system_city` VALUES (3621, 714310, 2, 713697, '659004000000', '五家渠市', '新疆,五家渠', '87.543243', '44.166756', 1); +INSERT INTO `yx_system_city` VALUES (3622, 714363, 2, 713697, '659006000000', '铁门关市', '新疆,铁门关', '85.669533', '41.863300', 1); +INSERT INTO `yx_system_city` VALUES (3648, 714403, 2, 714402, '0', '芳苑乡', '台湾,彰化,芳苑', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3649, 714632, 2, 714402, '0', '芬园乡', '台湾,彰化,芬园', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3650, 714701, 2, 714402, '0', '福兴乡', '台湾,彰化,福兴', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3651, 714777, 2, 714402, '0', '和美镇', '台湾,彰化,和美', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3652, 715055, 2, 714402, '0', '花坛乡', '台湾,彰化,花坛', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3653, 715172, 2, 714402, '0', '鹿港镇', '台湾,彰化,鹿港', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3654, 715490, 2, 714402, '0', '埤头乡', '台湾,彰化,埤头', '120.464542', '23.890392', 1); +INSERT INTO `yx_system_city` VALUES (3655, 715602, 2, 714402, '0', '埔心乡', '台湾,彰化,埔心', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3656, 715745, 2, 714402, '0', '埔盐乡', '台湾,彰化,埔盐', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3657, 715795, 2, 714402, '0', '伸港乡', '台湾,彰化,伸港', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3658, 715960, 2, 714402, '0', '社头乡', '台湾,彰化,社头', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3659, 716105, 2, 714402, '0', '田尾乡', '台湾,彰化,田尾', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3660, 716202, 2, 714402, '0', '田中镇', '台湾,彰化,田中', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3661, 716341, 2, 714402, '0', '线西乡', '台湾,彰化,线西', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3662, 716421, 2, 714402, '0', '溪湖镇', '台湾,彰化,溪湖', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3663, 716750, 2, 714402, '0', '秀水乡', '台湾,彰化,秀水', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3664, 716874, 2, 714402, '0', '溪州乡', '台湾,彰化,溪州', '120.492906', '23.853578', 1); +INSERT INTO `yx_system_city` VALUES (3665, 717107, 2, 714402, '0', '永靖乡', '台湾,彰化,永靖', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3666, 717238, 2, 714402, '0', '员林市', '台湾,彰化,员林市', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3667, 717447, 2, 714402, '0', '竹塘乡', '台湾,彰化,竹塘', '120.416000', '24.000000', 1); +INSERT INTO `yx_system_city` VALUES (3668, 717532, 2, 717531, '0', '八里区', '台湾,新北,八里区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3669, 717645, 2, 717531, '0', '板桥区', '台湾,新北,板桥区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3670, 717902, 2, 717531, '0', '贡寮区', '台湾,新北,贡寮区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3671, 717955, 2, 717531, '0', '金山区', '台湾,新北,金山区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3672, 718036, 2, 717531, '0', '林口区', '台湾,新北,林口区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3673, 718195, 2, 717531, '0', '芦洲区', '台湾,新北,芦洲区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3674, 718266, 2, 717531, '0', '坪林区', '台湾,新北,坪林区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3675, 718327, 2, 717531, '0', '平溪区', '台湾,新北,平溪区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3676, 718375, 2, 717531, '0', '瑞芳区', '台湾,新北,瑞芳区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3677, 718490, 2, 717531, '0', '三重区', '台湾,新北,三重区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3678, 718786, 2, 717531, '0', '三峡区', '台湾,新北,三峡区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3679, 718879, 2, 717531, '0', '三芝区', '台湾,新北,三芝区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3680, 718980, 2, 717531, '0', '深坑区', '台湾,新北,深坑区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3681, 719023, 2, 717531, '0', '石碇区', '台湾,新北,石碇区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3682, 719115, 2, 717531, '0', '石门区', '台湾,新北,石门区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3683, 719155, 2, 717531, '0', '双溪区', '台湾,新北,双溪区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3684, 719243, 2, 717531, '0', '树林区', '台湾,新北,树林区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3685, 719382, 2, 717531, '0', '泰山区', '台湾,新北,泰山区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3686, 719498, 2, 717531, '0', '淡水区', '台湾,新北,淡水区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3687, 719731, 2, 717531, '0', '土城区', '台湾,新北,土城区', '121.465746', '25.012366', 1); +INSERT INTO `yx_system_city` VALUES (3688, 719869, 2, 719868, '0', '白沙乡', '台湾,澎湖,白沙', '119.566417', '23.569733', 1); +INSERT INTO `yx_system_city` VALUES (3689, 719890, 2, 719868, '0', '湖西乡', '台湾,澎湖,湖西', '119.566417', '23.569733', 1); +INSERT INTO `yx_system_city` VALUES (3690, 719916, 2, 719868, '0', '马公市', '台湾,澎湖,马公市', '119.566417', '23.569733', 1); +INSERT INTO `yx_system_city` VALUES (3691, 720065, 2, 719868, '0', '七美乡', '台湾,澎湖,七美', '119.566417', '23.569733', 1); +INSERT INTO `yx_system_city` VALUES (3692, 720090, 2, 719868, '0', '望安乡', '台湾,澎湖,望安', '119.566417', '23.569733', 1); +INSERT INTO `yx_system_city` VALUES (3693, 720102, 2, 719868, '0', '西屿乡', '台湾,澎湖,西屿', '119.566417', '23.569733', 1); +INSERT INTO `yx_system_city` VALUES (3694, 720119, 2, 720118, '0', '三地门乡', '台湾,屏东,三地门', '120.487928', '22.682802', 1); +INSERT INTO `yx_system_city` VALUES (3695, 720142, 2, 720118, '0', '狮子乡', '台湾,屏东,狮子', '120.487928', '22.682802', 1); +INSERT INTO `yx_system_city` VALUES (3696, 720163, 2, 720118, '0', '泰武乡', '台湾,屏东,泰武', '120.626012', '22.591307', 1); +INSERT INTO `yx_system_city` VALUES (3697, 720186, 2, 720118, '0', '万丹乡', '台湾,屏东,万丹', '120.486423', '22.588123', 1); +INSERT INTO `yx_system_city` VALUES (3698, 720415, 2, 720118, '0', '万峦乡', '台湾,屏东,万峦', '120.566478', '22.571966', 1); +INSERT INTO `yx_system_city` VALUES (3699, 720480, 2, 720118, '0', '雾臺乡', '台湾,屏东,雾臺', '120.727653', '22.743675', 1); +INSERT INTO `yx_system_city` VALUES (3700, 720502, 2, 720118, '0', '新埤乡', '台湾,屏东,新埤', '120.545190', '22.465998', 1); +INSERT INTO `yx_system_city` VALUES (3701, 720553, 2, 720118, '0', '新园乡', '台湾,屏东,新园', '120.459758', '22.544147', 1); +INSERT INTO `yx_system_city` VALUES (3702, 720649, 2, 720118, '0', '盐埔乡', '台湾,屏东,盐埔', '120.487928', '22.682802', 1); +INSERT INTO `yx_system_city` VALUES (3703, 720748, 2, 720118, '0', '竹田乡', '台湾,屏东,竹田', '120.487928', '22.682802', 1); +INSERT INTO `yx_system_city` VALUES (3704, 720835, 2, 720118, '0', '长治乡', '台湾,屏东,长治', '120.487928', '22.682802', 1); +INSERT INTO `yx_system_city` VALUES (3705, 720975, 2, 720118, '0', '潮州镇', '台湾,屏东,潮州', '120.487928', '22.682802', 1); +INSERT INTO `yx_system_city` VALUES (3706, 721293, 2, 720118, '0', '车城乡', '台湾,屏东,车城', '120.707694', '22.072115', 1); +INSERT INTO `yx_system_city` VALUES (3707, 721335, 2, 720118, '0', '春日乡', '台湾,屏东,春日', '120.622000', '22.368284', 1); +INSERT INTO `yx_system_city` VALUES (3708, 721344, 2, 720118, '0', '东港镇', '台湾,屏东,东港', '120.487928', '22.682802', 1); +INSERT INTO `yx_system_city` VALUES (3709, 721490, 2, 720118, '0', '枋寮乡', '台湾,屏东,枋寮', '120.487928', '22.682802', 1); +INSERT INTO `yx_system_city` VALUES (3710, 721617, 2, 720118, '0', '枋山乡', '台湾,屏东,枋山', '120.647762', '22.262550', 1); +INSERT INTO `yx_system_city` VALUES (3711, 721638, 2, 720118, '0', '高树乡', '台湾,屏东,高树', '120.595945', '22.825131', 1); +INSERT INTO `yx_system_city` VALUES (3712, 721805, 2, 720118, '0', '恆春镇', '台湾,屏东,恆春', '120.487928', '22.682802', 1); +INSERT INTO `yx_system_city` VALUES (3713, 721930, 2, 720118, '0', '佳冬乡', '台湾,屏东,佳冬', '120.545370', '22.417786', 1); +INSERT INTO `yx_system_city` VALUES (3714, 722025, 2, 722024, '0', '梧栖区', '台湾,臺中,梧栖区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3715, 722212, 2, 722024, '0', '乌日区', '台湾,臺中,乌日区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3716, 722402, 2, 722024, '0', '新社区', '台湾,臺中,新社区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3717, 722474, 2, 722024, '0', '西屯区', '台湾,臺中,西屯区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3718, 722699, 2, 722024, '0', '北屯区', '台湾,臺中,北屯区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3719, 722879, 2, 722024, '0', '中区', '台湾,臺中,中区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3720, 722923, 2, 722024, '0', '大肚区', '台湾,臺中,大肚区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3721, 723021, 2, 722024, '0', '大甲区', '台湾,臺中,大甲区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3722, 723211, 2, 722024, '0', '大里区', '台湾,臺中,大里区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3723, 723592, 2, 722024, '0', '大雅区', '台湾,臺中,大雅区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3724, 723756, 2, 722024, '0', '大安区', '台湾,臺中,大安区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3725, 723802, 2, 722024, '0', '东势区', '台湾,臺中,东势区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3726, 723966, 2, 722024, '0', '东区', '台湾,臺中,东区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3727, 724148, 2, 722024, '0', '丰原区', '台湾,臺中,丰原区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3728, 724424, 2, 722024, '0', '和平区', '台湾,臺中,和平区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3729, 724504, 2, 722024, '0', '后里区', '台湾,臺中,后里区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3730, 724656, 2, 722024, '0', '龙井区', '台湾,臺中,龙井区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3731, 724797, 2, 722024, '0', '南屯区', '台湾,臺中,南屯区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3732, 724872, 2, 722024, '0', '北区', '台湾,臺中,北区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3733, 725199, 2, 722024, '0', '清水区', '台湾,臺中,清水区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3734, 725489, 2, 725488, '0', '佳里区', '台湾,臺南,佳里区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3735, 725588, 2, 725488, '0', '将军区', '台湾,臺南,将军区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3736, 725620, 2, 725488, '0', '六甲区', '台湾,臺南,六甲区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3737, 725679, 2, 725488, '0', '柳营区', '台湾,臺南,柳营区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3738, 725795, 2, 725488, '0', '龙崎区', '台湾,臺南,龙崎区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3739, 725841, 2, 725488, '0', '麻豆区', '台湾,臺南,麻豆区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3740, 725927, 2, 725488, '0', '南化区', '台湾,臺南,南化区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3741, 725938, 2, 725488, '0', '楠西区', '台湾,臺南,楠西区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3742, 725973, 2, 725488, '0', '北区', '台湾,臺南,北区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3743, 726300, 2, 725488, '0', '七股区', '台湾,臺南,七股区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3744, 726338, 2, 725488, '0', '仁德区', '台湾,臺南,仁德区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3745, 726539, 2, 725488, '0', '善化区', '台湾,臺南,善化区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3746, 726675, 2, 725488, '0', '山上区', '台湾,臺南,山上区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3747, 726691, 2, 725488, '0', '南区', '台湾,臺南,南区', '120.679305', '24.133453', 1); +INSERT INTO `yx_system_city` VALUES (3748, 727041, 2, 725488, '0', '中西区', '台湾,臺南,中西区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3749, 727251, 2, 725488, '0', '下营区', '台湾,臺南,下营区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3750, 727339, 2, 725488, '0', '西港区', '台湾,臺南,西港区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3751, 727375, 2, 725488, '0', '新化区', '台湾,臺南,新化区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3752, 727425, 2, 725488, '0', '新市区', '台湾,臺南,新市区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3753, 727529, 2, 725488, '0', '新营区', '台湾,臺南,新营区', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3754, 727731, 2, 727730, '0', '北投区', '台湾,臺北,北投区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3755, 727897, 2, 727730, '0', '大同区', '台湾,臺北,大同区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3756, 728070, 2, 727730, '0', '大安区', '台湾,臺北,大安区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3757, 728116, 2, 727730, '0', '南港区', '台湾,臺北,南港区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3758, 728220, 2, 727730, '0', '内湖区', '台湾,臺北,内湖区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3759, 728340, 2, 727730, '0', '士林区', '台湾,臺北,士林区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3760, 728550, 2, 727730, '0', '松山区', '台湾,臺北,松山区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3761, 728713, 2, 727730, '0', '万华区', '台湾,臺北,万华区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3762, 728920, 2, 727730, '0', '文山区', '台湾,臺北,文山区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3763, 729073, 2, 727730, '0', '信义区', '台湾,臺北,信义区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3764, 729277, 2, 727730, '0', '中山区', '台湾,臺北,中山区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3765, 729583, 2, 727730, '0', '中正区', '台湾,臺北,中正区', '121.517057', '25.048074', 1); +INSERT INTO `yx_system_city` VALUES (3766, 729929, 2, 729928, '0', '卑南乡', '台湾,臺东,卑南', '121.117213', '22.781744', 1); +INSERT INTO `yx_system_city` VALUES (3767, 729994, 2, 729928, '0', '长滨乡', '台湾,臺东,长滨', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3768, 730033, 2, 729928, '0', '成功镇', '台湾,臺东,成功', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3769, 730107, 2, 729928, '0', '池上乡', '台湾,臺东,池上', '121.212999', '23.123275', 1); +INSERT INTO `yx_system_city` VALUES (3770, 730196, 2, 729928, '0', '达仁乡', '台湾,臺东,达仁', '120.878316', '22.296142', 1); +INSERT INTO `yx_system_city` VALUES (3771, 730219, 2, 729928, '0', '大武乡', '台湾,臺东,大武', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3772, 730268, 2, 729928, '0', '东河乡', '台湾,臺东,东河', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3773, 730308, 2, 729928, '0', '关山镇', '台湾,臺东,关山', '121.158084', '23.047483', 1); +INSERT INTO `yx_system_city` VALUES (3774, 730384, 2, 729928, '0', '海端乡', '台湾,臺东,海端', '121.172009', '23.101079', 1); +INSERT INTO `yx_system_city` VALUES (3775, 730409, 2, 729928, '0', '金峰乡', '台湾,臺东,金峰', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3776, 730416, 2, 729928, '0', '兰屿乡', '台湾,臺东,兰屿', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3777, 730423, 2, 729928, '0', '绿岛乡', '台湾,臺东,绿岛', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3778, 730438, 2, 729928, '0', '鹿野乡', '台湾,臺东,鹿野', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3779, 730510, 2, 729928, '0', '太麻里乡', '台湾,臺东,太麻里', '120.999365', '22.610919', 1); +INSERT INTO `yx_system_city` VALUES (3780, 730565, 2, 729928, '0', '臺东市', '台湾,臺东,臺东市', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3781, 730832, 2, 729928, '0', '延平乡', '台湾,臺东,延平', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3782, 730844, 2, 730843, '0', '八德区', '台湾,桃园,八德区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3783, 731212, 2, 730843, '0', '大溪区', '台湾,桃园,大溪区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3784, 731471, 2, 730843, '0', '大园区', '台湾,桃园,大园区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3785, 731767, 2, 730843, '0', '復兴区', '台湾,桃园,復兴区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3786, 731835, 2, 730843, '0', '观音区', '台湾,桃园,观音区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3787, 732079, 2, 730843, '0', '龟山区', '台湾,桃园,龟山区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3788, 732469, 2, 730843, '0', '龙潭区', '台湾,桃园,龙潭区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3789, 732800, 2, 730843, '0', '芦竹区', '台湾,桃园,芦竹区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3790, 733144, 2, 730843, '0', '平镇区', '台湾,桃园,平区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3791, 733179, 2, 730843, '0', '桃园区', '台湾,桃园,桃园区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3792, 733390, 2, 730843, '0', '新屋区', '台湾,桃园,新屋区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3793, 733537, 2, 730843, '0', '杨梅区', '台湾,桃园,杨梅区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3794, 733876, 2, 730843, '0', '中坜区', '台湾,桃园,中坜区', '121.083000', '25.000000', 1); +INSERT INTO `yx_system_city` VALUES (3795, 734180, 2, 734179, '0', '大同乡', '台湾,宜兰,大同', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3796, 734246, 2, 734179, '0', '钓鱼臺', '台湾,宜兰,钓鱼臺', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3797, 734248, 2, 734179, '0', '冬山乡', '台湾,宜兰,冬山', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3798, 734579, 2, 734179, '0', '礁溪乡', '台湾,宜兰,礁溪', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3799, 734681, 2, 734179, '0', '罗东镇', '台湾,宜兰,罗东', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3800, 734842, 2, 734179, '0', '南澳乡', '台湾,宜兰,南澳', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3801, 734865, 2, 734179, '0', '三星乡', '台湾,宜兰,三星', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3802, 735104, 2, 734179, '0', '苏澳镇', '台湾,宜兰,苏澳', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3803, 735319, 2, 734179, '0', '头城镇', '台湾,宜兰,头城', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3804, 735419, 2, 734179, '0', '五结乡', '台湾,宜兰,五结', '121.796468', '24.685615', 1); +INSERT INTO `yx_system_city` VALUES (3805, 735620, 2, 734179, '0', '宜兰市', '台湾,宜兰,宜兰市', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3806, 735851, 2, 734179, '0', '员山乡', '台湾,宜兰,员山', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3807, 735970, 2, 734179, '0', '壮围乡', '台湾,宜兰,壮围', '121.500000', '24.600000', 1); +INSERT INTO `yx_system_city` VALUES (3808, 736052, 2, 736051, '0', '草屯镇', '台湾,南投,草屯', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3809, 736305, 2, 736051, '0', '国姓乡', '台湾,南投,国姓', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3810, 736356, 2, 736051, '0', '集集镇', '台湾,南投,集集', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3811, 736449, 2, 736051, '0', '鹿谷乡', '台湾,南投,鹿谷', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3812, 736522, 2, 736051, '0', '名间乡', '台湾,南投,名间', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3813, 736622, 2, 736051, '0', '南投市', '台湾,南投,南投市', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3814, 736887, 2, 736051, '0', '埔里镇', '台湾,南投,埔里', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3815, 737266, 2, 736051, '0', '仁爱乡', '台湾,南投,仁爱', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3816, 737337, 2, 736051, '0', '水里乡', '台湾,南投,水里', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3817, 737496, 2, 736051, '0', '信义乡', '台湾,南投,信义', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3818, 737533, 2, 736051, '0', '鱼池乡', '台湾,南投,鱼池', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3819, 737591, 2, 736051, '0', '中寮乡', '台湾,南投,中寮', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3820, 737625, 2, 736051, '0', '竹山镇', '台湾,南投,竹山', '120.830000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3821, 737857, 2, 737856, '0', '东沙群岛', '台湾,南海岛,东沙群岛', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3822, 737859, 2, 737856, '0', '南沙群岛', '台湾,南海岛,南沙群岛', '0.000000', '0.000000', 1); +INSERT INTO `yx_system_city` VALUES (3823, 737862, 2, 737861, '0', '头屋乡', '台湾,苗栗,头屋', '120.818985', '24.561601', 1); +INSERT INTO `yx_system_city` VALUES (3824, 737894, 2, 737861, '0', '西湖乡', '台湾,苗栗,西湖', '120.743700', '24.556610', 1); +INSERT INTO `yx_system_city` VALUES (3825, 737948, 2, 737861, '0', '苑里镇', '台湾,苗栗,苑里', '120.818985', '24.561601', 1); +INSERT INTO `yx_system_city` VALUES (3826, 738050, 2, 737861, '0', '造桥乡', '台湾,苗栗,造桥', '120.818985', '24.561601', 1); +INSERT INTO `yx_system_city` VALUES (3827, 738158, 2, 737861, '0', '竹南镇', '台湾,苗栗,竹南', '120.872636', '24.685510', 1); +INSERT INTO `yx_system_city` VALUES (3828, 738454, 2, 737861, '0', '卓兰镇', '台湾,苗栗,卓兰', '120.823440', '24.309510', 1); +INSERT INTO `yx_system_city` VALUES (3829, 738528, 2, 737861, '0', '大湖乡', '台湾,苗栗,大湖', '120.863640', '24.422548', 1); +INSERT INTO `yx_system_city` VALUES (3830, 738619, 2, 737861, '0', '公馆乡', '台湾,苗栗,公馆', '120.818985', '24.561601', 1); +INSERT INTO `yx_system_city` VALUES (3831, 738695, 2, 737861, '0', '后龙镇', '台湾,苗栗,后龙', '120.786474', '24.612613', 1); +INSERT INTO `yx_system_city` VALUES (3832, 738882, 2, 737861, '0', '苗栗市', '台湾,苗栗,苗栗市', '120.819288', '24.561582', 1); +INSERT INTO `yx_system_city` VALUES (3833, 739250, 2, 737861, '0', '南庄乡', '台湾,苗栗,南庄', '120.818985', '24.561601', 1); +INSERT INTO `yx_system_city` VALUES (3834, 739302, 2, 737861, '0', '三湾乡', '台湾,苗栗,三湾', '120.818985', '24.561601', 1); +INSERT INTO `yx_system_city` VALUES (3835, 739369, 2, 737861, '0', '三义乡', '台湾,苗栗,三义', '120.765515', '24.413037', 1); +INSERT INTO `yx_system_city` VALUES (3836, 739419, 2, 737861, '0', '狮潭乡', '台湾,苗栗,狮潭', '120.918024', '24.540004', 1); +INSERT INTO `yx_system_city` VALUES (3837, 739465, 2, 737861, '0', '泰安乡', '台湾,苗栗,泰安', '120.818985', '24.561601', 1); +INSERT INTO `yx_system_city` VALUES (3838, 739487, 2, 737861, '0', '铜锣乡', '台湾,苗栗,铜锣', '120.786475', '24.489502', 1); +INSERT INTO `yx_system_city` VALUES (3839, 739564, 2, 737861, '0', '通霄镇', '台湾,苗栗,通霄', '120.676696', '24.489084', 1); +INSERT INTO `yx_system_city` VALUES (3840, 739642, 2, 737861, '0', '头份市', '台湾,苗栗,头份市', '120.818985', '24.561601', 1); +INSERT INTO `yx_system_city` VALUES (3841, 739958, 2, 739957, '0', '东区', '台湾,嘉义,东区', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3842, 740140, 2, 739957, '0', '西区', '台湾,嘉义,西区', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3843, 740511, 2, 740510, '0', '阿里山乡', '台湾,嘉义,阿里山', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3844, 740536, 2, 740510, '0', '布袋镇', '台湾,嘉义,布袋', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3845, 740625, 2, 740510, '0', '大林镇', '台湾,嘉义,大林', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3846, 740746, 2, 740510, '0', '大埔乡', '台湾,嘉义,大埔', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3847, 740792, 2, 740510, '0', '东石乡', '台湾,嘉义,东石', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3848, 740845, 2, 740510, '0', '番路乡', '台湾,嘉义,番路', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3849, 740943, 2, 740510, '0', '六脚乡', '台湾,嘉义,六脚', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3850, 740975, 2, 740510, '0', '鹿草乡', '台湾,嘉义,鹿草', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3851, 741010, 2, 740510, '0', '梅山乡', '台湾,嘉义,梅山', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3852, 741137, 2, 740510, '0', '民雄乡', '台湾,嘉义,民雄', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3853, 741312, 2, 740510, '0', '朴子市', '台湾,嘉义,朴子市', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3854, 741451, 2, 740510, '0', '水上乡', '台湾,嘉义,水上', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3855, 741550, 2, 740510, '0', '太保市', '台湾,嘉义,太保市', '120.332737', '23.459115', 1); +INSERT INTO `yx_system_city` VALUES (3856, 741646, 2, 740510, '0', '溪口乡', '台湾,嘉义,溪口', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3857, 741688, 2, 740510, '0', '新港乡', '台湾,嘉义,新港', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3858, 741750, 2, 740510, '0', '义竹乡', '台湾,嘉义,义竹', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3859, 741785, 2, 740510, '0', '中埔乡', '台湾,嘉义,中埔', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3860, 741936, 2, 740510, '0', '竹崎乡', '台湾,嘉义,竹崎', '120.452538', '23.481568', 1); +INSERT INTO `yx_system_city` VALUES (3861, 742127, 2, 742126, '0', '东区', '台湾,新竹,东区', '120.973544', '24.805226', 1); +INSERT INTO `yx_system_city` VALUES (3862, 742309, 2, 742126, '0', '北区', '台湾,新竹,北区', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3863, 742637, 2, 742636, '0', '峨眉乡', '台湾,新竹,峨眉', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3864, 742674, 2, 742636, '0', '关西镇', '台湾,新竹,关西', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3865, 742797, 2, 742636, '0', '横山乡', '台湾,新竹,横山', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3866, 742852, 2, 742636, '0', '湖口乡', '台湾,新竹,湖口', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3867, 743201, 2, 742636, '0', '尖石乡', '台湾,新竹,尖石', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3868, 743246, 2, 742636, '0', '芎林乡', '台湾,新竹,芎林', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3869, 743298, 2, 742636, '0', '五峰乡', '台湾,新竹,五峰', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3870, 743319, 2, 742636, '0', '新丰乡', '台湾,新竹,新丰', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3871, 743414, 2, 742636, '0', '新埔镇', '台湾,新竹,新埔', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3872, 743527, 2, 742636, '0', '竹北市', '台湾,新竹,竹北市', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3873, 743565, 2, 742636, '0', '竹东镇', '台湾,新竹,竹东', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3874, 743725, 2, 742636, '0', '宝山乡', '台湾,新竹,宝山', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3875, 743888, 2, 742636, '0', '北埔乡', '台湾,新竹,北埔', '120.968798', '24.806738', 1); +INSERT INTO `yx_system_city` VALUES (3876, 743939, 2, 743938, '0', '卓溪乡', '台湾,花莲,卓溪', '121.301890', '23.344908', 1); +INSERT INTO `yx_system_city` VALUES (3877, 743956, 2, 743938, '0', '丰滨乡', '台湾,花莲,丰滨', '121.300000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3878, 743993, 2, 743938, '0', '凤林镇', '台湾,花莲,凤林', '121.300000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3879, 744128, 2, 743938, '0', '富里乡', '台湾,花莲,富里', '121.244694', '23.175468', 1); +INSERT INTO `yx_system_city` VALUES (3880, 744185, 2, 743938, '0', '光復乡', '台湾,花莲,光復', '121.300000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3881, 744246, 2, 743938, '0', '花莲市', '台湾,花莲,花莲市', '121.606927', '23.981993', 1); +INSERT INTO `yx_system_city` VALUES (3882, 744625, 2, 743938, '0', '吉安乡', '台湾,花莲,吉安', '121.300000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3883, 745050, 2, 743938, '0', '瑞穗乡', '台湾,花莲,瑞穗', '121.373373', '23.496080', 1); +INSERT INTO `yx_system_city` VALUES (3884, 745196, 2, 743938, '0', '寿丰乡', '台湾,花莲,寿丰', '121.506030', '23.869774', 1); +INSERT INTO `yx_system_city` VALUES (3885, 745354, 2, 743938, '0', '万荣乡', '台湾,花莲,万荣', '121.300000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3886, 745363, 2, 743938, '0', '新城乡', '台湾,花莲,新城', '121.604120', '24.039243', 1); +INSERT INTO `yx_system_city` VALUES (3887, 745486, 2, 743938, '0', '秀林乡', '台湾,花莲,秀林', '121.300000', '23.830000', 1); +INSERT INTO `yx_system_city` VALUES (3888, 745532, 2, 743938, '0', '玉里镇', '台湾,花莲,玉里', '121.312109', '23.334236', 1); +INSERT INTO `yx_system_city` VALUES (3889, 745675, 2, 745674, '0', '阿莲区', '台湾,高雄,阿莲区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3890, 745715, 2, 745674, '0', '大寮区', '台湾,高雄,大寮区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3891, 746083, 2, 745674, '0', '大社区', '台湾,高雄,大社区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3892, 746199, 2, 745674, '0', '大树区', '台湾,高雄,大树区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3893, 746294, 2, 745674, '0', '凤山区', '台湾,高雄,凤山区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3894, 746624, 2, 745674, '0', '冈山区', '台湾,高雄,冈山区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3895, 746906, 2, 745674, '0', '鼓山区', '台湾,高雄,鼓山区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3896, 747053, 2, 745674, '0', '湖内区', '台湾,高雄,湖内区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3897, 747108, 2, 745674, '0', '甲仙区', '台湾,高雄,甲仙区', '120.587980', '23.083957', 1); +INSERT INTO `yx_system_city` VALUES (3898, 747150, 2, 745674, '0', '苓雅区', '台湾,高雄,苓雅区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3899, 747342, 2, 745674, '0', '林园区', '台湾,高雄,林园区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3900, 747481, 2, 745674, '0', '六龟区', '台湾,高雄,六龟区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3901, 747536, 2, 745674, '0', '路竹区', '台湾,高雄,路竹区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3902, 747643, 2, 745674, '0', '茂林区', '台湾,高雄,茂林区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3903, 747647, 2, 745674, '0', '美浓区', '台湾,高雄,美浓区', '120.542419', '22.894882', 1); +INSERT INTO `yx_system_city` VALUES (3904, 747764, 2, 745674, '0', '弥陀区', '台湾,高雄,弥陀区', '120.250672', '22.781561', 1); +INSERT INTO `yx_system_city` VALUES (3905, 747894, 2, 745674, '0', '那玛夏区', '台湾,高雄,那玛夏区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3906, 747902, 2, 745674, '0', '楠梓区', '台湾,高雄,楠梓区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3907, 748258, 2, 745674, '0', '内门区', '台湾,高雄,内门区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3908, 748344, 2, 745674, '0', '鸟松区', '台湾,高雄,鸟松区', '120.311922', '22.620856', 1); +INSERT INTO `yx_system_city` VALUES (3909, 748554, 2, 748553, '0', '安乐区', '台湾,基隆,安乐区', '121.746248', '25.130741', 1); +INSERT INTO `yx_system_city` VALUES (3910, 748581, 2, 748553, '0', '暖暖区', '台湾,基隆,暖暖区', '121.746248', '25.130741', 1); +INSERT INTO `yx_system_city` VALUES (3911, 748599, 2, 748553, '0', '七堵区', '台湾,基隆,七堵区', '121.746248', '25.130741', 1); +INSERT INTO `yx_system_city` VALUES (3912, 748670, 2, 748553, '0', '仁爱区', '台湾,基隆,仁爱区', '121.746248', '25.130741', 1); +INSERT INTO `yx_system_city` VALUES (3913, 748716, 2, 748553, '0', '信义区', '台湾,基隆,信义区', '121.746248', '25.130741', 1); +INSERT INTO `yx_system_city` VALUES (3914, 748920, 2, 748553, '0', '中山区', '台湾,基隆,中山区', '121.746248', '25.130741', 1); +INSERT INTO `yx_system_city` VALUES (3915, 749226, 2, 748553, '0', '中正区', '台湾,基隆,中正区', '121.768000', '25.151647', 1); +INSERT INTO `yx_system_city` VALUES (3916, 749572, 2, 749571, '0', '金城镇', '台湾,金门,金城', '118.317089', '24.432706', 1); +INSERT INTO `yx_system_city` VALUES (3917, 749647, 2, 749571, '0', '金湖镇', '台湾,金门,金湖', '118.317089', '24.432706', 1); +INSERT INTO `yx_system_city` VALUES (3918, 749752, 2, 749571, '0', '金宁乡', '台湾,金门,金宁', '118.317089', '24.432706', 1); +INSERT INTO `yx_system_city` VALUES (3919, 749810, 2, 749571, '0', '金沙镇', '台湾,金门,金沙', '118.317089', '24.432706', 1); +INSERT INTO `yx_system_city` VALUES (3920, 749894, 2, 749571, '0', '烈屿乡', '台湾,金门,烈屿', '118.317089', '24.432706', 1); +INSERT INTO `yx_system_city` VALUES (3921, 749928, 2, 749571, '0', '乌坵乡', '台湾,金门,乌坵', '118.317089', '24.432706', 1); +INSERT INTO `yx_system_city` VALUES (3922, 749931, 2, 749930, '0', '北竿乡', '台湾,连江,北竿', '119.539704', '26.197364', 1); +INSERT INTO `yx_system_city` VALUES (3923, 749938, 2, 749930, '0', '东引乡', '台湾,连江,东引', '119.539704', '26.197364', 1); +INSERT INTO `yx_system_city` VALUES (3924, 749941, 2, 749930, '0', '莒光乡', '台湾,连江,莒光', '119.539704', '26.197364', 1); +INSERT INTO `yx_system_city` VALUES (3925, 749947, 2, 749930, '0', '南竿乡', '台湾,连江,南竿', '119.539704', '26.197364', 1); +INSERT INTO `yx_system_city` VALUES (3926, 749958, 2, 749957, '0', '褒忠乡', '台湾,云林,褒忠', '120.309069', '23.695652', 1); +INSERT INTO `yx_system_city` VALUES (3927, 749991, 2, 749957, '0', '北港镇', '台湾,云林,北港', '120.296759', '23.572428', 1); +INSERT INTO `yx_system_city` VALUES (3928, 750170, 2, 749957, '0', '莿桐乡', '台湾,云林,莿桐', '120.497033', '23.757251', 1); +INSERT INTO `yx_system_city` VALUES (3929, 750218, 2, 749957, '0', '大埤乡', '台湾,云林,大埤', '120.527173', '23.696887', 1); +INSERT INTO `yx_system_city` VALUES (3930, 750291, 2, 749957, '0', '东势乡', '台湾,云林,东势', '120.527173', '23.696887', 1); +INSERT INTO `yx_system_city` VALUES (3931, 750363, 2, 749957, '0', '斗六市', '台湾,云林,斗六市', '120.527173', '23.696887', 1); +INSERT INTO `yx_system_city` VALUES (3932, 750795, 2, 749957, '0', '斗南镇', '台湾,云林,斗南', '120.527173', '23.696887', 1); +INSERT INTO `yx_system_city` VALUES (3933, 751009, 2, 749957, '0', '二崙乡', '台湾,云林,二崙', '120.527173', '23.696887', 1); +INSERT INTO `yx_system_city` VALUES (3934, 751071, 2, 749957, '0', '古坑乡', '台湾,云林,古坑', '120.558553', '23.644734', 1); +INSERT INTO `yx_system_city` VALUES (3935, 751147, 2, 749957, '0', '虎尾镇', '台湾,云林,虎尾', '120.429231', '23.707796', 1); +INSERT INTO `yx_system_city` VALUES (3936, 751400, 2, 749957, '0', '口湖乡', '台湾,云林,口湖', '120.178640', '23.585506', 1); +INSERT INTO `yx_system_city` VALUES (3937, 751493, 2, 749957, '0', '林内乡', '台湾,云林,林内', '120.527173', '23.696887', 1); +INSERT INTO `yx_system_city` VALUES (3938, 751555, 2, 749957, '0', '崙背乡', '台湾,云林,崙背', '120.527173', '23.696887', 1); +INSERT INTO `yx_system_city` VALUES (3939, 751674, 2, 749957, '0', '麦寮乡', '台湾,云林,麦寮', '120.527173', '23.696887', 1); +INSERT INTO `yx_system_city` VALUES (3940, 751764, 2, 749957, '0', '水林乡', '台湾,云林,水林', '120.241228', '23.571067', 1); +INSERT INTO `yx_system_city` VALUES (3941, 751832, 2, 749957, '0', '四湖乡', '台湾,云林,四湖', '120.220781', '23.635426', 1); +INSERT INTO `yx_system_city` VALUES (3942, 751907, 2, 749957, '0', '臺西乡', '台湾,云林,臺西', '120.196139', '23.702821', 1); +INSERT INTO `yx_system_city` VALUES (3943, 751956, 2, 749957, '0', '土库镇', '台湾,云林,土库', '120.527173', '23.696887', 1); +INSERT INTO `yx_system_city` VALUES (3944, 752034, 2, 749957, '0', '西螺镇', '台湾,云林,西螺', '120.457123', '23.797412', 1); +INSERT INTO `yx_system_city` VALUES (3945, 752149, 2, 749957, '0', '元长乡', '台湾,云林,元长', '120.311052', '23.649577', 1); +INSERT INTO `yx_system_city` VALUES (3946, 752150, 1, 714368, '', '香港特别行政区', '香港特别行政区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3947, 752151, 2, 752150, '', '中西区', '中西区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3948, 752152, 2, 752150, '', '东区', '东区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3949, 752153, 2, 752150, '', '九龙城区', '九龙城区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3950, 752154, 2, 752150, '', '观塘区', '香港,九龙,观塘', '114.231268', '22.309430', 1); +INSERT INTO `yx_system_city` VALUES (3951, 752155, 2, 752150, '', '南区', '香港,香港岛,南区', '114.174134', '22.246760', 1); +INSERT INTO `yx_system_city` VALUES (3953, 752156, 2, 752150, '', '深水埗区', '香港特别行政区,香港特别行政区,深水埗区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3954, 752157, 2, 752150, '', '湾仔区', '湾仔区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3955, 752158, 2, 752150, '', '黄大仙区', '黄大仙区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3956, 752159, 2, 752150, '', '油尖旺区', '油尖旺区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3957, 752160, 2, 752150, '', '离岛区', '离岛区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3958, 752161, 2, 752150, '', '葵青区', '葵青区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3959, 752162, 2, 752150, '', '北区', '北区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3960, 752163, 2, 752150, '', '西贡区', '西贡区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3961, 752164, 2, 752150, '', '沙田区', '沙田区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3962, 752165, 2, 752150, '', '屯门区', '屯门区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3963, 752166, 2, 752150, '', '大埔区', '大埔区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3964, 752167, 2, 752150, '', '荃湾区', '荃湾区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3965, 752168, 2, 752150, '', '元朗区', '元朗区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3966, 752169, 1, 714390, '', '澳门特别行政区', '澳门特别行政区', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3967, 752170, 2, 752169, '', '澳门半岛', '澳门半岛', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3968, 752171, 2, 752169, '', '凼仔', '凼仔', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3969, 752172, 2, 752169, '', '路凼城', '路凼城', '', '', 1); +INSERT INTO `yx_system_city` VALUES (3970, 752173, 2, 752169, '', '路环', '路环', '', '', 1); + +-- ---------------------------- +-- 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 = 227 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', '', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (165, 'wechat_avatar', '', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (172, 'wechat_share_synopsis', 'springboot2前后端分离电商系统', 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', 'yshop电商系统', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (177, 'store_postage', '1', 0, 0); +INSERT INTO `yx_system_config` VALUES (178, 'store_free_postage', '1', 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 (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://127.0.0.1:8080', 0, 0); +INSERT INTO `yx_system_config` VALUES (185, 'api_url', 'http://127.0.0.1:8008', 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', 'wxc061dee8806ff712', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (188, 'wechat_appsecret', '1111', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (189, 'wechat_encodingaeskey', 'yYuBUkC8BXImCXyu7O6hkzLj4TC5nxsWPfL4CQAZPNY', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (190, 'wechat_token', 'yshop', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (191, 'wxpay_mchId', '1111', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (192, 'wxpay_appId', '111111', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (193, 'wxpay_mchKey', '1111', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (194, 'wxapp_appId', '121221', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (195, 'wxapp_secret', '121212', 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 (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', '11111111111', 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', 'wx7c84ede33062d1e4', NULL, NULL); +INSERT INTO `yx_system_config` VALUES (212, 'file_store_mode', '1', 0, 0); +INSERT INTO `yx_system_config` VALUES (213, 'sms_access_key', 'yshopyshop', 0, 0); +INSERT INTO `yx_system_config` VALUES (214, 'sms_enable', '2', 0, 0); +INSERT INTO `yx_system_config` VALUES (215, 'sms_access_secret', 'yshop', 0, 0); +INSERT INTO `yx_system_config` VALUES (216, 'sms_region', 'cn-hangzhou', 0, 0); +INSERT INTO `yx_system_config` VALUES (217, 'sms_templateId', '111111111', 0, 0); +INSERT INTO `yx_system_config` VALUES (218, 'sms_sign', 'yshop', 0, 0); +INSERT INTO `yx_system_config` VALUES (219, 'exp_enable', '1', 0, 0); +INSERT INTO `yx_system_config` VALUES (220, 'exp_appId', '1607734', 0, 0); +INSERT INTO `yx_system_config` VALUES (221, 'exp_appKey', '33333333333333', 0, 0); +INSERT INTO `yx_system_config` VALUES (222, 'admin_api_url', 'http://127.0.0.1:8001', 0, 0); +INSERT INTO `yx_system_config` VALUES (223, 'imageArr', '[\"\"]', 0, 0); +INSERT INTO `yx_system_config` VALUES (224, 'wechat_ma_encodingaeskey', '', 0, 0); +INSERT INTO `yx_system_config` VALUES (225, 'wxapi', 'http://你的H5api端域名/api/wxapp/serve', 0, 0); +INSERT INTO `yx_system_config` VALUES (226, 'wechat_ma_token', '', 0, 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数据)', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加数据时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `sort` int(11) NULL DEFAULT 0 COMMENT '数据排序', + `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '状态(1:开启;2:关闭;)', + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 227 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\":0}', '2020-06-25 18:54:35', '2020-09-15 07:54:44', 1, 0, 0); +INSERT INTO `yx_system_group_data` VALUES (180, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/all.png\"],\"uniapp_url\":\"/pages/shop/GoodsList/index\",\"name\":\"全部商品\",\"id\":180,\"pic\":\"https://image.dayouqiantu.cn/all.png\",\"sort\":9,\"url\":\"/goods_list\",\"wxapp_url\":\"/pages/shop/GoodsClass/main\",\"status\":1}', '2020-06-25 18:54:35', NULL, 9, 1, 0); +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\":\"yshop3.0\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-27 15:47:38', 2, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (183, 'yshop_hot_search', '{\"id\":183,\"title\":\"照片\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (184, 'yshop_hot_search', '{\"id\":184,\"title\":\"springboot\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); +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\":\"yshop基于springboot2+Mybatisplus+jwt商城系统\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-27 15:47:22', 4, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (188, 'yshop_hot_search', '{\"id\":188,\"title\":\"打印\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); +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}', '2020-06-25 18:54:35', NULL, 9, 1, 0); +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}', '2020-06-25 18:54:35', NULL, 8, 1, 0); +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}', '2020-06-25 18:54:35', NULL, 7, 1, 0); +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}', '2020-06-25 18:54:35', NULL, 6, 1, 0); +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}', '2020-06-25 18:54:35', NULL, 5, 1, 0); +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}', '2020-06-25 18:54:35', NULL, 4, 1, 0); +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}', '2020-06-25 18:54:35', NULL, 3, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (196, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/xw.png\"],\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"name\":\"图文资讯\",\"id\":196,\"pic\":\"https://image.dayouqiantu.cn/xw.png\",\"sort\":8,\"url\":\"/news_list\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:26:24', 8, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (197, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/colle.png\"],\"uniapp_url\":\"/pages/shop/GoodsCollection/index\",\"name\":\"我的收藏\",\"id\":197,\"pic\":\"https://image.dayouqiantu.cn/colle.png\",\"sort\":7,\"url\":\"/collection\",\"wxapp_url\":\"/pages/shop/GoodsCollection/main\",\"status\":1}', '2020-06-25 18:54:35', NULL, 7, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (199, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/cou.png\"],\"uniapp_url\":\"/pages/user/coupon/GetCoupon/index\",\"name\":\"优惠券\",\"id\":199,\"pic\":\"https://image.dayouqiantu.cn/cou.png\",\"sort\":6,\"url\":\"/user/get_coupon\",\"wxapp_url\":\"/pages/user/coupon/GetCoupon/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:26:36', 6, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (200, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/62ac09d2914d36c65b9b59d2147d809a.png\"],\"uniapp_url\":\"/pages/activity/GoodsGroup/index\",\"name\":\"拼团专区\",\"id\":200,\"pic\":\"https://image.dayouqiantu.cn/62ac09d2914d36c65b9b59d2147d809a.png\",\"sort\":5,\"url\":\"/activity/group\",\"wxapp_url\":\"/pages/activity/GoodsGroup/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:26:45', 5, 1, 0); +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}', '2020-06-25 18:54:35', NULL, 2, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (202, 'yshop_sign_day_num', '{\"sign_num\":\"10\",\"id\":205,\"day\":\"第一天\"}', '2020-06-25 18:54:35', NULL, 9, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (203, 'yshop_sign_day_num', '{\"sign_num\":\"20\",\"id\":\"\",\"day\":\"第二天\"}', '2020-06-25 18:54:35', NULL, 8, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (204, 'yshop_sign_day_num', '{\"sign_num\":\"30\",\"id\":\"\",\"day\":\"第三天\"}', '2020-06-25 18:54:35', NULL, 7, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (205, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"40\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第四天\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 6, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (206, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"50\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第五天\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 5, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (207, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"60\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"第六天\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 4, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (208, 'yshop_sign_day_num', '{\"addTime\":\"\",\"sign_num\":\"100\",\"id\":\"\",\"sort\":\"\",\"value\":\"\",\"day\":\"奖励\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 3, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (209, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/29ea4acebbf99e7eaf6f85af2b6d79ae.png\"],\"uniapp_url\":\"/pages/user/signIn/Sign/index\",\"name\":\"积分签到\",\"id\":209,\"pic\":\"https://image.dayouqiantu.cn/29ea4acebbf99e7eaf6f85af2b6d79ae.png\",\"sort\":4,\"url\":\"/user/sign\",\"wxapp_url\":\"/pages/user/signIn/Sign/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:26:56', 4, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (210, 'yshop_seckill_time', '{\"continued\":2,\"id\":\"\",\"time\":5}', '2020-06-25 18:54:35', NULL, 0, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (211, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"3\",\"id\":\"\",\"sort\":\"\",\"time\":\"7\",\"value\":\"\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (212, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"2\",\"id\":\"\",\"sort\":\"\",\"time\":\"10\",\"value\":\"\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (213, 'yshop_seckill_time', '{\"addTime\":\"\",\"continued\":\"3\",\"id\":\"\",\"sort\":\"\",\"time\":\"12\",\"value\":\"\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (214, 'yshop_seckill_time', '{\"continued\":\"10\",\"id\":214,\"time\":\"15\"}', '2020-06-25 18:54:35', '2020-09-05 17:16:06', 0, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (215, 'yshop_seckill_time', '{\"continued\":\"2\",\"id\":223,\"time\":\"19\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (216, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/b0344c148141b50d68db9722708ea49e.png\"],\"uniapp_url\":\"/pages/activity/GoodsSeckill/index\",\"name\":\"秒杀专区\",\"id\":216,\"pic\":\"https://image.dayouqiantu.cn/b0344c148141b50d68db9722708ea49e.png\",\"sort\":3,\"url\":\"/activity/goods_seckill\",\"wxapp_url\":\"/pages/activity/GoodsSeckill/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:27:06', 3, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (217, 'yshop_home_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/bar.png\"],\"uniapp_url\":\"/pages/activity/GoodsBargain/index\",\"name\":\"砍价专区\",\"id\":217,\"pic\":\"https://image.dayouqiantu.cn/bar.png\",\"sort\":2,\"url\":\"/activity/bargain\",\"wxapp_url\":\"/pages/activity/GoodsBargain/main\",\"status\":1}', '2020-06-25 18:54:35', '2020-06-26 18:27:16', 2, 1, 0); +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}', '2020-06-25 18:54:35', NULL, 1, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (219, 'yshop_home_banner', '{\"name\":\"222\",\"id\":\"\",\"pic\":\"https://image.dayouqiantu.cn/5c9f117f624ee.jpg\",\"sort\":\"\",\"url\":\"/\",\"status\":\"\"}', '2020-06-25 18:54:35', NULL, 0, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (221, 'yshop_my_menus', '{\"imageArr\":[\"https://image.dayouqiantu.cn/5e60da498cfdd.png\"],\"uniapp_url\":\"/pages/orderAdmin/OrderCancellation/index\",\"name\":\"订单核销\",\"id\":221,\"pic\":\"https://image.dayouqiantu.cn/5e60da498cfdd.png\",\"sort\":0,\"url\":\"/order/order_cancellation\",\"wxapp_url\":\"\",\"status\":1}', '2020-06-25 18:54:35', '2020-09-15 15:46:36', 0, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (222, 'yshop_recharge_price_ways', '{\"give_price\":\"10\",\"price\":\"100\",\"id\":\"\",\"sort\":0,\"status\":1}', '2020-06-25 18:54:35', NULL, 1, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (223, 'yshop_recharge_price_ways', '{\"give_price\":\"1000\",\"price\":1,\"id\":223,\"sort\":0,\"status\":1}', '2020-06-25 18:54:35', '2020-09-12 18:34:21', 0, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (224, 'yshop_home_banner', '{\"imageArr\":[\"https://app2.yixiang.co/file/pic/20200903171807647067.jpg\"],\"uniapp_url\":\"3\",\"name\":\"3\",\"id\":224,\"pic\":\"https://app2.yixiang.co/file/pic/20200903171807647067.jpg\",\"sort\":0,\"url\":\"3\",\"wxapp_url\":\"\",\"status\":1}', '2020-09-03 17:13:59', '2020-09-15 07:54:11', 0, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (225, 'yshop_my_menus', '{\"imageArr\":[\"https://app2.yixiang.co/file/pic/20200911093912577832.png\"],\"uniapp_url\":\"/pages/shop/GoodsFoot/index\",\"name\":\"我的足迹\",\"id\":225,\"pic\":\"https://app2.yixiang.co/file/pic/20200911093912577832.png\",\"sort\":10,\"url\":\"\",\"wxapp_url\":\"\",\"status\":1}', '2020-09-11 09:39:21', '2020-09-11 09:40:49', 10, 1, 0); +INSERT INTO `yx_system_group_data` VALUES (226, 'yshop_home_banner', '{\"imageArr\":[\"https://app2.yixiang.co/file/pic/20200915074139926178.jpg\"],\"uniapp_url\":\"\",\"name\":\"sdaas\",\"id\":\"\",\"pic\":\"https://app2.yixiang.co/file/pic/20200915074139926178.jpg\",\"sort\":0,\"url\":\"\",\"wxapp_url\":\"\",\"status\":1}', '2020-09-15 07:41:46', NULL, 0, 1, 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 '每日营业开关时间', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `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 = 9 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', '2020-06-25 18:54:35', NULL, 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', '河南省信阳市', '', 'https://image.dayouqiantu.cn/noMeal_tt.png', '32.11683', '114.05857', '2020-03-21 - 2020-03-31', '17:11:13 - 20:11:13', '2020-06-25 18:54:35', NULL, 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', '河南省郑州', '', 'https://image.dayouqiantu.cn/noMeal_tt.png', '34.72468', '113.6401', '2020-03-21 - 2020-03-31', '17:11:13 - 20:11:15', '2020-06-25 18:54:35', '2020-06-26 10:51:21', 1, 1, '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` bigint(20) 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 '状态', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 7 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, '2020-06-25 18:54:35', NULL, 1); +INSERT INTO `yx_system_store_staff` VALUES (3, 11, '会敲代码的喵88', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', 5, '郑州门店', 'tttt', '16136175234', 1, 1, '2020-06-25 18:54:35', NULL, 1); +INSERT INTO `yx_system_store_staff` VALUES (4, 19, '15136175528', 'https://image.dayouqiantu.cn/5dc2c7f3a104c.png', 5, '郑州门店', '111', '15136175246', 1, 1, '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_store_staff` VALUES (5, 20, '15136171112', 'https://image.dayouqiantu.cn/5e79f6cfd33b6.png', 4, '信阳门店', '444', '44444', 1, 1, NULL, '2020-06-26 10:56:09', 0); +INSERT INTO `yx_system_store_staff` VALUES (6, 21, '15136175234', 'https://image.dayouqiantu.cn/5e79f6cfd33b6.png', 4, '信阳门店', '5555', '555555', 1, 1, '2020-06-26 10:53:46', NULL, 0); + +-- ---------------------------- +-- 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 '说明', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否删除.1=删除,0=未删除', + PRIMARY KEY (`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 11 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', '普通会员', '2020-06-25 18:54:35', NULL, 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', '青铜会员', '2020-06-25 18:54:35', NULL, 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', '黄铜会员', '2020-06-25 18:54:35', NULL, 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', '白银会员', '2020-06-25 18:54:35', NULL, 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', '黄金会员', '2020-06-25 18:54:35', NULL, 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', '钻石会员', '2020-06-25 18:54:35', NULL, 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 '任务说明', + `create_time` datetime(0) NOT NULL COMMENT '新增时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + 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, '', '2020-06-25 18:54:35', '2020-06-25 18:54:35', 0); +INSERT INTO `yx_system_user_task` VALUES (2, '消费满100元', '消费金额', 'ConsumptionAmount', 100, 1, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (3, '满足积分200分', '积分数', 'SatisfactionIntegral', 200, 2, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (4, '累计签到20天', '累计签到', 'CumulativeAttendance', 20, 2, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (5, '满足积分500分', '积分数', 'SatisfactionIntegral', 500, 3, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (6, '累计签到30天', '累计签到', 'CumulativeAttendance', 30, 3, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (7, '满足积分1000分', '积分数', 'SatisfactionIntegral', 1000, 4, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (8, '累计签到10天', '累计签到', 'CumulativeAttendance', 10, 4, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (9, '满足积分1200分', '积分数', 'SatisfactionIntegral', 1200, 5, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (10, '累计签到60天', '累计签到', 'CumulativeAttendance', 60, 5, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (11, '消费满10000元', '消费次数', 'ConsumptionAmount', 10000, 5, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (12, '满足积分2000分', '积分数', 'SatisfactionIntegral', 2000, 6, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (13, '消费满10000元', '消费次数', 'ConsumptionAmount', 10000, 6, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (14, '累计签到100天', '累计签到', 'CumulativeAttendance', 100, 6, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (15, '消费满1000元', '消费金额', 'ConsumptionAmount', 1000, 4, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (16, '累计签到2天', '累计签到', 'CumulativeAttendance', 2, 1, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (17, '消费满100元', '消费次数', 'ConsumptionAmount', 100, 2, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); +INSERT INTO `yx_system_user_task` VALUES (18, '消费满1000元', '消费金额', 'ConsumptionAmount', 1000, 3, 0, 1, 1, '', '2020-06-25 18:54:35', NULL, 0); + +-- ---------------------------- +-- Table structure for yx_user +-- ---------------------------- +DROP TABLE IF EXISTS `yx_user`; +CREATE TABLE `yx_user` ( + `uid` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户id', + `username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '用户账户(跟accout一样)', + `password` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '用户密码(跟pwd)', + `real_name` varchar(25) CHARACTER SET utf8mb4 COLLATE utf8mb4_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(100) CHARACTER SET utf8mb4 COLLATE utf8mb4_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_ip` varchar(100) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT '' COMMENT '添加ip', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL COMMENT '最后一次登录时间', + `last_ip` varchar(100) 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` bigint(20) UNSIGNED NULL DEFAULT 0 COMMENT '推广元id', + `spread_time` datetime(0) NULL DEFAULT NULL 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 '下级人数', + `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', + `wx_profile` json NULL COMMENT '微信用户json信息', + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`uid`) USING BTREE, + UNIQUE INDEX `username`(`username`) 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 = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_user +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_user_address +-- ---------------------------- +DROP TABLE IF EXISTS `yx_user_address`; +CREATE TABLE `yx_user_address` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户地址id', + `uid` bigint(20) 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 '收货人所在市', + `city_id` int(11) NULL DEFAULT NULL, + `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 '是否删除', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + 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 = 36 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户地址表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_user_address +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_user_bill +-- ---------------------------- +DROP TABLE IF EXISTS `yx_user_bill`; +CREATE TABLE `yx_user_bill` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT COMMENT '用户账单id', + `uid` bigint(20) 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 '备注', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `status` tinyint(1) NOT NULL DEFAULT 1 COMMENT '0 = 带确定 1 = 有效 -1 = 无效', + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `openid`(`uid`) USING BTREE, + INDEX `status`(`status`) USING BTREE, + INDEX `add_time`(`create_time`) USING BTREE, + INDEX `pm`(`pm`) USING BTREE, + INDEX `type`(`category`, `type`, `link_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户账单表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_user_bill +-- ---------------------------- + +-- ---------------------------- +-- 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; + +-- ---------------------------- +-- Records of yx_user_enter +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_user_extract +-- ---------------------------- +DROP TABLE IF EXISTS `yx_user_extract`; +CREATE TABLE `yx_user_extract` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `uid` bigint(20) 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` datetime(0) NULL DEFAULT NULL, + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `status` tinyint(2) NULL DEFAULT 0 COMMENT '-1 未通过 0 审核中 1 已提现', + `wechat` varchar(15) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '微信号', + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + INDEX `extract_type`(`extract_type`) USING BTREE, + INDEX `status`(`status`) USING BTREE, + INDEX `add_time`(`create_time`) USING BTREE, + INDEX `openid`(`uid`) USING BTREE, + INDEX `fail_time`(`fail_time`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户提现表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_user_extract +-- ---------------------------- + +-- ---------------------------- +-- 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; + +-- ---------------------------- +-- Records of yx_user_group +-- ---------------------------- + +-- ---------------------------- +-- 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` bigint(20) 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=删除', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `discount` int(11) NOT NULL DEFAULT 0 COMMENT '享受折扣', + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id`(`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 10 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户等级记录表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_user_level +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_user_recharge +-- ---------------------------- +DROP TABLE IF EXISTS `yx_user_recharge`; +CREATE TABLE `yx_user_recharge` ( + `id` bigint(20) UNSIGNED NOT NULL AUTO_INCREMENT, + `uid` bigint(20) NULL DEFAULT NULL COMMENT '充值用户UID', + `nickname` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_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` datetime(0) NULL DEFAULT NULL COMMENT '充值支付时间', + `create_time` datetime(0) NULL DEFAULT NULL COMMENT '充值时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `refund_price` decimal(10, 2) NULL DEFAULT 0.00 COMMENT '退款金额', + `is_del` tinyint(4) NULL DEFAULT 0, + 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 = 1 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户充值表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_user_recharge +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_user_sign +-- ---------------------------- +DROP TABLE IF EXISTS `yx_user_sign`; +CREATE TABLE `yx_user_sign` ( + `int` bigint(20) NOT NULL AUTO_INCREMENT, + `uid` bigint(20) 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 '剩余积分', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`int`) USING BTREE, + INDEX `uid`(`uid`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 19 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '签到记录表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_user_sign +-- ---------------------------- +INSERT INTO `yx_user_sign` VALUES (17, 43, '签到奖励', 10, 10, '2020-09-12 17:41:55', NULL, 0); +INSERT INTO `yx_user_sign` VALUES (18, 44, '签到奖励', 10, 0, '2020-09-13 22:21:57', NULL, 0); + +-- ---------------------------- +-- 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` bigint(20) NOT NULL DEFAULT 0 COMMENT '用户id', + `status` tinyint(1) NOT NULL DEFAULT 0 COMMENT '是否有效', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `is_del` tinyint(1) NULL DEFAULT 0, + PRIMARY KEY (`id`) USING BTREE, + UNIQUE INDEX `id`(`id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 9 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '用户任务完成记录表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_user_task_finish +-- ---------------------------- + +-- ---------------------------- +-- Table structure for yx_wechat_live +-- ---------------------------- +DROP TABLE IF EXISTS `yx_wechat_live`; +CREATE TABLE `yx_wechat_live` ( + `room_id` bigint(11) NOT NULL COMMENT '直播间id', + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '直播间标题', + `cover_imge` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '背景图', + `share_imge` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '分享图片', + `live_status` int(9) NULL DEFAULT NULL COMMENT '直播间状态', + `start_time` bigint(11) NULL DEFAULT NULL COMMENT '开始时间', + `end_time` bigint(11) NULL DEFAULT NULL COMMENT '预计结束时间', + `anchor_name` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主播昵称', + `anchor_wechat` varchar(32) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主播微信号', + `anchor_imge` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '主播头像', + `type` tinyint(1) NULL DEFAULT NULL COMMENT '直播间类型 1:推流 0:手机直播', + `screen_type` tinyint(1) NULL DEFAULT NULL COMMENT '横屏、竖屏 【1:横屏,0:竖屏】', + `close_like` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭点赞 【0:开启,1:关闭】', + `close_comment` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭评论 【0:开启,1:关闭】', + `close_goods` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭货架 【0:开启,1:关闭】', + `product_id` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '商品id 多个,分割', + `close_replay` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭回放【0:开启,1:关闭】', + `close_share` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭分享【0:开启,1:关闭】', + `close_kf` tinyint(1) NULL DEFAULT NULL COMMENT '是否关闭客服【0:开启,1:关闭】', + PRIMARY KEY (`room_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信小程序直播表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_wechat_live +-- ---------------------------- +INSERT INTO `yx_wechat_live` VALUES (20, '专业打印', 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg', 'https://app2.yixiang.co/file/pic/20200903171807584910.jpg', 107, 1599656400, 1599703200, '阳光正好', 'simpleton_boy', 'https://app2.yixiang.co/file/pic/20200903171208889668.png', 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); +INSERT INTO `yx_wechat_live` VALUES (21, '广告板定制', 'https://app2.yixiang.co/file/pic/20200903171807568739.jpg', 'https://app2.yixiang.co/file/pic/20200903171807568739.jpg', 103, 1599730609, 1599730645, 'yshop', 'simpleton_boy', 'https://app2.yixiang.co/file/pic/20200903171208889668.png', 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); +INSERT INTO `yx_wechat_live` VALUES (22, '户外写真背胶', 'https://app2.yixiang.co/file/pic/20200903171807625149.jpg', 'https://app2.yixiang.co/file/pic/20200903171807625149.jpg', 107, 1599832800, 1599904800, 'yshop', 'simpleton_boy', 'https://app2.yixiang.co/file/pic/20200903171208889668.png', 0, 0, 0, 0, 0, NULL, NULL, NULL, NULL); +INSERT INTO `yx_wechat_live` VALUES (23, '彩色复印-量大有优惠', 'https://app2.yixiang.co/file/pic/20200903171807647067.jpg', 'https://app2.yixiang.co/file/pic/20200903171807647067.jpg', 102, 1599865200, 1599926400, 'yshop', 'zimengzhiqiu', 'https://app2.yixiang.co/file/pic/20200903171807647067.jpg', 0, 0, 0, 0, 0, '9,8', NULL, NULL, NULL); +INSERT INTO `yx_wechat_live` VALUES (26, 'X型展架', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 'https://image.dayouqiantu.cn/5ca081af6183f.jpg', 102, 1599872400, 1599926400, 'yshop', 'zimengzhiqiu', 'https://app2.yixiang.co/file/pic/20200903171208889668.png', 0, 0, 0, 0, 0, '9,8,7', NULL, NULL, NULL); + +-- ---------------------------- +-- Table structure for yx_wechat_live_goods +-- ---------------------------- +DROP TABLE IF EXISTS `yx_wechat_live_goods`; +CREATE TABLE `yx_wechat_live_goods` ( + `goods_id` bigint(9) NOT NULL COMMENT '直播商品id', + `product_id` bigint(9) NULL DEFAULT NULL COMMENT '关联商品id', + `cover_imge_url` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品图片', + `url` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品小程序路径', + `price_type` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '价格类型 1:一口价(只需要传入price,price2不传) 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传) 3:显示折扣价(price字段为原价,price2字段为现价, price和price2必传)', + `price` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL, + `price2` varchar(64) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL, + `name` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL COMMENT '商品名称', + `third_party_tag` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NULL DEFAULT NULL COMMENT '1, 2:表示是为api添加商品,否则是直播控制台添加的商品', + `audit_id` bigint(20) NULL DEFAULT NULL COMMENT '审核单id', + `audit_status` int(1) UNSIGNED ZEROFILL NULL DEFAULT NULL COMMENT '审核状态 0:未审核,1:审核中,2:审核通过,3审核失败', + PRIMARY KEY (`goods_id`) USING BTREE +) ENGINE = InnoDB CHARACTER SET = utf8mb4 COLLATE = utf8mb4_general_ci COMMENT = '微信小程序直播商品表' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_wechat_live_goods +-- ---------------------------- +INSERT INTO `yx_wechat_live_goods` VALUES (7, 6, 'https://image.dayouqiantu.cn/news.png', 'pages/shop/GoodsCon/index.html?id=30', '3', '76', '11', '印刷各种印刷', '2', 447137937, 2); +INSERT INTO `yx_wechat_live_goods` VALUES (8, 5, 'https://image.dayouqiantu.cn/pink.png', 'pages/shop/GoodsCon/index.html?id=30', '3', '30', '11', '广告版定制', '2', 447137941, 2); +INSERT INTO `yx_wechat_live_goods` VALUES (9, 4, 'https://image.dayouqiantu.cn/news.png', 'pages/shop/GoodsCon/index.html?id=30', '3', '23', '1', '户外写真背胶', '2', 447137947, 2); + +-- ---------------------------- +-- 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; + +-- ---------------------------- +-- Records of yx_wechat_media +-- ---------------------------- + +-- ---------------------------- +-- 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', + `create_time` datetime(0) NOT NULL COMMENT '添加时间', + `update_time` datetime(0) NULL DEFAULT NULL, + `status` tinyint(4) NOT NULL DEFAULT 0 COMMENT '状态', + `is_del` tinyint(1) NULL DEFAULT 0, + `type` varchar(30) CHARACTER SET utf8 COLLATE utf8_general_ci NULL DEFAULT NULL COMMENT '类型:template:模板消息 subscribe:订阅消息', + PRIMARY KEY (`id`) USING BTREE, + INDEX `tempkey`(`tempkey`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 16 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '微信模板' ROW_FORMAT = DYNAMIC; + +-- ---------------------------- +-- Records of yx_wechat_template +-- ---------------------------- +INSERT INTO `yx_wechat_template` VALUES (3, 'delivery_success', '订单发货提醒', '{{first.DATA}}\n订单编号:{{keyword1.DATA}}\n物流公司:{{keyword2.DATA}}\n物流单号:{{keyword3.DATA}}\n{{remark.DATA}}', 'NyrkeQ5TDFDq0GV0wkNA9L39GzPHfzbQqVLnbA5OTsY', '2020-06-25 18:54:35', '2020-07-06 15:52:09', 1, 1, NULL); +INSERT INTO `yx_wechat_template` VALUES (13, 'pay_success', '订单支付成功通知', '{{first.DATA}}\n订单编号:{{keyword1.DATA}}\n支付金额:{{keyword2.DATA}}\n{{remark.DATA}}', 'W5r2c2kzhbq8uxStkPAVx_sk-5aapMFCqe7b7KU5jXI', '2020-06-25 18:54:35', '2020-09-14 12:51:34', 1, 0, 'subscribe'); +INSERT INTO `yx_wechat_template` VALUES (14, 'recharge_success', '帐户资金变动提醒', '{{first.DATA}}\n变动类型:{{keyword1.DATA}}\n变动时间:{{keyword2.DATA}}\n变动金额:{{keyword3.DATA}}\n{{remark.DATA}}', 'ePF4RS3ONCEuS9AuPyqZ2Th_B-HZ6E1CIpnJRt7ACwI', '2020-06-25 18:54:35', '2020-07-06 15:51:54', 1, 0, NULL); +INSERT INTO `yx_wechat_template` VALUES (15, 'refund_success', '退款进度通知', '', 'jaDVkOdbbk01WcWSxp1_liEQen44-euhj7shxjDvLIc', '2020-07-06 15:53:10', NULL, 0, 0, NULL); + + + +-- ---------------------------- +-- Table structure for yx_store_canvas +-- ---------------------------- +DROP TABLE IF EXISTS `yx_store_canvas`; +CREATE TABLE `yx_store_canvas` ( + `canvas_id` bigint(11) NOT NULL AUTO_INCREMENT COMMENT '画布id', + `terminal` tinyint(1) NOT NULL COMMENT '终端 1-小程序 2-H5 3-APP 4-PC', + `json` text CHARACTER SET utf8 COLLATE utf8_general_ci NULL COMMENT '画布json数据', + `type` tinyint(1) NULL DEFAULT 1 COMMENT '类型 1-系统画布 2-自定义页面 3-商家店铺装修', + `name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL DEFAULT '' COMMENT '名称', + `shop_id` bigint(20) NULL DEFAULT 0 COMMENT '店铺id,当type=3的时候,值为具体的店铺id,其它情况为0', + `create_time` timestamp(0) NULL DEFAULT NULL COMMENT '创建时间', + `update_time` timestamp(0) NULL DEFAULT NULL COMMENT '修改时间', + `is_del` tinyint(1) NULL DEFAULT NULL COMMENT '删除标识', + PRIMARY KEY (`canvas_id`) USING BTREE +) ENGINE = InnoDB AUTO_INCREMENT = 12 CHARACTER SET = utf8 COLLATE = utf8_general_ci COMMENT = '画布信息表' ROW_FORMAT = Dynamic; + +-- ---------------------------- +-- Records of yx_store_canvas +-- ---------------------------- +INSERT INTO `yx_store_canvas` VALUES (11, 3, '[{\"title\":\"店铺头部\",\"type\":\"header\",\"componentContent\":{\"title\":\"Yshop\"},\"index\":0},{\"title\":\"搜索商品\",\"type\":\"search\",\"componentContent\":{},\"index\":1},{\"title\":\"轮播图\",\"type\":\"banner\",\"componentContent\":{\"bannerData\":[{\"pic\":\"./static/img/banner.f96c3f5.png\",\"name\":\"0\",\"sort\":0,\"url\":\"/\",\"status\":1}]},\"index\":2},{\"title\":\"滚动新闻\",\"type\":\"noticeBar\",\"componentContent\":{\"roll\":[{\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"url\":\"/news_list\",\"info\":\"yshop基于springboot2+Mybatisplus商城系统,3.0版本重构了代码,新增了运费模板、sku单独管理、商品券等\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\"}]},\"index\":3},{\"title\":\"菜单\",\"type\":\"menu\",\"componentContent\":{\"menus\":[{\"imageArr\":[\"https://image.dayouqiantu.cn/5e85bfa61251d.png\"],\"uniapp_url\":\"/pages/shop/GoodsList/index\",\"name\":\"全部商品\",\"id\":180,\"pic\":\"https://image.dayouqiantu.cn/all.png\",\"sort\":9,\"url\":\"/goods_list\",\"wxapp_url\":\"/pages/shop/GoodsClass/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/news.png\"],\"uniapp_url\":\"/pages/shop/news/NewsList/index\",\"name\":\"图文资讯\",\"id\":196,\"pic\":\"https://image.dayouqiantu.cn/xw.png\",\"sort\":8,\"url\":\"/news_list\",\"wxapp_url\":\"/pages/shop/news/NewsList/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/5e4e939507b5e.png\"],\"uniapp_url\":\"/pages/shop/GoodsCollection/index\",\"name\":\"我的收藏\",\"id\":197,\"pic\":\"https://image.dayouqiantu.cn/colle.png\",\"sort\":7,\"url\":\"/collection\",\"wxapp_url\":\"/pages/shop/GoodsCollection/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/coupon.png\"],\"uniapp_url\":\"\",\"name\":\"优惠券\",\"id\":199,\"pic\":\"https://image.dayouqiantu.cn/cou.png\",\"sort\":6,\"url\":\"/user/get_coupon\",\"wxapp_url\":\"/pages/user/coupon/GetCoupon/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/pink.png\"],\"uniapp_url\":\"/pages/activity/GoodsGroup/index\",\"name\":\"拼团专区\",\"id\":200,\"pic\":\"https://image.dayouqiantu.cn/62ac09d2914d36c65b9b59d2147d809a.png\",\"sort\":5,\"url\":\"/activity/group\",\"wxapp_url\":\"/pages/activity/GoodsGroup/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/sign.png\"],\"uniapp_url\":\"/pages/user/signIn/Sign/index\",\"name\":\"积分签到\",\"id\":209,\"pic\":\"https://image.dayouqiantu.cn/29ea4acebbf99e7eaf6f85af2b6d79ae.png\",\"sort\":4,\"url\":\"/user/sign\",\"wxapp_url\":\"/pages/user/signIn/Sign/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/sekill.png\"],\"uniapp_url\":\"/pages/activity/GoodsSeckill/index\",\"name\":\"秒杀专区\",\"id\":216,\"pic\":\"https://image.dayouqiantu.cn/b0344c148141b50d68db9722708ea49e.png\",\"sort\":3,\"url\":\"/activity/goods_seckill\",\"wxapp_url\":\"/pages/activity/GoodsSeckill/main\",\"status\":1},{\"imageArr\":[\"https://image.dayouqiantu.cn/bargin.png\"],\"uniapp_url\":\"/pages/activity/GoodsBargain/index\",\"name\":\"砍价专区\",\"id\":217,\"pic\":\"https://image.dayouqiantu.cn/bar.png\",\"sort\":2,\"url\":\"/activity/bargain\",\"wxapp_url\":\"/pages/activity/GoodsBargain/main\",\"status\":1}]},\"index\":4},{\"title\":\"广告\",\"type\":\"adv\",\"componentContent\":{\"detail\":{\"list\":[{\"image\":\"https://wx.yixiang.co/static/images/index001.png\",\"url\":\"\",\"uniapp_url\":\"/pages/user/coupon/GetCoupon/index\",\"wxapp_url\":\"/pages/user/coupon/GetCoupon/index\",\"path_type\":1},{\"image\":\"https://wx.yixiang.co/static/images/index002.png\",\"url\":\"\",\"uniapp_url\":\"/pages/shop/GoodsList/index\",\"wxapp_url\":\"/pages/shop/GoodsList/index\",\"path_type\":1},{\"image\":\"https://wx.yixiang.co/static/images/index003.png\",\"url\":\"\",\"uniapp_url\":\"/pages/shop/GoodsList/index?title=\\\"积分商城\\\"&isIntegral=true\",\"wxapp_url\":\"/pages/shop/GoodsList/index?title=\\\"积分商城\\\"&isIntegral=true\",\"path_type\":1}],\"name\":\"\",\"style\":3}},\"index\":5},{\"title\":\"热门榜单\",\"type\":\"hotCommodity\",\"componentContent\":{},\"index\":6},{\"title\":\"为您推荐\",\"type\":\"promotionGood\",\"componentContent\":{},\"index\":7}]', 1, '1', 0, '2021-02-25 19:36:06', '2021-02-25 22:39:55', 0); + +SET FOREIGN_KEY_CHECKS = 1; diff --git "a/sql/\344\277\256\346\224\271\347\263\273\347\273\237\350\241\250\345\222\214\345\267\245\345\205\267\347\233\270\345\205\263\350\241\250sql.sql" "b/sql/\344\277\256\346\224\271\347\263\273\347\273\237\350\241\250\345\222\214\345\267\245\345\205\267\347\233\270\345\205\263\350\241\250sql.sql" new file mode 100644 index 0000000000000000000000000000000000000000..1a02928fb69933b71a53ac1ae851006340889cc2 --- /dev/null +++ "b/sql/\344\277\256\346\224\271\347\263\273\347\273\237\350\241\250\345\222\214\345\267\245\345\205\267\347\233\270\345\205\263\350\241\250sql.sql" @@ -0,0 +1,40 @@ + +rename table role to sys_role; + +rename table roles_depts to sys_roles_depts; + +rename table users_roles to sys_users_roles; + +rename table roles_menus to sys_roles_menus; + +rename table menu to sys_menu; + +rename table dept to sys_dept; + +rename table dict to sys_dict; + +rename table dict_detail to sys_dict_detail; + +rename table job to sys_job; + +rename table log to sys_log; + +rename table user to sys_user; + +rename table user_avatar to sys_user_avatar; + +rename table visits to sys_visits; + +rename table alipay_config to tools_alipay_config; + +rename table email_config to tools_email_config; + +rename table local_storage to tools_local_storage; + +rename table picture to tools_picture; + +rename table qiniu_config to tools_qiniu_config; + +rename table qiniu_content to tools_qiniu_content; + +rename table verification_code to tools_verification_code; diff --git "a/sql/\346\226\260\345\242\236\345\224\256\345\220\216\347\233\270\345\205\263sql\345\242\236\351\207\217sql" "b/sql/\346\226\260\345\242\236\345\224\256\345\220\216\347\233\270\345\205\263sql\345\242\236\351\207\217sql" new file mode 100644 index 0000000000000000000000000000000000000000..4faaecb31ecdfd5791f2bb606a6d9008ced7455b --- /dev/null +++ "b/sql/\346\226\260\345\242\236\345\224\256\345\220\216\347\233\270\345\205\263sql\345\242\236\351\207\217sql" @@ -0,0 +1,55 @@ +CREATE TABLE `yx_store_after_sales_status` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `store_after_sales_id` bigint(20) DEFAULT NULL COMMENT '售后id', + `change_type` tinyint(1) DEFAULT NULL COMMENT '操作类型', + `change_message` varchar(128) COLLATE utf8_bin DEFAULT NULL COMMENT '操作备注', + `change_time` datetime DEFAULT NULL COMMENT '操作时间', + `operator` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '操作人', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=18 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='售后订单操作详情表'; + +CREATE TABLE `yx_store_after_sales_item` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT COMMENT '主键id', + `store_after_sales_id` bigint(20) DEFAULT NULL COMMENT '售后id', + `product_id` bigint(20) DEFAULT NULL COMMENT '商品id', + `cart_info` text COLLATE utf8_bin NOT NULL COMMENT '退货东西的详情信息', + `is_del` bit(1) DEFAULT NULL COMMENT '逻辑删除', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=9 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='售后子表'; + + +CREATE TABLE `yx_store_after_sales` ( + `id` bigint(20) NOT NULL AUTO_INCREMENT, + `order_code` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '订单号', + `refund_amount` decimal(32,8) DEFAULT NULL COMMENT '退款金额', + `service_type` tinyint(1) DEFAULT NULL COMMENT '服务类型0仅退款1退货退款', + `reasons` text COLLATE utf8_bin COMMENT '申请原因', + `explains` text COLLATE utf8_bin COMMENT '说明', + `explain_img` text COLLATE utf8_bin COMMENT '说明图片->多个用逗号分割', + `shipper_code` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '物流公司编码', + `delivery_sn` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '物流单号', + `delivery_name` varchar(32) COLLATE utf8_bin DEFAULT NULL COMMENT '物流名称', + `state` tinyint(1) DEFAULT NULL COMMENT '状态 0已提交等待平台审核 1平台已审核 等待用户发货/退款 2 用户已发货 3退款成功', + `sales_state` tinyint(1) DEFAULT NULL COMMENT '售后状态-0正常1用户取消2商家拒绝', + `create_time` datetime DEFAULT NULL COMMENT '添加时间', + `is_del` tinyint(1) DEFAULT NULL COMMENT '逻辑删除', + `user_id` bigint(20) DEFAULT NULL COMMENT '用户id', + `consignee` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '商家收货人', + `phone_number` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '商家手机号', + `address` varchar(255) COLLATE utf8_bin DEFAULT NULL COMMENT '商家地址', + PRIMARY KEY (`id`) +) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8 COLLATE=utf8_bin COMMENT='售后记录表'; + + +ALTER TABLE yx_store_order_cart_info ADD COLUMN is_after_sales tinyint(1) unsigned zerofill DEFAULT '0' COMMENT '是否能售后 0不能1能'; + + +INSERT INTO `sys_menu` VALUES (266, b'0', '售后', 'shop/afterSeals/index', 53, 44, 'order', 'afterSeals', b'0', b'0', 'AfterSeals', '2021-06-30 15:23:38', 'yxStoreAfterSales:list', 1, '2021-06-30 15:33:14', 0); +INSERT INTO `sys_menu` VALUES (267, b'0', '新增', NULL, 266, 999, NULL, NULL, b'0', b'0', '-', '2021-06-30 15:34:17', 'yxStoreAfterSales:add', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (268, b'0', '修改', NULL, 266, 999, NULL, NULL, b'0', b'0', '-', '2021-06-30 15:34:39', 'yxStoreAfterSales:edit', 2, NULL, 0); +INSERT INTO `sys_menu` VALUES (269, b'0', '删除', NULL, 266, 999, NULL, NULL, b'0', b'0', '-', '2021-06-30 15:34:55', 'yxStoreAfterSales:del', 2, NULL, 0); + +INSERT INTO `sys_roles_menus` VALUES (266, 1); +INSERT INTO `sys_roles_menus` VALUES (267, 1); +INSERT INTO `sys_roles_menus` VALUES (268, 1); +INSERT INTO `sys_roles_menus` VALUES (269, 1); diff --git a/yshop-admin/Dockerfile b/yshop-admin/Dockerfile new file mode 100644 index 0000000000000000000000000000000000000000..978257251342dcaf7e3378650a7a70acd4d9c982 --- /dev/null +++ b/yshop-admin/Dockerfile @@ -0,0 +1,18 @@ +FROM moxm/java:1.8-full as builder + +MAINTAINER wangiegie@gmail.com + +ENV TZ=Asia/Shanghai +ENV JAVA_OPTS="-Xms128m -Xmx256m -Djava.security.egd=file:/dev/./urandom" + +RUN ln -sf /usr/share/zoneinfo/$TZ /etc/localtime && echo $TZ > /etc/timezone + +RUN mkdir -p /yshop-admin + +WORKDIR /yshop-admin + +EXPOSE 8001 + +ADD ./target/yshop-admin-3.3.jar ./ + +CMD java $JAVA_OPTS -jar yshop-admin-3.3.jar --spring.profiles.active=docker diff --git a/yshop-admin/pom.xml b/yshop-admin/pom.xml index a7b4d63d32963b6ef36c6f6d1c2ecf176d05a0ad..af2e5320f4921cd0d34122a332bf050d029b70ff 100644 --- a/yshop-admin/pom.xml +++ b/yshop-admin/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.3 + 3.3 4.0.0 @@ -21,7 +21,7 @@ co.yixiang yshop-generator - 2.3 + 3.3 co.yixiang @@ -32,34 +32,14 @@ co.yixiang yshop-shop - 2.3 + 3.3 - - co.yixiang - yshop-oss - 2.3 - - - co.yixiang - yshop-mproot - 2.3 - - - - - - - - - - - - org.springframework.boot spring-boot-starter-websocket + io.jsonwebtoken @@ -84,22 +64,33 @@ - org.quartz-scheduler - quartz + org.springframework.boot + spring-boot-starter-quartz - + - ch.ethz.ganymed - ganymed-ssh2 - build210 + co.yixiang + yshop-weixin + 3.3 + + + org.springframework.boot + spring-boot-starter-security + + - - com.jcraft - jsch - 0.1.55 + org.springframework.security + spring-security-core + + + org.springframework.security + spring-security-web + + + org.springframework.security + spring-security-config - diff --git a/yshop-admin/src/main/java/co/yixiang/AppRun.java b/yshop-admin/src/main/java/co/yixiang/AppRun.java index 4e174de66eb6c91b2586015a8984f3e75c4a6199..48238f1f6516602f7c0b468b31c8a57bc6c944d1 100644 --- a/yshop-admin/src/main/java/co/yixiang/AppRun.java +++ b/yshop-admin/src/main/java/co/yixiang/AppRun.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang; @@ -28,19 +30,19 @@ import org.springframework.web.bind.annotation.RestController; @RestController @SpringBootApplication(exclude = {WxMaAutoConfiguration.class}) @EnableTransactionManagement -@MapperScan(basePackages = {"co.yixiang.modules.*.service.mapper", "co.yixiang.config"}) +@MapperScan(basePackages ={"co.yixiang.modules.*.service.mapper", "co.yixiang.config"}) public class AppRun { public static void main(String[] args) { SpringApplication.run(AppRun.class, args); System.out.println( - " __ \n" + - " __ __ ___ / / ___ ___ \n" + - " / // /(_-< / _ \\/ _ \\ / _ \\ \n" + - " \\_, //___//_//_/\\___// .__/ \n" + - "/___/ /_/ \n " + + " __ \n" + + " __ __ ___ / / ___ ___ \n" + + " / // /(_-< / _ \\/ _ \\ / _ \\ \n" + + " \\_, //___//_//_/\\___// .__/ \n" + + "/___/ /_/ \n "+ - "\n意象yshop电商系统管理后台启动成功 \n官网:https://www.yixiang.co 提供技术支持゙ \n"); + "\n意象yshop电商系统管理后台启动成功 \n官网:https://www.yixiang.co 提供技术支持゙ \n"); } @Bean diff --git a/yshop-admin/src/main/java/co/yixiang/config/ConfigurerAdapter.java b/yshop-admin/src/main/java/co/yixiang/config/ConfigurerAdapter.java index a0af286def0d781c2c90953be1c20ad710db7bae..650a61644d8c05863189e265f217fcbcf810b571 100644 --- a/yshop-admin/src/main/java/co/yixiang/config/ConfigurerAdapter.java +++ b/yshop-admin/src/main/java/co/yixiang/config/ConfigurerAdapter.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config; @@ -16,13 +15,16 @@ import org.springframework.web.servlet.config.annotation.EnableWebMvc; import org.springframework.web.servlet.config.annotation.ResourceHandlerRegistry; import org.springframework.web.servlet.config.annotation.WebMvcConfigurer; +import java.lang.reflect.Array; +import java.util.Arrays; + /** * WebMvcConfigurer * * @author hupeng * @date 2018-11-30 */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableWebMvc public class ConfigurerAdapter implements WebMvcConfigurer { @@ -58,8 +60,8 @@ public class ConfigurerAdapter implements WebMvcConfigurer { @Override public void addResourceHandlers(ResourceHandlerRegistry registry) { - String avatarUtl = "file:" + avatar.replace("\\", "/"); - String pathUtl = "file:" + path.replace("\\", "/"); + String avatarUtl = "file:" + avatar.replace("\\","/"); + String pathUtl = "file:" + path.replace("\\","/"); registry.addResourceHandler("/avatar/**").addResourceLocations(avatarUtl).setCachePeriod(0); registry.addResourceHandler("/file/**").addResourceLocations(pathUtl).setCachePeriod(0); registry.addResourceHandler("/**").addResourceLocations("classpath:/META-INF/resources/").setCachePeriod(0); diff --git a/yshop-admin/src/main/java/co/yixiang/config/CorsFilter.java b/yshop-admin/src/main/java/co/yixiang/config/CorsFilter.java new file mode 100644 index 0000000000000000000000000000000000000000..24b4d7e543ae14ae29f574da84e7e8e8a8c1666c --- /dev/null +++ b/yshop-admin/src/main/java/co/yixiang/config/CorsFilter.java @@ -0,0 +1,47 @@ +//package co.yixiang.config; +// +///** +// * @author :LionCity +// * @date :Created in 2020-12-21 13:38 +// * @description: +// * @modified By: +// * @version: +// */ +//import java.io.IOException; +// +//import javax.servlet.FilterChain; +//import javax.servlet.ServletException; +//import javax.servlet.http.HttpFilter; +//import javax.servlet.http.HttpServletRequest; +//import javax.servlet.http.HttpServletResponse; +// +//import co.yixiang.utils.StringUtils; +//import org.springframework.core.annotation.Order; +//import org.springframework.http.HttpHeaders; +//import org.springframework.stereotype.Component; +// +//@Component +//@Order(-9999) +//public class CorsFilter extends HttpFilter { +// +// /** +// * +// */ +// private static final long serialVersionUID = -8387103310559517243L; +// +// @Override +// protected void doFilter(HttpServletRequest req, HttpServletResponse res, FilterChain chain) throws IOException, ServletException { +// +// String origin = req.getHeader(HttpHeaders.ORIGIN); +// +// if (!StringUtils.isEmpty(origin)){ +// res.addHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_ORIGIN, origin); +// res.addHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_HEADERS, "Origin, x-requested-with, Content-Type, Accept, Authorization"); +// res.addHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_CREDENTIALS, "true"); +// res.addHeader(HttpHeaders.ACCESS_CONTROL_ALLOW_METHODS, "GET, POST, PUT, OPTIONS, DELETE"); +// res.addHeader(HttpHeaders.ACCESS_CONTROL_EXPOSE_HEADERS, "Cache-Control, Content-Language, Content-Type, Expires, Last-Modified, Pragma"); +// res.addHeader(HttpHeaders.ACCESS_CONTROL_MAX_AGE, "60"); +// } +// super.doFilter(req, res, chain); +// } +//} diff --git a/yshop-admin/src/main/java/co/yixiang/config/DataScope.java b/yshop-admin/src/main/java/co/yixiang/config/DataScope.java index 31223a55bf5560c2ed34c22ade01d084471d51ea..509c04ade812855626328bd29de20a3b0da125ac 100644 --- a/yshop-admin/src/main/java/co/yixiang/config/DataScope.java +++ b/yshop-admin/src/main/java/co/yixiang/config/DataScope.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config; @@ -28,7 +27,7 @@ import java.util.Set; @Component public class DataScope { - private final String[] scopeType = {"全部", "本级", "自定义"}; + private final String[] scopeType = {"全部","本级","自定义"}; private final UserService userService; @@ -55,7 +54,7 @@ public class DataScope { for (RoleSmallDto role : roleSet) { if (scopeType[0].equals(role.getDataScope())) { - return new HashSet<>(); + return new HashSet<>() ; } // 存储本级的数据权限 @@ -82,9 +81,9 @@ public class DataScope { public List getDeptChildren(List deptList) { List list = new ArrayList<>(); deptList.forEach(dept -> { - if (dept != null && dept.getEnabled()) { + if (dept!=null && dept.getEnabled()){ List depts = deptService.findByPid(dept.getId()); - if (deptList.size() != 0) { + if(deptList.size() != 0){ list.addAll(getDeptChildren(depts)); } list.add(dept.getId()); diff --git a/yshop-admin/src/main/java/co/yixiang/config/MybatisPlusConfig.java b/yshop-admin/src/main/java/co/yixiang/config/MybatisPlusConfig.java index c2033e076f129e0696fb1f8b1ccbe239610f5f11..5804907d590571e291b217339213f10a7dfbbe4e 100644 --- a/yshop-admin/src/main/java/co/yixiang/config/MybatisPlusConfig.java +++ b/yshop-admin/src/main/java/co/yixiang/config/MybatisPlusConfig.java @@ -1,14 +1,17 @@ package co.yixiang.config; +import com.baomidou.mybatisplus.annotation.DbType; import com.baomidou.mybatisplus.extension.plugins.MybatisPlusInterceptor; +import com.baomidou.mybatisplus.extension.plugins.inner.PaginationInnerInterceptor; import org.springframework.context.annotation.Bean; import org.springframework.context.annotation.Configuration; /** * MybatisPlus配置 + * */ -@Configuration +@Configuration(proxyBeanMethods = false) public class MybatisPlusConfig { /** @@ -16,6 +19,8 @@ public class MybatisPlusConfig { */ @Bean public MybatisPlusInterceptor mybatisPlusInterceptor() { - return new MybatisPlusInterceptor(); + MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor(); + interceptor.addInnerInterceptor(new PaginationInnerInterceptor(DbType.MYSQL)); + return interceptor; } } diff --git a/yshop-admin/src/main/java/co/yixiang/config/WebSocketConfig.java b/yshop-admin/src/main/java/co/yixiang/config/WebSocketConfig.java index 5918b9f81f9548d8391e3e1248b05034a03b4e55..87b66ae5750a89f439cae9700c52d00951080b29 100644 --- a/yshop-admin/src/main/java/co/yixiang/config/WebSocketConfig.java +++ b/yshop-admin/src/main/java/co/yixiang/config/WebSocketConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config; @@ -14,12 +13,12 @@ import org.springframework.web.socket.server.standard.ServerEndpointExporter; * @author: ZhangHouYing * @date: 2019-08-24 15:44 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class WebSocketConfig { - @Bean - public ServerEndpointExporter serverEndpointExporter() { - return new ServerEndpointExporter(); - } + @Bean + public ServerEndpointExporter serverEndpointExporter() { + return new ServerEndpointExporter(); + } } diff --git a/yshop-admin/src/main/java/co/yixiang/config/thread/AsyncTaskExecutePool.java b/yshop-admin/src/main/java/co/yixiang/config/thread/AsyncTaskExecutePool.java index 0bd7f7368b96d9dba3b44c8917affc362cc6023f..cd408595627388504ae8216444f352516cd79455 100644 --- a/yshop-admin/src/main/java/co/yixiang/config/thread/AsyncTaskExecutePool.java +++ b/yshop-admin/src/main/java/co/yixiang/config/thread/AsyncTaskExecutePool.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config.thread; @@ -21,7 +20,7 @@ import java.util.concurrent.ThreadPoolExecutor; * @date 2019年10月31日15:06:18 */ @Slf4j -@Configuration +@Configuration(proxyBeanMethods = false) public class AsyncTaskExecutePool implements AsyncConfigurer { /** 注入配置类 */ @@ -54,8 +53,8 @@ public class AsyncTaskExecutePool implements AsyncConfigurer { @Override public AsyncUncaughtExceptionHandler getAsyncUncaughtExceptionHandler() { return (throwable, method, objects) -> { - log.error("====" + throwable.getMessage() + "====", throwable); - log.error("exception method:" + method.getName()); + log.error("===="+throwable.getMessage()+"====", throwable); + log.error("exception method:"+method.getName()); }; } } diff --git a/yshop-admin/src/main/java/co/yixiang/config/thread/AsyncTaskProperties.java b/yshop-admin/src/main/java/co/yixiang/config/thread/AsyncTaskProperties.java index d696dc2aed91b8291857dac49e8ca19dbeb394c5..8f032d422a4ede64d2bff476c2cee9f62f35a747 100644 --- a/yshop-admin/src/main/java/co/yixiang/config/thread/AsyncTaskProperties.java +++ b/yshop-admin/src/main/java/co/yixiang/config/thread/AsyncTaskProperties.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config.thread; diff --git a/yshop-admin/src/main/java/co/yixiang/config/thread/TheadFactoryName.java b/yshop-admin/src/main/java/co/yixiang/config/thread/TheadFactoryName.java index 99503498b1eaee4d8683114041320ab5b255e8af..b9114813c553ae2d8a561d81600ad46fdcb0d40b 100644 --- a/yshop-admin/src/main/java/co/yixiang/config/thread/TheadFactoryName.java +++ b/yshop-admin/src/main/java/co/yixiang/config/thread/TheadFactoryName.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config.thread; @@ -28,7 +27,7 @@ public class TheadFactoryName implements ThreadFactory { this("el-pool"); } - private TheadFactoryName(String name) { + private TheadFactoryName(String name){ SecurityManager s = System.getSecurityManager(); group = (s != null) ? s.getThreadGroup() : Thread.currentThread().getThreadGroup(); @@ -41,7 +40,7 @@ public class TheadFactoryName implements ThreadFactory { public Thread newThread(Runnable r) { //此时线程的名字 就是 namePrefix + -thread- + 这个线程池中第几个执行的线程 Thread t = new Thread(group, r, - namePrefix + "-thread-" + threadNumber.getAndIncrement(), + namePrefix + "-thread-"+threadNumber.getAndIncrement(), 0); if (t.isDaemon()) { t.setDaemon(false); diff --git a/yshop-admin/src/main/java/co/yixiang/config/thread/ThreadPoolExecutorUtil.java b/yshop-admin/src/main/java/co/yixiang/config/thread/ThreadPoolExecutorUtil.java index 6fc3ae9895027e6c65a826da97409eaf6c5c3271..006d0b3150c17ab2437ec7f5e993076ade7694b9 100644 --- a/yshop-admin/src/main/java/co/yixiang/config/thread/ThreadPoolExecutorUtil.java +++ b/yshop-admin/src/main/java/co/yixiang/config/thread/ThreadPoolExecutorUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config.thread; @@ -19,7 +18,7 @@ import java.util.concurrent.TimeUnit; */ public class ThreadPoolExecutorUtil { - public static ThreadPoolExecutor getPoll() { + public static ThreadPoolExecutor getPoll(){ AsyncTaskProperties properties = SpringContextHolder.getBean(AsyncTaskProperties.class); return new ThreadPoolExecutor( properties.getCorePoolSize(), diff --git a/yshop-common/src/main/java/co/yixiang/exception/handler/ApiErr.java b/yshop-admin/src/main/java/co/yixiang/handler/ApiErr.java similarity index 86% rename from yshop-common/src/main/java/co/yixiang/exception/handler/ApiErr.java rename to yshop-admin/src/main/java/co/yixiang/handler/ApiErr.java index 0e462b389cce727c3201b655271759d54ce2ef18..494247baa6e3203d6a65811cd8da27fd491c3825 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/handler/ApiErr.java +++ b/yshop-admin/src/main/java/co/yixiang/handler/ApiErr.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.exception.handler; +package co.yixiang.handler; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; diff --git a/yshop-common/src/main/java/co/yixiang/exception/handler/ApiError.java b/yshop-admin/src/main/java/co/yixiang/handler/ApiError.java similarity index 84% rename from yshop-common/src/main/java/co/yixiang/exception/handler/ApiError.java rename to yshop-admin/src/main/java/co/yixiang/handler/ApiError.java index d2586f496a63e21a71c38883827cc09ee4f33c2f..9c5dbef30f2e04550fcc12f8a07f3d1402a99d61 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/handler/ApiError.java +++ b/yshop-admin/src/main/java/co/yixiang/handler/ApiError.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.exception.handler; +package co.yixiang.handler; import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; @@ -27,13 +26,13 @@ class ApiError { timestamp = LocalDateTime.now(); } - public static ApiError error(String message) { + public static ApiError error(String message){ ApiError apiError = new ApiError(); apiError.setMessage(message); return apiError; } - public static ApiError error(Integer status, String message) { + public static ApiError error(Integer status, String message){ ApiError apiError = new ApiError(); apiError.setStatus(status); apiError.setMessage(message); diff --git a/yshop-common/src/main/java/co/yixiang/exception/handler/GlobalExceptionHandler.java b/yshop-admin/src/main/java/co/yixiang/handler/GlobalExceptionHandler.java similarity index 89% rename from yshop-common/src/main/java/co/yixiang/exception/handler/GlobalExceptionHandler.java rename to yshop-admin/src/main/java/co/yixiang/handler/GlobalExceptionHandler.java index 6e3acb3da60d1ecf37f12ac48481207a7dd83602..36194d7601852687028d4942073c6e461ea3caf6 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/handler/GlobalExceptionHandler.java +++ b/yshop-admin/src/main/java/co/yixiang/handler/GlobalExceptionHandler.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.exception.handler; +package co.yixiang.handler; import co.yixiang.exception.BadRequestException; import co.yixiang.exception.EntityExistException; @@ -37,7 +36,7 @@ public class GlobalExceptionHandler { * 处理所有不可知的异常 */ @ExceptionHandler(Throwable.class) - public ResponseEntity handleException(Throwable e) { + public ResponseEntity handleException(Throwable e){ // 打印堆栈信息 log.error(ThrowableUtil.getStackTrace(e)); return buildResponseEntity(ApiError.error(e.getMessage())); @@ -47,7 +46,7 @@ public class GlobalExceptionHandler { * BadCredentialsException */ @ExceptionHandler(BadCredentialsException.class) - public ResponseEntity badCredentialsException(BadCredentialsException e) { + public ResponseEntity badCredentialsException(BadCredentialsException e){ // 打印堆栈信息 String message = "坏的凭证".equals(e.getMessage()) ? "用户名或密码不正确" : e.getMessage(); log.error(message); @@ -57,12 +56,12 @@ public class GlobalExceptionHandler { /** * 处理自定义异常 */ - @ExceptionHandler(value = BadRequestException.class) - public ResponseEntity badRequestException(BadRequestException e) { + @ExceptionHandler(value = BadRequestException.class) + public ResponseEntity badRequestException(BadRequestException e) { // 打印堆栈信息 log.error(ThrowableUtil.getStackTrace(e)); - return buildResponseEntity(ApiError.error(e.getStatus(), e.getMessage())); - } + return buildResponseEntity(ApiError.error(e.getStatus(),e.getMessage())); + } /** * 处理自定义异常 @@ -73,7 +72,7 @@ public class GlobalExceptionHandler { public ResponseEntity errorRequestException(ErrorRequestException e) { // 打印堆栈信息 log.error(ThrowableUtil.getStackTrace(e)); - ApiErr apiError = new ApiErr(e.getStatus(), e.getMessage()); + ApiErr apiError = new ApiErr(e.getStatus(),e.getMessage()); return buildResponseEntity2(apiError); } @@ -94,20 +93,20 @@ public class GlobalExceptionHandler { public ResponseEntity entityNotFoundException(EntityNotFoundException e) { // 打印堆栈信息 log.error(ThrowableUtil.getStackTrace(e)); - return buildResponseEntity(ApiError.error(NOT_FOUND.value(), e.getMessage())); + return buildResponseEntity(ApiError.error(NOT_FOUND.value(),e.getMessage())); } /** * 处理所有接口数据验证异常 */ @ExceptionHandler(MethodArgumentNotValidException.class) - public ResponseEntity handleMethodArgumentNotValidException(MethodArgumentNotValidException e) { + public ResponseEntity handleMethodArgumentNotValidException(MethodArgumentNotValidException e){ // 打印堆栈信息 log.error(ThrowableUtil.getStackTrace(e)); String[] str = Objects.requireNonNull(e.getBindingResult().getAllErrors().get(0).getCodes())[1].split("\\."); String message = e.getBindingResult().getAllErrors().get(0).getDefaultMessage(); String msg = "不能为空"; - if (msg.equals(message)) { + if(msg.equals(message)){ message = str[1] + ":" + message; } return buildResponseEntity(ApiError.error(message)); diff --git a/yshop-admin/src/main/java/co/yixiang/modules/monitor/config/VisitsInitialization.java b/yshop-admin/src/main/java/co/yixiang/modules/monitor/config/VisitsInitialization.java index b3cd27c449c031609db125d665d590634235c051..9abe0e0fcd54170297b3c339e2019a9232c70830 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/monitor/config/VisitsInitialization.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/monitor/config/VisitsInitialization.java @@ -3,14 +3,12 @@ package co.yixiang.modules.monitor.config; import co.yixiang.modules.monitor.service.VisitsService; import org.springframework.boot.ApplicationArguments; import org.springframework.boot.ApplicationRunner; -import org.springframework.stereotype.Component; /** * 初始化站点统计 - * * @author Zheng Jie */ -@Component +//@Component public class VisitsInitialization implements ApplicationRunner { private final VisitsService visitsService; @@ -20,9 +18,9 @@ public class VisitsInitialization implements ApplicationRunner { } @Override - public void run(ApplicationArguments args) { + public void run(ApplicationArguments args){ System.out.println("--------------- 初始化站点统计,如果存在今日统计则跳过 ---------------"); visitsService.save(); System.out.println("--------------- 初始化站点统计完成 ---------------"); } -} \ No newline at end of file +} diff --git a/yshop-admin/src/main/java/co/yixiang/modules/monitor/domain/Visits.java b/yshop-admin/src/main/java/co/yixiang/modules/monitor/domain/Visits.java index 060c1154654c92762bfcb75116f926537ce516ae..c6599293d9813716b89c9459ec12821fba2baa4f 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/monitor/domain/Visits.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/monitor/domain/Visits.java @@ -16,7 +16,7 @@ import java.sql.Timestamp; * @date 2018-12-13 */ @Data -@TableName("visits") +@TableName( "sys_visits") public class Visits implements Serializable { @TableId diff --git a/yshop-admin/src/main/java/co/yixiang/modules/monitor/rest/RedisController.java b/yshop-admin/src/main/java/co/yixiang/modules/monitor/rest/RedisController.java index f25e5c7a5ed96a8956e83ef250eb751722a9fb73..3833f2c883dd5f0633685b7fadaf8cff616ef313 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/monitor/rest/RedisController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/monitor/rest/RedisController.java @@ -10,7 +10,11 @@ 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 org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** * @author Zheng Jie @@ -27,16 +31,15 @@ public class RedisController { @Log("查询Redis缓存") @GetMapping(value = "/redis") @PreAuthorize("hasAnyRole('ADMIN','REDIS_ALL','REDIS_SELECT')") - public ResponseEntity getRedis(String key, Pageable pageable) { - return new ResponseEntity(redisService.findByKey(key, pageable), HttpStatus.OK); + public ResponseEntity getRedis(String key, Pageable pageable){ + return new ResponseEntity(redisService.findByKey(key,pageable), HttpStatus.OK); } @ForbidSubmit @Log("删除Redis缓存") @DeleteMapping(value = "/redis") @PreAuthorize("hasAnyRole('ADMIN','REDIS_ALL','REDIS_DELETE')") - public ResponseEntity delete(@RequestBody RedisVo resources) { - + public ResponseEntity delete(@RequestBody RedisVo resources){ redisService.delete(resources.getKey()); return new ResponseEntity(HttpStatus.OK); } @@ -45,8 +48,7 @@ public class RedisController { @Log("清空Redis缓存") @DeleteMapping(value = "/redis/all") @PreAuthorize("hasAnyRole('ADMIN','REDIS_ALL','REDIS_DELETE')") - public ResponseEntity deleteAll() { - + public ResponseEntity deleteAll(){ redisService.flushdb(); return new ResponseEntity(HttpStatus.OK); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/monitor/rest/VisitsController.java b/yshop-admin/src/main/java/co/yixiang/modules/monitor/rest/VisitsController.java index 35a0a5cc1880729ca837579da25a80b260a782a6..6ce3a61258a9cf8cfef2b7b1b614e205fe7139b8 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/monitor/rest/VisitsController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/monitor/rest/VisitsController.java @@ -28,20 +28,20 @@ public class VisitsController { @PostMapping @ApiOperation("创建访问记录") - public ResponseEntity create() { + public ResponseEntity create(){ visitsService.count(RequestHolder.getHttpServletRequest()); return new ResponseEntity<>(HttpStatus.CREATED); } @GetMapping @ApiOperation("查询") - public ResponseEntity get() { - return new ResponseEntity<>(visitsService.get(), HttpStatus.OK); + public ResponseEntity get(){ + return new ResponseEntity<>(visitsService.get(),HttpStatus.OK); } @GetMapping(value = "/chartData") @ApiOperation("查询图表数据") - public ResponseEntity getChartData() { - return new ResponseEntity<>(visitsService.getChartData(), HttpStatus.OK); + public ResponseEntity getChartData(){ + return new ResponseEntity<>(visitsService.getChartData(),HttpStatus.OK); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/RedisService.java b/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/RedisService.java index 4999b695a5549fbc60364c0e434c7c1dc8440689..0838343f27d7104be492f042bc42841b7c71912c 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/RedisService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/RedisService.java @@ -5,7 +5,6 @@ import org.springframework.data.domain.Pageable; /** * 可自行扩展 - * * @author Zheng Jie * @date 2018-12-10 */ @@ -13,7 +12,6 @@ public interface RedisService { /** * findById - * * @param key * @return */ @@ -21,7 +19,6 @@ public interface RedisService { /** * 查询验证码的值 - * * @param key * @return */ @@ -29,7 +26,6 @@ public interface RedisService { /** * 保存验证码 - * * @param key * @param val */ @@ -37,7 +33,6 @@ public interface RedisService { /** * delete - * * @param key */ void delete(String key); diff --git a/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java b/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java index 30c9880d27e4ab8bca1e996bb91340895ae19989..74ebb4153542a5453f6b160887876eab736acc67 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/VisitsService.java @@ -19,7 +19,6 @@ public interface VisitsService extends BaseService { /** * 新增记录 - * * @param request / */ @Async @@ -27,14 +26,12 @@ public interface VisitsService extends BaseService { /** * 获取数据 - * * @return / */ Object get(); /** * getChartData - * * @return / */ Object getChartData(); diff --git a/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java index 3b2ac4ba696617849aa87653e3c1ee1d20931288..a6b06b5ea18c7c5f29ea55d42dad8a539dbc2151 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/impl/RedisServiceImpl.java @@ -2,8 +2,8 @@ package co.yixiang.modules.monitor.service.impl; import co.yixiang.modules.monitor.domain.vo.RedisVo; import co.yixiang.modules.monitor.service.RedisService; -import co.yixiang.modules.mp.config.ShopKeyUtils; import co.yixiang.utils.PageUtil; +import co.yixiang.utils.ShopKeyUtils; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Page; @@ -31,9 +31,9 @@ public class RedisServiceImpl implements RedisService { private Long expiration; @Override - public Page findByKey(String key, Pageable pageable) { + public Page findByKey(String key, Pageable pageable){ List redisVos = new ArrayList<>(); - if (!"*".equals(key)) { + if(!"*".equals(key)){ key = "*" + key + "*"; } for (Object s : redisTemplate.keys(key)) { @@ -46,14 +46,14 @@ public class RedisServiceImpl implements RedisService { continue; } DataType dataType = redisTemplate.type(s.toString()); - if (!"string".equals(dataType.code())) { + if(!"string".equals(dataType.code())) { continue; } - RedisVo redisVo = new RedisVo(s.toString(), redisTemplate.opsForValue().get(s.toString()).toString()); + RedisVo redisVo = new RedisVo(s.toString(),redisTemplate.opsForValue().get(s.toString()).toString()); redisVos.add(redisVo); } Page page = new PageImpl( - PageUtil.toPage(pageable.getPageNumber(), pageable.getPageSize(), redisVos), + PageUtil.toPage(pageable.getPageNumber(),pageable.getPageSize(),redisVos), pageable, redisVos.size()); return page; @@ -74,14 +74,14 @@ public class RedisServiceImpl implements RedisService { try { String value = redisTemplate.opsForValue().get(key).toString(); return value; - } catch (Exception e) { + }catch (Exception e){ return ""; } } @Override public void saveCode(String key, Object val) { - redisTemplate.opsForValue().set(key, val); - redisTemplate.expire(key, expiration, TimeUnit.MINUTES); + redisTemplate.opsForValue().set(key,val); + redisTemplate.expire(key,expiration, TimeUnit.MINUTES); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java index 176e6b0f2bf1d623cede38d7db5505c5a7ebfc23..b3c30f62bbe258865a487d888a26c1735129bcc5 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/impl/VisitsServiceImpl.java @@ -42,8 +42,8 @@ public class VisitsServiceImpl extends BaseServiceImpl imp public void save() { LocalDate localDate = LocalDate.now(); Visits visits = this.getOne(new LambdaQueryWrapper() - .eq(Visits::getDate, localDate.toString())); - if (visits == null) { + .eq(Visits::getDate,localDate.toString())); + if(visits == null){ visits = new Visits(); visits.setWeekDay(StringUtils.getWeekDay()); visits.setPvCounts(1L); @@ -71,27 +71,27 @@ public class VisitsServiceImpl extends BaseServiceImpl imp @Override public Object get() { - Map map = new HashMap<>(4); + Map map = new HashMap<>(4); LocalDate localDate = LocalDate.now(); Visits visits = this.getOne(new LambdaQueryWrapper() - .eq(Visits::getDate, localDate.toString())); - List list = visitsMapper.findAllVisits(localDate.minusDays(6).toString(), localDate.plusDays(1).toString()); + .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) { recentVisits += data.getPvCounts(); recentIp += data.getIpCounts(); } - map.put("newVisits", visits.getPvCounts()); - map.put("newIp", visits.getIpCounts()); - map.put("recentVisits", recentVisits); - map.put("recentIp", recentIp); + map.put("newVisits",visits.getPvCounts()); + map.put("newIp",visits.getIpCounts()); + map.put("recentVisits",recentVisits); + map.put("recentIp",recentIp); return map; } @Override public Object getChartData() { - Map map = new HashMap<>(3); + 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())); diff --git a/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/mapper/VisitsMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/mapper/VisitsMapper.java index 6929a2ee25c9ba2cfbed23fd7cdc22a1d6e8b585..9561c8ba9f3fc7fe1c60d3fb2d314d4933c552a1 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/mapper/VisitsMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/monitor/service/mapper/VisitsMapper.java @@ -2,7 +2,6 @@ package co.yixiang.modules.monitor.service.mapper; import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.monitor.domain.Visits; -import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; @@ -10,8 +9,7 @@ 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); + @Select("select * FROM sys_visits where create_time between #{time1} and #{time2}") + List findAllVisits(@Param("time1") String time1, @Param("time2")String time2); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/config/JobRunner.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/config/JobRunner.java index dcbf3378b7d849bc05d1159e443ae82ca431eb30..da232c969be866e794f7b526e49e1e72bcc79591 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/config/JobRunner.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/config/JobRunner.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.config; @@ -36,7 +35,7 @@ public class JobRunner implements ApplicationRunner { * @param applicationArguments / */ @Override - public void run(ApplicationArguments applicationArguments) { + public void run(ApplicationArguments applicationArguments){ System.out.println("--------------------注入定时任务---------------------"); List quartzJobs = quartzJobService.findByIsPauseIsFalse(); quartzJobs.forEach(quartzManage::addJob); diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/config/QuartzConfig.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/config/QuartzConfig.java index 171da0f46c51a8ea4ec71397cd8682fda3202807..0785c32ef8a7cfc3a5cc3e45b7248e21a354a3c1 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/config/QuartzConfig.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/config/QuartzConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.config; @@ -20,44 +19,44 @@ import org.springframework.stereotype.Component; * @author / * @date 2019-01-07 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class QuartzConfig { - /** - * 解决Job中注入Spring Bean为null的问题 - */ - @Component("quartzJobFactory") - public static class QuartzJobFactory extends AdaptableJobFactory { - - private final AutowireCapableBeanFactory capableBeanFactory; - - public QuartzJobFactory(AutowireCapableBeanFactory capableBeanFactory) { - this.capableBeanFactory = capableBeanFactory; - } - - @Override - protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception { - - //调用父类的方法 - Object jobInstance = super.createJobInstance(bundle); - capableBeanFactory.autowireBean(jobInstance); - return jobInstance; - } - } - - /** - * 注入scheduler到spring - * @param quartzJobFactory / - * @return Scheduler - * @throws Exception / - */ - @Bean(name = "scheduler") - public Scheduler scheduler(QuartzJobFactory quartzJobFactory) throws Exception { - SchedulerFactoryBean factoryBean = new SchedulerFactoryBean(); - factoryBean.setJobFactory(quartzJobFactory); - factoryBean.afterPropertiesSet(); - Scheduler scheduler = factoryBean.getScheduler(); - scheduler.start(); - return scheduler; - } + /** + * 解决Job中注入Spring Bean为null的问题 + */ + @Component("quartzJobFactory") + public static class QuartzJobFactory extends AdaptableJobFactory { + + private final AutowireCapableBeanFactory capableBeanFactory; + + public QuartzJobFactory(AutowireCapableBeanFactory capableBeanFactory) { + this.capableBeanFactory = capableBeanFactory; + } + + @Override + protected Object createJobInstance(TriggerFiredBundle bundle) throws Exception { + + //调用父类的方法 + Object jobInstance = super.createJobInstance(bundle); + capableBeanFactory.autowireBean(jobInstance); + return jobInstance; + } + } + + /** + * 注入scheduler到spring + * @param quartzJobFactory / + * @return Scheduler + * @throws Exception / + */ + @Bean(name = "scheduler") + public Scheduler scheduler(QuartzJobFactory quartzJobFactory) throws Exception { + SchedulerFactoryBean factoryBean=new SchedulerFactoryBean(); + factoryBean.setJobFactory(quartzJobFactory); + factoryBean.afterPropertiesSet(); + Scheduler scheduler=factoryBean.getScheduler(); + scheduler.start(); + return scheduler; + } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/domain/QuartzJob.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/domain/QuartzJob.java index 2c0481825714688123053819b78b8f1eeeb5c225..3577e760b690824f32807d79ce798282020b73ea 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/domain/QuartzJob.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/domain/QuartzJob.java @@ -1,30 +1,27 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.TableField; +import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; - -import java.io.Serializable; -import java.sql.Timestamp; +import lombok.EqualsAndHashCode; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("quartz_job") -public class QuartzJob implements Serializable { +public class QuartzJob extends BaseDomain { public static final String JOB_KEY = "JOB_KEY"; @@ -60,11 +57,9 @@ public class QuartzJob implements Serializable { /** 备注 */ private String remark; - /** 创建时间 */ - @TableField(fill = FieldFill.INSERT) - private Timestamp createTime; - public void copy(QuartzJob source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + + public void copy(QuartzJob source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/domain/QuartzLog.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/domain/QuartzLog.java index 5a3ffd15acc54c0c1f4a6abcf5dd769b2f4cb98c..215c94593fef07b262d70c51eea7f34e77671682 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/domain/QuartzLog.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/domain/QuartzLog.java @@ -1,30 +1,25 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.TableField; +import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; -import java.io.Serializable; -import java.sql.Timestamp; - /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data @TableName("quartz_log") -public class QuartzLog implements Serializable { +public class QuartzLog extends BaseDomain { /** 任务日志ID */ @TableId @@ -35,6 +30,7 @@ public class QuartzLog implements Serializable { private String baenName; + /** cron表达式 */ private String cronExpression; @@ -62,12 +58,8 @@ public class QuartzLog implements Serializable { /** 耗时(毫秒) */ private Long time; - /** 创建日期 */ - @TableField(fill = FieldFill.INSERT) - private Timestamp createTime; - - public void copy(QuartzLog source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(QuartzLog source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/rest/QuartzJobController.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/rest/QuartzJobController.java index c4c0d0cb8904b95825fe66cba210df2d3791ade5..191b42795bc5da2d3ec497892af51b28580472ec 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/rest/QuartzJobController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/rest/QuartzJobController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.rest; @@ -26,7 +25,14 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -50,6 +56,7 @@ public class QuartzJobController { private final QuartzLogService quartzLogService; + public QuartzJobController(QuartzJobService quartzJobService, IGenerator generator, QuartzLogService quartzLogService) { this.quartzJobService = quartzJobService; this.generator = generator; @@ -60,8 +67,8 @@ public class QuartzJobController { @ApiOperation("查询定时任务") @GetMapping @PreAuthorize("@el.check('admin','timing:list')") - public ResponseEntity getJobs(QuartzJobQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(quartzJobService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getJobs(QuartzJobQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(quartzJobService.queryAll(criteria,pageable), HttpStatus.OK); } @Log("导出任务数据") @@ -69,7 +76,7 @@ public class QuartzJobController { @GetMapping(value = "/download") @PreAuthorize("@el.check('admin','timing:list')") public void download(HttpServletResponse response, QuartzJobQueryCriteria criteria) throws IOException { - quartzJobService.download(generator.convert(quartzJobService.queryAll(criteria), QuartzJobDto.class), response); + quartzJobService.download(generator.convert(quartzJobService.queryAll(criteria),QuartzJobDto.class), response); } @Log("导出日志数据") @@ -83,8 +90,8 @@ public class QuartzJobController { @ApiOperation("查询任务执行日志") @GetMapping(value = "/logs") @PreAuthorize("@el.check('admin','timing:list')") - public ResponseEntity getJobLogs(QuartzLogQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(quartzLogService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getJobLogs(QuartzLogQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(quartzLogService.queryAll(criteria,pageable), HttpStatus.OK); } @ForbidSubmit @@ -92,11 +99,11 @@ public class QuartzJobController { @ApiOperation("新增定时任务") @PostMapping @PreAuthorize("@el.check('admin','timing:add')") - public ResponseEntity create(@Validated @RequestBody QuartzJob resources) { + public ResponseEntity create(@Validated @RequestBody QuartzJob resources){ if (resources.getId() != null) { - throw new BadRequestException("A new " + ENTITY_NAME + " cannot already have an ID"); + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } - return new ResponseEntity<>(quartzJobService.save(resources), HttpStatus.CREATED); + return new ResponseEntity<>(quartzJobService.save(resources),HttpStatus.CREATED); } @ForbidSubmit @@ -104,7 +111,7 @@ public class QuartzJobController { @ApiOperation("修改定时任务") @PutMapping @PreAuthorize("@el.check('admin','timing:edit')") - public ResponseEntity update(@Validated @RequestBody QuartzJob resources) { + public ResponseEntity update(@Validated @RequestBody QuartzJob resources){ quartzJobService.updateById(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -114,9 +121,9 @@ public class QuartzJobController { @ApiOperation("更改定时任务状态") @PutMapping(value = "/{id}") @PreAuthorize("@el.check('admin','timing:edit')") - public ResponseEntity updateIsPause(@PathVariable Long id) { + public ResponseEntity updateIsPause(@PathVariable Long id){ quartzJobService.updateIsPause(quartzJobService.getOne(new LambdaQueryWrapper() - .eq(QuartzJob::getId, id))); + .eq(QuartzJob::getId,id))); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -125,8 +132,8 @@ public class QuartzJobController { @ApiOperation("执行定时任务") @PutMapping(value = "/exec/{id}") @PreAuthorize("@el.check('admin','timing:edit')") - public ResponseEntity execution(@PathVariable Long id) { - quartzJobService.execution(quartzJobService.getOne(new LambdaQueryWrapper().eq(QuartzJob::getId, id))); + public ResponseEntity execution(@PathVariable Long id){ + quartzJobService.execution(quartzJobService.getOne(new LambdaQueryWrapper().eq(QuartzJob::getId,id))); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -135,7 +142,7 @@ public class QuartzJobController { @ApiOperation("删除定时任务") @DeleteMapping @PreAuthorize("@el.check('admin','timing:del')") - public ResponseEntity delete(@RequestBody Integer[] ids) { + public ResponseEntity delete(@RequestBody Integer[] ids){ quartzJobService.removeByIds(new ArrayList<>(Arrays.asList(ids))); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/QuartzJobService.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/QuartzJobService.java index 14f80fa4dd1ac89a1b93e539346b28e23292c010..1125219028b07f0e8bed70b301bff5a86b381abb 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/QuartzJobService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/QuartzJobService.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.service; @@ -21,15 +20,15 @@ import java.util.Map; * @author hupeng * @date 2020-05-13 */ -public interface QuartzJobService extends BaseService { +public interface QuartzJobService extends BaseService{ /** * 查询数据分页 * @param criteria 条件 * @param pageable 分页参数 - * @return Map + * @return Map */ - Map queryAll(QuartzJobQueryCriteria criteria, Pageable pageable); + Map queryAll(QuartzJobQueryCriteria criteria, Pageable pageable); /** * 查询所有数据不分页 @@ -64,6 +63,5 @@ public interface QuartzJobService extends BaseService { * @return List */ List findByIsPauseIsFalse(); - void removeByIds(List idList); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/QuartzLogService.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/QuartzLogService.java index 97086da86d663921d374d521080464e02aecd468..9516117694e763e40d18f6bf0c14690007ba413a 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/QuartzLogService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/QuartzLogService.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.service; @@ -18,31 +17,31 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface QuartzLogService extends BaseService { +* @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 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(QuartzLogQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(QuartzLogQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobDto.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobDto.java index 5838823ae7bb70ba5533624558681bcc23920c07..6a34b01766f43e1cf026702b075986d93822a21e 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.service.dto; @@ -12,9 +11,9 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class QuartzJobDto implements Serializable { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobQueryCriteria.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobQueryCriteria.java index aef2485d61fcca17c56b2f2b9baa19b7933bbe7f..948058a9d5fdabf16e80c02d1ac904d2c4a5d091 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobQueryCriteria.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzJobQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.service.dto; @@ -13,11 +12,11 @@ import java.sql.Timestamp; import java.util.List; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class QuartzJobQueryCriteria { +public class QuartzJobQueryCriteria{ @Query(type = Query.Type.INNER_LIKE) private String jobName; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogDto.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogDto.java index 3a8437adde50bc6119c5603165936a974324df53..ef46b8c3dfb4a756ef837ff0153e19b5bb749e6f 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.service.dto; @@ -12,9 +11,9 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class QuartzLogDto implements Serializable { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogQueryCriteria.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogQueryCriteria.java index 6a436158c8faf699c405d6058516f3125022158b..c32280729a8715431ac8d1bd8702417b04310dc6 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogQueryCriteria.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/dto/QuartzLogQueryCriteria.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class QuartzLogQueryCriteria { +public class QuartzLogQueryCriteria{ } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/impl/QuartzJobServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/impl/QuartzJobServiceImpl.java index d87c1a0fd5c424306de4d57619bd433e4cacc8d0..46cd13bc0a921537b5f35a4f716e1c53a294a59f 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/impl/QuartzJobServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/impl/QuartzJobServiceImpl.java @@ -1,8 +1,6 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 */ package co.yixiang.modules.quartz.service.impl; @@ -114,10 +112,11 @@ public class QuartzJobServiceImpl extends BaseServiceImpl queryAll(QuartzLogQueryCriteria criteria) { + public List queryAll(QuartzLogQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(QuartzLog.class, criteria)); } @@ -75,16 +74,16 @@ public class QuartzLogServiceImpl extends BaseServiceImpl 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 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()); diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzJobMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzJobMapper.java index aa190f2bec4e1aa7138403cdef3453b7ec8f9477..4c02af2875ed122c369103cee1abd5e6c7e3f7e5 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzJobMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzJobMapper.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.service.mapper; @@ -11,9 +10,9 @@ import co.yixiang.modules.quartz.domain.QuartzJob; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Repository public interface QuartzJobMapper extends CoreMapper { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzLogMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzLogMapper.java index 210626dfed60afefd74dab14d1bfd5663ea6f8e7..b22a0fac7dd553300d3955949319afa6f24878f4 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzLogMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/service/mapper/QuartzLogMapper.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.service.mapper; @@ -11,9 +10,9 @@ import co.yixiang.modules.quartz.domain.QuartzLog; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Repository public interface QuartzLogMapper extends CoreMapper { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/task/TestTask.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/task/TestTask.java index 37ea7db222e0fe8dc42ef7eb591a84f99204d4cd..4dbb1ff48141f8b34a06c5d15b35f31e972b4e30 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/task/TestTask.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/task/TestTask.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.task; @@ -18,11 +17,11 @@ import org.springframework.stereotype.Component; @Component public class TestTask { - public void run() { + public void run(){ log.info("执行成功"); } - public void run1(String str) { + public void run1(String str){ log.info("执行成功,参数为: {}" + str); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/task/VisitsTask.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/task/VisitsTask.java index cf602bdf0bf610750a6c00ebb481512adee97acf..52a3a42494855ed03c05ad6bb586cb83deaf5ac7 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/task/VisitsTask.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/task/VisitsTask.java @@ -16,7 +16,7 @@ public class VisitsTask { this.visitsService = visitsService; } - public void run() { + public void run(){ visitsService.save(); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/ExecutionJob.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/ExecutionJob.java index 99a0974e38abc6ae753518bb0012d794a2fa990e..cb0f453a676520a623012999a4fca6f356c6fe1b 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/ExecutionJob.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/ExecutionJob.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.utils; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/QuartzManage.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/QuartzManage.java index f45675e397af851149003c4b1785fb0e7692123d..af9bf95019ad4ed7da45dc442a021ad94926dc4a 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/QuartzManage.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/QuartzManage.java @@ -1,15 +1,22 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.utils; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.quartz.domain.QuartzJob; import lombok.extern.slf4j.Slf4j; -import org.quartz.*; +import org.quartz.CronScheduleBuilder; +import org.quartz.CronTrigger; +import org.quartz.JobBuilder; +import org.quartz.JobDataMap; +import org.quartz.JobDetail; +import org.quartz.JobKey; +import org.quartz.Scheduler; +import org.quartz.Trigger; +import org.quartz.TriggerKey; import org.quartz.impl.triggers.CronTriggerImpl; import org.springframework.stereotype.Component; @@ -31,7 +38,7 @@ public class QuartzManage { @Resource(name = "scheduler") private Scheduler scheduler; - public void addJob(QuartzJob quartzJob) { + public void addJob(QuartzJob quartzJob){ try { // 构建job信息 JobDetail jobDetail = JobBuilder.newJob(ExecutionJob.class). @@ -47,16 +54,16 @@ public class QuartzManage { cronTrigger.getJobDataMap().put(QuartzJob.JOB_KEY, quartzJob); //重置启动时间 - ((CronTriggerImpl) cronTrigger).setStartTime(new Date()); + ((CronTriggerImpl)cronTrigger).setStartTime(new Date()); //执行定时任务 - scheduler.scheduleJob(jobDetail, cronTrigger); + scheduler.scheduleJob(jobDetail,cronTrigger); // 暂停任务 if (quartzJob.getIsPause()) { pauseJob(quartzJob); } - } catch (Exception e) { + } catch (Exception e){ log.error("创建定时任务失败", e); throw new BadRequestException("创建定时任务失败"); } @@ -66,27 +73,27 @@ public class QuartzManage { * 更新job cron表达式 * @param quartzJob / */ - public void updateJobCron(QuartzJob quartzJob) { + public void updateJobCron(QuartzJob quartzJob){ try { TriggerKey triggerKey = TriggerKey.triggerKey(JOB_NAME + quartzJob.getId()); CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey); // 如果不存在则创建一个定时任务 - if (trigger == null) { + if(trigger == null){ addJob(quartzJob); trigger = (CronTrigger) scheduler.getTrigger(triggerKey); } CronScheduleBuilder scheduleBuilder = CronScheduleBuilder.cronSchedule(quartzJob.getCronExpression()); trigger = trigger.getTriggerBuilder().withIdentity(triggerKey).withSchedule(scheduleBuilder).build(); //重置启动时间 - ((CronTriggerImpl) trigger).setStartTime(new Date()); - trigger.getJobDataMap().put(QuartzJob.JOB_KEY, quartzJob); + ((CronTriggerImpl)trigger).setStartTime(new Date()); + trigger.getJobDataMap().put(QuartzJob.JOB_KEY,quartzJob); scheduler.rescheduleJob(triggerKey, trigger); // 暂停任务 if (quartzJob.getIsPause()) { pauseJob(quartzJob); } - } catch (Exception e) { + } catch (Exception e){ log.error("更新定时任务失败", e); throw new BadRequestException("更新定时任务失败"); } @@ -97,12 +104,12 @@ public class QuartzManage { * 删除一个job * @param quartzJob / */ - public void deleteJob(QuartzJob quartzJob) { + public void deleteJob(QuartzJob quartzJob){ try { JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getId()); scheduler.pauseJob(jobKey); scheduler.deleteJob(jobKey); - } catch (Exception e) { + } catch (Exception e){ log.error("删除定时任务失败", e); throw new BadRequestException("删除定时任务失败"); } @@ -112,17 +119,17 @@ public class QuartzManage { * 恢复一个job * @param quartzJob / */ - public void resumeJob(QuartzJob quartzJob) { + public void resumeJob(QuartzJob quartzJob){ try { TriggerKey triggerKey = TriggerKey.triggerKey(JOB_NAME + quartzJob.getId()); CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey); // 如果不存在则创建一个定时任务 - if (trigger == null) { + if(trigger == null) { addJob(quartzJob); } JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getId()); scheduler.resumeJob(jobKey); - } catch (Exception e) { + } catch (Exception e){ log.error("恢复定时任务失败", e); throw new BadRequestException("恢复定时任务失败"); } @@ -132,19 +139,19 @@ public class QuartzManage { * 立即执行job * @param quartzJob / */ - public void runJobNow(QuartzJob quartzJob) { + public void runJobNow(QuartzJob quartzJob){ try { TriggerKey triggerKey = TriggerKey.triggerKey(JOB_NAME + quartzJob.getId()); CronTrigger trigger = (CronTrigger) scheduler.getTrigger(triggerKey); // 如果不存在则创建一个定时任务 - if (trigger == null) { + if(trigger == null) { addJob(quartzJob); } JobDataMap dataMap = new JobDataMap(); dataMap.put(QuartzJob.JOB_KEY, quartzJob); JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getId()); - scheduler.triggerJob(jobKey, dataMap); - } catch (Exception e) { + scheduler.triggerJob(jobKey,dataMap); + } catch (Exception e){ log.error("定时任务执行失败", e); throw new BadRequestException("定时任务执行失败"); } @@ -154,11 +161,11 @@ public class QuartzManage { * 暂停一个job * @param quartzJob / */ - public void pauseJob(QuartzJob quartzJob) { + public void pauseJob(QuartzJob quartzJob){ try { JobKey jobKey = JobKey.jobKey(JOB_NAME + quartzJob.getId()); scheduler.pauseJob(jobKey); - } catch (Exception e) { + } catch (Exception e){ log.error("定时任务暂停失败", e); throw new BadRequestException("定时任务暂停失败"); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/QuartzRunnable.java b/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/QuartzRunnable.java index 2914b6a67b83eb07b61cb5562c8e3aa68f9b6738..1f60f97a5b31fe495dc5d092303c174a791bf266 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/QuartzRunnable.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/quartz/utils/QuartzRunnable.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.quartz.utils; @@ -21,30 +20,30 @@ import java.util.concurrent.Callable; @Slf4j public class QuartzRunnable implements Callable { - private Object target; - private Method method; - private String params; - - QuartzRunnable(String beanName, String methodName, String params) - throws NoSuchMethodException, SecurityException { - this.target = SpringContextHolder.getBean(beanName); - this.params = params; - - if (StringUtils.isNotBlank(params)) { - this.method = target.getClass().getDeclaredMethod(methodName, String.class); - } else { - this.method = target.getClass().getDeclaredMethod(methodName); - } - } - - @Override - public Object call() throws Exception { - ReflectionUtils.makeAccessible(method); - if (StringUtils.isNotBlank(params)) { - method.invoke(target, params); - } else { - method.invoke(target); - } - return null; - } + private Object target; + private Method method; + private String params; + + QuartzRunnable(String beanName, String methodName, String params) + throws NoSuchMethodException, SecurityException { + this.target = SpringContextHolder.getBean(beanName); + this.params = params; + + if (StringUtils.isNotBlank(params)) { + this.method = target.getClass().getDeclaredMethod(methodName, String.class); + } else { + this.method = target.getClass().getDeclaredMethod(methodName); + } + } + + @Override + public Object call() throws Exception { + ReflectionUtils.makeAccessible(method); + if (StringUtils.isNotBlank(params)) { + method.invoke(target, params); + } else { + method.invoke(target); + } + return null; + } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/config/SecurityConfig.java b/yshop-admin/src/main/java/co/yixiang/modules/security/config/SecurityConfig.java index 961c1cf66aa27a5534a8bf898b4404bcad6ac443..10ad06da88833e11fed1efe68bbc3b344d62b217 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/config/SecurityConfig.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/config/SecurityConfig.java @@ -1,8 +1,7 @@ /** - * Copyright (C) 2018-2021 + * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.security.config; @@ -131,7 +130,9 @@ public class SecurityConfig { .antMatchers(anonymousUrls.toArray(new String[0])).permitAll() // 所有请求都需要认证 .anyRequest().authenticated() - .and().apply(securityConfigurerAdapter()).and().build(); + .and().apply(securityConfigurerAdapter()) + .and() + .build(); } private TokenConfigurer securityConfigurerAdapter() { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/config/SecurityProperties.java b/yshop-admin/src/main/java/co/yixiang/modules/security/config/SecurityProperties.java index a87b83fb7ccd3c7fdffbd57439268c99e3920040..24dc8b4462b6c2ab441463fc28d123e7cc3c87e2 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/config/SecurityProperties.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/config/SecurityProperties.java @@ -1,8 +1,7 @@ /** - * Copyright (C) 2018-2021 + * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.security.config; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/rest/AuthController.java b/yshop-admin/src/main/java/co/yixiang/modules/security/rest/AuthController.java index 311a7913de937254d1feec4286c87458aa2925de..70df412cc472358dff4d596cbcc1d1bb0b658683 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/rest/AuthController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/rest/AuthController.java @@ -1,8 +1,6 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 */ package co.yixiang.modules.security.rest; @@ -34,7 +32,12 @@ import org.springframework.security.core.context.SecurityContextHolder; import org.springframework.security.core.userdetails.UserDetails; import org.springframework.security.core.userdetails.UserDetailsService; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import java.util.HashMap; @@ -78,7 +81,7 @@ public class AuthController { @ApiOperation("登录授权") @AnonymousAccess @PostMapping(value = "/login") - public ResponseEntity login(@Validated @RequestBody AuthUser authUser, HttpServletRequest request) { + public ResponseEntity login(@Validated @RequestBody AuthUser authUser, HttpServletRequest request){ // 密码解密 RSA rsa = new RSA(privateKey, null); String password = new String(rsa.decrypt(authUser.getPassword(), KeyType.PrivateKey)); @@ -104,44 +107,44 @@ public class AuthController { // 保存在线信息 onlineUserService.save(jwtUser, token, request); // 返回 token 与 用户信息 - Map authInfo = new HashMap(2) {{ + Map authInfo = new HashMap(2){{ put("token", properties.getTokenStartWith() + token); put("user", jwtUser); }}; - if (singleLogin) { + if(singleLogin){ //踢掉之前已经登录的token - onlineUserService.checkLoginOnUser(authUser.getUsername(), token); + onlineUserService.checkLoginOnUser(authUser.getUsername(),token); } return ResponseEntity.ok(authInfo); } @ApiOperation("获取用户信息") @GetMapping(value = "/info") - public ResponseEntity getUserInfo() { - JwtUser jwtUser = (JwtUser) userDetailsService.loadUserByUsername(SecurityUtils.getUsername()); + public ResponseEntity getUserInfo(){ + JwtUser jwtUser = (JwtUser)userDetailsService.loadUserByUsername(SecurityUtils.getUsername()); return ResponseEntity.ok(jwtUser); } @AnonymousAccess @ApiOperation("获取验证码") @GetMapping(value = "/code") - public ResponseEntity getCode() { + public ResponseEntity getCode(){ // 算术类型 https://gitee.com/whvse/EasyCaptcha ArithmeticCaptcha captcha = new ArithmeticCaptcha(111, 36); // 几位数运算,默认是两位 captcha.setLen(2); // 获取运算的结果 - String result = ""; + String result =""; try { - result = new Double(Double.parseDouble(captcha.text())).intValue() + ""; - } catch (Exception e) { + 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); // 验证码信息 - Map imgResult = new HashMap(2) {{ + Map imgResult = new HashMap(2){{ put("img", captcha.toBase64()); put("uuid", uuid); }}; @@ -151,7 +154,7 @@ public class AuthController { @ApiOperation("退出登录") @AnonymousAccess @DeleteMapping(value = "/logout") - public ResponseEntity logout(HttpServletRequest request) { + public ResponseEntity logout(HttpServletRequest request){ onlineUserService.logout(tokenUtil.getToken(request)); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/rest/OnlineController.java b/yshop-admin/src/main/java/co/yixiang/modules/security/rest/OnlineController.java index 595dd04aaca4efafc80ca75a96c4d718d6126790..9dd4c4538973354b3127e9d32a41d9bb3fe2f209 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/rest/OnlineController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/rest/OnlineController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.security.rest; @@ -15,7 +14,13 @@ 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 org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -37,11 +42,11 @@ public class OnlineController { @ApiOperation("查询在线用户") @GetMapping - @PreAuthorize("@el.check()") - public ResponseEntity getAll(@RequestParam(value = "filter", defaultValue = "") String filter, - @RequestParam(value = "type", defaultValue = "0") int type, - Pageable pageable) { - return new ResponseEntity<>(onlineUserService.getAll(filter, type, pageable), HttpStatus.OK); + @PreAuthorize("@el.check('auth_online')") + public ResponseEntity getAll(@RequestParam(value = "filter",defaultValue = "") String filter, + @RequestParam(value = "type",defaultValue = "0") int type, + Pageable pageable){ + return new ResponseEntity<>(onlineUserService.getAll(filter, type,pageable),HttpStatus.OK); } @Log("导出数据") @@ -49,9 +54,9 @@ public class OnlineController { @GetMapping(value = "/download") @PreAuthorize("@el.check()") public void download(HttpServletResponse response, - @RequestParam(value = "filter", defaultValue = "") String filter, - @RequestParam(value = "type", defaultValue = "0") int type) throws IOException { - onlineUserService.download(onlineUserService.getAll(filter, type), response); + @RequestParam(value = "filter",defaultValue = "") String filter, + @RequestParam(value = "type",defaultValue = "0") int type) throws IOException { + onlineUserService.download(onlineUserService.getAll(filter,type), response); } @ForbidSubmit @@ -59,7 +64,6 @@ public class OnlineController { @DeleteMapping @PreAuthorize("@el.check()") public ResponseEntity delete(@RequestBody Set keys) throws Exception { - for (String key : keys) { onlineUserService.kickOut(key); } @@ -68,10 +72,9 @@ public class OnlineController { @ForbidSubmit @ApiOperation("踢出移动端用户") - @PostMapping("/delete") + @PostMapping("/delete" ) @PreAuthorize("@el.check()") public ResponseEntity deletet(@RequestBody Set keys) throws Exception { - for (String key : keys) { onlineUserService.kickOutT(key); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/security/JwtAccessDeniedHandler.java b/yshop-admin/src/main/java/co/yixiang/modules/security/security/JwtAccessDeniedHandler.java index df58ec64ad1253a87b20a35b779add378554260f..321a1cf73de43785e409bc285c7f0b4c8e8be79d 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/security/JwtAccessDeniedHandler.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/security/JwtAccessDeniedHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.security.security; @@ -20,9 +19,9 @@ import java.io.IOException; @Component public class JwtAccessDeniedHandler implements AccessDeniedHandler { - @Override - public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException { - //当用户在没有授权的情况下访问受保护的REST资源时,将调用此方法发送403 Forbidden响应 - response.sendError(HttpServletResponse.SC_FORBIDDEN, accessDeniedException.getMessage()); - } + @Override + public void handle(HttpServletRequest request, HttpServletResponse response, AccessDeniedException accessDeniedException) throws IOException { + //当用户在没有授权的情况下访问受保护的REST资源时,将调用此方法发送403 Forbidden响应 + response.sendError(HttpServletResponse.SC_FORBIDDEN, accessDeniedException.getMessage()); + } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/security/JwtAuthenticationEntryPoint.java b/yshop-admin/src/main/java/co/yixiang/modules/security/security/JwtAuthenticationEntryPoint.java index e695ae9fc81b6bcf829e0b9a72e861a9c348a343..c44e920e7ba0ee249c7e30b47ef8006028c7dc24 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/security/JwtAuthenticationEntryPoint.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/security/JwtAuthenticationEntryPoint.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.security.security; @@ -25,6 +24,6 @@ public class JwtAuthenticationEntryPoint implements AuthenticationEntryPoint { HttpServletResponse response, AuthenticationException authException) throws IOException { // 当用户尝试访问安全的REST资源而不提供任何凭据时,将调用此方法发送401 响应 - response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException == null ? "Unauthorized" : authException.getMessage()); + response.sendError(HttpServletResponse.SC_UNAUTHORIZED, authException==null?"Unauthorized":authException.getMessage()); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenConfigurer.java b/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenConfigurer.java index 197ce74d3858f8d8f2203e9cd4d77277b4d8917f..6889d62215f9cd649fb920b4d3b2e06f1f081a14 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenConfigurer.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenConfigurer.java @@ -1,5 +1,5 @@ /** - * Copyright (C) 2018-2021 + * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co */ diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenFilter.java b/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenFilter.java index 3d496245e8e34696058179aa640ad7f8added221..bec287de4f0a79138e3b716bf7e23a1e6285c879 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenFilter.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenFilter.java @@ -1,12 +1,12 @@ /** - * Copyright (C) 2018-2021 + * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co */ package co.yixiang.modules.security.security; import co.yixiang.modules.security.config.SecurityProperties; -import co.yixiang.modules.security.security.vo.OnlineUser; import co.yixiang.modules.security.service.OnlineUserService; +import co.yixiang.modules.user.vo.OnlineUser; import co.yixiang.utils.SpringContextHolder; import co.yixiang.utils.StringUtils; import io.jsonwebtoken.ExpiredJwtException; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenProvider.java b/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenProvider.java index bc16e3db8b01cdc68687fc00241421f207ebf82b..ffe613bb304abf7f907ec5e78c2b473746b29297 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenProvider.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenProvider.java @@ -1,5 +1,5 @@ package co.yixiang.modules.security.security; /** - * Copyright (C) 2018-2021 + * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co *//* diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenUtil.java b/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenUtil.java index 16c2c07004ce3d66ae6870cd06450524d91e1fde..cf9a9b8e840aa263d25d69ccc00cbb87f4fdbae3 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenUtil.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/security/TokenUtil.java @@ -10,7 +10,6 @@ import com.google.gson.Gson; import io.jsonwebtoken.Claims; import io.jsonwebtoken.Jwts; import io.jsonwebtoken.SignatureAlgorithm; -import lombok.extern.slf4j.Slf4j; import org.slf4j.Logger; import org.slf4j.LoggerFactory; import org.springframework.beans.factory.annotation.Autowired; @@ -26,13 +25,18 @@ import java.util.Date; * * @author lioncity */ -@Slf4j + @Component public class TokenUtil { - @Autowired private SecurityProperties properties; + /** + * Logger + */ + + protected static final Logger LOGGER = LoggerFactory.getLogger(TokenUtil.class); + /** * 权限缓存前缀 @@ -89,7 +93,7 @@ public class TokenUtil { .parseClaimsJws(token) .getBody(); } catch (Exception e) { - log.warn("getClaimsFromToken exception", e); + LOGGER.warn("getClaimsFromToken exception", e); claims = null; } return claims; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/security/vo/AuthUser.java b/yshop-admin/src/main/java/co/yixiang/modules/security/security/vo/AuthUser.java index e5b39c5e0004709ad37a2e8e270db924edb80db0..a7cb93725cdc0ed7bbc02188ebcbb23837fab159 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/security/vo/AuthUser.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/security/vo/AuthUser.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.security.security.vo; @@ -31,6 +30,6 @@ public class AuthUser { @Override public String toString() { - return "{username=" + username + ", password= ******}"; + return "{username=" + username + ", password= ******}"; } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/security/vo/JwtUser.java b/yshop-admin/src/main/java/co/yixiang/modules/security/security/vo/JwtUser.java index e415d5563e05964fe9a27c09df2c73aacd30c477..a1b25a842309ee60935e257ec730611d7ba02561 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/security/vo/JwtUser.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/security/vo/JwtUser.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.security.security.vo; @@ -49,7 +48,6 @@ public class JwtUser implements UserDetails { @JsonIgnore private final Collection authorities; - private final boolean enabled; private Timestamp createTime; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java b/yshop-admin/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java index 9572573a84d934f22952ef5c088209083f187460..f7cbfb055c4dcf9237dff2a29a05660371fa4fbf 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/service/OnlineUserService.java @@ -1,17 +1,15 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 */ package co.yixiang.modules.security.service; +import cn.hutool.core.util.StrUtil; +import co.yixiang.constant.ShopConstants; import co.yixiang.modules.security.config.SecurityProperties; import co.yixiang.modules.security.security.vo.JwtUser; -import co.yixiang.modules.security.security.vo.OnlineUser; +import co.yixiang.modules.user.vo.OnlineUser; import co.yixiang.utils.*; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; import lombok.extern.slf4j.Slf4j; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; @@ -79,7 +77,7 @@ public class OnlineUserService { public List getAll(String filter, int type) { List keys = null; if (type == 1) { - keys = redisUtils.scan("m-online-token*"); + keys = redisUtils.scan(ShopConstants.YSHOP_APP_LOGIN_USER + "*"); } else { keys = redisUtils.scan(properties.getOnlineKey() + "*"); } @@ -88,18 +86,14 @@ public class OnlineUserService { Collections.reverse(keys); List onlineUsers = new ArrayList<>(); for (String key : keys) { - OnlineUser onlineUser; - Object obj = redisUtils.get(key); - if (obj instanceof OnlineUser) { - onlineUser = (OnlineUser) obj; - } else if (obj instanceof JSONObject) { - onlineUser = JSONObject.parseObject(JSONObject.toJSONString(obj), OnlineUser.class); - } else if (obj instanceof String) { - onlineUser = JSONObject.parseObject((String) obj, OnlineUser.class); + OnlineUser onlineUser = (OnlineUser) redisUtils.get(key); + if (StringUtils.isNotBlank(filter)) { + if (onlineUser.toString().contains(filter)) { + onlineUsers.add(onlineUser); + } } else { - continue; + onlineUsers.add(onlineUser); } - onlineUsers.add(onlineUser); } onlineUsers.sort((o1, o2) -> o2.getLoginTime().compareTo(o1.getLoginTime())); return onlineUsers; @@ -122,8 +116,8 @@ public class OnlineUserService { * @throws Exception / */ public void kickOutT(String key) throws Exception { - - String keyt = "m-online-token" + EncryptUtils.desDecrypt(key); + String[] split = StrUtil.split(key, StrUtil.COLON); + String keyt = ShopConstants.YSHOP_APP_LOGIN_USER + split[0] + StrUtil.COLON + EncryptUtils.desDecrypt(split[1]); redisUtils.del(keyt); } @@ -164,7 +158,7 @@ public class OnlineUserService { * @return / */ public OnlineUser getOne(String key) { - return JSON.parseObject(redisUtils.getString(key), OnlineUser.class); + return (OnlineUser) redisUtils.get(key); } /** diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java index 9c74f2d00ff6c7df8559749e38cc16de702f509e..8414ef240f2ad40ecd844005f1e124c45442f0f3 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/security/service/UserDetailsServiceImpl.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.security.service; @@ -39,7 +38,7 @@ public class UserDetailsServiceImpl implements UserDetailsService { } @Override - public UserDetails loadUserByUsername(String username) { + public UserDetails loadUserByUsername(String username){ UserDto user = userService.findByName(username); if (user == null) { throw new BadRequestException("账号不存在"); diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Dept.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Dept.java index 9283a4c17163a2ac4ec1b9f43a301aadf2c60e71..7c870cbf8f0e5b194aede5fc1c6b028e9936cef6 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Dept.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Dept.java @@ -1,30 +1,36 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -import com.baomidou.mybatisplus.annotation.*; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import lombok.EqualsAndHashCode; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -@TableName("dept") +@EqualsAndHashCode(callSuper = true) +@TableName("sys_dept") public class Dept extends BaseDomain { /** ID */ - @TableId(value = "id", type = IdType.AUTO) + @TableId(value = "id",type= IdType.AUTO) private Long id; @@ -43,8 +49,8 @@ public class Dept extends BaseDomain { - public void copy(Dept source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(Dept source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Job.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Job.java index e63e9eaba07d3839a0ede4b5ab9a82d22347005f..b061d0e0432d5850c2787bb53caea7e2b92015a7 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Job.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Job.java @@ -1,30 +1,31 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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.EqualsAndHashCode; import javax.validation.constraints.NotBlank; -import java.io.Serializable; -import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -@TableName("job") +@EqualsAndHashCode(callSuper = true) +@TableName("sys_job") public class Job extends BaseDomain { /** 岗位ID */ @@ -51,7 +52,8 @@ public class Job extends BaseDomain { - public void copy(Job source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + + public void copy(Job source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Menu.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Menu.java index 5bc2c46ab30057e3d243de02100e352fe82a5d94..c72800bae7390a7370fe0bd76e228d7c79b132f0 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Menu.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Menu.java @@ -1,31 +1,31 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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.EqualsAndHashCode; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -@TableName("menu") +@EqualsAndHashCode(callSuper = true) +@TableName("sys_menu") public class Menu extends BaseDomain { /** ID */ @@ -77,6 +77,7 @@ public class Menu extends BaseDomain { + /** 权限 */ private String permission; @@ -85,7 +86,7 @@ public class Menu extends BaseDomain { private Integer type; - public void copy(Menu source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(Menu source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Role.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Role.java index e105471118f74aff1cd7ef35e7cb465ebe6dd6f6..6f8ca7142874781bbaafdd9756a4d02490ea1644 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Role.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Role.java @@ -1,31 +1,32 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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.EqualsAndHashCode; import javax.validation.constraints.NotBlank; -import java.io.Serializable; -import java.sql.Timestamp; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -@TableName("role") +@EqualsAndHashCode(callSuper = true) +@TableName("sys_role") public class Role extends BaseDomain { /** ID */ @@ -56,12 +57,11 @@ public class Role extends BaseDomain { private Set depts; - /** 功能权限 */ private String permission; - public void copy(Role source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(Role source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/RolesDepts.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/RolesDepts.java index 7d78fe40fde595c3911a335c82e59fdda03bce5b..b39e94324eba1226a6fbfc3e0b91998b4281a492 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/RolesDepts.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/RolesDepts.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; import cn.hutool.core.bean.BeanUtil; @@ -14,11 +16,11 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-16 - */ +* @author hupeng +* @date 2020-05-16 +*/ @Data -@TableName("roles_depts") +@TableName("sys_roles_depts") public class RolesDepts implements Serializable { /** 角色ID */ @@ -28,7 +30,7 @@ public class RolesDepts implements Serializable { private Long deptId; - public void copy(RolesDepts source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(RolesDepts source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/RolesMenus.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/RolesMenus.java index ba78d08d8ef62b03f771d62d78c3c4f736ef6260..efb5cee23dee60dfa09de8c679b204bd3167736d 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/RolesMenus.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/RolesMenus.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; import cn.hutool.core.bean.BeanUtil; @@ -14,11 +16,11 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-16 - */ +* @author hupeng +* @date 2020-05-16 +*/ @Data -@TableName("roles_menus") +@TableName("sys_roles_menus") public class RolesMenus implements Serializable { /** 菜单ID */ @@ -28,7 +30,7 @@ public class RolesMenus implements Serializable { /** 角色ID */ private Long roleId; - public void copy(RolesMenus source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(RolesMenus source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/User.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/User.java index ed880d61cb01e4f013136eb75b8cce9146444fd2..1bdbbf7ce088edccff3ec072accc4c1130fde724 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/User.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/User.java @@ -1,32 +1,34 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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.Getter; +import lombok.Setter; import javax.validation.constraints.NotBlank; -import java.io.Serializable; import java.sql.Timestamp; import java.util.Objects; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ -@Data -@TableName("user") +* @author hupeng +* @date 2020-05-14 +*/ +@Getter +@Setter +@TableName("sys_user") public class User extends BaseDomain { /** 系统用户ID */ @@ -95,8 +97,7 @@ public class User extends BaseDomain { /** 性别 */ private String sex; - public @interface Update { - } + public @interface Update {} @Override public boolean equals(Object o) { @@ -115,8 +116,7 @@ public class User extends BaseDomain { public int hashCode() { return Objects.hash(id, username); } - - public void copy(User source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(User source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/UserAvatar.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/UserAvatar.java index ff120adbea02a9dc6da027de1451c5ec48877364..d2ea79767d3d51c4ef010738adf80bfd5a7946f6 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/UserAvatar.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/UserAvatar.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; import cn.hutool.core.bean.BeanUtil; @@ -18,11 +20,11 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -@TableName("user_avatar") +@TableName("sys_user_avatar") public class UserAvatar implements Serializable { @TableId @@ -42,11 +44,11 @@ public class UserAvatar implements Serializable { /** 创建时间 */ - @TableField(fill = FieldFill.INSERT) + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; - public void copy(UserAvatar source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(UserAvatar source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/UsersRoles.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/UsersRoles.java index 5a1e9513d1a4cd54d9350c476c16cfa420292994..1395dddec09277c7a74ecb89231c1a42a4ddecdb 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/UsersRoles.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/UsersRoles.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.domain; import cn.hutool.core.bean.BeanUtil; @@ -14,11 +16,11 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-16 - */ +* @author hupeng +* @date 2020-05-16 +*/ @Data -@TableName("users_roles") +@TableName("sys_users_roles") public class UsersRoles implements Serializable { /** 用户ID */ @@ -28,7 +30,7 @@ public class UsersRoles implements Serializable { /** 角色ID */ private Long roleId; - public void copy(UsersRoles source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(UsersRoles source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/MenuMetaVo.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/MenuMetaVo.java index ee6722ff97bad8f3baa5f2f986d331b5552b3835..a302e19326b929ddec71cc4da25ec0d46a9525f1 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/MenuMetaVo.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/MenuMetaVo.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.domain.vo; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/MenuVo.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/MenuVo.java index 1d8d89bc5f4bcc47dd84906a6e5fe2c4e3880cac..54a605c5dbcec219d45e582bd7226ac33d2ec86c 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/MenuVo.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/MenuVo.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.domain.vo; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/UserPassVo.java b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/UserPassVo.java index c6719bc2324847479d4ea7747e38a8791544bfdc..86c56f9a9906b65a229d1caa5f6cc9071f6e2bee 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/UserPassVo.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/domain/vo/UserPassVo.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.domain.vo; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DeptController.java b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DeptController.java index 746814404a81458de2815c09fdce567693aa1002..51c7341f8c24bea89f3634615548e8ed190d79b4 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DeptController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DeptController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.rest; @@ -24,7 +23,13 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -33,9 +38,9 @@ import java.util.List; import java.util.Set; /** - * @author hupeng - * @date 2019-03-25 - */ +* @author hupeng +* @date 2019-03-25 +*/ @RestController @Api(tags = "系统:部门管理") @RequestMapping("/api/dept") @@ -67,35 +72,35 @@ public class DeptController { @ApiOperation("查询部门") @GetMapping @PreAuthorize("@el.check('user:list','admin','dept:list')") - public ResponseEntity getDepts(DeptQueryCriteria criteria) { + public ResponseEntity getDepts(DeptQueryCriteria criteria){ // 数据权限 criteria.setIds(dataScope.getDeptIds()); - List deptDtos = generator.convert(deptService.queryAll(criteria), DeptDto.class); - return new ResponseEntity<>(deptService.buildTree(deptDtos), HttpStatus.OK); + List deptDtos = generator.convert(deptService.queryAll(criteria),DeptDto.class); + return new ResponseEntity<>(deptService.buildTree(deptDtos),HttpStatus.OK); } @Log("新增部门") @ApiOperation("新增部门") @PostMapping @PreAuthorize("@el.check('admin','dept:add')") - public ResponseEntity create(@Validated @RequestBody Dept resources) { + public ResponseEntity create(@Validated @RequestBody Dept resources){ if (resources.getId() != null) { - throw new BadRequestException("A new " + ENTITY_NAME + " cannot already have an ID"); + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } - return new ResponseEntity<>(deptService.save(resources), HttpStatus.CREATED); + return new ResponseEntity<>(deptService.save(resources),HttpStatus.CREATED); } @Log("修改部门") @ApiOperation("修改部门") @PutMapping @PreAuthorize("@el.check('admin','dept:edit')") - public ResponseEntity update(@Validated @RequestBody Dept resources) { - if (resources.getId().equals(resources.getPid())) { + public ResponseEntity update(@Validated @RequestBody Dept resources){ + if(resources.getId().equals(resources.getPid())) { throw new BadRequestException("上级不能为自己"); } Dept dept = deptService.getOne(new LambdaQueryWrapper() - .eq(Dept::getId, resources.getId())); - ValidationUtil.isNull(dept.getId(), "Dept", "id", resources.getId()); + .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); @@ -106,16 +111,16 @@ public class DeptController { @ApiOperation("删除部门") @DeleteMapping @PreAuthorize("@el.check('admin','dept:del')") - public ResponseEntity delete(@RequestBody Set ids) { + public ResponseEntity delete(@RequestBody Set ids){ List deptIds = new ArrayList<>(); for (Long id : ids) { List deptList = deptService.findByPid(id); - Dept dept = deptService.getOne(new LambdaQueryWrapper().eq(Dept::getId, id)); - if (null != dept) { + Dept dept = deptService.getOne(new LambdaQueryWrapper().eq(Dept::getId,id)); + if(null!=dept){ deptIds.add(dept.getId()); } - if (CollectionUtil.isNotEmpty(deptList)) { - for (Dept d : deptList) { + if(CollectionUtil.isNotEmpty(deptList)){ + for(Dept d:deptList){ deptIds.add(d.getId()); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DictController.java b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DictController.java index 3adf8e12f85abb0dfa788de20a80c5060e0bc0d4..56dcc127fa611ba239241088884d73dbe6009071 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DictController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DictController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.rest; @@ -10,10 +9,10 @@ import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.logging.aop.log.Log; import co.yixiang.modules.aop.ForbidSubmit; -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 co.yixiang.modules.dict.domain.Dict; +import co.yixiang.modules.dict.service.DictService; +import co.yixiang.modules.dict.service.dto.DictDto; +import co.yixiang.modules.dict.service.dto.DictQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -21,15 +20,22 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; /** - * @author hupeng - * @date 2019-04-10 - */ +* @author hupeng +* @date 2019-04-10 +*/ @Api(tags = "系统:字典管理") @RestController @RequestMapping("/api/dict") @@ -57,27 +63,27 @@ public class DictController { @ApiOperation("查询字典") @GetMapping(value = "/all") @PreAuthorize("@el.check('admin','dict:list')") - public ResponseEntity all() { - return new ResponseEntity<>(dictService.queryAll(new DictQueryCriteria()), HttpStatus.OK); + public ResponseEntity all(){ + return new ResponseEntity<>(dictService.queryAll(new DictQueryCriteria()),HttpStatus.OK); } @Log("查询字典") @ApiOperation("查询字典") @GetMapping @PreAuthorize("@el.check('admin','dict:list')") - public ResponseEntity getDicts(DictQueryCriteria resources, Pageable pageable) { - return new ResponseEntity<>(dictService.queryAll(resources, pageable), HttpStatus.OK); + public ResponseEntity getDicts(DictQueryCriteria resources, Pageable pageable){ + return new ResponseEntity<>(dictService.queryAll(resources,pageable),HttpStatus.OK); } @Log("新增字典") @ApiOperation("新增字典") @PostMapping @PreAuthorize("@el.check('admin','dict:add')") - public ResponseEntity create(@Validated @RequestBody Dict resources) { + public ResponseEntity create(@Validated @RequestBody Dict resources){ if (resources.getId() != null) { - throw new BadRequestException("A new " + ENTITY_NAME + " cannot already have an ID"); + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } - return new ResponseEntity<>(dictService.save(resources), HttpStatus.CREATED); + return new ResponseEntity<>(dictService.save(resources),HttpStatus.CREATED); } @ForbidSubmit @@ -85,8 +91,7 @@ public class DictController { @ApiOperation("修改字典") @PutMapping @PreAuthorize("@el.check('admin','dict:edit')") - public ResponseEntity update(@Validated @RequestBody Dict resources) { - + public ResponseEntity update(@Validated @RequestBody Dict resources){ dictService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -96,8 +101,7 @@ public class DictController { @ApiOperation("删除字典") @DeleteMapping(value = "/{id}") @PreAuthorize("@el.check('admin','dict:del')") - public ResponseEntity delete(@PathVariable Long id) { - + public ResponseEntity delete(@PathVariable Long id){ dictService.removeById(id); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DictDetailController.java b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DictDetailController.java index b4311f1cb7c3ad196ebdfe8e04b9530a5944bfc9..646dea1c13bda3c964a9d448cc366cf044824530 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DictDetailController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/DictDetailController.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.rest; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.logging.aop.log.Log; import co.yixiang.modules.aop.ForbidSubmit; -import co.yixiang.modules.system.domain.DictDetail; -import co.yixiang.modules.system.service.DictDetailService; -import co.yixiang.modules.system.service.dto.DictDetailQueryCriteria; +import co.yixiang.modules.dict.domain.DictDetail; +import co.yixiang.modules.dict.service.DictDetailService; +import co.yixiang.modules.dict.service.dto.DictDetailQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -21,15 +20,22 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import java.util.HashMap; import java.util.Map; /** - * @author hupeng - * @date 2019-04-10 - */ +* @author hupeng +* @date 2019-04-10 +*/ @RestController @Api(tags = "系统:字典详情管理") @RequestMapping("/api/dictDetail") @@ -46,34 +52,34 @@ public class DictDetailController { @ApiOperation("查询字典详情") @GetMapping public ResponseEntity getDictDetails(DictDetailQueryCriteria criteria, - @PageableDefault(sort = {"sort + 0"}, direction = Sort.Direction.ASC) Pageable pageable) { - return new ResponseEntity<>(dictDetailService.queryAll(criteria, pageable), HttpStatus.OK); + @PageableDefault(sort = {"sort + 0"}, direction = Sort.Direction.ASC) Pageable pageable){ + return new ResponseEntity<>(dictDetailService.queryAll(criteria,pageable),HttpStatus.OK); } @Log("查询多个字典详情") @ApiOperation("查询多个字典详情") @GetMapping(value = "/map") public ResponseEntity getDictDetailMaps(DictDetailQueryCriteria criteria, - @PageableDefault(sort = {"sort + 0"}, direction = Sort.Direction.ASC) Pageable pageable) { + @PageableDefault(sort = {"sort + 0"}, direction = Sort.Direction.ASC) Pageable pageable){ String[] names = criteria.getDictName().split(","); - Map map = new HashMap<>(names.length); + Map map = new HashMap<>(names.length); for (String name : names) { criteria.setDictName(name); - map.put(name, dictDetailService.queryAll(criteria, pageable).get("content")); + map.put(name,dictDetailService.queryAll(criteria,pageable).get("content")); } - return new ResponseEntity<>(map, HttpStatus.OK); + return new ResponseEntity<>(map,HttpStatus.OK); } @Log("新增字典详情") @ApiOperation("新增字典详情") @PostMapping @PreAuthorize("@el.check('admin','dict:add')") - public ResponseEntity create(@Validated @RequestBody DictDetail resources) { + public ResponseEntity create(@Validated @RequestBody DictDetail resources){ if (resources.getId() != null) { - throw new BadRequestException("A new " + ENTITY_NAME + " cannot already have an ID"); + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } resources.setDictId(resources.getDict().getId()); - return new ResponseEntity<>(dictDetailService.save(resources), HttpStatus.CREATED); + return new ResponseEntity<>(dictDetailService.save(resources),HttpStatus.CREATED); } @ForbidSubmit @@ -81,8 +87,7 @@ public class DictDetailController { @ApiOperation("修改字典详情") @PutMapping @PreAuthorize("@el.check('admin','dict:edit')") - public ResponseEntity update(@Validated @RequestBody DictDetail resources) { - + public ResponseEntity update(@Validated @RequestBody DictDetail resources){ dictDetailService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -92,8 +97,7 @@ public class DictDetailController { @ApiOperation("删除字典详情") @DeleteMapping(value = "/{id}") @PreAuthorize("@el.check('admin','dict:del')") - public ResponseEntity delete(@PathVariable Long id) { - + public ResponseEntity delete(@PathVariable Long id){ dictDetailService.removeById(id); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/JobController.java b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/JobController.java index dc9c109166904163927a189e377a5454754db1af..55703e5532122e4144ba905c2f21df978e044ac7 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/JobController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/JobController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.rest; @@ -22,16 +21,22 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.Set; /** - * @author hupeng - * @date 2019-03-29 - */ +* @author hupeng +* @date 2019-03-29 +*/ @Api(tags = "系统:岗位管理") @RestController @RequestMapping("/api/job") @@ -63,22 +68,22 @@ public class JobController { @ApiOperation("查询岗位") @GetMapping @PreAuthorize("@el.check('admin','job:list','user:list')") - public ResponseEntity getJobs(JobQueryCriteria criteria, Pageable pageable) { + public ResponseEntity getJobs(JobQueryCriteria criteria, Pageable pageable){ // 数据权限 criteria.setDeptIds(dataScope.getDeptIds()); - return new ResponseEntity<>(jobService.queryAll(criteria, pageable), HttpStatus.OK); + return new ResponseEntity<>(jobService.queryAll(criteria, pageable),HttpStatus.OK); } @Log("新增岗位") @ApiOperation("新增岗位") @PostMapping @PreAuthorize("@el.check('admin','job:add')") - public ResponseEntity create(@Validated @RequestBody Job resources) { + public ResponseEntity create(@Validated @RequestBody Job resources){ if (resources.getId() != null) { - throw new BadRequestException("A new " + ENTITY_NAME + " cannot already have an ID"); + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } resources.setDeptId(resources.getDept().getId()); - return new ResponseEntity<>(jobService.save(resources), HttpStatus.CREATED); + return new ResponseEntity<>(jobService.save(resources),HttpStatus.CREATED); } @ForbidSubmit @@ -86,8 +91,7 @@ public class JobController { @ApiOperation("修改岗位") @PutMapping @PreAuthorize("@el.check('admin','job:edit')") - public ResponseEntity update(@Validated @RequestBody Job resources) { - + public ResponseEntity update(@Validated @RequestBody Job resources){ resources.setDeptId(resources.getDept().getId()); jobService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); @@ -98,12 +102,11 @@ public class JobController { @ApiOperation("删除岗位") @DeleteMapping @PreAuthorize("@el.check('admin','job:del')") - public ResponseEntity delete(@RequestBody Set ids) { - + public ResponseEntity delete(@RequestBody Set ids){ try { jobService.removeByIds(ids); - } catch (Throwable e) { - throw new BadRequestException("所选岗位存在用户关联,请取消关联后再试"); + }catch (Throwable e){ + throw new BadRequestException( "所选岗位存在用户关联,请取消关联后再试"); } return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/MenuController.java b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/MenuController.java index c357fb26340aea019f283a0583c07c62695c361b..da3c8a3ff7336c3dca90bf212edcb47be822075b 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/MenuController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/MenuController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.rest; @@ -25,7 +24,13 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -66,33 +71,32 @@ public class MenuController { @GetMapping(value = "/download") @PreAuthorize("@el.check('menu:list')") public void download(HttpServletResponse response, MenuQueryCriteria criteria) throws IOException { - - menuService.download(generator.convert(menuService.queryAll(criteria), MenuDto.class), response); + menuService.download(generator.convert(menuService.queryAll(criteria),MenuDto.class), response); } @ApiOperation("获取前端所需菜单") @GetMapping(value = "/build") - public ResponseEntity buildMenus() { + 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"); - return new ResponseEntity<>(menuService.buildMenus(menuDtos), HttpStatus.OK); + return new ResponseEntity<>(menuService.buildMenus(menuDtos),HttpStatus.OK); } @ApiOperation("返回全部的菜单") @GetMapping(value = "/tree") @PreAuthorize("@el.check('menu:list','roles:list')") - public ResponseEntity getMenuTree() { - return new ResponseEntity<>(menuService.getMenuTree(menuService.findByPid(0L)), HttpStatus.OK); + public ResponseEntity getMenuTree(){ + return new ResponseEntity<>(menuService.getMenuTree(menuService.findByPid(0L)),HttpStatus.OK); } @Log("查询菜单") @ApiOperation("查询菜单") @GetMapping @PreAuthorize("@el.check('menu:list')") - public ResponseEntity getMenus(MenuQueryCriteria criteria) { - List menuDtoList = generator.convert(menuService.queryAll(criteria), MenuDto.class); - return new ResponseEntity<>(menuService.buildTree(menuDtoList), HttpStatus.OK); + public ResponseEntity getMenus(MenuQueryCriteria criteria){ + List menuDtoList = generator.convert(menuService.queryAll(criteria),MenuDto.class); + return new ResponseEntity<>(menuService.buildTree(menuDtoList),HttpStatus.OK); } @ForbidSubmit @@ -100,13 +104,12 @@ public class MenuController { @ApiOperation("新增菜单") @PostMapping @PreAuthorize("@el.check('menu:add')") - public ResponseEntity create(@Validated @RequestBody Menu resources) { - + public ResponseEntity create(@Validated @RequestBody Menu resources){ if (resources.getId() != null) { - throw new BadRequestException("A new " + ENTITY_NAME + " cannot already have an ID"); + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } - return new ResponseEntity<>(menuService.create(resources), HttpStatus.CREATED); + return new ResponseEntity<>(menuService.create(resources),HttpStatus.CREATED); } @ForbidSubmit @@ -114,8 +117,7 @@ public class MenuController { @ApiOperation("修改菜单") @PutMapping @PreAuthorize("@el.check('menu:edit')") - public ResponseEntity update(@Validated @RequestBody Menu resources) { - + public ResponseEntity update(@Validated @RequestBody Menu resources){ menuService.update(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -125,12 +127,11 @@ public class MenuController { @ApiOperation("删除菜单") @DeleteMapping @PreAuthorize("@el.check('menu:del')") - public ResponseEntity delete(@RequestBody Set ids) { - + public ResponseEntity delete(@RequestBody Set ids){ Set menuSet = new HashSet<>(); for (Long id : ids) { List menuList = menuService.findByPid(id); - menuSet.add(menuService.getOne(new LambdaQueryWrapper().eq(Menu::getId, id))); + menuSet.add(menuService.getOne(new LambdaQueryWrapper().eq(Menu::getId,id))); menuSet = menuService.getDeleteMenus(menuList, menuSet); } menuService.delete(menuSet); diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/RoleController.java b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/RoleController.java index a213bdda694f51b635982dd8a61ad0a85a165a7a..688962bcb0d012ad402fcad71facb8033ce01b35 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/RoleController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/RoleController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.rest; @@ -28,7 +27,14 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -61,7 +67,7 @@ public class RoleController { @ApiOperation("获取单个role") @GetMapping(value = "/{id}") @PreAuthorize("@el.check('roles:list')") - public ResponseEntity getRoles(@PathVariable Long id) { + public ResponseEntity getRoles(@PathVariable Long id){ return new ResponseEntity<>(roleService.findById(id), HttpStatus.OK); } @@ -70,28 +76,28 @@ public class RoleController { @GetMapping(value = "/download") @PreAuthorize("@el.check('role:list')") public void download(HttpServletResponse response, RoleQueryCriteria criteria) throws IOException { - roleService.download(generator.convert(roleService.queryAll(criteria), RoleDto.class), 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(RoleQueryCriteria criteria, @PageableDefault(value = 2000, sort = {"level"}, direction = Sort.Direction.ASC) Pageable pageable) { - return new ResponseEntity<>(roleService.queryAlls(criteria, 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("查询角色") @ApiOperation("查询角色") @GetMapping @PreAuthorize("@el.check('roles:list')") - public ResponseEntity getRoles(RoleQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(roleService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getRoles(RoleQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(roleService.queryAll(criteria,pageable),HttpStatus.OK); } @ApiOperation("获取用户级别") @GetMapping(value = "/level") - public ResponseEntity getLevel() { - return new ResponseEntity<>(Dict.create().set("level", getLevels(null)), HttpStatus.OK); + public ResponseEntity getLevel(){ + return new ResponseEntity<>(Dict.create().set("level", getLevels(null)),HttpStatus.OK); } @ForbidSubmit @@ -99,13 +105,12 @@ public class RoleController { @ApiOperation("新增角色") @PostMapping @PreAuthorize("@el.check('roles:add')") - public ResponseEntity create(@Validated @RequestBody Role resources) { - + public ResponseEntity create(@Validated @RequestBody Role resources){ if (resources.getId() != null) { - throw new BadRequestException("A new " + ENTITY_NAME + " cannot already have an ID"); + throw new BadRequestException("A new "+ ENTITY_NAME +" cannot already have an ID"); } getLevels(resources.getLevel()); - return new ResponseEntity<>(roleService.create(resources), HttpStatus.CREATED); + return new ResponseEntity<>(roleService.create(resources),HttpStatus.CREATED); } @ForbidSubmit @@ -113,8 +118,7 @@ public class RoleController { @ApiOperation("修改角色") @PutMapping @PreAuthorize("@el.check('roles:edit')") - public ResponseEntity update(@Validated @RequestBody Role resources) { - + public ResponseEntity update(@Validated @RequestBody Role resources){ getLevels(resources.getLevel()); roleService.update(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); @@ -125,11 +129,10 @@ public class RoleController { @ApiOperation("修改角色菜单") @PutMapping(value = "/menu") @PreAuthorize("@el.check('roles:edit')") - public ResponseEntity updateMenu(@RequestBody Role resources) { - + public ResponseEntity updateMenu(@RequestBody Role resources){ RoleDto role = roleService.findById(resources.getId()); getLevels(role.getLevel()); - roleService.updateMenu(resources, role); + roleService.updateMenu(resources,role); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @@ -138,15 +141,14 @@ public class RoleController { @ApiOperation("删除角色") @DeleteMapping @PreAuthorize("@el.check('roles:del')") - public ResponseEntity delete(@RequestBody Set ids) { - + public ResponseEntity delete(@RequestBody Set ids){ for (Long id : ids) { RoleDto role = roleService.findById(id); getLevels(role.getLevel()); } try { roleService.delete(ids); - } catch (Throwable e) { + } catch (Throwable e){ throw new BadRequestException("所选角色存在用户关联,请取消关联后再试"); } return new ResponseEntity<>(HttpStatus.OK); @@ -156,12 +158,12 @@ public class RoleController { * 获取用户的角色级别 * @return / */ - private int getLevels(Integer level) { + private int getLevels(Integer level){ 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) { + if(level != null){ + if(level < min){ throw new BadRequestException("权限不足,你的角色级别:" + min + ",低于操作的角色级别:" + level); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/SysUserController.java b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/SysUserController.java index 456c6b377f43bdd6238eea42ba7fe6dadd022ee1..e388edcf82739c8c78dcf67e16ec7275f596d27e 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/rest/SysUserController.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/rest/SysUserController.java @@ -1,14 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.rest; import cn.hutool.crypto.asymmetric.KeyType; import cn.hutool.crypto.asymmetric.RSA; import co.yixiang.config.DataScope; +import co.yixiang.constant.ShopConstants; import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.logging.aop.log.Log; @@ -37,7 +37,15 @@ import org.springframework.security.crypto.password.PasswordEncoder; import org.springframework.util.CollectionUtils; import org.springframework.util.ObjectUtils; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; @@ -88,7 +96,7 @@ public class SysUserController { @ApiOperation("查询用户") @GetMapping @PreAuthorize("@el.check('admin','user:list')") - public ResponseEntity getUsers(UserQueryCriteria criteria, Pageable pageable) { + public ResponseEntity getUsers(UserQueryCriteria criteria, Pageable pageable){ Set deptSet = new HashSet<>(); Set result = new HashSet<>(); if (!ObjectUtils.isEmpty(criteria.getDeptId())) { @@ -98,23 +106,23 @@ public class SysUserController { // 数据权限 Set deptIds = dataScope.getDeptIds(); // 查询条件不为空并且数据权限不为空则取交集 - if (!CollectionUtils.isEmpty(deptIds) && !CollectionUtils.isEmpty(deptSet)) { + if (!CollectionUtils.isEmpty(deptIds) && !CollectionUtils.isEmpty(deptSet)){ // 取交集 result.addAll(deptSet); result.retainAll(deptIds); // 若无交集,则代表无数据权限 criteria.setDeptIds(result); - if (result.size() == 0) { - return new ResponseEntity<>(PageUtil.toPage(null, 0), HttpStatus.OK); + if(result.size() == 0){ + return new ResponseEntity<>(PageUtil.toPage(null,0),HttpStatus.OK); } else { - return new ResponseEntity<>(userService.queryAll(criteria, pageable), HttpStatus.OK); + return new ResponseEntity<>(userService.queryAll(criteria,pageable),HttpStatus.OK); } - // 否则取并集 + // 否则取并集 } else { result.addAll(deptSet); result.addAll(deptIds); criteria.setDeptIds(result); - return new ResponseEntity<>(userService.queryAll(criteria, pageable), HttpStatus.OK); + return new ResponseEntity<>(userService.queryAll(criteria,pageable),HttpStatus.OK); } } @@ -123,12 +131,11 @@ public class SysUserController { @ApiOperation("新增用户") @PostMapping @PreAuthorize("@el.check('admin','user:add')") - public ResponseEntity create(@Validated @RequestBody User resources) { - + public ResponseEntity create(@Validated @RequestBody User resources){ checkLevel(resources); // 默认密码 123456 - resources.setPassword(passwordEncoder.encode("123456")); - return new ResponseEntity<>(userService.create(resources), HttpStatus.CREATED); + resources.setPassword(passwordEncoder.encode(ShopConstants.YSHOP_DEFAULT_PWD)); + return new ResponseEntity<>(userService.create(resources),HttpStatus.CREATED); } @ForbidSubmit @@ -136,8 +143,7 @@ public class SysUserController { @ApiOperation("修改用户") @PutMapping @PreAuthorize("@el.check('admin','user:edit')") - public ResponseEntity update(@Validated @RequestBody User resources) { - + public ResponseEntity update(@Validated @RequestBody User resources){ checkLevel(resources); userService.update(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); @@ -147,10 +153,9 @@ public class SysUserController { @Log("修改用户:个人中心") @ApiOperation("修改用户:个人中心") @PutMapping(value = "center") - public ResponseEntity center(@Validated(User.Update.class) @RequestBody User resources) { - + public ResponseEntity center(@Validated(User.Update.class) @RequestBody User resources){ UserDto userDto = userService.findByName(SecurityUtils.getUsername()); - if (!resources.getId().equals(userDto.getId())) { + if(!resources.getId().equals(userDto.getId())){ throw new BadRequestException("不能修改他人资料"); } userService.saveOrUpdate(resources); @@ -162,12 +167,11 @@ public class SysUserController { @ApiOperation("删除用户") @DeleteMapping @PreAuthorize("@el.check('admin','user:del')") - public ResponseEntity delete(@RequestBody Set ids) { - + public ResponseEntity delete(@RequestBody Set ids){ 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()); } @@ -179,28 +183,26 @@ public class SysUserController { @ForbidSubmit @ApiOperation("修改密码") @PostMapping(value = "/updatePass") - public ResponseEntity updatePass(@RequestBody UserPassVo passVo) { - + public ResponseEntity updatePass(@RequestBody UserPassVo passVo){ // 密码解密 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()); - if (!passwordEncoder.matches(oldPass, user.getPassword())) { + if(!passwordEncoder.matches(oldPass, user.getPassword())){ throw new BadRequestException("修改失败,旧密码错误"); } - if (passwordEncoder.matches(newPass, user.getPassword())) { + if(passwordEncoder.matches(newPass, user.getPassword())){ throw new BadRequestException("新密码不能与旧密码相同"); } - userService.updatePass(user.getUsername(), passwordEncoder.encode(newPass)); + userService.updatePass(user.getUsername(),passwordEncoder.encode(newPass)); return new ResponseEntity<>(HttpStatus.OK); } @ForbidSubmit @ApiOperation("修改头像") @PostMapping(value = "/updateAvatar") - public ResponseEntity updateAvatar(@RequestParam MultipartFile file) { - + public ResponseEntity updateAvatar(@RequestParam MultipartFile file){ userService.updateAvatar(file); return new ResponseEntity<>(HttpStatus.OK); } @@ -209,18 +211,17 @@ public class SysUserController { @Log("修改邮箱") @ApiOperation("修改邮箱") @PostMapping(value = "/updateEmail/{code}") - public ResponseEntity updateEmail(@PathVariable String code, @RequestBody User user) { - + public ResponseEntity updateEmail(@PathVariable String code,@RequestBody User user){ // 密码解密 RSA rsa = new RSA(privateKey, null); String password = new String(rsa.decrypt(user.getPassword(), KeyType.PrivateKey)); UserDto userDto = userService.findByName(SecurityUtils.getUsername()); - if (!passwordEncoder.matches(password, userDto.getPassword())) { + if(!passwordEncoder.matches(password, userDto.getPassword())){ throw new BadRequestException("密码错误"); } - VerificationCode verificationCode = new VerificationCode(code, YshopConstant.RESET_MAIL, "email", user.getEmail()); + VerificationCode verificationCode = new VerificationCode(code, YshopConstant.RESET_MAIL,"email",user.getEmail()); verificationCodeService.validated(verificationCode); - userService.updateEmail(userDto.getUsername(), user.getEmail()); + userService.updateEmail(userDto.getUsername(),user.getEmail()); return new ResponseEntity<>(HttpStatus.OK); } @@ -230,7 +231,7 @@ public class SysUserController { */ 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())); + 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-admin/src/main/java/co/yixiang/modules/system/service/DeptService.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/DeptService.java index 9f2842ce31f9b2e8d2b3dbc598e4693d21ba05f3..b8813be4109a95d2f4dd9ba7482fa7cb4eb5cb82 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/DeptService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/DeptService.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; import co.yixiang.common.service.BaseService; @@ -19,32 +21,32 @@ import java.util.Map; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ -public interface DeptService extends BaseService { +* @author hupeng +* @date 2020-05-14 +*/ +public interface DeptService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(DeptQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(DeptQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(DeptQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; /** @@ -61,7 +63,6 @@ public interface DeptService extends BaseService { */ Object buildTree(List deptDtos); - /** * 删除部门 * @param deptIds diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/DictDetailService.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/DictDetailService.java deleted file mode 100644 index 83dab9fb4ebf53e1144ca945e3fceca73ee64d02..0000000000000000000000000000000000000000 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/DictDetailService.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -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.DictDetailQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-14 - */ -public interface DictDetailService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(DictDetailQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @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-admin/src/main/java/co/yixiang/modules/system/service/DictService.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/DictService.java deleted file mode 100644 index ba8958b6e9f227af33d47d9f4f0ff6508982ed6e..0000000000000000000000000000000000000000 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/DictService.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -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.DictQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-14 - */ -public interface DictService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(DictQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(DictQueryCriteria criteria); - - /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List all, HttpServletResponse response) throws IOException; -} diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/JobService.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/JobService.java index 5e607dcc6154cabcf406216d6bf7d4bc32b787c1..bf5a4f2e225146ccdd28ce0d6b5f32de646bc394 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/JobService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/JobService.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; import co.yixiang.common.service.BaseService; @@ -18,31 +20,31 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-14 - */ -public interface JobService extends BaseService { +* @author hupeng +* @date 2020-05-14 +*/ +public interface JobService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(JobQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(JobQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(JobQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/MenuService.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/MenuService.java index b08e602073dac738df97c184d0a35b271b47166d..527eda3c9c50a729a4605709f91f07bb45fdbe0f 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/MenuService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/MenuService.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; import co.yixiang.common.service.BaseService; @@ -21,32 +23,32 @@ import java.util.Map; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ -public interface MenuService extends BaseService { +* @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 pageable 分页参数 + * @return Map + */ + Map queryAll(MenuQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(MenuQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; /** @@ -54,7 +56,7 @@ public interface MenuService extends BaseService { * @param menuDtos 原始数据 * @return / */ - Map buildTree(List menuDtos); + Map buildTree(List menuDtos); /** * 构建菜单树 diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/RoleService.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/RoleService.java index 45195c06e08c842bf452da6250b8e998bbe5bad9..75975f705f2f031b43729b1c062cde7d0793b707 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/RoleService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/RoleService.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; import co.yixiang.common.service.BaseService; @@ -23,40 +25,40 @@ import java.util.Map; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ -public interface RoleService extends BaseService { +* @author hupeng +* @date 2020-05-14 +*/ +public interface RoleService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(RoleQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(RoleQueryCriteria criteria, Pageable pageable); /** * 查询数据分页 * @param pageable 分页参数 - * @return Map + * @return Map */ Object queryAlls(RoleQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(RoleQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; /** diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/RolesDeptsService.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/RolesDeptsService.java index ef1216c5117ceb72d8c8160150bf4f640f90f250..13407402efed254ba0d76de1fd7b1a4cccf8bfdf 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/RolesDeptsService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/RolesDeptsService.java @@ -1,18 +1,19 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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 { +* @author hupeng +* @date 2020-05-16 +*/ +public interface RolesDeptsService extends BaseService{ } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/RolesMenusService.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/RolesMenusService.java index e4c90018c96154360980622afc6ef7764d4110cc..d7fff328fa7feb4d44f68330753dffdc1301de53 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/RolesMenusService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/RolesMenusService.java @@ -1,18 +1,19 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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 { +* @author hupeng +* @date 2020-05-16 +*/ +public interface RolesMenusService extends BaseService{ } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/UserAvatarService.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/UserAvatarService.java index 1cb86571be9b5edf37b761e5ac8e1d7b3c63af89..714c37f93171f0960e399c69b823f6d68748ecf8 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/UserAvatarService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/UserAvatarService.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; import co.yixiang.common.service.BaseService; @@ -18,32 +20,32 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-14 - */ -public interface UserAvatarService extends BaseService { +* @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 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(UserAvatarQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(UserAvatarQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; UserAvatar saveFile(UserAvatar userAvatar); diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/UserService.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/UserService.java index 4db701b8440c0e4ce1c42ad53a920a57431f94d4..cce730fd627014c843f5346381000303009d5751 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/UserService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/UserService.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service; import co.yixiang.common.service.BaseService; @@ -20,32 +22,32 @@ import java.util.Map; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ -public interface UserService extends BaseService { +* @author hupeng +* @date 2020-05-14 +*/ +public interface UserService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(UserQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(UserQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(UserQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; /** diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/UsersRolesService.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/UsersRolesService.java index 1800e125afcab09ff950b9b2b3b3d8e9b6fc3c51..8d86c5e249bd60828d88cc5b01759e108ab5ad42 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/UsersRolesService.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/UsersRolesService.java @@ -1,18 +1,19 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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 { +* @author hupeng +* @date 2020-05-16 +*/ +public interface UsersRolesService extends BaseService{ } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptDto.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptDto.java index c34dc449b75980bc4ef7c0e9a1793bcb7281c2f9..aa78a901186d775433581cc84b10be3633dac694 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptDto.java @@ -1,22 +1,28 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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 lombok.Getter; +import lombok.Setter; import java.io.Serializable; import java.sql.Timestamp; import java.util.List; /** - * @author hupeng - * @date 2020-05-14 - */ -@Data +* @author hupeng +* @date 2020-05-14 +*/ +@Getter +@Setter public class DeptDto implements Serializable { /** ID */ @@ -31,6 +37,7 @@ public class DeptDto implements Serializable { /** 状态 */ private Boolean enabled; + @JsonInclude(JsonInclude.Include.NON_EMPTY) private List children; /** 创建日期 */ diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptQueryCriteria.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptQueryCriteria.java index 5c51bac93fe9fad542ab57f80dc516832aa3e550..a8a9244231d4b06e44a8d702f17c4f81ef104804 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptQueryCriteria.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptQueryCriteria.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import co.yixiang.annotation.Query; @@ -14,13 +16,13 @@ import java.util.List; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class DeptQueryCriteria { +public class DeptQueryCriteria{ - @Query(type = Query.Type.IN, propName = "id") + @Query(type = Query.Type.IN, propName="id") private Set ids; @Query(type = Query.Type.INNER_LIKE) diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptSmallDto.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptSmallDto.java index adca8a1c7c9ec9ec16aaa5544d39da08ab037c3b..af1cb2bfe2ba71cabc74b819491752c4c4c98279 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptSmallDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DeptSmallDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.service.dto; @@ -11,9 +10,9 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2019-6-10 16:32:18 - */ +* @author hupeng +* @date 2019-6-10 16:32:18 +*/ @Data public class DeptSmallDto implements Serializable { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictDetailQueryCriteria.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictDetailQueryCriteria.java deleted file mode 100644 index 989260d3cf802c7f005e8bb84a10a7ae4579ce89..0000000000000000000000000000000000000000 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictDetailQueryCriteria.java +++ /dev/null @@ -1,23 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.system.service.dto; - -import co.yixiang.annotation.Query; -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-14 - */ -@Data -public class DictDetailQueryCriteria { - - @Query(type = Query.Type.INNER_LIKE) - private String label; - - private String dictName; -} diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictQueryCriteria.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictQueryCriteria.java deleted file mode 100644 index dae2b8f1418ee1dd2dbeda1d6e123ebb4c4c4311..0000000000000000000000000000000000000000 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictQueryCriteria.java +++ /dev/null @@ -1,21 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.system.service.dto; - -import co.yixiang.annotation.Query; -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-14 - */ -@Data -public class DictQueryCriteria { - - @Query(blurry = "name,remark") - private String blurry; -} diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobDto.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobDto.java index 10a4f6e1bced33c899730044b61824e596c792b5..b16a56b65201391e92aabff7151bc70c0bdea675 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobDto.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import lombok.Data; @@ -12,9 +14,9 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data public class JobDto implements Serializable { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobQueryCriteria.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobQueryCriteria.java index 956bc3a9f246ab468671619a2e3b5a91fe4502af..693a66b49b17553044dc37aee4101c3a97cc411d 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobQueryCriteria.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.service.dto; @@ -15,9 +14,9 @@ import java.util.List; import java.util.Set; /** - * @author hupeng - * @date 2019-6-4 14:49:34 - */ +* @author hupeng +* @date 2019-6-4 14:49:34 +*/ @Data @NoArgsConstructor public class JobQueryCriteria { @@ -31,7 +30,7 @@ public class JobQueryCriteria { @Query private Long deptId; - @Query(propName = "deptId", type = Query.Type.IN) + @Query(propName = "deptId", type = Query.Type.IN) private Set deptIds; @Query(type = Query.Type.BETWEEN) diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobSmallDto.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobSmallDto.java index ead684f03d5803818b4c49072fd53c4c1a92179e..7dd5aa5193c770985fa9331bf4611e9e145935b8 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobSmallDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/JobSmallDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.service.dto; @@ -12,9 +11,9 @@ import lombok.NoArgsConstructor; import java.io.Serializable; /** - * @author hupeng - * @date 2019-6-10 16:32:18 - */ +* @author hupeng +* @date 2019-6-10 16:32:18 +*/ @Data @NoArgsConstructor public class JobSmallDto implements Serializable { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/MenuDto.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/MenuDto.java index 28e8193fad3113d69e437f6b9b3d38d0a2651d7d..7c0807e8681465acb0383db06621c171c9c9e4fa 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/MenuDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/MenuDto.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import lombok.Data; @@ -13,9 +15,9 @@ import java.sql.Timestamp; import java.util.List; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data public class MenuDto implements Serializable { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/MenuQueryCriteria.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/MenuQueryCriteria.java index aebaece36583e8b693acce349995a9bb947eaa88..7235eded862f46ef7e18d093dc4ad4580027853f 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/MenuQueryCriteria.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/MenuQueryCriteria.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import co.yixiang.annotation.Query; @@ -13,11 +15,11 @@ import java.sql.Timestamp; import java.util.List; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class MenuQueryCriteria { +public class MenuQueryCriteria{ @Query(blurry = "name") private String blurry; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/PermissionDto.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/PermissionDto.java index 0027ba71b9bfe094cca56b7da73b439a58c2d3a7..eb8776363e03fbb26ae38974781ba0c539beddb3 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/PermissionDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/PermissionDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.service.dto; @@ -17,28 +16,28 @@ import java.util.List; * @date 2018-12-03 */ @Data -public class PermissionDto implements Serializable { +public class PermissionDto implements Serializable{ - private Long id; + private Long id; - private String name; + private String name; - private Long pid; + private Long pid; - private String alias; + private String alias; - private Timestamp createTime; + private Timestamp createTime; - private List children; + private List children; - @Override - public String toString() { - return "Permission{" + - "id=" + id + - ", name='" + name + '\'' + - ", pid=" + pid + - ", alias='" + alias + '\'' + - ", createTime=" + createTime + - '}'; - } + @Override + public String toString() { + return "Permission{" + + "id=" + id + + ", name='" + name + '\'' + + ", pid=" + pid + + ", alias='" + alias + '\'' + + ", createTime=" + createTime + + '}'; + } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/PermissionQueryCriteria.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/PermissionQueryCriteria.java index a37ef6f98997dd6cb1683faf98cb7f5a7374e5da..083243eb859b05a66abbb426fb59d2b2cfe8a7c9 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/PermissionQueryCriteria.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/PermissionQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.service.dto; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleDto.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleDto.java index 84735187fb7f4deaf68b5c2452fa957911bb0724..80c426e68344f3348488f0298243dd1595d1eae9 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleDto.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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; @@ -14,9 +16,9 @@ import java.sql.Timestamp; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data public class RoleDto implements Serializable { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleQueryCriteria.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleQueryCriteria.java index 0cbacd35181b1bb30cfa25d37e40fd6c8829f8f2..e285eef9c286d5c0b3a1a02e5902eeb1c18de4d1 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleQueryCriteria.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleQueryCriteria.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import co.yixiang.annotation.Query; @@ -13,11 +15,11 @@ import java.sql.Timestamp; import java.util.List; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class RoleQueryCriteria { +public class RoleQueryCriteria{ @Query(blurry = "name") private String blurry; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleSmallDto.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleSmallDto.java index b2ddfacfd0bdd8e59940b827406f6327a09e1cbf..282d938c817cc98a902777ff7e68376a4cd9e556 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleSmallDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/RoleSmallDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.system.service.dto; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarDto.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarDto.java index c0e52f8cf55aa57cdb2a0e8efc23be68281461ea..815925303efe579c05eded49df822f1265cf3b3e 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarDto.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import lombok.Data; @@ -12,9 +14,9 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data public class UserAvatarDto implements Serializable { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarQueryCriteria.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarQueryCriteria.java index a59cebe4b6976c0376a5ed8eb7dced9078e41a80..5d988e7b29d3dbf70900706e43c9cf5a79ce0191 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarQueryCriteria.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserAvatarQueryCriteria.java @@ -1,17 +1,19 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class UserAvatarQueryCriteria { +public class UserAvatarQueryCriteria{ } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserDto.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserDto.java index c8d5d08dfafc8a036c7bb642746cec561d7893ad..2f7c46f8205deb7c4cae0767fb8611a36514691f 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserDto.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserDto.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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; @@ -15,9 +17,9 @@ import java.sql.Timestamp; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data public class UserDto implements Serializable { diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserQueryCriteria.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserQueryCriteria.java index 3ceb90fae2d82b579d85ce45ad8a4d1d8e4d2e68..235ee610e1b1cdc0d27e9050c6c29540c1a4748b 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserQueryCriteria.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/UserQueryCriteria.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.dto; import co.yixiang.annotation.Query; @@ -14,11 +16,11 @@ import java.util.List; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -public class UserQueryCriteria { +public class UserQueryCriteria{ @Query private Long id; diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/DeptServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/DeptServiceImpl.java index d9a988ba03e464c89165b73fa140be6285303e2f..ffa2b9bf3491980d68032b2a570810d86137d2d3 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/DeptServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/DeptServiceImpl.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; @@ -31,7 +33,13 @@ import org.springframework.util.CollectionUtils; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; // 默认不使用缓存 @@ -40,9 +48,9 @@ import java.util.stream.Collectors; //import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Service @AllArgsConstructor //@CacheConfig(cacheNames = "dept") @@ -52,9 +60,7 @@ public class DeptServiceImpl extends BaseServiceImpl implement private final IGenerator generator; private final DeptMapper deptMapper; - private final JobMapper jobMapper; - private final RolesDeptsMapper rolesDeptsMapper; @Override @@ -71,7 +77,7 @@ public class DeptServiceImpl extends BaseServiceImpl implement @Override //@Cacheable - public List queryAll(DeptQueryCriteria criteria) { + public List queryAll(DeptQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(Dept.class, criteria)); } @@ -80,7 +86,7 @@ public class DeptServiceImpl extends BaseServiceImpl implement public void download(List all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (DeptDto dept : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("名称", dept.getName()); map.put("上级部门", dept.getPid()); map.put("状态", dept.getEnabled()); @@ -113,11 +119,11 @@ public class DeptServiceImpl extends BaseServiceImpl implement @Override public Object buildTree(List deptDtos) { Set trees = new LinkedHashSet<>(); - Set depts = new LinkedHashSet<>(); + Set depts= new LinkedHashSet<>(); List deptNames = deptDtos.stream().map(DeptDto::getName).collect(Collectors.toList()); boolean isChild; DeptQueryCriteria criteria = new DeptQueryCriteria(); - List deptList = this.queryAll(criteria); + List deptList = this.queryAll(criteria); for (DeptDto deptDto : deptDtos) { isChild = false; if ("0".equals(deptDto.getPid().toString())) { @@ -132,10 +138,10 @@ public class DeptServiceImpl extends BaseServiceImpl implement deptDto.getChildren().add(it); } } - if (isChild) { + if(isChild) { depts.add(deptDto); for (Dept dept : deptList) { - if (dept.getId().equals(deptDto.getPid()) && !deptNames.contains(dept.getName())) { + if(dept.getId().equals(deptDto.getPid()) && !deptNames.contains(dept.getName())){ depts.add(deptDto); } } @@ -148,27 +154,26 @@ public class DeptServiceImpl extends BaseServiceImpl implement Integer totalElements = deptDtos.size(); - Map map = new HashMap<>(2); - map.put("totalElements", totalElements); - map.put("content", CollectionUtils.isEmpty(trees) ? deptDtos : trees); + Map map = new HashMap<>(2); + map.put("totalElements",totalElements); + map.put("content",CollectionUtils.isEmpty(trees)? deptDtos :trees); return map; } /** * 删除部门 - * * @param deptIds */ @Override - public void delDepts(List deptIds) { - Long jobCount = jobMapper.selectCount(Wrappers.lambdaQuery().in(Job::getDeptId, deptIds)); + public void delDepts(List deptIds){ + Long jobCount = jobMapper.selectCount(Wrappers.lambdaQuery().in(Job::getDeptId,deptIds)); Long roleCount = rolesDeptsMapper.selectCount(Wrappers.lambdaQuery() - .in(RolesDepts::getDeptId, deptIds)); - if (jobCount > 0) { - throw new BadRequestException("所选部门中存在与岗位关联,请取消关联后再试"); + .in(RolesDepts::getDeptId,deptIds)); + if(jobCount > 0) { + throw new BadRequestException( "所选部门中存在与岗位关联,请取消关联后再试"); } - if (roleCount > 0) { - throw new BadRequestException("所选部门中存在与角色关联,请取消关联后再试"); + if(roleCount > 0) { + throw new BadRequestException( "所选部门中存在与角色关联,请取消关联后再试"); } this.removeByIds(deptIds); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/JobServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/JobServiceImpl.java index f728891d822e693ca51c591f7c88bf8dca1e549f..62c6603ee7eeb8c99a3d110634b1c3af3d67eca2 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/JobServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/JobServiceImpl.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; @@ -30,18 +32,15 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ +@SuppressWarnings("unchecked") @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "job") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class JobServiceImpl extends BaseServiceImpl implements JobService { @@ -63,17 +62,17 @@ public class JobServiceImpl extends BaseServiceImpl implements J @Override //@Cacheable - public List queryAll(JobQueryCriteria criteria) { + public List queryAll(JobQueryCriteria criteria){ List jobList = baseMapper.selectList(QueryHelpPlus.getPredicate(Job.class, criteria)); - if (criteria.getDeptIds().size() == 0) { + if(criteria.getDeptIds().size()==0){ for (Job job : jobList) { - job.setDept(deptService.getById(job.getDeptId())); + job.setDept(deptService.getById(job.getDeptId())); } - } else { + }else { //断权限范围 for (Long deptId : criteria.getDeptIds()) { for (Job job : jobList) { - if (deptId.equals(job.getDeptId())) { + if(deptId.equals(job.getDeptId())){ job.setDept(deptService.getById(job.getDeptId())); } } @@ -87,7 +86,7 @@ public class JobServiceImpl extends BaseServiceImpl implements J public void download(List all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (JobDto job : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("岗位名称", job.getName()); map.put("岗位状态", job.getEnabled()); map.put("岗位排序", job.getSort()); diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/MenuServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/MenuServiceImpl.java index 7ee3a9188c12130ed2f78a292f2c35cac926faeb..486efffc57ad9a3393c2ddb22d02440a088d0301 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/MenuServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/MenuServiceImpl.java @@ -1,13 +1,16 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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; import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; @@ -38,7 +41,14 @@ import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.HashMap; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.LinkedList; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; // 默认不使用缓存 @@ -47,9 +57,9 @@ import java.util.stream.Collectors; //import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Service @AllArgsConstructor @CacheConfig(cacheNames = "menu") @@ -74,7 +84,7 @@ public class MenuServiceImpl extends BaseServiceImpl implement @Override @Cacheable - public List queryAll(MenuQueryCriteria criteria) { + public List queryAll(MenuQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(Menu.class, criteria)); } @@ -83,7 +93,7 @@ public class MenuServiceImpl extends BaseServiceImpl implement public void download(List all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (MenuDto menu : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("是否外链", menu.getIFrame()); map.put("菜单名称", menu.getName()); map.put("组件", menu.getComponent()); @@ -126,11 +136,11 @@ public class MenuServiceImpl extends BaseServiceImpl implement } } } - Map map = new HashMap<>(2); - if (trees.size() == 0) { + Map map = new HashMap<>(2); + if(trees.size() == 0){ trees = menuDtos.stream().filter(s -> !ids.contains(s.getId())).collect(Collectors.toList()); } - map.put("content", trees); + map.put("content",trees); map.put("totalElements", menuDtos.size()); return map; } @@ -145,32 +155,32 @@ public class MenuServiceImpl extends BaseServiceImpl implement public List buildMenus(List menuDtos) { List list = new LinkedList<>(); menuDtos.forEach(menuDTO -> { - if (menuDTO != null) { + if (menuDTO!=null){ List menuDtoList = menuDTO.getChildren(); MenuVo menuVo = new MenuVo(); - menuVo.setName(ObjectUtil.isNotEmpty(menuDTO.getComponentName()) ? menuDTO.getComponentName() : menuDTO.getName()); + menuVo.setName(ObjectUtil.isNotEmpty(menuDTO.getComponentName()) ? menuDTO.getComponentName() : menuDTO.getName()); // 一级目录需要加斜杠,不然会报警告 - menuVo.setPath(menuDTO.getPid() == 0 ? "/" + menuDTO.getPath() : menuDTO.getPath()); + 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())) { + 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.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) { + } else if(menuDTO.getPid() == 0){ MenuVo menuVo1 = new MenuVo(); menuVo1.setMeta(menuVo.getMeta()); // 非外链 - if (!menuDTO.getIFrame()) { + if(!menuDTO.getIFrame()){ menuVo1.setPath("index"); menuVo1.setName(menuVo.getName()); menuVo1.setComponent(menuVo.getComponent()); @@ -200,15 +210,15 @@ public class MenuServiceImpl extends BaseServiceImpl implement @Override @Cacheable(key = "'tree'") public Object getMenuTree(List menus) { - List> list = new LinkedList<>(); + List> list = new LinkedList<>(); menus.forEach(menu -> { - if (menu != null) { + 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)); + 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); } @@ -230,7 +240,7 @@ public class MenuServiceImpl extends BaseServiceImpl implement for (Menu menu1 : menuList) { menuSet.add(menu1); List menus = menuMapper.findByPid(menu1.getId()); - if (menus != null && menus.size() != 0) { + if(menus!=null && menus.size()!=0){ getDeleteMenus(menus, menuSet); } } @@ -257,13 +267,13 @@ public class MenuServiceImpl extends BaseServiceImpl implement */ @Override public List findByRoles(List roles) { - List roleIds = roles.stream().map(i -> { + 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); + return generator.convert(list,MenuDto.class); } /** @@ -288,24 +298,30 @@ public class MenuServiceImpl extends BaseServiceImpl implement @Override @CacheEvict(allEntries = true) public void update(Menu resources) { - if (resources.getId().equals(resources.getPid())) { + if(resources.getId().equals(resources.getPid())) { throw new BadRequestException("上级不能为自己"); } Menu menu = this.getById(resources.getId()); - ValidationUtil.isNull(menu.getId(), "Permission", "id", resources.getId()); + ValidationUtil.isNull(menu.getId(),"Permission","id",resources.getId()); isExitHttp(resources); - Menu menu1 = this.getOne(new LambdaQueryWrapper().eq(Menu::getName, resources.getName())); + Menu menu1 = this.getOne(new LambdaQueryWrapper() + .eq(Menu::getName,resources.getName())); - if (menu1 != null && !menu1.getId().equals(menu.getId())) { - throw new EntityExistException(Menu.class, "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 LambdaQueryWrapper().eq(Menu::getComponentName, resources.getComponentName())); - if (menu1 != null && !menu1.getId().equals(menu.getId())) { - throw new EntityExistException(Menu.class, "componentName", resources.getComponentName()); + if (StringUtils.isNotBlank(resources.getComponentName()) && resources.getType() != 1 && !resources.getIFrame()) { + Long menuCount = this.lambdaQuery().eq(Menu::getComponentName,resources.getComponentName()).count(); + if(menuCount > 1) { + throw new YshopException("请保持菜单组件名称唯一"); + } + menu1 = this.getOne(new LambdaQueryWrapper() + .eq(Menu::getComponentName,resources.getComponentName())); + if(menu1 != null && !menu1.getId().equals(menu.getId())){ + throw new EntityExistException(Menu.class,"componentName",resources.getComponentName()); } } @@ -329,26 +345,26 @@ public class MenuServiceImpl extends BaseServiceImpl implement @CacheEvict(allEntries = true) public MenuDto create(Menu resources) { isExitHttp(resources); - if (this.getOne(new LambdaQueryWrapper().eq(Menu::getName, resources.getName())) != null) { - throw new EntityExistException(Menu.class, "name", resources.getName()); + if(this.getOne(new LambdaQueryWrapper().eq(Menu::getName,resources.getName())) != null){ + throw new EntityExistException(Menu.class,"name",resources.getName()); } - if (StringUtils.isNotBlank(resources.getComponentName())) { - if (this.getOne(new LambdaQueryWrapper().eq(Menu::getComponentName, resources.getComponentName())) != null) { - throw new EntityExistException(Menu.class, "componentName", resources.getComponentName()); + if(StringUtils.isNotBlank(resources.getComponentName())){ + if(this.getOne(new LambdaQueryWrapper().eq(Menu::getComponentName,resources.getComponentName())) != null){ + throw new EntityExistException(Menu.class,"componentName",resources.getComponentName()); } } this.save(resources); - return generator.convert(resources, MenuDto.class); + return generator.convert(resources,MenuDto.class); } /** * 公共方法提取出来 * @param resources */ - private void isExitHttp(Menu resources) { - if (resources.getIFrame()) { + private void isExitHttp(Menu resources){ + if(resources.getIFrame()){ String http = "http://", https = "https://"; - if (!(resources.getPath().toLowerCase().startsWith(http) || resources.getPath().toLowerCase().startsWith(https))) { + if (!(resources.getPath().toLowerCase().startsWith(http)||resources.getPath().toLowerCase().startsWith(https))) { throw new BadRequestException("外链必须以http://或者https://开头"); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RoleServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RoleServiceImpl.java index 965a0415b03ade8531b316f0920aee100ab27335..d56ae59f6c648c2a3bbc82e1ccca9ff52d1610a4 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RoleServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RoleServiceImpl.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.system.service.impl; @@ -10,7 +12,11 @@ import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.EntityExistException; -import co.yixiang.modules.system.domain.*; +import co.yixiang.modules.system.domain.Dept; +import co.yixiang.modules.system.domain.Menu; +import co.yixiang.modules.system.domain.Role; +import co.yixiang.modules.system.domain.RolesDepts; +import co.yixiang.modules.system.domain.RolesMenus; import co.yixiang.modules.system.service.RoleService; import co.yixiang.modules.system.service.RolesDeptsService; import co.yixiang.modules.system.service.RolesMenusService; @@ -34,7 +40,14 @@ import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.Collection; +import java.util.Collections; +import java.util.HashSet; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; // 默认不使用缓存 @@ -246,11 +259,20 @@ public class RoleServiceImpl extends BaseServiceImpl implement role.setDepts(deptSet); } 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()) - .filter(menu -> StringUtils.isNotBlank(menu.getPermission())) - .map(Menu::getPermission).collect(Collectors.toSet()) - ); +// permissions.addAll( +// roles.stream().flatMap(role -> role.getMenus().stream()) +// .filter(menu -> StringUtils.isNotBlank(menu.getPermission())) +// .map(Menu::getPermission).collect(Collectors.toSet()) +// ); + roles.stream().flatMap(role -> role.getMenus().stream()) + .filter(menu -> StringUtils.isNotBlank(menu.getPermission())) + .forEach(menu -> { + // 添加基于Permission的权限信息 + for (String permission : StringUtils.split(menu.getPermission(), ",")) { + permissions.add(permission); + } + }); + return permissions.stream().map(SimpleGrantedAuthority::new) .collect(Collectors.toList()); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RolesDeptsServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RolesDeptsServiceImpl.java index beea2a33f4c59ea3a8fc4653e24989c47bb591e7..289f53f6e0e6854b747d276e4c6b5b9fa72d6fbb 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RolesDeptsServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RolesDeptsServiceImpl.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; @@ -17,9 +19,9 @@ import org.springframework.transaction.annotation.Transactional; /** - * @author hupeng - * @date 2020-05-16 - */ +* @author hupeng +* @date 2020-05-16 +*/ @Service @AllArgsConstructor //@CacheConfig(cacheNames = "rolesDepts") diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RolesMenusServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RolesMenusServiceImpl.java index 42eb3d30beb6a4e66e69ce6d120771f34c8cd4dd..dbb1cd998e4272f25dc2321c2884883a6ca3e503 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RolesMenusServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/RolesMenusServiceImpl.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; @@ -17,9 +19,9 @@ import org.springframework.transaction.annotation.Transactional; /** - * @author hupeng - * @date 2020-05-16 - */ +* @author hupeng +* @date 2020-05-16 +*/ @Service @AllArgsConstructor //@CacheConfig(cacheNames = "rolesMenus") diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/SysUserServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/SysUserServiceImpl.java index 6f3e46b3dd56df0a04a9db2932f586b11cb5852c..4c5e4b14be099cce382b79caf8b456ace5a0d9c3 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/SysUserServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/SysUserServiceImpl.java @@ -1,27 +1,37 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; import cn.hutool.core.date.DateUtil; +import co.yixiang.api.YshopException; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; -import co.yixiang.exception.BadRequestException; import co.yixiang.exception.EntityExistException; import co.yixiang.modules.system.domain.Role; import co.yixiang.modules.system.domain.User; 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.DeptService; +import co.yixiang.modules.system.service.JobService; +import co.yixiang.modules.system.service.UserAvatarService; +import co.yixiang.modules.system.service.UserService; +import co.yixiang.modules.system.service.UsersRolesService; import co.yixiang.modules.system.service.dto.UserDto; import co.yixiang.modules.system.service.dto.UserQueryCriteria; import co.yixiang.modules.system.service.mapper.RoleMapper; import co.yixiang.modules.system.service.mapper.SysUserMapper; -import co.yixiang.utils.*; +import co.yixiang.utils.FileUtil; +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.LambdaQueryWrapper; import com.github.pagehelper.PageInfo; import org.springframework.beans.factory.annotation.Value; @@ -34,7 +44,12 @@ 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.ArrayList; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Set; // 默认不使用缓存 //import org.springframework.cache.annotation.CacheConfig; @@ -42,9 +57,9 @@ import java.util.*; //import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Service //@AllArgsConstructor //@CacheConfig(cacheNames = "user") @@ -63,7 +78,7 @@ public class SysUserServiceImpl extends BaseServiceImpl imp private final RedisUtils redisUtils; private final UsersRolesService usersRolesService; - public SysUserServiceImpl(IGenerator generator, SysUserMapper userMapper, UserAvatarService userAvatarService, JobService jobService, DeptService deptService, RoleMapper roleMapper, RedisUtils redisUtils, UsersRolesService usersRolesService) { + public SysUserServiceImpl(IGenerator generator, SysUserMapper userMapper, UserAvatarService userAvatarService, JobService jobService, DeptService deptService, RoleMapper roleMapper, RedisUtils redisUtils, UsersRolesService usersRolesService) { this.generator = generator; this.userMapper = userMapper; this.userAvatarService = userAvatarService; @@ -88,14 +103,14 @@ public class SysUserServiceImpl extends BaseServiceImpl imp @Override //@Cacheable - public List queryAll(UserQueryCriteria criteria) { - List userList = baseMapper.selectList(QueryHelpPlus.getPredicate(User.class, criteria)); + 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; + return userList; } @@ -103,7 +118,7 @@ public class SysUserServiceImpl extends BaseServiceImpl imp public void download(List all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (UserDto user : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("邮箱", user.getEmail()); map.put("状态:1启用、0禁用", user.getEnabled()); map.put("密码", user.getPassword()); @@ -128,6 +143,10 @@ public class SysUserServiceImpl extends BaseServiceImpl imp @Override public UserDto findByName(String userName) { User user = userMapper.findByName(userName); + + if(user == null) { + throw new YshopException("当前用户不存在"); + } //用户所属岗位 user.setJob(jobService.getById(user.getJobId())); //用户所属部门 @@ -143,7 +162,7 @@ public class SysUserServiceImpl extends BaseServiceImpl imp */ @Override public void updatePass(String username, String encryptPassword) { - userMapper.updatePass(encryptPassword, DateUtil.format(new Date(), "yyyy-MM-dd HH:mm:ss"), username); + userMapper.updatePass(encryptPassword, DateUtil.format(new Date(),"yyyy-MM-dd HH:mm:ss"),username); } /** @@ -154,11 +173,11 @@ public class SysUserServiceImpl extends BaseServiceImpl imp @Override public void updateAvatar(MultipartFile multipartFile) { User user = this.getOne(new LambdaQueryWrapper() - .eq(User::getUsername, SecurityUtils.getUsername())); - UserAvatar userAvatar = userAvatarService.getOne(new LambdaQueryWrapper() - .eq(UserAvatar::getId, user.getAvatarId())); + .eq(User::getUsername,SecurityUtils.getUsername())); + UserAvatar userAvatar = userAvatarService.getOne(new LambdaQueryWrapper() + .eq(UserAvatar::getId,user.getAvatarId())); String oldPath = ""; - if (userAvatar != null) { + if(userAvatar != null){ oldPath = userAvatar.getPath(); } else { userAvatar = new UserAvatar(); @@ -171,9 +190,10 @@ public class SysUserServiceImpl extends BaseServiceImpl imp userAvatarService.saveOrUpdate(userAvatar); user.setAvatarId(userAvatar.getId()); this.saveOrUpdate(user); - if (StringUtils.isNotBlank(oldPath)) { + if(StringUtils.isNotBlank(oldPath)){ FileUtil.del(oldPath); } + } /** @@ -198,14 +218,14 @@ public class SysUserServiceImpl extends BaseServiceImpl imp @Transactional(rollbackFor = Exception.class) public boolean create(User resources) { User userName = this.getOne(new LambdaQueryWrapper() - .eq(User::getUsername, resources.getUsername())); - if (userName != null) { - throw new EntityExistException(User.class, "username", resources.getUsername()); + .eq(User::getUsername,resources.getUsername())); + if(userName != null){ + throw new EntityExistException(User.class,"username",resources.getUsername()); } User userEmail = this.getOne(new LambdaQueryWrapper() - .eq(User::getEmail, resources.getEmail())); - if (userEmail != null) { - throw new EntityExistException(User.class, "email", resources.getEmail()); + .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()); @@ -213,7 +233,7 @@ public class SysUserServiceImpl extends BaseServiceImpl imp UsersRoles usersRoles = new UsersRoles(); usersRoles.setUserId(resources.getId()); Set set = resources.getRoles(); - for (Role roleIds : set) { + for (Role roleIds : set ) { usersRoles.setRoleId(roleIds.getId()); } if (result) { @@ -232,19 +252,19 @@ public class SysUserServiceImpl extends BaseServiceImpl imp @Transactional(rollbackFor = Exception.class) public void update(User resources) { User user = this.getOne(new LambdaQueryWrapper() - .eq(User::getId, resources.getId())); - ValidationUtil.isNull(user.getId(), "User", "id", resources.getId()); + .eq(User::getId,resources.getId())); + ValidationUtil.isNull(user.getId(),"User","id",resources.getId()); User user1 = this.getOne(new LambdaQueryWrapper() - .eq(User::getUsername, resources.getUsername())); + .eq(User::getUsername,resources.getUsername())); User user2 = this.getOne(new LambdaQueryWrapper() - .eq(User::getEmail, resources.getEmail())); + .eq(User::getEmail,resources.getEmail())); - if (user1 != null && !user.getId().equals(user1.getId())) { - throw new BadRequestException("当前用户名已存在"); + 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(user2!=null&&!user.getId().equals(user2.getId())){ + throw new EntityExistException(User.class,"email",resources.getEmail()); } user.setUsername(resources.getUsername()); user.setEmail(resources.getEmail()); @@ -255,7 +275,7 @@ public class SysUserServiceImpl extends BaseServiceImpl imp user.setNickName(resources.getNickName()); user.setSex(resources.getSex()); boolean result = this.saveOrUpdate(user); - usersRolesService.lambdaUpdate().eq(UsersRoles::getUserId, resources.getId()).remove(); + usersRolesService.lambdaUpdate().eq(UsersRoles ::getUserId,resources.getId()).remove(); List usersRolesList = new ArrayList<>(); Set set = resources.getRoles(); for (Role roleIds : set) { @@ -281,7 +301,7 @@ public class SysUserServiceImpl extends BaseServiceImpl imp @Transactional(rollbackFor = Exception.class) public void delete(Set ids) { for (Long id : ids) { - usersRolesService.lambdaUpdate().eq(UsersRoles::getUserId, id).remove(); + usersRolesService.lambdaUpdate().eq(UsersRoles ::getUserId,id).remove(); } this.removeByIds(ids); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/UserAvatarServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/UserAvatarServiceImpl.java index 8b21b3867e6b143c531c4eab7c483f34654f4e01..f31db3be55022d8bbcebefc51cb2043ddd422383 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/UserAvatarServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/UserAvatarServiceImpl.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; @@ -35,9 +37,9 @@ import java.util.Map; //import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Service @AllArgsConstructor //@CacheConfig(cacheNames = "userAvatar") @@ -60,7 +62,7 @@ public class UserAvatarServiceImpl extends BaseServiceImpl queryAll(UserAvatarQueryCriteria criteria) { + public List queryAll(UserAvatarQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(UserAvatar.class, criteria)); } @@ -69,7 +71,7 @@ public class UserAvatarServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (UserAvatarDto userAvatar : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("真实文件名", userAvatar.getRealName()); map.put("路径", userAvatar.getPath()); map.put("大小", userAvatar.getSize()); diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/UsersRolesServiceImpl.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/UsersRolesServiceImpl.java index c90ca5411fdb21d5380a4d818c9fae37ec32d661..9e36dc432a85ee660b5142e4023a87c6d7c12ea8 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/UsersRolesServiceImpl.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/UsersRolesServiceImpl.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.system.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; @@ -16,9 +18,9 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; /** - * @author hupeng - * @date 2020-05-16 - */ +* @author hupeng +* @date 2020-05-16 +*/ @Service @AllArgsConstructor //@CacheConfig(cacheNames = "usersRoles") diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/DeptMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/DeptMapper.java index e04e2c507d2885b5d75fb063caa2620a2f27d85c..622a0f77c73f909ab63d71661a558499bcc5fdfb 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/DeptMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/DeptMapper.java @@ -1,14 +1,15 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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.Dept; -import org.apache.ibatis.annotations.Mapper; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; @@ -16,16 +17,15 @@ import org.springframework.stereotype.Repository; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Repository -@Mapper public interface DeptMapper extends CoreMapper { - @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}") + @Select("select m.* from sys_dept m LEFT JOIN sys_roles_depts t on m.id= t.dept_id LEFT JOIN sys_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}") + @Select("select * from sys_dept m LEFT JOIN sys_roles_depts t on m.id= t.dept_id LEFT JOIN sys_role r on r.id = t.role_id where r.id = #{roleId}") Set findDeptByRoleIds(@Param("roleIds") Set roleId); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/JobMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/JobMapper.java index 70eeaa8020c2874dc4b3e2efeaaba604b71823c2..4eaaa0cae53649ccae729a0ccbe56eb14c673eb8 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/JobMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/JobMapper.java @@ -1,22 +1,22 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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.Job; -import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Repository -@Mapper public interface JobMapper extends CoreMapper { } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/MenuMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/MenuMapper.java index 53736af721467e8df30c13a99fa1f99e854a77c1..6ce5653829999df60990352c4b6492dc909ab714 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/MenuMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/MenuMapper.java @@ -1,9 +1,11 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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; @@ -17,9 +19,9 @@ import java.util.List; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Repository @Mapper public interface MenuMapper extends CoreMapper { @@ -30,12 +32,11 @@ public interface MenuMapper extends CoreMapper { * @param pid / * @return / */ - @Select("SELECT * from menu m where m.pid = #{pid} ") + @Select("SELECT * from sys_menu m where m.pid = #{pid} and m.is_del = 0 ") 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}") + @Select("select m.* from sys_menu m LEFT JOIN sys_roles_menus t on m.id= t.menu_id LEFT JOIN sys_role r on r.id = t.role_id where r.id = #{roleId} and m.is_del=0") Set findMenuByRoleId(@Param("roleId") Long roleId); - - @Select("") + @Select("") List selectListByRoles(@Param("roleIds") List roleIds); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RoleMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RoleMapper.java index 35f5300194a30669945fd129c50f5a5aba59e383..8e31ae7281fea817001ebc13114bae97f46e2444 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RoleMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RoleMapper.java @@ -1,15 +1,16 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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.Role; 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; @@ -18,11 +19,10 @@ import java.util.List; import java.util.Set; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Repository -@Mapper public interface RoleMapper extends CoreMapper { /** @@ -30,9 +30,9 @@ public interface RoleMapper extends CoreMapper { * @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 " + + @Select( "SELECT r.id,r.create_time,r.data_scope,r.`level`,r.`name`,r.permission,r.remark " + + "FROM sys_role r LEFT OUTER JOIN sys_users_roles u1 ON r.id = u1.role_id " + + "LEFT OUTER JOIN sys_user u2 ON u1.user_id = u2.id "+ "WHERE u2.id = #{id}") Set findByUsers_Id(@Param("id") Long id); @@ -40,7 +40,7 @@ public interface RoleMapper extends CoreMapper { * 解绑角色菜单 * @param id 菜单ID */ - @Delete("delete from roles_menus where menu_id = #{id}") + @Delete("delete from sys_roles_menus where menu_id = #{id}") void untiedMenu(@Param("id") Long id); /** @@ -49,7 +49,7 @@ public interface RoleMapper extends CoreMapper { * @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}") + @Select("select m.* from sys_role m LEFT JOIN sys_users_roles t on m.id= t.role_id LEFT JOIN sys_user r on r.id = t.user_id where r.id = #{id}") List selectListByUserId(@Param("id") Long id); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RolesDeptsMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RolesDeptsMapper.java index 50f67d34a6e9946100d4e5e5aa3496b2eb978ead..3f52873e61bf76bc68c3a4ff590a02de78e8cb4d 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RolesDeptsMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RolesDeptsMapper.java @@ -1,22 +1,22 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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 - */ +* @author hupeng +* @date 2020-05-16 +*/ @Repository -@Mapper public interface RolesDeptsMapper extends CoreMapper { } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RolesMenusMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RolesMenusMapper.java index 1605fda4021b0668a78043393bb4dd2c098e2269..e28c04fca2d96626046539fc83b2e5465447143c 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RolesMenusMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/RolesMenusMapper.java @@ -1,22 +1,22 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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 - */ +* @author hupeng +* @date 2020-05-16 +*/ @Repository -@Mapper public interface RolesMenusMapper extends CoreMapper { } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/SysUserMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/SysUserMapper.java index fcb646bcd3155f02a158c6647e62d66f7ae9b7bd..3e84c066a77099fea55f703691d1dbe1ab3a32dd 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/SysUserMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/SysUserMapper.java @@ -1,25 +1,25 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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.Select; import org.apache.ibatis.annotations.Update; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Repository -@Mapper public interface SysUserMapper extends CoreMapper { /** @@ -28,23 +28,23 @@ public interface SysUserMapper extends CoreMapper { * @param password 密码 * @param lastPasswordResetTime / */ - @Update("update `user` set password = #{password} , last_password_reset_time = #{lastPasswordResetTime} where username = #{username}") - void updatePass(@Param("password") String password, @Param("lastPasswordResetTime") String lastPasswordResetTime, @Param("username") String username); + @Update("update sys_user set password = #{password} , last_password_reset_time = #{lastPasswordResetTime} where username = #{username}") + void updatePass( @Param("password") String password,@Param("lastPasswordResetTime") String lastPasswordResetTime, @Param("username") String username); /** * 修改邮箱 * @param username 用户名 * @param email 邮箱 */ - @Update("update `user` set email = #{email} where username = #{username}") + @Update("update sys_user set email = #{email} where username = #{username}") void updateEmail(@Param("email") String email, @Param("username") String username); /** * 根据用户名查询用户信息 * @param userName 用户名 */ - @Select("SELECT u.id,u.nick_name,u.sex,u.dept_id,u.enabled,u.create_time,u.phone,u.email,u.job_id ,u.`password` ,u.username,ua.real_name avatar FROM `user` " + - " u LEFT JOIN user_avatar ua ON u.avatar_id = ua.id WHERE u.username = #{username}") + @Select("SELECT u.id,u.nick_name,u.sex,u.dept_id,u.enabled,u.create_time,u.phone,u.email,u.job_id ,u.`password` ,u.username,ua.real_name avatar FROM sys_user " + + " u LEFT JOIN sys_user_avatar ua ON u.avatar_id = ua.id WHERE u.username = #{username}") User findByName(String userName); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/UserAvatarMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/UserAvatarMapper.java index 421b2a23ab92a3dda7b401005f4ab71e74362c8d..b99a995175d45e40d3b793a0d3ad166243c00922 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/UserAvatarMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/UserAvatarMapper.java @@ -1,22 +1,22 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Repository -@Mapper public interface UserAvatarMapper extends CoreMapper { } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/UsersRolesMapper.java b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/UsersRolesMapper.java index 64922ce1049bfdfc9200ef062d755d99b6bfbd5b..9cf9a169b248d1d0caa19ddf3433e3e89940c1bd 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/UsersRolesMapper.java +++ b/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/UsersRolesMapper.java @@ -1,22 +1,22 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* 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 - */ +* @author hupeng +* @date 2020-05-16 +*/ @Repository -@Mapper public interface UsersRolesMapper extends CoreMapper { } diff --git a/yshop-admin/src/main/resources/banner.txt b/yshop-admin/src/main/resources/banner.txt index 185cd375ee5ac518e7446fad30f60dd87d218c6b..13dced1d6ea6038683e58969267dbad2364aaf24 100644 --- a/yshop-admin/src/main/resources/banner.txt +++ b/yshop-admin/src/main/resources/banner.txt @@ -4,7 +4,6 @@ \_, //___//_//_/\___// .__/ /___/ /_/ - :: Application Version:: ${yshop.version} :: Spring Boot :: ${spring-boot.version} diff --git a/yshop-admin/src/main/resources/config/application-dev.yml b/yshop-admin/src/main/resources/config/application-dev.yml index 2995e73566e82acf76f6c2faf318e4e0aaf1e93e..25ab4ca9124340c9a6825531b7f97a67f249a65b 100644 --- a/yshop-admin/src/main/resources/config/application-dev.yml +++ b/yshop-admin/src/main/resources/config/application-dev.yml @@ -1,51 +1,61 @@ #配置数据源 spring: application: - name: yshop-admin + name: yshop-system datasource: druid: type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/yshop2?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull&allowPublicKeyRetrieval=true + url: jdbc:mysql://localhost:3306/yshopb2c?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull username: root - password: boywangqin + password: root - # 初始化配置 - initial-size: 3 - # 最小连接数 - min-idle: 3 - # 最大连接数 - max-active: 15 - # 获取连接超时时间 - max-wait: 5000 - # 连接有效性检测时间 - time-between-eviction-runs-millis: 90000 - # 最大空闲时间 - min-evictable-idle-time-millis: 1800000 - test-while-idle: true - test-on-borrow: false - test-on-return: false - - validation-query: select 1 - # 配置监控统计拦截的filters - filters: stat - stat-view-servlet: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: url-pattern: /druid/* - reset-enable: false - - web-stat-filter: - url-pattern: /* - exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*" + # 控制台管理用户名和密码 + login-username: admin + login-password: 123456 + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true redis: - # 地址 - host: localhost - # 端口,默认为6379 + #数据库索引 + database: 2 + host: 127.0.0.1 port: 6379 - # 数据库索引 - database: 13 - # 密码 - password: boywangqin - # 连接超时时间 + password: + #连接超时时间 timeout: 5000 # 是否限制单用户登录 @@ -77,25 +87,24 @@ swagger: enabled: true title: yshop商城管理后台API serverUrl: - version: 2.3 + version: 3.3 # 文件存储路径 -# 1.localUrl为空的话上传文件会走七牛云,请转向文档看七牛云配置 -# 2.如果想文件存在本地,并通过本地代理出去请填写localUrl: http://127.0.0.1:8000为本服务的ip+端口号 -# 线上的地址就是你通过nginx代理http://127.0.0.1:8000出来的地址。鉴于群里很多问的这里做个说明不在赘述 file: path: D:\yshop\file\ avatar: D:\yshop\avatar\ # 文件大小 /M maxSize: 100 avatarMaxSize: 5 - localUrl: http://127.0.0.1:8000 #oss配置 oss: endpoint: http://oss-cn-shenzhen.aliyuncs.com - custom-domain: https://xxxxx//%s + custom-domain: https://xxxxx/%s access-key: xxxxx - secret-key: xxxx - bucket-name: xxxx + secret-key: xxxxx + bucket-name: xxxxx + defaultName: xxxxx + + diff --git a/yshop-admin/src/main/resources/config/application-docker.yml b/yshop-admin/src/main/resources/config/application-docker.yml new file mode 100644 index 0000000000000000000000000000000000000000..9a6031150afa65212457bb1fe3210cdca3ea6da8 --- /dev/null +++ b/yshop-admin/src/main/resources/config/application-docker.yml @@ -0,0 +1,114 @@ +#配置数据源 +spring: + application: + name: yshop-system + datasource: + druid: + type: com.alibaba.druid.pool.DruidDataSource + driverClassName: com.mysql.cj.jdbc.Driver + url: jdbc:mysql://localhost:3366/yshopb2c?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull + username: yshopb2c + password: bkfGfAimifjPZtNE + + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: + url-pattern: /druid/* + # 控制台管理用户名和密码 + login-username: admin + login-password: 123456 + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true + + redis: + #数据库索引 + database: 5 + host: 127.0.0.1 + port: 6399 # Redis服务器连接端口 + password: 6379@@6379 # Redis服务器连接密码(默认为空) + #连接超时时间 + timeout: 5000 + +# 是否限制单用户登录 +single: + login: false + +#jwt +jwt: + header: Authorization + # 令牌前缀 + token-start-with: Bearer + secret: k09BQnaF + # 必须使用最少88位的Base64对该令牌进行编码 + base64-secret: ZmQ0ZGI5NjQ0MDQwY2I4MjMxY2Y3ZmI3MjdhN2ZmMjNhODViOTg1ZGE0NTBjMGM4NDA5NzYxMjdjOWMwYWRmZTBlZjlhNGY3ZTg4Y2U3YTE1ODVkZDU5Y2Y3OGYwZWE1NzUzNWQ2YjFjZDc0NGMxZWU2MmQ3MjY1NzJmNTE0MzI= + # 令牌过期时间 此处单位/毫秒 ,默认2小时,可在此网站生成 https://www.convertworld.com/zh-hans/time/milliseconds.html + token-validity-in-seconds: 7200000 + # 在线用户key + online-key: online-token + # 验证码 + code-key: code-key + +#是否允许生成代码,生产环境设置为false +generator: + enabled: false + +#如果生产环境要开启swagger,需要配置请求地址 +#springfox: +# documentation: +# swagger: +# v2: +# host: # 接口域名或外网ip + +#是否开启 swagger-ui,生产环境默认不开启 +swagger: + enabled: true + title: yshop商城管理后台API + serverUrl: http://127.0.0.1:8000 + version: 3.3 + + +file: + path: /www/wwwroot/thapi.xinxintuan.co/upload/file/ + avatar: /www/wwwroot/thapi.xinxintuan.co/upload/avatar/ + # 文件大小 /M + maxSize: 100 + avatarMaxSize: 5 + +#oss配置 +oss: + endpoint: http://oss-cn-shenzhen.aliyuncs.com + custom-domain: https://xxxxx//%s + access-key: xxxxx + secret-key: xxxxx + bucket-name: xxxxx + defaultName: xxxxx diff --git a/yshop-admin/src/main/resources/config/application-prod.yml b/yshop-admin/src/main/resources/config/application-prod.yml index 8c6410820712460d4b980c1e68ad0b9af5388fc3..ab021307d36d68d7638bba1767799a1132b42be7 100644 --- a/yshop-admin/src/main/resources/config/application-prod.yml +++ b/yshop-admin/src/main/resources/config/application-prod.yml @@ -1,54 +1,62 @@ #配置数据源 spring: application: - name: yshop-admin + name: yshop-system datasource: druid: type: com.alibaba.druid.pool.DruidDataSource driverClassName: com.mysql.cj.jdbc.Driver - url: jdbc:mysql://localhost:3306/yshop?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false - username: root - password: root + url: jdbc:mysql://localhost:3306/yshopb2c?serverTimezone=Asia/Shanghai&characterEncoding=utf8&useSSL=false&zeroDateTimeBehavior=convertToNull + username: yshopb2c + password: bkfGfAimifjPZtNE - # 初始化配置 - initial-size: 3 - # 最小连接数 - min-idle: 3 - # 最大连接数 - max-active: 15 - # 获取连接超时时间 - max-wait: 5000 - # 连接有效性检测时间 - time-between-eviction-runs-millis: 90000 - # 最大空闲时间 - min-evictable-idle-time-millis: 1800000 - test-while-idle: true - test-on-borrow: false - test-on-return: false - validation-query: select 1 - # 配置监控统计拦截的filters - filters: stat - - stat-view-servlet: + # 初始连接数 + initialSize: 5 + # 最小连接池数量 + minIdle: 10 + # 最大连接池数量 + maxActive: 20 + # 配置获取连接等待超时的时间 + maxWait: 60000 + # 配置间隔多久才进行一次检测,检测需要关闭的空闲连接,单位是毫秒 + timeBetweenEvictionRunsMillis: 60000 + # 配置一个连接在池中最小生存的时间,单位是毫秒 + minEvictableIdleTimeMillis: 300000 + # 配置一个连接在池中最大生存的时间,单位是毫秒 + maxEvictableIdleTimeMillis: 900000 + # 配置检测连接是否有效 + validationQuery: SELECT 1 FROM DUAL + testWhileIdle: true + testOnBorrow: false + testOnReturn: false + webStatFilter: + enabled: true + statViewServlet: + enabled: true + # 设置白名单,不填则允许所有访问 + allow: url-pattern: /druid/* - reset-enable: false + # 控制台管理用户名和密码 login-username: admin login-password: 123456 - - web-stat-filter: - url-pattern: /* - exclusions: "*.js,*.gif,*.jpg,*.bmp,*.png,*.css,*.ico,/druid/*" + filter: + stat: + enabled: true + # 慢SQL记录 + log-slow-sql: true + slow-sql-millis: 1000 + merge-sql: true + wall: + config: + multi-statement-allow: true redis: - # 地址 - host: localhost - # 端口,默认为6379 - port: 6379 - # 数据库索引 - database: 13 - # 密码 - password: - # 连接超时时间 + #数据库索引 + database: 5 + host: 127.0.0.1 + port: 6379 # Redis服务器连接端口 + password: # Redis服务器连接密码(默认为空) + #连接超时时间 timeout: 5000 # 是否限制单用户登录 @@ -86,26 +94,22 @@ swagger: enabled: false title: yshop商城管理后台API serverUrl: http://127.0.0.1:8000 - version: 2.3 + version: 3.3 + -# 文件存储路径 -# 文件存储路径 -# 1.localUrl为空的话上传文件会走七牛云,请转向文档看七牛云配置 -# 2.如果想文件存在本地,并通过本地代理出去请填写localUrl: http://127.0.0.1:8000为本服务的ip+端口号 -# 线上的地址就是你通过nginx代理http://127.0.0.1:8000出来的地址。鉴于群里很多问的这里做个说明不在赘述 file: - path: D:\upload\file\ - avatar: D:\upload\avatar\ + path: /home/yshop/file/ + avatar: /home/yshop/avatar/ # 文件大小 /M maxSize: 100 avatarMaxSize: 5 - localUrl: - #oss配置 oss: endpoint: http://oss-cn-shenzhen.aliyuncs.com custom-domain: https://xxxxx//%s access-key: xxxxx - secret-key: xxxx - bucket-name: xxxx + secret-key: xxxxx + bucket-name: xxxxx + defaultName: xxxxx + diff --git a/yshop-admin/src/main/resources/config/application.yml b/yshop-admin/src/main/resources/config/application.yml index 1b8e414023a90d54b842dbec34c26466f8b98a6e..9779b8f33e673680633e1fd9ffd7d754e9c55422 100644 --- a/yshop-admin/src/main/resources/config/application.yml +++ b/yshop-admin/src/main/resources/config/application.yml @@ -1,5 +1,5 @@ server: - port: 8000 + port: 8001 spring: main: @@ -47,22 +47,17 @@ rsa: smms: token: 1oOP3ykFDI0K6ifmtvU7c8Y1eTWZSlyl -#日志级别配置 +yshop: + # 配置 + version: 3.3 + apiUrl: http://127.0.0.1:8009/api + logging: level: co.yixiang: DEBUG - org.springframework.web: ERROR - me.chanjar.weixin: ERROR - -yshop: - # 版本 - version: 2.3 - # 快鸟物流查询配置 - express: - enable: true - appId: 1607734 - appKey: 81f43a2e-f504-45c4-9b54-2637d59f8190 - apiUrl: http://127.0.0.1:8009/api + org.springframework.web: DEBUG + com.github.binarywang.demo.wx.mp: DEBUG + me.chanjar.weixin: DEBUG mybatis-plus: check-config-location: true diff --git a/yshop-admin/src/main/resources/generator.properties b/yshop-admin/src/main/resources/generator.properties index e3055d6724edaf1e80616818203a51885f0bd842..16ee01de169b3fe617c7006fd3cfb5859a82a4b2 100644 --- a/yshop-admin/src/main/resources/generator.properties +++ b/yshop-admin/src/main/resources/generator.properties @@ -4,17 +4,24 @@ smallint=Integer mediumint=Integer int=Integer integer=Integer + bigint=Long + float=Float + double=Double + decimal=BigDecimal + bit=Boolean + char=String varchar=String tinytext=String text=String mediumtext=String longtext=String -date=Timestamp -datetime=Timestamp -timestamp=Timestamp \ No newline at end of file + +date=Date +datetime=Date +timestamp=Date \ No newline at end of file diff --git a/yshop-admin/src/main/resources/logback-spring.xml b/yshop-admin/src/main/resources/logback-spring.xml index 3d9785847ed7c4469f515bcac5b005c50bfbafe6..d75c1931ab3d37fbf2a6c669195f11648654bac9 100644 --- a/yshop-admin/src/main/resources/logback-spring.xml +++ b/yshop-admin/src/main/resources/logback-spring.xml @@ -11,7 +11,6 @@ - ${log.pattern} ${log.charset} @@ -26,7 +25,6 @@ 50MB 30 - %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n UTF-8 @@ -44,7 +42,6 @@ 50MB 30 - %date [%thread] %-5level [%logger{50}] %file:%line - %msg%n UTF-8 diff --git a/yshop-admin/src/main/resources/template/email/email.ftl b/yshop-admin/src/main/resources/template/email/email.ftl index 4920e3655afc565bb96fb1e47c699f9132080269..8f7e13a0f5000eb2c28ca1c44e71d201f4d98467 100644 --- a/yshop-admin/src/main/resources/template/email/email.ftl +++ b/yshop-admin/src/main/resources/template/email/email.ftl @@ -21,7 +21,7 @@

尊敬的用户,您好:

您正在申请邮箱验证,您的验证码为:

-

get${className}s(${className}QueryCriteria criteria, Pageable pageable){ - return new ResponseEntity<>(${changeClassName}Service.queryAll(criteria,pageable),HttpStatus.OK); + @GetMapping + @Log("查询${apiAlias}") + @ApiOperation("查询${apiAlias}") + @PreAuthorize("@el.check('${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('${changeClassName}:add')") - public ResponseEntity - create(@Validated @RequestBody ${className} resources){ + public ResponseEntity create(@Validated @RequestBody ${className} resources){ return new ResponseEntity<>(${changeClassName}Service.create(resources),HttpStatus.CREATED); - } + } - @PutMapping - @Log("修改${apiAlias}") - @ApiOperation("修改${apiAlias}") - @PreAuthorize("@el.check('${changeClassName}:edit')") - public ResponseEntity - update(@Validated @RequestBody ${className} resources){ - ${changeClassName}Service.update(resources); - return new ResponseEntity<>(HttpStatus.NO_CONTENT); - } + @PutMapping + @Log("修改${apiAlias}") + @ApiOperation("修改${apiAlias}") + @PreAuthorize("@el.check('${changeClassName}:edit')") + public ResponseEntity update(@Validated @RequestBody ${className} resources){ + ${changeClassName}Service.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } - @Log("删除${apiAlias}") - @ApiOperation("删除${apiAlias}") - @PreAuthorize("@el.check('${changeClassName}:del')") - @DeleteMapping - public ResponseEntity - deleteAll(@RequestBody ${pkColumnType}[] ids) { - ${changeClassName}Service.deleteAll(ids); - return new ResponseEntity<>(HttpStatus.OK); - } - } + @Log("删除${apiAlias}") + @ApiOperation("删除${apiAlias}") + @PreAuthorize("@el.check('${changeClassName}:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody ${pkColumnType}[] ids) { + ${changeClassName}Service.deleteAll(ids); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/yshop-admin/src/main/resources/template/generator/admin/ControllerP.ftl b/yshop-admin/src/main/resources/template/generator/admin/ControllerP.ftl index 8dcfe9f229a9277f72b5bda9b704ae71836a24e3..20b464fa46e9b679943438b16ee4f23a9eb2744e 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/ControllerP.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/ControllerP.ftl @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.rest; import java.util.Arrays; @@ -22,7 +24,7 @@ import org.springframework.web.bind.annotation.*; import io.swagger.annotations.*; import java.io.IOException; import javax.servlet.http.HttpServletResponse; - +import co.yixiang.domain.PageResult; /** * @author ${author} * @date ${date} @@ -33,55 +35,51 @@ import javax.servlet.http.HttpServletResponse; @RequestMapping("/api/${changeClassName}") public class ${className}Controller { -private final ${className}Service ${changeClassName}Service; -private final IGenerator generator; + 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); -} + @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); + @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){ + 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); - } + @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); - } - } + @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-admin/src/main/resources/template/generator/admin/Dto.ftl b/yshop-admin/src/main/resources/template/generator/admin/Dto.ftl index 5a3a782ae45862ee37fe26ee5974b6c04395186d..6eb9219be5a012cc6ddaf20ae015b682204cb32d 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/Dto.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/Dto.ftl @@ -1,22 +1,24 @@ /** -* Copyright (C) 2018-2022 +* Copyright (C) 2018-2021 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.service.dto; import lombok.Data; -<#if hasTimestamp> - import java.sql.Timestamp; +<#if hasDateTime> +import java.util.Date; <#if hasBigDecimal> - import java.math.BigDecimal; +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; /** @@ -28,16 +30,16 @@ 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) - - - private ${column.columnType} ${column.changeColumnName}; + <#if column.remark != ''> + /** ${column.remark} */ + + <#if column.columnKey = 'PRI'> + <#if !auto && pkColumnType = 'Long'> + /** 防止精度丢失 */ + @JsonSerialize(using= ToStringSerializer.class) + + + private ${column.columnType} ${column.changeColumnName}; } diff --git a/yshop-admin/src/main/resources/template/generator/admin/DtoP.ftl b/yshop-admin/src/main/resources/template/generator/admin/DtoP.ftl index a1ff57f247a4219c1a75b9dcdd9a0905041cc750..5814fccd93680263a835c67ab4800b47c3f3a38b 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/DtoP.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/DtoP.ftl @@ -2,21 +2,23 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.service.dto; import lombok.Data; -<#if hasTimestamp> - import java.sql.Timestamp; +<#if hasDateTime> +import java.util.Date; <#if hasBigDecimal> - import java.math.BigDecimal; +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; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; /** @@ -28,18 +30,18 @@ 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}; - + <#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-admin/src/main/resources/template/generator/admin/Entity.ftl b/yshop-admin/src/main/resources/template/generator/admin/Entity.ftl index f56b86731f76aaee845f555507140f31012f40ac..50bb221ed5d48ff68c19230d195fb3dfc1d80ce0 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/Entity.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/Entity.ftl @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.domain; @@ -11,18 +13,18 @@ import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; <#if isNotNullColumns??> - import javax.validation.constraints.*; +import javax.validation.constraints.*; <#if hasDateAnnotation> - import javax.persistence.Entity; - import javax.persistence.Table; - import org.hibernate.annotations.*; +import javax.persistence.Entity; +import javax.persistence.Table; +import org.hibernate.annotations.*; -<#if hasTimestamp> - import java.sql.Timestamp; +<#if hasDateTime> +import java.util.Date; <#if hasBigDecimal> - import java.math.BigDecimal; +import java.math.BigDecimal; import java.io.Serializable; @@ -37,35 +39,35 @@ public class ${className} implements Serializable { <#if columns??> <#list columns as column> - <#if column.remark != ''> - /** ${column.remark} */ + <#if column.remark != ''> + /** ${column.remark} */ + + <#if column.columnKey = 'PRI'> + @Id + <#if auto> + @GeneratedValue(strategy = GenerationType.IDENTITY) + + + @Column(name = "${column.columnName}"<#if column.columnKey = 'UNI'>,unique = true<#if column.istNotNull && column.columnKey != 'PRI'>,nullable = false) + <#if column.istNotNull && column.columnKey != 'PRI'> + <#if column.columnType = 'String'> + @NotBlank + <#else> + @NotNull - <#if column.columnKey = 'PRI'> - @Id - <#if auto> - @GeneratedValue(strategy = GenerationType.IDENTITY) - - - @Column(name = "${column.columnName}"<#if column.columnKey = 'UNI'>,unique = true<#if column.istNotNull && column.columnKey != 'PRI'>,nullable = false) - <#if column.istNotNull && column.columnKey != 'PRI'> - <#if column.columnType = 'String'> - @NotBlank - <#else> - @NotNull - - - <#if column.dateAnnotation??> - <#if column.dateAnnotation = 'CreationTimestamp'> - @CreationTimestamp - <#else> - @UpdateTimestamp - - - private ${column.columnType} ${column.changeColumnName}; + + <#if column.dateAnnotation??> + <#if column.dateAnnotation = 'CreationTimestamp'> + @CreationTimestamp + <#else> + @UpdateTimestamp + + + private ${column.columnType} ${column.changeColumnName}; -public void copy(${className} source){ -BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); -} + public void copy(${className} source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } } diff --git a/yshop-admin/src/main/resources/template/generator/admin/EntityP.ftl b/yshop-admin/src/main/resources/template/generator/admin/EntityP.ftl index cbf97e7eabffef2a05f157cbd0da210cb0fce843..f868fa6c68ea2132c0a94ad6196b5dec0ef12c6d 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/EntityP.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/EntityP.ftl @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.domain; import com.baomidou.mybatisplus.annotation.TableId; @@ -11,17 +13,17 @@ 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.*; +import javax.validation.constraints.*; <#if hasDateAnnotation> -<#if hasTimestamp> - import java.sql.Timestamp; +<#if hasDateTime> +import java.util.Date; <#if hasBigDecimal> - import java.math.BigDecimal; +import java.math.BigDecimal; -import java.io.Serializable; +import co.yixiang.domain.BaseDomain; /** * @author ${author} @@ -29,48 +31,30 @@ import java.io.Serializable; */ @Data @TableName("${tableName}") -public class ${className} implements Serializable { +public class ${className} extends BaseDomain { <#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}; + <#if column.changeColumnName != 'isDel' && column.changeColumnName != 'createTime' && column.changeColumnName != 'updateTime' > + <#if column.remark != ''> + /** ${column.remark} */ + + <#if column.columnKey = 'PRI'> + @TableId + + <#if column.istNotNull && column.columnKey != 'PRI'> + <#if column.columnType = 'String'> + @NotBlank <#else> - private ${column.columnType} ${column.changeColumnName}; + @NotNull + + private ${column.columnType} ${column.changeColumnName}; + -public void copy(${className} source){ -BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); -} + public void copy(${className} source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } } diff --git a/yshop-admin/src/main/resources/template/generator/admin/Mapper.ftl b/yshop-admin/src/main/resources/template/generator/admin/Mapper.ftl index 65ca652efaebede8e2a6fc14d2f7a4888b4b0661..f7ffc68b12376965f73dfe8548d06bcae00dbe11 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/Mapper.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/Mapper.ftl @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.service.mapper; @@ -17,7 +19,6 @@ import org.mapstruct.ReportingPolicy; * @date ${date} */ @Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) -public interface ${className}Mapper extends BaseMapper -<${className}Dto, ${className}> { +public interface ${className}Mapper extends BaseMapper<${className}Dto, ${className}> { } diff --git a/yshop-admin/src/main/resources/template/generator/admin/MapperP.ftl b/yshop-admin/src/main/resources/template/generator/admin/MapperP.ftl index 2fcb18b4e13d75d08bb4421c795f775a6aa3295d..61a43915e8f98455ac8c2f19cbe3f99865061649 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/MapperP.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/MapperP.ftl @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.service.mapper; @@ -16,7 +18,6 @@ import org.springframework.stereotype.Repository; * @date ${date} */ @Repository -@Mapper public interface ${className}Mapper extends CoreMapper<${className}> { } diff --git a/yshop-admin/src/main/resources/template/generator/admin/QueryCriteria.ftl b/yshop-admin/src/main/resources/template/generator/admin/QueryCriteria.ftl index c1f0acae5a929e35a4bec811d4af5f270e9dbf5a..867fe0f296b722216bdbd9e5d1cdba94cd4ad163 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/QueryCriteria.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/QueryCriteria.ftl @@ -2,22 +2,24 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.service.dto; import lombok.Data; -<#if queryHasTimestamp> - import java.sql.Timestamp; +<#if queryHasDateTime> +import java.util.Date; <#if queryHasBigDecimal> - import java.math.BigDecimal; +import java.math.BigDecimal; <#if betweens??> - import java.util.List; +import java.util.List; <#if queryColumns??> - import co.yixiang.annotation.Query; +import co.yixiang.annotation.Query; /** @@ -29,43 +31,43 @@ 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 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; + /** BETWEEN */ + @Query(type = Query.Type.BETWEEN) + private List<${column.columnType}> createTime; } diff --git a/yshop-admin/src/main/resources/template/generator/admin/QueryCriteriaP.ftl b/yshop-admin/src/main/resources/template/generator/admin/QueryCriteriaP.ftl index c1f0acae5a929e35a4bec811d4af5f270e9dbf5a..867fe0f296b722216bdbd9e5d1cdba94cd4ad163 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/QueryCriteriaP.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/QueryCriteriaP.ftl @@ -2,22 +2,24 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.service.dto; import lombok.Data; -<#if queryHasTimestamp> - import java.sql.Timestamp; +<#if queryHasDateTime> +import java.util.Date; <#if queryHasBigDecimal> - import java.math.BigDecimal; +import java.math.BigDecimal; <#if betweens??> - import java.util.List; +import java.util.List; <#if queryColumns??> - import co.yixiang.annotation.Query; +import co.yixiang.annotation.Query; /** @@ -29,43 +31,43 @@ 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 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; + /** BETWEEN */ + @Query(type = Query.Type.BETWEEN) + private List<${column.columnType}> createTime; } diff --git a/yshop-admin/src/main/resources/template/generator/admin/Repository.ftl b/yshop-admin/src/main/resources/template/generator/admin/Repository.ftl index 069e1fef3490dbf2a400711d5eadffab96621ba3..06dbbc7c244efb107563b13b863bc335c81f04ac 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/Repository.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/Repository.ftl @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.repository; @@ -18,12 +20,12 @@ public interface ${className}Repository extends JpaRepository<${className}, ${pk <#if columns??> <#list columns as column> <#if column.columnKey = 'UNI'> - /** - * 根据 ${column.capitalColumnName} 查询 - * @param ${column.columnName} / - * @return / - */ - ${className} findBy${column.capitalColumnName}(${column.columnType} ${column.columnName}); + /** + * 根据 ${column.capitalColumnName} 查询 + * @param ${column.columnName} / + * @return / + */ + ${className} findBy${column.capitalColumnName}(${column.columnType} ${column.columnName}); diff --git a/yshop-admin/src/main/resources/template/generator/admin/Service.ftl b/yshop-admin/src/main/resources/template/generator/admin/Service.ftl index b8fe81244b947e6b980f7af5e7cff8fb2e2e8dfb..1ae32c5abcb07aa2149c48912ab1b4b1dc65b910 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/Service.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/Service.ftl @@ -1,8 +1,10 @@ /** -* Copyright (C) 2018-2022 +* Copyright (C) 2018-2021 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.service; @@ -21,57 +23,52 @@ import javax.servlet.http.HttpServletResponse; */ public interface ${className}Service { -/** -* 查询数据分页 -* @param criteria 条件 -* @param pageable 分页参数 -* @return Map - -*/ -Map - queryAll(${className}QueryCriteria criteria, Pageable pageable); + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(${className}QueryCriteria criteria, Pageable pageable); -/** -* 查询所有数据不分页 -* @param criteria 条件参数 -* @return List -<${className}Dto> + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List<${className}Dto> */ - List - <${className}Dto> queryAll(${className}QueryCriteria criteria); + List<${className}Dto> queryAll(${className}QueryCriteria criteria); - /** - * 根据ID查询 - * @param ${pkChangeColName} ID - * @return ${className}Dto - */ - ${className}Dto findById(${pkColumnType} ${pkChangeColName}); + /** + * 根据ID查询 + * @param ${pkChangeColName} ID + * @return ${className}Dto + */ + ${className}Dto findById(${pkColumnType} ${pkChangeColName}); - /** - * 创建 - * @param resources / - * @return ${className}Dto - */ - ${className}Dto create(${className} resources); + /** + * 创建 + * @param resources / + * @return ${className}Dto + */ + ${className}Dto create(${className} resources); - /** - * 编辑 - * @param resources / - */ - void update(${className} resources); + /** + * 编辑 + * @param resources / + */ + void update(${className} resources); - /** - * 多选删除 - * @param ids / - */ - void deleteAll(${pkColumnType}[] ids); + /** + * 多选删除 + * @param ids / + */ + void deleteAll(${pkColumnType}[] ids); - /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List - <${className}Dto> all, HttpServletResponse response) throws IOException; - } + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List<${className}Dto> all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-admin/src/main/resources/template/generator/admin/ServiceImpl.ftl b/yshop-admin/src/main/resources/template/generator/admin/ServiceImpl.ftl index 98a224e5c0d6bf9991e03fe58b21696d30003d14..6ce10db1840876b6b903693f3c5de361759b6bb3 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/ServiceImpl.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/ServiceImpl.ftl @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.service.impl; @@ -11,7 +13,7 @@ import ${package}.domain.${className}; <#list columns as column> <#if column.columnKey = 'UNI'> <#if column_index = 1> - import co.yixiang.exception.EntityExistException; +import co.yixiang.exception.EntityExistException; @@ -27,11 +29,11 @@ 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; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.IdUtil; <#if !auto && pkColumnType = 'String'> - import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.IdUtil; // 默认不使用缓存 //import org.springframework.cache.annotation.CacheConfig; @@ -55,119 +57,106 @@ import java.util.LinkedHashMap; @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class ${className}ServiceImpl implements ${className}Service { -private final ${className}Repository ${changeClassName}Repository; + private final ${className}Repository ${changeClassName}Repository; -private final ${className}Mapper ${changeClassName}Mapper; + private final ${className}Mapper ${changeClassName}Mapper; -public ${className}ServiceImpl(${className}Repository ${changeClassName}Repository, ${className}Mapper ${changeClassName}Mapper) { -this.${changeClassName}Repository = ${changeClassName}Repository; -this.${changeClassName}Mapper = ${changeClassName}Mapper; -} + public ${className}ServiceImpl(${className}Repository ${changeClassName}Repository, ${className}Mapper ${changeClassName}Mapper) { + this.${changeClassName}Repository = ${changeClassName}Repository; + this.${changeClassName}Mapper = ${changeClassName}Mapper; + } -@Override -//@Cacheable -public Map - queryAll(${className}QueryCriteria criteria, Pageable pageable){ -Page<${className}> page = ${changeClassName}Repository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); -return PageUtil.toPage(page.map(${changeClassName}Mapper::toDto)); -} + @Override + //@Cacheable + public Map queryAll(${className}QueryCriteria criteria, Pageable pageable){ + Page<${className}> page = ${changeClassName}Repository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); + return PageUtil.toPage(page.map(${changeClassName}Mapper::toDto)); + } -@Override -//@Cacheable -public List -<${className}Dto> queryAll(${className}QueryCriteria criteria){ - return ${changeClassName}Mapper.toDto(${changeClassName}Repository.findAll((root, criteriaQuery, criteriaBuilder) -> - QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + @Override + //@Cacheable + public List<${className}Dto> queryAll(${className}QueryCriteria criteria){ + return ${changeClassName}Mapper.toDto(${changeClassName}Repository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); } @Override //@Cacheable(key = "#p0") public ${className}Dto findById(${pkColumnType} ${pkChangeColName}) { - ${className} ${changeClassName} = ${changeClassName}Repository.findById(${pkChangeColName}).orElseGet(${className} - ::new); - ValidationUtil.isNull(${changeClassName}.get${pkCapitalColName}(),"${className}","${pkChangeColName} - ",${pkChangeColName}); - return ${changeClassName}Mapper.toDto(${changeClassName}); + ${className} ${changeClassName} = ${changeClassName}Repository.findById(${pkChangeColName}).orElseGet(${className}::new); + ValidationUtil.isNull(${changeClassName}.get${pkCapitalColName}(),"${className}","${pkChangeColName}",${pkChangeColName}); + return ${changeClassName}Mapper.toDto(${changeClassName}); } @Override //@CacheEvict(allEntries = true) @Transactional(rollbackFor = Exception.class) public ${className}Dto create(${className} resources) { - <#if !auto && pkColumnType = 'Long'> +<#if !auto && pkColumnType = 'Long'> Snowflake snowflake = IdUtil.createSnowflake(1, 1); resources.set${pkCapitalColName}(snowflake.nextId()); - - <#if !auto && pkColumnType = 'String'> + +<#if !auto && pkColumnType = 'String'> resources.set${pkCapitalColName}(IdUtil.simpleUUID()); + +<#if columns??> + <#list columns as column> + <#if column.columnKey = 'UNI'> + if(${changeClassName}Repository.findBy${column.capitalColumnName}(resources.get${column.capitalColumnName}()) != null){ + throw new EntityExistException(${className}.class,"${column.columnName}",resources.get${column.capitalColumnName}()); + } - <#if columns??> - <#list columns as column> - <#if column.columnKey = 'UNI'> - if(${changeClassName}Repository.findBy${column.capitalColumnName}(resources.get${column.capitalColumnName}()) != null){ - throw new EntityExistException(${className}.class,"${column.columnName}",resources.get${column.capitalColumnName}()); - } - - - - return ${changeClassName}Mapper.toDto(${changeClassName}Repository.save(resources)); + + + return ${changeClassName}Mapper.toDto(${changeClassName}Repository.save(resources)); } @Override //@CacheEvict(allEntries = true) @Transactional(rollbackFor = Exception.class) public void update(${className} resources) { - ${className} ${changeClassName} = ${changeClassName}Repository.findById(resources.get${pkCapitalColName} - ()).orElseGet(${className}::new); - ValidationUtil.isNull( ${changeClassName}.get${pkCapitalColName}(),"${className} - ","id",resources.get${pkCapitalColName}()); - <#if columns??> - <#list columns as column> - <#if column.columnKey = 'UNI'> - <#if column_index = 1> - ${className} ${changeClassName}1 = null; - - ${changeClassName}1 = ${changeClassName}Repository.findBy${column.capitalColumnName}(resources.get${column.capitalColumnName}()); - if(${changeClassName}1 != null && !${changeClassName}1.get${pkCapitalColName}().equals(${changeClassName}.get${pkCapitalColName}())){ - throw new EntityExistException(${className}.class,"${column.columnName}",resources.get${column.capitalColumnName}()); - } - - - - ${changeClassName}.copy(resources); - ${changeClassName}Repository.save(${changeClassName}); + ${className} ${changeClassName} = ${changeClassName}Repository.findById(resources.get${pkCapitalColName}()).orElseGet(${className}::new); + ValidationUtil.isNull( ${changeClassName}.get${pkCapitalColName}(),"${className}","id",resources.get${pkCapitalColName}()); +<#if columns??> + <#list columns as column> + <#if column.columnKey = 'UNI'> + <#if column_index = 1> + ${className} ${changeClassName}1 = null; + + ${changeClassName}1 = ${changeClassName}Repository.findBy${column.capitalColumnName}(resources.get${column.capitalColumnName}()); + if(${changeClassName}1 != null && !${changeClassName}1.get${pkCapitalColName}().equals(${changeClassName}.get${pkCapitalColName}())){ + throw new EntityExistException(${className}.class,"${column.columnName}",resources.get${column.capitalColumnName}()); + } + + + + ${changeClassName}.copy(resources); + ${changeClassName}Repository.save(${changeClassName}); } @Override //@CacheEvict(allEntries = true) public void deleteAll(${pkColumnType}[] ids) { - for (${pkColumnType} id : ids) { - ${changeClassName}Repository.deleteById(${pkChangeColName}); - } + for (${pkColumnType} id : ids) { + ${changeClassName}Repository.deleteById(${pkChangeColName}); + } } @Override - public void download(List - <${className}Dto> all, HttpServletResponse response) throws IOException { - List - > list = new ArrayList<>(); + public void download(List<${className}Dto> all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); for (${className}Dto ${changeClassName} : all) { - Map - map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); <#list columns as column> <#if column.columnKey != 'PRI'> - <#if column.remark != ''> - map.put("${column.remark}", ${changeClassName}.get${column.capitalColumnName}()); - <#else> - map.put(" ${column.changeColumnName}", ${changeClassName}.get${column.capitalColumnName}()); - + <#if column.remark != ''> + map.put("${column.remark}", ${changeClassName}.get${column.capitalColumnName}()); + <#else> + map.put(" ${column.changeColumnName}", ${changeClassName}.get${column.capitalColumnName}()); + - list.add(map); + list.add(map); } FileUtil.downloadExcel(list, response); - } - } + } +} diff --git a/yshop-admin/src/main/resources/template/generator/admin/ServiceImplP.ftl b/yshop-admin/src/main/resources/template/generator/admin/ServiceImplP.ftl index b8797c5a2ba5affa268c995d5674723c76823aa9..505c76f2a444fdd82cae6e5c8638ae6b6b49525d 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/ServiceImplP.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/ServiceImplP.ftl @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.service.impl; @@ -11,7 +13,7 @@ import ${package}.domain.${className}; <#list columns as column> <#if column.columnKey = 'UNI'> <#if column_index = 1> - import co.yixiang.exception.EntityExistException; +import co.yixiang.exception.EntityExistException; @@ -32,11 +34,11 @@ 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; +import cn.hutool.core.lang.Snowflake; +import cn.hutool.core.util.IdUtil; <#if !auto && pkColumnType = 'String'> - import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.IdUtil; // 默认不使用缓存 //import org.springframework.cache.annotation.CacheConfig; @@ -50,7 +52,7 @@ import java.io.IOException; import javax.servlet.http.HttpServletResponse; import java.util.ArrayList; import java.util.LinkedHashMap; - +import co.yixiang.domain.PageResult; /** * @author ${author} * @date ${date} @@ -59,54 +61,42 @@ import java.util.LinkedHashMap; @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 { +public class ${className}ServiceImpl extends BaseServiceImpl<${className}Mapper, ${className}> implements ${className}Service { -private final IGenerator generator; + 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 PageResult<${className}Dto> queryAll(${className}QueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo<${className}> page = new PageInfo<>(queryAll(criteria)); + return generator.convertPageInfo(page,${className}Dto.class); + } -@Override -//@Cacheable -public List<${className}> queryAll(${className}QueryCriteria criteria){ -return baseMapper.selectList(QueryHelpPlus.getPredicate(${className}.class, criteria)); -} + @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'> + @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}()); + map.put("${column.remark}", ${changeClassName}.get${column.capitalColumnName}()); <#else> - map.put(" ${column.changeColumnName}", ${changeClassName}.get${column.capitalColumnName}()); + map.put(" ${column.changeColumnName}", ${changeClassName}.get${column.capitalColumnName}()); - - - list.add(map); - } - FileUtil.downloadExcel(list, response); - } + + + list.add(map); + } + FileUtil.downloadExcel(list, response); } +} diff --git a/yshop-admin/src/main/resources/template/generator/admin/ServiceP.ftl b/yshop-admin/src/main/resources/template/generator/admin/ServiceP.ftl index c4d4ce231952d27577384ab05b6c98d2c5731c39..1952cb141acab8e1f098b7bc5c6456fe5c372851 100644 --- a/yshop-admin/src/main/resources/template/generator/admin/ServiceP.ftl +++ b/yshop-admin/src/main/resources/template/generator/admin/ServiceP.ftl @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: -* 本软件为www.yixiang.co开发研制 +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package ${package}.service; import co.yixiang.common.service.BaseService; @@ -14,28 +16,25 @@ import java.util.Map; import java.util.List; import java.io.IOException; import javax.servlet.http.HttpServletResponse; - +import co.yixiang.domain.PageResult; /** * @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 条件 + * @param pageable 分页参数 + * @return Map + */ + PageResult<${className}Dto> queryAll(${className}QueryCriteria criteria, Pageable pageable); -/** -* 查询所有数据不分页 -* @param criteria 条件参数 -* @return List -<${className}Dto> + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List<${className}Dto> */ List<${className}> queryAll(${className}QueryCriteria criteria); @@ -45,6 +44,5 @@ Map * @param response / * @throws IOException / */ - void download(List - <${className}Dto> all, HttpServletResponse response) throws IOException; - } + void download(List<${className}Dto> all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-admin/src/main/resources/template/generator/front/api.ftl b/yshop-admin/src/main/resources/template/generator/front/api.ftl index b49378f83b6655887d9fef5d97e38761666e82bd..9587d0dff2f34d55920b296883c3433fe844e7e7 100644 --- a/yshop-admin/src/main/resources/template/generator/front/api.ftl +++ b/yshop-admin/src/main/resources/template/generator/front/api.ftl @@ -1,27 +1,27 @@ import request from '@/utils/request' export function add(data) { -return request({ -url: 'api/${changeClassName}', -method: 'post', -data -}) + return request({ + url: 'api/${changeClassName}', + method: 'post', + data + }) } export function del(ids) { -return request({ -url: 'api/${changeClassName}/', -method: 'delete', -data: ids -}) + return request({ + url: 'api/${changeClassName}/', + method: 'delete', + data: ids + }) } export function edit(data) { -return request({ -url: 'api/${changeClassName}', -method: 'put', -data -}) + return request({ + url: 'api/${changeClassName}', + method: 'put', + data + }) } export default { add, edit, del } diff --git a/yshop-admin/src/main/resources/template/generator/front/eForm.ftl b/yshop-admin/src/main/resources/template/generator/front/eForm.ftl index 7b9465a1f7325f7bbf08c2ba535c852ec5796be9..1e8fbcd97023657c85ec3bee51d4aa971d7635ba 100644 --- a/yshop-admin/src/main/resources/template/generator/front/eForm.ftl +++ b/yshop-admin/src/main/resources/template/generator/front/eForm.ftl @@ -1,110 +1,106 @@ diff --git a/yshop-admin/src/test/java/co/yixiang/Api_java_demo.java b/yshop-admin/src/test/java/co/yixiang/Api_java_demo.java index 288c707054d8767df30967bbda001351f274640b..5e0f87bf6cbf28c08bf1c07fc6217d76c462e178 100644 --- a/yshop-admin/src/test/java/co/yixiang/Api_java_demo.java +++ b/yshop-admin/src/test/java/co/yixiang/Api_java_demo.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang; @@ -38,7 +37,7 @@ public class Api_java_demo { //**********测试时,打开下面注释掉方法的即可,更多接口文档信息,请访问官网开放平台查看********** - public static void main(String[] args) throws Exception { + public static void main(String[] args) throws Exception{ //==================添加打印机接口(支持批量)================== //***返回值JSON字符串*** //正确例子:{"msg":"ok","ret":0,"data":{"ok":["sn#key#remark#carnum","316500011#abcdefgh#快餐前台"],"no":["316500012#abcdefgh#快餐前台#13688889999 (错误:识别码不正确)"]},"serverExecutedTime":3} @@ -50,13 +49,15 @@ public class Api_java_demo { // System.out.println(method); + //==================方法1.小票机打印订单接口================== //***返回值JSON字符串*** //成功:{"msg":"ok","ret":0,"data":"xxxxxxx_xxxxxxxx_xxxxxxxx","serverExecutedTime":5} //失败:{"msg":"错误描述","ret":非0,"data":"null","serverExecutedTime":5} - String method1 = print(SN);//该接口只能是小票机使用,如购买的是标签机请使用下面方法2,调用打印 - System.out.println(method1); + String method1 = print(SN);//该接口只能是小票机使用,如购买的是标签机请使用下面方法2,调用打印 + System.out.println(method1); + //==================方法2.标签机专用打印订单接口================== @@ -68,6 +69,7 @@ public class Api_java_demo { // System.out.println(method2); + //===========方法3.查询某订单是否打印成功============= //***返回值JSON字符串*** //成功:{"msg":"ok","ret":0,"data":true,"serverExecutedTime":2}//data:true为已打印,false为未打印 @@ -78,6 +80,7 @@ public class Api_java_demo { // System.out.println(method3); + //===========方法4.查询指定打印机某天的订单详情============ //***返回值JSON字符串*** //成功:{"msg":"ok","ret":0,"data":{"print":6,"waiting":1},"serverExecutedTime":9}//print已打印,waiting为打印 @@ -88,6 +91,7 @@ public class Api_java_demo { // System.out.println(method4); + //===========方法5.查询打印机的状态========================== //***返回值JSON字符串*** //成功:{"msg":"ok","ret":0,"data":"状态","serverExecutedTime":4} @@ -99,9 +103,12 @@ public class Api_java_demo { } + + + //=====================以下是函数实现部分================================================ - private static String addprinter(String snlist) { + private static String addprinter(String snlist){ //通过POST请求,发送打印信息到服务器 RequestConfig requestConfig = RequestConfig.custom() @@ -115,30 +122,34 @@ public class Api_java_demo { HttpPost post = new HttpPost(URL); List nvps = new ArrayList(); - nvps.add(new BasicNameValuePair("user", USER)); - String STIME = String.valueOf(System.currentTimeMillis() / 1000); - nvps.add(new BasicNameValuePair("stime", STIME)); - nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME))); - nvps.add(new BasicNameValuePair("apiname", "Open_printerAddlist"));//固定值,不需要修改 - nvps.add(new BasicNameValuePair("printerContent", snlist)); + nvps.add(new BasicNameValuePair("user",USER)); + String STIME = String.valueOf(System.currentTimeMillis()/1000); + nvps.add(new BasicNameValuePair("stime",STIME)); + nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME))); + nvps.add(new BasicNameValuePair("apiname","Open_printerAddlist"));//固定值,不需要修改 + nvps.add(new BasicNameValuePair("printerContent",snlist)); CloseableHttpResponse response = null; String result = null; - try { - post.setEntity(new UrlEncodedFormEntity(nvps, "utf-8")); + try + { + post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8")); response = httpClient.execute(post); int statecode = response.getStatusLine().getStatusCode(); - if (statecode == 200) { + if(statecode == 200){ HttpEntity httpentity = response.getEntity(); - if (httpentity != null) { + if (httpentity != null){ result = EntityUtils.toString(httpentity); } } - } catch (Exception e) { + } + catch (Exception e) + { e.printStackTrace(); - } finally { + } + finally{ try { - if (response != null) { + if(response!=null){ response.close(); } } catch (IOException e) { @@ -161,7 +172,7 @@ public class Api_java_demo { //方法1 - private static String print(String sn) { + private static String print(String sn){ //标签说明: //单标签: //"
"为换行,""为切刀指令(主动切纸,仅限切刀打印机使用才有效果) @@ -204,33 +215,37 @@ public class Api_java_demo { HttpPost post = new HttpPost(URL); List nvps = new ArrayList(); - nvps.add(new BasicNameValuePair("user", USER)); - String STIME = String.valueOf(System.currentTimeMillis() / 1000); - nvps.add(new BasicNameValuePair("stime", STIME)); - nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME))); - nvps.add(new BasicNameValuePair("apiname", "Open_printMsg"));//固定值,不需要修改 - nvps.add(new BasicNameValuePair("sn", sn)); - nvps.add(new BasicNameValuePair("content", content)); - nvps.add(new BasicNameValuePair("times", "1"));//打印联数 + nvps.add(new BasicNameValuePair("user",USER)); + String STIME = String.valueOf(System.currentTimeMillis()/1000); + nvps.add(new BasicNameValuePair("stime",STIME)); + nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME))); + nvps.add(new BasicNameValuePair("apiname","Open_printMsg"));//固定值,不需要修改 + nvps.add(new BasicNameValuePair("sn",sn)); + nvps.add(new BasicNameValuePair("content",content)); + nvps.add(new BasicNameValuePair("times","1"));//打印联数 CloseableHttpResponse response = null; String result = null; - try { - post.setEntity(new UrlEncodedFormEntity(nvps, "utf-8")); + try + { + post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8")); response = httpClient.execute(post); int statecode = response.getStatusLine().getStatusCode(); - if (statecode == 200) { + if(statecode == 200){ HttpEntity httpentity = response.getEntity(); - if (httpentity != null) { + if (httpentity != null){ //服务器返回的JSON字符串,建议要当做日志记录起来 result = EntityUtils.toString(httpentity); } } - } catch (Exception e) { + } + catch (Exception e) + { e.printStackTrace(); - } finally { + } + finally{ try { - if (response != null) { + if(response!=null){ response.close(); } } catch (IOException e) { @@ -252,8 +267,9 @@ public class Api_java_demo { } + //方法2 - private static String printLabelMsg(String sn) { + private static String printLabelMsg(String sn){ String content; content = "1";//设定打印时出纸和打印字体的方向,n 0 或 1,每次设备重启后都会初始化为 0 值设置,1:正向出纸,0:反向出纸, @@ -271,33 +287,37 @@ public class Api_java_demo { HttpPost post = new HttpPost(URL); List nvps = new ArrayList(); - nvps.add(new BasicNameValuePair("user", USER)); - String STIME = String.valueOf(System.currentTimeMillis() / 1000); - nvps.add(new BasicNameValuePair("stime", STIME)); - nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME))); - nvps.add(new BasicNameValuePair("apiname", "Open_printLabelMsg"));//固定值,不需要修改 - nvps.add(new BasicNameValuePair("sn", sn)); - nvps.add(new BasicNameValuePair("content", content)); - nvps.add(new BasicNameValuePair("times", "1"));//打印联数 + nvps.add(new BasicNameValuePair("user",USER)); + String STIME = String.valueOf(System.currentTimeMillis()/1000); + nvps.add(new BasicNameValuePair("stime",STIME)); + nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME))); + nvps.add(new BasicNameValuePair("apiname","Open_printLabelMsg"));//固定值,不需要修改 + nvps.add(new BasicNameValuePair("sn",sn)); + nvps.add(new BasicNameValuePair("content",content)); + nvps.add(new BasicNameValuePair("times","1"));//打印联数 CloseableHttpResponse response = null; String result = null; - try { - post.setEntity(new UrlEncodedFormEntity(nvps, "utf-8")); + try + { + post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8")); response = httpClient.execute(post); int statecode = response.getStatusLine().getStatusCode(); - if (statecode == 200) { + if(statecode == 200){ HttpEntity httpentity = response.getEntity(); - if (httpentity != null) { + if (httpentity != null){ //服务器返回的JSON字符串,建议要当做日志记录起来 result = EntityUtils.toString(httpentity); } } - } catch (Exception e) { + } + catch (Exception e) + { e.printStackTrace(); - } finally { + } + finally{ try { - if (response != null) { + if(response!=null){ response.close(); } } catch (IOException e) { @@ -320,7 +340,7 @@ public class Api_java_demo { //方法3 - private static String queryOrderState(String orderid) { + private static String queryOrderState(String orderid){ //通过POST请求,发送打印信息到服务器 RequestConfig requestConfig = RequestConfig.custom() @@ -334,31 +354,35 @@ public class Api_java_demo { HttpPost post = new HttpPost(URL); List nvps = new ArrayList(); - nvps.add(new BasicNameValuePair("user", USER)); - String STIME = String.valueOf(System.currentTimeMillis() / 1000); - nvps.add(new BasicNameValuePair("stime", STIME)); - nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME))); - nvps.add(new BasicNameValuePair("apiname", "Open_queryOrderState"));//固定值,不需要修改 - nvps.add(new BasicNameValuePair("orderid", orderid)); + nvps.add(new BasicNameValuePair("user",USER)); + String STIME = String.valueOf(System.currentTimeMillis()/1000); + nvps.add(new BasicNameValuePair("stime",STIME)); + nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME))); + nvps.add(new BasicNameValuePair("apiname","Open_queryOrderState"));//固定值,不需要修改 + nvps.add(new BasicNameValuePair("orderid",orderid)); CloseableHttpResponse response = null; String result = null; - try { - post.setEntity(new UrlEncodedFormEntity(nvps, "utf-8")); + try + { + post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8")); response = httpClient.execute(post); int statecode = response.getStatusLine().getStatusCode(); - if (statecode == 200) { + if(statecode == 200){ HttpEntity httpentity = response.getEntity(); - if (httpentity != null) { + if (httpentity != null){ //服务器返回 result = EntityUtils.toString(httpentity); } } - } catch (Exception e) { + } + catch (Exception e) + { e.printStackTrace(); - } finally { + } + finally{ try { - if (response != null) { + if(response!=null){ response.close(); } } catch (IOException e) { @@ -380,8 +404,9 @@ public class Api_java_demo { } + //方法4 - private static String queryOrderInfoByDate(String sn, String strdate) { + private static String queryOrderInfoByDate(String sn,String strdate){ //通过POST请求,发送打印信息到服务器 RequestConfig requestConfig = RequestConfig.custom() @@ -395,32 +420,36 @@ public class Api_java_demo { HttpPost post = new HttpPost(URL); List nvps = new ArrayList(); - nvps.add(new BasicNameValuePair("user", USER)); - String STIME = String.valueOf(System.currentTimeMillis() / 1000); - nvps.add(new BasicNameValuePair("stime", STIME)); - nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME))); - nvps.add(new BasicNameValuePair("apiname", "Open_queryOrderInfoByDate"));//固定值,不需要修改 - nvps.add(new BasicNameValuePair("sn", sn)); - nvps.add(new BasicNameValuePair("date", strdate));//yyyy-MM-dd格式 + nvps.add(new BasicNameValuePair("user",USER)); + String STIME = String.valueOf(System.currentTimeMillis()/1000); + nvps.add(new BasicNameValuePair("stime",STIME)); + nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME))); + nvps.add(new BasicNameValuePair("apiname","Open_queryOrderInfoByDate"));//固定值,不需要修改 + nvps.add(new BasicNameValuePair("sn",sn)); + nvps.add(new BasicNameValuePair("date",strdate));//yyyy-MM-dd格式 CloseableHttpResponse response = null; String result = null; - try { - post.setEntity(new UrlEncodedFormEntity(nvps, "utf-8")); + try + { + post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8")); response = httpClient.execute(post); int statecode = response.getStatusLine().getStatusCode(); - if (statecode == 200) { + if(statecode == 200){ HttpEntity httpentity = response.getEntity(); - if (httpentity != null) { + if (httpentity != null){ //服务器返回 result = EntityUtils.toString(httpentity); } } - } catch (Exception e) { + } + catch (Exception e) + { e.printStackTrace(); - } finally { + } + finally{ try { - if (response != null) { + if(response!=null){ response.close(); } } catch (IOException e) { @@ -442,8 +471,9 @@ public class Api_java_demo { } + //方法5 - private static String queryPrinterStatus(String sn) { + private static String queryPrinterStatus(String sn){ //通过POST请求,发送打印信息到服务器 RequestConfig requestConfig = RequestConfig.custom() @@ -457,31 +487,35 @@ public class Api_java_demo { HttpPost post = new HttpPost(URL); List nvps = new ArrayList(); - nvps.add(new BasicNameValuePair("user", USER)); - String STIME = String.valueOf(System.currentTimeMillis() / 1000); - nvps.add(new BasicNameValuePair("stime", STIME)); - nvps.add(new BasicNameValuePair("sig", signature(USER, UKEY, STIME))); - nvps.add(new BasicNameValuePair("apiname", "Open_queryPrinterStatus"));//固定值,不需要修改 - nvps.add(new BasicNameValuePair("sn", sn)); + nvps.add(new BasicNameValuePair("user",USER)); + String STIME = String.valueOf(System.currentTimeMillis()/1000); + nvps.add(new BasicNameValuePair("stime",STIME)); + nvps.add(new BasicNameValuePair("sig",signature(USER,UKEY,STIME))); + nvps.add(new BasicNameValuePair("apiname","Open_queryPrinterStatus"));//固定值,不需要修改 + nvps.add(new BasicNameValuePair("sn",sn)); CloseableHttpResponse response = null; String result = null; - try { - post.setEntity(new UrlEncodedFormEntity(nvps, "utf-8")); + try + { + post.setEntity(new UrlEncodedFormEntity(nvps,"utf-8")); response = httpClient.execute(post); int statecode = response.getStatusLine().getStatusCode(); - if (statecode == 200) { + if(statecode == 200){ HttpEntity httpentity = response.getEntity(); - if (httpentity != null) { + if (httpentity != null){ //服务器返回 result = EntityUtils.toString(httpentity); } } - } catch (Exception e) { + } + catch (Exception e) + { e.printStackTrace(); - } finally { + } + finally{ try { - if (response != null) { + if(response!=null){ response.close(); } } catch (IOException e) { @@ -504,8 +538,8 @@ public class Api_java_demo { //生成签名字符串 - private static String signature(String USER, String UKEY, String STIME) { - String s = DigestUtils.sha1Hex(USER + UKEY + STIME); + private static String signature(String USER,String UKEY,String STIME){ + String s = DigestUtils.sha1Hex(USER+UKEY+STIME); return s; } } diff --git a/yshop-admin/src/test/java/co/yixiang/FileTest.java b/yshop-admin/src/test/java/co/yixiang/FileTest.java index c6261cdfddbbdb0e8cd83c917601960c0810d8ce..5e355c7c15de76e69b1407d79cd0eda26657e529 100644 --- a/yshop-admin/src/test/java/co/yixiang/FileTest.java +++ b/yshop-admin/src/test/java/co/yixiang/FileTest.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang; @@ -26,7 +25,6 @@ public class FileTest { public static void main(String[] args) throws IOException { readfile("D:/upload"); } - public static void readfile(String filepath) throws FileNotFoundException, IOException { try { @@ -37,11 +35,11 @@ public class FileTest { System.out.println("absolutepath=" + file.getAbsolutePath()); System.out.println("name=" + file.getName()); - File targetFile = new File(file.getPath().replace("upload", "uploadZip")); + File targetFile = new File(file.getPath().replace("upload","uploadZip")); if (!targetFile.getParentFile().exists()) { targetFile.getParentFile().mkdirs(); } - ImgUtil.scale(file, targetFile, getAccuracy(file.length() / 1024)); + ImgUtil.scale(file,targetFile,getAccuracy(file.length()/ 1024)); } else if (file.isDirectory()) { System.out.println("文件夹"); String[] filelist = file.list(); @@ -52,13 +50,13 @@ public class FileTest { System.out.println("absolutepath=" + readfile.getAbsolutePath()); System.out.println("name=" + readfile.getName()); - File targetFile = new File(readfile.getPath().replace("upload", "uploadZip")); + File targetFile = new File(readfile.getPath().replace("upload","uploadZip")); System.out.println("path2=" + targetFile.getPath()); System.out.println("fileSize=" + targetFile.length()); if (!targetFile.getParentFile().exists()) { targetFile.getParentFile().mkdirs(); } - ImgUtil.scale(readfile, targetFile, getAccuracy(file.length() / 1024)); + ImgUtil.scale(readfile,targetFile,getAccuracy(file.length()/ 1024)); } else if (readfile.isDirectory()) { readfile(filepath + "\\" + filelist[i]); } diff --git a/yshop-admin/src/test/java/co/yixiang/Order.java b/yshop-admin/src/test/java/co/yixiang/Order.java index 2ab72bd58a22f325fd52c552730c6cec6a885245..ed7f77915561c6db9ec670af6b3f0329489df7ce 100644 --- a/yshop-admin/src/test/java/co/yixiang/Order.java +++ b/yshop-admin/src/test/java/co/yixiang/Order.java @@ -1,51 +1,42 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang; public class Order { - private String title; - private String price; - private String num; - - public Order() { - } - - public Order(String title, String price, String num) { - this.title = title; - this.price = price; - this.num = num; - } - - @Override - public String toString() { - return "Order [title=" + title + ", price=" + price + ", num=" + num + "]"; - } - - public String getTitle() { - return title; - } - - public void setTitle(String title) { - this.title = title; - } - - public String getPrice() { - return price; - } - - public void setPrice(String price) { - this.price = price; - } - - public String getNum() { - return num; - } - - public void setNum(String num) { - this.num = num; - } + private String title; + private String price; + private String num; + + public Order() { + } + public Order(String title, String price, String num) { + this.title = title; + this.price = price; + this.num = num; + } + @Override + public String toString() { + return "Order [title=" + title + ", price=" + price + ", num=" + num + "]"; + } + public String getTitle() { + return title; + } + public void setTitle(String title) { + this.title = title; + } + public String getPrice() { + return price; + } + public void setPrice(String price) { + this.price = price; + } + public String getNum() { + return num; + } + public void setNum(String num) { + this.num = num; + } } diff --git a/yshop-admin/src/test/java/co/yixiang/PrintUtil4.java b/yshop-admin/src/test/java/co/yixiang/PrintUtil4.java index c6167e7a5c3570eb896808b56ce7453527e5dabb..41409080f36e351fc5d6812a5e961ae537af07bb 100644 --- a/yshop-admin/src/test/java/co/yixiang/PrintUtil4.java +++ b/yshop-admin/src/test/java/co/yixiang/PrintUtil4.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang; diff --git a/yshop-common/pom.xml b/yshop-common/pom.xml index f6a659ad91e85b718d7966e7546cc1b0f7bf22ab..240736ab770bfaf34e1093242185c6ae8a05c6e0 100644 --- a/yshop-common/pom.xml +++ b/yshop-common/pom.xml @@ -5,13 +5,31 @@ yshop co.yixiang - 2.3 + 3.3 4.0.0 yshop-common 公共模块 + + 4.3.0 + + + com.github.binarywang + weixin-java-mp + ${weixin-java.version} + + + com.github.binarywang + weixin-java-pay + ${weixin-java.version} + + + com.github.binarywang + wx-java-miniapp-spring-boot-starter + ${weixin-java.version} + net.sf.dozer dozer-spring @@ -37,7 +55,7 @@ co.yixiang yshop-mproot - 2.3 + 3.3 org.apache.httpcomponents @@ -47,5 +65,9 @@ org.apache.httpcomponents httpclient + + org.springframework.boot + spring-boot-starter-security + 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 724607328e3fb70cace299b11ece1a90cc26e2dd..9be0595efa3360df738c11b2e23500c3f5357182 100644 --- a/yshop-common/src/main/java/co/yixiang/annotation/AnonymousAccess.java +++ b/yshop-common/src/main/java/co/yixiang/annotation/AnonymousAccess.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.annotation; diff --git a/yshop-common/src/main/java/co/yixiang/annotation/DataSource.java b/yshop-common/src/main/java/co/yixiang/annotation/DataSource.java new file mode 100644 index 0000000000000000000000000000000000000000..65d96c2d67ca647f95071c86c52324fb3dd9ff45 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/annotation/DataSource.java @@ -0,0 +1,19 @@ +package co.yixiang.annotation; + +import co.yixiang.enums.DataSourceType; + +import java.lang.annotation.Documented; +import java.lang.annotation.ElementType; +import java.lang.annotation.Retention; +import java.lang.annotation.RetentionPolicy; +import java.lang.annotation.Target; + +@Target(ElementType.METHOD) +@Retention(RetentionPolicy.RUNTIME) +@Documented +public @interface DataSource { + /** + * 切换数据源名称 + */ + DataSourceType value() default DataSourceType.MASTER; +} 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 b3c00d410a83255a941d836070e661e456693c69..aafc97b6a0eda29da1bbd9889fbe0b52a06f4d87 100644 --- a/yshop-common/src/main/java/co/yixiang/annotation/Limit.java +++ b/yshop-common/src/main/java/co/yixiang/annotation/Limit.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.annotation; 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 631526384cb5bb81f313945b02f1fecebf038ad4..e59d95ffaed6da9d5aae1a43826e2c5d06822dc0 100644 --- a/yshop-common/src/main/java/co/yixiang/annotation/Query.java +++ b/yshop-common/src/main/java/co/yixiang/annotation/Query.java @@ -1,24 +1,14 @@ /* /** -* Copyright (C) 2018-2022 -* All rights reserved, Designed By www.yixiang.co -* 注意: -* 本软件为www.yixiang.co开发研制 -*/ + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ package co.yixiang.annotation; /** * @author Zheng Jie * @date 2019-6-4 13:52:30 - *

- * 连接查询的属性名,如User类中的dept - *

- * 默认左连接 - *

- * 多字段模糊搜索,仅支持String类型字段,多个用逗号隔开, 如@Query(blurry = "email,username") - * @author Zheng Jie - * 适用于简单连接查询,复杂的请自定义该注解,或者使用sql查询 - * jie 2019-6-4 13:18:30 左右连接 *//* @Target(ElementType.FIELD) @@ -32,22 +22,22 @@ public @interface Query { */ /** - * 连接查询的属性名,如User类中的dept - *//* + * 连接查询的属性名,如User类中的dept + *//* String joinName() default ""; */ /** - * 默认左连接 - *//* + * 默认左连接 + *//* Join join() default Join.LEFT; */ /** - * 多字段模糊搜索,仅支持String类型字段,多个用逗号隔开, 如@Query(blurry = "email,username") - *//* + * 多字段模糊搜索,仅支持String类型字段,多个用逗号隔开, 如@Query(blurry = "email,username") + *//* String blurry() default ""; @@ -78,9 +68,9 @@ public @interface Query { */ /** - * @author Zheng Jie - * 适用于简单连接查询,复杂的请自定义该注解,或者使用sql查询 - *//* + * @author Zheng Jie + * 适用于简单连接查询,复杂的请自定义该注解,或者使用sql查询 + *//* enum Join { */ diff --git a/yshop-common/src/main/java/co/yixiang/api/ApiCode.java b/yshop-common/src/main/java/co/yixiang/api/ApiCode.java new file mode 100644 index 0000000000000000000000000000000000000000..2356fadaf76e24724e3c3e42fcb86d8d5b5ca161 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/api/ApiCode.java @@ -0,0 +1,126 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.api; + + +/** + * API 响应码 + * @author hupeng + * @date 2020-04-30 + */ +public enum ApiCode { + + /** + * 操作成功 + **/ + SUCCESS(200, "操作成功"), + /** + * 非法访问 + **/ + UNAUTHORIZED(401, "非法访问"), + /** + * 没有权限 + **/ + NOT_PERMISSION(403, "没有权限"), + /** + * 你请求的资源不存在 + **/ + NOT_FOUND(404, "你请求的资源不存在"), + /** + * 操作失败 + **/ + FAIL(500, "操作失败"), + /** + * 登录失败 + **/ + LOGIN_EXCEPTION(4000, "登录失败"), + /** + * 系统异常 + **/ + SYSTEM_EXCEPTION(5000, "系统异常"), + /** + * 请求参数校验异常 + **/ + PARAMETER_EXCEPTION(5001, "请求参数校验异常"), + /** + * 请求参数解析异常 + **/ + PARAMETER_PARSE_EXCEPTION(5002, "请求参数解析异常"), + /** + * HTTP内容类型异常 + **/ + HTTP_MEDIA_TYPE_EXCEPTION(5003, "HTTP内容类型异常"), + /** + * 系统处理异常 + **/ + YSHOP_SYSTEM_EXCEPTION(5100, "系统处理异常"), + /** + * 业务处理异常 + **/ + BUSINESS_EXCEPTION(5101, "业务处理异常"), + /** + * 数据库处理异常 + **/ + DAO_EXCEPTION(5102, "数据库处理异常"), + /** + * 验证码校验异常 + **/ + VERIFICATION_CODE_EXCEPTION(5103, "验证码校验异常"), + /** + * 登录授权异常 + **/ + AUTHENTICATION_EXCEPTION(5104, "登录授权异常"), + /** + * 没有访问权限 + **/ + UNAUTHENTICATED_EXCEPTION(5105, "没有访问权限"), + /** + * 没有访问权限 + **/ + UNAUTHORIZED_EXCEPTION(5106, "没有访问权限"), + /** + * JWT Token解析异常 + **/ + JWTDECODE_EXCEPTION(5107, "Token解析异常"), + + HTTP_REQUEST_METHOD_NOT_SUPPORTED_EXCEPTION(5108, "METHOD NOT SUPPORTED"), + + /** + * 访问次数受限制 + **/ + BAD_LIMIT_EXCEPTION(5109, "访问次数受限制"), + ; + + private final int code; + private final String message; + + ApiCode(final int code, final String message) { + this.code = code; + this.message = message; + } + + public static ApiCode getApiCode(int code) { + ApiCode[] ecs = ApiCode.values(); + for (ApiCode ec : ecs) { + if (ec.getCode() == code) { + return ec; + } + } + return SUCCESS; + } + + public int getCode() { + return code; + } + + public String getMessage() { + return message; + } + +} diff --git a/yshop-common/src/main/java/co/yixiang/api/ApiResult.java b/yshop-common/src/main/java/co/yixiang/api/ApiResult.java new file mode 100644 index 0000000000000000000000000000000000000000..0ea84a8423c208c862cdc01c823027417d3196f4 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/api/ApiResult.java @@ -0,0 +1,231 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.api; + + +import com.alibaba.fastjson.annotation.JSONField; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.experimental.Accessors; +import org.apache.commons.lang3.StringUtils; + +import java.io.Serializable; +import java.util.Date; +import java.util.HashMap; +import java.util.List; +import java.util.Map; + + +/** + * API 返回结果 + * @author hupeng + * @date 2020-04-30 + */ +@Data +@Accessors(chain = true) +@Builder +@AllArgsConstructor +public class ApiResult implements Serializable { + private static final long serialVersionUID = 8004487252556526569L; + + /** + * 响应码 + */ + @ApiModelProperty(value = "响应码") + private int status; + + /** + * 是否成功 + */ + @ApiModelProperty(value = "是否成功:成功true,失败false") + private boolean success; + + /** + * 响应消息 + */ + @ApiModelProperty(value = "响应消息") + private String msg; + + /** + * 总条数 + */ + @ApiModelProperty(value = "总条数") + private Integer total; + + /** + * 总页数 + */ + @ApiModelProperty(value = "总页数") + private Integer totalPage; + + /** + * 响应数据 + */ + @ApiModelProperty(value = "响应数据") + private T data; + + /** + * 响应时间 + */ + @ApiModelProperty(value = "响应时间") + @JSONField(format = "yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date time; + + public ApiResult() { + time = new Date(); + } + + public static ApiResult result(boolean flag){ + if (flag){ + return ok(); + } + return fail(); + } + + public static ApiResult result(ApiCode apiCode){ + return result(apiCode,null); + } + + public static ApiResult result(ApiCode apiCode, T data){ + return result(apiCode,null,data); + } + + public static ApiResult resultPage(Integer total, Integer totalPage, T data){ + return (ApiResult) ApiResult.builder() + .total(total) + .totalPage(totalPage) + .status(200) + .msg(null) + .data(data) + .success(true) + .time(new Date()) + .build(); + } + + + public static ApiResult result(ApiCode apiCode, String message, T data){ + boolean success = false; + if (apiCode.getCode() == ApiCode.SUCCESS.getCode()){ + success = true; + } + if (StringUtils.isBlank(message)){ + message = apiCode.getMessage(); + } + return (ApiResult) ApiResult.builder() + .status(apiCode.getCode()) + .msg(message) + .data(data) + .success(success) + .time(new Date()) + .build(); + } + + public static ApiResult ok(){ + return ok(null); + } + + public static ApiResult ok(T data){ + return result(ApiCode.SUCCESS,data); + } + + public static ApiResult ok(T data, String message){ + return result(ApiCode.SUCCESS,message,data); + } + + public static ApiResult> okMap(String key, Object value){ + Map map = new HashMap<>(1); + map.put(key,value); + return ok(map); + } + + public static ApiResult fail(ApiCode apiCode){ + return result(apiCode,null); + } + + public static ApiResult fail(String message){ + return result(ApiCode.FAIL,message,null); + + } + + public static ApiResult fail(ApiCode apiCode, T data){ + if (ApiCode.SUCCESS == apiCode){ + throw new RuntimeException("失败结果状态码不能为" + ApiCode.SUCCESS.getCode()); + } + return result(apiCode,data); + + } + + public static ApiResult fail(Integer errorCode, String message){ + return new ApiResult() + .setSuccess(false) + .setStatus(errorCode) + .setMsg(message); + } + + public static ApiResult> fail(String key, Object value){ + Map map = new HashMap<>(1); + map.put(key,value); + return result(ApiCode.FAIL,map); + } + + public static ApiResult resultPage(T t, int limit){ + List list = (List) t; + int count = list.size() / limit; + if (list.size() == 0) { + return (ApiResult) ApiResult.builder() + .total(0) + .totalPage(0) + .status(200) + .msg(null) + .data(list) + .success(true) + .time(new Date()) + .build(); + } + if (list.size() <= limit) { + return (ApiResult) ApiResult.builder() + .total(list.size()) + .totalPage(1) + .status(200) + .msg(null) + .data(list) + .success(true) + .time(new Date()) + .build(); + } else if (count % limit == 0) { + return (ApiResult) ApiResult.builder() + .total(list.size()) + .totalPage(count) + .status(200) + .msg(null) + .data(list) + .success(true) + .time(new Date()) + .build(); + } else { + return (ApiResult) ApiResult.builder() + .total(list.size()) + .totalPage(count+1) + .status(200) + .msg(null) + .data(list) + .success(true) + .time(new Date()) + .build(); + } + } + + public static ApiResult fail() { + return fail(ApiCode.FAIL); + } +} diff --git a/yshop-common/src/main/java/co/yixiang/api/BusinessException.java b/yshop-common/src/main/java/co/yixiang/api/BusinessException.java new file mode 100644 index 0000000000000000000000000000000000000000..42775d43f7788e548ddd3979a2f9301fd98e0ea1 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/api/BusinessException.java @@ -0,0 +1,35 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.api; + + + + + +/** + * 业务异常 + * @author hupeng + * @date 2020-04-30 + */ +public class BusinessException extends YshopException { + private static final long serialVersionUID = -2303357122330162359L; + + public BusinessException(String message) { + super(message); + } + + public BusinessException(Integer errorCode, String message) { + super(errorCode, message); + } + + public BusinessException(ApiCode apiCode) { + super(apiCode); + } + +} diff --git a/yshop-common/src/main/java/co/yixiang/api/DaoException.java b/yshop-common/src/main/java/co/yixiang/api/DaoException.java new file mode 100644 index 0000000000000000000000000000000000000000..07b8c2adcd9928dc1504748777f965f5aa45df45 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/api/DaoException.java @@ -0,0 +1,31 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.api; + + +/** + * DAO异常 + * @author hupeng + * @date 2020-04-30 + */ +public class DaoException extends YshopException { + private static final long serialVersionUID = -6912618737345878854L; + + public DaoException(String message) { + super(message); + } + + public DaoException(Integer errorCode, String message) { + super(errorCode, message); + } + + public DaoException(ApiCode apiCode) { + super(apiCode); + } +} diff --git a/yshop-common/src/main/java/co/yixiang/api/UnAuthenticatedException.java b/yshop-common/src/main/java/co/yixiang/api/UnAuthenticatedException.java new file mode 100644 index 0000000000000000000000000000000000000000..cef14ecffe9a15f1f4b15c8986e06ffe93443c32 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/api/UnAuthenticatedException.java @@ -0,0 +1,28 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.api; + +/** + * 认证异常 + * @author hupeng + * @date 2020-04-30 + */ +public class UnAuthenticatedException extends YshopException { + public UnAuthenticatedException(String message) { + super(message); + } + + public UnAuthenticatedException(Integer errorCode, String message) { + super(errorCode, message); + } + + public UnAuthenticatedException(ApiCode apiCode) { + super(apiCode); + } +} diff --git a/yshop-common/src/main/java/co/yixiang/api/YshopException.java b/yshop-common/src/main/java/co/yixiang/api/YshopException.java new file mode 100644 index 0000000000000000000000000000000000000000..f0adfc27a08473d9bda90825273791ce3d38fd17 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/api/YshopException.java @@ -0,0 +1,58 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.api; + + +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + * 自定义异常 + * @author hupeng + * @date 2020-04-30 + */ +@Data +@EqualsAndHashCode(callSuper = true) +public class YshopException extends RuntimeException{ + + private static final long serialVersionUID = -2470461654663264392L; + + private Integer errorCode; + private String message; + + public YshopException() { + super(); + } + + public YshopException(String message) { + super(message); + this.message = message; + } + + public YshopException(Integer errorCode, String message) { + super(message); + this.errorCode = errorCode; + this.message = message; + } + + public YshopException(ApiCode apiCode) { + super(apiCode.getMessage()); + this.errorCode = apiCode.getCode(); + this.message = apiCode.getMessage(); + } + + public YshopException(String message, Throwable cause) { + super(message, cause); + } + + public YshopException(Throwable cause) { + super(cause); + } + +} diff --git a/yshop-common/src/main/java/co/yixiang/aspect/DataSourceAspect.java b/yshop-common/src/main/java/co/yixiang/aspect/DataSourceAspect.java new file mode 100644 index 0000000000000000000000000000000000000000..ca72e1dafe99c85df67f2676f3b2453acdbea06b --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/aspect/DataSourceAspect.java @@ -0,0 +1,42 @@ +package co.yixiang.aspect; + +import co.yixiang.annotation.DataSource; +import co.yixiang.config.datasource.DynamicDataSourceContextHolder; +import lombok.extern.slf4j.Slf4j; +import org.aspectj.lang.ProceedingJoinPoint; +import org.aspectj.lang.annotation.Around; +import org.aspectj.lang.annotation.Aspect; +import org.aspectj.lang.annotation.Pointcut; +import org.aspectj.lang.reflect.MethodSignature; +import org.springframework.core.annotation.Order; +import org.springframework.stereotype.Component; + +import java.lang.reflect.Method; + +@Aspect +@Order(1) +@Component +@Slf4j +public class DataSourceAspect { + + @Pointcut("@annotation(co.yixiang.annotation.DataSource)") + public void dsPointCut() { + + } + + @Around("dsPointCut()") + public Object around(ProceedingJoinPoint point) throws Throwable { + MethodSignature signature = (MethodSignature) point.getSignature(); + Method method = signature.getMethod(); + DataSource dataSource = method.getAnnotation(DataSource.class); + if (dataSource != null) { + DynamicDataSourceContextHolder.setDataSourceType(dataSource.value().name()); + } + try { + return point.proceed(); + } finally { + // 销毁数据源 在执行方法之后 + DynamicDataSourceContextHolder.clearDataSourceType(); + } + } +} 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 65258da35a17e817704c33739dcac10146ff2ec6..85e1cdf548f662e9e874bd8ff5e22e1a68c81288 100644 --- a/yshop-common/src/main/java/co/yixiang/aspect/LimitAspect.java +++ b/yshop-common/src/main/java/co/yixiang/aspect/LimitAspect.java @@ -1,22 +1,22 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.aspect; import co.yixiang.annotation.Limit; -import co.yixiang.exception.BadRequestException; +import co.yixiang.exception.BadLimitRequestException; import co.yixiang.utils.RequestHolder; import co.yixiang.utils.StringUtils; import com.google.common.collect.ImmutableList; -import lombok.extern.slf4j.Slf4j; import org.aspectj.lang.ProceedingJoinPoint; import org.aspectj.lang.annotation.Around; import org.aspectj.lang.annotation.Aspect; import org.aspectj.lang.annotation.Pointcut; import org.aspectj.lang.reflect.MethodSignature; +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; import org.springframework.data.redis.core.RedisTemplate; import org.springframework.data.redis.core.script.DefaultRedisScript; import org.springframework.data.redis.core.script.RedisScript; @@ -30,12 +30,12 @@ import java.lang.reflect.Method; */ @Aspect @Component -@Slf4j public class LimitAspect { - private final RedisTemplate redisTemplate; + private final RedisTemplate redisTemplate; + private static final Logger logger = LoggerFactory.getLogger(LimitAspect.class); - public LimitAspect(RedisTemplate redisTemplate) { + public LimitAspect(RedisTemplate redisTemplate) { this.redisTemplate = redisTemplate; } @@ -59,16 +59,16 @@ public class LimitAspect { } } - ImmutableList keys = ImmutableList.of(StringUtils.join(limit.prefix(), "_", key, "_", request.getRequestURI().replaceAll("/", "_"))); + ImmutableList keys = ImmutableList.of(StringUtils.join(limit.prefix(), "_", key, "_", request.getRequestURI().replaceAll("/","_"))); String luaScript = buildLuaScript(); - RedisScript redisScript = new DefaultRedisScript<>(luaScript, Number.class); - Number count = redisTemplate.execute(redisScript, keys, limit.count(), limit.period()); + RedisScript redisScript = new DefaultRedisScript<>(luaScript, Long.class); + Long count = redisTemplate.execute(redisScript, keys, limit.count(), limit.period()); if (null != count && count.intValue() <= limit.count()) { - log.info("第{}次访问key为 {},描述为 [{}] 的接口", count, keys, limit.name()); + logger.info("第{}次访问key为 {},描述为 [{}] 的接口", count, keys, limit.name()); return joinPoint.proceed(); } else { - throw new BadRequestException("访问次数受限制"); + throw new BadLimitRequestException("访问次数受限制"); } } 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 b6d66610e13aa68d181dff5cf4a1f377616cfddf..c9e0f5caee7e78a1d83fc7e6829d0c58306b8c08 100644 --- a/yshop-common/src/main/java/co/yixiang/aspect/LimitType.java +++ b/yshop-common/src/main/java/co/yixiang/aspect/LimitType.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.aspect; 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 935dfb3f41fef86f77e8b2ca90728494146272da..344243979beacaec61c0f8c58236e5ca9f2d6652 100644 --- a/yshop-common/src/main/java/co/yixiang/config/ElPermissionConfig.java +++ b/yshop-common/src/main/java/co/yixiang/config/ElPermissionConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config; @@ -20,7 +19,7 @@ import java.util.stream.Collectors; @Service(value = "el") public class ElPermissionConfig { - public Boolean check(String... permissions) { + public Boolean check(String ...permissions){ // 获取当前用户的所有权限 List elPermissions = SecurityUtils.getUserDetails().getAuthorities().stream().map(GrantedAuthority::getAuthority).collect(Collectors.toList()); // 判断当前用户的所有权限是否包含接口上定义的权限 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 816e8c537cd85b196c079f8f795d09bf52c6a357..1495bd8300cb59c2f9ebc3e17b9193da494599d8 100644 --- a/yshop-common/src/main/java/co/yixiang/config/RedisConfig.java +++ b/yshop-common/src/main/java/co/yixiang/config/RedisConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config; @@ -42,7 +41,7 @@ import java.util.Map; * @date 2018-11-24 */ @Slf4j -@Configuration +@Configuration(proxyBeanMethods = false) @EnableCaching @ConditionalOnClass(RedisOperations.class) @EnableConfigurationProperties(RedisProperties.class) @@ -53,7 +52,7 @@ public class RedisConfig extends CachingConfigurerSupport { * 设置@cacheable 序列化方式 */ @Bean - public RedisCacheConfiguration redisCacheConfiguration() { + public RedisCacheConfiguration redisCacheConfiguration(){ FastJsonRedisSerializer fastJsonRedisSerializer = new FastJsonRedisSerializer<>(Object.class); RedisCacheConfiguration configuration = RedisCacheConfiguration.defaultCacheConfig(); configuration = configuration.serializeValuesWith(RedisSerializationContext.SerializationPair.fromSerializer(fastJsonRedisSerializer)).entryTtl(Duration.ofHours(2)); @@ -71,7 +70,7 @@ public class RedisConfig extends CachingConfigurerSupport { template.setValueSerializer(fastJsonRedisSerializer); template.setHashValueSerializer(fastJsonRedisSerializer); // 全局开启AutoType,这里方便开发,使用全局的方式 - ParserConfig.getGlobalInstance(); + ParserConfig.getGlobalInstance().setAutoTypeSupport(true); // 建议使用这种方式,小范围指定白名单 // ParserConfig.getGlobalInstance().addAccept("me.zhengjie.domain"); // key的序列化采用StringRedisSerializer @@ -88,17 +87,17 @@ public class RedisConfig extends CachingConfigurerSupport { @Override public KeyGenerator keyGenerator() { return (target, method, params) -> { - Map container = new HashMap<>(3); + Map container = new HashMap<>(3); Class targetClassClass = target.getClass(); // 类地址 - container.put("class", targetClassClass.toGenericString()); + container.put("class",targetClassClass.toGenericString()); // 方法名称 - container.put("methodName", method.getName()); + container.put("methodName",method.getName()); // 包名称 - container.put("package", targetClassClass.getPackage()); + container.put("package",targetClassClass.getPackage()); // 参数列表 for (int i = 0; i < params.length; i++) { - container.put(String.valueOf(i), params[i]); + container.put(String.valueOf(i),params[i]); } // 转为JSON字符串 String jsonString = JSON.toJSONString(container); @@ -143,7 +142,7 @@ public class RedisConfig extends CachingConfigurerSupport { * @author / * @param */ -class FastJsonRedisSerializer implements RedisSerializer { + class FastJsonRedisSerializer implements RedisSerializer { private final Class clazz; 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 c85d4d46d0edd27e6b5c1f3f45ed4b4d79577010..24d8d5ef66fea44311ddbac6ade6e5264b8a8d5e 100644 --- a/yshop-common/src/main/java/co/yixiang/config/SwaggerConfig.java +++ b/yshop-common/src/main/java/co/yixiang/config/SwaggerConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config; @@ -20,17 +19,21 @@ 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; import springfox.documentation.builders.RequestHandlerSelectors; -import springfox.documentation.builders.RequestParameterBuilder; import springfox.documentation.schema.AlternateTypeRule; import springfox.documentation.schema.AlternateTypeRuleConvention; -import springfox.documentation.schema.ScalarType; +import springfox.documentation.schema.ModelRef; import springfox.documentation.service.ApiInfo; +import springfox.documentation.service.ApiKey; +import springfox.documentation.service.AuthorizationScope; import springfox.documentation.service.Contact; -import springfox.documentation.service.ParameterType; -import springfox.documentation.service.RequestParameter; +import springfox.documentation.service.Parameter; +import springfox.documentation.service.SecurityReference; +import springfox.documentation.service.SecurityScheme; import springfox.documentation.spi.DocumentationType; +import springfox.documentation.spi.service.contexts.SecurityContext; import springfox.documentation.spring.web.plugins.Docket; import springfox.documentation.swagger2.annotations.EnableSwagger2; @@ -47,7 +50,7 @@ import static springfox.documentation.schema.AlternateTypeRules.newRule; * @Date 2019/1/9 **/ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableSwagger2 public class SwaggerConfig { @@ -72,13 +75,15 @@ public class SwaggerConfig { @Bean @SuppressWarnings("all") public Docket createRestApi() { - RequestParameterBuilder ticketPar = new RequestParameterBuilder(); - List pars = new ArrayList<>(); - ticketPar.description("token").name(tokenHeader) - .in(ParameterType.HEADER).required(true) - .query(param -> param.model(model -> model.scalarModel(ScalarType.STRING))); + ParameterBuilder ticketPar = new ParameterBuilder(); + List pars = new ArrayList<>(); + ticketPar.name(tokenHeader).description("token") + .modelRef(new ModelRef("string")) + .parameterType("header") + .defaultValue(tokenStartWith + " ") + .required(true) + .build(); pars.add(ticketPar.build()); - return new Docket(DocumentationType.SWAGGER_2) .enable(enabled) .apiInfo(apiInfo()) @@ -86,7 +91,10 @@ public class SwaggerConfig { .apis(RequestHandlerSelectors.basePackage("co.yixiang.modules")) .paths(PathSelectors.regex("/error.*").negate()) .build() - .globalRequestParameters(pars); + .globalOperationParameters(pars) + //添加登陆认证 + .securitySchemes(securitySchemes()) + .securityContexts(securityContexts()); } private ApiInfo apiInfo() { @@ -95,16 +103,49 @@ public class SwaggerConfig { .termsOfServiceUrl(serverUrl) .description(title) .version(version) - .contact(new Contact("hupeng", "https://www.yixiang.co", "guchengwuyue@163.com")) + .contact(new Contact("hupeng","https://www.yixiang.co","guchengwuyue@163.com")) + .build(); + } + + private List securitySchemes() { + //设置请求头信息 + List securitySchemes = new ArrayList<>(); + ApiKey apiKey = new ApiKey(tokenHeader, tokenHeader, "header"); + securitySchemes.add(apiKey); + return securitySchemes; + } + + private List securityContexts() { + //设置需要登录认证的路径 + List securityContexts = new ArrayList<>(); + // ^(?!auth).*$ 表示所有包含auth的接口不需要使用securitySchemes即不需要带token + // ^标识开始 ()里是一子表达式 ?!/auth表示匹配不是/auth的位置,匹配上则添加请求头,注意路径已/开头 .表示任意字符 *表示前面的字符匹配多次 $标识结束 + securityContexts.add(getContextByPath()); + return securityContexts; + } + + private SecurityContext getContextByPath() { + return SecurityContext.builder() + .securityReferences(defaultAuth()) + .forPaths(PathSelectors.regex("^(?!/auth).*$")) .build(); } + private List defaultAuth() { + List securityReferences = new ArrayList<>(); + AuthorizationScope authorizationScope = new AuthorizationScope("global", "accessEverything"); + AuthorizationScope[] authorizationScopes = new AuthorizationScope[1]; + authorizationScopes[0] = authorizationScope; + securityReferences.add(new SecurityReference(tokenHeader, authorizationScopes)); + return securityReferences; + } + } /** * 将Pageable转换展示在swagger中 */ -@Configuration +@Configuration(proxyBeanMethods = false) @EnableSwagger2 @EnableKnife4j @Import(BeanValidatorPluginsConfiguration.class) diff --git a/yshop-common/src/main/java/co/yixiang/config/datasource/DynamicDataSourceContextHolder.java b/yshop-common/src/main/java/co/yixiang/config/datasource/DynamicDataSourceContextHolder.java new file mode 100644 index 0000000000000000000000000000000000000000..c493dc271a5e173beeccee9479e8a44a07d3511d --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/config/datasource/DynamicDataSourceContextHolder.java @@ -0,0 +1,45 @@ +package co.yixiang.config.datasource; + +import org.slf4j.Logger; +import org.slf4j.LoggerFactory; + +/** + * 数据源切换处理 + * + * @author hupeng + */ +public class DynamicDataSourceContextHolder +{ + public static final Logger log = LoggerFactory.getLogger(DynamicDataSourceContextHolder.class); + + /** + * 使用ThreadLocal维护变量,ThreadLocal为每个使用该变量的线程提供独立的变量副本, + * 所以每一个线程都可以独立地改变自己的副本,而不会影响其它线程所对应的副本。 + */ + private static final ThreadLocal CONTEXT_HOLDER = new ThreadLocal<>(); + + /** + * 设置数据源的变量 + */ + public static void setDataSourceType(String dsType) + { + log.info("切换到{}数据源", dsType); + CONTEXT_HOLDER.set(dsType); + } + + /** + * 获得数据源的变量 + */ + public static String getDataSourceType() + { + return CONTEXT_HOLDER.get(); + } + + /** + * 清空数据源变量 + */ + public static void clearDataSourceType() + { + CONTEXT_HOLDER.remove(); + } +} 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 271235d68073ac2c720552bdc256b773c07cf398..6f41d468df76a0173eff8d2e998404871fedba52 100644 --- a/yshop-common/src/main/java/co/yixiang/constant/ShopConstants.java +++ b/yshop-common/src/main/java/co/yixiang/constant/ShopConstants.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.constant; @@ -13,123 +12,173 @@ package co.yixiang.constant; */ public interface ShopConstants { - /** - * 订单自动取消时间(分钟) - */ - long ORDER_OUTTIME_UNPAY = 30; - /** - * 订单自动收货时间(天) - */ - long ORDER_OUTTIME_UNCONFIRM = 7; - /** - * redis订单未付款key - */ - String REDIS_ORDER_OUTTIME_UNPAY = "order:unpay:"; - /** - * redis订单收货key - */ - String REDIS_ORDER_OUTTIME_UNCONFIRM = "order:unconfirm:"; - - /** - * redis拼团key - */ - String REDIS_PINK_CANCEL_KEY = "pink:cancel:"; - - /** - * 微信支付service - */ - String YSHOP_WEIXIN_PAY_SERVICE = "yshop_weixin_pay_service"; - - /** - * 微信支付小程序service - */ - String YSHOP_WEIXIN_MINI_PAY_SERVICE = "yshop_weixin_mini_pay_service"; - - /** - * 微信支付app service - */ - String YSHOP_WEIXIN_APP_PAY_SERVICE = "yshop_weixin_app_pay_service"; - - /** - * 微信公众号service - */ - String YSHOP_WEIXIN_MP_SERVICE = "yshop_weixin_mp_service"; - - - /** - * 商城默认密码 - */ - String YSHOP_DEFAULT_PWD = "123456"; - - /** - * 商城默认注册图片 - */ - String YSHOP_DEFAULT_AVATAR = "https://image.dayouqiantu.cn/5e79f6cfd33b6.png"; - - /** - * 腾讯地图地址解析 - */ - String QQ_MAP_URL = "https://apis.map.qq.com/ws/geocoder/v1/"; - - /** - * redis首页键 - */ - String YSHOP_REDIS_INDEX_KEY = "yshop:index_data"; - - /** - * 充值方案 - */ - String YSHOP_RECHARGE_PRICE_WAYS = "yshop_recharge_price_ways"; - /** - * 首页banner - */ - String YSHOP_HOME_BANNER = "yshop_home_banner"; - /** - * 首页菜单 - */ - String YSHOP_HOME_MENUS = "yshop_home_menus"; - /** - * 首页滚动新闻 - */ - String YSHOP_HOME_ROLL_NEWS = "yshop_home_roll_news"; - /** - * 热门搜索 - */ - String YSHOP_HOT_SEARCH = "yshop_hot_search"; - /** - * 个人中心菜单 - */ - String YSHOP_MY_MENUES = "yshop_my_menus"; - /** - * 秒杀时间段 - */ - String YSHOP_SECKILL_TIME = "yshop_seckill_time"; - /** - * 签到天数 - */ - String YSHOP_SIGN_DAY_NUM = "yshop_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"; - - /** - * 微信菜单 - */ - String WECHAT_MENUS = "wechat_menus"; - + /** + * 订单自动取消时间(分钟) + */ + long ORDER_OUTTIME_UNPAY = 30; + /** + * 订单自动收货时间(天) + */ + long ORDER_OUTTIME_UNCONFIRM = 7; + /** + * redis订单未付款key + */ + String REDIS_ORDER_OUTTIME_UNPAY = "order:unpay:"; + /** + * redis订单收货key + */ + String REDIS_ORDER_OUTTIME_UNCONFIRM = "order:unconfirm:"; + + /** + * redis拼团key + */ + String REDIS_PINK_CANCEL_KEY = "pink:cancel:"; + + /** + * 微信支付service + */ + String YSHOP_WEIXIN_PAY_SERVICE = "yshop_weixin_pay_service"; + + /** + * 微信支付小程序service + */ + String YSHOP_WEIXIN_MINI_PAY_SERVICE = "yshop_weixin_mini_pay_service"; + + /** + * 微信支付app service + */ + String YSHOP_WEIXIN_APP_PAY_SERVICE = "yshop_weixin_app_pay_service"; + + /** + * 微信公众号service + */ + String YSHOP_WEIXIN_MP_SERVICE = "yshop_weixin_mp_service"; + /** + * 微信小程序service + */ + String YSHOP_WEIXIN_MA_SERVICE = "yshop_weixin_ma_service"; + + /** + * 商城默认密码 + */ + String YSHOP_DEFAULT_PWD = "123456"; + + /** + * 商城默认注册图片 + */ + String YSHOP_DEFAULT_AVATAR = "https://image.dayouqiantu.cn/5e79f6cfd33b6.png"; + + /** + * 腾讯地图地址解析 + */ + String QQ_MAP_URL = "https://apis.map.qq.com/ws/geocoder/v1/"; + + /** + * redis首页键 + */ + String YSHOP_REDIS_INDEX_KEY = "yshop:index_data"; + + /** + * 配置列表缓存 + */ + String YSHOP_REDIS_CONFIG_DATAS = "yshop:config_datas"; + + /** + * 充值方案 + */ + String YSHOP_RECHARGE_PRICE_WAYS = "yshop_recharge_price_ways"; + /** + * 首页banner + */ + String YSHOP_HOME_BANNER = "yshop_home_banner"; + /** + * 首页菜单 + */ + String YSHOP_HOME_MENUS = "yshop_home_menus"; + /** + * 首页滚动新闻 + */ + String YSHOP_HOME_ROLL_NEWS = "yshop_home_roll_news"; + /** + * 热门搜索 + */ + String YSHOP_HOT_SEARCH = "yshop_hot_search"; + /** + * 个人中心菜单 + */ + String YSHOP_MY_MENUES = "yshop_my_menus"; + /** + * 秒杀时间段 + */ + String YSHOP_SECKILL_TIME = "yshop_seckill_time"; + /** + * 签到天数 + */ + String YSHOP_SIGN_DAY_NUM = "yshop_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"; + + /** + * 短信验证码长度 + */ + int YSHOP_SMS_SIZE = 6; + + /** + * 短信缓存时间 + */ + long YSHOP_SMS_REDIS_TIME = 600L; + + //零标识 + String YSHOP_ZERO = "0"; + + //业务标识标识 + String YSHOP_ONE = "1"; + + //目前完成任务数量是3 + int TASK_FINISH_COUNT = 3; + + int YSHOP_ONE_NUM = 1; + + String YSHOP_ORDER_CACHE_KEY = "yshop:order"; + + String YSHOP_ORDER_SALE_STATUS_KEY = "yshop:order:sale:status"; + + long YSHOP_ORDER_CACHE_TIME = 600L; + + String WECHAT_MENUS = "wechat_menus"; + + String YSHOP_EXPRESS_SERVICE = "yshop_express_service"; + + String YSHOP_REDIS_SYS_CITY_KEY = "yshop:city_list"; + + String YSHOP_REDIS_CITY_KEY = "yshop:city"; + + String YSHOP_APP_LOGIN_USER = "app-online-token:"; + + String YSHOP_WECHAT_PUSH_REMARK = "yshop为您服务!"; + + String DEFAULT_UNI_H5_URL = "https://h5.yixiang.co"; + + String YSHOP_MINI_SESSION_KET = "yshop:session_key:"; + + /**公众号二维码*/ + String WECHAT_FOLLOW_IMG="wechat_follow_img"; + /**后台api地址*/ + String ADMIN_API_URL="admin_api_url"; } diff --git a/yshop-common/src/main/java/co/yixiang/constant/SystemConfigConstants.java b/yshop-common/src/main/java/co/yixiang/constant/SystemConfigConstants.java index 31fb463a026a01c6f57aa6b1fe759db593c1fea9..be39605ef188806194ff5089b775bbc3317df3d8 100644 --- a/yshop-common/src/main/java/co/yixiang/constant/SystemConfigConstants.java +++ b/yshop-common/src/main/java/co/yixiang/constant/SystemConfigConstants.java @@ -2,48 +2,56 @@ package co.yixiang.constant; public class SystemConfigConstants { //地址配置 - public final static String API = "api"; - public final static String API_URL = "api_url"; - public final static String SITE_URL = "site_url"; - public final static String TENGXUN_MAP_KEY = "tengxun_map_key"; - + public final static String API="api"; + public final static String API_URL="api_url"; + public final static String SITE_URL="site_url"; + public final static String UNI_SITE_URL="uni_site_url"; + public final static String TENGXUN_MAP_KEY="tengxun_map_key"; + public final static String FILE_STORE_MODE="file_store_mode"; //业务相关配置 - public final static String IMAGEARR = "imageArr"; - public final static String INTERGRAL_FULL = "integral_full"; - public final static String INTERGRAL_MAX = "integral_max"; - public final static String INTERGRAL_RATIO = "integral_ratio"; - public final static String ORDER_CANCEL_JOB_TIME = "order_cancel_job_time"; - public final static String STORE_BROKERAGE_OPEN = "store_brokerage_open"; - public final static String STORE_BROKERAGE_RATIO = "store_brokerage_ratio"; - public final static String STORE_BROKERAGE_STATU = "store_brokerage_statu"; - public final static String STORE_BROKERAGE_TWO = "store_brokerage_two"; - public final static String STORE_FREE_POSTAGE = "store_free_postage"; - public final static String STORE_POSTAGE = "store_postage"; - public final static String STORE_SEFL_MENTION = "store_self_mention"; - public final static String STORE_USER_MIN_RECHARGE = "store_user_min_recharge"; - public final static String USER_EXTRACT_MIN_PRICE = "user_extract_min_price"; - + public final static String IMAGEARR="imageArr"; + public final static String INTERGRAL_FULL="integral_full"; + public final static String INTERGRAL_MAX="integral_max"; + public final static String INTERGRAL_RATIO="integral_ratio"; + public final static String ORDER_CANCEL_JOB_TIME="order_cancel_job_time"; + public final static String STORE_BROKERAGE_OPEN="store_brokerage_open"; + public final static String STORE_BROKERAGE_RATIO="store_brokerage_ratio"; + public final static String STORE_BROKERAGE_STATU="store_brokerage_statu"; + public final static String STORE_BROKERAGE_TWO="store_brokerage_two"; + public final static String STORE_FREE_POSTAGE="store_free_postage"; + public final static String STORE_POSTAGE="store_postage"; + public final static String STORE_SEFL_MENTION="store_self_mention"; + public final static String STORE_USER_MIN_RECHARGE="store_user_min_recharge"; + public final static String USER_EXTRACT_MIN_PRICE="user_extract_min_price"; + public final static String YSHOP_SHOW_RECHARGE = "yshop_show_recharge"; //微信相关配置 - public final static String WECHAT_APPID = "wechat_appid"; - public final static String WECHAT_APPSECRET = "wechat_appsecret"; - public final static String WECHAT_AVATAR = "wechat_avatar"; - public final static String WECHAT_ENCODE = "wechat_encode"; - public final static String WECHAT_ENCODINGAESKEY = "wechat_encodingaeskey"; - public final static String WECHAT_ID = "wechat_id"; - public final static String WECHAT_NAME = "wechat_name"; - public final static String WECHAT_QRCODE = "wechat_qrcode"; - public final static String WECHAT_SHARE_IMG = "wechat_share_img"; - public final static String WECHAT_SHARE_SYNOPSIS = "wechat_share_synopsis"; - public final static String WECHAT_SHARE_TITLE = "wechat_share_title"; - public final static String WECHAT_SOURCEID = "wechat_sourceid"; - public final static String WECHAT_TOKEN = "wechat_token"; - public final static String WECHAT_TYPE = "wechat_type"; - public final static String WXAPP_APPID = "wxapp_appId"; - public final static String WXAPP_SECRET = "wxapp_secret"; - public final static String WXPAY_APPID = "wxpay_appId"; - public final static String WXPAY_KEYPATH = "wxpay_keyPath"; - public final static String WXPAY_MCHID = "wxpay_mchId"; - public final static String WXPAY_MCHKEY = "wxpay_mchKey"; - public final static String WX_NATIVE_APP_APPID = "wx_native_app_appId"; + public final static String WECHAT_APPID="wechat_appid"; + public final static String WECHAT_APPSECRET="wechat_appsecret"; + public final static String WECHAT_AVATAR="wechat_avatar"; + public final static String WECHAT_ENCODE="wechat_encode"; + public final static String WECHAT_ENCODINGAESKEY="wechat_encodingaeskey"; + public final static String WECHAT_ID="wechat_id"; + public final static String WECHAT_NAME="wechat_name"; + public final static String WECHAT_QRCODE="wechat_qrcode"; + public final static String WECHAT_SHARE_IMG="wechat_share_img"; + public final static String WECHAT_SHARE_SYNOPSIS="wechat_share_synopsis"; + public final static String WECHAT_SHARE_TITLE="wechat_share_title"; + public final static String WECHAT_SOURCEID="wechat_sourceid"; + public final static String WECHAT_TOKEN="wechat_token"; + public final static String WECHAT_MA_TOKEN="wechat_ma_token"; + public final static String WECHAT_MA_ENCODINGAESKEY="wechat_ma_encodingaeskey"; + public final static String WECHAT_TYPE="wechat_type"; + public final static String WXAPP_APPID="wxapp_appId"; + public final static String WXAPP_SECRET="wxapp_secret"; + public final static String WXPAY_APPID="wxpay_appId"; + public final static String WXPAY_KEYPATH="wxpay_keyPath"; + public final static String WXPAY_MCHID="wxpay_mchId"; + public final static String WXPAY_MCHKEY="wxpay_mchKey"; + public final static String WX_NATIVE_APP_APPID="wx_native_app_appId"; + public final static String EXP_APPID = "exp_appId"; + + + //播放状态变化事件,detail = {code} + public static final String BINDSTATECHANGE = "bindstatechange"; } diff --git a/yshop-common/src/main/java/co/yixiang/domain/BaseDomain.java b/yshop-common/src/main/java/co/yixiang/domain/BaseDomain.java index 1daa0e8c0e5a4b651554fbbe32437fe0fcaf523e..fec8aec3691376ea4dd14b1f6c12de7a88877be3 100644 --- a/yshop-common/src/main/java/co/yixiang/domain/BaseDomain.java +++ b/yshop-common/src/main/java/co/yixiang/domain/BaseDomain.java @@ -1,38 +1,39 @@ -package co.yixiang.domain; - -import com.baomidou.mybatisplus.annotation.FieldFill; -import com.baomidou.mybatisplus.annotation.TableField; -import com.baomidou.mybatisplus.annotation.TableLogic; -import com.fasterxml.jackson.annotation.JsonFormat; -import com.fasterxml.jackson.annotation.JsonIgnore; -import lombok.Getter; -import lombok.Setter; - -import java.io.Serializable; -import java.util.Date; - - -/** - * @ClassName 公共模型 - * @Author hupeng <610796224@qq.com> - * @Date 2020/10/09 - **/ -@Getter -@Setter -public class BaseDomain implements Serializable { - - private static final long serialVersionUID = 1L; - - - @TableField(fill = FieldFill.INSERT) - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date createTime; - - @TableField(fill = FieldFill.UPDATE) - @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss", timezone = "GMT+8") - private Date updateTime; - - @TableLogic - @JsonIgnore - private Integer isDel; -} +package co.yixiang.domain; + +import com.baomidou.mybatisplus.annotation.FieldFill; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableLogic; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Getter; +import lombok.Setter; + +import java.io.Serializable; +import java.util.Date; + + +/** + * @ClassName 公共模型 + * @Author hupeng <610796224@qq.com> + * @Date 2020/6/13 + **/ +@Getter +@Setter +public class BaseDomain implements Serializable { + + private static final long serialVersionUID = 1L; + + + @TableField(fill= FieldFill.INSERT) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date createTime; + + @TableField(fill= FieldFill.UPDATE) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date updateTime; + + @TableLogic + @JsonIgnore + @TableField(fill= FieldFill.INSERT) + private Integer isDel; +} diff --git a/yshop-common/src/main/java/co/yixiang/domain/PageResult.java b/yshop-common/src/main/java/co/yixiang/domain/PageResult.java new file mode 100644 index 0000000000000000000000000000000000000000..4e36c7ac9f7850f3a89d4de820cc858b87dc344f --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/domain/PageResult.java @@ -0,0 +1,37 @@ +package co.yixiang.domain; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; +import lombok.experimental.Accessors; + +import java.io.Serializable; +import java.util.List; + +/** + * @author :LionCity + * @date :Created in 2020-08-04 16:55 + * @description:分页参数返回 + * @modified By: + * @version: V1.0 + */ +@Data +@Accessors(chain = true) +@Builder +public class PageResult implements Serializable { + + + @ApiModelProperty("总数量") + private long totalElements; + + @ApiModelProperty("内容") + private List content; + + public PageResult(long totalElements, List content) { + this.totalElements = totalElements; + this.content = content; + } + + public PageResult() { + } +} 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 index 9ab1d503120ed76709d941b2273f2949aba0c586..7d017dea71da2a11933658e03a20823f568f1cb8 100644 --- a/yshop-common/src/main/java/co/yixiang/dozer/config/DozerMapperConfig.java +++ b/yshop-common/src/main/java/co/yixiang/dozer/config/DozerMapperConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.dozer.config; @@ -19,10 +18,10 @@ import org.springframework.core.io.Resource; * @modified By: * @version: 1.0 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class DozerMapperConfig { @Bean - public DozerBeanMapperFactoryBean dozerBeanMapperFactoryBean(@Value("classpath*:dozer/*.xml") Resource[] resources) throws Exception { + public DozerBeanMapperFactoryBean dozerBeanMapperFactoryBean(@Value("classpath*:dozer/*.xml" ) Resource[] resources) throws Exception { final DozerBeanMapperFactoryBean dozerBeanMapperFactoryBean = new DozerBeanMapperFactoryBean(); dozerBeanMapperFactoryBean.setMappingFiles(resources); return dozerBeanMapperFactoryBean; 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 index 4f185fa6250790943dd5cb9cd29571af73e804ea..07ed87824d9c3e1e7059682aaf12065597ebc9f4 100644 --- a/yshop-common/src/main/java/co/yixiang/dozer/service/EJBGenerator.java +++ b/yshop-common/src/main/java/co/yixiang/dozer/service/EJBGenerator.java @@ -1,12 +1,13 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.dozer.service; import co.yixiang.common.web.vo.Paging; +import co.yixiang.domain.PageResult; +import com.github.pagehelper.PageInfo; import org.dozer.Mapper; import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Lazy; @@ -25,7 +26,7 @@ import java.util.stream.Collectors; * @version: 1.0 */ @Component -@Lazy(true) +@Lazy() public class EJBGenerator implements IGenerator { @Autowired @@ -43,8 +44,8 @@ public class EJBGenerator implements IGenerator { @Override public Paging convertPaging(Paging paging, Class clz) { - Paging pagingVo = new Paging(); - pagingVo.setRecords(convert(paging.getRecords(), clz)); + Paging pagingVo=new Paging(); + pagingVo.setRecords(convert(paging.getRecords(),clz)); pagingVo.setTotal(paging.getTotal()); return pagingVo; } @@ -66,4 +67,9 @@ public class EJBGenerator implements IGenerator { } return arr; } + + @Override + public PageResult convertPageInfo(PageInfo s, Class clz) { + return new PageResult(s.getTotal(), convert(s.getList(), clz)); + } } 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 index cc004f3e583507cb4033d9bf7b725cddc91201f3..ca2639f3fc670b5f472b48dd3e75903477035e77 100644 --- a/yshop-common/src/main/java/co/yixiang/dozer/service/IGenerator.java +++ b/yshop-common/src/main/java/co/yixiang/dozer/service/IGenerator.java @@ -1,12 +1,13 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.dozer.service; import co.yixiang.common.web.vo.Paging; +import co.yixiang.domain.PageResult; +import com.github.pagehelper.PageInfo; import java.util.List; import java.util.Set; @@ -62,7 +63,6 @@ public interface IGenerator { * @return */ Paging convertPaging(Paging s, Class clz); - /** * @param s 数据对象 * @param clz 复制目标类型 @@ -82,4 +82,10 @@ public interface IGenerator { * @Time 2018年5月9日 下午3:54:57 */ T[] convert(S[] s, Class clz); + + /** + * 分页信息转换 + * @return {@link PageResult} + */ + PageResult convertPageInfo(PageInfo s, Class clz); } diff --git a/yshop-common/src/main/java/co/yixiang/enums/AfterSalesStatusEnum.java b/yshop-common/src/main/java/co/yixiang/enums/AfterSalesStatusEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..5ff32dfde719eef7719a3c45b3be4977f2cec6e8 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/enums/AfterSalesStatusEnum.java @@ -0,0 +1,39 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.stream.Stream; + +/** + * 售后状态枚举 + * + * @author hupeng + * @date 2021/12/21 + */ +@Getter +@AllArgsConstructor +public enum AfterSalesStatusEnum { + + STATUS_0(0,"已提交等待平台审核"), + STATUS_1(1,"平台已审核,等待用户发货/退款"), + STATUS_2(2,"用户已发货"), + STATUS_3(3,"已完成"); + + private Integer value; + private String desc; + + public static AfterSalesStatusEnum toType(int value) { + return Stream.of(AfterSalesStatusEnum.values()) + .filter(p -> p.value == value) + .findAny() + .orElse(null); + } + + +} 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 856c90950ad3cd9a3c6f7a38e2a9a856472a7c5e..46b5165debfee636f0f4c4ebff472137f48bb3ac 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/AppFromEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/AppFromEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -17,15 +16,17 @@ import lombok.Getter; @AllArgsConstructor public enum AppFromEnum { - WEIXIN_H5("weixinh5", "weixinh5"), - H5("h5", "H5"), - WECHAT("wechat", "公众号"), - APP("app", "APP"), - ROUNTINE("routine", "小程序"); + WEIXIN_H5("weixinh5","weixinh5"), + H5("h5","H5"), + WECHAT("wechat","公众号"), + APP("app","APP"), + PC("pc","PC"), + ROUNTINE("routine","小程序"), + UNIAPPH5("uniappH5","uniappH5"); - private String value; - private String desc; + private String value; + private String desc; } 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 2dfc437e4a2e6e9a79633a0b80f1618eeed55b9e..d4521f2add962f33045efb9efe9d44116cd47554 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/BillDetailEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/BillDetailEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -17,21 +16,25 @@ import lombok.Getter; @AllArgsConstructor public enum BillDetailEnum { - TYPE_1("recharge", "充值"), - TYPE_2("brokerage", "返佣"), - TYPE_3("pay_product", "消费"), - TYPE_4("extract", "提现"), - TYPE_5("pay_product_refund", "退款"), - TYPE_6("system_add", "系统添加"), - TYPE_7("system_sub", "系统减少"), + TYPE_1("recharge","充值"), + TYPE_2("brokerage","返佣"), + TYPE_3("pay_product","消费"), + TYPE_4("extract","提现"), + TYPE_5("pay_product_refund","退款"), + TYPE_6("system_add","系统添加"), + TYPE_7("system_sub","系统减少"), + TYPE_8("deduction","减去"), + TYPE_9("gain","奖励"), + TYPE_10("sign","签到"), + + CATEGORY_1("now_money","金额"), + CATEGORY_2("integral","积分"); - CATEGORY_1("now_money", "金额"), - CATEGORY_2("integral", "积分"); - private String value; - private String desc; + private String value; + private String desc; } 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 d70a558ca7438ab8ba30572285ffc5cf5ede8546..007a4fc994b88633af67dcd413a37cff927c89db 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/BillEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/BillEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -19,23 +18,27 @@ import java.util.stream.Stream; @AllArgsConstructor public enum BillEnum { - PM_0(0, "支出"), - PM_1(1, "获得"), + PM_0(0,"支出"), + PM_1(1,"获得"), + + STATUS_0(0,"默认"), + STATUS_1(1,"有效"), + STATUS_2(2,"无效"); + + + - STATUS_0(0, "默认"), - STATUS_1(1, "有效"), - STATUS_2(2, "无效"); + private Integer value; + private String desc; - private Integer value; - private String desc; + public static BillEnum toType(int value) { + return Stream.of(BillEnum.values()) + .filter(p -> p.value == value) + .findAny() + .orElse(null); + } - public static BillEnum toType(int value) { - return Stream.of(BillEnum.values()) - .filter(p -> p.value == value) - .findAny() - .orElse(null); - } } 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 76fe6c4b177109df5a5335087734700cfb4638a1..a34af24a792ac521cb0963be5960a12c498054a7 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/BillInfoEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/BillInfoEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -19,26 +18,28 @@ import java.util.stream.Stream; @AllArgsConstructor public enum BillInfoEnum { - DEAFUL_ALL(0, "所有"), - PAY_PRODUCT(1, "消费"), - RECHAREGE(2, "充值"), - BROKERAGE(3, "返佣"), - EXTRACT(4, "提现"), - SIGN_INTEGRAL(5, "签到积分"), - PAY_PRODUCT_REFUND(6, "退款"), - SYSTEM_ADD(7, "系统添加"), - SYSTEM_SUB(8, "系统减少"); - - - private Integer value; - private String desc; - - public static BillInfoEnum toType(int value) { - return Stream.of(BillInfoEnum.values()) - .filter(p -> p.value == value) - .findAny() - .orElse(null); - } + DEAFUL_ALL(0,"所有"), + PAY_PRODUCT(1,"消费"), + RECHAREGE(2,"充值"), + BROKERAGE(3,"返佣"), + EXTRACT(4,"提现"), + SIGN_INTEGRAL(5,"签到积分"), + PAY_PRODUCT_REFUND(6,"退款"), + SYSTEM_ADD(7,"系统添加"), + SYSTEM_SUB(8,"系统减少"); + + + + private Integer value; + private String desc; + + public static BillInfoEnum toType(int value) { + return Stream.of(BillInfoEnum.values()) + .filter(p -> p.value == value) + .findAny() + .orElse(null); + } + } diff --git a/yshop-common/src/main/java/co/yixiang/enums/YesNoEnum.java b/yshop-common/src/main/java/co/yixiang/enums/Brokerage.java similarity index 32% rename from yshop-common/src/main/java/co/yixiang/enums/YesNoEnum.java rename to yshop-common/src/main/java/co/yixiang/enums/Brokerage.java index d3f4abccdcfdf1d246838717fcaf733eae605bf4..47f36d6bf16985989a10ff4d24364b55cd297af4 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/YesNoEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/Brokerage.java @@ -1,29 +1,20 @@ -package co.yixiang.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -import java.util.stream.Stream; - -/** - * 是没有枚举 - * - * @author yshop - * @date 2022-03-26 16:59:15 - */ -@Getter -@AllArgsConstructor -public enum YesNoEnum { - YES_NO_1(1,"是"), - YES_NO_0(0,"否"); - - private Integer value; - private String desc; - - public static YesNoEnum toType(Integer value) { - return Stream.of(YesNoEnum.values()) - .filter(p -> p.value.equals(value)) - .findAny() - .orElse(YES_NO_0); - } -} +package co.yixiang.enums; + + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author hupeng + * 分销级别 + */ +@Getter +@AllArgsConstructor +public enum Brokerage { + + LEVEL_1(1,"一级"), + LEVEL_2(2,"二级"); + + private Integer value; + private String desc; +} diff --git a/yshop-common/src/main/java/co/yixiang/enums/CartTypeEnum.java b/yshop-common/src/main/java/co/yixiang/enums/CartTypeEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..d2df37d98968ed70df829fcf2bc4be47daf4faf1 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/enums/CartTypeEnum.java @@ -0,0 +1,18 @@ +package co.yixiang.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author hupeng + * 优惠券类型枚举 + */ +@Getter +@AllArgsConstructor +public enum CartTypeEnum { + NEW_0(0,"加入购物车"), + NEW_1(1,"加入购物车直接购买"); + + private Integer value; + private String desc; +} 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 e09af426afb81fc32a593c6587cb7fe003cf2773..23c2de5d29737f3bd39946358dc025b5b026d74e 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/CommonEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/CommonEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -17,15 +16,15 @@ import lombok.Getter; @AllArgsConstructor public enum CommonEnum { - DEL_STATUS_0(0, "未删除"), - DEL_STATUS_1(1, "已删除"), + DEL_STATUS_0(0,"未删除"), + DEL_STATUS_1(1,"已删除"), - SHOW_STATUS_0(0, "未显示"), - SHOW_STATUS_1(1, "显示"); + SHOW_STATUS_0(0,"未显示"), + SHOW_STATUS_1(1,"显示"); - private Integer value; - private String desc; + private Integer value; + private String desc; } 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 3e242220b22a447ec0d09797ea3fb54202c93796..35f2e06ed15b70f63146c68c1f4840fe9a3ddeb6 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/CouponEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/CouponEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -19,20 +18,35 @@ import java.util.stream.Stream; @AllArgsConstructor public enum CouponEnum { - TYPE_0(0, "全部"), - TYPE_1(1, "未使用"), - TYPE_2(2, "已使用"); + FALI_0(0,"有效"), + FALI_1(1,"无效"), + + USE_0(0,"不可用"), + USE_1(1,"可用"), + + STATUS_0(0,"未使用"), + STATUS_1(1,"已使用"), + STATUS_2(2,"已过期"), + + TYPE_0(0,"通用券"), + TYPE_1(1,"商品券"), + TYPE_2(2,"内部券"), + + PERMANENT_0(0,"限量"), + PERMANENT_1(1,"不限量"); + + - private Integer value; - private String desc; + private Integer value; + private String desc; - public static CouponEnum toType(int value) { - return Stream.of(CouponEnum.values()) - .filter(p -> p.value == value) - .findAny() - .orElse(null); - } + public static CouponEnum toType(int value) { + return Stream.of(CouponEnum.values()) + .filter(p -> p.value == value) + .findAny() + .orElse(null); + } } diff --git a/yshop-common/src/main/java/co/yixiang/enums/CouponGetEnum.java b/yshop-common/src/main/java/co/yixiang/enums/CouponGetEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..50fc1b77e4921bc2ad407aba41e86d27f1d31509 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/enums/CouponGetEnum.java @@ -0,0 +1,18 @@ +package co.yixiang.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author hupeng + * 优惠券获取类型枚举 + */ +@Getter +@AllArgsConstructor +public enum CouponGetEnum { + GET("get","领取"), + SEND("send","派送"); + + private String value; + private String desc; +} diff --git a/yshop-common/src/main/java/co/yixiang/enums/DataSourceType.java b/yshop-common/src/main/java/co/yixiang/enums/DataSourceType.java new file mode 100644 index 0000000000000000000000000000000000000000..fcce06bc1cb485dbc45dae8516c3247dd956811f --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/enums/DataSourceType.java @@ -0,0 +1,18 @@ +package co.yixiang.enums; + +/** + * 数据源 + * @author hupeng + */ +public enum DataSourceType +{ + /** + * 主库 + */ + MASTER, + + /** + * 从库 + */ + SLAVE +} diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictSmallDto.java b/yshop-common/src/main/java/co/yixiang/enums/LiveGoodsEnum.java similarity index 32% rename from yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictSmallDto.java rename to yshop-common/src/main/java/co/yixiang/enums/LiveGoodsEnum.java index 340a83ad29ead205dacb8b7c92a2f1ed0a7156da..d4973a80e3601d47f9da7045cef1106ce6393310 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictSmallDto.java +++ b/yshop-common/src/main/java/co/yixiang/enums/LiveGoodsEnum.java @@ -1,23 +1,27 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.system.service.dto; +package co.yixiang.enums; +import lombok.AllArgsConstructor; import lombok.Getter; -import lombok.Setter; - -import java.io.Serializable; /** * @author hupeng - * @date 2019-04-10 + * 直播商品相关枚举 */ @Getter -@Setter -public class DictSmallDto implements Serializable { +@AllArgsConstructor +public enum LiveGoodsEnum { + + IS_Audit_0(0,"未审核"), + IS_Audit_1(1,"审核中"), + IS_Audit_2(2,"审核通过"), + IS_Audit_3(3,"审核失败"); + + private Integer value; + private String desc; - private Long id; } 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 2c2def2294951ed83aa70def2bd154064f3c9e94..085999e030958d81244e44dfd35e034f39041108 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/OrderCountEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/OrderCountEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -19,21 +18,22 @@ import java.util.stream.Stream; @AllArgsConstructor public enum OrderCountEnum { - TODAY(1, "今天"), - YESTERDAY(2, "昨天"), - WEEK(3, "上周"), - MONTH(4, "本月"); + TODAY(1,"今天"), + YESTERDAY(2,"昨天"), + WEEK(3,"上周"), + MONTH(4,"本月"); + - private Integer value; - private String desc; + private Integer value; + private String desc; - public static OrderCountEnum toType(int value) { - return Stream.of(OrderCountEnum.values()) - .filter(p -> p.value == value) - .findAny() - .orElse(null); - } + public static OrderCountEnum toType(int value) { + return Stream.of(OrderCountEnum.values()) + .filter(p -> p.value == value) + .findAny() + .orElse(null); + } } 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 f9da94d7ed1598fdec798798cfb2f1c7cae28b1c..d9d4e58665b1f1ea1c726a83cae2639d142d6887 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/OrderInfoEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/OrderInfoEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -19,49 +18,55 @@ import java.util.stream.Stream; @AllArgsConstructor public enum OrderInfoEnum { - STATUS_0(0, "默认"), - STATUS_1(1, "待收货"), - STATUS_2(2, "已收货"), - STATUS_3(3, "已完成"), + STATUS_NE1(-1,"申请退款"), + STATUS_NE2(-2,"退款成功"), + STATUS_0(0,"默认"), + STATUS_1(1,"待收货"), + STATUS_2(2,"已收货"), + STATUS_3(3,"已完成"), + + PAY_STATUS_0(0,"未支付"), + PAY_STATUS_1(1,"已支付"), + + REFUND_STATUS_0(0,"正常"), + REFUND_STATUS_1(1,"退款中"), + REFUND_STATUS_2(2,"已退款"), - PAY_STATUS_0(0, "未支付"), - PAY_STATUS_1(1, "已支付"), + BARGAIN_STATUS_1(1,"参与中"), + BARGAIN_STATUS_2(2,"参与失败"), + BARGAIN_STATUS_3(3,"参与成功"), - REFUND_STATUS_0(0, "正常"), - REFUND_STATUS_1(1, "退款中"), - REFUND_STATUS_2(2, "已退款"), + PINK_STATUS_1(1,"进行中"), + PINK_STATUS_2(2,"已完成"), + PINK_STATUS_3(3,"未完成"), - BARGAIN_STATUS_1(1, "参与中"), - BARGAIN_STATUS_2(2, "参与失败"), - BARGAIN_STATUS_3(3, "参与成功"), + PINK_REFUND_STATUS_0(0,"拼团正常"), + PINK_REFUND_STATUS_1(1,"拼团已退款"), - PINK_STATUS_1(1, "进行中"), - PINK_STATUS_2(2, "已完成"), - PINK_STATUS_3(3, "未完成"), + CANCEL_STATUS_0(0,"正常"), + CANCEL_STATUS_1(1,"已取消"), - CANCEL_STATUS_0(0, "正常"), - CANCEL_STATUS_1(1, "已取消"), + CONFIRM_STATUS_0(0,"正常"), + CONFIRM_STATUS_1(1,"确认"), - CONFIRM_STATUS_0(0, "正常"), - CONFIRM_STATUS_1(1, "确认"), + PAY_CHANNEL_0(0,"公众号/H5支付渠道"), + PAY_CHANNEL_1(1,"小程序支付渠道"), - PAY_CHANNEL_0(0, "公众号/H5支付渠道"), - PAY_CHANNEL_1(1, "小程序支付渠道"), + SHIPPIING_TYPE_1(1,"快递"), + SHIPPIING_TYPE_2(2,"门店自提"); - SHIPPIING_TYPE_1(1, "快递"), - SHIPPIING_TYPE_2(2, "门店自提"); - private Integer value; - private String desc; + private Integer value; + private String desc; - public static OrderInfoEnum toType(int value) { - return Stream.of(OrderInfoEnum.values()) - .filter(p -> p.value == value) - .findAny() - .orElse(null); - } + public static OrderInfoEnum toType(int value) { + return Stream.of(OrderInfoEnum.values()) + .filter(p -> p.value == value) + .findAny() + .orElse(null); + } } 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 d2c2c4642b910665fcbaa3d650d347fc775c7e2a..6fc04fd99525bf50d1a3b81e686bbc0ab7520ed7 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/OrderStatusEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/OrderStatusEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -19,26 +18,27 @@ import java.util.stream.Stream; @AllArgsConstructor public enum OrderStatusEnum { - STATUS_0(0, "未支付"), - STATUS_1(1, "待发货"), - STATUS_2(2, "待收货"), - STATUS_3(3, "待评价"), - STATUS_4(4, "已完成"), - STATUS_MINUS_1(-1, "退款中"), - STATUS_MINUS_2(-2, "已退款"), - STATUS_MINUS_3(-3, "退款"), - STATUS_MINUS_4(-4, "已删除"); - - - private Integer value; - private String desc; - - public static OrderStatusEnum toType(int value) { - return Stream.of(OrderStatusEnum.values()) - .filter(p -> p.value == value) - .findAny() - .orElse(null); - } + STATUS__1(-1,"全部订单"), + STATUS_0(0,"未支付"), + STATUS_1(1,"待发货"), + STATUS_2(2,"待收货"), + STATUS_3(3,"待评价"), + STATUS_4(4,"已完成"), + STATUS_MINUS_1(-1,"退款中"), + STATUS_MINUS_2(-2,"已退款"), + STATUS_MINUS_3(-3,"退款"); + + + + private Integer value; + private String desc; + + public static OrderStatusEnum toType(int value) { + return Stream.of(OrderStatusEnum.values()) + .filter(p -> p.value == value) + .findAny() + .orElse(null); + } } diff --git a/yshop-common/src/main/java/co/yixiang/enums/PayMethodEnum.java b/yshop-common/src/main/java/co/yixiang/enums/PayMethodEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..4ab54d24e47ecba640976cd835fd4efa2559d6e3 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/enums/PayMethodEnum.java @@ -0,0 +1,37 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.stream.Stream; + +/** + * @author hupeng + * 支付相关枚举 + */ +@Getter +@AllArgsConstructor +public enum PayMethodEnum { + + WECHAT("wechat","公众号支付"), + WXAPP("wxapp","小程序支付"), + APP("app","app支付"); + + + private String value; + private String desc; + + public static PayMethodEnum toType(String value) { + return Stream.of(PayMethodEnum.values()) + .filter(p -> p.value.equals(value)) + .findAny() + .orElse(null); + } + + +} 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 22c4d4b67e1751096072448ee10a3d749937a81c..046117dfe820e2cdee413a88169d664dcc4a5833 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/PayTypeEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/PayTypeEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -19,19 +18,21 @@ import java.util.stream.Stream; @AllArgsConstructor public enum PayTypeEnum { - WEIXIN("weixin", "微信支付"), - YUE("yue", "余额支付"); + ALI("alipay","支付宝支付"), + WEIXIN("weixin","微信支付"), + YUE("yue","余额支付"), + INTEGRAL("integral","积分兑换"); - private String value; - private String desc; + private String value; + private String desc; - public static PayTypeEnum toType(String value) { - return Stream.of(PayTypeEnum.values()) - .filter(p -> p.value.equals(value)) - .findAny() - .orElse(null); - } + public static PayTypeEnum toType(String value) { + return Stream.of(PayTypeEnum.values()) + .filter(p -> p.value.equals(value)) + .findAny() + .orElse(null); + } } diff --git a/yshop-common/src/main/java/co/yixiang/enums/PinkEnum.java b/yshop-common/src/main/java/co/yixiang/enums/PinkEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..78d1ed8fea317ab13770669bcf7a8416e8fbf3f5 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/enums/PinkEnum.java @@ -0,0 +1,35 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author hupeng + * 拼团相关枚举 + */ +@Getter +@AllArgsConstructor +public enum PinkEnum { + + IS_OK_0(0,"未完成"), + IS_OK_1(1,"已完成"), + + PINK_BOOL_0(0,"未成功,进行中"), + PINK_BOOL_1(1,"已成功"), + PINK_BOOL_MINUS_1(-1,"拼团失败"), + + USER_BOOL_0(0,"不在团内"), + USER_BOOL_1(1,"在团内"); + + private Integer value; + private String desc; + + + + +} 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 080e40ee9d37ab2f122376800c1c8ad69201d79d..010804b0b65e5478cad6e8e762b3b45e27e4d169 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/ProductEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/ProductEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -19,21 +18,21 @@ import java.util.stream.Stream; @AllArgsConstructor public enum ProductEnum { - TYPE_1(1, "精品推荐"), - TYPE_2(2, "热门榜单"), - TYPE_3(3, "首发新品"), - TYPE_4(4, "促销单品"); + TYPE_1(1,"精品推荐"), + TYPE_2(2,"热门榜单"), + TYPE_3(3,"首发新品"), + TYPE_4(4,"猜你喜欢"); - private Integer value; - private String desc; + private Integer value; + private String desc; - public static ProductEnum toType(int value) { - return Stream.of(ProductEnum.values()) - .filter(p -> p.value == value) - .findAny() - .orElse(null); - } + public static ProductEnum toType(int value) { + return Stream.of(ProductEnum.values()) + .filter(p -> p.value == value) + .findAny() + .orElse(null); + } } diff --git a/yshop-common/src/main/java/co/yixiang/enums/ProductTypeEnum.java b/yshop-common/src/main/java/co/yixiang/enums/ProductTypeEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..4cb5aa91c771828738bd5d2bd8d5199cd8b6fe1b --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/enums/ProductTypeEnum.java @@ -0,0 +1,25 @@ +package co.yixiang.enums; + + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author hupeng + * 产品类型枚举 + */ + +@Getter +@AllArgsConstructor +public enum ProductTypeEnum { + PRODUCT("product","普通商品"), + + PINK("pink","拼团"), + + SECKILL("seckill","秒杀"), + + COMBINATION("combination","拼团产品"); + + private String value; + private String desc; +} 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 1056fdd8f8f9eea6030d607855b4274696395f23..bc3caa7e980ff1d399692c3392b0b368b02007cd 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/RedisKeyEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/RedisKeyEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.enums; @@ -14,19 +13,19 @@ import lombok.Getter; */ @Getter @AllArgsConstructor -public enum RedisKeyEnum { +public enum RedisKeyEnum { - WXAPP_APPID("wxapp_appId", "微信小程序id"), - WXAPP_SECRET("wxapp_secret", "微信小程序秘钥"), - WX_NATIVE_APP_APPID("wx_native_app_appId", "支付appId"), - WXPAY_MCHID("wxpay_mchId", "商户号"), - WXPAY_MCHKEY("wxpay_mchKey", "商户秘钥"), - WXPAY_KEYPATH("wxpay_keyPath", "商户证书路径"), - WECHAT_APPID("wechat_appid", "微信公众号id"), - WECHAT_APPSECRET("wechat_appsecret", "微信公众号secret"), - WECHAT_TOKEN("wechat_token", "微信公众号验证token"), - WECHAT_ENCODINGAESKEY("wechat_encodingaeskey", "EncodingAESKey"), - TENGXUN_MAP_KEY("tengxun_map_key", "腾讯mapkey"); + WXAPP_APPID("wxapp_appId","微信小程序id"), + WXAPP_SECRET("wxapp_secret","微信小程序秘钥"), + WX_NATIVE_APP_APPID("wx_native_app_appId","支付appId"), + WXPAY_MCHID("wxpay_mchId","商户号"), + WXPAY_MCHKEY("wxpay_mchKey","商户秘钥"), + WXPAY_KEYPATH("wxpay_keyPath","商户证书路径"), + WECHAT_APPID("wechat_appid","微信公众号id"), + WECHAT_APPSECRET("wechat_appsecret","微信公众号secret"), + WECHAT_TOKEN("wechat_token","微信公众号验证token"), + WECHAT_ENCODINGAESKEY("wechat_encodingaeskey","EncodingAESKey"), + TENGXUN_MAP_KEY("tengxun_map_key","腾讯mapkey"); private String value; private String desc; diff --git a/yshop-common/src/main/java/co/yixiang/enums/ShipperCodeEnum.java b/yshop-common/src/main/java/co/yixiang/enums/ShipperCodeEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..3ad3631f142aeb2c01c04fe6b792b6de55e38881 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/enums/ShipperCodeEnum.java @@ -0,0 +1,18 @@ +package co.yixiang.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author hupeng + * 快递公司编码相关枚举 + */ +@Getter +@AllArgsConstructor +public enum ShipperCodeEnum { + + SF("SF","顺丰速运"); + + private String value; + private String desc; +} diff --git a/yshop-common/src/main/java/co/yixiang/enums/LogTypeEnum.java b/yshop-common/src/main/java/co/yixiang/enums/ShippingTempEnum.java similarity index 31% rename from yshop-common/src/main/java/co/yixiang/enums/LogTypeEnum.java rename to yshop-common/src/main/java/co/yixiang/enums/ShippingTempEnum.java index e0be9d1d47a7cb098231511fcadbd6ae28b7b451..2a5765f28d28cdd05cf393d801bdbd1b51a64ddf 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/LogTypeEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/ShippingTempEnum.java @@ -1,29 +1,20 @@ -package co.yixiang.enums; - -import lombok.AllArgsConstructor; -import lombok.Getter; - -import java.util.stream.Stream; - -/** - * 日志类型枚举 - * - * @author yshop - * @date 2022-03-26 16:59:15 - */ -@Getter -@AllArgsConstructor -public enum LogTypeEnum { - INFO(1,"INFO"), - ERROR(0,"ERROR"); - - private Integer value; - private String desc; - - public static LogTypeEnum toType(Integer value) { - return Stream.of(LogTypeEnum.values()) - .filter(p -> p.value.equals(value)) - .findAny() - .orElse(null); - } -} +package co.yixiang.enums; + + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author hupeng + * 运费模板类型枚举 + */ +@Getter +@AllArgsConstructor +public enum ShippingTempEnum { + TYPE_1(1,"按件数"), + TYPE_2(2,"按重量"), + TYPE_3(3,"按体积"); + + private Integer value; + private String desc; +} diff --git a/yshop-common/src/main/java/co/yixiang/enums/ShopCommonEnum.java b/yshop-common/src/main/java/co/yixiang/enums/ShopCommonEnum.java index fd75dfd002091c25b7f4d6f4c362ac00c80f7873..d927e35a285d815e185a9845a8d3e2e6cdce08a2 100644 --- a/yshop-common/src/main/java/co/yixiang/enums/ShopCommonEnum.java +++ b/yshop-common/src/main/java/co/yixiang/enums/ShopCommonEnum.java @@ -1,74 +1,73 @@ -package co.yixiang.enums; - - -import lombok.AllArgsConstructor; -import lombok.Getter; - -/** - * @author hupeng - * 商城常用枚举 - */ -@Getter -@AllArgsConstructor -public enum ShopCommonEnum { - - STORE_MODE_1(1,"本地存储"), - STORE_MODE_2(2,"云存储"), - - ENABLE_1(1,"开启"), - ENABLE_2(2,"关闭"), - - EXTRACT_MINUS_1(-1,"提现未通过"), - EXTRACT_0(0,"提现审核中"), - EXTRACT_1(1,"提现已完成"), - - IS_FINISH_0(0,"未完成"), - IS_FINISH_1(1,"已完成"), - - IS_FOREVER_0(0,"不是永久"), - IS_FOREVER_1(1,"永久"), - - AGREE_1(1,"同意"), - AGREE_2(2,"拒绝"), - - IS_PERMANENT_0(0,"限制"), - IS_PERMANENT_1(1,"不限制"), - - IS_STATUS_0(0,"否"), - IS_STATUS_1(1,"是"), - - - IS_PROMOTER_0(0,"默认"), - IS_PROMOTER_1(1,"是客服"), - - IS_NEW_0(0,"默认"), - IS_NEW_1(1,"新品"), - - IS_SUB_0(0,"不单独分佣"), - IS_SUB_1(1,"单独分佣"), - - - GRADE_0(0,"一级推荐人"), - GRADE_1(1,"二级推荐人"), - - REPLY_0(0,"未回复"), - REPLY_1(1,"已回复"), - - ADD_1(1,"增加"), - ADD_2(2,"减少"), - - DELETE_0(0,"未删除"), - DELETE_1(1,"已删除"), - - SHOW_0(0,"不显示"), - SHOW_1(1,"显示"), - - DEFAULT_0(0,"不是默认"), - DEFAULT_1(1,"默认"); - - - - - private Integer value; - private String desc; -} \ No newline at end of file +package co.yixiang.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author hupeng + * 商城常用枚举 + */ +@Getter +@AllArgsConstructor +public enum ShopCommonEnum { + + STORE_MODE_1(1,"本地存储"), + STORE_MODE_2(2,"云存储"), + + ENABLE_1(1,"开启"), + ENABLE_2(2,"关闭"), + + EXTRACT_MINUS_1(-1,"提现未通过"), + EXTRACT_0(0,"提现审核中"), + EXTRACT_1(1,"提现已完成"), + + IS_FINISH_0(0,"未完成"), + IS_FINISH_1(1,"已完成"), + + IS_FOREVER_0(0,"不是永久"), + IS_FOREVER_1(1,"永久"), + + AGREE_1(1,"同意"), + AGREE_2(2,"拒绝"), + + IS_PERMANENT_0(0,"限制"), + IS_PERMANENT_1(1,"不限制"), + + IS_STATUS_0(0,"否"), + IS_STATUS_1(1,"是"), + + + IS_PROMOTER_0(0,"默认"), + IS_PROMOTER_1(1,"是客服"), + + IS_NEW_0(0,"默认"), + IS_NEW_1(1,"新品"), + + IS_SUB_0(0,"不单独分佣"), + IS_SUB_1(1,"单独分佣"), + + + GRADE_0(0,"一级推荐人"), + GRADE_1(1,"二级推荐人"), + + REPLY_0(0,"未回复"), + REPLY_1(1,"已回复"), + + ADD_1(1,"增加"), + ADD_2(2,"减少"), + + DELETE_0(0,"未删除"), + DELETE_1(1,"已删除"), + + SHOW_0(0,"不显示"), + SHOW_1(1,"显示"), + + DEFAULT_0(0,"不是默认"), + DEFAULT_1(1,"默认"); + + + + + private Integer value; + private String desc; +} diff --git a/yshop-common/src/main/java/co/yixiang/enums/SortEnum.java b/yshop-common/src/main/java/co/yixiang/enums/SortEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..6ed8fa94d744359d7d5218b8179c38d3e3accafe --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/enums/SortEnum.java @@ -0,0 +1,31 @@ +package co.yixiang.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.stream.Stream; + +/** + * @author hupeng + * sort关枚举 + */ +@Getter +@AllArgsConstructor +public enum SortEnum { + + DESC("desc","降序"), + ASC("asc","升序"); + + + private String value; + private String desc; + + public static SortEnum toType(String value) { + return Stream.of(SortEnum.values()) + .filter(p -> p.value == value) + .findAny() + .orElse(null); + } + + +} diff --git a/yshop-common/src/main/java/co/yixiang/enums/SpecTypeEnum.java b/yshop-common/src/main/java/co/yixiang/enums/SpecTypeEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..bd150d9e9055c686343ef544eb0ccb4c74ae5943 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/enums/SpecTypeEnum.java @@ -0,0 +1,18 @@ +package co.yixiang.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author hupeng + * 产品相关规格类型枚举 + */ +@Getter +@AllArgsConstructor +public enum SpecTypeEnum { + TYPE_0(0,"单规格"), + TYPE_1(1,"多规格"); + + private Integer value; + private String desc; +} diff --git a/yshop-common/src/main/java/co/yixiang/event/TemplateBean.java b/yshop-common/src/main/java/co/yixiang/event/TemplateBean.java new file mode 100644 index 0000000000000000000000000000000000000000..2c651e04a13b7db65d38a1583e02f36e57aedb0b --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/event/TemplateBean.java @@ -0,0 +1,33 @@ +package co.yixiang.event; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @ClassName TemplateBean + * @Author hupeng <610796224@qq.com> + * @Date 2020/6/6 + **/ +@Getter +@Setter +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class TemplateBean { + private String templateType; + private String orderId; + private String time; + private String price; + private String deliveryName; + private String deliveryId; + private String payType; + private Long uid; + /** + * 提现申请ID + */ + private Long extractId; + +} diff --git a/yshop-common/src/main/java/co/yixiang/event/TemplateEvent.java b/yshop-common/src/main/java/co/yixiang/event/TemplateEvent.java new file mode 100644 index 0000000000000000000000000000000000000000..d89cca92aea3c2732a27b8b085e5267925835d1c --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/event/TemplateEvent.java @@ -0,0 +1,23 @@ +package co.yixiang.event; + +import lombok.Getter; +import org.springframework.context.ApplicationEvent; + +/** + * @author hupeng + * 微信模板事件 + */ +@Getter +public class TemplateEvent extends ApplicationEvent { + + private TemplateBean templateBean; + /** + * 重写构造函数 + * @param source 发生事件的对象 + * @param templateBean 自定义 + */ + public TemplateEvent(Object source,TemplateBean templateBean) { + super(source); + this.templateBean = templateBean; + } +} diff --git a/yshop-common/src/main/java/co/yixiang/event/TemplateListenEnum.java b/yshop-common/src/main/java/co/yixiang/event/TemplateListenEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..21be2f71e6767b87c8e85ea64bfe7dcffe755b08 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/event/TemplateListenEnum.java @@ -0,0 +1,35 @@ +package co.yixiang.event; + + +import lombok.AllArgsConstructor; +import lombok.Getter; + +import java.util.stream.Stream; + + +/** + * @author hupeng + * 模板监听枚举 + */ +@Getter +@AllArgsConstructor +public enum TemplateListenEnum { + TYPE_1("1","支付成功模板通知"), + TYPE_2("2","退款成功通知"), + TYPE_3("3","发货成功通知"), + TYPE_4("4","充值成功通知"), + TYPE_5("5","在线买单/收款成功通知"), + TYPE_6("6","商家收款通知"), + TYPE_7("7","用户下单未支付通知"), + TYPE_8("8","用户提现通知"), + TYPE_9("9","退款申请通知"); + private String value; + private String desc; + + public static TemplateListenEnum toType(String value) { + return Stream.of(TemplateListenEnum.values()) + .filter(p -> p.value.equals(value)) + .findAny() + .orElse(null); + } +} diff --git a/yshop-common/src/main/java/co/yixiang/exception/BadLimitRequestException.java b/yshop-common/src/main/java/co/yixiang/exception/BadLimitRequestException.java new file mode 100644 index 0000000000000000000000000000000000000000..b15d36f52c3b12a12ccc544b2232bdfea4a9073c --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/exception/BadLimitRequestException.java @@ -0,0 +1,32 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.exception; + +import co.yixiang.api.ApiCode; +import lombok.Getter; +import org.springframework.http.HttpStatus; + +import static org.springframework.http.HttpStatus.BAD_REQUEST; + +/** + * @author Zheng Jie + * @date 2018-11-23 + * 统一异常处理 + */ +@Getter +public class BadLimitRequestException extends RuntimeException{ + + private Integer status = ApiCode.BAD_LIMIT_EXCEPTION.getCode(); + + public BadLimitRequestException(String msg){ + super(msg); + } + + public BadLimitRequestException(HttpStatus status, String msg){ + super(msg); + this.status = status.value(); + } +} 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 8d1aa7dc566247d06d5fab469eb571761604e052..df2f728c5d4720dbc0dc46a168e4a4e72058dba5 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/BadRequestException.java +++ b/yshop-common/src/main/java/co/yixiang/exception/BadRequestException.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.exception; @@ -17,15 +16,15 @@ import static org.springframework.http.HttpStatus.BAD_REQUEST; * 统一异常处理 */ @Getter -public class BadRequestException extends RuntimeException { +public class BadRequestException extends RuntimeException{ private Integer status = BAD_REQUEST.value(); - public BadRequestException(String msg) { + public BadRequestException(String msg){ super(msg); } - public BadRequestException(HttpStatus status, String msg) { + public BadRequestException(HttpStatus status,String msg){ super(msg); this.status = status.value(); } 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 7c6d95d7a6bf807e4631ec9e07d98d24d2031ea2..7ea01a9f5a98678c92bc43a495c170e6aed1db31 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/EntityExistException.java +++ b/yshop-common/src/main/java/co/yixiang/exception/EntityExistException.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.exception; @@ -20,6 +19,6 @@ public class EntityExistException extends RuntimeException { private static String generateMessage(String entity, String field, String val) { return StringUtils.capitalize(entity) - + " with " + field + " " + val + " existed"; + + " with " + field + " "+ val + " existed"; } } 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 c9b9937bb12a543d80c98168e98d42df84a24f44..cde4d3f10ec6f4571f9cb54acf70f41d5a7d65b8 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/EntityNotFoundException.java +++ b/yshop-common/src/main/java/co/yixiang/exception/EntityNotFoundException.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.exception; @@ -20,6 +19,6 @@ public class EntityNotFoundException extends RuntimeException { private static String generateMessage(String entity, String field, String val) { return StringUtils.capitalize(entity) - + " with " + field + " " + val + " does not exist"; + + " with " + field + " "+ val + " does not exist"; } } 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 99fef0b007d9c93023e5446cc01bce9695d192b5..b81464569f79e517869a5a7cb23bc14374508aae 100644 --- a/yshop-common/src/main/java/co/yixiang/exception/ErrorRequestException.java +++ b/yshop-common/src/main/java/co/yixiang/exception/ErrorRequestException.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.exception; @@ -17,15 +16,15 @@ import static org.springframework.http.HttpStatus.BAD_REQUEST; * 统一异常处理 */ @Getter -public class ErrorRequestException extends RuntimeException { +public class ErrorRequestException extends RuntimeException{ private Integer status = BAD_REQUEST.value(); - public ErrorRequestException(String msg) { + public ErrorRequestException(String msg){ super(msg); } - public ErrorRequestException(HttpStatus status, String msg) { + public ErrorRequestException(HttpStatus status, String msg){ super(msg); this.status = status.value(); } 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 83bfbd8f121a9caa4222c64fb815769a3951a0f6..62eaec23b16eff237fc8d537f379992e8be2ea37 100644 --- a/yshop-common/src/main/java/co/yixiang/mapper/EntityMapper.java +++ b/yshop-common/src/main/java/co/yixiang/mapper/EntityMapper.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.mapper; @@ -33,12 +32,12 @@ public interface EntityMapper { * @param dtoList * @return */ - List toEntity(List dtoList); + List toEntity(List dtoList); /** * Entity集合转DTO集合 * @param entityList * @return */ - List toDto(List entityList); + List toDto(List entityList); } diff --git a/yshop-common/src/main/java/co/yixiang/print/OrderPrint.java b/yshop-common/src/main/java/co/yixiang/print/OrderPrint.java index dac35ad97e75259a01df8ad3fd40372ebc4a2990..8e87141e8dbe4cf7078dbfdd7470c1b3e98a1f42 100644 --- a/yshop-common/src/main/java/co/yixiang/print/OrderPrint.java +++ b/yshop-common/src/main/java/co/yixiang/print/OrderPrint.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.print; @@ -19,7 +18,7 @@ import lombok.NoArgsConstructor; @NoArgsConstructor @AllArgsConstructor public class OrderPrint { - private String title; - private String price; - private String num; + 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 index 8681419de21d758e6ff22092c0e3fb79bb47007e..75306cffdbd757c4a8cade8aa03feb8056b8ffb0 100644 --- a/yshop-common/src/main/java/co/yixiang/print/PrintOrderDataVO.java +++ b/yshop-common/src/main/java/co/yixiang/print/PrintOrderDataVO.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.print; @@ -26,7 +25,7 @@ import java.math.BigDecimal; @Data @NoArgsConstructor @AllArgsConstructor -public class PrintOrderDataVO implements Serializable { +public class PrintOrderDataVO implements Serializable{ @ApiModelProperty(value = "订单号") private String orderId; @ApiModelProperty(value = "实际支付金额") diff --git a/yshop-common/src/main/java/co/yixiang/print/PrintStoreOrderVO.java b/yshop-common/src/main/java/co/yixiang/print/PrintStoreOrderVO.java index 043ec6e297602804adde00eadb7f93816b699ef1..beb3a6532f23e6fd5a5df93dcd56af31d7300a92 100644 --- a/yshop-common/src/main/java/co/yixiang/print/PrintStoreOrderVO.java +++ b/yshop-common/src/main/java/co/yixiang/print/PrintStoreOrderVO.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.print; @@ -35,7 +34,7 @@ public class PrintStoreOrderVO implements Serializable { @ApiModelProperty(value = "门店列表") private Integer storeId; @ApiModelProperty(hidden = true) - long startSecond; + Long startSecond; @ApiModelProperty(hidden = true) - long endSecond; + 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 index 32f7de1f670194837a9fdd9eda0aad2f3b1f6c84..051aaa35897ff1f569aa457811f3697d6e297e2f 100644 --- a/yshop-common/src/main/java/co/yixiang/print/PrintUtil4.java +++ b/yshop-common/src/main/java/co/yixiang/print/PrintUtil4.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.print; diff --git a/yshop-common/src/main/java/co/yixiang/serializer/BigDecimalSerializer.java b/yshop-common/src/main/java/co/yixiang/serializer/BigDecimalSerializer.java new file mode 100644 index 0000000000000000000000000000000000000000..953dae924b0b84221636f4ff92ba4c928767be73 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/serializer/BigDecimalSerializer.java @@ -0,0 +1,28 @@ +package co.yixiang.serializer; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +import java.io.IOException; +import java.math.BigDecimal; +import java.text.DecimalFormat; + +/** + * @author :LionCity + * @date :Created in 2020-05-30 14:12 + * @description: + * @modified By: + * @version: + */ +public class BigDecimalSerializer extends JsonSerializer { + @Override + public void serialize(BigDecimal value, JsonGenerator gen, SerializerProvider serializerProvider) throws IOException { + if (value != null && !"".equals(value)) { + DecimalFormat df2 =new DecimalFormat("0.00"); + gen.writeString(df2.format(value)); + } else { + gen.writeString(value + ""); + } + } +} diff --git a/yshop-common/src/main/java/co/yixiang/serializer/DoubleSerializer.java b/yshop-common/src/main/java/co/yixiang/serializer/DoubleSerializer.java new file mode 100644 index 0000000000000000000000000000000000000000..d23311fddcd4fcb46b3e9be59bafad3bf03d843a --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/serializer/DoubleSerializer.java @@ -0,0 +1,27 @@ +package co.yixiang.serializer; + +import com.fasterxml.jackson.core.JsonGenerator; +import com.fasterxml.jackson.databind.JsonSerializer; +import com.fasterxml.jackson.databind.SerializerProvider; + +import java.io.IOException; +import java.text.DecimalFormat; + +/** + * @author :LionCity + * @date :Created in 2020-05-30 14:12 + * @description: + * @modified By: + * @version: + */ +public class DoubleSerializer extends JsonSerializer { + @Override + public void serialize(Double value, JsonGenerator gen, SerializerProvider serializerProvider) throws IOException { + if (value != null && !"".equals(value)) { + DecimalFormat df2 =new DecimalFormat("0.00"); + gen.writeString(df2.format(value)); + } else { + gen.writeString(value + ""); + } + } +} 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 1e4dd4a660dbd09c13ce5cafbab547f5d0cb9f51..b412a0414e6cb2f509a48fae5bc395ee7b7eaa4d 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/BeanUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/BeanUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -24,7 +23,7 @@ public class BeanUtil implements ApplicationContextAware { return context.getBean(name); } - public static T getBean(Class c) { + public static T getBean(Class c){ return context.getBean(c); } } diff --git a/yshop-common/src/main/java/co/yixiang/utils/BigNum.java b/yshop-common/src/main/java/co/yixiang/utils/BigNum.java index efd1e823953a234768bb0fb9c51d69cc2d6b70e2..912f01a6437f38d9ae199c4457b22f499058e9bd 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/BigNum.java +++ b/yshop-common/src/main/java/co/yixiang/utils/BigNum.java @@ -1,11 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; - import java.math.BigDecimal; import java.text.DecimalFormat; @@ -156,10 +154,10 @@ public class BigNum { * @param v * @return */ - public static BigDecimal penny2dollar(String v) { + public static BigDecimal penny2dollar(String v){ BigDecimal s = new BigDecimal("0.00");//保留两位小数 try { - s = div(v, "100", 2); + s = div(v,"100",2); } catch (IllegalAccessException e) { e.printStackTrace(); } @@ -171,7 +169,7 @@ public class BigNum { * @param v * @return */ - public static BigDecimal dollar2penny(String v) { + public static BigDecimal dollar2penny(String v){ return mul(v, "100"); } @@ -183,8 +181,8 @@ public class BigNum { * @param v * @return */ - public static String formatNumber(String v) { - return formatNumber(v, BIG_NUM_FMT_COMMA); + public static String formatNumber(String v){ + return formatNumber(v,BIG_NUM_FMT_COMMA); } /** @@ -193,7 +191,7 @@ public class BigNum { * @param pattern BigNum类中的常量 BIG_NUM_FMT_COMMA,BIG_NUM_FMT * @return */ - public static String formatNumber(String v, String pattern) { + public static String formatNumber(String v,String pattern) { return new DecimalFormat(pattern).format(new BigDecimal(v)); } 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 19ebd394cf4d7ddfc2dcabd2528ff308ac25b8c3..df36f415411764f0393a73c78fe38a41d03fdfc3 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/CateDTO.java +++ b/yshop-common/src/main/java/co/yixiang/utils/CateDTO.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; diff --git a/yshop-common/src/main/java/co/yixiang/utils/CustomArithmeticCaptcha.java b/yshop-common/src/main/java/co/yixiang/utils/CustomArithmeticCaptcha.java deleted file mode 100644 index 0e47867d27111ee2d569dadf7351b8898a2af169..0000000000000000000000000000000000000000 --- a/yshop-common/src/main/java/co/yixiang/utils/CustomArithmeticCaptcha.java +++ /dev/null @@ -1,62 +0,0 @@ -package co.yixiang.utils; - -import com.wf.captcha.ArithmeticCaptcha; - -import javax.script.ScriptEngine; -import javax.script.ScriptEngineManager; -import javax.script.ScriptException; -import java.awt.Font; - -/** - * 自定义算法验证码 - * - * @author yshop - * @date 2022-07-03 - */ -public class CustomArithmeticCaptcha extends ArithmeticCaptcha { - public CustomArithmeticCaptcha() { - super(); - } - - public CustomArithmeticCaptcha(int width, int height) { - super(width, height); - } - - public CustomArithmeticCaptcha(int width, int height, int len) { - super(width, height, len); - } - - public CustomArithmeticCaptcha(int width, int height, int len, Font font) { - super(width, height, len, font); - } - @Override - protected char[] alphas() { - StringBuilder sb = new StringBuilder(); - for (int i = 0; i < len; i++) { - sb.append(num(10)); - if (i < len - 1) { - int type = num(1, 4); - if (type == 1) { - sb.append("+"); - } else if (type == 2) { - sb.append("-"); - } else if (type == 3) { - sb.append("x"); - } - } - } - ScriptEngineManager manager = new ScriptEngineManager(); - //添加这一行 该行要把外部js引擎注入js引擎管理里;其他不用调整,维持即可 - // open jdk 8这行有问题,如果jdk>=9可以放开这行,并把pom文件里面的org.openjdk.nashorn放开 - // manager.registerEngineName("customScriptEngineFactory", new NashornScriptEngineFactory()); - ScriptEngine engine = manager.getEngineByName("javascript"); - try { - chars = String.valueOf(engine.eval(sb.toString().replaceAll("x", "*"))); - } catch (ScriptException e) { - e.printStackTrace(); - } - sb.append("=?"); - setArithmeticString(sb.toString()); - return chars.toCharArray(); - } -} diff --git a/yshop-common/src/main/java/co/yixiang/utils/DateUtils.java b/yshop-common/src/main/java/co/yixiang/utils/DateUtils.java index 29c492906e4bbcf1e8d5d58f57894f0ff8999fba..a27c1721a43ea6a88ef6e145ed33f6ae3afd183d 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/DateUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/DateUtils.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -11,6 +10,7 @@ import org.apache.commons.lang3.time.DateFormatUtils; import java.lang.management.ManagementFactory; import java.text.ParseException; import java.text.SimpleDateFormat; +import java.util.Calendar; import java.util.Date; /** @@ -136,4 +136,19 @@ public class DateUtils extends org.apache.commons.lang3.time.DateUtils { // long sec = diff % nd % nh % nm / ns; return day + "天" + hour + "小时" + min + "分钟"; } + + /** + * 秒转换为指定格式的日期 + * + * @param second + * @return + */ + public static String secondToDate(long second) { + Calendar calendar = Calendar.getInstance(); + calendar.setTimeInMillis(second * 1000);//转换为毫秒 + Date date = calendar.getTime(); + SimpleDateFormat format = new SimpleDateFormat("yyyy-MM-dd hh:mm:ss"); + String dateString = format.format(date); + return dateString; + } } 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 c1718071774e5317b753e5ec16454b33a58bb8e0..0d87a645bfef6a1bd4d61adf95c1a989e7ebbf7a 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/ElAdminConstant.java +++ b/yshop-common/src/main/java/co/yixiang/utils/ElAdminConstant.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -25,7 +24,7 @@ public class ElAdminConstant { /** * 常用接口 */ - public static class Url { + public static class Url{ public static final String SM_MS_URL = "https://sm.ms/api/upload"; } } 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 5710b0197b6b6dc4d2cf7a720d67b91059b6d0ca..2473ea0878e258940c6f4d1d0e6e2260fadee023 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/EncryptUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/EncryptUtils.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -29,7 +28,7 @@ public class EncryptUtils { private static IvParameterSpec iv = new IvParameterSpec(strParam.getBytes(StandardCharsets.UTF_8)); private static DESKeySpec getDesKeySpec(String source) throws Exception { - if (source == null || source.length() == 0) { + if (source == null || source.length() == 0){ return null; } cipher = Cipher.getInstance("DES/CBC/PKCS5Padding"); @@ -79,7 +78,7 @@ public class EncryptUtils { private static byte[] hex2byte(byte[] b) { int size = 2; - if ((b.length % size) != 0) { + if ((b.length % size) != 0){ throw new IllegalArgumentException("长度不是偶数"); } byte[] b2 = new byte[b.length / 2]; @@ -95,7 +94,7 @@ public class EncryptUtils { * @param password * @return */ - public static String encryptPassword(String password) { - return DigestUtils.md5DigestAsHex(password.getBytes()); + public static String encryptPassword(String password){ + return DigestUtils.md5DigestAsHex(password.getBytes()); } } diff --git a/yshop-common/src/main/java/co/yixiang/utils/FeiEHttpUtil.java b/yshop-common/src/main/java/co/yixiang/utils/FeiEHttpUtil.java index c268eba3ac1d0615f5b834a6363c957e0e6e9b25..f23724aeb2e8a2db5ae3c69f55325d4a6b7ed579 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/FeiEHttpUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/FeiEHttpUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; 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 62379771334a5d25e3a7d68cc95b0ff5b2bc73b4..15453f9a809e852bd84efac89128bfc15211a0fb 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/FileUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/FileUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -19,7 +18,17 @@ import javax.servlet.ServletOutputStream; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; import java.awt.image.BufferedImage; -import java.io.*; +import java.io.File; +import java.io.FileInputStream; +import java.io.FileNotFoundException; +import java.io.FileOutputStream; +import java.io.FileReader; +import java.io.IOException; +import java.io.InputStream; +import java.io.InputStreamReader; +import java.io.OutputStream; +import java.io.Reader; +import java.io.UnsupportedEncodingException; import java.net.URLEncoder; import java.security.MessageDigest; import java.text.DecimalFormat; @@ -57,11 +66,11 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { /** * MultipartFile转File */ - public static File toFile(MultipartFile multipartFile) { + public static File toFile(MultipartFile multipartFile){ // 获取文件名 String fileName = multipartFile.getOriginalFilename(); // 获取文件后缀 - String prefix = "." + getExtensionName(fileName); + String prefix="."+getExtensionName(fileName); File file = null; try { // 用uuid作为文件名,防止生成的临时文件重复 @@ -80,7 +89,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { public static String getExtensionName(String filename) { if ((filename != null) && (filename.length() > 0)) { int dot = filename.lastIndexOf('.'); - if ((dot > -1) && (dot < (filename.length() - 1))) { + if ((dot >-1) && (dot < (filename.length() - 1))) { return filename.substring(dot + 1); } } @@ -93,7 +102,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { public static String getFileNameNoEx(String filename) { if ((filename != null) && (filename.length() > 0)) { int dot = filename.lastIndexOf('.'); - if ((dot > -1) && (dot < (filename.length()))) { + if ((dot >-1) && (dot < (filename.length()))) { return filename.substring(0, dot); } } @@ -103,7 +112,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { /** * 文件大小转换 */ - public static String getSize(long size) { + public static String getSize(long size){ String resultSize; if (size / GB >= 1) { //如果当前Byte的值大于等于1GB @@ -123,7 +132,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { /** * inputStream 转 File */ - public static File inputStreamToFile(InputStream ins, String name) throws Exception { + public static File inputStreamToFile(InputStream ins, String name) throws Exception{ File file = new File(System.getProperty("java.io.tmpdir") + File.separator + name); if (file.exists()) { return file; @@ -168,10 +177,10 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { public static String fileToBase64(File file) throws Exception { FileInputStream inputFile = new FileInputStream(file); String base64; - byte[] buffer = new byte[(int) file.length()]; + byte[] buffer = new byte[(int)file.length()]; inputFile.read(buffer); inputFile.close(); - base64 = Base64.encode(buffer); + base64=Base64.encode(buffer); return base64.replaceAll("[\\s*\t\n\r]", ""); } @@ -179,16 +188,16 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { * 导出excel */ public static void downloadExcel(List> list, HttpServletResponse response) throws IOException { - String tempPath = System.getProperty("java.io.tmpdir") + IdUtil.fastSimpleUUID() + ".xlsx"; + String tempPath =System.getProperty("java.io.tmpdir") + IdUtil.fastSimpleUUID() + ".xlsx"; File file = new File(tempPath); - BigExcelWriter writer = ExcelUtil.getBigWriter(file); + BigExcelWriter writer= ExcelUtil.getBigWriter(file); // 一次性写出内容,使用默认样式,强制输出标题 writer.write(list, true); //response为HttpServletResponse对象 response.setContentType("application/vnd.openxmlformats-officedocument.spreadsheetml.sheet;charset=utf-8"); //test.xls是弹出下载对话框的文件名,不能为中文,中文请自行编码 - response.setHeader("Content-Disposition", "attachment;filename=file.xlsx"); - ServletOutputStream out = response.getOutputStream(); + response.setHeader("Content-Disposition","attachment;filename=file.xlsx"); + ServletOutputStream out=response.getOutputStream(); // 终止后删除临时文件 file.deleteOnExit(); writer.flush(out, true); @@ -201,13 +210,13 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { String music = "mp3 wav wma mpa ram ra aac aif m4a"; String video = "avi mpg mpe mpeg asf wmv mov qt rm mp4 flv m4v webm ogv ogg"; String image = "bmp dib pcp dif wmf gif jpg tif eps psd cdr iff tga pcd mpt png jpeg"; - if (image.contains(type)) { + if(image.contains(type)){ return "pic"; - } else if (documents.contains(type)) { + } else if(documents.contains(type)){ return "txt"; - } else if (music.contains(type)) { + } else if(music.contains(type)){ return "music"; - } else if (video.contains(type)) { + } else if(video.contains(type)){ return "vedio"; } else { return "other"; @@ -218,7 +227,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { public static void checkSize(long maxSize, long size) { // 1M int len = 1024 * 1024; - if (size > (maxSize * len)) { + if(size > (maxSize * len)){ throw new BadRequestException("文件超出规定大小"); } } @@ -284,14 +293,14 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { * @param response / * @param file / */ - public static void downloadFile(HttpServletRequest request, HttpServletResponse response, File file, boolean deleteOnExit) { + public static void downloadFile(HttpServletRequest request, HttpServletResponse response, File file, boolean deleteOnExit){ response.setCharacterEncoding(request.getCharacterEncoding()); response.setContentType("application/octet-stream"); FileInputStream fis = null; try { fis = new FileInputStream(file); - response.setHeader("Content-Disposition", "attachment; filename=" + file.getName()); - IOUtils.copy(fis, response.getOutputStream()); + response.setHeader("Content-Disposition", "attachment; filename="+file.getName()); + IOUtils.copy(fis,response.getOutputStream()); response.flushBuffer(); } catch (Exception e) { e.printStackTrace(); @@ -299,7 +308,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { if (fis != null) { try { fis.close(); - if (deleteOnExit) { + if(deleteOnExit){ file.deleteOnExit(); } } catch (IOException e) { @@ -324,7 +333,7 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { File jsonFile = new File(fileName); FileReader fileReader = new FileReader(jsonFile); - Reader reader = new InputStreamReader(new FileInputStream(jsonFile), "utf-8"); + Reader reader = new InputStreamReader(new FileInputStream(jsonFile),"utf-8"); int ch = 0; StringBuffer sb = new StringBuffer(); while ((ch = reader.read()) != -1) { @@ -350,7 +359,6 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { } return srcImage; } - /** * 自动调节精度(经验数值) * @@ -395,12 +403,15 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { * @return * @throws UnsupportedEncodingException */ - public static String transformStyle(String source) throws UnsupportedEncodingException { + public static String transformStyle(String source) throws UnsupportedEncodingException + { char[] arr = source.toCharArray(); StringBuilder sb = new StringBuilder(); - for (int i = 0; i < arr.length; i++) { + for(int i = 0; i < arr.length; i++) + { char temp = arr[i]; - if (isChinese(temp)) { + if(isChinese(temp)) + { sb.append(URLEncoder.encode("" + temp, "UTF-8")); continue; } @@ -414,11 +425,12 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { * @param c * @return */ - public static boolean isChinese(char c) { + public static boolean isChinese(char c) + { Character.UnicodeBlock ub = Character.UnicodeBlock.of(c); - if (ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS + if(ub == Character.UnicodeBlock.CJK_UNIFIED_IDEOGRAPHS || ub == Character.UnicodeBlock.CJK_COMPATIBILITY_IDEOGRAPHS @@ -428,7 +440,8 @@ public class FileUtil extends cn.hutool.core.io.FileUtil { || ub == Character.UnicodeBlock.CJK_SYMBOLS_AND_PUNCTUATION - || ub == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS) { + || ub == Character.UnicodeBlock.HALFWIDTH_AND_FULLWIDTH_FORMS) + { return true; diff --git a/yshop-common/src/main/java/co/yixiang/utils/FontUtil.java b/yshop-common/src/main/java/co/yixiang/utils/FontUtil.java index e718f2d072638a1a0ea64bc0378414c0a99eb235..7af2cd6518dceb596506cb1c9d9128ee80977ad0 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/FontUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/FontUtil.java @@ -1,12 +1,12 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; -import java.awt.*; +import java.awt.Font; +import java.awt.FontFormatException; import java.io.File; import java.io.FileInputStream; import java.io.IOException; diff --git a/yshop-common/src/main/java/co/yixiang/utils/GsonParser.java b/yshop-common/src/main/java/co/yixiang/utils/GsonParser.java new file mode 100644 index 0000000000000000000000000000000000000000..c62bb9bb4b97a922107f34b27fcd753c4677aee2 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/utils/GsonParser.java @@ -0,0 +1,26 @@ +package co.yixiang.utils; + +import com.google.gson.JsonObject; +import com.google.gson.JsonParser; +import com.google.gson.stream.JsonReader; + +import java.io.Reader; + +/** + * @author niefy + */ +public class GsonParser { + private static final JsonParser JSON_PARSER = new JsonParser(); + + public static JsonObject parse(String json) { + return JSON_PARSER.parse(json).getAsJsonObject(); + } + + public static JsonObject parse(Reader json) { + return JSON_PARSER.parse(json).getAsJsonObject(); + } + + public static JsonObject parse(JsonReader json) { + return JSON_PARSER.parse(json).getAsJsonObject(); + } +} 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 76c09f71a9236acc7f92957ba1beef44ae8f5cb2..cfc193dfc3f637dfe88f548064c00453d0328244 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/OrderUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/OrderUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -23,6 +22,16 @@ import java.util.Random; public class OrderUtil { + /** + * 获取精确到秒的时间戳 + * @return + **/ + public static int getSecondTimestamp(){ + String timestamp = String.valueOf(System.currentTimeMillis()/1000); + return Integer.valueOf(timestamp); + } + + /** * 返回活动状态 * @param starTime 开始时间 @@ -30,7 +39,7 @@ public class OrderUtil { * @param status 0-关闭 其他表示相反 * @return String */ - public static String checkActivityStatus(Date starTime, Date endTime, int status) { + public static String checkActivityStatus(Date starTime,Date endTime,Integer status){ Date nowTime = new Date(); if(ShopCommonEnum.IS_STATUS_0.getValue().equals(status)) { @@ -152,7 +161,7 @@ public class OrderUtil { SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); Date date = simpleDateFormat.parse(str); long ts = date.getTime(); - return ts / 1000; + return ts/1000; } /** @@ -241,6 +250,9 @@ public class OrderUtil { case "yue": payTypeName = "余额支付"; break; + case "integral": + payTypeName = "积分兑换"; + break; case "offline": payTypeName = "线下支付"; break; 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 e5e5f7355396a22443b5d6183ccfc373df6cf695..f2b9c49d3881099845f07c4bbc75e0a9c97e42af 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/PageUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/PageUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -23,36 +22,37 @@ public class PageUtil extends cn.hutool.core.util.PageUtil { /** * List 分页 */ - public static List toPage(int page, int size, List list) { + public static List toPage(int page, int size , List list) { int fromIndex = page * size; int toIndex = page * size + size; - if (fromIndex > list.size()) { + if(fromIndex > list.size()){ return new ArrayList(); - } else if (toIndex >= list.size()) { - return list.subList(fromIndex, list.size()); + } else if(toIndex >= list.size()) { + return list.subList(fromIndex,list.size()); } else { - return list.subList(fromIndex, toIndex); + return list.subList(fromIndex,toIndex); } } /** * Page 数据处理,预防redis反序列化报错 */ - public static Map toPage(Page page) { - Map map = new LinkedHashMap<>(2); - map.put("content", page.getContent()); - map.put("totalElements", page.getTotalElements()); + public static Map toPage(Page page) { + Map map = new LinkedHashMap<>(2); + map.put("content",page.getContent()); + map.put("totalElements",page.getTotalElements()); return map; } + /** * 自定义分页 */ - public static Map toPage(Object object, Object totalElements) { - Map map = new LinkedHashMap<>(2); - map.put("content", object); - map.put("totalElements", totalElements); + public static Map toPage(Object object, Object totalElements) { + Map map = new LinkedHashMap<>(2); + map.put("content",object); + map.put("totalElements",totalElements); return map; } diff --git a/yshop-common/src/main/java/co/yixiang/utils/RecodeUtil.java b/yshop-common/src/main/java/co/yixiang/utils/RecodeUtil.java index 22551e11f00e545dc5823eef33cf53ae037605e5..13c9f477975e7d1823c16164d113866562ef9262 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/RecodeUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/RecodeUtil.java @@ -1,11 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; - import com.google.zxing.BarcodeFormat; import com.google.zxing.EncodeHintType; import com.google.zxing.MultiFormatWriter; @@ -53,6 +51,8 @@ public class RecodeUtil { } + + /** * 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 9f12216c6d0c04929bfd30fed01eec1b0b0e661a..fad981a7c4e759b0957af27483b1f8d507ecf305 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/RedisUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/RedisUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -12,9 +11,10 @@ import org.springframework.util.CollectionUtils; import java.util.Collection; import java.util.concurrent.TimeUnit; +@SuppressWarnings("unchecked") public class RedisUtil { - private static RedisTemplate redisTemplate = SpringContextUtils - .getBean("redisTemplate", RedisTemplate.class); + private static RedisTemplate redisTemplate = SpringContextUtils + .getBean("redisTemplate",RedisTemplate.class); /** * 指定缓存失效时间 @@ -22,9 +22,9 @@ public class RedisUtil { * @param time 时间(秒) * @return */ - public static boolean expire(String key, long time) { + public static boolean expire(String key,long time){ try { - if (time > 0) { + if(time>0){ redisTemplate.expire(key, time, TimeUnit.SECONDS); } return true; @@ -39,8 +39,8 @@ public class RedisUtil { * @param key 键 不能为null * @return 时间(秒) 返回0代表为永久有效 失效时间为负数,说明该主键未设置失效时间(失效时间默认为-1) */ - public static long getExpire(String key) { - return redisTemplate.getExpire(key, TimeUnit.SECONDS); + public static long getExpire(String key){ + return redisTemplate.getExpire(key,TimeUnit.SECONDS); } /** @@ -48,7 +48,7 @@ public class RedisUtil { * @param key 键 * @return true 存在 false 不存在 */ - public static boolean hasKey(String key) { + public static boolean hasKey(String key){ try { return redisTemplate.hasKey(key); } catch (Exception e) { @@ -62,11 +62,11 @@ public class RedisUtil { * @param key 可以传一个值 或多个 */ @SuppressWarnings("unchecked") - public static void del(String... key) { - if (key != null && key.length > 0) { - if (key.length == 1) { + public static void del(String ... key){ + if(key!=null&&key.length>0){ + if(key.length==1){ redisTemplate.delete(key[0]); - } else { + }else{ redisTemplate.delete((Collection) CollectionUtils.arrayToList(key)); } } @@ -79,8 +79,8 @@ public class RedisUtil { * @return 值 */ @SuppressWarnings("unchecked") - public static T get(String key) { - return key == null ? null : (T) redisTemplate.opsForValue().get(key); + public static T get(String key){ + return key==null?null:(T)redisTemplate.opsForValue().get(key); } /** @@ -89,7 +89,7 @@ public class RedisUtil { * @param value 值 * @return true成功 false失败 */ - public static boolean set(String key, Object value) { + public static boolean set(String key,Object value) { try { redisTemplate.opsForValue().set(key, value); return true; @@ -107,11 +107,11 @@ public class RedisUtil { * @param time 时间(秒) time要大于0 如果time小于等于0 将设置无限期 * @return true成功 false 失败 */ - public static boolean set(String key, Object value, long time) { + public static boolean set(String key,Object value,long time){ try { - if (time > 0) { + if(time>0){ redisTemplate.opsForValue().set(key, value, time, TimeUnit.SECONDS); - } else { + }else{ set(key, value); } return true; @@ -127,8 +127,8 @@ public class RedisUtil { * @param delta 要增加几(大于0) * @return */ - public static long incr(String key, long delta) { - if (delta < 0) { + public static long incr(String key, long delta){ + if(delta<0){ throw new RuntimeException("递增因子必须大于0"); } return redisTemplate.opsForValue().increment(key, delta); @@ -140,8 +140,8 @@ public class RedisUtil { * @param delta 要减少几(小于0) * @return */ - public static long decr(String key, long delta) { - if (delta < 0) { + public static long decr(String key, long delta){ + if(delta<0){ throw new RuntimeException("递减因子必须大于0"); } return redisTemplate.opsForValue().increment(key, -delta); 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 9cb9764be2733798bbf95ea6ee528b3a8a8d766f..5bf9871fb961ed40afa3e7e4e81f4c00b9c71cec 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/RedisUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/RedisUtils.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.utils; @@ -16,14 +18,19 @@ import org.springframework.data.redis.core.ScanOptions; import org.springframework.stereotype.Component; import org.springframework.util.CollectionUtils; -import java.util.*; +import java.util.ArrayList; +import java.util.Collections; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.Set; import java.util.concurrent.TimeUnit; /** * @author / */ @Component -@SuppressWarnings({"unchecked", "all"}) +@SuppressWarnings({"unchecked","all"}) public class RedisUtils { private RedisTemplate redisTemplate; @@ -34,7 +41,7 @@ public class RedisUtils { this.redisTemplate = redisTemplate; } - // =============================common============================ + // =============================commonold============================ /** * 指定缓存失效时间 @@ -107,7 +114,7 @@ public class RedisUtils { continue; } // 获取到满足条件的数据后,就可以退出了 - if (tmpIndex >= toIndex) { + if(tmpIndex >=toIndex) { break; } tmpIndex++; @@ -160,15 +167,10 @@ public class RedisUtils { return key == null ? null : redisTemplate.opsForValue().get(key); } - /** - * 普通缓存获取 - * - * @param key 关键 - * @return {@link String} - */ - public String getString(String key){ + public String getY(String key){ return key == null || !redisTemplate.hasKey(key) ? "" : redisTemplate.opsForValue().get(key).toString(); } + /** * 批量获取 * @param keys diff --git a/yshop-common/src/main/java/co/yixiang/utils/RegexUtil.java b/yshop-common/src/main/java/co/yixiang/utils/RegexUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..1b7fee3a1c37816ebbd08c59838979cc7ce9fb0f --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/utils/RegexUtil.java @@ -0,0 +1,86 @@ +package co.yixiang.utils; + + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * @author :LionCity + * @date :Created in 2020-10-19 14:44 + * @description:正则表达式匹配两个字符串之间的内容 + * @modified By: + * @version: + */ +public class RegexUtil { + + + /** + * 转换产品描述 + * + * @param str str + * @return {@link String} + */ + public static String converProductDescription(String str){ + StringBuilder sb = new StringBuilder(); + List imgArr=Arrays.asList(str.split("p>0){ + if(img.indexOf("style=")>0){ + String rgex = "style=\"(.*?)\""; + String rgexStr = getSubUtilSimple(img, rgex); + if(rgexStr.indexOf("max-width: 100%;")<0){ + img=img.replace( rgexStr ,rgexStr+"max-width: 100%"); + } + }else{ + img=" style=\"max-width: 100%;\""+img; + } + } + sb.append(img); + } + return sb.toString(); + } + + + /** + * 正则表达式匹配两个指定字符串中间的内容 + * + * @param soap + * @return + */ + public static List getSubUtil(String soap, String rgex) { + List list = new ArrayList(); + // 匹配的模式 + Pattern pattern = Pattern.compile(rgex); + Matcher m = pattern.matcher(soap); + while (m.find()) { + int i = 1; + list.add(m.group(i)); + i++; + } + return list; + } + + /** + * 返回单个字符串,若匹配到多个的话就返回第一个,方法与getSubUtil一样 + * + * @param soap + * @param rgex + * @return + */ + public static String getSubUtilSimple(String soap, String rgex) { + // 匹配的模式 + Pattern pattern = Pattern.compile(rgex); + Matcher m = pattern.matcher(soap); + while (m.find()) { + return m.group(1); + } + return ""; + } +} \ No newline at end of file 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 d9ad881d8934aa26c49e3d44310bec1aeea7e1f9..1c4528874a4e67d7ec6e1c069b8f597336cc8793 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/RequestHolder.java +++ b/yshop-common/src/main/java/co/yixiang/utils/RequestHolder.java @@ -1,11 +1,11 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; +import cn.hutool.extra.servlet.ServletUtil; import org.springframework.web.context.request.RequestContextHolder; import org.springframework.web.context.request.ServletRequestAttributes; @@ -22,4 +22,11 @@ public class RequestHolder { public static HttpServletRequest getHttpServletRequest() { return ((ServletRequestAttributes) Objects.requireNonNull(RequestContextHolder.getRequestAttributes())).getRequest(); } + public static String getClientIP() { + HttpServletRequest request = getHttpServletRequest(); + if (request == null) { + return null; + } + return ServletUtil.getClientIP(request); + } } 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 a2a8f3354f91e2f51d760cc7ca5cc84a7eae9896..7f5ddd82a0a4f0269340b096b65db15176861d30 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/SecurityUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/SecurityUtils.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -38,7 +37,7 @@ public class SecurityUtils { * 获取系统用户名称 * @return 系统用户名称 */ - public static String getUsername() { + public static String getUsername(){ final Authentication authentication = SecurityContextHolder.getContext().getAuthentication(); if (authentication == null) { throw new BadRequestException(HttpStatus.UNAUTHORIZED, "当前登录状态过期"); @@ -51,7 +50,7 @@ public class SecurityUtils { * 获取系统用户id * @return 系统用户id */ - public static Long getUserId() { + public static Long getUserId(){ Object obj = getUserDetails(); JSONObject json = new JSONObject(obj); return json.get("id", Long.class); diff --git a/yshop-common/src/main/java/co/yixiang/utils/ShopKeyUtils.java b/yshop-common/src/main/java/co/yixiang/utils/ShopKeyUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..5ee41875d9f057fccec27bd9702dbd0cf1c98dcd --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/utils/ShopKeyUtils.java @@ -0,0 +1,180 @@ +package co.yixiang.utils; + +import co.yixiang.constant.ShopConstants; +import co.yixiang.constant.SystemConfigConstants; + +/** + * 处理缓存key值的统一入口,方面后面扩展, + * 例如:多租户就要在每个key后拼接上租户ID,只要统一修改这里就可以了 + */ +public class ShopKeyUtils { + /** + *扩展值,默认为空, 把这个值追加到所有key值上 + */ + private static String getExtendValue(){ + String extendValue= ""; + return extendValue; + } + + //*********************************begin yx_system_config 通用值 ***************************************************** + + /** + * api_url + */ + public static String getApiUrl(){ + String apiUrl= SystemConfigConstants.API_URL; + return apiUrl; + } + /** + * site_url + */ + public static String getSiteUrl(){ + String siteUrl= SystemConfigConstants.SITE_URL; + return siteUrl; + } + /** + * 腾讯mapkey tengxun_map_key + */ + public static String getTengXunMapKey(){ + String tengxunMapKey= SystemConfigConstants.TENGXUN_MAP_KEY; + return tengxunMapKey; + } + + //*********************************begin yx_system_config 业务字段 ***************************************************** + /** + * store_self_mention + */ + public static String getStoreSelfMention(){ + String storeSelfMention= SystemConfigConstants.STORE_SEFL_MENTION; + return storeSelfMention+getExtendValue(); + } + + + //*********************************begin yx_system_config 微信配置相关字段 ***************************************************** + + /** + * 微信公众号service + */ + public static String getYshopWeiXinMpSevice(){ + String yshopWeiXinMpSevice= ShopConstants.YSHOP_WEIXIN_MP_SERVICE; + return yshopWeiXinMpSevice+getExtendValue(); + } + + /** + * 微信公众号id + */ + public static String getWechatAppId(){ + String wechatAppId= SystemConfigConstants.WECHAT_APPID; + return wechatAppId+getExtendValue(); + } + /** + * 微信公众号secret + */ + public static String getWechatAppSecret(){ + String wechatAppSecret= SystemConfigConstants.WECHAT_APPSECRET; + return wechatAppSecret+getExtendValue(); + } + /** + * 微信公众号验证token + */ + public static String getWechatToken(){ + String wechatToken= SystemConfigConstants.WECHAT_TOKEN; + return wechatToken+getExtendValue(); + } + /** + * 微信公众号 EncodingAESKey + */ + public static String getWechatEncodingAESKey(){ + String wechatEncodingAESKey= SystemConfigConstants.WECHAT_ENCODINGAESKEY; + return wechatEncodingAESKey+getExtendValue(); + } + /** + * 微信支付service + */ + public static String getYshopWeiXinPayService(){ + String yshopWeiXinPayService= ShopConstants.YSHOP_WEIXIN_PAY_SERVICE; + return yshopWeiXinPayService+getExtendValue(); + } + /** + * 商户号 + */ + public static String getWxPayMchId(){ + String wxPayMchId= SystemConfigConstants.WXPAY_MCHID; + return wxPayMchId+getExtendValue(); + } + /** + * 商户秘钥 + */ + public static String getWxPayMchKey(){ + String wxPayMchKey= SystemConfigConstants.WXPAY_MCHKEY; + return wxPayMchKey+getExtendValue(); + } + /** + * 商户证书路径 + */ + public static String getWxPayKeyPath(){ + String wxPayKeyPath= SystemConfigConstants.WXPAY_KEYPATH; + return wxPayKeyPath+getExtendValue(); + } + /** + * 微信支付小程序service + */ + public static String getYshopWeiXinMiniPayService(){ + String yshopWeiXinMiniPayService= ShopConstants.YSHOP_WEIXIN_MINI_PAY_SERVICE; + return yshopWeiXinMiniPayService+getExtendValue(); + } + /** + * 微信支付app service + */ + public static String getYshopWeiXinAppPayService(){ + String yshopWeiXinAppPayService= ShopConstants.YSHOP_WEIXIN_APP_PAY_SERVICE; + return yshopWeiXinAppPayService+getExtendValue(); + } + /** + * 微信小程序id + */ + public static String getWxAppAppId(){ + String wxAppAppId= SystemConfigConstants.WXAPP_APPID; + return wxAppAppId+getExtendValue(); + } + /** + * 微信小程序秘钥 + */ + public static String getWxAppSecret(){ + String wxAppSecret= SystemConfigConstants.WXAPP_SECRET; + return wxAppSecret+getExtendValue(); + } + + /** + * 微信公众号验证token + */ + public static String getWechatMaToken(){ + String wechatToken= SystemConfigConstants.WECHAT_MA_TOKEN; + return wechatToken+getExtendValue(); + } + /** + * 微信公众号 EncodingAESKey + */ + public static String getWechatMaEncodingAESKey(){ + String wechatEncodingAESKey= SystemConfigConstants.WECHAT_MA_ENCODINGAESKEY; + return wechatEncodingAESKey+getExtendValue(); + } + + /** + * 支付appId + */ + public static String getWxNativeAppAppId(){ + String wxNativeAppAppId= SystemConfigConstants.WX_NATIVE_APP_APPID; + return wxNativeAppAppId+getExtendValue(); + } + + /** + * 微信小程序service + * @return + */ + public static String getYshopWeiXinMaSevice() { + String yshopWeiXinMaSevice= ShopConstants.YSHOP_WEIXIN_MA_SERVICE; + return yshopWeiXinMaSevice+getExtendValue(); + } + +} 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 1fc8da37a2d62824355ea2e00d18536fd0cb5ab1..87f1b6408c7f3d2a23a594200946ca21af2941b1 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/SpringContextHolder.java +++ b/yshop-common/src/main/java/co/yixiang/utils/SpringContextHolder.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -58,7 +57,7 @@ public class SpringContextHolder implements ApplicationContextAware, DisposableB } @Override - public void destroy() { + public void destroy(){ SpringContextHolder.clearHolder(); } 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 d133e8012363adbcbede4ac1cdba4acf0fbbdc4b..e4bfaf6a2d3a14d470334e10ff1661416a13a3ea 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/SpringContextUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/SpringContextUtils.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -16,32 +15,32 @@ 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) - throws BeansException { - SpringContextUtils.applicationContext = applicationContext; - } + @Override + public void setApplicationContext(ApplicationContext applicationContext) + throws BeansException { + SpringContextUtils.applicationContext = applicationContext; + } - public static Object getBean(String name) { - return applicationContext.getBean(name); - } + public static Object getBean(String name) { + return applicationContext.getBean(name); + } - public static T getBean(String name, Class requiredType) { - return applicationContext.getBean(name, requiredType); - } + public static T getBean(String name, Class requiredType) { + return applicationContext.getBean(name, requiredType); + } - public static boolean containsBean(String name) { - return applicationContext.containsBean(name); - } + public static boolean containsBean(String name) { + return applicationContext.containsBean(name); + } - public static boolean isSingleton(String name) { - return applicationContext.isSingleton(name); - } + public static boolean isSingleton(String name) { + return applicationContext.isSingleton(name); + } - public static Class getType(String name) { - return applicationContext.getType(name); - } + public static Class getType(String name) { + return applicationContext.getType(name); + } } 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 a034a8e811a91a23c59ae165ef0f041ccd51d1f2..b14f7bc58d84480df843fc81e23c51011de84fa5 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/StringUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/StringUtils.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -132,7 +131,7 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { if (ip.contains(comma)) { ip = ip.split(",")[0]; } - if (localhost.equals(ip)) { + if (localhost.equals(ip)) { // 获取本机真正的ip地址 try { ip = InetAddress.getLocalHost().getHostAddress(); @@ -147,12 +146,10 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { * 根据ip获取详细地址 */ public static String getCityInfo(String ip) { - String api = String.format(YshopConstant.Url.IP_URL, ip); - JSONObject object = JSONUtil.parseObj(HttpUtil.get(api)); - return object.get("addr", String.class); + return "未知"; } - public static String getBrowser(HttpServletRequest request) { + public static String getBrowser(HttpServletRequest request){ UserAgent userAgent = UserAgent.parseUserAgentString(request.getHeader("User-Agent")); Browser browser = userAgent.getBrowser(); return browser.getName(); @@ -161,13 +158,13 @@ public class StringUtils extends org.apache.commons.lang3.StringUtils { /** * 获得当天是周几 */ - public static String getWeekDay() { + public static String getWeekDay(){ String[] weekDays = {"Sun", "Mon", "Tue", "Wed", "Thu", "Fri", "Sat"}; Calendar cal = Calendar.getInstance(); cal.setTime(new Date()); int w = cal.get(Calendar.DAY_OF_WEEK) - 1; - if (w < 0) { + if (w < 0){ w = 0; } return weekDays[w]; 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 2fb242419d1ec95d867a7284542a508b1ec9529f..7bc8448a5087e161bf60f1322f8c0b9ffb1cb5ae 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/ThrowableUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/ThrowableUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -21,7 +20,7 @@ public class ThrowableUtil { /** * 获取堆栈信息 */ - public static String getStackTrace(Throwable throwable) { + public static String getStackTrace(Throwable throwable){ StringWriter sw = new StringWriter(); try (PrintWriter pw = new PrintWriter(sw)) { throwable.printStackTrace(pw); @@ -29,7 +28,7 @@ public class ThrowableUtil { } } - public static void throwForeignKeyException(Throwable e, String msg) { + public static void throwForeignKeyException(Throwable e, String msg){ Throwable t = e.getCause(); while ((t != null) && !(t instanceof ConstraintViolationException)) { t = t.getCause(); 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 6e7911684ded8ac08be775e504e9d01874199155..96040fadb66dab9aad787873ff1b15e6662bf474 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/TranslatorUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/TranslatorUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -20,7 +19,7 @@ import java.net.URLEncoder; */ public class TranslatorUtil { - public static String translate(String word) { + public static String translate(String word){ try { String url = "https://translate.googleapis.com/translate_a/single?" + "client=gtx&" + @@ -42,12 +41,12 @@ public class TranslatorUtil { } in.close(); return parseResult(response.toString()); - } catch (Exception e) { - return word; + }catch (Exception e){ + return word; } } - private static String parseResult(String inputJson) { + private static String parseResult(String inputJson){ JSONArray jsonArray2 = (JSONArray) new JSONArray(inputJson).get(0); StringBuilder result = new StringBuilder(); for (Object o : jsonArray2) { 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 dbe25c592790eb15bb271f84aabb3f1e9f033333..9b5b4e019e2e257a048dfc28226a15ce865fd7fd 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/TreeUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/TreeUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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 4abb368cc1c2d096ab87b7283e98c33f12975e30..4cae9e7adce05b630eed318f73e50a156abe8d59 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/ValidationUtil.java +++ b/yshop-common/src/main/java/co/yixiang/utils/ValidationUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -15,14 +14,14 @@ import org.hibernate.validator.internal.constraintvalidators.hv.EmailValidator; * @author Zheng Jie * @date 2018-11-23 */ -public class ValidationUtil { +public class ValidationUtil{ /** * 验证空 */ - public static void isNull(Object obj, String entity, String parameter, Object value) { - if (ObjectUtil.isNull(obj)) { - String msg = entity + " 不存在: " + parameter + " is " + value; + public static void isNull(Object obj, String entity, String parameter , Object value){ + if(ObjectUtil.isNull(obj)){ + String msg = entity + " 不存在: "+ parameter +" is "+ value; throw new BadRequestException(msg); } } 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 48ebcdec889f87dda0f8cdb6a31ab98e93ed43ee..3de0c1e62849712b9f7cc2efafce4a2b33ed1205 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/YshopConstant.java +++ b/yshop-common/src/main/java/co/yixiang/utils/YshopConstant.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.utils; @@ -20,7 +19,7 @@ public class YshopConstant { /** * 常用接口 */ - public static class Url { + public static class Url{ //免费图床 public static final String SM_MS_URL = "https://sm.ms/api"; diff --git a/yshop-common/src/main/java/co/yixiang/utils/html/EscapeUtil.java b/yshop-common/src/main/java/co/yixiang/utils/html/EscapeUtil.java new file mode 100644 index 0000000000000000000000000000000000000000..0d4986f576bfabdbb6459717f31364bd95a8771e --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/utils/html/EscapeUtil.java @@ -0,0 +1,154 @@ +package co.yixiang.utils.html; + +import cn.hutool.core.util.StrUtil; + + +/** + * 转义和反转义工具类 + * @author hupeng + */ +public class EscapeUtil +{ + public static final String RE_HTML_MARK = "(<[^<]*?>)|(<[\\s]*?/[^<]*?>)|(<[^<]*?/[\\s]*?>)"; + + private static final char[][] TEXT = new char[64][]; + + static + { + for (int i = 0; i < 64; i++) + { + TEXT[i] = new char[] { (char) i }; + } + + // special HTML characters + TEXT['\''] = "'".toCharArray(); // 单引号 + TEXT['"'] = """.toCharArray(); // 单引号 + TEXT['&'] = "&".toCharArray(); // &符 + TEXT['<'] = "<".toCharArray(); // 小于号 + TEXT['>'] = ">".toCharArray(); // 大于号 + } + + /** + * 转义文本中的HTML字符为安全的字符 + * + * @param text 被转义的文本 + * @return 转义后的文本 + */ + public static String escape(String text) + { + return encode(text); + } + + /** + * 还原被转义的HTML特殊字符 + * + * @param content 包含转义符的HTML内容 + * @return 转换后的字符串 + */ + public static String unescape(String content) + { + return decode(content); + } + + /** + * 清除所有HTML标签,但是不删除标签内的内容 + * + * @param content 文本 + * @return 清除标签后的文本 + */ + public static String clean(String content) + { + return new HTMLFilter().filter(content); + } + + /** + * Escape编码 + * + * @param text 被编码的文本 + * @return 编码后的字符 + */ + private static String encode(String text) + { + int len; + if ((text == null) || ((len = text.length()) == 0)) + { + return StrUtil.EMPTY; + } + StringBuilder buffer = new StringBuilder(len + (len >> 2)); + char c; + for (int i = 0; i < len; i++) + { + c = text.charAt(i); + if (c < 64) + { + buffer.append(TEXT[c]); + } + else + { + buffer.append(c); + } + } + return buffer.toString(); + } + + /** + * Escape解码 + * + * @param content 被转义的内容 + * @return 解码后的字符串 + */ + public static String decode(String content) + { + if (StrUtil.isEmpty(content)) + { + return content; + } + + StringBuilder tmp = new StringBuilder(content.length()); + int lastPos = 0, pos = 0; + char ch; + while (lastPos < content.length()) + { + pos = content.indexOf("%", lastPos); + if (pos == lastPos) + { + if (content.charAt(pos + 1) == 'u') + { + ch = (char) Integer.parseInt(content.substring(pos + 2, pos + 6), 16); + tmp.append(ch); + lastPos = pos + 6; + } + else + { + ch = (char) Integer.parseInt(content.substring(pos + 1, pos + 3), 16); + tmp.append(ch); + lastPos = pos + 3; + } + } + else + { + if (pos == -1) + { + tmp.append(content.substring(lastPos)); + lastPos = content.length(); + } + else + { + tmp.append(content.substring(lastPos, pos)); + lastPos = pos; + } + } + } + return tmp.toString(); + } + + public static void main(String[] args) + { + String html = ""; + // String html = "ipt>alert(\"XSS\")ipt>"; + // String html = "<123"; + System.out.println(EscapeUtil.clean(html)); + System.out.println(EscapeUtil.escape(html)); + System.out.println(EscapeUtil.unescape(html)); + } +} diff --git a/yshop-common/src/main/java/co/yixiang/utils/html/HTMLFilter.java b/yshop-common/src/main/java/co/yixiang/utils/html/HTMLFilter.java new file mode 100644 index 0000000000000000000000000000000000000000..1f3be192cf619001fc81c3d1961bae608fbc2fd0 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/utils/html/HTMLFilter.java @@ -0,0 +1,570 @@ +package co.yixiang.utils.html; + +import java.util.ArrayList; +import java.util.Collections; +import java.util.HashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.ConcurrentHashMap; +import java.util.concurrent.ConcurrentMap; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * HTML过滤器,用于去除XSS漏洞隐患。 + * + * @author hupeng + */ +public final class HTMLFilter +{ + /** + * regex flag union representing /si modifiers in php + **/ + private static final int REGEX_FLAGS_SI = Pattern.CASE_INSENSITIVE | Pattern.DOTALL; + private static final Pattern P_COMMENTS = Pattern.compile("", Pattern.DOTALL); + private static final Pattern P_COMMENT = Pattern.compile("^!--(.*)--$", REGEX_FLAGS_SI); + private static final Pattern P_TAGS = Pattern.compile("<(.*?)>", Pattern.DOTALL); + private static final Pattern P_END_TAG = Pattern.compile("^/([a-z0-9]+)", REGEX_FLAGS_SI); + private static final Pattern P_START_TAG = Pattern.compile("^([a-z0-9]+)(.*?)(/?)$", REGEX_FLAGS_SI); + private static final Pattern P_QUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)=([\"'])(.*?)\\2", REGEX_FLAGS_SI); + private static final Pattern P_UNQUOTED_ATTRIBUTES = Pattern.compile("([a-z0-9]+)(=)([^\"\\s']+)", REGEX_FLAGS_SI); + private static final Pattern P_PROTOCOL = Pattern.compile("^([^:]+):", REGEX_FLAGS_SI); + private static final Pattern P_ENTITY = Pattern.compile("&#(\\d+);?"); + private static final Pattern P_ENTITY_UNICODE = Pattern.compile("&#x([0-9a-f]+);?"); + private static final Pattern P_ENCODE = Pattern.compile("%([0-9a-f]{2});?"); + private static final Pattern P_VALID_ENTITIES = Pattern.compile("&([^&;]*)(?=(;|&|$))"); + private static final Pattern P_VALID_QUOTES = Pattern.compile("(>|^)([^<]+?)(<|$)", Pattern.DOTALL); + private static final Pattern P_END_ARROW = Pattern.compile("^>"); + // private static final Pattern P_BODY_TO_END = Pattern.compile("<([^>]*?)(?=<|$)"); + private static final Pattern P_XML_CONTENT = Pattern.compile("(^|>)([^<]*?)(?=>)"); + private static final Pattern P_STRAY_LEFT_ARROW = Pattern.compile("<([^>]*?)(?=<|$)"); + private static final Pattern P_STRAY_RIGHT_ARROW = Pattern.compile("(^|>)([^<]*?)(?=>)"); + private static final Pattern P_AMP = Pattern.compile("&"); + private static final Pattern P_QUOTE = Pattern.compile("\""); + private static final Pattern P_LEFT_ARROW = Pattern.compile("<"); + private static final Pattern P_RIGHT_ARROW = Pattern.compile(">"); + private static final Pattern P_BOTH_ARROWS = Pattern.compile("<>"); + + // @xxx could grow large... maybe use sesat's ReferenceMap + private static final ConcurrentMap P_REMOVE_PAIR_BLANKS = new ConcurrentHashMap<>(); + private static final ConcurrentMap P_REMOVE_SELF_BLANKS = new ConcurrentHashMap<>(); + + /** + * set of allowed html elements, along with allowed attributes for each element + **/ + private final Map> vAllowed; + /** + * counts of open tags for each (allowable) html element + **/ + private final Map vTagCounts = new HashMap<>(); + + /** + * html elements which must always be self-closing (e.g. "") + **/ + private final String[] vSelfClosingTags; + /** + * html elements which must always have separate opening and closing tags (e.g. "") + **/ + private final String[] vNeedClosingTags; + /** + * set of disallowed html elements + **/ + private final String[] vDisallowed; + /** + * attributes which should be checked for valid protocols + **/ + private final String[] vProtocolAtts; + /** + * allowed protocols + **/ + private final String[] vAllowedProtocols; + /** + * tags which should be removed if they contain no content (e.g. "" or "") + **/ + private final String[] vRemoveBlanks; + /** + * entities allowed within html markup + **/ + private final String[] vAllowedEntities; + /** + * flag determining whether comments are allowed in input String. + */ + private final boolean stripComment; + private final boolean encodeQuotes; + /** + * flag determining whether to try to make tags when presented with "unbalanced" angle brackets (e.g. "" + * becomes " text "). If set to false, unbalanced angle brackets will be html escaped. + */ + private final boolean alwaysMakeTags; + + /** + * Default constructor. + */ + public HTMLFilter() + { + vAllowed = new HashMap<>(); + + final ArrayList a_atts = new ArrayList<>(); + a_atts.add("href"); + a_atts.add("target"); + vAllowed.put("a", a_atts); + + final ArrayList img_atts = new ArrayList<>(); + img_atts.add("src"); + img_atts.add("width"); + img_atts.add("height"); + img_atts.add("alt"); + vAllowed.put("img", img_atts); + + final ArrayList no_atts = new ArrayList<>(); + vAllowed.put("b", no_atts); + vAllowed.put("strong", no_atts); + vAllowed.put("i", no_atts); + vAllowed.put("em", no_atts); + + vSelfClosingTags = new String[] { "img" }; + vNeedClosingTags = new String[] { "a", "b", "strong", "i", "em" }; + vDisallowed = new String[] {}; + vAllowedProtocols = new String[] { "http", "mailto", "https" }; // no ftp. + vProtocolAtts = new String[] { "src", "href" }; + vRemoveBlanks = new String[] { "a", "b", "strong", "i", "em" }; + vAllowedEntities = new String[] { "amp", "gt", "lt", "quot" }; + stripComment = true; + encodeQuotes = true; + alwaysMakeTags = true; + } + + /** + * Map-parameter configurable constructor. + * + * @param conf map containing configuration. keys match field names. + */ + @SuppressWarnings("unchecked") + public HTMLFilter(final Map conf) + { + + assert conf.containsKey("vAllowed") : "configuration requires vAllowed"; + assert conf.containsKey("vSelfClosingTags") : "configuration requires vSelfClosingTags"; + assert conf.containsKey("vNeedClosingTags") : "configuration requires vNeedClosingTags"; + assert conf.containsKey("vDisallowed") : "configuration requires vDisallowed"; + assert conf.containsKey("vAllowedProtocols") : "configuration requires vAllowedProtocols"; + assert conf.containsKey("vProtocolAtts") : "configuration requires vProtocolAtts"; + assert conf.containsKey("vRemoveBlanks") : "configuration requires vRemoveBlanks"; + assert conf.containsKey("vAllowedEntities") : "configuration requires vAllowedEntities"; + + vAllowed = Collections.unmodifiableMap((HashMap>) conf.get("vAllowed")); + vSelfClosingTags = (String[]) conf.get("vSelfClosingTags"); + vNeedClosingTags = (String[]) conf.get("vNeedClosingTags"); + vDisallowed = (String[]) conf.get("vDisallowed"); + vAllowedProtocols = (String[]) conf.get("vAllowedProtocols"); + vProtocolAtts = (String[]) conf.get("vProtocolAtts"); + vRemoveBlanks = (String[]) conf.get("vRemoveBlanks"); + vAllowedEntities = (String[]) conf.get("vAllowedEntities"); + stripComment = conf.containsKey("stripComment") ? (Boolean) conf.get("stripComment") : true; + encodeQuotes = conf.containsKey("encodeQuotes") ? (Boolean) conf.get("encodeQuotes") : true; + alwaysMakeTags = conf.containsKey("alwaysMakeTags") ? (Boolean) conf.get("alwaysMakeTags") : true; + } + + private void reset() + { + vTagCounts.clear(); + } + + // --------------------------------------------------------------- + // my versions of some PHP library functions + public static String chr(final int decimal) + { + return String.valueOf((char) decimal); + } + + public static String htmlSpecialChars(final String s) + { + String result = s; + result = regexReplace(P_AMP, "&", result); + result = regexReplace(P_QUOTE, """, result); + result = regexReplace(P_LEFT_ARROW, "<", result); + result = regexReplace(P_RIGHT_ARROW, ">", result); + return result; + } + + // --------------------------------------------------------------- + + /** + * given a user submitted input String, filter out any invalid or restricted html. + * + * @param input text (i.e. submitted by a user) than may contain html + * @return "clean" version of input, with only valid, whitelisted html elements allowed + */ + public String filter(final String input) + { + reset(); + String s = input; + + s = escapeComments(s); + + s = balanceHTML(s); + + s = checkTags(s); + + s = processRemoveBlanks(s); + + s = validateEntities(s); + + return s; + } + + public boolean isAlwaysMakeTags() + { + return alwaysMakeTags; + } + + public boolean isStripComments() + { + return stripComment; + } + + private String escapeComments(final String s) + { + final Matcher m = P_COMMENTS.matcher(s); + final StringBuffer buf = new StringBuffer(); + if (m.find()) + { + final String match = m.group(1); // (.*?) + m.appendReplacement(buf, Matcher.quoteReplacement("")); + } + m.appendTail(buf); + + return buf.toString(); + } + + private String balanceHTML(String s) + { + if (alwaysMakeTags) + { + // + // try and form html + // + s = regexReplace(P_END_ARROW, "", s); + // 不追加结束标签 + // s = regexReplace(P_BODY_TO_END, "<$1>", s); + s = regexReplace(P_XML_CONTENT, "$1<$2", s); + + } + else + { + // + // escape stray brackets + // + s = regexReplace(P_STRAY_LEFT_ARROW, "<$1", s); + s = regexReplace(P_STRAY_RIGHT_ARROW, "$1$2><", s); + + // + // the last regexp causes '<>' entities to appear + // (we need to do a lookahead assertion so that the last bracket can + // be used in the next pass of the regexp) + // + s = regexReplace(P_BOTH_ARROWS, "", s); + } + + return s; + } + + private String checkTags(String s) + { + Matcher m = P_TAGS.matcher(s); + + final StringBuffer buf = new StringBuffer(); + while (m.find()) + { + String replaceStr = m.group(1); + replaceStr = processTag(replaceStr); + m.appendReplacement(buf, Matcher.quoteReplacement(replaceStr)); + } + m.appendTail(buf); + + // these get tallied in processTag + // (remember to reset before subsequent calls to filter method) + final StringBuilder sBuilder = new StringBuilder(buf.toString()); + for (String key : vTagCounts.keySet()) + { + for (int ii = 0; ii < vTagCounts.get(key); ii++) + { + sBuilder.append(""); + } + } + s = sBuilder.toString(); + + return s; + } + + private String processRemoveBlanks(final String s) + { + String result = s; + for (String tag : vRemoveBlanks) + { + if (!P_REMOVE_PAIR_BLANKS.containsKey(tag)) + { + P_REMOVE_PAIR_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?>")); + } + result = regexReplace(P_REMOVE_PAIR_BLANKS.get(tag), "", result); + if (!P_REMOVE_SELF_BLANKS.containsKey(tag)) + { + P_REMOVE_SELF_BLANKS.putIfAbsent(tag, Pattern.compile("<" + tag + "(\\s[^>]*)?/>")); + } + result = regexReplace(P_REMOVE_SELF_BLANKS.get(tag), "", result); + } + + return result; + } + + private static String regexReplace(final Pattern regex_pattern, final String replacement, final String s) + { + Matcher m = regex_pattern.matcher(s); + return m.replaceAll(replacement); + } + + private String processTag(final String s) + { + // ending tags + Matcher m = P_END_TAG.matcher(s); + if (m.find()) + { + final String name = m.group(1).toLowerCase(); + if (allowed(name)) + { + if (false == inArray(name, vSelfClosingTags)) + { + if (vTagCounts.containsKey(name)) + { + vTagCounts.put(name, vTagCounts.get(name) - 1); + return ""; + } + } + } + } + + // starting tags + m = P_START_TAG.matcher(s); + if (m.find()) + { + final String name = m.group(1).toLowerCase(); + final String body = m.group(2); + String ending = m.group(3); + + // debug( "in a starting tag, name='" + name + "'; body='" + body + "'; ending='" + ending + "'" ); + if (allowed(name)) + { + final StringBuilder params = new StringBuilder(); + + final Matcher m2 = P_QUOTED_ATTRIBUTES.matcher(body); + final Matcher m3 = P_UNQUOTED_ATTRIBUTES.matcher(body); + final List paramNames = new ArrayList<>(); + final List paramValues = new ArrayList<>(); + while (m2.find()) + { + paramNames.add(m2.group(1)); // ([a-z0-9]+) + paramValues.add(m2.group(3)); // (.*?) + } + while (m3.find()) + { + paramNames.add(m3.group(1)); // ([a-z0-9]+) + paramValues.add(m3.group(3)); // ([^\"\\s']+) + } + + String paramName, paramValue; + for (int ii = 0; ii < paramNames.size(); ii++) + { + paramName = paramNames.get(ii).toLowerCase(); + paramValue = paramValues.get(ii); + + // debug( "paramName='" + paramName + "'" ); + // debug( "paramValue='" + paramValue + "'" ); + // debug( "allowed? " + vAllowed.get( name ).contains( paramName ) ); + + if (allowedAttribute(name, paramName)) + { + if (inArray(paramName, vProtocolAtts)) + { + paramValue = processParamProtocol(paramValue); + } + params.append(' ').append(paramName).append("=\"").append(paramValue).append("\""); + } + } + + if (inArray(name, vSelfClosingTags)) + { + ending = " /"; + } + + if (inArray(name, vNeedClosingTags)) + { + ending = ""; + } + + if (ending == null || ending.length() < 1) + { + if (vTagCounts.containsKey(name)) + { + vTagCounts.put(name, vTagCounts.get(name) + 1); + } + else + { + vTagCounts.put(name, 1); + } + } + else + { + ending = " /"; + } + return "<" + name + params + ending + ">"; + } + else + { + return ""; + } + } + + // comments + m = P_COMMENT.matcher(s); + if (!stripComment && m.find()) + { + return "<" + m.group() + ">"; + } + + return ""; + } + + private String processParamProtocol(String s) + { + s = decodeEntities(s); + final Matcher m = P_PROTOCOL.matcher(s); + if (m.find()) + { + final String protocol = m.group(1); + if (!inArray(protocol, vAllowedProtocols)) + { + // bad protocol, turn into local anchor link instead + s = "#" + s.substring(protocol.length() + 1); + if (s.startsWith("#//")) + { + s = "#" + s.substring(3); + } + } + } + + return s; + } + + private String decodeEntities(String s) + { + StringBuffer buf = new StringBuffer(); + + Matcher m = P_ENTITY.matcher(s); + while (m.find()) + { + final String match = m.group(1); + final int decimal = Integer.decode(match).intValue(); + m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); + } + m.appendTail(buf); + s = buf.toString(); + + buf = new StringBuffer(); + m = P_ENTITY_UNICODE.matcher(s); + while (m.find()) + { + final String match = m.group(1); + final int decimal = Integer.valueOf(match, 16).intValue(); + m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); + } + m.appendTail(buf); + s = buf.toString(); + + buf = new StringBuffer(); + m = P_ENCODE.matcher(s); + while (m.find()) + { + final String match = m.group(1); + final int decimal = Integer.valueOf(match, 16).intValue(); + m.appendReplacement(buf, Matcher.quoteReplacement(chr(decimal))); + } + m.appendTail(buf); + s = buf.toString(); + + s = validateEntities(s); + return s; + } + + private String validateEntities(final String s) + { + StringBuffer buf = new StringBuffer(); + + // validate entities throughout the string + Matcher m = P_VALID_ENTITIES.matcher(s); + while (m.find()) + { + final String one = m.group(1); // ([^&;]*) + final String two = m.group(2); // (?=(;|&|$)) + m.appendReplacement(buf, Matcher.quoteReplacement(checkEntity(one, two))); + } + m.appendTail(buf); + + return encodeQuotes(buf.toString()); + } + + private String encodeQuotes(final String s) + { + if (encodeQuotes) + { + StringBuffer buf = new StringBuffer(); + Matcher m = P_VALID_QUOTES.matcher(s); + while (m.find()) + { + final String one = m.group(1); // (>|^) + final String two = m.group(2); // ([^<]+?) + final String three = m.group(3); // (<|$) + // 不替换双引号为",防止json格式无效 regexReplace(P_QUOTE, """, two) + m.appendReplacement(buf, Matcher.quoteReplacement(one + two + three)); + } + m.appendTail(buf); + return buf.toString(); + } + else + { + return s; + } + } + + private String checkEntity(final String preamble, final String term) + { + + return ";".equals(term) && isValidEntity(preamble) ? '&' + preamble : "&" + preamble; + } + + private boolean isValidEntity(final String entity) + { + return inArray(entity, vAllowedEntities); + } + + private static boolean inArray(final String s, final String[] array) + { + for (String item : array) + { + if (item != null && item.equals(s)) + { + return true; + } + } + return false; + } + + private boolean allowed(final String name) + { + return (vAllowed.isEmpty() || vAllowed.containsKey(name)) && !inArray(name, vDisallowed); + } + + private boolean allowedAttribute(final String name, final String paramName) + { + return allowed(name) && (vAllowed.isEmpty() || vAllowed.get(name).contains(paramName)); + } +} diff --git a/yshop-common/src/main/java/co/yixiang/utils/location/GetTencentLocationVO.java b/yshop-common/src/main/java/co/yixiang/utils/location/GetTencentLocationVO.java new file mode 100644 index 0000000000000000000000000000000000000000..ce249105155b2d2a541a9a82d014fd1a79c767de --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/utils/location/GetTencentLocationVO.java @@ -0,0 +1,114 @@ +package co.yixiang.utils.location; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * @author :LionCity + * @date :Created in 2020-09-10 11:39 + * @description: + * @modified By: + * @version: + */ +@SuppressWarnings("ALL") +@Data +@ApiModel(value="腾讯地图返回对象") +public class GetTencentLocationVO implements Serializable { + + /** + * result : {"level":2,"similarity":0.8,"ad_info":{"adcode":"441302"},"reliability":1,"location":{"lng":114.38257,"lat":23.08464},"deviation":1000,"title":"惠城区","address_components":{"province":"广东省","city":"惠州市","street":"","district":"惠城区","street_number":""}} + * message : query ok + * status : 0 + */ + @ApiModelProperty(value = "地址解析结果") + private ResultBean result; + @ApiModelProperty(value = "状态说明") + private String message; + @ApiModelProperty(value = "状态码,0为正常") + private Integer status; + + @Data + @ApiModel(value="地址解析结果") + public static class ResultBean { + /** + * level : 2 + * similarity : 0.8 + * ad_info : {"adcode":"441302"} + * reliability : 1 + * location : {"lng":114.38257,"lat":23.08464} + * deviation : 1000 + * title : 惠城区 + * address_components : {"province":"广东省","city":"惠州市","street":"","district":"惠城区","street_number":""} + */ + + @ApiModelProperty(value = "解析到的坐标") + private LocationBean location; + @ApiModelProperty(value = "解析精度级别,分为11个级别,一般>=9即可采用(定位到点,精度较高) 也可根据实际业务需求自行调整") + private int level; + @ApiModelProperty(value = "即将下线,由reliability代替") + private double similarity; + + @ApiModelProperty(value = "行政区划信息") + private AdInfoBean ad_info; + @ApiModelProperty(value = "可信度参考") + private int reliability; + @ApiModelProperty(value = "即将下线,由level代替") + private int deviation; + @ApiModelProperty(value = "区信息") + private String title; + @ApiModelProperty(value = "行政区划信息") + private AddressComponentsBean address_components; + + + @Data + @ApiModel(value="行政区划信息") + public static class AdInfoBean { + /** + * adcode : 441302 + */ + @ApiModelProperty(value = "行政区划代码") + private String adcode; + + } + @Data + @ApiModel(value="解析到的坐标") + public static class LocationBean { + /** + * lng : 114.38257 + * lat : 23.08464 + */ + + @ApiModelProperty(value = "经度") + private double lng; + + @ApiModelProperty(value = "纬度") + private double lat; + + + } + @Data + @ApiModel(value="解析后的地址部件") + public static class AddressComponentsBean { + /** + * province : 广东省 + * city : 惠州市 + * street : + * district : 惠城区 + * street_number : + */ + @ApiModelProperty(value = "省") + private String province; + @ApiModelProperty(value = "市") + private String city; + @ApiModelProperty(value = "街道,可能为空字串") + private String street; + @ApiModelProperty(value = "区,可能为空字串") + private String district; + @ApiModelProperty(value = "门牌,可能为空字串") + private String street_number; + } + } +} diff --git a/yshop-common/src/main/java/co/yixiang/utils/LocationUtils.java b/yshop-common/src/main/java/co/yixiang/utils/location/LocationUtils.java similarity index 48% rename from yshop-common/src/main/java/co/yixiang/utils/LocationUtils.java rename to yshop-common/src/main/java/co/yixiang/utils/location/LocationUtils.java index c3f43b0cf837c13b744a3d1058fe6396b06c8be7..1657508e4afae9aa83ddaa98bdba668b6727e23f 100644 --- a/yshop-common/src/main/java/co/yixiang/utils/LocationUtils.java +++ b/yshop-common/src/main/java/co/yixiang/utils/location/LocationUtils.java @@ -1,46 +1,68 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.utils; - -import cn.hutool.core.util.NumberUtil; - -/** - * @ClassName LocationUtils - * @Author hupeng <610796224@qq.com> - * @Date 2020/3/24 - **/ -public class LocationUtils { - private static double EARTH_RADIUS = 6378.137; - - private static double rad(double d) { - return d * Math.PI / 180.0; - } - - /** - * 通过经纬度获取距离(单位:千米) - * @param lat1 - * @param lng1 - * @param lat2 - * @param lng2 - * @return - */ - public static double getDistance(double lat1, double lng1, double lat2, - double lng2) { - double radLat1 = rad(lat1); - double radLat2 = rad(lat2); - double a = radLat1 - radLat2; - double b = rad(lng1) - rad(lng2); - double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) - + Math.cos(radLat1) * Math.cos(radLat2) - * Math.pow(Math.sin(b / 2), 2))); - s = s * EARTH_RADIUS; - s = Math.round(s * 10000d) / 10000d; - //s = s*1000; - return NumberUtil.round(s, 2).doubleValue(); - //return s; - } -} +package co.yixiang.utils.location; + +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.StrUtil; +import cn.hutool.http.HttpUtil; +import co.yixiang.exception.BadRequestException; +import co.yixiang.utils.RedisUtil; +import co.yixiang.utils.ShopKeyUtils; +import com.alibaba.fastjson.JSONObject; + +/** + * 具体查看 https://lbs.qq.com/service/webService/webServiceGuide/webServiceGeocoder + * @author :LionCity + * @date :Created in 2020-09-10 11:46 + * @description: + * @modified By: + * @version: + */ +public class LocationUtils { + + private static double EARTH_RADIUS = 6378.137; + + private static double rad(double d) { + return d * Math.PI / 180.0; + } + + /** + * 腾讯地图地址解析 + */ + private static final String QQ_MAP_URL = "https://apis.map.qq.com/ws/geocoder/v1/"; + + + /** + * 通过经纬度获取距离(单位:千米) + * + * @param lat1 + * @param lng1 + * @param lat2 + * @param lng2 + * @return + */ + public static double getDistance(double lat1, double lng1, double lat2, + double lng2) { + double radLat1 = rad(lat1); + double radLat2 = rad(lat2); + double a = radLat1 - radLat2; + double b = rad(lng1) - rad(lng2); + double s = 2 * Math.asin(Math.sqrt(Math.pow(Math.sin(a / 2), 2) + + Math.cos(radLat1) * Math.cos(radLat2) + * Math.pow(Math.sin(b / 2), 2))); + s = s * EARTH_RADIUS; + s = Math.round(s * 10000d) / 10000d; + //s = s*1000; + return NumberUtil.round(s, 2).doubleValue(); + //return s; + } + + + public static GetTencentLocationVO getLocation(String addr) { + String key = RedisUtil.get(ShopKeyUtils.getTengXunMapKey()); + if (StrUtil.isBlank(key)) { + throw new BadRequestException("请先配置腾讯地图key"); + } + String url = StrUtil.format("?address={}&key={}", addr, key); + String json = HttpUtil.get(QQ_MAP_URL + url); + return JSONObject.parseObject(json, GetTencentLocationVO.class); + } +} diff --git a/yshop-common/src/main/java/co/yixiang/xss/XssFilter.java b/yshop-common/src/main/java/co/yixiang/xss/XssFilter.java new file mode 100644 index 0000000000000000000000000000000000000000..cd9aa4821dcb9f65cc386688da12d25e7db134e3 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/xss/XssFilter.java @@ -0,0 +1,98 @@ +package co.yixiang.xss; + +import cn.hutool.core.util.StrUtil; + +import javax.servlet.Filter; +import javax.servlet.FilterChain; +import javax.servlet.FilterConfig; +import javax.servlet.ServletException; +import javax.servlet.ServletRequest; +import javax.servlet.ServletResponse; +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.List; +import java.util.regex.Matcher; +import java.util.regex.Pattern; + +/** + * 防止XSS攻击的过滤器 + * + * @author ruoyi + */ +public class XssFilter implements Filter +{ + /** + * 排除链接 + */ + public List excludes = new ArrayList<>(); + + /** + * xss过滤开关 + */ + public boolean enabled = false; + + @Override + public void init(FilterConfig filterConfig) throws ServletException + { + String tempExcludes = filterConfig.getInitParameter("excludes"); + String tempEnabled = filterConfig.getInitParameter("enabled"); + if (StrUtil.isNotEmpty(tempExcludes)) + { + String[] url = tempExcludes.split(","); + for (int i = 0; url != null && i < url.length; i++) + { + excludes.add(url[i]); + } + } + if (StrUtil.isNotEmpty(tempEnabled)) + { + enabled = Boolean.valueOf(tempEnabled); + } + } + + @Override + public void doFilter(ServletRequest request, ServletResponse response, FilterChain chain) + throws IOException, ServletException + { + HttpServletRequest req = (HttpServletRequest) request; + HttpServletResponse resp = (HttpServletResponse) response; + if (handleExcludeURL(req, resp)) + { + chain.doFilter(request, response); + return; + } + XssHttpServletRequestWrapper xssRequest = new XssHttpServletRequestWrapper((HttpServletRequest) request); + chain.doFilter(xssRequest, response); + } + + private boolean handleExcludeURL(HttpServletRequest request, HttpServletResponse response) + { + if (!enabled) + { + return true; + } + if (excludes == null || excludes.isEmpty()) + { + return false; + } + String url = request.getServletPath(); + for (String pattern : excludes) + { + Pattern p = Pattern.compile("^" + pattern); + Matcher m = p.matcher(url); + if (m.find()) + { + return true; + } + } + return false; + } + + @Override + public void destroy() + { + + } +} diff --git a/yshop-common/src/main/java/co/yixiang/xss/XssHttpServletRequestWrapper.java b/yshop-common/src/main/java/co/yixiang/xss/XssHttpServletRequestWrapper.java new file mode 100644 index 0000000000000000000000000000000000000000..144c51ca75b451a4110f9995114f558fdcd176f3 --- /dev/null +++ b/yshop-common/src/main/java/co/yixiang/xss/XssHttpServletRequestWrapper.java @@ -0,0 +1,42 @@ +package co.yixiang.xss; + + + +import co.yixiang.utils.html.EscapeUtil; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletRequestWrapper; + +/** + * XSS过滤处理 + * + * @author ruoyi + */ +public class XssHttpServletRequestWrapper extends HttpServletRequestWrapper +{ + /** + * @param request + */ + public XssHttpServletRequestWrapper(HttpServletRequest request) + { + super(request); + } + + @Override + public String[] getParameterValues(String name) + { + String[] values = super.getParameterValues(name); + if (values != null) + { + int length = values.length; + String[] escapseValues = new String[length]; + for (int i = 0; i < length; i++) + { + // 防xss攻击和过滤前后空格 + escapseValues[i] = EscapeUtil.clean(values[i]).trim(); + } + return escapseValues; + } + return super.getParameterValues(name); + } +} \ No newline at end of file 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 index d5d0eddb40dca8cc86e8c71a84dab3f860fdb838..434f63d665805b6a2a08fc5ef08708993c5d25fc 100644 --- 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 @@ -1,5 +1,4 @@ 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; 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 index fa02b743b3b01c408c5a4e51f3b711f8c28ee498..caf8c747d4e6a672ffc822f8d5b7ec32bf92e283 100644 --- 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 @@ -1,14 +1,25 @@ package com.github.xiaoymin.knife4j.spring.util; import io.swagger.models.Model; -import io.swagger.models.properties.*; +import io.swagger.models.properties.AbstractProperty; +import io.swagger.models.properties.ArrayProperty; +import io.swagger.models.properties.BooleanProperty; +import io.swagger.models.properties.DateTimeProperty; +import io.swagger.models.properties.IntegerProperty; +import io.swagger.models.properties.LongProperty; +import io.swagger.models.properties.ObjectProperty; +import io.swagger.models.properties.Property; +import io.swagger.models.properties.PropertyBuilder; import io.swagger.models.properties.PropertyBuilder.PropertyId; +import io.swagger.models.properties.RefProperty; +import io.swagger.models.properties.StringProperty; import org.springframework.beans.BeanUtils; import java.util.HashMap; import java.util.Map; /** + * * @author LionCitys * @modified By: * @version: 1.0 @@ -46,7 +57,6 @@ public class SwaggerUtil { /** * 通过java类型获取Swagger类型 - * * @param type javaType * @return swaggerType */ @@ -90,9 +100,8 @@ public class SwaggerUtil { /** * 获取对象类型,主要是剥离第一层<> - * * @param type JsonResult>>> - * @return Map>> + * @return Map>> */ public static String getRealType(String type) { try { @@ -229,14 +238,14 @@ public class SwaggerUtil { } public static void main(String[] args) { - String[] ss = new String[]{"A«List«C1»»", "A«C2»", "A«B«String,«String,List«C4»»»»"}; + 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»»"}; + 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]); 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 0000000000000000000000000000000000000000..69507c530e9b790de282f39db8e8ef11ada3c6a4 --- /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/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/yshop-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index d7b32b23fad0963b8e73fbcbda515365f6ed221e..0000000000000000000000000000000000000000 --- a/yshop-common/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1 +0,0 @@ -co.yixiang.dozer.config.DozerMapperConfig diff --git a/yshop-common/src/main/resources/dozer/global-configuration.xml b/yshop-common/src/main/resources/dozer/global-configuration.xml index 8d514ab53d9501a9bfffe9f4b0a19314aa480978..f09f73297e2b2783b41e03c73bde10aeaef5328a 100644 --- a/yshop-common/src/main/resources/dozer/global-configuration.xml +++ b/yshop-common/src/main/resources/dozer/global-configuration.xml @@ -8,7 +8,7 @@ false diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/ColumnConfig.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/ColumnConfig.java index 7eaf95a4381d1cae3162d32a0cd93d1ce2e3dafa..3f82bcd8624d45abcb2e51261bb84be74fae3dfb 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/ColumnConfig.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/ColumnConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.domain; @@ -70,7 +69,7 @@ public class ColumnConfig { this.keyType = keyType; this.extra = extra; this.notNull = notNull; - if (GenUtil.PK.equalsIgnoreCase(keyType) && GenUtil.EXTRA.equalsIgnoreCase(extra)) { + if(GenUtil.PK.equalsIgnoreCase(keyType) && GenUtil.EXTRA.equalsIgnoreCase(extra)){ this.notNull = false; } this.remark = remark; diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/GenConfig.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/GenConfig.java index 2955b56a1d80c74adb932123cb1aa640363d5571..d4a058c5d55acedc93a2947da9a9a7d6abde85d8 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/GenConfig.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/GenConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.domain; @@ -23,7 +22,9 @@ public class GenConfig { public GenConfig(String tableName) { this.cover = false; - this.moduleName = "yshop-admin"; + this.moduleName = "yshop-mall"; + this.author = "hupeng"; + this.pack = "co.yixiang.modules"; this.tableName = tableName; } diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/vo/ColumnInfo.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/vo/ColumnInfo.java index cc2efa498984eaa362cfc811d3e94316c58edd56..b04ca6331022b00b735a822fd5ece80470971767 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/vo/ColumnInfo.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/vo/ColumnInfo.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.domain.vo; diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/vo/TableInfo.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/vo/TableInfo.java index a97d7eb90db7119dfd45aa19309ddf7edaeda962..89d080b0ae7bfe8bf0bf1bff207b55bc962d359d 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/vo/TableInfo.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/domain/vo/TableInfo.java @@ -1,11 +1,11 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.domain.vo; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; @@ -24,6 +24,7 @@ public class TableInfo { private Object tableName; /** 创建日期 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Object createTime; /** 数据库引擎 */ diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/rest/GenConfigController.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/rest/GenConfigController.java index 1154d2726912b1e4ff1118e609a2e7d8b2dac3b3..71bffe706b3fd55df9848fad0d36017919c37d20 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/rest/GenConfigController.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/rest/GenConfigController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.rest; @@ -13,7 +12,12 @@ import io.swagger.annotations.ApiOperation; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** * @author Zheng Jie @@ -32,13 +36,13 @@ public class GenConfigController { @ApiOperation("查询") @GetMapping(value = "/{tableName}") - public ResponseEntity get(@PathVariable String tableName) { + public ResponseEntity get(@PathVariable String tableName){ return new ResponseEntity<>(genConfigService.find(tableName), HttpStatus.OK); } @ApiOperation("修改") @PutMapping - public ResponseEntity emailConfig(@Validated @RequestBody GenConfig genConfig) { - return new ResponseEntity<>(genConfigService.update(genConfig.getTableName(), genConfig), HttpStatus.OK); + public ResponseEntity emailConfig(@Validated @RequestBody GenConfig genConfig){ + return new ResponseEntity<>(genConfigService.update(genConfig.getTableName(), genConfig),HttpStatus.OK); } } diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/rest/GeneratorController.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/rest/GeneratorController.java index a0c7c946cee607064ba67c050e61879b9fd52625..c98b40aa523ba345ef9c3f6a1ad08d7c54a99f0f 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/rest/GeneratorController.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/rest/GeneratorController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.rest; @@ -16,7 +15,14 @@ import io.swagger.annotations.ApiOperation; import org.springframework.beans.factory.annotation.Value; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletRequest; import javax.servlet.http.HttpServletResponse; @@ -45,35 +51,35 @@ public class GeneratorController { @ApiOperation("查询数据库数据") @GetMapping(value = "/tables/all") - public ResponseEntity getTables() { + public ResponseEntity getTables(){ return new ResponseEntity<>(generatorService.getTables(), HttpStatus.OK); } @ApiOperation("查询数据库数据") @GetMapping(value = "/tables") public ResponseEntity getTables(@RequestParam(defaultValue = "") String name, - @RequestParam(defaultValue = "0") Integer page, - @RequestParam(defaultValue = "10") Integer size) { + @RequestParam(defaultValue = "0")Integer page, + @RequestParam(defaultValue = "10")Integer size){ return new ResponseEntity<>(generatorService.getTables(name, page, size), HttpStatus.OK); } @ApiOperation("查询字段数据") @GetMapping(value = "/columns") - public ResponseEntity getTables(@RequestParam String tableName) { + public ResponseEntity getTables(@RequestParam String tableName){ List columnInfos = generatorService.getColumns(tableName); - return new ResponseEntity<>(PageUtil.toPage(columnInfos, columnInfos.size()), HttpStatus.OK); + 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); } @ApiOperation("同步字段数据") @PostMapping(value = "sync") - public ResponseEntity sync(@RequestBody List tables) { + public ResponseEntity sync(@RequestBody List tables){ for (String table : tables) { generatorService.sync(generatorService.getColumns(table), generatorService.query(table)); } @@ -82,24 +88,20 @@ public class GeneratorController { @ApiOperation("生成代码") @PostMapping(value = "/{tableName}/{type}") - public ResponseEntity generator(@PathVariable String tableName, @PathVariable Integer type, HttpServletRequest request, HttpServletResponse response) { - if (!generatorEnabled && type == 0) { + public ResponseEntity generator(@PathVariable String tableName, @PathVariable Integer type, HttpServletRequest request, HttpServletResponse response){ + if(!generatorEnabled && type == 0){ throw new BadRequestException("此环境不允许生成代码,请选择预览或者下载查看!"); } - switch (type) { + switch (type){ // 生成代码 - case 0: - generatorService.generator(genConfigService.find(tableName), generatorService.getColumns(tableName)); - break; + case 0: generatorService.generator(genConfigService.find(tableName), generatorService.getColumns(tableName)); + break; // 预览 - case 1: - return generatorService.preview(genConfigService.find(tableName), generatorService.getColumns(tableName)); + case 1: return generatorService.preview(genConfigService.find(tableName), generatorService.getColumns(tableName)); // 打包 - case 2: - generatorService.download(genConfigService.find(tableName), generatorService.getColumns(tableName), request, response); - break; - default: - throw new BadRequestException("没有这个选项"); + case 2: generatorService.download(genConfigService.find(tableName), generatorService.getColumns(tableName), request, response); + break; + default: throw new BadRequestException("没有这个选项"); } return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/service/GenConfigService.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/service/GenConfigService.java index 5d6d8c4770dbb2308a6f57944790c133165b6328..1080c0faf9cbc2415c02c5c3cc651619fc475bf6 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/service/GenConfigService.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/service/GenConfigService.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.service; diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/service/GeneratorService.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/service/GeneratorService.java index 5bec362e9567f7e4c0467dbcc2360c7d076e7911..588a36d7713265c366adaf3fd6d637c06d814ae7 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/service/GeneratorService.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/service/GeneratorService.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.service; diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/service/impl/GenConfigServiceImpl.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/service/impl/GenConfigServiceImpl.java index 99c8fc99a2e0388dfd05999ca2497fbb21232049..f376ab085397270b14eb08a1cc283dc46c01b67e 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/service/impl/GenConfigServiceImpl.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/service/impl/GenConfigServiceImpl.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.service.impl; @@ -27,8 +26,8 @@ public class GenConfigServiceImpl extends BaseServiceImpl().eq(GenConfig::getTableName, tableName)); - if (genConfig == null) { + GenConfig genConfig = this.getOne(new LambdaQueryWrapper().eq(GenConfig::getTableName,tableName)); + if(genConfig == null){ return new GenConfig(tableName); } return genConfig; @@ -38,7 +37,7 @@ public class GenConfigServiceImpl extends BaseServiceImpl implements GeneratorService { @@ -53,18 +52,18 @@ public class GeneratorServiceImpl extends BaseServiceImpl pages = null; - if (page >= 0) page = page + 1; + if(page>=0)page = page + 1; Page pageModel = new Page<>(page, size); - pages = baseMapper.selectTablePage(pageModel, name); + pages = baseMapper.selectTablePage(pageModel,name); Integer totalElements = 0; - return PageUtil.toPage(pages.getRecords(), pages.getTotal()); + return PageUtil.toPage(pages.getRecords(),pages.getTotal()); } @Override public List getColumns(String tableName) { List columnInfos = this.list(new LambdaQueryWrapper() - .eq(ColumnConfig::getTableName, tableName).orderByAsc(ColumnConfig::getId)); - if (CollectionUtil.isNotEmpty(columnInfos)) { + .eq(ColumnConfig::getTableName,tableName).orderByAsc(ColumnConfig::getId)); + if(CollectionUtil.isNotEmpty(columnInfos)){ return columnInfos; } else { columnInfos = query(tableName); @@ -74,10 +73,10 @@ public class GeneratorServiceImpl extends BaseServiceImpl query(String tableName) { + public List query(String tableName){ List columnInfos = new ArrayList<>(); - List> result = baseMapper.queryByTableName(tableName); - for (Map map : result) { + List> result = baseMapper.queryByTableName(tableName); + for (Map map : result) { columnInfos.add( new ColumnConfig( @@ -85,7 +84,7 @@ public class GeneratorServiceImpl extends BaseServiceImpl 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)) { + if(CollectionUtil.isNotEmpty(columns)){ ColumnConfig column = columns.get(0); column.setColumnType(columnInfo.getColumnType()); column.setExtra(columnInfo.getExtra()); column.setKeyType(columnInfo.getKeyType()); - if (StringUtils.isBlank(column.getRemark())) { + if(StringUtils.isBlank(column.getRemark())){ column.setRemark(columnInfo.getRemark()); } this.saveOrUpdate(column); @@ -117,9 +116,9 @@ public class GeneratorServiceImpl extends BaseServiceImpl 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)) { + if(CollectionUtil.isEmpty(columns)){ this.removeById(columnInfo.getId()); } } @@ -132,7 +131,7 @@ public class GeneratorServiceImpl extends BaseServiceImpl columns) { - if (genConfig.getId() == null) { + if(genConfig.getId() == null){ throw new BadRequestException("请先配置生成器"); } try { @@ -145,21 +144,21 @@ public class GeneratorServiceImpl extends BaseServiceImpl preview(GenConfig genConfig, List columns) { - if (genConfig.getId() == null) { + if(genConfig.getId() == null){ throw new BadRequestException("请先配置生成器"); } - List> genList = GenUtil.preview(columns, genConfig); + List> genList = GenUtil.preview(columns, genConfig); return new ResponseEntity<>(genList, HttpStatus.OK); } @Override public void download(GenConfig genConfig, List columns, HttpServletRequest request, HttpServletResponse response) { - if (genConfig.getId() == null) { + if(genConfig.getId() == null){ throw new BadRequestException("请先配置生成器"); } try { File file = new File(GenUtil.download(columns, genConfig)); - String zipPath = file.getPath() + ".zip"; + String zipPath = file.getPath() + ".zip"; ZipUtil.zip(file.getPath(), zipPath); FileUtil.downloadFile(request, response, new File(zipPath), true); } catch (IOException e) { diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/service/mapper/ColumnInfoMapper.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/service/mapper/ColumnInfoMapper.java index 4886e2bbdf75a8630b97eef2f371136146562477..964f2e2daf1971cea0d8fdd191bd6fc0deb7d43e 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/service/mapper/ColumnInfoMapper.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/service/mapper/ColumnInfoMapper.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.service.mapper; @@ -26,13 +25,11 @@ public interface ColumnInfoMapper extends CoreMapper { @Select("") IPage selectTablePage(@Param("page") Page page, @Param("name") String name); - @Select("") List selectTables(); - @Select("SELECT COLUMN_NAME, IS_NULLABLE, DATA_TYPE, COLUMN_COMMENT, COLUMN_KEY, EXTRA FROM INFORMATION_SCHEMA.COLUMNS " + "WHERE TABLE_NAME = #{name} AND TABLE_SCHEMA = (SELECT DATABASE()) ORDER BY ORDINAL_POSITION") - List> queryByTableName(@Param("name") String name); + List> queryByTableName(@Param("name") String name); } diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/service/mapper/GenConfigMapper.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/service/mapper/GenConfigMapper.java index 3928cb0dbfefb4284be7e6dd86ab6641cd07abae..6c0548865ad88da7c580ec51794190badeaebf8b 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/service/mapper/GenConfigMapper.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/service/mapper/GenConfigMapper.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.service.mapper; diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/utils/ColUtil.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/utils/ColUtil.java index e2b55c2368d37491f9e83a374d5b9a94de9ea912..1c9558a09c4ade6d53f9294d1df0a56c973d57b4 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/utils/ColUtil.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/utils/ColUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.utils; @@ -23,10 +22,10 @@ public class ColUtil { * @param type 数据库字段类型 * @return String */ - static String cloToJava(String type) { + static String cloToJava(String type){ Configuration config = getConfig(); assert config != null; - return config.getString(type, "unknowType"); + return config.getString(type,"unknowType"); } /** @@ -34,7 +33,7 @@ public class ColUtil { */ public static PropertiesConfiguration getConfig() { try { - return new PropertiesConfiguration("generator.properties"); + return new PropertiesConfiguration("generator.properties" ); } catch (ConfigurationException e) { e.printStackTrace(); } diff --git a/yshop-generator/src/main/java/co/yixiang/modules/gen/utils/GenUtil.java b/yshop-generator/src/main/java/co/yixiang/modules/gen/utils/GenUtil.java index 1944ec9bbeddb5144b6982c26c5b98b72959b3a5..24ab7f259a431b256d1f45d5116bbd205f505c81 100644 --- a/yshop-generator/src/main/java/co/yixiang/modules/gen/utils/GenUtil.java +++ b/yshop-generator/src/main/java/co/yixiang/modules/gen/utils/GenUtil.java @@ -1,13 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.gen.utils; import cn.hutool.core.util.StrUtil; -import cn.hutool.extra.template.*; +import cn.hutool.extra.template.Template; +import cn.hutool.extra.template.TemplateConfig; +import cn.hutool.extra.template.TemplateEngine; +import cn.hutool.extra.template.TemplateException; +import cn.hutool.extra.template.TemplateUtil; import co.yixiang.modules.gen.domain.ColumnConfig; import co.yixiang.modules.gen.domain.GenConfig; import co.yixiang.utils.FileUtil; @@ -34,7 +37,7 @@ import java.util.Map; @SuppressWarnings("all") public class GenUtil { - private static final String TIMESTAMP = "Timestamp"; + private static final String DATE = "Date"; private static final String BIGDECIMAL = "BigDecimal"; @@ -79,14 +82,14 @@ public class GenUtil { } public static List> preview(List columns, GenConfig genConfig) { - Map genMap = getGenMap(columns, genConfig); - List> genList = new ArrayList<>(); + Map genMap = getGenMap(columns, genConfig); + List> genList = new ArrayList<>(); // 获取后端模版 List templates = getAdminTemplateNames(); TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); for (String templateName : templates) { - Map map = new HashMap<>(1); - Template template = engine.getTemplate("generator/admin/" + templateName + ".ftl"); + Map map = new HashMap<>(1); + Template template = engine.getTemplate("generator/admin/"+templateName+".ftl"); map.put("content", template.render(genMap)); map.put("name", templateName); genList.add(map); @@ -94,8 +97,8 @@ public class GenUtil { // 获取前端模版 templates = getFrontTemplateNames(); for (String templateName : templates) { - Map map = new HashMap<>(1); - Template template = engine.getTemplate("generator/front/" + templateName + ".ftl"); + Map map = new HashMap<>(1); + Template template = engine.getTemplate("generator/front/"+templateName+".ftl"); map.put(templateName, template.render(genMap)); map.put("content", template.render(genMap)); map.put("name", templateName); @@ -105,18 +108,18 @@ public class GenUtil { } 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); + 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)); // 生成后端代码 List templates = getAdminTemplateNames(); for (String templateName : templates) { - Template template = engine.getTemplate("generator/admin/" + templateName + ".ftl"); - String filePath = getAdminFilePath(templateName, genConfig, genMap.get("className").toString(), tempPath + "yshop" + File.separator); + Template template = engine.getTemplate("generator/admin/"+templateName+".ftl"); + String filePath = getAdminFilePath(templateName,genConfig,genMap.get("className").toString(),tempPath + "yshop" + File.separator); assert filePath != null; File file = new File(filePath); // 如果非覆盖生成 - if (!genConfig.getCover() && FileUtil.exist(file)) { + if(!genConfig.getCover() && FileUtil.exist(file)){ continue; } // 生成代码 @@ -125,15 +128,15 @@ public class GenUtil { // 生成前端代码 templates = getFrontTemplateNames(); for (String templateName : templates) { - Template template = engine.getTemplate("generator/front/" + templateName + ".ftl"); - String path = tempPath + "yshop-web" + File.separator; + Template template = engine.getTemplate("generator/front/"+templateName+".ftl"); + String path = tempPath + "yshop-rest" + File.separator; String apiPath = path + "src" + File.separator + "api" + File.separator; String srcPath = path + "src" + File.separator + "views" + File.separator + genMap.get("changeClassName").toString() + File.separator; String filePath = getFrontFilePath(templateName, apiPath, srcPath, genMap.get("changeClassName").toString()); assert filePath != null; File file = new File(filePath); // 如果非覆盖生成 - if (!genConfig.getCover() && FileUtil.exist(file)) { + if(!genConfig.getCover() && FileUtil.exist(file)){ continue; } // 生成代码 @@ -143,19 +146,19 @@ public class GenUtil { } public static void generatorCode(List columnInfos, GenConfig genConfig) throws IOException { - Map genMap = getGenMap(columnInfos, genConfig); + Map genMap = getGenMap(columnInfos, genConfig); TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); // 生成后端代码 List templates = getAdminTemplateNames(); for (String templateName : templates) { - Template template = engine.getTemplate("generator/admin/" + templateName + ".ftl"); - String filePath = getAdminFilePath(templateName, genConfig, genMap.get("className").toString(), System.getProperty("user.dir")); + Template template = engine.getTemplate("generator/admin/"+templateName+".ftl"); + String filePath = getAdminFilePath(templateName,genConfig,genMap.get("className").toString(),System.getProperty("user.dir")); assert filePath != null; File file = new File(filePath); // 如果非覆盖生成 - if (!genConfig.getCover() && FileUtil.exist(file)) { + if(!genConfig.getCover() && FileUtil.exist(file)){ continue; } // 生成代码 @@ -165,14 +168,14 @@ public class GenUtil { // 生成前端代码 templates = getFrontTemplateNames(); for (String templateName : templates) { - Template template = engine.getTemplate("generator/front/" + templateName + ".ftl"); - String filePath = getFrontFilePath(templateName, genConfig.getApiPath(), genConfig.getPath(), genMap.get("changeClassName").toString()); + Template template = engine.getTemplate("generator/front/"+templateName+".ftl"); + String filePath = getFrontFilePath(templateName,genConfig.getApiPath(),genConfig.getPath(),genMap.get("changeClassName").toString()); assert filePath != null; File file = new File(filePath); // 如果非覆盖生成 - if (!genConfig.getCover() && FileUtil.exist(file)) { + if(!genConfig.getCover() && FileUtil.exist(file)){ continue; } // 生成代码 @@ -181,147 +184,147 @@ public class GenUtil { } // 获取模版数据 - private static Map getGenMap(List columnInfos, GenConfig genConfig) { + private static Map getGenMap(List columnInfos, GenConfig genConfig) { // 存储模版字段数据 - Map genMap = new HashMap<>(16); + Map genMap = new HashMap<>(16); // 接口别名 - genMap.put("apiAlias", genConfig.getApiAlias()); + genMap.put("apiAlias",genConfig.getApiAlias()); // 包名称 - genMap.put("package", genConfig.getPack()); + genMap.put("package",genConfig.getPack()); // 模块名称 - genMap.put("moduleName", genConfig.getModuleName()); + genMap.put("moduleName",genConfig.getModuleName()); // 作者 - genMap.put("author", genConfig.getAuthor()); + genMap.put("author",genConfig.getAuthor()); // 创建日期 genMap.put("date", LocalDate.now().toString()); // 表名 - genMap.put("tableName", genConfig.getTableName()); + genMap.put("tableName",genConfig.getTableName()); // 大写开头的类名 String className = StringUtils.toCapitalizeCamelCase(genConfig.getTableName()); // 小写开头的类名 String changeClassName = StringUtils.toCamelCase(genConfig.getTableName()); // 判断是否去除表前缀 if (StringUtils.isNotEmpty(genConfig.getPrefix())) { - className = StringUtils.toCapitalizeCamelCase(StrUtil.removePrefix(genConfig.getTableName(), genConfig.getPrefix())); - changeClassName = StringUtils.toCamelCase(StrUtil.removePrefix(genConfig.getTableName(), genConfig.getPrefix())); + className = StringUtils.toCapitalizeCamelCase(StrUtil.removePrefix(genConfig.getTableName(),genConfig.getPrefix())); + changeClassName = StringUtils.toCamelCase(StrUtil.removePrefix(genConfig.getTableName(),genConfig.getPrefix())); } // 保存类名 genMap.put("className", className); // 保存小写开头的类名 genMap.put("changeClassName", changeClassName); // 存在 Timestamp 字段 - genMap.put("hasTimestamp", false); + genMap.put("hasDateTime",false); // 存在 Images 字段 - genMap.put("hasImages", false); + genMap.put("hasImages",false); // 查询类中存在 Timestamp 字段 - genMap.put("queryHasTimestamp", false); + genMap.put("queryHasDateTime",false); // 存在 BigDecimal 字段 - genMap.put("hasBigDecimal", false); + genMap.put("hasBigDecimal",false); // 查询类中存在 BigDecimal 字段 - genMap.put("queryHasBigDecimal", false); + genMap.put("queryHasBigDecimal",false); // 是否需要创建查询 - genMap.put("hasQuery", false); + genMap.put("hasQuery",false); // 自增主键 - genMap.put("auto", false); + genMap.put("auto",false); // 存在字典 - genMap.put("hasDict", false); + genMap.put("hasDict",false); // 存在日期注解 - genMap.put("hasDateAnnotation", false); + genMap.put("hasDateAnnotation",false); // 保存字段信息 - List> columns = new ArrayList<>(); + List> columns = new ArrayList<>(); // 保存查询字段的信息 - List> queryColumns = new ArrayList<>(); + List> queryColumns = new ArrayList<>(); // 存储字典信息 List dicts = new ArrayList<>(); // 存储 between 信息 - List> betweens = new ArrayList<>(); + List> betweens = new ArrayList<>(); // 存储不为空的字段信息 - List> isNotNullColumns = new ArrayList<>(); + List> isNotNullColumns = new ArrayList<>(); for (ColumnConfig column : columnInfos) { - Map listMap = new HashMap<>(16); + Map listMap = new HashMap<>(16); // 字段描述 - listMap.put("remark", column.getRemark()); + listMap.put("remark",column.getRemark()); // 字段类型 - listMap.put("columnKey", column.getKeyType()); + listMap.put("columnKey",column.getKeyType()); // 主键类型 String colType = ColUtil.cloToJava(column.getColumnType()); // 小写开头的字段名 String changeColumnName = StringUtils.toCamelCase(column.getColumnName().toString()); // 大写开头的字段名 String capitalColumnName = StringUtils.toCapitalizeCamelCase(column.getColumnName().toString()); - if (PK.equals(column.getKeyType())) { + if(PK.equals(column.getKeyType())){ // 存储主键类型 - genMap.put("pkColumnType", colType); + genMap.put("pkColumnType",colType); // 存储小写开头的字段名 - genMap.put("pkChangeColName", changeColumnName); + genMap.put("pkChangeColName",changeColumnName); // 存储大写开头的字段名 - genMap.put("pkCapitalColName", capitalColumnName); + genMap.put("pkCapitalColName",capitalColumnName); } - if ("Images".equals(column.getFormType())) { + if("Images".equals(column.getFormType())){ // 存在 Images 字段 - genMap.put("hasImages", true); + genMap.put("hasImages",true); } // 是否存在 Timestamp 类型的字段 - if (TIMESTAMP.equals(colType)) { - genMap.put("hasTimestamp", true); + if(DATE.equals(colType)){ + genMap.put("hasDateTime",true); } // 是否存在 BigDecimal 类型的字段 - if (BIGDECIMAL.equals(colType)) { - genMap.put("hasBigDecimal", true); + if(BIGDECIMAL.equals(colType)){ + genMap.put("hasBigDecimal",true); } // 主键是否自增 - if (EXTRA.equals(column.getExtra())) { - genMap.put("auto", true); + if(EXTRA.equals(column.getExtra())){ + genMap.put("auto",true); } // 主键存在字典 - if (StringUtils.isNotBlank(column.getDictName())) { - genMap.put("hasDict", true); + if(StringUtils.isNotBlank(column.getDictName())){ + genMap.put("hasDict",true); dicts.add(column.getDictName()); } // 存储字段类型 - listMap.put("columnType", colType); + listMap.put("columnType",colType); // 存储字原始段名称 - listMap.put("columnName", column.getColumnName()); + listMap.put("columnName",column.getColumnName()); // 不为空 - listMap.put("istNotNull", column.getNotNull()); + listMap.put("istNotNull",column.getNotNull()); // 字段列表显示 - listMap.put("columnShow", column.getListShow()); + listMap.put("columnShow",column.getListShow()); // 表单显示 - listMap.put("formShow", column.getFormShow()); + listMap.put("formShow",column.getFormShow()); // 表单组件类型 listMap.put("formType", StringUtils.isNotBlank(column.getFormType()) ? column.getFormType() : "Input"); // 小写开头的字段名称 - listMap.put("changeColumnName", changeColumnName); + listMap.put("changeColumnName",changeColumnName); //大写开头的字段名称 - listMap.put("capitalColumnName", capitalColumnName); + listMap.put("capitalColumnName",capitalColumnName); // 字典名称 - listMap.put("dictName", column.getDictName()); + listMap.put("dictName",column.getDictName()); // 日期注解 - listMap.put("dateAnnotation", column.getDateAnnotation()); - if (StringUtils.isNotBlank(column.getDateAnnotation())) { - genMap.put("hasDateAnnotation", true); + listMap.put("dateAnnotation",column.getDateAnnotation()); + if(StringUtils.isNotBlank(column.getDateAnnotation())){ + genMap.put("hasDateAnnotation",true); } // 添加非空字段信息 - if (column.getNotNull()) { + if(column.getNotNull()){ isNotNullColumns.add(listMap); } // 判断是否有查询,如有则把查询的字段set进columnQuery - if (!StringUtils.isBlank(column.getQueryType())) { + if(!StringUtils.isBlank(column.getQueryType())){ // 查询类型 - listMap.put("queryType", column.getQueryType()); + listMap.put("queryType",column.getQueryType()); // 是否存在查询 - genMap.put("hasQuery", true); - if (TIMESTAMP.equals(colType)) { + genMap.put("hasQuery",true); + if(DATE.equals(colType)){ // 查询中存储 Timestamp 类型 - genMap.put("queryHasTimestamp", true); + genMap.put("queryHasDateTime",true); } - if (BIGDECIMAL.equals(colType)) { + if(BIGDECIMAL.equals(colType)){ // 查询中存储 BigDecimal 类型 - genMap.put("queryHasBigDecimal", true); + genMap.put("queryHasBigDecimal",true); } - if ("between".equalsIgnoreCase(column.getQueryType())) { + if("between".equalsIgnoreCase(column.getQueryType())){ betweens.add(listMap); } else { // 添加到查询列表中 @@ -332,15 +335,15 @@ public class GenUtil { columns.add(listMap); } // 保存字段列表 - genMap.put("columns", columns); + genMap.put("columns",columns); // 保存查询列表 - genMap.put("queryColumns", queryColumns); + genMap.put("queryColumns",queryColumns); // 保存字段列表 - genMap.put("dicts", dicts); + genMap.put("dicts",dicts); // 保存查询列表 - genMap.put("betweens", betweens); + genMap.put("betweens",betweens); // 保存非空字段信息 - genMap.put("isNotNullColumns", isNotNullColumns); + genMap.put("isNotNullColumns",isNotNullColumns); return genMap; } @@ -349,7 +352,7 @@ public class GenUtil { */ private static String getAdminFilePath(String templateName, GenConfig genConfig, String className, String rootPath) { String projectPath = rootPath + File.separator + genConfig.getModuleName(); - String packagePath = projectPath + File.separator + "src" + File.separator + "main" + File.separator + "java" + File.separator; + String packagePath = projectPath + File.separator + "src" +File.separator+ "main" + File.separator + "java" + File.separator; if (!ObjectUtils.isEmpty(genConfig.getPack())) { packagePath += genConfig.getPack().replace(".", File.separator) + File.separator; } @@ -419,7 +422,7 @@ public class GenUtil { } if ("index".equals(templateName)) { - return path + File.separator + "index.vue"; + return path + File.separator + "index.vue"; } return null; diff --git a/yshop-logging/pom.xml b/yshop-logging/pom.xml index b7d9880f5c30744f4e8523dd520e7bdab89c788b..bb9cfc1ad2983ef95dc0fd37b3c431a4bb795fac 100644 --- a/yshop-logging/pom.xml +++ b/yshop-logging/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.3 + 3.3 4.0.0 @@ -16,12 +16,12 @@ co.yixiang yshop-common - 2.3 + 3.3 co.yixiang yshop-mproot - 2.3 + 3.3 compile diff --git a/yshop-shop/src/main/java/co/yixiang/modules/aop/NoRepeatSubmit.java b/yshop-logging/src/main/java/co/yixiang/modules/logging/aop/log/AppLog.java similarity index 58% rename from yshop-shop/src/main/java/co/yixiang/modules/aop/NoRepeatSubmit.java rename to yshop-logging/src/main/java/co/yixiang/modules/logging/aop/log/AppLog.java index a4450c3b314fdb5cb451c38c19a25e1a6f8fa7bf..7659907ba4822d9d0771909f5c0318fcd419b9b1 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/aop/NoRepeatSubmit.java +++ b/yshop-logging/src/main/java/co/yixiang/modules/logging/aop/log/AppLog.java @@ -1,25 +1,22 @@ -package co.yixiang.modules.aop; - /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ +package co.yixiang.modules.logging.aop.log; + import java.lang.annotation.ElementType; import java.lang.annotation.Retention; import java.lang.annotation.RetentionPolicy; import java.lang.annotation.Target; +/** + * @author hupeng + * @date 2018-11-24 + */ @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) -public @interface NoRepeatSubmit { - - /** - * 设置请求锁定时间 - * - * @return - */ - int lockTime() default 10; - +public @interface AppLog { + String value() default ""; + int type() default 0; } diff --git a/yshop-logging/src/main/java/co/yixiang/modules/logging/aop/log/Log.java b/yshop-logging/src/main/java/co/yixiang/modules/logging/aop/log/Log.java index 5b3c8298f84d9f1ff919cddf5bd4ff3a5696e36f..e2dfbf56a49ecf6757b469d11701309e29c79846 100644 --- a/yshop-logging/src/main/java/co/yixiang/modules/logging/aop/log/Log.java +++ b/yshop-logging/src/main/java/co/yixiang/modules/logging/aop/log/Log.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.logging.aop.log; @@ -18,7 +17,6 @@ import java.lang.annotation.Target; @Target(ElementType.METHOD) @Retention(RetentionPolicy.RUNTIME) public @interface Log { - String value() default ""; - - int type() default 0; + String value() default ""; + int type() default 0; } diff --git a/yshop-logging/src/main/java/co/yixiang/modules/logging/aspect/LogAspect.java b/yshop-logging/src/main/java/co/yixiang/modules/logging/aspect/LogAspect.java index ed95b7a99dae94aa55b50cb605faea60c446b66a..6fceda5fac3339fb05ab2f747c8dc4f022d72bd9 100644 --- a/yshop-logging/src/main/java/co/yixiang/modules/logging/aspect/LogAspect.java +++ b/yshop-logging/src/main/java/co/yixiang/modules/logging/aspect/LogAspect.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.logging.aspect; @@ -58,12 +57,12 @@ public class LogAspect { Object result; currentTime.set(System.currentTimeMillis()); result = joinPoint.proceed(); - Log log = new Log("INFO", System.currentTimeMillis() - currentTime.get()); + Log log = new Log("INFO",System.currentTimeMillis() - currentTime.get()); currentTime.remove(); HttpServletRequest request = RequestHolder.getHttpServletRequest(); logService.save(getUsername(), - StringUtils.getIp(RequestHolder.getHttpServletRequest()), joinPoint, - log, getUid()); + StringUtils.getIp(RequestHolder.getHttpServletRequest()),joinPoint, + log,getUid()); return result; } @@ -75,27 +74,27 @@ public class LogAspect { */ @AfterThrowing(pointcut = "logPointcut()", throwing = "e") public void logAfterThrowing(JoinPoint joinPoint, Throwable e) { - Log log = new Log("ERROR", System.currentTimeMillis() - currentTime.get()); + Log log = new Log("ERROR",System.currentTimeMillis() - currentTime.get()); currentTime.remove(); log.setExceptionDetail(ThrowableUtil.getStackTrace(e).getBytes()); HttpServletRequest request = RequestHolder.getHttpServletRequest(); logService.save(getUsername(), StringUtils.getIp(RequestHolder.getHttpServletRequest()), - (ProceedingJoinPoint) joinPoint, log, getUid()); + (ProceedingJoinPoint)joinPoint, log,getUid()); } public String getUsername() { try { return SecurityUtils.getUsername(); - } catch (Exception e) { + }catch (Exception e){ return ""; } } - public Long getUid() { + public Long getUid(){ try { return SecurityUtils.getUserId(); - } catch (Exception e) { + }catch (Exception e){ return 0L; } } diff --git a/yshop-logging/src/main/java/co/yixiang/modules/logging/domain/Log.java b/yshop-logging/src/main/java/co/yixiang/modules/logging/domain/Log.java index ee1586d28e5ad34a86be90c2610730bd8bda1a10..af67ae047fff7e078a4d332ebcf0146fba0cb7fa 100644 --- a/yshop-logging/src/main/java/co/yixiang/modules/logging/domain/Log.java +++ b/yshop-logging/src/main/java/co/yixiang/modules/logging/domain/Log.java @@ -1,28 +1,25 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.logging.domain; import co.yixiang.domain.BaseDomain; -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.EqualsAndHashCode; import lombok.NoArgsConstructor; -import java.io.Serializable; -import java.sql.Timestamp; - /** * @author hupeng * @date 2018-11-24 */ @Data -@TableName("log") +@EqualsAndHashCode(callSuper = true) +@TableName("sys_log") @NoArgsConstructor public class Log extends BaseDomain { @@ -66,6 +63,7 @@ public class Log extends BaseDomain { /** 异常详细 */ private byte[] exceptionDetail; + public Log(String logType, Long time) { this.logType = logType; this.time = time; diff --git a/yshop-logging/src/main/java/co/yixiang/modules/logging/rest/LogController.java b/yshop-logging/src/main/java/co/yixiang/modules/logging/rest/LogController.java index 517c32d6545717b5d7aca58aab5c1451bcc40ad6..af90bdb4176d475cb8361e4409460ca2fcba059a 100644 --- a/yshop-logging/src/main/java/co/yixiang/modules/logging/rest/LogController.java +++ b/yshop-logging/src/main/java/co/yixiang/modules/logging/rest/LogController.java @@ -1,22 +1,25 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.logging.rest; -import co.yixiang.enums.LogTypeEnum; import co.yixiang.modules.logging.aop.log.Log; import co.yixiang.modules.logging.service.LogService; import co.yixiang.modules.logging.service.dto.LogQueryCriteria; +import co.yixiang.utils.SecurityUtils; 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.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -42,7 +45,7 @@ public class LogController { @GetMapping(value = "/download") @PreAuthorize("@el.check('admin','log:list')") public void download(HttpServletResponse response, LogQueryCriteria criteria) throws IOException { - criteria.setLogType(LogTypeEnum.INFO.getDesc()); + criteria.setLogType("INFO"); logService.download(logService.queryAll(criteria), response); } @@ -51,48 +54,51 @@ public class LogController { @GetMapping(value = "/error/download") @PreAuthorize("@el.check('admin','log:list')") public void errorDownload(HttpServletResponse response, LogQueryCriteria criteria) throws IOException { - criteria.setLogType(LogTypeEnum.ERROR.getDesc()); + criteria.setLogType("ERROR"); logService.download(logService.queryAll(criteria), response); } - @GetMapping @ApiOperation("日志查询") @PreAuthorize("@el.check('admin','log:list')") - public ResponseEntity getLogs(LogQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(logService.queryAll(criteria, pageable), HttpStatus.OK); + 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('admin','log:list')") - public ResponseEntity getApiLogs(LogQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(logService.findAllByPageable(criteria, pageable), HttpStatus.OK); + public ResponseEntity getApiLogs(LogQueryCriteria criteria, Pageable pageable){ + criteria.setLogType("INFO"); + criteria.setType(1); + return new ResponseEntity(logService.findAllByPageable(criteria.getBlurry(),pageable), HttpStatus.OK); } - @GetMapping(value = "/user") @ApiOperation("用户日志查询") - public ResponseEntity getUserLogs(LogQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(logService.queryAllByUser(criteria, pageable), HttpStatus.OK); + public ResponseEntity getUserLogs(LogQueryCriteria criteria, Pageable pageable){ + criteria.setLogType("INFO"); + criteria.setBlurry(SecurityUtils.getUsername()); + return new ResponseEntity<>(logService.queryAllByUser(criteria,pageable), HttpStatus.OK); } @GetMapping(value = "/error") @ApiOperation("错误日志查询") @PreAuthorize("@el.check('admin','logError:list')") - public ResponseEntity getErrorLogs(LogQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(logService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getErrorLogs(LogQueryCriteria criteria, Pageable pageable){ + criteria.setLogType("ERROR"); + return new ResponseEntity<>(logService.queryAll(criteria,pageable), HttpStatus.OK); } @GetMapping(value = "/error/{id}") @ApiOperation("日志异常详情查询") @PreAuthorize("@el.check('admin','logError:detail')") - public ResponseEntity getErrorLogs(@PathVariable Long id) { + 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('admin','logError:remove')") - public ResponseEntity delAllByError() { + public ResponseEntity delAllByError(){ logService.delAllByError(); return new ResponseEntity<>(HttpStatus.OK); } @@ -101,7 +107,7 @@ public class LogController { @Log("删除所有INFO日志") @ApiOperation("删除所有INFO日志") @PreAuthorize("@el.check('admin','logInfo:remove')") - public ResponseEntity delAllByInfo() { + public ResponseEntity delAllByInfo(){ logService.delAllByInfo(); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-logging/src/main/java/co/yixiang/modules/logging/service/LogService.java b/yshop-logging/src/main/java/co/yixiang/modules/logging/service/LogService.java index 422341c3be5995be41610e5f23e48a24f24a3aad..03b99da1e0af21dbf0968ac7352052c042f07d7c 100644 --- a/yshop-logging/src/main/java/co/yixiang/modules/logging/service/LogService.java +++ b/yshop-logging/src/main/java/co/yixiang/modules/logging/service/LogService.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.logging.service; @@ -24,15 +23,8 @@ import java.util.List; public interface LogService extends BaseService { - /** - * 分页查询日志 - * - * @param criteria 标准 - * @param pageable 可分页 - * @return {@link Object} - */ - Object findAllByPageable(LogQueryCriteria criteria, Pageable pageable); + Object findAllByPageable(String nickname, Pageable pageable); /** * 分页查询 * @param criteria 查询条件 @@ -58,16 +50,23 @@ public interface LogService extends BaseService { /** * 保存日志数据 - * - * @param username 用户 - * @param ip 请求IP + * @param username 用户 + * @param ip 请求IP * @param joinPoint / - * @param log 日志实体 - * @param uid uid + * @param log 日志实体 */ @Async - void save(String username, String ip, ProceedingJoinPoint joinPoint, Log log, Long uid); + void save(String username, String ip, ProceedingJoinPoint joinPoint, Log log,Long uid); + /** + * 保存app日志数据 + * @param username 用户 + * @param ip 请求IP + * @param joinPoint / + * @param log 日志实体 + */ + @Async + void saveApp(String username, String ip, ProceedingJoinPoint joinPoint, Log log,Long uid); /** * 查询异常详情 * @param id 日志ID diff --git a/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogErrorDTO.java b/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogErrorDTO.java index 91f39189ce306ebc2a00a39fd8dcc1bf5211790c..a8c225dabe25f0188130f3ab895c7fcfb15925ac 100644 --- a/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogErrorDTO.java +++ b/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogErrorDTO.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.logging.service.dto; @@ -12,9 +11,9 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2019-5-22 - */ +* @author hupeng +* @date 2019-5-22 +*/ @Data public class LogErrorDTO implements Serializable { diff --git a/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogQueryCriteria.java b/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogQueryCriteria.java index f962e792cf6cee8c3ba908cf5ca8c75956057fc1..5e95d327cf693cd40bbb00234f73dc4a1b9ea37d 100644 --- a/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogQueryCriteria.java +++ b/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.logging.service.dto; diff --git a/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogSmallDTO.java b/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogSmallDTO.java index 6ee18ee943aed132379f40ff9ec5505cf2ed3c2a..aeb6b2122193231853907b86885d60ddd9c8c74d 100644 --- a/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogSmallDTO.java +++ b/yshop-logging/src/main/java/co/yixiang/modules/logging/service/dto/LogSmallDTO.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.logging.service.dto; diff --git a/yshop-logging/src/main/java/co/yixiang/modules/logging/service/impl/LogServiceImpl.java b/yshop-logging/src/main/java/co/yixiang/modules/logging/service/impl/LogServiceImpl.java index a231830e75bec691916e03591286c62af9e8c499..8b148867009424342168d46b19c003698aaf0ce5 100644 --- a/yshop-logging/src/main/java/co/yixiang/modules/logging/service/impl/LogServiceImpl.java +++ b/yshop-logging/src/main/java/co/yixiang/modules/logging/service/impl/LogServiceImpl.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.logging.service.impl; @@ -12,8 +11,7 @@ import cn.hutool.json.JSONObject; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; -import co.yixiang.enums.LogTypeEnum; -import co.yixiang.enums.YesNoEnum; +import co.yixiang.modules.logging.aop.log.AppLog; import co.yixiang.modules.logging.aop.log.Log; import co.yixiang.modules.logging.service.LogService; import co.yixiang.modules.logging.service.dto.LogErrorDTO; @@ -21,7 +19,6 @@ import co.yixiang.modules.logging.service.dto.LogQueryCriteria; import co.yixiang.modules.logging.service.dto.LogSmallDTO; import co.yixiang.modules.logging.service.mapper.LogMapper; import co.yixiang.utils.FileUtil; -import co.yixiang.utils.SecurityUtils; import co.yixiang.utils.StringUtils; import co.yixiang.utils.ValidationUtil; import com.github.pagehelper.PageInfo; @@ -39,15 +36,15 @@ import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -import java.util.Objects; /** * @author hupeng * @date 2018-11-24 */ +@SuppressWarnings("unchecked") @Service @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class LogServiceImpl extends BaseServiceImpl implements LogService { +public class LogServiceImpl extends BaseServiceImpl implements LogService { private final LogMapper logMapper; @@ -60,31 +57,24 @@ public class LogServiceImpl extends BaseServiceImpl page = new PageInfo<>(logMapper.findAllByPageable(criteria.getBlurry())); - Map map = new LinkedHashMap<>(2); - map.put("content", page.getList()); - map.put("totalElements", page.getTotal()); + PageInfo page = new PageInfo<>(logMapper.findAllByPageable(nickname)); + Map map = new LinkedHashMap<>(2); + map.put("content",page.getList()); + map.put("totalElements",page.getTotal()); return map; } @Override - public Object queryAll(LogQueryCriteria criteria, Pageable pageable) { - if (Objects.equals(criteria.getType(),YesNoEnum.YES_NO_0.getValue())){ - criteria.setLogType(LogTypeEnum.INFO.getDesc()); - criteria.setType(YesNoEnum.YES_NO_0.getValue()); - } else { - criteria.setLogType(LogTypeEnum.ERROR.getDesc()); - } + public Object queryAll(LogQueryCriteria criteria, Pageable pageable){ + getPage(pageable); PageInfo page = new PageInfo<>(queryAll(criteria)); Map map = new LinkedHashMap<>(2); - String status = LogTypeEnum.ERROR.getDesc(); - if (status.equals(criteria.getLogType())) { + String status = "ERROR"; + if(status.equals(criteria.getLogType())){ map.put("content", generator.convert(page.getList(), LogErrorDTO.class)); map.put("totalElements", page.getTotal()); } @@ -100,8 +90,6 @@ public class LogServiceImpl extends BaseServiceImpl page = new PageInfo<>(queryAll(criteria)); Map map = new LinkedHashMap<>(2); @@ -114,21 +102,21 @@ public class LogServiceImpl extends BaseServiceImpl logs, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (co.yixiang.modules.logging.domain.Log log : logs) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("用户名", log.getUsername()); map.put("IP", log.getRequestIp()); map.put("IP来源", log.getAddress()); @@ -190,12 +227,12 @@ public class LogServiceImpl extends BaseServiceImpl { - @Delete("delete from log where log_type = #{logType}") + @Delete("delete from sys_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); + @Select( "select count(*) FROM (select request_ip FROM sys_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-mall/pom.xml b/yshop-mall/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..87c700998044d3177291c8e5f339dc11f82a162c --- /dev/null +++ b/yshop-mall/pom.xml @@ -0,0 +1,24 @@ + + + + yshop + co.yixiang + 3.3 + + 4.0.0 + + yshop-mall + 商城公共数据模块 + + + + co.yixiang + yshop-tools + 3.3 + + + + + diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargain.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargain.java similarity index 42% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargain.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargain.java index 4802d5c60d08e1962e5e907ad784bf175bfd0346..8997939ee13982aa60284e93a35de82406c88977 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargain.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargain.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.domain; @@ -11,155 +10,201 @@ import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.EqualsAndHashCode; -import javax.validation.constraints.*; -import java.io.Serializable; +import javax.validation.constraints.DecimalMax; +import javax.validation.constraints.DecimalMin; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.math.BigDecimal; -import java.sql.Timestamp; import java.util.Date; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -@TableName(value = "yx_store_bargain") +@EqualsAndHashCode(callSuper = true) +@TableName(value="yx_store_bargain") public class YxStoreBargain extends BaseDomain { /** 砍价产品ID */ @TableId + @ApiModelProperty(value = "砍价产品ID") private Long id; /** 关联产品ID */ + @ApiModelProperty(value = "关联产品ID") private Long productId; /** 砍价活动名称 */ @NotBlank(message = "请填写砍价名称") + @ApiModelProperty(value = "砍价产品名称") private String title; /** 砍价活动图片 */ @NotBlank(message = "请上传商品图片") + @ApiModelProperty(value = "砍价产品图片") private String image; /** 单位名称 */ + @ApiModelProperty(value = "砍价产品单位名称") private String unitName; /** 库存 */ @NotNull(message = "请输入库存") - @Min(message = "库存不能小于0", value = 1) + @Min(message = "库存不能小于0",value = 1) + @ApiModelProperty(value = "砍价产品库存") private Integer stock; /** 销量 */ + @ApiModelProperty(value = "砍价产品销量") private Integer sales; /** 砍价产品轮播图 */ - @NotBlank(message = "请上传商品轮播") + @NotBlank(message = "请上传商品轮播图") + @ApiModelProperty(value = "砍价产品轮播图") private String images; /** 砍价开启时间 */ - @NotNull(message = "请输入拼团开始时间") + @NotNull(message = "请选择开始时间") + @ApiModelProperty(value = "砍价产品开始时间") private Date startTime; /** 砍价结束时间 */ - @NotNull(message = "请输入拼团结束时间") + @NotNull(message = "请选择结束时间") + @ApiModelProperty(value = "砍价产品结束时间") private Date stopTime; /** 砍价产品名称 */ + @ApiModelProperty(value = "砍价产品名称") private String storeName; /** 砍价金额 */ @NotNull(message = "请输入砍价金额") - @DecimalMin(value = "0.00", message = "砍价金额不在合法范围内") - @DecimalMax(value = "99999999.99", message = "砍价金额不在合法范围内") + @DecimalMin(value="0.00", message = "砍价金额不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "砍价金额不在合法范围内") + @ApiModelProperty(value = "砍价产品砍价金额") private BigDecimal price; /** 砍价商品最低价 */ @NotNull(message = "请输入砍到最低价") - @DecimalMin(value = "0.00", message = "砍到最低价不在合法范围内") - @DecimalMax(value = "99999999.99", message = "砍到最低价不在合法范围内") + @DecimalMin(value="0.00", message = "砍到最低价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "砍到最低价不在合法范围内") + @ApiModelProperty(value = "砍价商品最低价") private BigDecimal minPrice; /** 每次购买的砍价产品数量 */ - @NotNull(message = "请输入限购") - @Min(message = "限购不能小于0", value = 1) + @NotNull(message = "请输入限购数量") + @Min(message = "限购不能小于0",value = 1) + @ApiModelProperty(value = "每次购买的砍价产品数量") private Integer num; /** 用户每次砍价的最大金额 */ @NotNull(message = "请输入单次砍最高价") - @DecimalMin(value = "0.00", message = "单次砍最高价不在合法范围内") - @DecimalMax(value = "99999999.99", message = "单次砍最高价不在合法范围内") + @DecimalMin(value="0.00", message = "单次砍最高价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "单次砍最高价不在合法范围内") + @ApiModelProperty(value = "用户每次砍价的最大金额") private BigDecimal bargainMaxPrice; /** 用户每次砍价的最小金额 */ @NotNull(message = "请输入单次砍最低价") - @DecimalMin(value = "0.00", message = "单次砍最低价不在合法范围内") - @DecimalMax(value = "99999999.99", message = "单次砍最低价小金额不在合法范围内") + @DecimalMin(value="0.00", message = "单次砍最低价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "单次砍最低价小金额不在合法范围内") + @ApiModelProperty(value = "用户每次砍价的最小金额") private BigDecimal bargainMinPrice; /** 用户每次砍价的次数 */ @NotNull(message = "请输入砍价的次数") - @Min(message = "砍价的次数不能小于0", value = 1) + @Min(message = "砍价的次数不能小于0",value = 1) + @ApiModelProperty(value = "用户每次砍价的次数") private Integer bargainNum; /** 砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间) */ + @ApiModelProperty(value = "砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)") private Integer status; /** 砍价详情 */ @NotBlank(message = "请填写详情") + @ApiModelProperty(value = "砍价详情") private String description; - /** 反多少积分 */ + /** 返多少积分 */ + @ApiModelProperty(value = "返多少积分") private BigDecimal giveIntegral; /** 砍价活动简介 */ + @ApiModelProperty(value = "砍价产品简介") private String info; /** 成本价 */ + @ApiModelProperty(value = "成本价") private BigDecimal cost; /** 排序 */ + @ApiModelProperty(value = "排序") private Integer sort; + /** 是否推荐0不推荐1推荐 */ + @ApiModelProperty(value = "是否推荐0不推荐1推荐") + private Integer isHot; + + + + /** 是否包邮 0不包邮 1包邮 */ + @ApiModelProperty(value = "是否包邮 0不包邮 1包邮") + private Integer isPostage; + + + /** 邮费 */ + @ApiModelProperty(value = "邮费") + private BigDecimal postage; + /** 砍价规则 */ @NotBlank(message = "请填写砍价规则") + @ApiModelProperty(value = "砍价规则描述") private String rule; /** 砍价产品浏览量 */ + @ApiModelProperty(value = "砍价产品浏览量") private Integer look; /** 砍价产品分享量 */ + @ApiModelProperty(value = "砍价产品分享量") private Integer share; - public void copy(YxStoreBargain source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreBargain source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargainUser.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargainUser.java new file mode 100644 index 0000000000000000000000000000000000000000..fa537d39d6ede2c87c383f876ed7764d645b0db2 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargainUser.java @@ -0,0 +1,58 @@ +package co.yixiang.modules.activity.domain; + + +import co.yixiang.domain.BaseDomain; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + *

+ * 用户参与砍价表 + *

+ * + * @author hupeng + * @since 2019-12-21 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(value = "YxStoreBargainUser对象", description = "用户参与砍价表") +public class YxStoreBargainUser extends BaseDomain { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "用户参与砍价表ID") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "用户ID") + private Long uid; + + @ApiModelProperty(value = "砍价产品id") + private Long bargainId; + + @ApiModelProperty(value = "砍价的最低价") + private BigDecimal bargainPriceMin; + + @ApiModelProperty(value = "砍价金额") + private BigDecimal bargainPrice; + + @ApiModelProperty(value = "砍掉的价格") + private BigDecimal price; + + @ApiModelProperty(value = "状态 1参与中 2 活动结束参与失败 3活动结束参与成功") + private Integer status; + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargainUserHelp.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargainUserHelp.java new file mode 100644 index 0000000000000000000000000000000000000000..19b4123b1d04136f52e99055929f92f9551d0000 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreBargainUserHelp.java @@ -0,0 +1,51 @@ +package co.yixiang.modules.activity.domain; + + +import co.yixiang.domain.BaseDomain; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +import java.math.BigDecimal; + +/** + *

+ * 砍价用户帮助表 + *

+ * + * @author hupeng + * @since 2019-12-21 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@Builder +@NoArgsConstructor +@AllArgsConstructor +@ApiModel(value = "YxStoreBargainUserHelp对象", description = "砍价用户帮助表") +public class YxStoreBargainUserHelp extends BaseDomain { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "砍价用户帮助表ID") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "帮助的用户id") + private Long uid; + + @ApiModelProperty(value = "砍价产品ID") + private Long bargainId; + + @ApiModelProperty(value = "用户参与砍价表id") + private Long bargainUserId; + + @ApiModelProperty(value = "帮助砍价多少金额") + private BigDecimal price; + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCombination.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCombination.java similarity index 39% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCombination.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCombination.java index a7fa2b662d34203f79e6893f0fb8d6ac0fa0bada..199c5fc41adc26cbef7f4d2dd16ffa4ea1886d72 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCombination.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCombination.java @@ -1,136 +1,195 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; +import co.yixiang.modules.product.service.dto.FromatDetailDto; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.EqualsAndHashCode; -import javax.validation.constraints.*; -import java.io.Serializable; +import javax.validation.constraints.DecimalMax; +import javax.validation.constraints.DecimalMin; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.math.BigDecimal; -import java.sql.Timestamp; import java.util.Date; +import java.util.List; +import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_store_combination") public class YxStoreCombination extends BaseDomain { @TableId + @ApiModelProperty(value = "拼团产品ID") private Long id; /** 商品id */ + @ApiModelProperty(value = "关联产品ID") private Long productId; + /** 商户id */ + @ApiModelProperty(value = "商户id 预留字段") + private Integer merId; + + /** 推荐图 */ @NotBlank(message = "请上传商品图片") + @ApiModelProperty(value = "推荐图") private String image; /** 轮播图 */ @NotBlank(message = "请上传商品轮播") + @ApiModelProperty(value = "轮播图") private String images; /** 活动标题 */ @NotBlank(message = "请填写拼团名称") + @ApiModelProperty(value = "拼团产品名称") private String title; - /** 活动属性 */ - private String attr; - /** 参团人数 */ @NotNull(message = "请输入拼团人数") - @Min(message = "拼团人数小于0", value = 1) + @Min(message = "拼团人数小于0",value = 1) + @ApiModelProperty(value = "拼团产品拼团人数") private Integer people; /** 简介 */ + @ApiModelProperty(value = "拼团产品简介") private String info; /** 价格 */ @NotNull(message = "请输入拼团价") - @DecimalMin(value = "0.00", message = "拼团价不在合法范围内") - @DecimalMax(value = "99999999.99", message = "拼团价不在合法范围内") + @DecimalMin(value="0.00", message = "拼团价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "拼团价不在合法范围内") + @ApiModelProperty(value = "拼团产品拼团价") private BigDecimal price; + private BigDecimal productPrice; + /** 排序 */ + @ApiModelProperty(value = "排序") private Integer sort; /** 销量 */ + @ApiModelProperty(value = "销量") private Integer sales; /** 库存 */ @NotNull(message = "请输入库存") - @Min(message = "库存不能小于0", value = 1) + @Min(message = "库存不能小于0",value = 1) private Integer stock; /** 推荐 */ + @ApiModelProperty(value = "是否推荐0不推荐1推荐") private Integer isHost; /** 产品状态 */ + @ApiModelProperty(value = "拼团产品状态0不显示 1显示") private Integer isShow; private Integer combination; + /** 商户是否可用1可用0不可用 */ + @ApiModelProperty(value = "商户是否可用1可用0不可用 预留字段") + private Integer merUse; + + /** 拼团内容 */ @NotBlank(message = "请填写详情") + @ApiModelProperty(value = "拼团产品详情") private String description; /** 拼团开始时间 */ - @NotNull(message = "请输入拼团开始时间") + @NotNull(message = "请选择结束时间") + @ApiModelProperty(value = "拼团产品结束时间") private Date startTime; /** 拼团结束时间 */ - @NotNull(message = "请输入拼团结束时间") + @NotNull(message = "请选择开始时间") + @ApiModelProperty(value = "拼团产品开始时间") private Date stopTime; /** 拼团订单有效时间 */ @NotNull(message = "请输入拼团时效") - @Min(message = "拼团时效不能小于0", value = 1) + @Min(message = "拼团时效不能小于0",value = 1) + @ApiModelProperty(value = "拼团订单有效时间") private Integer effectiveTime; - /** 拼团产品成本 */ + /** 拼团产品成本价 */ + @ApiModelProperty(value = "拼团产品成本价") private Integer cost; /** 浏览量 */ + @ApiModelProperty(value = "拼团产品浏览量") private Integer browse; /** 单位名 */ + @ApiModelProperty(value = "拼团产品单位名") private String unitName; + /** + * 规格 0单 1多 + */ + @ApiModelProperty(value = "拼团产品规格 0单规格 1多规格") + private Integer specType; + + /** 运费模板ID */ + @JsonProperty("temp_id") + @ApiModelProperty(value = "运费模板ID") + private Long tempId; + + + /** 属性项目 */ + @TableField(exist = false) + @ApiModelProperty(value = "属性项目") + private List items; + /** sku结果集 */ + @TableField(exist = false) + private List> attrs; - public void copy(YxStoreCombination source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + + + public void copy(YxStoreCombination source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } + } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCoupon.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCoupon.java similarity index 48% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCoupon.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCoupon.java index c156f6ad5c0f170898e594c730b9e29d838e2ba6..9ca64556c766430474c7bd2642b915e54409d755 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCoupon.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCoupon.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.domain; @@ -11,64 +10,82 @@ import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.EqualsAndHashCode; 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; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_store_coupon") public class YxStoreCoupon extends BaseDomain { /** 优惠券表ID */ @TableId + @ApiModelProperty(value = "优惠券ID") private Integer id; /** 优惠券名称 */ @NotBlank(message = "请填写优惠券名称") + @ApiModelProperty(value = "优惠券名称") private String title; /** 兑换消耗积分值 */ + @ApiModelProperty(value = "兑换消耗积分值") private Integer integral; /** 兑换的优惠券面值 */ - @DecimalMin(value = "0.00", message = "优惠券面值不在合法范围内") - @DecimalMax(value = "99999999.99", message = "优惠券面值不在合法范围内") + @DecimalMin(value="0.00", message = "优惠券面值不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "优惠券面值不在合法范围内") + @ApiModelProperty(value = "兑换的优惠券面值") private BigDecimal couponPrice; /** 最低消费多少金额可用优惠券 */ - @DecimalMin(value = "0.00", message = "最低消费不在合法范围内") - @DecimalMax(value = "99999999.99", message = "最低消费不在合法范围内") + @DecimalMin(value="0.00", message = "最低消费不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "最低消费不在合法范围内") + @ApiModelProperty(value = "最低消费多少金额可用优惠券") private BigDecimal useMinPrice; /** 优惠券有效期限(单位:天) */ @NotNull(message = "请输入有效期限") + @ApiModelProperty(value = "优惠券有效期限(单位:天)") private Integer couponTime; /** 排序 */ + @ApiModelProperty(value = "排序") private Integer sort; /** 状态(0:关闭,1:开启) */ + @ApiModelProperty(value = "优惠券状态(0:关闭,1:开启) ") private Integer status; + /** 优惠券类型(0:通用券,1:商品券,2:内部券) */ + @ApiModelProperty(value = "优惠券类型(0:通用券,1:商品券,2:内部券) ") + private Integer type; + + /** 优惠券绑定产品ID */ + @ApiModelProperty(value = "优惠券绑定产品ID ") + private String productId; + - public void copy(YxStoreCoupon source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreCoupon source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssue.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssue.java similarity index 49% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssue.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssue.java index 5e1160003e37e64c53223ac07a0d187dd6f85626..5b3af8cd0b61e428f38c541cfc149fb80aafb349 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssue.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssue.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.domain; @@ -11,58 +10,74 @@ import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.EqualsAndHashCode; import javax.validation.constraints.NotNull; -import java.io.Serializable; -import java.sql.Timestamp; import java.util.Date; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_store_coupon_issue") public class YxStoreCouponIssue extends BaseDomain { + private static final long serialVersionUID = 1L; + @TableId + @ApiModelProperty(value = "优惠券前台领取ID") private Integer id; - + @ApiModelProperty(value = "前台显示优惠券名称") private String cname; /** 优惠券ID */ + @ApiModelProperty(value = "优惠券ID") private Integer cid; + @ApiModelProperty(value = "优惠券类型 0-通用 1-商品券") + private Integer ctype; + /** 优惠券领取开启时间 */ + @NotNull(message = "请选择开启时间") + @ApiModelProperty(value = "优惠券领取开启时间") private Date startTime; /** 优惠券领取结束时间 */ + @NotNull(message = "请选择结束时间") + @ApiModelProperty(value = "优惠券领取结束时间") private Date endTime; /** 优惠券领取数量 */ + @ApiModelProperty(value = "优惠券领取数量") private Integer totalCount; /** 优惠券剩余领取数量 */ + @ApiModelProperty(value = "优惠券剩余领取数量") private Integer remainCount; /** 是否无限张数 */ + @ApiModelProperty(value = "是否无限张数1:是 0:否") private Integer isPermanent; /** 1 正常 0 未开启 -1 已无效 */ + @ApiModelProperty(value = "前台领取优惠券状态1 正常 0 未开启 -1 已无效") private Integer status; - public void copy(YxStoreCouponIssue source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreCouponIssue source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssueUser.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssueUser.java similarity index 57% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssueUser.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssueUser.java index a30991588232fdbf88f38f49448ce07d6febb02e..55e91b26adea1e99159da92e7c5685264850c5f7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssueUser.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponIssueUser.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.domain; @@ -11,32 +10,37 @@ import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; - -import java.io.Serializable; +import lombok.EqualsAndHashCode; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_store_coupon_issue_user") public class YxStoreCouponIssueUser extends BaseDomain { @TableId + @ApiModelProperty(value = "优惠券前台用户领取记录ID") private Long id; /** 领取优惠券用户ID */ + @ApiModelProperty(value = "领取优惠券用户ID") private Long uid; /** 优惠券前台领取ID */ + @ApiModelProperty(value = "优惠券前台领取ID") private Integer issueCouponId; - public void copy(YxStoreCouponIssueUser source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + + public void copy(YxStoreCouponIssueUser source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponUser.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponUser.java similarity index 53% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponUser.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponUser.java index eac39ef65e85d152829ac9ceded382f997ad01b4..1f6160f3bf65baaed7b1f277f1f6d2d01928badb 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponUser.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreCouponUser.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.domain; @@ -11,66 +10,85 @@ import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; -import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data +@EqualsAndHashCode(callSuper = true) +@Builder +@AllArgsConstructor +@NoArgsConstructor @TableName("yx_store_coupon_user") public class YxStoreCouponUser extends BaseDomain { /** 优惠券发放记录id */ @TableId + @ApiModelProperty(value = "优惠券发放记录id") private Long id; /** 兑换的项目id */ + @ApiModelProperty(value = "兑换的项目id") private Integer cid; /** 优惠券所属用户 */ + @ApiModelProperty(value = "优惠券所属用户") private Long uid; /** 优惠券名称 */ + @ApiModelProperty(value = "优惠券名称") private String couponTitle; /** 优惠券的面值 */ + @ApiModelProperty(value = "优惠券的面值") private BigDecimal couponPrice; /** 最低消费多少金额可用优惠券 */ + @ApiModelProperty(value = "最低消费多少金额可用优惠券") private BigDecimal useMinPrice; /** 优惠券结束时间 */ + @ApiModelProperty(value = "优惠券结束时间") private Date endTime; /** 使用时间 */ + @ApiModelProperty(value = "使用时间") private Date useTime; /** 获取方式 */ + @ApiModelProperty(value = "获取方式:get领取 send派送") private String type; /** 状态(0:未使用,1:已使用, 2:已过期) */ + @ApiModelProperty(value = "状态(0:未使用,1:已使用, 2:已过期)") private Integer status; /** 是否有效 */ + @ApiModelProperty(value = "是否有效1是 0否") private Integer isFail; - public void copy(YxStoreCouponUser source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreCouponUser source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStorePink.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStorePink.java similarity index 45% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStorePink.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStorePink.java index 9b3723b0e4a45243183c0d2b92f81c57826838c8..060b79c48f1367eef1164e9e5d328a78ead1c71e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStorePink.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStorePink.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.domain; @@ -11,76 +10,105 @@ import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; -import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) +@AllArgsConstructor +@NoArgsConstructor +@Builder @TableName("yx_store_pink") public class YxStorePink extends BaseDomain { @TableId + @ApiModelProperty(value = "拼团产品ID") private Long id; /** 用户id */ + @ApiModelProperty(value = "拼团产品用户ID") private Long uid; /** 订单id 生成 */ + @ApiModelProperty(value = "拼团产品订单ID 生成") private String orderId; /** 订单id 数据库 */ + @ApiModelProperty(value = "拼团产品订单id 数据库") private Long orderIdKey; /** 购买商品个数 */ + @ApiModelProperty(value = "购买商品个数") private Integer totalNum; /** 购买总金额 */ + @ApiModelProperty(value = "购买总金额") private BigDecimal totalPrice; /** 拼团产品id */ + @ApiModelProperty(value = "拼团产品id") private Long cid; /** 产品id */ + @ApiModelProperty(value = "产品id") private Long pid; /** 拼团总人数 */ + @ApiModelProperty(value = "拼团总人数") private Integer people; /** 拼团产品单价 */ + @ApiModelProperty(value = "拼团产品单价") private BigDecimal price; - + /** 拼团产品停止时间 */ + @ApiModelProperty(value = "拼团产品停止时间") private Date stopTime; /** 团长id 0为团长 */ - private Integer kId; + @ApiModelProperty(value = "拼团产品团长id 0为团长") + private Long kId; + + + /** 是否发送模板消息0未发送1已发送 */ + @ApiModelProperty(value = "是否发送模板消息0未发送1已发送") + private Integer isTpl; /** 是否退款 0未退款 1已退款 */ + @ApiModelProperty(value = "是否退款 0未退款 1已退款") private Integer isRefund; /** 状态1进行中2已完成3未完成 */ + @ApiModelProperty(value = "状态1进行中2已完成3未完成") private Integer status; + @ApiModelProperty(value = "库存唯一值") + private String uniqueId; - public void copy(YxStorePink source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStorePink source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreSeckill.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreSeckill.java similarity index 40% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreSeckill.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreSeckill.java index 7ba513570a133f3d44bd244c4cc6164c38e706fc..21d4fdde5bfd3266f6fbe4d88b4bd9c7807e61e5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxStoreSeckill.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreSeckill.java @@ -1,134 +1,193 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; +import co.yixiang.modules.product.service.dto.FromatDetailDto; +import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.EqualsAndHashCode; -import javax.validation.constraints.*; -import java.io.Serializable; +import javax.validation.constraints.DecimalMax; +import javax.validation.constraints.DecimalMin; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.math.BigDecimal; -import java.sql.Timestamp; import java.util.Date; +import java.util.List; +import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ + * 商品秒杀产品表 +* @author hupeng +* @date 2020-05-13 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_store_seckill") public class YxStoreSeckill extends BaseDomain { /** 商品秒杀产品表id */ @TableId + @ApiModelProperty(value = "商品秒杀产品表id") private Long id; /** 商品id */ + @ApiModelProperty(value = "商品id") private Long productId; /** 推荐图 */ @NotBlank(message = "请上传商品图片") + @ApiModelProperty(value = "推荐图") private String image; /** 轮播图 */ @NotBlank(message = "请上传商品轮播") + @ApiModelProperty(value = "轮播图") private String images; /** 活动标题 */ @NotBlank(message = "请填写秒杀名称") + @ApiModelProperty(value = "秒杀名称") private String title; /** 简介 */ + @ApiModelProperty(value = "简介") private String info; - /** 价格 */ - @NotNull(message = "请输入秒杀价") - @DecimalMin(value = "0.00", message = "秒杀价不在合法范围内") - @DecimalMax(value = "99999999.99", message = "秒杀价不在合法范围内") - private BigDecimal price; - - - /** 成本 */ - private BigDecimal cost; - - - /** 原价 */ - private BigDecimal otPrice; - - /** 返多少积分 */ + @ApiModelProperty(value = "返多少积分") private BigDecimal giveIntegral; /** 排序 */ + @ApiModelProperty(value = "排序") private Integer sort; /** 库存 */ - @NotNull(message = "请输入库存") - @Min(message = "库存不能小于0", value = 1) + @ApiModelProperty(value = "秒杀库存") private Integer stock; + /** 秒杀价 */ + @ApiModelProperty(value = "秒杀价") + private BigDecimal price; + /** 原价 */ + @ApiModelProperty(value = "原价") + private BigDecimal otPrice; + + /** 成本 */ + @ApiModelProperty(value = "成本") + private BigDecimal cost; /** 销量 */ + @ApiModelProperty(value = "秒杀销量") private Integer sales; /** 单位名 */ + @ApiModelProperty(value = "单位名") private String unitName; + /** 邮费 */ + @ApiModelProperty(value = "邮费") + private BigDecimal postage; + + + /** 内容 */ @NotBlank(message = "请填写详情") + @ApiModelProperty(value = "详细内容") private String description; /** 开始时间 */ - @NotNull(message = "请输入拼团开始时间") + @NotNull(message = "请选择秒杀开始时间") + @ApiModelProperty(value = "秒杀开始时间") private Date startTime; /** 结束时间 */ - @NotNull(message = "请输入拼团结束时间") + @NotNull(message = "请选择秒杀结束时间") + @ApiModelProperty(value = "秒杀结束时间") private Date stopTime; /** 产品状态 */ + @ApiModelProperty(value = "产品状态") private Integer status; + /** 是否包邮 */ + @ApiModelProperty(value = "是否包邮") + private Integer isPostage; + + + /** 热门推荐 */ + @ApiModelProperty(value = "是否热门推荐") + private Integer isHot; + + /** 最多秒杀几个 */ @NotNull(message = "请输入限购") - @Min(message = "限购不能小于0", value = 1) + @Min(message = "限购不能小于0",value = 1) + @ApiModelProperty(value = "最多秒杀几个商品") private Integer num; /** 显示 */ + @ApiModelProperty(value = "是否显示 0否 1显示") private Integer isShow; + /** 时间段id */ @NotNull(message = "请选择开始时间") + @ApiModelProperty(value = "时间段id") private Integer timeId; + /** + * 规格 0单规格 1多规格 + */ + @ApiModelProperty(value = "规格 0单规格 1多规格") + private Integer specType; + + /** 运费模板ID */ + @JsonProperty("temp_id") + @ApiModelProperty(value = "运费模板ID") + private Long tempId; + + + /** 属性项目 */ + @TableField(exist = false) + @ApiModelProperty(value = "属性项目") + private List items; + + /** sku结果集 */ + @TableField(exist = false) + @ApiModelProperty(value = "sku结果集") + private List> attrs; - public void copy(YxStoreSeckill source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreSeckill source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrValue.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreVisit.java similarity index 30% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrValue.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreVisit.java index 0ba829848fa17cc97ee1847bed944f4076222a2f..233c267e3578030b1d8f7edda8e477719fb749c7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrValue.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxStoreVisit.java @@ -1,68 +1,76 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.activity.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; +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 com.fasterxml.jackson.annotation.JsonFormat; +import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; import java.io.Serializable; -import java.math.BigDecimal; /** - * @author hupeng - * @date 2020-05-12 - */ - +* @author hupeng +* @date 2020-05-13 +*/ @Data -@TableName("yx_store_product_attr_value") -public class YxStoreProductAttrValue implements Serializable { +@EqualsAndHashCode(callSuper = false) +@Builder +@AllArgsConstructor +@NoArgsConstructor +@TableName("yx_store_visit") +public class YxStoreVisit implements Serializable { @TableId private Long id; - /** 商品ID */ + /** 产品ID */ private Long productId; - /** 商品属性索引值 (attr_value|attr_value[|....]) */ - private String sku; + /** 产品类型 */ + private String productType; - /** 属性对应的库存 */ - private Integer stock; + /** 产品分类ID */ + private Integer cateId; - /** 销量 */ - private Integer sales; + /** 产品类型 */ + private String type; - /** 属性金额 */ - private BigDecimal price; + /** 用户ID */ + private Long uid; - /** 图片 */ - private String image; + /** 访问次数 */ + private Integer count; - /** 唯一值 */ - @TableField(value = "`unique`") - private String unique; + /** 备注描述 */ + private String content; - /** 成本价 */ - private BigDecimal cost; + /** 添加时间 */ + @TableField(fill= FieldFill.INSERT) + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Integer addTime; - public void copy(YxStoreProductAttrValue source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreVisit source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxUserExtract.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxUserExtract.java similarity index 82% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxUserExtract.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxUserExtract.java index bdcd44839958f15064ddd93894d8b77cf8fe315f..158645efc80f6db0c6f72c9c865c52885a87af8e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/domain/YxUserExtract.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/domain/YxUserExtract.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.domain; @@ -12,16 +11,17 @@ import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import lombok.EqualsAndHashCode; -import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_user_extract") public class YxUserExtract extends BaseDomain { @@ -77,7 +77,7 @@ public class YxUserExtract extends BaseDomain { private String wechat; - public void copy(YxUserExtract source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxUserExtract source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/param/UserExtParam.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/param/UserExtParam.java new file mode 100644 index 0000000000000000000000000000000000000000..906c3b3bd675a1471cf276e5220e06fbb19a6942 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/param/UserExtParam.java @@ -0,0 +1,33 @@ +package co.yixiang.modules.activity.param; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** + * @ClassName UserExtParam + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/13 + **/ +@Data +public class UserExtParam implements Serializable { + + @ApiModelProperty(value = "提现支付宝用户名") + private String alipayCode; + + @NotBlank(message = "体现类型不能为空") + @ApiModelProperty(value = "提现类型 weixin alipay") + private String extractType; + + @NotBlank(message = "金额不能为空") + @ApiModelProperty(value = "提现金额") + private String money; + + @ApiModelProperty(value = "微信号") + private String weixin; + + @ApiModelProperty(value = "支付宝账号") + private String name; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java new file mode 100644 index 0000000000000000000000000000000000000000..8e75814677f638e1cf29d7448b61733b2cddc277 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java @@ -0,0 +1,125 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +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.YxStoreBargainQueryCriteria; +import co.yixiang.modules.activity.vo.BargainCountVo; +import co.yixiang.modules.activity.vo.BargainVo; +import co.yixiang.modules.activity.vo.TopCountVo; +import co.yixiang.modules.activity.vo.YxStoreBargainQueryVo; +import co.yixiang.modules.user.domain.YxUser; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +public interface YxStoreBargainService extends BaseService{ + + /** + * 退回库存销量 + * @param num 数量 + * @param bargainId 砍价产品id + */ + void incStockDecSales(int num,Long bargainId); + + /** + * 增加销量 减少库存 + * @param num 数量 + * @param bargainId 砍价id + */ + void decStockIncSales(int num,Long bargainId); + + //YxStoreBargain getBargain(int bargainId); + + /** + * 开始帮助好友砍价 + * @param bargainId 砍价产品id + * @param bargainUserUid 开启砍价用户id + * @param uid 当前用户id + */ + void doHelp(Long bargainId,Long bargainUserUid,Long uid); + + /** + * 顶部统计 + * @param bargainId 砍价商品id + * @return TopCountVo + */ + TopCountVo topCount(Long bargainId); + + /** + * 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格 + * @param bargainId 砍价商品id + * @param uid 砍价用户id + * @param myUid 当前用户id + * @return BargainCountVo + */ + BargainCountVo helpCount(Long bargainId, Long uid, Long myUid); + + //int getBargainPayCount(int bargainId); + + //void addBargainShare(int id); + + //void addBargainLook(int id); + + /** + * 砍价详情 + * @param id 砍价id + * @param yxUser 用户 + * @return BargainVo + */ + BargainVo getDetail(Long id, YxUser yxUser); + + + /** + * 获取砍价商品列表 + * @param page page + * @param limit limit + * @return List + */ + List getList(int page, int limit); + + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreBargainQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreBargainQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + /** + * 删除砍价海报 + * @param id + */ + void deleteBargainImg(String id); +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserHelpService.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserHelpService.java new file mode 100644 index 0000000000000000000000000000000000000000..007f08001ea27689ad1334a07e866a36896917c4 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserHelpService.java @@ -0,0 +1,48 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service; + + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.activity.domain.YxStoreBargainUserHelp; +import co.yixiang.modules.activity.vo.YxStoreBargainUserHelpQueryVo; + +import java.util.List; + +/** + *

+ * 砍价用户帮助表 服务类 + *

+ * + * @author hupeng + * @since 2019-12-21 + */ +public interface YxStoreBargainUserHelpService extends BaseService { + + /** + * 获取砍价帮 + * @param bargainId 砍价商品id + * @param bargainUserUid 砍价用户id + * @param page page + * @param limit limit + * @return list + */ + List getList(Long bargainId, Long bargainUserUid, int page, int limit); + + /** + * 获取砍价帮总人数 + * + * @param bargainId 砍价产品ID + * @param bargainUserUid 用户参与砍价表id + * @return int + */ + Long getBargainUserHelpPeopleCount(Long bargainId,Long bargainUserUid); + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserService.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserService.java new file mode 100644 index 0000000000000000000000000000000000000000..0ce314029a81bab6914f6003632e466fd876088f --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainUserService.java @@ -0,0 +1,90 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service; + + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.activity.domain.YxStoreBargainUser; +import co.yixiang.modules.activity.vo.YxStoreBargainUserQueryVo; + +import java.util.List; + +/** + *

+ * 用户参与砍价表 服务类 + *

+ * + * @author hupeng + * @since 2019-12-21 + */ +public interface YxStoreBargainUserService extends BaseService { + + /** + * 修改用户砍价状态 + * @param bargainId 砍价产品id + * @param uid 用户id + */ + void setBargainUserStatus(Long bargainId, Long uid); + + /** + * 砍价取消 + * @param bargainId 砍价商品id + * @param uid uid + */ + void bargainCancel(Long bargainId,Long uid); + + /** + * 获取用户的砍价产品 + * @param bargainUserUid 用户id + * @param page page + * @param limit limit + * @return List + */ + List bargainUserList(Long bargainUserUid, int page, int limit); + + /** + * 判断用户是否还可以砍价 + * @param bargainId 砍价产品id + * @param bargainUserUid 开启砍价用户id + * @param uid 当前用户id + * @return false=NO true=YES + */ + boolean isBargainUserHelp(Long bargainId,Long bargainUserUid,Long uid); + + /** + * 添加砍价记录 + * @param bargainId 砍价商品id + * @param uid 用户id + */ + void setBargain(Long bargainId,Long uid); + + //double getBargainUserDiffPrice(int id); + + + /** + * 获取某个用户参与砍价信息 + * @param bargainId 砍价id + * @param uid 用户id + * @return YxStoreBargainUser + */ + YxStoreBargainUser getBargainUserInfo(Long bargainId, Long uid); + + //List getBargainUserList(int bargainId,int status); + + /** + * 获取参与砍价的用户数量 + * + * @param bargainId 砍价id + * @param status 状态 OrderInfoEnum 1 进行中 2 结束失败 3结束成功 + * @return int + */ + Long getBargainUserCount(Long bargainId,Integer status); + + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java similarity index 34% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java index c14d1443f6590b2648dca2e7e3d2bcb235ceee6a..ca5c18fd1ed3122081805650cdef6922fdde4793 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCombinationService.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service; @@ -10,6 +12,9 @@ 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.YxStoreCombinationQueryCriteria; +import co.yixiang.modules.activity.vo.CombinationQueryVo; +import co.yixiang.modules.activity.vo.StoreCombinationVo; +import co.yixiang.modules.activity.vo.YxStoreCombinationQueryVo; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,33 +23,58 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface YxStoreCombinationService extends BaseService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface YxStoreCombinationService extends BaseService{ + + /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map + * 拼团列表 + * @param page page + * @param limit limit + * @return list */ - Map queryAll(YxStoreCombinationQueryCriteria criteria, Pageable pageable); + CombinationQueryVo getList(int page, int limit); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List + * 获取拼团详情 + * @param id 拼团产品id + * @param uid uid + * @return StoreCombinationVo */ + StoreCombinationVo getDetail(Long id, Long uid); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreCombinationQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxStoreCombinationQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; - void onSale(Long id, int status); + /** + * 修改状态 + * @param id 拼团产品id + * @param status ShopCommonEnum + */ + void onSale(Long id, Integer status); + + boolean saveCombination(YxStoreCombinationDto resources); } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueService.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueService.java similarity index 38% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueService.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueService.java index 81b3c46c20d1458313c4ee3d311b843ef25609b8..e24c97c1a4fc81cb4449839bbbb985497d0db9c6 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueService.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service; @@ -10,6 +12,7 @@ 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.YxStoreCouponIssueQueryCriteria; +import co.yixiang.modules.activity.vo.YxStoreCouponIssueQueryVo; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,31 +21,49 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface YxStoreCouponIssueService extends BaseService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface YxStoreCouponIssueService extends BaseService{ /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map + * 领取优惠券 + * @param id id 优惠券id + * @param uid uid */ - Map queryAll(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable); + void issueUserCoupon(Integer id, Long uid); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List + * 优惠券列表 + * @param page page + * @param limit limit + * @param uid 用户id + * @return list */ + List getCouponList(int page, int limit, Long uid,Long productId,Integer type); + + //int couponCount(int id, int uid); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxStoreCouponIssueQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @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-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueUserService.java similarity index 45% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueUserService.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueUserService.java index a18b420a41c09aa0c5d1ee003b87499d4a5ab02a..92a91bbad813f73d16eef08e1730fc5d700d84f4 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueUserService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponIssueUserService.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service; @@ -18,31 +20,38 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface YxStoreCouponIssueUserService extends BaseService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface YxStoreCouponIssueUserService extends BaseService{ /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map + * 添加优惠券领取记录 + * @param uid 用户id + * @param id 前台优惠券id */ - Map queryAll(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable); + void addUserIssue(Long uid, Integer id); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxStoreCouponIssueUserQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @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-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponService.java similarity index 47% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponService.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponService.java index e5c5c53e163fdc3725e8111d29764a9591fa4a62..d613b529d59735a2c5bcb09cf6d8ab80523cc953 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponService.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service; @@ -18,31 +20,31 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface YxStoreCouponService extends BaseService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface YxStoreCouponService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxStoreCouponQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreCouponQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxStoreCouponQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @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-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponUserService.java similarity index 41% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponUserService.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponUserService.java index 9f6709d4e0202e7c733b93bbd6bd0259025a1130..9db811a54a6ed797b4b17a99362bd310378684a5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponUserService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreCouponUserService.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service; @@ -10,6 +12,8 @@ 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.YxStoreCouponUserQueryCriteria; +import co.yixiang.modules.activity.vo.StoreCouponUserVo; +import co.yixiang.modules.activity.vo.YxStoreCouponUserQueryVo; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -23,8 +27,64 @@ import java.util.Map; */ public interface YxStoreCouponUserService extends BaseService { + /** + * 获取当前用户优惠券数量 + * + * @param uid uid + * @return int + */ + Long getUserValidCouponCount(Long uid); + + void useCoupon(int id); + + /** + * 获取用户优惠券 + * + * @param id 优惠券id + * @param uid 用户id + * @return YxStoreCouponUser + */ + YxStoreCouponUser getCoupon(Integer id, Long uid); + + + /** + * 获取满足条件的可用优惠券 + * + * @param cartIds 购物车ids + * @return list + */ + List beUsableCouponList(Long uid, String cartIds); + + /** + * 获取下单时候满足的优惠券 + * + * @param uid uid + * @param price 总价格 + * @param productIds list + * @return list + */ + List getUsableCouponList(Long uid, double price, List productIds); + + + /** + * 获取用户优惠券 + * + * @param uid uid + * @return list + */ + List getUserCoupon(Long uid); + + /** + * 添加优惠券记录 + * + * @param uid 用户id + * @param cid 优惠券id + */ + void addUserCoupon(Long uid, Integer cid); + /** * 查询数据分页 + * * @param criteria 条件 * @param pageable 分页参数 * @return Map @@ -33,6 +93,7 @@ public interface YxStoreCouponUserService extends BaseService /** * 查询所有数据不分页 + * * @param criteria 条件参数 * @return List */ @@ -40,9 +101,21 @@ public interface YxStoreCouponUserService extends BaseService /** * 导出数据 - * @param all 待导出的数据 + * + * @param all 待导出的数据 * @param response / * @throws IOException / */ void download(List all, HttpServletResponse response) throws IOException; + + /** + * pc端查询优惠券 + * + * @param uid 用户id + * @param page 当前页码 + * @param limit 一页多少 + * @param type + * @return / + */ + Map getUserPCCoupon(Long uid, int page, int limit, Integer type); } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java new file mode 100644 index 0000000000000000000000000000000000000000..42ba23ac7d4e6caf56d8baad44f29c1621e6133d --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java @@ -0,0 +1,122 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +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.PinkAllDto; +import co.yixiang.modules.activity.service.dto.YxStorePinkDto; +import co.yixiang.modules.activity.service.dto.YxStorePinkQueryCriteria; +import co.yixiang.modules.activity.vo.PinkInfoVo; +import co.yixiang.modules.order.vo.YxStoreOrderQueryVo; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStorePinkService extends BaseService{ + + + /** + * 取消拼团 + * @param uid 用户id + * @param cid 团购产品id + * @param pinkId 拼团id + */ + void removePink(Long uid, Long cid, Long pinkId); + + /** + * 计算还差几人拼团 + * @param pink 拼团信息 + * @return int + */ + int surplusPeople(YxStorePink pink); + + + /** + * 拼团明细 + * @param id 拼团id + * @param uid 用户id + */ + PinkInfoVo pinkInfo(Long id, Long uid); + + + /** + * 返回正在拼团的人数 + * + * @param id 拼团id + * @return int + */ + Long pinkIngCount(Long id); + + /** + * 创建拼团 + * @param order 订单 + */ + void createPink(YxStoreOrderQueryVo order); + + /** + * 判断用户是否在团内 + * @param id 拼团id + * @param uid 用户id + * @return boolean true=在 + */ + boolean getIsPinkUid(Long id,Long uid); + + /** + * 获取拼团完成的商品总件数 + * @return int + */ + int getPinkOkSumTotalNum(); + + /** + * 获取拼团成功的用户 + * @param uid uid + * @return list + */ + List getPinkOkList(Long uid); + + + + /** + * 获取团长拼团数据 + * @param cid 拼团产品id + * @return PinkAllDto pindAll-参与的拼团的id 集合 list-团长参与的列表 + */ + PinkAllDto getPinkAll(Long cid); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStorePinkQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStorePinkQueryCriteria 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/activity/service/YxStoreSeckillService.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java similarity index 56% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java index fb653b6fd2430a4ae7e26b509e7ff55264259314..1b9ef323759a890b98c140792d69e6d8531065ab 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreSeckillService.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service; @@ -10,6 +12,8 @@ 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.YxStoreSeckillQueryCriteria; +import co.yixiang.modules.activity.vo.StoreSeckillVo; +import co.yixiang.modules.activity.vo.YxStoreSeckillQueryVo; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -23,8 +27,36 @@ import java.util.Map; */ public interface YxStoreSeckillService extends BaseService { + + /** + * 产品详情 + * + * @param id 秒杀商品id + * @return StoreSeckillVo + */ + StoreSeckillVo getDetail(Long id); + + /** + * 秒杀产品列表 + * + * @param page page + * @param limit limit + * @return list + */ + List getList(int page, int limit, int time); + + /** + * 秒杀产品列表(首页用) + * + * @param page page + * @param limit limit + * @return list + */ + List getList(int page, int limit); + /** * 查询数据分页 + * * @param criteria 条件 * @param pageable 分页参数 * @return Map @@ -33,6 +65,7 @@ public interface YxStoreSeckillService extends BaseService { /** * 查询所有数据不分页 + * * @param criteria 条件参数 * @return List */ @@ -40,9 +73,12 @@ public interface YxStoreSeckillService extends BaseService { /** * 导出数据 - * @param all 待导出的数据 + * + * @param all 待导出的数据 * @param response / * @throws IOException / */ void download(List all, HttpServletResponse response) throws IOException; + + boolean saveSeckill(YxStoreSeckillDto resources); } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreVisitService.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreVisitService.java new file mode 100644 index 0000000000000000000000000000000000000000..0ed13f7a8c5393d809380b07ba3e0ed846e6f3fd --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxStoreVisitService.java @@ -0,0 +1,57 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +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.YxStoreVisitQueryCriteria; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +public interface YxStoreVisitService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreVisitQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreVisitQueryCriteria criteria); + + /** + * 添加用户访问拼团记录 + * @param uid 用户id + * @param productId 产品id + */ + void addStoreVisit(Long uid,Long productId); + + /** + * 导出数据 + * @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-mall/src/main/java/co/yixiang/modules/activity/service/YxUserExtractService.java similarity index 43% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxUserExtractService.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxUserExtractService.java index f506099d31be17ff2e6d5fcee8acb3f3d3141a58..3f4c1661dad1e6c7163c219efa1789cf0f2a91b2 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxUserExtractService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/YxUserExtractService.java @@ -2,14 +2,18 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service; import co.yixiang.common.service.BaseService; import co.yixiang.modules.activity.domain.YxUserExtract; +import co.yixiang.modules.activity.param.UserExtParam; import co.yixiang.modules.activity.service.dto.YxUserExtractDto; import co.yixiang.modules.activity.service.dto.YxUserExtractQueryCriteria; +import co.yixiang.modules.user.domain.YxUser; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,34 +22,50 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface YxUserExtractService extends BaseService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface YxUserExtractService extends BaseService{ /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map + * 开始提现 + * @param userInfo 用户 + * @param param UserExtParam */ - Map queryAll(YxUserExtractQueryCriteria criteria, Pageable pageable); + void userExtract(YxUser userInfo, UserExtParam param); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List + * 累计提现金额 + * @param uid uid + * @return double */ + double extractSum(Long uid); + + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxUserExtractQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxUserExtractQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; + /** * 操作提现 * @param resources YxUserExtract diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/PinkAllDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/PinkAllDto.java new file mode 100644 index 0000000000000000000000000000000000000000..2003aff07399d731200a984c7a13351a3efbd831 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/PinkAllDto.java @@ -0,0 +1,20 @@ +package co.yixiang.modules.activity.service.dto; + +import lombok.Builder; +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +/** + * @ClassName 团长拼团数据PinkAllDto + * @Author hupeng <610796224@qq.com> + * @Date 2020/6/20 + **/ +@Getter +@Setter +@Builder +public class PinkAllDto { + List list; // list-团长参与的列表 + List pindAll; //pindAll-参与的拼团的id 集合 +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/PinkDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/PinkDto.java new file mode 100644 index 0000000000000000000000000000000000000000..9aa8a401b9ef2e5b9d3af279e2f07513a747d2ec --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/PinkDto.java @@ -0,0 +1,51 @@ +package co.yixiang.modules.activity.service.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + * @ClassName PinkDto + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/19 + **/ +@Data +public class PinkDto implements Serializable { + + @ApiModelProperty(value = "拼团ID") + private Long id; + + @ApiModelProperty(value = "用户ID") + private Long uid; + + @ApiModelProperty(value = "拼团总人数") + private Integer people; + + @ApiModelProperty(value = "拼团产品单价") + private Double price; + + @ApiModelProperty(value = "拼团结束时间") + private Date stopTime; + + @ApiModelProperty(value = "拼团用户昵称") + private String nickname; + + @ApiModelProperty(value = "拼团用户头像") + private String avatar; + + @ApiModelProperty(value = "参与的拼团的id集合") + private String count; + + @ApiModelProperty(value = "拼团时效:小时") + private String h; + + @ApiModelProperty(value = "拼团时效:分钟") + private String i; + + @ApiModelProperty(value = "拼团时效:秒") + private String s; + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/PinkUserDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/PinkUserDto.java new file mode 100644 index 0000000000000000000000000000000000000000..959bfe8320395ccf7876dc4ae78e8a733a32bcdc --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/PinkUserDto.java @@ -0,0 +1,44 @@ +package co.yixiang.modules.activity.service.dto; + +import co.yixiang.modules.activity.domain.YxStorePink; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; + +/** + * @ClassName PinkUserDto + * @Author hupeng <610796224@qq.com> + * @Date 2020/6/22 + **/ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class PinkUserDto { + + /**拼团的团员*/ + @ApiModelProperty(value = "拼团的团员信息") + private List pinkAll; + + /**单个拼团信息*/ + @ApiModelProperty(value = "单个拼团信息") + private YxStorePink pinkT; + + /**拼团id集合*/ + @ApiModelProperty(value = "拼团id集合") + private List idAll; + + /**拼团用户id集合*/ + @ApiModelProperty(value = "拼团用户id集合") + private List uidAll; + + /**还差几人成团*/ + @ApiModelProperty(value = "还差几人成团") + private Integer count; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/SeckillTimeDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/SeckillTimeDto.java new file mode 100644 index 0000000000000000000000000000000000000000..e7062f730bc844361397d8ea23bfe2ec086b4cdf --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/SeckillTimeDto.java @@ -0,0 +1,27 @@ +package co.yixiang.modules.activity.service.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +@Data +public class SeckillTimeDto { + + private Integer id; + /** + * 00:00 + */ + @ApiModelProperty(value = "秒杀产品时间:00:00") + private String time; + + /** + *状态 + */ + @ApiModelProperty(value = "秒杀产品状态显示中文值") + private String state; + + @ApiModelProperty(value = "秒杀产品状态") + private Integer status; + + @ApiModelProperty(value = "秒杀产品停止时间") + private Integer stop; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainDto.java similarity index 89% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainDto.java index 4ba82e8cedb8e915b061f7288a26f955ce15c5fe..db1d7e6bffa890f55c7ff0a421393190673f07ce 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; @@ -10,13 +9,12 @@ import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; -import java.sql.Timestamp; import java.util.Date; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class YxStoreBargainDto implements Serializable { @@ -89,9 +87,18 @@ public class YxStoreBargainDto implements Serializable { /** 排序 */ private Integer sort; + /** 是否推荐0不推荐1推荐 */ + private Integer isHot; + /** 添加时间 */ private Date createTime; + /** 是否包邮 0不包邮 1包邮 */ + private Integer isPostage; + + /** 邮费 */ + private BigDecimal postage; + /** 砍价规则 */ private String rule; @@ -101,5 +108,6 @@ public class YxStoreBargainDto implements Serializable { /** 砍价产品分享量 */ private Integer share; + private String statusStr; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainQueryCriteria.java similarity index 54% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainQueryCriteria.java index cbb4be899e83b676718b0ea009496e6e8d6d69e9..732a5278810333b5961abb3604c73b9bc9493d2b 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreBargainQueryCriteria.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class YxStoreBargainQueryCriteria { +public class YxStoreBargainQueryCriteria{ } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDto.java similarity index 51% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDto.java index 8eb23a142a1cf4e8b286b2e99bcb39e300ff104a..0b0eb7aa806997e983a44cd5329f1227d5eafc70 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationDto.java @@ -1,22 +1,31 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; -import lombok.Data; +import co.yixiang.modules.product.service.dto.FromatDetailDto; +import co.yixiang.modules.product.service.dto.ProductFormatDto; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; +import java.util.List; +import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -@Data +* @author hupeng +* @date 2020-05-13 +*/ +@Getter +@Setter +@ToString public class YxStoreCombinationDto implements Serializable { private Long id; @@ -24,13 +33,18 @@ public class YxStoreCombinationDto implements Serializable { // 商品id private Long productId; + // 商户id + private Integer merId; // 推荐图 private String image; - // 轮播图 private String images; + /** 轮播图 */ + @JsonProperty("slider_image") + private List sliderImage; + //参与人数 private Long countPeopleAll; @@ -38,14 +52,11 @@ public class YxStoreCombinationDto implements Serializable { private Long countPeoplePink; //访问人数 - private Integer countPeopleBrowse = 0; + private Long countPeopleBrowse; // 活动标题 private String title; - // 活动属性 - private String attr; - // 参团人数 private Integer people; @@ -65,13 +76,27 @@ public class YxStoreCombinationDto implements Serializable { private Integer stock; // 添加时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date createTime; + // 推荐 + private Integer isHost; + // 产品状态 private Integer isShow; + private Integer combination; + // 商户是否可用1可用0不可用 + private Integer merUse; + + // 是否包邮1是0否 + private Integer isPostage; + + // 邮费 + private BigDecimal postage; + // 拼团内容 private String description; @@ -93,4 +118,22 @@ public class YxStoreCombinationDto implements Serializable { // 单位名 private String unitName; + /** 规格 0单 1多 */ + @JsonProperty("spec_type") + private Integer specType; + // 模板id + @JsonProperty("temp_id") + private Integer tempId; + + /** 是否单独分佣 */ + @JsonProperty("is_sub") + private Integer isSub; + + private ProductFormatDto attr; + //属性项目 + private List items; + + //sku结果集 + private List attrs; + } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationQueryCriteria.java similarity index 69% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationQueryCriteria.java index 217984a89dc08e36787a35102d2272de47cab3b8..4fc0d6be2d8872d2072d0431ec8de6d800746b74 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCombinationQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; @@ -10,11 +9,11 @@ import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class YxStoreCombinationQueryCriteria { +public class YxStoreCombinationQueryCriteria{ // 模糊 @Query(type = Query.Type.INNER_LIKE) diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponDto.java similarity index 71% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponDto.java index 0bc6c81f0007c190723a4a002bd0011cbcd7e094..7baebf0a1b5a76a23e2806f4e9d7faa5294ede93 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponDto.java @@ -1,21 +1,23 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; +import co.yixiang.modules.product.domain.YxStoreProduct; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; +import java.util.List; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class YxStoreCouponDto implements Serializable { @@ -43,7 +45,15 @@ public class YxStoreCouponDto implements Serializable { // 状态(0:关闭,1:开启) private Integer status; + private Integer type; + + private String productId; + + private List product; + // 兑换项目添加时间 + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date createTime; + } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueDto.java similarity index 82% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueDto.java index c0eabc5f21f3021d080d9b8a2a6297a146a8a411..ad0f5287bb09080c12c86fbdb7c70615205354d5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueDto.java @@ -1,21 +1,20 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; -import java.sql.Timestamp; import java.util.Date; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class YxStoreCouponIssueDto implements Serializable { @@ -26,6 +25,8 @@ public class YxStoreCouponIssueDto implements Serializable { /** 优惠券ID */ private Integer cid; + private Integer ctype; + /** 优惠券领取开启时间 */ private Date startTime; @@ -44,7 +45,9 @@ public class YxStoreCouponIssueDto implements Serializable { /** 1 正常 0 未开启 -1 已无效 */ private Integer status; + /** 优惠券添加时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date createTime; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueQueryCriteria.java similarity index 62% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueQueryCriteria.java index b4f98f88c316e659060d813558aff521a27fea25..e07e56985effbdf8b5dca5a63b52704feb9ac043 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; @@ -10,11 +9,11 @@ import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class YxStoreCouponIssueQueryCriteria { +public class YxStoreCouponIssueQueryCriteria{ @Query private Integer isDel; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserDto.java similarity index 67% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserDto.java index 9ac875cda79efa0449f5712b7a3f32b324163635..49fad1c90240f145d2061be6bf18c7d22b5b6fbb 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserDto.java @@ -1,31 +1,29 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; import java.io.Serializable; -import java.util.Date; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class YxStoreCouponIssueUserDto implements Serializable { - private Long id; + private Integer id; /** 领取优惠券用户ID */ - private Long uid; + private Integer uid; /** 优惠券前台领取ID */ private Integer issueCouponId; /** 领取时间 */ - private Date createTime; + private Integer addTime; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserQueryCriteria.java similarity index 53% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserQueryCriteria.java index 1a051cafa0f7692412b11c87ec7b10a9f645a681..ee859e17897032900e16246ebec3d67e7e79154d 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponIssueUserQueryCriteria.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class YxStoreCouponIssueUserQueryCriteria { +public class YxStoreCouponIssueUserQueryCriteria{ } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponQueryCriteria.java similarity index 63% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponQueryCriteria.java index 31749843a1226a4d347b7dc6f4f4f313ceb96eae..d9686b2216b78eb78fd5924c183df415a676bfc8 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; @@ -10,11 +9,11 @@ import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class YxStoreCouponQueryCriteria { +public class YxStoreCouponQueryCriteria{ @Query private Integer isDel; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserDto.java similarity index 89% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserDto.java index b014ee6addf920f1dc8c8f0224e379cb95b9103d..fb530966d42f88907efdae3c6e64e7fd6bfbf400 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; @@ -13,9 +12,9 @@ import java.math.BigDecimal; import java.util.Date; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class YxStoreCouponUserDto implements Serializable { @@ -40,7 +39,7 @@ public class YxStoreCouponUserDto implements Serializable { private BigDecimal useMinPrice; // 优惠券创建时间 - private Date creteTime; + private Date addTime; // 优惠券结束时间 private Date endTime; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserQueryCriteria.java similarity index 67% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserQueryCriteria.java index 944fab01358e65ab688c55891dd9cc68c34238ee..4ea955a8b2203a6a8d862d60c59115525efc3821 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreCouponUserQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; @@ -10,11 +9,11 @@ import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class YxStoreCouponUserQueryCriteria { +public class YxStoreCouponUserQueryCriteria{ // 模糊 @Query(type = Query.Type.INNER_LIKE) diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkDto.java similarity index 62% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkDto.java index 47c9f5377934055e868cd02fc374f2ec297f7061..0679c2a7e9c9c4c35e54884d1dba0e60e059759c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkDto.java @@ -1,11 +1,11 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; @@ -13,9 +13,9 @@ import java.math.BigDecimal; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxStorePinkDto implements Serializable { @@ -48,14 +48,38 @@ public class YxStorePinkDto implements Serializable { /** 拼团产品单价 */ private BigDecimal price; - private Date stopTime; + /** 开始时间 */ + @JsonFormat( + pattern = "yyyy年MM月dd日HH时mm分", + timezone = "GMT+8" + ) + private Date createTime; + + private String stopTime; /** 团长id 0为团长 */ - private Integer kId; + private Long kId; + + /** 是否发送模板消息0未发送1已发送 */ + private Integer isTpl; /** 是否退款 0未退款 1已退款 */ private Integer isRefund; /** 状态1进行中2已完成3未完成 */ private Integer status; + + private String nickname; + + private String phone; + + private String userImg; + + private String product; + + private String image; + /** + * 参团人数 + */ + private Long countPeople; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkQueryCriteria.java similarity index 57% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkQueryCriteria.java index b7ddece723034c08353d8fe4d2c1882c632c5a99..14445dad41c2317589377c04cea8eca985869b7a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStorePinkQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; @@ -10,11 +9,11 @@ import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxStorePinkQueryCriteria { +public class YxStorePinkQueryCriteria{ @Query - private Integer kId; + private Integer cid; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillDto.java similarity index 49% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillDto.java index 6e73e6bcaeac4b2bcc53b4942ceb30e9b6ecbea8..e301497746dd7136251287cf50071cc78ee5e529 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillDto.java @@ -1,22 +1,32 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; +import co.yixiang.modules.product.service.dto.FromatDetailDto; +import co.yixiang.modules.product.service.dto.ProductFormatDto; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; +import java.util.List; +import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -@Data +* @author hupeng +* @date 2020-05-13 +*/ +@Getter +@Setter +@ToString public class YxStoreSeckillDto implements Serializable { @@ -32,23 +42,34 @@ public class YxStoreSeckillDto implements Serializable { // 轮播图 private String images; + /** 轮播图 */ + @JsonProperty("slider_image") + private List sliderImage; + // 活动标题 private String title; // 简介 private String info; - // 价格 - private BigDecimal price; + // 返多少积分 + private BigDecimal giveIntegral; - // 成本 - private BigDecimal cost; + /** 秒杀价 */ + @ApiModelProperty(value = "秒杀价") + private BigDecimal price; - // 原价 + /** 原价 */ + @ApiModelProperty(value = "原价") private BigDecimal otPrice; - // 返多少积分 - private BigDecimal giveIntegral; + /** 成本 */ + @ApiModelProperty(value = "成本") + private BigDecimal cost; + + /** 销量 */ + @ApiModelProperty(value = "秒杀销量") + private Integer sales; // 排序 private Integer sort; @@ -56,12 +77,12 @@ public class YxStoreSeckillDto implements Serializable { // 库存 private Integer stock; - // 销量 - private Integer sales; - // 单位名 private String unitName; + // 邮费 + private BigDecimal postage; + // 内容 private String description; @@ -77,6 +98,12 @@ public class YxStoreSeckillDto implements Serializable { // 产品状态 private Integer status; + // 是否包邮 + private Integer isPostage; + + // 热门推荐 + private Integer isHot; + // 最多秒杀几个 private Integer num; @@ -88,4 +115,22 @@ public class YxStoreSeckillDto implements Serializable { private String statusStr; private Integer timeId; + // 模板id + @JsonProperty("temp_id") + private Integer tempId; + /** 规格 0单 1多 */ + @JsonProperty("spec_type") + private Integer specType; + + /** 是否单独分佣 */ + @JsonProperty("is_sub") + private Integer isSub; + + private ProductFormatDto attr; + //属性项目 + private List items; + + //sku结果集 + private List attrs; + } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillQueryCriteria.java similarity index 67% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillQueryCriteria.java index 0b8171a5f047b0e99ed15e656df0eec86adb2471..0029314788197cd579157c287a217804fc9a5ea5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreSeckillQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; @@ -10,11 +9,11 @@ import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class YxStoreSeckillQueryCriteria { +public class YxStoreSeckillQueryCriteria{ // 模糊 diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitDto.java new file mode 100644 index 0000000000000000000000000000000000000000..03408fa775494c3e436c62e3e1f90003d37baa7d --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitDto.java @@ -0,0 +1,44 @@ +/** + * Copyright (C) 2018-2022 + * 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 2020-05-13 +*/ +@Data +public class YxStoreVisitDto implements Serializable { + + private Integer id; + + /** 产品ID */ + private Integer productId; + + /** 产品类型 */ + private String productType; + + /** 产品分类ID */ + private Integer cateId; + + /** 产品类型 */ + private String type; + + /** 用户ID */ + private Integer uid; + + /** 访问次数 */ + private Integer count; + + /** 备注描述 */ + private String content; + + /** 添加时间 */ + private Integer addTime; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..e5762c1cc67d9011c9faf165cea6e8e5f83b2f67 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxStoreVisitQueryCriteria.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.activity.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Data +public class YxStoreVisitQueryCriteria{ +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractDto.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractDto.java similarity index 91% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractDto.java index aee89f4435edfbedcf467e511313e77a096f45f6..ca8064d2d228272ec742e19ea2533b29929b39bc 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; @@ -13,9 +12,9 @@ import java.math.BigDecimal; import java.util.Date; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class YxUserExtractDto implements Serializable { diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractQueryCriteria.java similarity index 67% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractQueryCriteria.java index 9a1a10dd98c196ad77047d2de6889e541017ff5d..d7391e995d41c3c25514969e67131cbccd3400f5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/dto/YxUserExtractQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.dto; @@ -10,11 +9,11 @@ import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class YxUserExtractQueryCriteria { +public class YxUserExtractQueryCriteria{ // 模糊 diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..85204e28c099e3b38f51f2ddc8a39a793e4bad0e --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java @@ -0,0 +1,431 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.impl; + +import cn.hutool.core.util.NumberUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.OrderInfoEnum; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.activity.domain.YxStoreBargain; +import co.yixiang.modules.activity.domain.YxStoreBargainUser; +import co.yixiang.modules.activity.domain.YxStoreBargainUserHelp; +import co.yixiang.modules.activity.service.YxStoreBargainService; +import co.yixiang.modules.activity.service.YxStoreBargainUserHelpService; +import co.yixiang.modules.activity.service.YxStoreBargainUserService; +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.modules.activity.vo.BargainCountVo; +import co.yixiang.modules.activity.vo.BargainVo; +import co.yixiang.modules.activity.vo.TopCountVo; +import co.yixiang.modules.activity.vo.YxStoreBargainQueryVo; +import co.yixiang.modules.order.domain.YxStoreOrder; +import co.yixiang.modules.order.service.YxStoreOrderService; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.vo.YxUserQueryVo; +import co.yixiang.utils.FileUtil; +import co.yixiang.utils.OrderUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +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.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + + + +/** + * @author hupeng + * @date 2020-05-13 + */ +@Service +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreBargainServiceImpl extends BaseServiceImpl implements YxStoreBargainService { + + @Autowired + private IGenerator generator; + + @Autowired + private YxStoreBargainMapper yxStoreBargainMapper; + + + @Autowired + private YxStoreBargainUserService storeBargainUserService; + @Autowired + private YxStoreOrderService storeOrderService; + @Autowired + private YxStoreBargainUserHelpService storeBargainUserHelpService; + + + + /** + * 退回库存销量 + * @param num 数量 + * @param bargainId 砍价产品id + */ + @Override + public void incStockDecSales(int num, Long bargainId) { + yxStoreBargainMapper.incStockDecSales(num,bargainId); + } + + /** + * 增加销量 减少库存 + * @param num 数量 + * @param bargainId 砍价id + */ + @Override + public void decStockIncSales(int num, Long bargainId) { + int res = yxStoreBargainMapper.decStockIncSales(num,bargainId); + if(res == 0) { + throw new YshopException("砍价产品库存不足"); + } + } + +// @Override +// public YxStoreBargain getBargain(int bargainId) { +// QueryWrapper wrapper = new QueryWrapper<>(); +// int nowTime = OrderUtil.getSecondTimestampTwo(); +// wrapper.eq("id",bargainId).eq("is_del",0).eq("status",1) +// .le("start_time",nowTime).ge("stop_time",nowTime); +// return yxStoreBargainMapper.selectOne(wrapper); +// } + + + + /** + * 开始帮助好友砍价 + * @param bargainId 砍价产品id + * @param bargainUserUid 开启砍价用户id + * @param uid 当前用户id + */ + @Override + public void doHelp(Long bargainId, Long bargainUserUid, Long uid) { + //开始真正的砍价 + YxStoreBargainUser storeBargainUser = storeBargainUserService + .getBargainUserInfo(bargainId,bargainUserUid); + + + YxStoreBargain storeBargain = this.getById(bargainId); + //用户可以砍掉的金额 好友砍价之前获取可以砍价金额 + double coverPrice = NumberUtil.sub(storeBargainUser.getBargainPrice() + ,storeBargainUser.getBargainPriceMin()).doubleValue(); + + double random = 0d; + if(coverPrice > 0 ){ + //用户剩余要砍掉的价格 + double surplusPrice = NumberUtil.sub(coverPrice, + storeBargainUser.getPrice()).doubleValue(); + if(surplusPrice == 0) { + return; + } + + + //生成一个区间随机数 + random = OrderUtil.randomNumber( + storeBargain.getBargainMinPrice().doubleValue(), + storeBargain.getBargainMaxPrice().doubleValue()); + if(random > surplusPrice) { + random = surplusPrice; + } + } + + + //添加砍价帮助表 + YxStoreBargainUserHelp storeBargainUserHelp = YxStoreBargainUserHelp + .builder() + .uid(uid) + .bargainId(bargainId) + .bargainUserId(storeBargainUser.getId()) + .price(BigDecimal.valueOf(random)) + .build(); + storeBargainUserHelpService.save(storeBargainUserHelp); + + //累计砍掉的金额 + double totalPrice = NumberUtil.add(storeBargainUser.getPrice().doubleValue(),random); + + //更新砍价参与表 + YxStoreBargainUser bargainUser = YxStoreBargainUser + .builder() + .id(storeBargainUser.getId()) + .price(BigDecimal.valueOf(totalPrice)) + .build(); + + storeBargainUserService.updateById(bargainUser); + } + + /** + * 顶部统计 + * @param bargainId 砍价商品id + * @return TopCountVo + */ + @Override + public TopCountVo topCount(Long bargainId) { + if(bargainId != null) { + this.addBargainShare(bargainId); + } + return TopCountVo.builder() + .lookCount(yxStoreBargainMapper.lookCount()) + .shareCount(yxStoreBargainMapper.shareCount()) + .userCount(storeBargainUserService.count()) + .build(); + } + + /** + * 砍价 砍价帮总人数、剩余金额、进度条、已经砍掉的价格 + * @param bargainId 砍价商品id + * @param uid 砍价用户id + * @param myUid 当前用户id + * @return BargainCountVo + */ + @Override + public BargainCountVo helpCount(Long bargainId, Long uid, Long myUid) { + YxStoreBargainUser storeBargainUser = storeBargainUserService + .getBargainUserInfo(bargainId,uid); + // 是否帮别人砍,没砍是true,砍了false + boolean userBargainStatus = true; + if(storeBargainUser == null) { + return BargainCountVo + .builder() + .count(0L) + .alreadyPrice(0d) + .status(0) + .pricePercent(0) + .price(0d) + .userBargainStatus(userBargainStatus) + .build(); + } + + + Long helpCount = storeBargainUserHelpService.lambdaQuery() + .eq(YxStoreBargainUserHelp::getBargainUserId,storeBargainUser.getId()) + .eq(YxStoreBargainUserHelp::getBargainId,bargainId) + .eq(YxStoreBargainUserHelp::getUid,myUid) + .count(); + + if(helpCount > 0) { + userBargainStatus = false; + } + + + Long count = storeBargainUserHelpService + .getBargainUserHelpPeopleCount(bargainId,storeBargainUser.getId()); + //用户可以砍掉的价格 + double diffPrice = NumberUtil.sub(storeBargainUser.getBargainPrice() + ,storeBargainUser.getBargainPriceMin()).doubleValue(); + //砍价进度条百分比 + int pricePercent = 0; + if(diffPrice <= 0) { + pricePercent = 100; + }else{ + pricePercent = NumberUtil.round(NumberUtil.mul(NumberUtil.div( + storeBargainUser.getPrice(),diffPrice),100) + ,0).intValue(); + } + + + + //剩余的砍价金额 + double surplusPrice = NumberUtil.sub(diffPrice,storeBargainUser.getPrice()).doubleValue(); + + return BargainCountVo + .builder() + .count(count) + .alreadyPrice(storeBargainUser.getPrice().doubleValue()) + .status(storeBargainUser.getStatus()) + .pricePercent(pricePercent) + .price(surplusPrice) + .userBargainStatus(userBargainStatus) + .build(); + } + + + + + + /** + * 砍价详情 + * @param id 砍价id + * @param yxUser 用户 + * @return BargainVo + */ + @Override + public BargainVo getDetail(Long id, YxUser yxUser) { + + Date now = new Date(); + YxStoreBargain storeBargain = this.lambdaQuery().eq(YxStoreBargain::getId,id) + .eq(YxStoreBargain::getStatus, ShopCommonEnum.IS_STATUS_1.getValue()) + .le(YxStoreBargain::getStartTime,now) + .ge(YxStoreBargain::getStopTime,now) + .one(); + + if(storeBargain == null) { + throw new YshopException("砍价已结束"); + } + + this.addBargainLook(id); + + YxStoreBargainQueryVo storeBargainQueryVo = generator.convert(storeBargain, + YxStoreBargainQueryVo.class); + + return BargainVo + .builder() + .bargain(storeBargainQueryVo) + .userInfo(generator.convert(yxUser, YxUserQueryVo.class)) + .bargainSumCount(this.getBargainPayCount(id)) + .build(); + } + + /** + * 获取砍价商品列表 + * @param page page + * @param limit limit + * @return List + */ + @Override + public List getList(int page, int limit) { + Page pageModel = new Page<>(page, limit); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + Date nowTime = new Date(); + wrapper.eq(YxStoreBargain::getStatus, ShopCommonEnum.IS_STATUS_1.getValue()) + .lt(YxStoreBargain::getStartTime,nowTime) + .gt(YxStoreBargain::getStopTime,nowTime); + + List yxStoreBargainQueryVos = generator.convert( + yxStoreBargainMapper.selectPage(pageModel,wrapper).getRecords(), + YxStoreBargainQueryVo.class); + + yxStoreBargainQueryVos.forEach(item->{ + item.setPeople(storeBargainUserService.getBargainUserCount(item.getId(), + OrderInfoEnum.BARGAIN_STATUS_1.getValue())); + }); + + return yxStoreBargainQueryVos; + } + + + /** + * 增加分享次数 + * @param id 砍价商品id + */ + private void addBargainShare(Long id) { + yxStoreBargainMapper.addBargainShare(id); + } + + /** + * 增加浏览次数 + * @param id 砍价商品id + */ + private void addBargainLook(Long id) { + yxStoreBargainMapper.addBargainLook(id); + } + + + /** + * 砍价支付成功订单数量 + * @param bargainId 砍价id + * @return int + */ + private Long getBargainPayCount(Long bargainId) { + return storeOrderService.lambdaQuery().eq(YxStoreOrder::getBargainId,bargainId) + .eq(YxStoreOrder::getPaid,OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus,OrderInfoEnum.REFUND_STATUS_0.getValue()) + .count(); + } + + + //===================================================================// + + @Override + //@Cacheable + public Map queryAll(YxStoreBargainQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + List storeBargainDtoList = generator.convert(page.getList(), YxStoreBargainDto.class); + for (YxStoreBargainDto storeBargainDto : storeBargainDtoList) { + + String statusStr = OrderUtil.checkActivityStatus(storeBargainDto.getStartTime(), + storeBargainDto.getStopTime(), storeBargainDto.getStatus()); + storeBargainDto.setStatusStr(statusStr); + } + map.put("content", storeBargainDtoList); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxStoreBargainQueryCriteria criteria) { + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreBargain.class, criteria)); + } + + + @Override + 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.getIsPostage()); + map.put("邮费", yxStoreBargain.getPostage()); + map.put("砍价规则", yxStoreBargain.getRule()); + map.put("砍价产品浏览量", yxStoreBargain.getLook()); + map.put("砍价产品分享量", yxStoreBargain.getShare()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + /** + * 删除砍价海报 + * + * @param name + */ + @Override + public void deleteBargainImg(String name) { + baseMapper.deleteBargainImg(name); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserHelpServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserHelpServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..1b97fd6063bcb9fed73394805da61be6c9162ff9 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserHelpServiceImpl.java @@ -0,0 +1,112 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.impl; + +import cn.hutool.core.util.ObjectUtil; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.activity.domain.YxStoreBargainUser; +import co.yixiang.modules.activity.domain.YxStoreBargainUserHelp; +import co.yixiang.modules.activity.service.YxStoreBargainUserHelpService; +import co.yixiang.modules.activity.service.YxStoreBargainUserService; +import co.yixiang.modules.activity.service.mapper.YxStoreBargainUserHelpMapper; +import co.yixiang.modules.activity.vo.YxStoreBargainUserHelpQueryVo; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.service.YxUserService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Collections; +import java.util.List; + + +/** + *

+ * 砍价用户帮助表 服务实现类 + *

+ * + * @author hupeng + * @since 2019-12-21 + */ +@Slf4j +@Service +@Transactional(rollbackFor = Exception.class) +public class YxStoreBargainUserHelpServiceImpl extends BaseServiceImpl implements YxStoreBargainUserHelpService { + + @Autowired + private IGenerator generator; + + @Autowired + private YxStoreBargainUserHelpMapper yxStoreBargainUserHelpMapper; + + @Autowired + private YxStoreBargainUserService storeBargainUserService; + @Autowired + private YxUserService userService; + + + + + /** + * 获取砍价帮 + * @param bargainId 砍价商品id + * @param bargainUserUid 砍价用户id + * @param page page + * @param limit limit + * @return list + */ + @Override + public List getList(Long bargainId, Long bargainUserUid, + int page, int limit) { + YxStoreBargainUser storeBargainUser = storeBargainUserService + .getBargainUserInfo(bargainId,bargainUserUid); + if(ObjectUtil.isNull(storeBargainUser)) { + return Collections.emptyList(); + } + Page pageModel = new Page<>(page, limit); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreBargainUserHelp::getBargainUserId,storeBargainUser.getId()) + .orderByDesc(YxStoreBargainUserHelp::getId); + List storeBargainUserHelpQueryVos = generator + .convert(yxStoreBargainUserHelpMapper.selectPage(pageModel,wrapper).getRecords(), + YxStoreBargainUserHelpQueryVo.class); + + storeBargainUserHelpQueryVos.forEach(item->{ + YxUser yxUser = userService.getById(item.getUid()); + item.setAvatar(yxUser.getAvatar()); + item.setNickname(yxUser.getNickname()); + }); + + return storeBargainUserHelpQueryVos; + } + + /** + * 获取砍价帮总人数 + * + * @param bargainId 砍价产品ID + * @param bargainUserUid 用户参与砍价表id + * @return int + */ + @Override + public Long getBargainUserHelpPeopleCount(Long bargainId, Long bargainUserUid) { + return this.lambdaQuery() + .eq(YxStoreBargainUserHelp::getBargainUserId,bargainUserUid) + .eq(YxStoreBargainUserHelp::getBargainId,bargainId) + .count(); + } + + + + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..20532e11f8d447ad780d61ad4d29c9853a0948f3 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainUserServiceImpl.java @@ -0,0 +1,230 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.impl; + +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.OrderInfoEnum; +import co.yixiang.modules.activity.domain.YxStoreBargain; +import co.yixiang.modules.activity.domain.YxStoreBargainUser; +import co.yixiang.modules.activity.domain.YxStoreBargainUserHelp; +import co.yixiang.modules.activity.service.YxStoreBargainService; +import co.yixiang.modules.activity.service.YxStoreBargainUserHelpService; +import co.yixiang.modules.activity.service.YxStoreBargainUserService; +import co.yixiang.modules.activity.service.mapper.YxStoreBargainUserMapper; +import co.yixiang.modules.activity.vo.YxStoreBargainUserQueryVo; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.List; + + +/** + *

+ * 用户参与砍价表 服务实现类 + *

+ * + * @author hupeng + * @since 2019-12-21 + */ +@Slf4j +@Service +public class YxStoreBargainUserServiceImpl extends BaseServiceImpl implements YxStoreBargainUserService { + + + @Autowired + private IGenerator generator; + + @Autowired + private YxStoreBargainUserMapper yxStoreBargainUserMapper; + + @Autowired + private YxStoreBargainService storeBargainService; + @Autowired + private YxStoreBargainUserHelpService storeBargainUserHelpService; + + + /** + * 修改用户砍价状态 + * @param bargainId 砍价产品id + * @param uid 用户id + */ + @Override + public void setBargainUserStatus(Long bargainId, Long uid) { + YxStoreBargainUser storeBargainUser = getBargainUserInfo(bargainId.longValue(),uid); + if(ObjectUtil.isNull(storeBargainUser)) { + return; + } + + if(storeBargainUser.getStatus() != 1) { + return; + } + double price = NumberUtil.sub(NumberUtil.sub(storeBargainUser.getBargainPrice(), + storeBargainUser.getBargainPriceMin()),storeBargainUser.getPrice()).doubleValue(); + if(price > 0) { + return; + } + + storeBargainUser.setStatus(3); + + yxStoreBargainUserMapper.updateById(storeBargainUser); + } + + /** + * 砍价取消 + * @param bargainId 砍价商品id + * @param uid uid + */ + @Override + public void bargainCancel(Long bargainId, Long uid) { + YxStoreBargainUser storeBargainUser = this.getBargainUserInfo(bargainId,uid); + if(ObjectUtil.isNull(storeBargainUser)) { + throw new YshopException("数据不存在"); + } + if(!OrderInfoEnum.BARGAIN_STATUS_1.getValue().equals(storeBargainUser.getStatus())){ + throw new YshopException("状态错误"); + } + yxStoreBargainUserMapper.deleteById(storeBargainUser.getId()); + } + + /** + * 获取用户的砍价产品 + * @param bargainUserUid 用户id + * @param page page + * @param limit limit + * @return List + */ + @Override + public List bargainUserList(Long bargainUserUid, int page, int limit) { + Page pageModel = new Page<>(page, limit); + return yxStoreBargainUserMapper.getBargainUserList(bargainUserUid,pageModel); + } + + /** + * 判断用户是否还可以砍价 + * @param bargainId 砍价产品id + * @param bargainUserUid 开启砍价用户id + * @param uid 当前用户id + * @return false=NO true=YES + */ + @Override + public boolean isBargainUserHelp(Long bargainId, Long bargainUserUid, Long uid) { + YxStoreBargainUser storeBargainUser = this.getBargainUserInfo(bargainId, bargainUserUid); + YxStoreBargain storeBargain = storeBargainService + .getById(bargainId); + if(ObjectUtil.isNull(storeBargainUser) || ObjectUtil.isNull(storeBargain)){ + return false; + } + Long count = storeBargainUserHelpService.lambdaQuery() + .eq(YxStoreBargainUserHelp::getBargainId,bargainId) + .eq(YxStoreBargainUserHelp::getBargainUserId,storeBargainUser.getId()) + .eq(YxStoreBargainUserHelp::getUid,uid) + .count(); + if(count == 0) { + return true; + } + return false; + } + + /** + * 添加砍价记录 + * @param bargainId 砍价商品id + * @param uid 用户id + */ + @Override + public void setBargain(Long bargainId, Long uid) { + YxStoreBargainUser storeBargainUser = this.getBargainUserInfo(bargainId,uid); + if(storeBargainUser != null) { + throw new YshopException("你已经参与了"); + } + YxStoreBargain storeBargain = storeBargainService.getById(bargainId); + if(storeBargain == null) { + throw new YshopException("砍价商品不存在"); + } + YxStoreBargainUser yxStoreBargainUser = YxStoreBargainUser + .builder() + .bargainId(bargainId) + .uid(uid) + .bargainPrice(storeBargain.getPrice()) + .bargainPriceMin(storeBargain.getMinPrice()) + .price(BigDecimal.ZERO) + .status(OrderInfoEnum.BARGAIN_STATUS_1.getValue()) + .build(); + yxStoreBargainUserMapper.insert(yxStoreBargainUser); + } + +// /** +// * 获取用户可以砍掉的价格 +// * @param id +// * @return +// */ +// @Override +// public double getBargainUserDiffPrice(int id) { +// YxStoreBargainUser storeBargainUserQueryVo = this.getById(id); +// return NumberUtil.sub(storeBargainUserQueryVo.getBargainPrice() +// ,storeBargainUserQueryVo.getBargainPriceMin()).doubleValue(); +// } + + + + /** + * 获取某个用户参与砍价信息 + * @param bargainId 砍价id + * @param uid 用户id + * @return YxStoreBargainUser + */ + @Override + public YxStoreBargainUser getBargainUserInfo(Long bargainId, Long uid) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreBargainUser::getBargainId,bargainId) + .eq(YxStoreBargainUser::getUid,uid) + .last("limit 1"); + return yxStoreBargainUserMapper.selectOne(wrapper); + } + + /** + * 获取参与砍价的用户数量 + * + * @param bargainId 砍价id + * @param status 状态 OrderInfoEnum 1 进行中 2 结束失败 3结束成功 + * @return int + */ + @Override + public Long getBargainUserCount(Long bargainId, Integer status) { + return this.lambdaQuery().eq(YxStoreBargainUser::getBargainId,bargainId) + .eq(YxStoreBargainUser::getStatus,status).count(); + } + + +// +// /** +// * 获取参与砍价的用户列表 +// * @param bargainId 砍价id +// * @param status 状态 1 进行中 2 结束失败 3结束成功 +// * @return +// */ +// @Override +// public List getBargainUserList(int bargainId, int status) { +// LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); +// wrapper.eq("bargain_id",bargainId).eq("status",status); +// return generator.convert(yxStoreBargainUserMapper.selectList(wrapper), +// YxStoreBargainUserQueryVo.class); +// } + + + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..9c359f7b28f3ed8924bda39b9d8525de01e96b11 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java @@ -0,0 +1,388 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.ProductTypeEnum; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.enums.SpecTypeEnum; +import co.yixiang.exception.BadRequestException; +import co.yixiang.modules.activity.domain.YxStoreCombination; +import co.yixiang.modules.activity.domain.YxStorePink; +import co.yixiang.modules.activity.domain.YxStoreSeckill; +import co.yixiang.modules.activity.domain.YxStoreVisit; +import co.yixiang.modules.activity.service.YxStoreCombinationService; +import co.yixiang.modules.activity.service.YxStorePinkService; +import co.yixiang.modules.activity.service.dto.PinkAllDto; +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.modules.activity.service.mapper.YxStorePinkMapper; +import co.yixiang.modules.activity.service.mapper.YxStoreVisitMapper; +import co.yixiang.modules.activity.vo.CombinationQueryVo; +import co.yixiang.modules.activity.vo.StoreCombinationVo; +import co.yixiang.modules.activity.vo.YxStoreCombinationQueryVo; +import co.yixiang.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.service.YxStoreProductAttrService; +import co.yixiang.modules.product.service.YxStoreProductAttrValueService; +import co.yixiang.modules.product.service.YxStoreProductReplyService; +import co.yixiang.modules.product.service.YxStoreProductService; +import co.yixiang.modules.product.service.dto.FromatDetailDto; +import co.yixiang.modules.product.service.dto.ProductFormatDto; +import co.yixiang.modules.product.service.dto.ProductResultDto; +import co.yixiang.modules.product.vo.YxStoreProductAttrQueryVo; +import co.yixiang.modules.template.domain.YxShippingTemplates; +import co.yixiang.modules.template.service.YxShippingTemplatesService; +import co.yixiang.utils.FileUtil; +import co.yixiang.utils.RedisUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +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.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class YxStoreCombinationServiceImpl extends BaseServiceImpl implements YxStoreCombinationService { + + @Autowired + private IGenerator generator; + + @Autowired + private YxStorePinkMapper yxStorePinkMapper; + @Autowired + private YxStoreVisitMapper yxStoreVisitMapper; + + @Autowired + private YxStoreCombinationMapper yxStoreCombinationMapper; + @Autowired + private YxStoreProductReplyService replyService; + @Autowired + private YxStorePinkService storePinkService; + @Autowired + private YxStoreProductAttrService yxStoreProductAttrService; + @Autowired + private YxStoreProductAttrValueService yxStoreProductAttrValueService; + @Autowired + private YxShippingTemplatesService shippingTemplatesService; + + @Autowired + private YxStoreProductService storeProductService; + + + + /** + * 获取拼团详情 + * @param id 拼团产品id + * @param uid uid + * @return StoreCombinationVo + */ + @Override + public StoreCombinationVo getDetail(Long id, Long uid) { + Date now = new Date(); + YxStoreCombination storeCombination = this + .lambdaQuery().eq(YxStoreCombination::getId,id) + .eq(YxStoreCombination::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .le(YxStoreCombination::getStartTime,now) + .ge(YxStoreCombination::getStopTime,now) + .one(); + if(storeCombination == null){ + throw new YshopException("拼团不存在或已下架"); + } + //获取商品sku + Map returnMap = yxStoreProductAttrService.getProductAttrDetail(storeCombination.getProductId()); + + YxStoreCombinationQueryVo storeCombinationQueryVo = generator.convert(storeCombination, + YxStoreCombinationQueryVo.class); + + StoreCombinationVo storeCombinationVo = new StoreCombinationVo(); + + storeCombinationVo.setStoreInfo(storeCombinationQueryVo); + + //评价 + storeCombinationVo.setReply(replyService + .getReply(storeCombinationQueryVo.getProductId())); + Long replyCount = replyService.productReplyCount(storeCombinationQueryVo.getProductId()); + //总条数 + storeCombinationVo.setReplyCount(replyCount); + //好评比例 + storeCombinationVo.setReplyChance(replyService.replyPer(storeCombinationQueryVo.getProductId())); + + //获取运费模板名称 + String storeFreePostage = RedisUtil.get("store_free_postage"); + String tempName = ""; + if(StrUtil.isBlank(storeFreePostage) + || !NumberUtil.isNumber(storeFreePostage) + || Integer.valueOf(storeFreePostage) == 0){ + tempName = "全国包邮"; + }else{ + YxShippingTemplates shippingTemplates = shippingTemplatesService.getById(storeCombination.getTempId()); + if(ObjectUtil.isNotNull(shippingTemplates)){ + tempName = shippingTemplates.getName(); + }else { + throw new BadRequestException("请配置运费模板"); + } + + } + storeCombinationVo.setTempName(tempName); + + PinkAllDto pinkAllDto = storePinkService.getPinkAll(id); + storeCombinationVo.setPindAll(pinkAllDto.getPindAll()); + storeCombinationVo.setPink(pinkAllDto.getList()); + storeCombinationVo.setPinkOkList(storePinkService.getPinkOkList(uid)); + storeCombinationVo.setPinkOkSum(storePinkService.getPinkOkSumTotalNum()); + storeCombinationVo.setProductAttr((List)returnMap.get("productAttr")); + storeCombinationVo.setProductValue((Map)returnMap.get("productValue")); + return storeCombinationVo; + } + + /** + * 拼团列表 + * @param page page + * @param limit limit + * @return list + */ + @Override + public CombinationQueryVo getList(int page, int limit) { + CombinationQueryVo combinationQueryVo = new CombinationQueryVo(); + Date nowTime = new Date(); + Page pageModel = new Page<>(page, limit); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper + .eq(YxStoreCombination::getIsShow,1) + .le(YxStoreCombination::getStartTime,nowTime) + .ge(YxStoreCombination::getStopTime,nowTime) + .orderByDesc(YxStoreCombination::getSort); + IPage yxStoreCombinationIPage = yxStoreCombinationMapper.selectPage(pageModel, wrapper); + + List collect = yxStoreCombinationIPage.getRecords().stream().map(i -> { + YxStoreCombinationQueryVo yxStoreCombinationQueryVo = new YxStoreCombinationQueryVo(); + BeanUtils.copyProperties(i, yxStoreCombinationQueryVo); + return yxStoreCombinationQueryVo; + }).collect(Collectors.toList()); + combinationQueryVo.setStoreCombinationQueryVos(collect); + combinationQueryVo.setLastPage(yxStoreCombinationIPage.getPages()); + return combinationQueryVo; + } + + + //=======================================// + + @Override + //@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(yxStorePinkMapper.selectCount(new LambdaQueryWrapper() + .eq(YxStorePink::getCid,combinationDTO.getId()))); + + //成团人数 + combinationDTO.setCountPeoplePink(yxStorePinkMapper.selectCount(new LambdaQueryWrapper() + .eq(YxStorePink::getCid,combinationDTO.getId()) + .eq(YxStorePink::getKId,0)));//团长 + //获取查看拼团产品人数 + combinationDTO.setCountPeopleBrowse(yxStoreVisitMapper.selectCount(new LambdaQueryWrapper() + .eq(YxStoreVisit::getProductId,combinationDTO.getId()) + .eq(YxStoreVisit::getProductType, ProductTypeEnum.COMBINATION.getValue()))); + } + Map map = new LinkedHashMap<>(2); + map.put("content",combinationDTOS); + map.put("totalElements", page.getTotal()); + return map; + } + + + @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("推荐图", yxStoreCombination.getImage()); + map.put("轮播图", yxStoreCombination.getImages()); + map.put("活动标题", yxStoreCombination.getTitle()); + 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.getIsHost()); + map.put("产品状态", yxStoreCombination.getIsShow()); + 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); + } + + /** + * 修改状态 + * @param id 拼团产品id + * @param status ShopCommonEnum + */ + @Override + public void onSale(Long id, Integer status) { + if(ShopCommonEnum.SHOW_1.getValue().equals(status)){ + status = ShopCommonEnum.SHOW_0.getValue(); + }else{ + status = ShopCommonEnum.SHOW_1.getValue(); + } + YxStoreCombination yxStoreCombination = new YxStoreCombination(); + yxStoreCombination.setIsShow(status); + yxStoreCombination.setId(id); + this.saveOrUpdate(yxStoreCombination); + } + + @Override + public boolean saveCombination(YxStoreCombinationDto resources) { + ProductResultDto resultDTO = this.computedProduct(resources.getAttrs()); + + //添加商品 + YxStoreCombination yxStoreCombination = new YxStoreCombination(); + BeanUtil.copyProperties(resources,yxStoreCombination,"images"); + if(resources.getImages().isEmpty()) { + throw new YshopException("请上传轮播图"); + } + + yxStoreCombination.setPrice(BigDecimal.valueOf(resultDTO.getMinPrice())); + yxStoreCombination.setProductPrice(BigDecimal.valueOf(resultDTO.getMinOtPrice())); + yxStoreCombination.setCost(resultDTO.getMinCost().intValue()); + yxStoreCombination.setStock(resultDTO.getStock()); + yxStoreCombination.setImages(String.join(",", resources.getImages())); + this.saveOrUpdate(yxStoreCombination); + + //属性处理 + //处理单sKu + if(SpecTypeEnum.TYPE_0.getValue().equals(resources.getSpecType())){ + FromatDetailDto fromatDetailDto = FromatDetailDto.builder() + .value("规格") + .detailValue("") + .attrHidden("") + .detail(ListUtil.toList("默认")) + .build(); + List attrs = resources.getAttrs(); + ProductFormatDto productFormatDto = attrs.get(0); + productFormatDto.setValue1("规格"); + Map map = new HashMap<>(); + map.put("规格","默认"); + productFormatDto.setDetail(map); + yxStoreProductAttrService.insertYxStoreProductAttr(ListUtil.toList(fromatDetailDto), + ListUtil.toList(productFormatDto),resources.getProductId()); + }else{ + yxStoreProductAttrService.insertYxStoreProductAttr(resources.getItems(), + resources.getAttrs(),resources.getProductId()); + } + return true; + } + + + /** + * 计算产品数据 + * @param attrs attrs + * @return ProductResultDto + */ + private ProductResultDto computedProduct(List attrs){ + //取最小价格 + Double minPrice = attrs + .stream() + .map(ProductFormatDto::getPinkPrice) + .min(Comparator.naturalOrder()) + .orElse(0d); + + Double minOtPrice = attrs + .stream() + .map(ProductFormatDto::getOtPrice) + .min(Comparator.naturalOrder()) + .orElse(0d); + + Double minCost = attrs + .stream() + .map(ProductFormatDto::getCost) + .min(Comparator.naturalOrder()) + .orElse(0d); + //计算库存 + Integer stock = attrs + .stream() + .map(ProductFormatDto::getPinkStock) + .reduce(Integer::sum) + .orElse(0); + + if(stock <= 0) { + throw new YshopException("库存不能低于0"); + } + + return ProductResultDto.builder() + .minPrice(minPrice) + .minOtPrice(minOtPrice) + .minCost(minCost) + .stock(stock) + .build(); + } + + /** + * mapTobean + * @param listMap listMap + * @return list + */ + private List ListMapToListBean(List> listMap){ + List list = new ArrayList<>(); + // 循环遍历出map对象 + for (Map m : listMap) { + list.add(BeanUtil.mapToBean(m,ProductFormatDto.class,true)); + } + return list; + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueServiceImpl.java similarity index 45% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueServiceImpl.java index 96c399f2d6fa04bcea0486411cb5fe852ecf5896..bbadbb6127598df9aade7f568c9eadebd34cd098 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueServiceImpl.java @@ -2,19 +2,29 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service.impl; +import cn.hutool.core.util.ObjectUtil; +import co.yixiang.api.YshopException; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.CouponEnum; import co.yixiang.modules.activity.domain.YxStoreCouponIssue; +import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser; import co.yixiang.modules.activity.service.YxStoreCouponIssueService; +import co.yixiang.modules.activity.service.YxStoreCouponIssueUserService; +import co.yixiang.modules.activity.service.YxStoreCouponUserService; 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.modules.activity.vo.YxStoreCouponIssueQueryVo; import co.yixiang.utils.FileUtil; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; import org.springframework.data.domain.Pageable; @@ -29,23 +39,105 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreCouponIssue") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxStoreCouponIssueServiceImpl extends BaseServiceImpl implements YxStoreCouponIssueService { private final IGenerator generator; + private final YxStoreCouponIssueMapper yxStoreCouponIssueMapper; + + + private final YxStoreCouponUserService storeCouponUserService; + private final YxStoreCouponIssueUserService storeCouponIssueUserService; + + + /** + * 领取优惠券 + * @param id id 优惠券id + * @param uid uid + */ + @Override + public void issueUserCoupon(Integer id, Long uid) { + YxStoreCouponIssueQueryVo couponIssueQueryVo = yxStoreCouponIssueMapper + .selectOne(id); + if(ObjectUtil.isNull(couponIssueQueryVo)) { + throw new YshopException("领取的优惠劵已领完或已过期"); + } + + Long count = this.couponCount(id,uid); + if(count > 0) { + throw new YshopException("已领取过该优惠劵"); + } + + if(couponIssueQueryVo.getRemainCount() <= 0 + && CouponEnum.PERMANENT_0.getValue().equals(couponIssueQueryVo.getIsPermanent())){ + throw new YshopException("抱歉优惠卷已经领取完了"); + } + + storeCouponUserService.addUserCoupon(uid,couponIssueQueryVo.getCid()); + + storeCouponIssueUserService.addUserIssue(uid,id); + + if(couponIssueQueryVo.getTotalCount() > 0){ + yxStoreCouponIssueMapper.decCount(id); + } + + } + + + /** + * 优惠券列表 + * @param page page + * @param limit limit + * @param uid 用户id + * @return list + */ + @Override + public List getCouponList(int page, int limit, Long uid,Long productId,Integer type) { + Page pageModel = new Page<>(page, limit); + + if(type == null) { + type = CouponEnum.TYPE_0.getValue(); + } + List list = yxStoreCouponIssueMapper + .selecCoupontList(pageModel,type,productId); + for (YxStoreCouponIssueQueryVo couponIssue : list) { + Long count = this.couponCount(couponIssue.getId(),uid); + if(count > 0){ + couponIssue.setIsUse(true); + }else{ + couponIssue.setIsUse(false); + } + + } + return list; + } + + + /** + * 获取用户领取优惠券数量 + * @param id 前台优惠券id + * @param uid 用户id + * @return int + */ + private Long couponCount(Integer id, Long uid) { + return storeCouponIssueUserService.lambdaQuery() + .eq(YxStoreCouponIssueUser::getUid,uid) + .eq(YxStoreCouponIssueUser::getIssueCouponId,id) + .count(); + } + + //============================================================// + + @Override //@Cacheable public Map queryAll(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable) { @@ -60,8 +152,8 @@ public class YxStoreCouponIssueServiceImpl extends BaseServiceImpl queryAll(YxStoreCouponIssueQueryCriteria criteria) { - return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCouponIssue.class, criteria)); + public List queryAll(YxStoreCouponIssueQueryCriteria criteria){ + return this.list(QueryHelpPlus.getPredicate(YxStoreCouponIssue.class, criteria)); } @@ -69,8 +161,8 @@ public class YxStoreCouponIssueServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxStoreCouponIssueDto yxStoreCouponIssue : all) { - Map map = new LinkedHashMap<>(); - map.put(" cname", yxStoreCouponIssue.getCname()); + Map map = new LinkedHashMap<>(); + map.put(" cname", yxStoreCouponIssue.getCname()); map.put("优惠券ID", yxStoreCouponIssue.getCid()); map.put("优惠券领取开启时间", yxStoreCouponIssue.getStartTime()); map.put("优惠券领取结束时间", yxStoreCouponIssue.getEndTime()); diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueUserServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueUserServiceImpl.java similarity index 76% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueUserServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueUserServiceImpl.java index 038ecdf8301c819cad1eed8e3f06529861616530..b74a03245085cd74ae9fb013fe30bf89f2442fac 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueUserServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponIssueUserServiceImpl.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service.impl; @@ -29,23 +31,33 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreCouponIssueUser") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxStoreCouponIssueUserServiceImpl extends BaseServiceImpl implements YxStoreCouponIssueUserService { private final IGenerator generator; + /** + * 添加优惠券领取记录 + * @param uid 用户id + * @param id 前台优惠券id + */ + @Override + public void addUserIssue(Long uid, Integer id) { + YxStoreCouponIssueUser couponIssueUser = new YxStoreCouponIssueUser(); + couponIssueUser.setIssueCouponId(id); + couponIssueUser.setUid(uid); + this.save(couponIssueUser); + } + + @Override //@Cacheable public Map queryAll(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable) { @@ -60,7 +72,7 @@ public class YxStoreCouponIssueUserServiceImpl extends BaseServiceImpl queryAll(YxStoreCouponIssueUserQueryCriteria criteria) { + public List queryAll(YxStoreCouponIssueUserQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCouponIssueUser.class, criteria)); } @@ -69,9 +81,10 @@ public class YxStoreCouponIssueUserServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxStoreCouponIssueUserDto yxStoreCouponIssueUser : all) { - Map map = new LinkedHashMap<>(); + 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); diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponServiceImpl.java similarity index 70% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponServiceImpl.java index 630d73f60c30b90cda93709cd7960eb72cae762f..75cc19bd1597059843f4834c2225c47730b921e0 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponServiceImpl.java @@ -2,10 +2,13 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service.impl; +import cn.hutool.core.util.StrUtil; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; @@ -14,6 +17,8 @@ import co.yixiang.modules.activity.service.YxStoreCouponService; 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.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.service.YxStoreProductService; import co.yixiang.utils.FileUtil; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; @@ -25,26 +30,23 @@ import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.ArrayList; +import java.util.Arrays; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreCoupon") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxStoreCouponServiceImpl extends BaseServiceImpl implements YxStoreCouponService { private final IGenerator generator; + private final YxStoreProductService storeProductService; @Override //@Cacheable @@ -52,7 +54,16 @@ public class YxStoreCouponServiceImpl extends BaseServiceImpl page = new PageInfo<>(queryAll(criteria)); Map map = new LinkedHashMap<>(2); - map.put("content", generator.convert(page.getList(), YxStoreCouponDto.class)); + List storeCouponDtos = generator.convert(page.getList(), YxStoreCouponDto.class); + for (YxStoreCouponDto storeCouponDto : storeCouponDtos) { + if(StrUtil.isNotBlank(storeCouponDto.getProductId())){ + List storeProducts = storeProductService.lambdaQuery() + .in(YxStoreProduct::getId, Arrays.asList(storeCouponDto.getProductId().split(","))) + .list(); + storeCouponDto.setProduct(storeProducts); + } + } + map.put("content", storeCouponDtos); map.put("totalElements", page.getTotal()); return map; } @@ -60,7 +71,7 @@ public class YxStoreCouponServiceImpl extends BaseServiceImpl queryAll(YxStoreCouponQueryCriteria criteria) { + public List queryAll(YxStoreCouponQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCoupon.class, criteria)); } @@ -69,7 +80,7 @@ public class YxStoreCouponServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxStoreCouponDto yxStoreCoupon : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("优惠券名称", yxStoreCoupon.getTitle()); map.put("兑换消耗积分值", yxStoreCoupon.getIntegral()); map.put("兑换的优惠券面值", yxStoreCoupon.getCouponPrice()); diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponUserServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponUserServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..2c02c57fd9223d610551c5cbdacf4df2bee70252 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponUserServiceImpl.java @@ -0,0 +1,354 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.impl; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.NumberUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.CouponEnum; +import co.yixiang.enums.CouponGetEnum; +import co.yixiang.modules.activity.domain.YxStoreCoupon; +import co.yixiang.modules.activity.domain.YxStoreCouponUser; +import co.yixiang.modules.activity.service.YxStoreCouponService; +import co.yixiang.modules.activity.service.YxStoreCouponUserService; +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.activity.vo.StoreCouponUserVo; +import co.yixiang.modules.activity.vo.YxStoreCouponUserQueryVo; +import co.yixiang.modules.cart.service.YxStoreCartService; +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.utils.FileUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +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.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Service +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreCouponUserServiceImpl extends BaseServiceImpl implements YxStoreCouponUserService { + + @Autowired + private IGenerator generator; + + + @Autowired + private YxStoreCouponUserMapper yxStoreCouponUserMapper; + + @Autowired + private YxUserService userService; + @Autowired + private YxStoreCouponService storeCouponService; + @Autowired + private YxStoreCartService yxStoreCartService; + + /** + * 获取当前用户优惠券数量 + * + * @param uid uid + * @return int + */ + @Override + public Long getUserValidCouponCount(Long uid) { + this.checkInvalidCoupon(); + return this.lambdaQuery() + .eq(YxStoreCouponUser::getStatus, CouponEnum.STATUS_0.getValue()) + .eq(YxStoreCouponUser::getUid,uid) + .count(); + } + + /** + * 获取满足条件的可用优惠券 + * @param cartIds 购物车ids + * @return list + */ + @Override + public List beUsableCouponList(Long uid,String cartIds) { + + Map cartGroup = yxStoreCartService.getUserProductCartList(uid, + cartIds, ShopConstants.YSHOP_ONE_NUM); + + List cartInfo = (List)cartGroup.get("valid"); + + BigDecimal sumPrice = BigDecimal.ZERO; + for (YxStoreCartQueryVo storeCart : cartInfo) { + sumPrice = NumberUtil.add(sumPrice,NumberUtil.mul(storeCart.getCartNum(),storeCart.getTruePrice())); + } + + List productIds = cartInfo.stream() + .map(YxStoreCartQueryVo::getProductId) + .map(Object::toString) + .collect(Collectors.toList()); + + + return this.getUsableCouponList(uid, sumPrice.doubleValue(), productIds); + } + + /** + * 获取下单时候满足的优惠券 + * @param uid uid + * @param price 总价格 + * @param productIds list + * @return list + */ + @Override + public List getUsableCouponList(Long uid, double price, List productIds) { + Date now = new Date(); + List storeCouponUsers = yxStoreCouponUserMapper.selectCouponList(now, price, uid); + return storeCouponUsers.stream() + .filter(coupon -> + CouponEnum.TYPE_2.getValue().equals(coupon.getType()) || + CouponEnum.TYPE_0.getValue().equals(coupon.getType()) + || (CouponEnum.TYPE_1.getValue().equals(coupon.getType()) + && isSame(Arrays.asList(coupon.getProductId().split(",")),productIds))) + .collect(Collectors.toList()); + + } + + + + + /** + * 获取用户优惠券 + * @param id 优惠券id + * @param uid 用户id + * @return YxStoreCouponUser + */ + @Override + public YxStoreCouponUser getCoupon(Integer id,Long uid) { + return this.lambdaQuery() + .eq(YxStoreCouponUser::getIsFail, CouponEnum.FALI_0.getValue()) + .eq(YxStoreCouponUser::getStatus,CouponEnum.STATUS_0.getValue()) + .eq(YxStoreCouponUser::getUid,uid) + .eq(YxStoreCouponUser::getId,id) + .one(); + } + + @Override + public void useCoupon(int id) { + YxStoreCouponUser couponUser = new YxStoreCouponUser(); + couponUser.setId((long)id); + couponUser.setStatus(1); + couponUser.setUseTime(new Date()); + yxStoreCouponUserMapper.updateById(couponUser); + } + + + + /** + * 获取用户优惠券 + * @param uid uid + * @return list + */ + @Override + public List getUserCoupon(Long uid) { + //this.checkInvalidCoupon(); + List storeCouponUsers = yxStoreCouponUserMapper + .selectList(Wrappers.lambdaQuery() + .eq(YxStoreCouponUser::getUid,uid)); + List storeCouponUserQueryVoList = new ArrayList<>(); + long nowTime = System.currentTimeMillis(); + for (YxStoreCouponUser couponUser : storeCouponUsers) { + YxStoreCouponUserQueryVo queryVo = generator.convert(couponUser,YxStoreCouponUserQueryVo.class); + if(couponUser.getIsFail() == 1){ + queryVo.set_type(CouponEnum.USE_0.getValue()); + queryVo.set_msg("已失效"); + }else if (couponUser.getStatus() == 1){ + queryVo.set_type(CouponEnum.USE_0.getValue()); + queryVo.set_msg("已使用"); + }else if (couponUser.getStatus() == 2){ + queryVo.set_type(CouponEnum.USE_0.getValue()); + queryVo.set_msg("已过期"); + }else if(couponUser.getCreateTime().getTime() > nowTime || couponUser.getEndTime().getTime() < nowTime){ + queryVo.set_type(CouponEnum.USE_0.getValue()); + queryVo.set_msg("已过期"); + }else{ + queryVo.set_type(CouponEnum.USE_1.getValue()); + queryVo.set_msg("可使用"); + } + + storeCouponUserQueryVoList.add(queryVo); + } + return storeCouponUserQueryVoList; + } + + /** + * 添加优惠券记录 + * @param uid 用户id + * @param cid 优惠券id + */ + @Override + public void addUserCoupon(Long uid, Integer cid) { + YxStoreCoupon storeCoupon = storeCouponService.getById(cid); + if(storeCoupon == null) { + throw new YshopException("优惠劵不存在"); + } + + Date now = new Date(); + + Date endTime = DateUtil.offsetDay(now,storeCoupon.getCouponTime()); + + YxStoreCouponUser storeCouponUser = YxStoreCouponUser.builder() + .cid(storeCoupon.getId()) + .uid(uid) + .couponPrice(storeCoupon.getCouponPrice()) + .couponTitle(storeCoupon.getTitle()) + .useMinPrice(storeCoupon.getUseMinPrice()) + .endTime(endTime) + .type(CouponGetEnum.GET.getValue()) + .build(); + + this.save(storeCouponUser); + + } + + + /** + * 判断两个list是否有相同值 + * @param list1 list + * @param list2 list + * @return boolean + */ + private boolean isSame(List list1,List list2){ + if(list2.isEmpty()) { + return true; + } + list1 = new ArrayList<>(list1); + list2 = new ArrayList<>(list2); + list1.addAll(list2); + int total = list1.size(); + + List newList = new ArrayList<>(new HashSet<>(list1)); + + int newTotal = newList.size(); + + + return total > newTotal; + } + + + /** + * 检查优惠券状态 + */ + private void checkInvalidCoupon() { + Date nowTime = new Date(); + LambdaQueryWrapper wrapper= new LambdaQueryWrapper<>(); + wrapper.lt(YxStoreCouponUser::getEndTime,nowTime) + .eq(YxStoreCouponUser::getStatus,CouponEnum.STATUS_0.getValue()); + YxStoreCouponUser couponUser = new YxStoreCouponUser(); + couponUser.setStatus(CouponEnum.STATUS_2.getValue()); + yxStoreCouponUserMapper.update(couponUser,wrapper); + + } + + + + //=========================================================================================================// + + @Override + //@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 LambdaQueryWrapper() + .eq(YxUser::getUid,couponUserDTO.getUid())).getNickname()); + } + Map map = new LinkedHashMap<>(2); + map.put("content",storeOrderDTOS); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxStoreCouponUserQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCouponUser.class, criteria)); + } + @Override + 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 + public Map getUserPCCoupon(Long uid, int page, int limit, Integer type) { + Page yxStoreCouponUserPage = new Page<>(page, limit); + yxStoreCouponUserMapper.selectPage(yxStoreCouponUserPage,Wrappers.lambdaQuery() + .eq(YxStoreCouponUser::getUid,uid).eq(YxStoreCouponUser::getStatus,type)); + + List storeCouponUserQueryVoList = new ArrayList<>(); + long nowTime = System.currentTimeMillis(); + for (YxStoreCouponUser couponUser : yxStoreCouponUserPage.getRecords()) { + YxStoreCouponUserQueryVo queryVo = generator.convert(couponUser,YxStoreCouponUserQueryVo.class); + if(couponUser.getIsFail() == 1){ + queryVo.set_type(CouponEnum.USE_0.getValue()); + queryVo.set_msg("已失效"); + }else if (couponUser.getStatus() == 1){ + queryVo.set_type(CouponEnum.USE_0.getValue()); + queryVo.set_msg("已使用"); + }else if (couponUser.getStatus() == 2){ + queryVo.set_type(CouponEnum.USE_0.getValue()); + queryVo.set_msg("已过期"); + }else if(couponUser.getCreateTime().getTime() > nowTime || couponUser.getEndTime().getTime() < nowTime){ + queryVo.set_type(CouponEnum.USE_0.getValue()); + queryVo.set_msg("已过期"); + }else{ + queryVo.set_type(CouponEnum.USE_1.getValue()); + queryVo.set_msg("可使用"); + } + + storeCouponUserQueryVoList.add(queryVo); + } + Map map = new HashMap<>(); + map.put("list",storeCouponUserQueryVoList); + map.put("total",yxStoreCouponUserPage.getTotal()); + map.put("totalPage",yxStoreCouponUserPage.getPages()); + return map; + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..234190d841563e29f0b675ef93566842cdb9ca6a --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java @@ -0,0 +1,699 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.impl; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.OrderInfoEnum; +import co.yixiang.enums.PinkEnum; +import co.yixiang.modules.activity.domain.YxStoreCombination; +import co.yixiang.modules.activity.domain.YxStorePink; +import co.yixiang.modules.activity.service.YxStoreCombinationService; +import co.yixiang.modules.activity.service.YxStorePinkService; +import co.yixiang.modules.activity.service.YxStoreVisitService; +import co.yixiang.modules.activity.service.dto.PinkAllDto; +import co.yixiang.modules.activity.service.dto.PinkDto; +import co.yixiang.modules.activity.service.dto.PinkUserDto; +import co.yixiang.modules.activity.service.dto.YxStorePinkDto; +import co.yixiang.modules.activity.service.dto.YxStorePinkQueryCriteria; +import co.yixiang.modules.activity.service.mapper.YxStoreCombinationMapper; +import co.yixiang.modules.activity.service.mapper.YxStorePinkMapper; +import co.yixiang.modules.activity.vo.PinkInfoVo; +import co.yixiang.modules.activity.vo.YxStoreCombinationQueryVo; +import co.yixiang.modules.activity.vo.YxStorePinkQueryVo; +import co.yixiang.modules.cart.domain.YxStoreCart; +import co.yixiang.modules.cart.service.YxStoreCartService; +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.order.domain.YxStoreOrder; +import co.yixiang.modules.order.service.YxStoreOrderService; +import co.yixiang.modules.order.vo.YxStoreOrderQueryVo; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.modules.user.vo.YxUserQueryVo; +import co.yixiang.utils.FileUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.data.domain.Pageable; +import org.springframework.data.redis.core.RedisTemplate; +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.Date; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Service +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStorePinkServiceImpl extends BaseServiceImpl implements YxStorePinkService { + + @Autowired + private IGenerator generator; + @Autowired + private YxStorePinkMapper yxStorePinkMapper; + @Autowired + private YxStoreCombinationMapper yxStoreCombinationMapper; + @Autowired + private YxStoreCombinationService combinationService; + @Autowired + private YxStoreOrderService storeOrderService; + @Autowired + private YxUserService userService; + @Autowired + private RedisTemplate redisTemplate; + @Autowired + private YxUserService yxUserService; + + @Autowired + private YxStoreCartService yxStoreCartService; + + @Autowired + private YxStoreVisitService yxStoreVisitService; + + + /** + * 取消拼团 + * @param uid 用户id + * @param cid 团购产品id + * @param pinkId 拼团id + */ + @Override + public void removePink(Long uid, Long cid, Long pinkId) { + YxStorePink pink = this.lambdaQuery().eq(YxStorePink::getId,pinkId) + .eq(YxStorePink::getUid,uid) + .eq(YxStorePink::getCid,cid) + .eq(YxStorePink::getKId,0) //团长 + .eq(YxStorePink::getIsRefund,OrderInfoEnum.PINK_REFUND_STATUS_0.getValue()) + .eq(YxStorePink::getStatus,OrderInfoEnum.REFUND_STATUS_1.getValue()) + .gt(YxStorePink::getStopTime,new Date()) + .one(); + if(pink == null) { + throw new YshopException("拼团不存在或已经取消"); + } + + PinkUserDto pinkUserDto = this.getPinkMemberAndPinK(pink); + List pinkAll = pinkUserDto.getPinkAll(); + YxStorePink pinkT = pinkUserDto.getPinkT(); + List idAll = pinkUserDto.getIdAll(); + List uidAll = pinkUserDto.getUidAll(); + int count = pinkUserDto.getCount(); + if(count < 1){ + this.pinkComplete(uidAll,idAll,uid,pinkT); + throw new YshopException("拼团已完成,无法取消"); + } + //如果团长取消拼团,团队还有人,就把后面的人作为下一任团长 + YxStorePink nextPinkT = null; + if(pinkAll.size() > 0){ + nextPinkT = pinkAll.get(0); + } + + //先退团长的money + storeOrderService.orderApplyRefund("","","拼团取消开团",pinkT.getOrderId(),pinkT.getUid()); + this.orderPinkFailAfter(pinkT.getUid(),pinkT.getId()); + + //把团长下个人设置为团长 + if(ObjectUtil.isNotNull(nextPinkT)){ + LambdaQueryWrapper wrapperO = new LambdaQueryWrapper<>(); + YxStorePink storePinkO = new YxStorePink(); + storePinkO.setKId(0L); //设置团长 + storePinkO.setStatus(OrderInfoEnum.PINK_STATUS_1.getValue()); + storePinkO.setStopTime(pinkT.getStopTime()); + storePinkO.setId(nextPinkT.getId()); + yxStorePinkMapper.updateById(storePinkO); + + //原有团长的数据变更成新团长下面 + wrapperO.eq(YxStorePink::getKId,pinkT.getId()); + YxStorePink storePinkT = new YxStorePink(); + storePinkT.setKId(nextPinkT.getId()); + yxStorePinkMapper.update(storePinkT,wrapperO); + + //update order + YxStoreOrder storeOrder = new YxStoreOrder(); + storeOrder.setPinkId(nextPinkT.getId()); + storeOrder.setId(nextPinkT.getId()); + storeOrderService.updateById(storeOrder); + + } + } + + /** + * 计算还差几人拼团 + * @param pink 拼团信息 + * @return int + */ + @Override + public int surplusPeople(YxStorePink pink) { + List listT = new ArrayList<>(); + if(pink.getKId() > 0){ //团长存在 + listT = this.getPinkMember(pink.getKId()); + }else{ + listT = this.getPinkMember(pink.getId()); + } + + return pink.getPeople() - (listT.size() + 1); + } + + + + + /** + * 拼团明细 + * @param id 拼团id + * @param uid 用户id + */ + @Override + public PinkInfoVo pinkInfo(Long id, Long uid) { + YxStorePink pink = this.getPinkUserOne(id); + if(ObjectUtil.isNull(pink)) { + throw new YshopException("拼团不存在"); + } + if( OrderInfoEnum.PINK_REFUND_STATUS_1.getValue().equals(pink.getIsRefund())){ + throw new YshopException("订单已退款"); + } + + int isOk = 0;//判断拼团是否完成 + int userBool = 0;//判断当前用户是否在团内 0未在 1在 + int pinkBool = 0;//判断拼团是否成功 0未 1是 -1结束 + + PinkUserDto pinkUserDto = this.getPinkMemberAndPinK(pink); + YxStorePink pinkT = pinkUserDto.getPinkT(); + List pinkAll = pinkUserDto.getPinkAll(); + List idAll = pinkUserDto.getIdAll(); + List uidAll = pinkUserDto.getUidAll(); + int count = pinkUserDto.getCount(); + + if(count < 0) { + count = 0; + } + if(OrderInfoEnum.PINK_STATUS_2.getValue().equals(pinkT.getStatus())){ + pinkBool = PinkEnum.PINK_BOOL_1.getValue(); + isOk = PinkEnum.IS_OK_1.getValue(); + }else if(pinkT.getStatus() == 3){ + pinkBool = PinkEnum.PINK_BOOL_MINUS_1.getValue(); + isOk = PinkEnum.IS_OK_0.getValue(); + }else{ + //组团完成 + if(count < 1){ + isOk = PinkEnum.IS_OK_1.getValue(); + pinkBool = this.pinkComplete(uidAll,idAll,uid,pinkT); + }else{ + pinkBool = this.pinkFail(pinkAll,pinkT,pinkBool); + } + } + + //团员是否在团 + if(ObjectUtil.isNotNull(pinkAll)){ + for (YxStorePink storePink : pinkAll) { + if(storePink.getUid().equals(uid)) { + userBool = PinkEnum.USER_BOOL_1.getValue(); + } + } + } + //团长 + if(pinkT.getUid().equals(uid)) { + userBool = PinkEnum.USER_BOOL_1.getValue(); + } + + YxStoreCombinationQueryVo storeCombinationQueryVo = yxStoreCombinationMapper.getCombDetail(pink.getCid()); + if(ObjectUtil.isNull(storeCombinationQueryVo)) { + throw new YshopException("拼团不存在或已下架"); + } + + YxUserQueryVo userInfo = userService.getYxUserById(uid); + YxStoreOrder yxStoreOrder = storeOrderService.getById(pink.getOrderIdKey()); + YxStoreCart yxStoreCart = yxStoreCartService.getById(yxStoreOrder.getCartId()); + //拼团访问量 + yxStoreCombinationMapper.incBrowseNum(pink.getPid()); + //拼团访客人数 + yxStoreVisitService.addStoreVisit(uid, pink.getPid()); + return PinkInfoVo.builder() + .count(count) + .currentPinkOrder(this.getCurrentPinkOrderId(id,uid)) + .isOk(isOk) + .pinkAll(this.handPinkAll(pinkAll)) + .pinkBool(pinkBool) + .pinkT(this.handPinkT(pinkT)) + .storeCombination(storeCombinationQueryVo) + .userBool(userBool) + .userInfo(userInfo) + .uniqueId(yxStoreCart.getProductAttrUnique()) + .build(); + + } + + + + /** + * 返回正在拼团的人数 + * + * @param id 拼团id + * @return int + */ + @Override + public Long pinkIngCount(Long id) { + return this.lambdaQuery() + .eq(YxStorePink::getId,id) + .eq(YxStorePink::getStatus,OrderInfoEnum.PINK_STATUS_1.getValue()) + .count(); + } + + + /** + * 创建拼团 + * @param order 订单 + */ + @Override + public void createPink(YxStoreOrderQueryVo order) { + YxStoreCombination storeCombination = combinationService.getById(order.getCombinationId()); + order = storeOrderService.handleOrder(order); + YxStoreCart storeCart = yxStoreCartService.getById(order.getCartId()); + Long pinkCount = yxStorePinkMapper.selectCount(Wrappers.lambdaQuery() + .eq(YxStorePink::getOrderId,order.getOrderId())); + if(pinkCount > 0) { + return; + } + if(storeCombination != null){ + YxStorePink storePink = YxStorePink.builder() + .uid(order.getUid()) + .orderId(order.getOrderId()) + .orderIdKey(order.getId()) + .totalNum(order.getTotalNum()) + .totalPrice(order.getPayPrice()) + .build(); + List cartInfo = order.getCartInfo(); + for (YxStoreCartQueryVo queryVo : cartInfo) { + storePink.setCid(queryVo.getCombinationId()); + storePink.setPid(queryVo.getProductId()); + storePink.setPrice(queryVo.getProductInfo().getPrice()); + } + + Date stopTime = DateUtil.offsetHour(new Date(), storeCombination.getEffectiveTime()); + storePink.setPeople(storeCombination.getPeople()); + storePink.setStopTime(stopTime); + storePink.setUniqueId(storeCart.getProductAttrUnique()); + if(order.getPinkId() > 0){ //其他成员入团 + if(this.getIsPinkUid(order.getPinkId(),order.getUid())) { + return; + } + storePink.setKId(order.getPinkId()); + storePink.setStopTime(null); + this.save(storePink); + + //处理拼团完成 + PinkUserDto pinkUserDto = this.getPinkMemberAndPinK(storePink); + YxStorePink pinkT = pinkUserDto.getPinkT(); + if( OrderInfoEnum.PINK_STATUS_1.getValue().equals(pinkT.getStatus())){ + //int count = (int)map.get("count"); + if(pinkUserDto.getCount() == 0){//处理成功 + this.pinkComplete(pinkUserDto.getUidAll(),pinkUserDto.getIdAll(),order.getUid(), pinkT); + }else{ + this.pinkFail(pinkUserDto.getPinkAll(),pinkT,PinkEnum.PINK_BOOL_0.getValue()); + } + } + + }else{//开团 + this.save(storePink); + //pink_id更新到order表 + YxStoreOrder yxStoreOrder = new YxStoreOrder(); + yxStoreOrder.setPinkId(storePink.getId()); + yxStoreOrder.setId(order.getId()); + storeOrderService.updateById(yxStoreOrder); + + //开团加入队列 + String redisKey = String.valueOf(StrUtil.format("{}{}", + ShopConstants.REDIS_PINK_CANCEL_KEY, storePink.getId())); + long expireTime = storeCombination.getEffectiveTime().longValue() * 3600; + redisTemplate.opsForValue().set(redisKey, "1" , expireTime, TimeUnit.SECONDS); + + } + + + } + } + + /** + * 判断用户是否在团内 + * @param id 拼团id + * @param uid 用户id + * @return boolean true=在 + */ + @Override + public boolean getIsPinkUid(Long id, Long uid) { + Long count = this.lambdaQuery() + .eq(YxStorePink::getIsRefund, OrderInfoEnum.PINK_REFUND_STATUS_0.getValue()) + .eq(YxStorePink::getUid,uid) + .and(i->i.eq(YxStorePink::getKId,id).or().eq(YxStorePink::getId,id)) + .count(); + return count > 0; + } + + /** + * 获取拼团完成的商品总件数 + * @return int + */ + @Override + public int getPinkOkSumTotalNum() { + return yxStorePinkMapper.sumNum(); + } + + /** + * 获取拼团成功的用户 + * @param uid uid + * @return list + */ + @Override + public List getPinkOkList(Long uid) { + List list = new ArrayList<>(); + List pinkDTOList = yxStorePinkMapper.getPinkOkList(uid); + for (PinkDto pinkDTO : pinkDTOList) { + list.add(pinkDTO.getNickname()+"拼团成功"); + } + return list; + } + + + /** + * 获取团长拼团数据 + * @param cid 拼团产品id + * @return PinkAllDto pindAll-参与的拼团的id 集合 list-团长参与的列表 + */ + @Override + public PinkAllDto getPinkAll(Long cid) { + Map map = new LinkedHashMap<>(2); + List list = yxStorePinkMapper.getPinks(cid); + List pindAll = new ArrayList<>();//参与的拼团的id 集合 + for (PinkDto pinkDto : list) { + pinkDto.setCount(String.valueOf(this.getPinkPeople(pinkDto.getId() + ,pinkDto.getPeople()))); + Date date = pinkDto.getStopTime(); + pinkDto.setH(String.valueOf(DateUtil.hour(date,true))); + pinkDto.setI(String.valueOf(DateUtil.minute(date))); + pinkDto.setS(String.valueOf(DateUtil.second(date))); + pindAll.add(pinkDto.getId()); + } + + + return PinkAllDto.builder() + .list(list) + .pindAll(pindAll) + .build(); + } + + + /** + * 处理团员 + * @param pinkAll 拼团数据 + * @return list + */ + private List handPinkAll(List pinkAll) { + + List list = generator.convert(pinkAll,YxStorePinkQueryVo.class); + for (YxStorePinkQueryVo queryVo : list) { + YxUserQueryVo userQueryVo = userService.getYxUserById(queryVo.getUid().longValue()); + queryVo.setAvatar(userQueryVo.getAvatar()); + queryVo.setNickname(userQueryVo.getNickname()); + } + return list; + } + + /** + * 处理团长 + * @param pinkT 拼团 + * @return YxStorePinkQueryVo + */ + private YxStorePinkQueryVo handPinkT(YxStorePink pinkT) { + YxStorePinkQueryVo pinkQueryVo = generator.convert(pinkT,YxStorePinkQueryVo.class); + YxUserQueryVo userQueryVo = userService.getYxUserById(pinkQueryVo.getUid().longValue()); + pinkQueryVo.setAvatar(userQueryVo.getAvatar()); + pinkQueryVo.setNickname(userQueryVo.getNickname()); + + return pinkQueryVo; + } + + + /** + * 获取当前拼团数据返回订单编号 + * @param id 拼团id + * @param uid uid + * @return string + */ + private String getCurrentPinkOrderId(Long id, Long uid) { + YxStorePink pink = yxStorePinkMapper.selectOne(Wrappers.lambdaQuery() + .eq(YxStorePink::getId,id).eq(YxStorePink::getUid,uid)); + if(pink == null){ + pink = yxStorePinkMapper.selectOne(Wrappers.lambdaQuery() + .eq(YxStorePink::getKId,id).eq(YxStorePink::getUid,uid)); + if(pink == null) { + return ""; + } + } + return pink.getOrderId(); + } + + + /** + * 获取拼团的团员 + * @param kid 团长id + * @return list + */ + private List getPinkMember(Long kid) { + return this.lambdaQuery().eq(YxStorePink::getKId,kid) + .eq(YxStorePink::getIsRefund,OrderInfoEnum.PINK_REFUND_STATUS_0.getValue()) + .orderByAsc(YxStorePink::getId) + .list(); + } + + + + /** + * 获取一条拼团数据 + * @param id 拼团id + * @return YxStorePink + */ + private YxStorePink getPinkUserOne(Long id) { + return this.lambdaQuery().eq(YxStorePink::getId,id).one(); + } + + /** + * 拼团人数完成时,判断全部人都是未退款状态 + * @return boolean + */ + private boolean getPinkStatus(List idAll) { + Long count = this.lambdaQuery().in(YxStorePink::getId,idAll) + .eq(YxStorePink::getIsRefund,OrderInfoEnum.PINK_REFUND_STATUS_1.getValue()) + .count(); + if(count == 0) { + return true; + } + return false; + } + + + /** + * 拼团完成更改数据写入内容 + * @param uidAll 用户id集合 + * @param idAll 拼团id集合 + * @param uid uid + * @param pinkT 团长 + */ + private int pinkComplete(List uidAll,List idAll,Long uid, + YxStorePink pinkT) { + boolean pinkStatus = this.getPinkStatus(idAll);//判断是否有退款的 + int pinkBool = PinkEnum.PINK_BOOL_0.getValue(); + if(pinkStatus){ + //更改状态 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.in(YxStorePink::getId,idAll); + + YxStorePink storePink = new YxStorePink(); + storePink.setStopTime(new Date()); + storePink.setStatus(OrderInfoEnum.PINK_STATUS_2.getValue()); + + this.update(storePink,wrapper); + + if(uidAll.contains(uid)){ + pinkBool = PinkEnum.PINK_BOOL_1.getValue(); + } + + //todo 模板消息 + } + + return pinkBool; + + } + + /** + * 拼团失败退款之后 + * @param uid 用户id + * @param pid 团长id + */ + private void orderPinkFailAfter(Long uid, Long pid) { + YxStorePink yxStorePink = new YxStorePink(); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStorePink::getId,pid); + yxStorePink.setStatus(OrderInfoEnum.PINK_STATUS_3.getValue()); + yxStorePink.setStopTime(new Date()); + yxStorePinkMapper.update(yxStorePink,wrapper); + + LambdaQueryWrapper wrapperT = new LambdaQueryWrapper<>(); + wrapperT.eq(YxStorePink::getKId,pid); + yxStorePinkMapper.update(yxStorePink,wrapperT); + //todo 模板消息 + } + + + /** + * 拼团失败 退款 + * @param pinkAll 拼团数据,不包括团长 + * @param pinkT 团长数据 + * @param pinkBool PinkEnum + */ + private int pinkFail(List pinkAll, YxStorePink pinkT,int pinkBool) { + Date now = new Date(); + //拼团时间超时 退款 + if(DateUtil.compare(pinkT.getStopTime(),now) < 0){ + pinkBool = PinkEnum.PINK_BOOL_MINUS_1.getValue(); + pinkAll.add(pinkT); + //处理退款 + for (YxStorePink storePink : pinkAll) { + storeOrderService.orderApplyRefund("","","拼团时间超时",storePink.getOrderId(),storePink.getUid()); + this.orderPinkFailAfter(pinkT.getUid(),storePink.getId()); + } + } + + return pinkBool; + } + + /** + * 获取参团人和团长和拼团总人数 + * @param pink 拼团 + * @return PinkUserDto + */ + private PinkUserDto getPinkMemberAndPinK(YxStorePink pink) { + //查找拼团团员和团长 + List pinkAll = null; + YxStorePink pinkT = null; + //查找拼团团员和团长 + if(pink.getKId() > 0){ //团长存在 + pinkAll = this.getPinkMember(pink.getKId()); + pinkT = this.getPinkUserOne(pink.getKId()); + }else{ + pinkAll = this.getPinkMember(pink.getId()); + pinkT = pink; + } + //收集拼团用户id和拼团id + List idAll = pinkAll.stream().map(YxStorePink::getId).collect(Collectors.toList()); + List uidAll = pinkAll.stream().map(YxStorePink::getUid).collect(Collectors.toList()); + + idAll.add(pinkT.getId()); + uidAll.add(pinkT.getUid()); + //还差几人 + int count = pinkT.getPeople() - (pinkAll.size() + 1); + + + return PinkUserDto.builder() + .pinkAll(pinkAll) + .pinkT(pinkT) + .idAll(idAll) + .uidAll(uidAll) + .count(count) + .build(); + } + + + /** + * 计算获取团长还差多少人拼团成功 + * @param kid 团长参与拼团id + * @param people 当前满足拼团的人数 + * @return int + */ + private Long getPinkPeople(Long kid, int people) { + LambdaQueryWrapper wrapper= new LambdaQueryWrapper<>(); + wrapper.eq(YxStorePink::getKId,kid) + .eq(YxStorePink::getIsRefund, OrderInfoEnum.PINK_REFUND_STATUS_0.getValue()); + //加上团长自己 + Long count = yxStorePinkMapper.selectCount(wrapper) + 1; + return people - count; + } + + //=================================================// + + @Override + //@Cacheable + public Map queryAll(YxStorePinkQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + List yxStorePinkDtos = generator.convert(page.getList(), YxStorePinkDto.class); + yxStorePinkDtos.forEach(i ->{ + YxUser yxUser = yxUserService.getById(i.getUid()); + YxStoreCombination storeCombination = combinationService.getById(i.getCid()); + i.setNickname(yxUser.getNickname()); + i.setPhone(yxUser.getPhone()); + i.setUserImg(yxUser.getAvatar()); + i.setProduct(storeCombination.getTitle()); + i.setImage(storeCombination.getImage()); + i.setCountPeople(this.count(new LambdaQueryWrapper().eq(YxStorePink::getCid,i.getCid()))); + }); + map.put("content", yxStorePinkDtos); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxStorePinkQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStorePink.class, criteria)); + } + + + @Override + 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(" 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); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..676d11ef731fbbbcd7ccb2edd63c80870df74d82 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java @@ -0,0 +1,320 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.map.MapUtil; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.enums.SpecTypeEnum; +import co.yixiang.exception.BadRequestException; +import co.yixiang.modules.activity.domain.YxStoreSeckill; +import co.yixiang.modules.activity.domain.YxStoreSeckill; +import co.yixiang.modules.activity.service.YxStoreSeckillService; +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.modules.activity.vo.StoreSeckillVo; +import co.yixiang.modules.activity.vo.YxStoreSeckillQueryVo; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.service.YxStoreProductAttrService; +import co.yixiang.modules.product.service.YxStoreProductReplyService; +import co.yixiang.modules.product.service.dto.FromatDetailDto; +import co.yixiang.modules.product.service.dto.ProductFormatDto; +import co.yixiang.modules.product.service.dto.ProductResultDto; +import co.yixiang.modules.product.vo.YxStoreProductAttrQueryVo; +import co.yixiang.modules.template.domain.YxShippingTemplates; +import co.yixiang.modules.template.service.YxShippingTemplatesService; +import co.yixiang.utils.FileUtil; +import co.yixiang.utils.OrderUtil; +import co.yixiang.utils.RedisUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +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.math.BigDecimal; +import java.util.*; + + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Service +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreSeckillServiceImpl extends BaseServiceImpl implements YxStoreSeckillService { + + @Autowired + private IGenerator generator; + + @Autowired + private YxStoreSeckillMapper yxStoreSeckillMapper; + + @Autowired + private YxStoreProductReplyService replyService; + + @Autowired + private YxStoreProductAttrService yxStoreProductAttrService; + + @Autowired + private YxShippingTemplatesService shippingTemplatesService; + + /** + * 产品详情 + * @param id 砍价商品id + * @return StoreSeckillVo + */ + @Override + public StoreSeckillVo getDetail(Long id){ + Date now = new Date(); + YxStoreSeckill storeSeckill = this.lambdaQuery().eq(YxStoreSeckill::getId,id) + .eq(YxStoreSeckill::getStatus, ShopCommonEnum.IS_STATUS_1.getValue()) + .eq(YxStoreSeckill::getIsShow,ShopCommonEnum.SHOW_1.getValue()) + .le(YxStoreSeckill::getStartTime,now) + .ge(YxStoreSeckill::getStopTime,now) + .one(); + + if(storeSeckill == null){ + throw new YshopException("秒杀产品不存在或已下架"); + } + //获取商品sku + Map returnMap = yxStoreProductAttrService.getProductAttrDetail(storeSeckill.getProductId()); + //获取运费模板名称 + String storeFreePostage = RedisUtil.get("store_free_postage"); + String tempName = ""; + if(StrUtil.isBlank(storeFreePostage) + || !NumberUtil.isNumber(storeFreePostage) + || Integer.parseInt(storeFreePostage) == 0){ + tempName = "全国包邮"; + }else{ + YxShippingTemplates shippingTemplates = shippingTemplatesService.getById(storeSeckill.getTempId()); + if(ObjectUtil.isNotNull(shippingTemplates)){ + tempName = shippingTemplates.getName(); + }else { + throw new BadRequestException("请配置运费模板"); + } + + } + return StoreSeckillVo.builder() + .productAttr((List)returnMap.get("productAttr")) + .productValue((Map)returnMap.get("productValue")) + .storeInfo(generator.convert(storeSeckill, YxStoreSeckillQueryVo.class)) + .reply(replyService.getReply(storeSeckill.getProductId())) + .replyCount(replyService.productReplyCount(storeSeckill.getProductId())) + .tempName(tempName) + .build(); + } + + /** + * 秒杀产品列表 + * @param page page + * @param limit limit + * @return list + */ + @Override + public List getList(int page, int limit, int time) { + Date nowTime = new Date(); + Page pageModel = new Page<>(page, limit); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreSeckill::getStatus, ShopCommonEnum.IS_STATUS_1.getValue()) + .eq(YxStoreSeckill::getTimeId,time) + .le(YxStoreSeckill::getStartTime,nowTime) + .ge(YxStoreSeckill::getStopTime,nowTime) + .orderByDesc(YxStoreSeckill::getSort); + List yxStoreSeckillQueryVos = generator.convert + (yxStoreSeckillMapper.selectPage(pageModel,wrapper).getRecords(), + YxStoreSeckillQueryVo.class); + yxStoreSeckillQueryVos.forEach(item->{ + Integer sum = item.getSales() + item.getStock(); + item.setPercent(NumberUtil.round(NumberUtil.mul(NumberUtil.div(item.getSales(),sum), + 100),0).intValue()); + }); + return yxStoreSeckillQueryVos; + } + /** + * 秒杀产品列表(首页用) + * @param page page + * @param limit limit + * @return list + */ + @Override + public List getList(int page, int limit) { + Date nowTime = new Date(); + Page pageModel = new Page<>(page, limit); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreSeckill::getStatus, ShopCommonEnum.IS_STATUS_1.getValue()) + .eq(YxStoreSeckill::getIsHot,1) + .le(YxStoreSeckill::getStartTime,nowTime) + .ge(YxStoreSeckill::getStopTime,nowTime) + .orderByDesc(YxStoreSeckill::getSort); + List yxStoreSeckillQueryVos = generator.convert + (yxStoreSeckillMapper.selectPage(pageModel,wrapper).getRecords(), + YxStoreSeckillQueryVo.class); + yxStoreSeckillQueryVos.forEach(item->{ + Integer sum = item.getSales() + item.getStock(); + item.setPercent(NumberUtil.round(NumberUtil.mul(NumberUtil.div(item.getSales(),sum), + 100),0).intValue()); + }); + return yxStoreSeckillQueryVos; + } + @Override + //@Cacheable + public Map queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + List storeSeckillDTOS = generator.convert(page.getList(),YxStoreSeckillDto.class); + for (YxStoreSeckillDto storeSeckillDTO : storeSeckillDTOS){ + String statusStr = OrderUtil.checkActivityStatus(storeSeckillDTO.getStartTime(), + storeSeckillDTO.getStopTime(), storeSeckillDTO.getStatus()); + storeSeckillDTO.setStatusStr(statusStr); + } + Map map = new LinkedHashMap<>(2); + map.put("content",storeSeckillDTOS); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxStoreSeckillQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreSeckill.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreSeckillDto yxStoreSeckill : all) { + Map map = new LinkedHashMap<>(); + map.put("推荐图", yxStoreSeckill.getImage()); + map.put("轮播图", yxStoreSeckill.getImages()); + map.put("活动标题", yxStoreSeckill.getTitle()); + map.put("简介", yxStoreSeckill.getInfo()); + 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.getStatus()); + map.put("是否包邮", yxStoreSeckill.getIsPostage()); + map.put("热门推荐", yxStoreSeckill.getIsHot()); + map.put("最多秒杀几个", yxStoreSeckill.getNum()); + map.put("显示", yxStoreSeckill.getIsShow()); + map.put("时间段id", yxStoreSeckill.getTimeId()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + public boolean saveSeckill(YxStoreSeckillDto resources) { + ProductResultDto resultDTO = this.computedProduct(resources.getAttrs()); + + //添加商品 + YxStoreSeckill yxStoreSeckill = new YxStoreSeckill(); + BeanUtil.copyProperties(resources,yxStoreSeckill,"images"); + if(resources.getImages().isEmpty()) { + throw new YshopException("请上传轮播图"); + } + + yxStoreSeckill.setStock(resultDTO.getStock()); + yxStoreSeckill.setOtPrice(BigDecimal.valueOf(resultDTO.getMinOtPrice())); + yxStoreSeckill.setPrice(BigDecimal.valueOf(resultDTO.getMinPrice())); + yxStoreSeckill.setCost(BigDecimal.valueOf(resultDTO.getMinCost())); + yxStoreSeckill.setStock(resultDTO.getStock()); + yxStoreSeckill.setImages(String.join(",", resources.getImages())); + this.saveOrUpdate(yxStoreSeckill); + + //属性处理 + //处理单sKu + if(SpecTypeEnum.TYPE_0.getValue().equals(resources.getSpecType())){ + FromatDetailDto fromatDetailDto = FromatDetailDto.builder() + .value("规格") + .detailValue("") + .attrHidden("") + .detail(ListUtil.toList("默认")) + .build(); + List attrs = resources.getAttrs(); + ProductFormatDto productFormatDto = attrs.get(0); + productFormatDto.setValue1("规格"); + Map map = new HashMap<>(); + map.put("规格","默认"); + productFormatDto.setDetail(map); + yxStoreProductAttrService.insertYxStoreProductAttr(ListUtil.toList(fromatDetailDto), + ListUtil.toList(productFormatDto),resources.getProductId()); + }else{ + yxStoreProductAttrService.insertYxStoreProductAttr(resources.getItems(), + resources.getAttrs(),resources.getProductId()); + } + return true; + } + + /** + * 计算产品数据 + * @param attrs attrs + * @return ProductResultDto + */ + private ProductResultDto computedProduct(List attrs){ + //取最小价格 + Double minPrice = attrs + .stream() + .map(ProductFormatDto::getSeckillPrice) + .min(Comparator.naturalOrder()) + .orElse(0d); + + Double minOtPrice = attrs + .stream() + .map(ProductFormatDto::getOtPrice) + .min(Comparator.naturalOrder()) + .orElse(0d); + + Double minCost = attrs + .stream() + .map(ProductFormatDto::getCost) + .min(Comparator.naturalOrder()) + .orElse(0d); + //计算库存 + Integer stock = attrs + .stream() + .map(ProductFormatDto::getSeckillStock) + .reduce(Integer::sum) + .orElse(0); + + if(stock <= 0) { + throw new YshopException("库存不能低于0"); + } + + return ProductResultDto.builder() + .minPrice(minPrice) + .minOtPrice(minOtPrice) + .minCost(minCost) + .stock(stock) + .build(); + } + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponUserServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreVisitServiceImpl.java similarity index 34% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponUserServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreVisitServiceImpl.java index b85f5019cc92cb28a8e7e3f52e5069ccdb8b435a..dc3f31e9ffde002febc27d1145a58a199ae5df57 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCouponUserServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreVisitServiceImpl.java @@ -1,21 +1,22 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.service.impl; +import cn.hutool.core.util.ObjectUtil; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.activity.domain.YxStoreCouponUser; -import co.yixiang.modules.activity.service.YxStoreCouponUserService; -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.domain.YxUser; -import co.yixiang.modules.shop.service.YxUserService; +import co.yixiang.enums.ProductTypeEnum; +import co.yixiang.modules.activity.domain.YxStoreVisit; +import co.yixiang.modules.activity.service.YxStoreVisitService; +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.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.service.YxStoreProductService; import co.yixiang.utils.FileUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.github.pagehelper.PageInfo; @@ -32,40 +33,28 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreCouponUser") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreCouponUserServiceImpl extends BaseServiceImpl implements YxStoreCouponUserService { +public class YxStoreVisitServiceImpl extends BaseServiceImpl implements YxStoreVisitService { private final IGenerator generator; - private final YxUserService userService; + private final YxStoreProductService yxStoreProductService; + private final YxStoreVisitMapper yxStoreVisitMapper; @Override //@Cacheable - public Map queryAll(YxStoreCouponUserQueryCriteria criteria, Pageable pageable) { + public Map queryAll(YxStoreVisitQueryCriteria criteria, Pageable pageable) { getPage(pageable); - PageInfo page = new PageInfo<>(queryAll(criteria)); - List storeOrderDTOS = generator.convert(page.getList(), YxStoreCouponUserDto.class); - for (YxStoreCouponUserDto couponUserDTO : storeOrderDTOS) { - YxUser yxUser = userService.getOne(new LambdaQueryWrapper().eq(YxUser::getUid, couponUserDTO.getUid())); - if(yxUser == null){ - couponUserDTO.setNickname("--"); - continue; - } - couponUserDTO.setNickname(yxUser.getNickname()); - } + PageInfo page = new PageInfo<>(queryAll(criteria)); Map map = new LinkedHashMap<>(2); - map.put("content", storeOrderDTOS); + map.put("content", generator.convert(page.getList(), YxStoreVisitDto.class)); map.put("totalElements", page.getTotal()); return map; } @@ -73,27 +62,54 @@ public class YxStoreCouponUserServiceImpl extends BaseServiceImpl queryAll(YxStoreCouponUserQueryCriteria criteria) { - return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCouponUser.class, criteria)); + public List queryAll(YxStoreVisitQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreVisit.class, criteria)); } @Override - public void download(List all, HttpServletResponse response) throws IOException { + 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.getEndTime()); - map.put("使用时间", yxStoreCouponUser.getUseTime()); - map.put("获取方式", yxStoreCouponUser.getType()); - map.put("状态(0:未使用,1:已使用, 2:已过期)", yxStoreCouponUser.getStatus()); - map.put("是否有效", yxStoreCouponUser.getIsFail()); + 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); } + + /** + * 添加用户访问拼团记录 + * @param uid 用户id + * @param productId 产品id + */ + @Override + public void addStoreVisit(Long uid, Long productId) { + + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreVisit::getUid, uid).eq(YxStoreVisit::getProductId, productId); + YxStoreVisit storeVisit = this.baseMapper.selectOne(wrapper); + + if (ObjectUtil.isNull(storeVisit)) { + //查询产品分类 + YxStoreProduct yxStoreProduct = yxStoreProductService.getProductInfo(productId); + + YxStoreVisit yxStoreVisit = YxStoreVisit.builder() + .productId(productId) + .productType(ProductTypeEnum.COMBINATION.getValue()) + .cateId(Integer.valueOf(yxStoreProduct.getCateId())) + .type(ProductTypeEnum.COMBINATION.getValue()) + .uid(uid) + .count(1) + .build(); + this.save(yxStoreVisit); + } + + } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxUserExtractServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxUserExtractServiceImpl.java similarity index 40% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxUserExtractServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxUserExtractServiceImpl.java index dab1341e148abf1d52296d06d2edee55cf7a4786..323488010a31d2003e38bf9cb19b83d42dd4946e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxUserExtractServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/impl/YxUserExtractServiceImpl.java @@ -2,34 +2,39 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service.impl; import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.BillDetailEnum; +import co.yixiang.enums.PayTypeEnum; import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.event.TemplateBean; +import co.yixiang.event.TemplateEvent; +import co.yixiang.event.TemplateListenEnum; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.activity.domain.YxUserExtract; +import co.yixiang.modules.activity.param.UserExtParam; import co.yixiang.modules.activity.service.YxUserExtractService; 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.modules.shop.domain.YxUser; -import co.yixiang.modules.shop.domain.YxUserBill; -import co.yixiang.modules.shop.service.YxUserBillService; -import co.yixiang.modules.shop.service.YxUserService; -import co.yixiang.modules.shop.service.dto.WechatUserDto; -import co.yixiang.modules.shop.service.dto.YxUserDto; -import co.yixiang.modules.mp.service.YxPayService; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.service.YxUserBillService; +import co.yixiang.modules.user.service.YxUserService; import co.yixiang.utils.FileUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.github.binarywang.wxpay.exception.WxPayException; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; +import org.springframework.context.ApplicationEventPublisher; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; @@ -44,25 +49,108 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxUserExtract") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxUserExtractServiceImpl extends BaseServiceImpl implements YxUserExtractService { private final IGenerator generator; - private final YxUserService yxUserService; + private final YxUserExtractMapper yxUserExtractMapper; + private final YxUserService userService; private final YxUserBillService billService; - private final YxPayService payService; + private final ApplicationEventPublisher publisher; + + /** + * 开始提现 + * @param userInfo 用户 + * @param param UserExtParam + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void userExtract(YxUser userInfo, UserExtParam param) { + BigDecimal extractPrice = userInfo.getBrokeragePrice(); + if(extractPrice.compareTo(BigDecimal.ZERO) <= 0) { + throw new YshopException("提现佣金不足"); + } + + double money = Double.valueOf(param.getMoney()); + if( extractPrice.compareTo(BigDecimal.valueOf(money)) < 0) { + throw new YshopException("提现佣金不足"); + } + + if(money <= 0) { + throw new YshopException("提现佣金大于0"); + } + + double balance = NumberUtil.sub(extractPrice.doubleValue(),money); + if(balance < 0) { + balance = 0; + } + + YxUserExtract userExtract = new YxUserExtract(); + userExtract.setUid(userInfo.getUid()); + userExtract.setExtractType(param.getExtractType()); + userExtract.setExtractPrice(new BigDecimal(param.getMoney())); + userExtract.setBalance(BigDecimal.valueOf(balance)); + + if(StrUtil.isNotEmpty(param.getName())){ + userExtract.setRealName(param.getName()); + }else { + userExtract.setRealName(userInfo.getNickname()); + } + + if(StrUtil.isNotEmpty(param.getWeixin())){ + userExtract.setWechat(param.getWeixin()); + }else { + userExtract.setWechat(userInfo.getNickname()); + } + + String mark = ""; + + if(PayTypeEnum.ALI.getValue().equals(param.getExtractType())){ + if(StrUtil.isEmpty(param.getAlipayCode())){ + throw new YshopException("请输入支付宝账号"); + } + userExtract.setAlipayCode(param.getAlipayCode()); + mark = "使用支付宝提现"+param.getMoney()+"元"; + }else if(PayTypeEnum.WEIXIN.getValue().equals(param.getExtractType())){ + if(StrUtil.isEmpty(param.getWeixin())){ + throw new YshopException("请输入微信账号"); + } + mark = "使用微信提现"+param.getMoney()+"元"; + } + + yxUserExtractMapper.insert(userExtract); + + //更新佣金 + YxUser yxUser = new YxUser(); + yxUser.setBrokeragePrice(BigDecimal.valueOf(balance)); + yxUser.setUid(userInfo.getUid()); + userService.updateById(yxUser); + + //插入流水 + billService.expend(userInfo.getUid(),"佣金提现", BillDetailEnum.CATEGORY_1.getValue(), + BillDetailEnum.TYPE_4.getValue(),money,balance, mark); + + } + + /** + * 累计提现金额 + * @param uid uid + * @return double + */ + @Override + public double extractSum(Long uid) { + return yxUserExtractMapper.sumPrice(uid); + } + + + //==============================================================// @Override //@Cacheable @@ -78,7 +166,7 @@ public class YxUserExtractServiceImpl extends BaseServiceImpl queryAll(YxUserExtractQueryCriteria criteria) { + public List queryAll(YxUserExtractQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxUserExtract.class, criteria)); } @@ -87,18 +175,18 @@ public class YxUserExtractServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxUserExtractDto yxUserExtract : all) { - Map map = new LinkedHashMap<>(); - map.put(" uid", yxUserExtract.getUid()); + 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(" mark", yxUserExtract.getMark()); + map.put(" balance", yxUserExtract.getBalance()); map.put("无效原因", yxUserExtract.getFailMsg()); - map.put(" failTime", yxUserExtract.getFailTime()); + map.put(" failTime", yxUserExtract.getFailTime()); map.put("-1 未通过 0 审核中 1 已提现", yxUserExtract.getStatus()); map.put("微信号", yxUserExtract.getWechat()); list.add(map); @@ -106,83 +194,53 @@ public class YxUserExtractServiceImpl extends BaseServiceImpl().eq(YxUser::getUid, resources.getUid())), YxUserDto.class); - - //增加流水 - YxUserBill userBill = new YxUserBill(); - userBill.setTitle("提现失败"); - userBill.setUid(resources.getUid()); - userBill.setCategory("now_money"); - userBill.setType("extract"); - userBill.setNumber(resources.getExtractPrice()); - userBill.setLinkId(resources.getId().toString()); - userBill.setBalance(NumberUtil.add(userDTO.getBrokeragePrice(), resources.getExtractPrice())); - userBill.setMark(mark); - userBill.setStatus(1); - userBill.setPm(1); - billService.save(userBill); - - //返回提现金额 - yxUserService.incBrokeragePrice(resources.getExtractPrice().doubleValue() - , resources.getUid()); - - resources.setFailTime(new Date()); + //防止无限添加佣金 + if (ObjectUtil.isNull(userExtract.getFailTime())) { + String mark = "提现失败,退回佣金"+resources.getExtractPrice()+"元"; + YxUser yxUser = userService.getById(resources.getUid()); - } - //todo 此处为企业付款,没经过测试 - boolean isTest = true; - if (!isTest) { - String openid = this.getUserOpenid(resources.getUid()); - if (StrUtil.isNotBlank(openid)) { - try { - payService.entPay(openid, resources.getId().toString(), - resources.getRealName(), - resources.getExtractPrice().multiply(new BigDecimal(100)).intValue()); - } catch (WxPayException e) { - throw new BadRequestException(e.getMessage()); - } - } else { - throw new BadRequestException("不是微信用户无法退款"); - } + double balance = NumberUtil.add(yxUser.getBrokeragePrice(),resources.getExtractPrice()).doubleValue(); + //插入流水 + billService.income(resources.getUid(),"提现失败", BillDetailEnum.CATEGORY_1.getValue(), + BillDetailEnum.TYPE_4.getValue(),resources.getExtractPrice().doubleValue(),balance, + mark,resources.getId().toString()); - } - this.saveOrUpdate(resources); - } + //返回提现金额 + userService.incBrokeragePrice(resources.getExtractPrice(),resources.getUid()); - /** - * 获取openid - * @param uid uid - * @return String - */ - private String getUserOpenid(Long uid){ - YxUser yxUser = yxUserService.getById(uid); - if(yxUser == null) { - return ""; - } + resources.setFailTime(new Date()); + } - WechatUserDto wechatUserDto = yxUser.getWxProfile(); - if(wechatUserDto == null) { - return ""; + }else{ + //模板消息支付成功发布事件 + TemplateBean templateBean = TemplateBean.builder() + .extractId( resources.getId()) + .templateType(TemplateListenEnum.TYPE_8.getValue()) + .build(); + publisher.publishEvent(new TemplateEvent(this,templateBean)); } - if(StrUtil.isBlank(wechatUserDto.getOpenid())) { - return ""; - } - return wechatUserDto.getOpenid(); - + this.saveOrUpdate(resources); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..9fc69707ea275e552daa50748acd17d4115def49 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainMapper.java @@ -0,0 +1,59 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.activity.domain.YxStoreBargain; +import co.yixiang.modules.product.vo.YxStoreProductQueryVo; +import org.apache.ibatis.annotations.Delete; +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-13 +*/ +@Repository +public interface YxStoreBargainMapper extends CoreMapper { + @Update("update yx_store_bargain set stock=stock+#{num}, sales=sales-#{num}" + + " where id=#{bargainId}") + int incStockDecSales(@Param("num") int num, @Param("bargainId") Long bargainId); + + @Update("update yx_store_bargain set stock=stock-#{num}, sales=sales+#{num}" + + " where id=#{bargainId} and stock >= #{num}") + int decStockIncSales(@Param("num") int num,@Param("bargainId") Long bargainId); + + @Select("SELECT c.id,c.image,c.min_price as price,c.price as otPrice," + + "c.title as storeName,c.status as isShow,c.cost," + + "c.is_postage as isPostage,c.postage,c.sales,c.stock,c.is_del as isDel" + + " FROM yx_store_bargain c " + + " WHERE c.id = #{id} and c.is_del = 0") + YxStoreProductQueryVo bargainInfo(Long id); + + @Select("select IFNULL(sum(look),0)" + + "from yx_store_bargain") + int lookCount(); + + @Select("select IFNULL(sum(share),0) as shareCount " + + "from yx_store_bargain") + int shareCount(); + + @Update("update yx_store_bargain set share=share+1" + + " where id=#{id}") + void addBargainShare(@Param("id") Long id); + + @Update("update yx_store_bargain set look=look+1" + + " where id=#{id}") + void addBargainLook(@Param("id") Long id); + + @Delete("delete from yx_system_attachment where name = #{name}") + void deleteBargainImg(@Param("name") String name); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainUserHelpMapper.java similarity index 37% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainUserHelpMapper.java index 50276acd21646b6a5d672804cadbde2a00418186..329f3033f533067ee48dfe4373244adfca0683b9 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainUserHelpMapper.java @@ -2,21 +2,26 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service.mapper; + import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.activity.domain.YxStoreCouponIssue; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.activity.domain.YxStoreBargainUserHelp; import org.springframework.stereotype.Repository; /** + *

+ * 砍价用户帮助表 Mapper 接口 + *

+ * * @author hupeng - * @date 2020-05-13 + * @since 2019-12-21 */ @Repository -@Mapper -public interface YxStoreCouponIssueMapper extends CoreMapper { +public interface YxStoreBargainUserHelpMapper extends CoreMapper { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainUserMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainUserMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..d134f7fdf607435091a3b421e8eb566ba147ab1e --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainUserMapper.java @@ -0,0 +1,43 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.mapper; + + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.activity.domain.YxStoreBargainUser; +import co.yixiang.modules.activity.vo.YxStoreBargainUserQueryVo; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 用户参与砍价表 Mapper 接口 + *

+ * + * @author hupeng + * @since 2019-12-21 + */ +@Repository +public interface YxStoreBargainUserMapper extends CoreMapper { + + + @Select("SELECT u.uid,u.is_del as isDel,u.bargain_price - u.price as residuePrice,u.id," + + "u.bargain_id as bargainId,u.bargain_price as bargainPrice," + + "u.bargain_price_min as bargainPriceMin,u.price,u.status,b.title," + + "b.image,b.stop_time as datatime FROM yx_store_bargain_user u INNER JOIN " + + "yx_store_bargain b ON b.id=u.bargain_id WHERE u.uid = #{uid} AND u.is_del = 0 " + + "ORDER BY u.id DESC ") + List getBargainUserList(@Param("uid") Long uid, Page page); + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCombinationMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCombinationMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..9d08a96b66726ec3cd98eff3f77798a8509efc20 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCombinationMapper.java @@ -0,0 +1,66 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.activity.domain.YxStoreCombination; +import co.yixiang.modules.activity.vo.YxStoreCombinationQueryVo; +import co.yixiang.modules.product.vo.YxStoreProductQueryVo; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Repository +public interface YxStoreCombinationMapper extends CoreMapper { + + @Select("SELECT c.id,c.effective_time as effectiveTime,c.info,c.image,c.people,c.price, s.sales as sales," + + "c.title,c.unit_name as unitName,s.price as productPrice FROM yx_store_combination c " + + "INNER JOIN yx_store_product s ON s.id=c.product_id " + + " WHERE c.is_show = 1 AND c.is_del = 0 AND c.start_time < now() " + + " AND c.stop_time > now() ORDER BY c.sort desc,c.id desc") + List getCombList(Page page); + + @Override + > E selectPage(E page, @Param(Constants.WRAPPER) Wrapper queryWrapper); + + @Select("SELECT c.id,c.effective_time as effectiveTime,c.image,c.people,c.price,c.browse," + + "c.description,c.image,c.images,c.info," + + "c.product_id as productId,c.sales,c.start_time as startTime" + + ",c.stock,c.stop_time stopTime," + + "c.title,c.unit_name as unitName,s.price as productPrice FROM yx_store_combination c " + + "INNER JOIN yx_store_product s ON s.id=c.product_id " + + " WHERE c.is_show = 1 AND c.is_del = 0 AND c.id = #{id} ") + YxStoreCombinationQueryVo getCombDetail(Long id); + + @Select("SELECT c.id,c.image,c.price,c.title as storeName,c.is_show as isShow,c.cost," + + "c.sales,c.stock,c.is_del as isDel" + + " FROM yx_store_combination c " + + " WHERE c.id = #{id} and c.is_del = 0 ") + YxStoreProductQueryVo combinatiionInfo(Long id); + + /** + * 商品浏览量 + * @param productId + * @return + */ + @Update("update yx_store_combination set browse=browse+1 " + + "where id=#{productId}") + int incBrowseNum(@Param("productId") Long productId); +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..cfc6914833b64e32c6cf78820c0acbdbc3c96632 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueMapper.java @@ -0,0 +1,55 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.activity.domain.YxStoreCouponIssue; +import co.yixiang.modules.activity.vo.YxStoreCouponIssueQueryVo; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Repository +public interface YxStoreCouponIssueMapper extends CoreMapper { + @Select("") + List selecCoupontList(Page page,@Param("type") Integer type, + @Param("productId") Long productId); + + @Select("select A.cid,A.end_time as endTime,A.start_time as startTime," + + "A.is_permanent as isPermanent,A.remain_count as remainCount," + + "A.total_count as totalCount,A.id" + + " from yx_store_coupon_issue A" + + " where A.status =1 and A.id=#{id}" + + " AND ( A.start_time < now() AND A.end_time > now() ) " + + " AND A.is_del = 0 AND " + + "( A.remain_count > 0 OR A.is_permanent = 1 )") + YxStoreCouponIssueQueryVo selectOne(Integer id); + + @Update("update yx_store_coupon_issue set remain_count=remain_count-1" + + " where id=#{id}") + int decCount(@Param("id") int id); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueUserMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueUserMapper.java similarity index 59% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueUserMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueUserMapper.java index c0dcf3b81b59c5898554fed65d6a360ac00766b9..a6354571ea26ce86de65b538010a241825a9d733 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueUserMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponIssueUserMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service.mapper; import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStoreCouponIssueUser; -import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Repository -@Mapper public interface YxStoreCouponIssueUserMapper extends CoreMapper { } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponMapper.java similarity index 57% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponMapper.java index 27df671224ee4b4f5b8d3e7ba740332270358656..ff42925e626598cbafb1016c472783ba0583f763 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service.mapper; import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStoreCoupon; -import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Repository -@Mapper public interface YxStoreCouponMapper extends CoreMapper { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..caa316c43b787413e2a5a0c392da7d27c2735fcb --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java @@ -0,0 +1,38 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.activity.domain.YxStoreCouponUser; +import co.yixiang.modules.activity.vo.StoreCouponUserVo; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.Date; +import java.util.List; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Repository +public interface YxStoreCouponUserMapper extends CoreMapper { + @Select("select A.id,A.coupon_title as couponTitle,A.coupon_price as couponPrice," + + "A.end_time as endTime,B.use_min_price as useMinPrice,B.type," + + "B.product_id as productId" + + " from yx_store_coupon_user A left join yx_store_coupon B " + + "on A.cid = B.id " + + "where A.status = 0" + + " AND A.end_time > #{now} " + + " AND A.uid = #{uid} AND A.use_min_price <= #{price} " + + " ORDER BY B.id DESC") + List selectCouponList(@Param("now") Date now, @Param("price") double price, + @Param("uid") Long uid); +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStorePinkMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStorePinkMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..b08145ff8ef8c7508b2a34e45b73c5e881c05092 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStorePinkMapper.java @@ -0,0 +1,52 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.activity.domain.YxStorePink; +import co.yixiang.modules.activity.service.dto.PinkDto; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +public interface YxStorePinkMapper extends CoreMapper { + @Select("SELECT p.id,p.uid,p.people,p.price,p.stop_time as stopTime,u.nickname,u.avatar" + + " FROM yx_store_pink p INNER JOIN yx_user u ON u.uid=p.uid" + + " WHERE stop_time > now() AND p.cid = #{cid} AND p.k_id = 0 " + + "AND p.is_refund = 0 ORDER BY p.create_time DESC") + List getPinks(Long cid); + + //= ]]> + @Select("SELECT p.id,u.nickname,u.avatar" + + " FROM yx_store_pink p RIGHT JOIN yx_user u ON u.uid=p.uid" + + " where p.status= 2 AND p.uid <> ${uid} " + + "AND p.is_refund = 0") + List getPinkOkList(Long uid); + + @Select("SELECT p.id,p.uid,p.people,p.price,p.stop_time as stopTime,u.nickname,u.avatar" + + " FROM yx_store_pink p LEFT JOIN yx_user u ON u.uid=p.uid" + + " where p.k_id= ${kid} " + + "AND p.is_refund = 0") + List getPinkMember(int kid); + + @Select("SELECT p.id,p.uid,p.people,p.price,p.stop_time as stopTime,u.nickname,u.avatar" + + " FROM yx_store_pink p LEFT JOIN yx_user u ON u.uid=p.uid" + + " where p.id= ${id} ") + PinkDto getPinkUserOne(int id); + + @Select("select IFNULL(sum(total_num),0) from yx_store_pink " + + "where status=2 and is_refund=0") + int sumNum(); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreSeckillMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreSeckillMapper.java similarity index 33% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreSeckillMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreSeckillMapper.java index 36eadcc6814dc6df6a415069531c810766a0f0f8..d7666872c21ec9339400ba07f6cc9d03a3184a2c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreSeckillMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreSeckillMapper.java @@ -2,21 +2,30 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service.mapper; import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxStoreSeckill; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.product.vo.YxStoreProductQueryVo; +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-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Repository -@Mapper public interface YxStoreSeckillMapper extends CoreMapper { + @Select("SELECT c.id,c.image,c.price,c.title as storeName,c.is_show as isShow,c.cost," + + "c.is_postage as isPostage,c.postage,c.sales,c.stock,c.is_del as isDel" + + " FROM yx_store_seckill c " + + " WHERE c.id = #{id} and c.is_del = 0 ") + YxStoreProductQueryVo seckillInfo(Long id); } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreVisitMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreVisitMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..4dd38b1f12bdecbf45e787caba486feb249b617c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreVisitMapper.java @@ -0,0 +1,32 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.activity.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.activity.domain.YxStoreVisit; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-13 +*/ +@Repository +public interface YxStoreVisitMapper extends CoreMapper { + + /** + * 拼团浏览量 + * @param productId + * @return + */ + @Update("update yx_store_visit set count=count+1 " + + "where uid=#{uid} AND id=#{productId}") + int incBrowseNum(@Param("uid") Long uid,@Param("productId") Long productId); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxUserExtractMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxUserExtractMapper.java similarity index 41% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxUserExtractMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxUserExtractMapper.java index 53fc38d0e09027242e2eef873d70ddc2b2686daf..37044e8fd16729f42b15e8d9944345fa907701fe 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxUserExtractMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/service/mapper/YxUserExtractMapper.java @@ -2,21 +2,26 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.service.mapper; import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.activity.domain.YxUserExtract; -import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Repository -@Mapper public interface YxUserExtractMapper extends CoreMapper { - + @Select("select IFNULL(sum(extract_price),0) from yx_user_extract " + + "where status=1 " + + "and uid=#{uid}") + double sumPrice(@Param("uid") Long uid); } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/BargainCountVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/BargainCountVo.java new file mode 100644 index 0000000000000000000000000000000000000000..e05c9de0e8a6135b76e472f97597247dd6fc0a3c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/BargainCountVo.java @@ -0,0 +1,24 @@ +package co.yixiang.modules.activity.vo; + +import lombok.Builder; +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName BargainCountVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/12/21 + **/ +@Data +@Builder +public class BargainCountVo implements Serializable { + private Double alreadyPrice; + private Long count; + private Integer pricePercent; + private Integer status; + private Double price; //剩余的砍价金额 + private Boolean userBargainStatus; // 是否帮别人砍,没砍是true,砍了false + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/BargainVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/BargainVo.java new file mode 100644 index 0000000000000000000000000000000000000000..69f5f9bec7c1ea36775e7a0d2218c9d5dcc8ec20 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/BargainVo.java @@ -0,0 +1,21 @@ +package co.yixiang.modules.activity.vo; + + +import co.yixiang.modules.user.vo.YxUserQueryVo; +import lombok.Builder; +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName BargainVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/12/21 + **/ +@Data +@Builder +public class BargainVo implements Serializable { + private YxStoreBargainQueryVo bargain; + private YxUserQueryVo userInfo; + private Long bargainSumCount;//砍价支付成功订单数量 +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/CombinationQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/CombinationQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..5202a3c3c64fb98044eb348b9ba285e36193e798 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/CombinationQueryVo.java @@ -0,0 +1,14 @@ +package co.yixiang.modules.activity.vo; + +import lombok.Data; + +import java.util.List; + +@Data +public class CombinationQueryVo { + + private List storeCombinationQueryVos; + + private Long lastPage; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/PinkInfoVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/PinkInfoVo.java new file mode 100644 index 0000000000000000000000000000000000000000..e533d26c7685fc874a8a69d8f5f7fcaa186f6ebc --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/PinkInfoVo.java @@ -0,0 +1,53 @@ +package co.yixiang.modules.activity.vo; + + +import co.yixiang.modules.user.vo.YxUserQueryVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @ClassName PinkInfoVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/20 + **/ +@Data +@Builder +public class PinkInfoVo implements Serializable { + + @ApiModelProperty(value = "还差几人成团") + private Integer count; + + @ApiModelProperty(value = "当前拼团数据返回订单编号") + private String currentPinkOrder; + + @ApiModelProperty(value = "是否完成 0未完成 1完成") + private Integer isOk = 0; + + @ApiModelProperty(value = "拼团信息列表") + private List pinkAll; + + @ApiModelProperty(value = "拼团状态 0未成功,进行中 1已成功 -1拼团失败") + private Integer pinkBool = 0; + + @ApiModelProperty(value = "拼团信息") + private YxStorePinkQueryVo pinkT; + + @ApiModelProperty(value = "拼团内容信息") + private YxStoreCombinationQueryVo storeCombination; + + @ApiModelProperty(value = "拼团内容") + private String storeCombinationHost; + + @ApiModelProperty(value = "是否在团内 0不在 1在") + private Integer userBool; + + @ApiModelProperty(value = "拼团用户信息") + private YxUserQueryVo userInfo; + + @ApiModelProperty(value = "库存唯一值") + private String uniqueId; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/SeckillConfigVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/SeckillConfigVo.java new file mode 100644 index 0000000000000000000000000000000000000000..8c5154db90c1345944322018fb7968f6cd047fe0 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/SeckillConfigVo.java @@ -0,0 +1,20 @@ +package co.yixiang.modules.activity.vo; + + +import co.yixiang.modules.activity.service.dto.SeckillTimeDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.List; + +@Data +public class SeckillConfigVo { + + @ApiModelProperty(value = "秒杀产品时间信息") + private List seckillTime; + + private String lovely; + + @ApiModelProperty(value = "秒杀产品时间索引") + private Integer seckillTimeIndex; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/StoreCombinationVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/StoreCombinationVo.java new file mode 100644 index 0000000000000000000000000000000000000000..705f187f0227df1baa539ba38bb68a8ae1c2dc64 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/StoreCombinationVo.java @@ -0,0 +1,64 @@ +package co.yixiang.modules.activity.vo; + +import co.yixiang.modules.activity.service.dto.PinkDto; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.vo.YxStoreProductAttrQueryVo; +import co.yixiang.modules.product.vo.YxStoreProductReplyQueryVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + *

+ * 拼团产品表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-11-19 + */ +@Data +public class StoreCombinationVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "拼团详情") + private List pink; + + @ApiModelProperty(value = "参与的拼团的id 集合") + private List pindAll; + + @ApiModelProperty(value = "拼团成功的用户信息") + private List pinkOkList; + + @ApiModelProperty(value = "拼团完成的商品总件数") + private Integer pinkOkSum; + + @ApiModelProperty(value = "拼团评论信息") + private YxStoreProductReplyQueryVo reply; + + @ApiModelProperty(value = "拼团评论总条数") + private Long replyCount; + + @ApiModelProperty(value = "拼团好评比例") + private String replyChance; + + @ApiModelProperty(value = "拼团产品表信息") + private YxStoreCombinationQueryVo storeInfo; + + @ApiModelProperty(value = "拼团产品用户是否收藏") + private Boolean userCollect = false; + + @ApiModelProperty(value = "拼团产品运费模板名称") + private String tempName; + + @ApiModelProperty(value = "拼团产品属性信息") + private List productAttr = new ArrayList(); + + @ApiModelProperty(value = "拼团产品属性值") + private Map productValue = new LinkedHashMap<>(); + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/StoreCouponUserVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/StoreCouponUserVo.java new file mode 100644 index 0000000000000000000000000000000000000000..0e85a24f7520097ae8ec76f5b86b9c11bcda375f --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/StoreCouponUserVo.java @@ -0,0 +1,54 @@ +package co.yixiang.modules.activity.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Getter; +import lombok.Setter; + +import java.io.Serializable; +import java.util.Date; + +/** + * 优惠券发放记录对象StoreCouponUserVO + * + * @author hupeng + * @date 2020-05-06 + */ +@Getter +@Setter +public class StoreCouponUserVo implements Serializable +{ + private static final long serialVersionUID = 1L; + + /** 优惠券发放记录id */ + @ApiModelProperty(value = "优惠券发放记录ID") + private Long id; + + /** 优惠券名称 */ + @ApiModelProperty(value = "优惠券名称") + private String couponTitle; + + /** 优惠券的面值 */ + @ApiModelProperty(value = "优惠券的面值") + private Double couponPrice; + + /** 最低消费多少金额可用优惠券 */ + @ApiModelProperty(value = "最低消费多少金额可用优惠券") + private Double useMinPrice; + + /** 优惠券结束时间 */ + @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8") + @ApiModelProperty(value = "优惠券结束时间") + private Date endTime; + + /** 优惠券类型 0通用券 1商品券 2内部券*/ + @ApiModelProperty(value = "优惠券类型 0通用券 1商品券 2内部券") + private Integer type; + + /**优惠产品ID*/ + @ApiModelProperty(value = "优惠产品ID") + private String productId; + + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/StoreSeckillVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/StoreSeckillVo.java new file mode 100644 index 0000000000000000000000000000000000000000..d4196fecd66498699a4eb185c4020b18d3bf27d5 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/StoreSeckillVo.java @@ -0,0 +1,50 @@ +package co.yixiang.modules.activity.vo; + + +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.vo.YxStoreProductAttrQueryVo; +import co.yixiang.modules.product.vo.YxStoreProductReplyQueryVo; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; + +import java.io.Serializable; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + *

+ * 秒杀产品表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-12-17 + */ +@Data +@Builder +public class StoreSeckillVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "秒杀产品评论信息") + private YxStoreProductReplyQueryVo reply; + + @ApiModelProperty(value = "秒杀产品评论数量") + private Long replyCount; + + @ApiModelProperty(value = "秒杀产品信息") + private YxStoreSeckillQueryVo storeInfo; + + @Builder.Default + @ApiModelProperty(value = "秒杀产品用户是否收藏") + private Boolean userCollect = false; + + @ApiModelProperty(value = "模板名称") + private String tempName; + + private List productAttr = new ArrayList(); + + private Map productValue = new LinkedHashMap<>(); + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/TopCountVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/TopCountVo.java new file mode 100644 index 0000000000000000000000000000000000000000..737e786e0e95f89b9a86ebbcab7f837e30e5ace6 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/TopCountVo.java @@ -0,0 +1,21 @@ +package co.yixiang.modules.activity.vo; + +import lombok.Builder; +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName TopCountVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/12/21 + **/ +@Data +@Builder +public class TopCountVo implements Serializable { + private Integer lookCount; + private Integer shareCount; + private Long userCount; + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreBargainQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreBargainQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..ba54f0bd2616ccca6961861db5c205520e7cc96d --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreBargainQueryVo.java @@ -0,0 +1,117 @@ +package co.yixiang.modules.activity.vo; + +import co.yixiang.serializer.BigDecimalSerializer; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + *

+ * 砍价表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-12-21 + */ +@Data +@ApiModel(value = "YxStoreBargainQueryVo对象", description = "砍价表查询参数") +public class YxStoreBargainQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "砍价产品ID") + private Long id; + + @ApiModelProperty(value = "关联产品ID") + private Long productId; + + @ApiModelProperty(value = "砍价活动名称") + private String title; + + @ApiModelProperty(value = "砍价活动图片") + private String image; + + @ApiModelProperty(value = "单位名称") + private String unitName; + + @ApiModelProperty(value = "库存") + private Integer stock; + + @ApiModelProperty(value = "销量") + private Integer sales; + + @ApiModelProperty(value = "砍价产品轮播图") + private String images; + + @ApiModelProperty(value = "砍价开启时间") + private Date startTime; + + @ApiModelProperty(value = "砍价结束时间") + private Date stopTime; + + @ApiModelProperty(value = "砍价产品名称") + private String storeName; + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "砍价金额") + private BigDecimal price; + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "砍价商品最低价") + private BigDecimal minPrice; + + @ApiModelProperty(value = "每次购买的砍价产品数量") + private Integer num; + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "用户每次砍价的最大金额") + private BigDecimal bargainMaxPrice; + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "用户每次砍价的最小金额") + private BigDecimal bargainMinPrice; + + @ApiModelProperty(value = "用户每次砍价的次数") + private Integer bargainNum; + + @ApiModelProperty(value = "砍价状态 0(到砍价时间不自动开启) 1(到砍价时间自动开启时间)") + private Integer status; + + @ApiModelProperty(value = "砍价详情") + private String description; + + @ApiModelProperty(value = "反多少积分") + private BigDecimal giveIntegral; + + @ApiModelProperty(value = "砍价活动简介") + private String info; + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "成本价") + private BigDecimal cost; + + @ApiModelProperty(value = "排序") + private Integer sort; + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "邮费") + private BigDecimal postage; + + @ApiModelProperty(value = "砍价规则") + private String rule; + + @ApiModelProperty(value = "砍价产品浏览量") + private Integer look; + + @ApiModelProperty(value = "砍价产品分享量") + private Integer share; + + @ApiModelProperty(value = "砍价产品参与人数") + private Long people; + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreBargainUserHelpQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreBargainUserHelpQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..b76b58d2fdd431230196372641172dbdfb428b8a --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreBargainUserHelpQueryVo.java @@ -0,0 +1,42 @@ +package co.yixiang.modules.activity.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + *

+ * 砍价用户帮助表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-12-21 + */ +@Data +@ApiModel(value = "YxStoreBargainUserHelpQueryVo对象", description = "砍价用户帮助表查询参数") +public class YxStoreBargainUserHelpQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "砍价用户帮助表ID") + private Long id; + + @ApiModelProperty(value = "帮助的用户id") + private Long uid; + + @ApiModelProperty(value = "砍价产品ID") + private Long bargainId; + + @ApiModelProperty(value = "用户参与砍价表id") + private Long bargainUserId; + + @ApiModelProperty(value = "帮助砍价多少金额") + private BigDecimal price; + + private String nickname; + + private String avatar; + +} \ No newline at end of file diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreBargainUserQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreBargainUserQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..16a49c7c1b52fba56885b29d47150f8ea00c0882 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreBargainUserQueryVo.java @@ -0,0 +1,54 @@ +package co.yixiang.modules.activity.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + *

+ * 用户参与砍价表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-12-21 + */ +@Data +@ApiModel(value = "YxStoreBargainUserQueryVo对象", description = "用户参与砍价表查询参数") +public class YxStoreBargainUserQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "用户参与砍价表ID") + private Long id; + + @ApiModelProperty(value = "用户ID") + private Long uid; + + @ApiModelProperty(value = "砍价产品id") + private Long bargainId; + + @ApiModelProperty(value = "砍价的最低价") + private BigDecimal bargainPriceMin; + + @ApiModelProperty(value = "砍价金额") + private BigDecimal bargainPrice; + + @ApiModelProperty(value = "砍掉的价格") + private BigDecimal price; + + @ApiModelProperty(value = "状态 1参与中 2 活动结束参与失败 3活动结束参与成功") + private Integer status; + + + private Double residuePrice; + + private String title; + + private String image; + + private Date datatime; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCombinationQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCombinationQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..17a60aa292b92b4efb3df2cff2ecd3e37b09a0e1 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCombinationQueryVo.java @@ -0,0 +1,106 @@ +package co.yixiang.modules.activity.vo; + +import cn.hutool.core.util.StrUtil; +import co.yixiang.serializer.BigDecimalSerializer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + *

+ * 拼团产品表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-11-19 + */ +@Data +@ApiModel(value = "YxStoreCombinationQueryVo对象", description = "拼团产品表查询参数") +public class YxStoreCombinationQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + private Long id; + + @ApiModelProperty(value = "商品id") + private Long productId; + + @ApiModelProperty(value = "商户id") + private Integer merId; + + @ApiModelProperty(value = "推荐图") + private String image; + + @ApiModelProperty(value = "轮播图") + private String images; + + private List sliderImageArr; + + public List getSliderImageArr() { + if(StrUtil.isNotEmpty(images)){ + return Arrays.asList(images.split(",")); + }else { + return new ArrayList<>(); + } + + } + + @ApiModelProperty(value = "活动标题") + private String title; + + + @ApiModelProperty(value = "参团人数") + private Integer people; + + @ApiModelProperty(value = "简介") + private String info; + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "价格") + private BigDecimal price; + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "商品价格") + private BigDecimal productPrice; + + + @ApiModelProperty(value = "销量") + private Integer sales; + + @ApiModelProperty(value = "库存") + private Integer stock; + + private Integer combination; + + @ApiModelProperty(value = "是否包邮1是0否") + private Integer isPostage; + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "邮费") + private BigDecimal postage; + + @ApiModelProperty(value = "拼团内容") + private String description; + + @ApiModelProperty(value = "拼团订单有效时间") + private Integer effectiveTime; + + @ApiModelProperty(value = "浏览量") + private Integer browse; + + @ApiModelProperty(value = "单位名") + private String unitName; + + /** 是否单独分佣 */ + @JsonProperty("is_sub") + private Integer isSub; + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCouponIssueQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCouponIssueQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..54313ff8dd39803631d93db9f104ba87d8ff2d64 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCouponIssueQueryVo.java @@ -0,0 +1,64 @@ +package co.yixiang.modules.activity.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 优惠券前台领取表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-27 + */ +@Data +@ApiModel(value = "YxStoreCouponIssueQueryVo对象", description = "优惠券前台领取表查询参数") +public class YxStoreCouponIssueQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + private Integer id; + + @ApiModelProperty(value = "优惠券ID") + private Integer cid; + + @ApiModelProperty(value = "优惠券名称") + private String cname; + + @ApiModelProperty(value = "优惠券类别") + private Integer ctype; + + @ApiModelProperty(value = "优惠券领取开启时间") + @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8") + private Date startTime; + + @ApiModelProperty(value = "优惠券领取结束时间") + @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8") + private Date endTime; + + @ApiModelProperty(value = "优惠券领取数量") + private Integer totalCount; + + @ApiModelProperty(value = "优惠券剩余领取数量") + private Integer remainCount; + + @ApiModelProperty(value = "是否无限张数") + private Integer isPermanent; + + @ApiModelProperty(value = "1 正常 0 未开启 -1 已无效") + private Integer status; + + @ApiModelProperty(value = "优惠券价格") + private Double couponPrice; + + @ApiModelProperty(value = "优惠券最低满多少能使用") + private Double useMinPrice; + + @ApiModelProperty(value = "优惠券是否使用") + private Boolean isUse; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCouponQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCouponQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..8d799692ab35622903f5cedc075bfa0dd3c33e4e --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCouponQueryVo.java @@ -0,0 +1,53 @@ +package co.yixiang.modules.activity.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + *

+ * 优惠券表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-27 + */ +@Data +@ApiModel(value = "YxStoreCouponQueryVo对象", description = "优惠券表查询参数") +public class YxStoreCouponQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "优惠券表ID") + private Integer id; + + @ApiModelProperty(value = "优惠券名称") + private String title; + + @ApiModelProperty(value = "兑换消耗积分值") + private Integer integral; + + @ApiModelProperty(value = "兑换的优惠券面值") + private BigDecimal couponPrice; + + @ApiModelProperty(value = "最低消费多少金额可用优惠券") + private BigDecimal useMinPrice; + + @ApiModelProperty(value = "优惠券有效期限(单位:天)") + private Integer couponTime; + + @ApiModelProperty(value = "排序") + private Integer sort; + + @ApiModelProperty(value = "状态(0:关闭,1:开启)") + private Boolean status; + + @ApiModelProperty(value = "兑换项目添加时间") + private Integer addTime; + + @ApiModelProperty(value = "是否删除") + private Boolean isDel; + +} \ No newline at end of file diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCouponUserQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCouponUserQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..366bf8f301bd372170512cda1d9c0d603c61a2a1 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreCouponUserQueryVo.java @@ -0,0 +1,69 @@ +package co.yixiang.modules.activity.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + *

+ * 优惠券发放记录表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-27 + */ +@Data +@ApiModel(value = "YxStoreCouponUserQueryVo对象", description = "优惠券发放记录表查询参数") +public class YxStoreCouponUserQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "优惠券发放记录id") + private Long id; + + @ApiModelProperty(value = "兑换的项目id") + private Integer cid; + + @ApiModelProperty(value = "优惠券所属用户") + private Long uid; + + @ApiModelProperty(value = "优惠券名称") + private String couponTitle; + + @ApiModelProperty(value = "优惠券的面值") + private BigDecimal couponPrice; + + @ApiModelProperty(value = "最低消费多少金额可用优惠券") + private BigDecimal useMinPrice; + + @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8") + @ApiModelProperty(value = "优惠券创建时间") + private Date createTime; + + @ApiModelProperty(value = "优惠券结束时间") + @JsonFormat(pattern = "yyyy-MM-dd",timezone="GMT+8") + private Date endTime; + + @ApiModelProperty(value = "使用时间") + private Date useTime; + + @ApiModelProperty(value = "获取方式") + private String type; + + @ApiModelProperty(value = "状态(0:未使用,1:已使用, 2:已过期)") + private Integer status; + + @ApiModelProperty(value = "是否有效") + private Integer isFail; + + @ApiModelProperty(value = "优惠券发放类型 0可用 1不可用") + private Integer _type; + + @ApiModelProperty(value = "优惠券发放显示文字") + private String _msg; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStorePinkQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStorePinkQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..5c82a3379b9f613011b5ac9377a8849372d9074f --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStorePinkQueryVo.java @@ -0,0 +1,72 @@ +package co.yixiang.modules.activity.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + *

+ * 拼团表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-11-19 + */ +@Data +@ApiModel(value = "YxStorePinkQueryVo对象", description = "拼团表查询参数") +public class YxStorePinkQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + private Long id; + + @ApiModelProperty(value = "用户id") + private Long uid; + + @ApiModelProperty(value = "用户昵称") + private String nickname; + + @ApiModelProperty(value = "用户头像") + private String avatar; + + @ApiModelProperty(value = "订单id 生成") + private String orderId; + + @ApiModelProperty(value = "订单id 数据库") + private Integer orderIdKey; + + @ApiModelProperty(value = "购买商品个数") + private Integer totalNum; + + @ApiModelProperty(value = "购买总金额") + private BigDecimal totalPrice; + + @ApiModelProperty(value = "拼团产品id") + private Long cid; + + @ApiModelProperty(value = "产品id") + private Long pid; + + @ApiModelProperty(value = "拼团总人数") + private Integer people; + + @ApiModelProperty(value = "拼团产品单价") + private BigDecimal price; + + @ApiModelProperty(value = "开始时间") + private Date createTime; + + @ApiModelProperty(value = "结束时间") + private Date stopTime; + + @ApiModelProperty(value = "团长id 0为团长") + private Long kId; + + + @ApiModelProperty(value = "状态1进行中2已完成3未完成") + private Integer status; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreSeckillQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreSeckillQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..fd3956291f1f1b9e73a3ce24016bf14c260631c4 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/activity/vo/YxStoreSeckillQueryVo.java @@ -0,0 +1,119 @@ +package co.yixiang.modules.activity.vo; + +import cn.hutool.core.util.StrUtil; +import co.yixiang.serializer.BigDecimalSerializer; +import com.fasterxml.jackson.annotation.JsonProperty; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.List; + +/** + *

+ * 商品秒杀产品表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-12-14 + */ +@Data +@ApiModel(value="YxStoreSeckillQueryVo对象", description="商品秒杀产品表查询参数") +public class YxStoreSeckillQueryVo implements Serializable{ + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "商品秒杀产品表id") + private Long id; + + @ApiModelProperty(value = "商品id") + private Long productId; + + @ApiModelProperty(value = "推荐图") + private String image; + + @ApiModelProperty(value = "轮播图") + private String images; + + private List sliderImageArr; + + public List getSliderImageArr() { + if(StrUtil.isNotEmpty(images)){ + return Arrays.asList(images.split(",")); + }else { + return new ArrayList<>(); + } + + } + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "价格") + private BigDecimal price; + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "成本") + private BigDecimal cost; + + @JsonSerialize(using = BigDecimalSerializer.class) + @ApiModelProperty(value = "原价") + private BigDecimal otPrice; + + @ApiModelProperty(value = "轮播图") + private String[] pics; + @ApiModelProperty(value = "活动标题") + private String title; + + @ApiModelProperty(value = "简介") + private String info; + + @ApiModelProperty(value = "返多少积分") + private BigDecimal giveIntegral; + + @ApiModelProperty(value = "排序") + private Integer sort; + + @ApiModelProperty(value = "库存") + private Integer stock; + + @ApiModelProperty(value = "销量") + private Integer sales; + + @ApiModelProperty(value = "单位名") + private String unitName; + + @ApiModelProperty(value = "邮费") + private BigDecimal postage; + + @ApiModelProperty(value = "内容") + private String description; + + @ApiModelProperty(value = "开始时间") + private Date startTime; + + @ApiModelProperty(value = "结束时间") + private Date stopTime; + + @ApiModelProperty(value = "产品状态") + private Integer status; + + @ApiModelProperty(value = "最多秒杀几个") + private Integer num; + + @ApiModelProperty(value = "显示") + private Integer isShow; + + @ApiModelProperty(value = "百分比") + private Integer percent; + + /** 是否单独分佣 */ + @JsonProperty("is_sub") + private Integer isSub; + + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/canvas/domain/StoreCanvas.java b/yshop-mall/src/main/java/co/yixiang/modules/canvas/domain/StoreCanvas.java new file mode 100644 index 0000000000000000000000000000000000000000..98434099a570ddc8edd503ad41e26235343d404c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/canvas/domain/StoreCanvas.java @@ -0,0 +1,52 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.canvas.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; +import javax.validation.constraints.*; +import co.yixiang.domain.BaseDomain; + +/** +* @author yshop +* @date 2021-02-01 +*/ +@Data +@TableName("yx_store_canvas") +public class StoreCanvas extends BaseDomain { + /** 画布id */ + @TableId + private Long canvasId; + + /** 终端 1-小程序 2-H5 3-APP 4-PC */ + @NotNull + private Integer terminal; + + /** 画布json数据 */ + private String json; + + /** 类型 1-系统画布 2-自定义页面 3-商家店铺装修 */ + private Integer type; + + /** 名称 */ + @NotBlank + private String name; + + /** 店铺id,当type=3的时候,值为具体的店铺id,其它情况为0 */ + private Long shopId; + + + + + public void copy(StoreCanvas source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/StoreCanvasService.java b/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/StoreCanvasService.java new file mode 100644 index 0000000000000000000000000000000000000000..f80bda2a323964cbc25e3ab9d31405e51d70a490 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/StoreCanvasService.java @@ -0,0 +1,48 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.canvas.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.canvas.domain.StoreCanvas; +import co.yixiang.modules.canvas.service.dto.StoreCanvasDto; +import co.yixiang.modules.canvas.service.dto.StoreCanvasQueryCriteria; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import co.yixiang.domain.PageResult; +/** +* @author yshop +* @date 2021-02-01 +*/ +public interface StoreCanvasService extends BaseService{ + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + PageResult queryAll(StoreCanvasQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(StoreCanvasQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/dto/StoreCanvasDto.java b/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/dto/StoreCanvasDto.java new file mode 100644 index 0000000000000000000000000000000000000000..51e90ad4307e031e1a75385d8edd482c5cd9dab6 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/dto/StoreCanvasDto.java @@ -0,0 +1,44 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.canvas.service.dto; + +import lombok.Data; +import java.io.Serializable; + +/** +* @author yshop +* @date 2021-02-01 +*/ +@Data +public class StoreCanvasDto implements Serializable { + + /** 画布id */ + private Long canvasId; + + /** 终端 1-小程序 2-H5 3-APP 4-PC */ + private Integer terminal; + + /** 画布json数据 */ + private String json; + + /** 类型 1-系统画布 2-自定义页面 3-商家店铺装修 */ + private Integer type; + + /** 名称 */ + private String name; + + /** 店铺id,当type=3的时候,值为具体的店铺id,其它情况为0 */ + private Long shopId; + + /** 创建时间 */ + private String createTime; + + /** 修改时间 */ + private String updateTime; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/dto/StoreCanvasQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/dto/StoreCanvasQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..6a771313683da8ee422d55127bc58baa2689bccb --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/dto/StoreCanvasQueryCriteria.java @@ -0,0 +1,21 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.canvas.service.dto; + +import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; + +/** +* @author yshop +* @date 2021-02-01 +*/ +@Data +public class StoreCanvasQueryCriteria{ +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/impl/StoreCanvasServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/impl/StoreCanvasServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..250131aa437f0e6ec379df3303c43155d1db2b57 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/impl/StoreCanvasServiceImpl.java @@ -0,0 +1,84 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.canvas.service.impl; + +import co.yixiang.modules.canvas.domain.StoreCanvas; +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.canvas.service.StoreCanvasService; +import co.yixiang.modules.canvas.service.dto.StoreCanvasDto; +import co.yixiang.modules.canvas.service.dto.StoreCanvasQueryCriteria; +import co.yixiang.modules.canvas.service.mapper.StoreCanvasMapper; +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.List; +import java.util.Map; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import co.yixiang.domain.PageResult; +/** +* @author yshop +* @date 2021-02-01 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "storeCanvas") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class StoreCanvasServiceImpl extends BaseServiceImpl implements StoreCanvasService { + + private final IGenerator generator; + + @Override + //@Cacheable + public PageResult queryAll(StoreCanvasQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + return generator.convertPageInfo(page,StoreCanvasDto.class); + } + + + @Override + //@Cacheable + public List queryAll(StoreCanvasQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(StoreCanvas.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (StoreCanvasDto storeCanvas : all) { + Map map = new LinkedHashMap<>(); + map.put("终端 1-小程序 2-H5 3-APP 4-PC", storeCanvas.getTerminal()); + map.put("画布json数据", storeCanvas.getJson()); + map.put("类型 1-系统画布 2-自定义页面 3-商家店铺装修", storeCanvas.getType()); + map.put("名称", storeCanvas.getName()); + map.put("店铺id,当type=3的时候,值为具体的店铺id,其它情况为0", storeCanvas.getShopId()); + map.put("创建时间", storeCanvas.getCreateTime()); + map.put("修改时间", storeCanvas.getUpdateTime()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/mapper/StoreCanvasMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/mapper/StoreCanvasMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..ed554c82de448264e7042180fa81514ca62b21eb --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/canvas/service/mapper/StoreCanvasMapper.java @@ -0,0 +1,23 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.canvas.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.canvas.domain.StoreCanvas; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author yshop +* @date 2021-02-01 +*/ +@Repository +public interface StoreCanvasMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCart.java b/yshop-mall/src/main/java/co/yixiang/modules/cart/domain/YxStoreCart.java similarity index 67% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCart.java rename to yshop-mall/src/main/java/co/yixiang/modules/cart/domain/YxStoreCart.java index ba6628d85efc6a492ac6f16530cedccea73aed4d..fa19eea1de1cef5a4e260af4955df388d874afd9 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCart.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/cart/domain/YxStoreCart.java @@ -1,26 +1,31 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.cart.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; /** - * @author hupeng - * @date 2020-05-12 - */ - -@Data +* @author hupeng +* @date 2020-05-12 +*/ + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder @TableName("yx_store_cart") public class YxStoreCart extends BaseDomain { @@ -49,6 +54,8 @@ public class YxStoreCart extends BaseDomain { private Integer cartNum; + + /** 0 = 未购买 1 = 已购买 */ private Integer isPay; @@ -71,7 +78,7 @@ public class YxStoreCart extends BaseDomain { private Long bargainId; - public void copy(YxStoreCart source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreCart source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/cart/service/YxStoreCartService.java b/yshop-mall/src/main/java/co/yixiang/modules/cart/service/YxStoreCartService.java new file mode 100644 index 0000000000000000000000000000000000000000..856c3bb06421afc3056a7c247866396c7b4f26cf --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/cart/service/YxStoreCartService.java @@ -0,0 +1,112 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.cart.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.cart.domain.YxStoreCart; +import co.yixiang.modules.cart.service.dto.YxStoreCartDto; +import co.yixiang.modules.cart.service.dto.YxStoreCartQueryCriteria; +import co.yixiang.modules.order.service.dto.CountDto; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreCartService extends BaseService{ + + /** + * 删除购物车 + * @param uid uid + * @param ids 购物车id集合 + */ + void removeUserCart(Long uid, List ids); + + /** + * 改购物车数量 + * @param cartId 购物车id + * @param cartNum 数量 + * @param uid uid + */ + void changeUserCartNum(Long cartId,int cartNum,Long uid); + + /** + * 购物车列表 + * @param uid 用户id + * @param cartIds 购物车id,多个逗号隔开 + * @param status 0-购购物车列表 + * @return map valid-有效购物车 invalid-失效购物车 + */ + Map getUserProductCartList(Long uid,String cartIds,Integer status); + + /** + * 返回当前用户购物车总数量 + * @param uid 用户id + * @return int + */ + int getUserCartNum(Long uid); + + /** + * 添加购物车 + * @param uid 用户id + * @param productId 普通产品编号 + * @param cartNum 购物车数量 + * @param productAttrUnique 属性唯一值 + * @param isNew 1 加入购物车直接购买 0 加入购物车 + * @param combinationId 拼团id + * @param seckillId 秒杀id + * @param bargainId 砍价id + * @return 购物车id + */ + long addCart(Long uid,Long productId,Integer cartNum, String productAttrUnique, + Integer isNew,Long combinationId,Long seckillId,Long bargainId); + + /** + * 检测商品/秒杀/砍价/拼团库存 + * @param uid 用户ID + * @param productId 产品ID + * @param cartNum 购买数量 + * @param productAttrUnique 商品属性Unique + * @param combinationId 拼团产品ID + * @param seckillId 秒杀产品ID + * @param bargainId 砍价产品ID + */ + void checkProductStock(Long uid, Long productId, Integer cartNum, String productAttrUnique, + Long combinationId, Long seckillId, Long bargainId); + + /** + * 查询数据分页 + * @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/dto/YxStoreCartDto.java b/yshop-mall/src/main/java/co/yixiang/modules/cart/service/dto/YxStoreCartDto.java similarity index 65% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCartDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/cart/service/dto/YxStoreCartDto.java index 7ebb918030c7aafb7f2ac1658fb3f8b4ea835a45..ae021960affc17ca954b6b7f5b5e7379573bbc7a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCartDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/cart/service/dto/YxStoreCartDto.java @@ -1,19 +1,18 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.cart.service.dto; import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxStoreCartDto implements Serializable { @@ -21,13 +20,13 @@ public class YxStoreCartDto implements Serializable { private Long id; /** 用户ID */ - private Long uid; + private Integer uid; /** 类型 */ private String type; /** 商品ID */ - private Long productId; + private Integer productId; /** 商品属性 */ private String productAttrUnique; @@ -35,18 +34,24 @@ public class YxStoreCartDto implements Serializable { /** 商品数量 */ private Integer cartNum; + /** 添加时间 */ + private Integer addTime; + /** 0 = 未购买 1 = 已购买 */ private Integer isPay; + /** 是否删除 */ + private Integer isDel; + /** 是否为立即购买 */ private Integer isNew; /** 拼团id */ - private Long combinationId; + private Integer combinationId; /** 秒杀产品ID */ - private Long seckillId; + private Integer seckillId; /** 砍价id */ - private Long bargainId; + private Integer bargainId; } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/cart/service/dto/YxStoreCartQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/cart/service/dto/YxStoreCartQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..607b4c79ab47590c8360d448bdbfdfa55e73a2f0 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/cart/service/dto/YxStoreCartQueryCriteria.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.cart.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxStoreCartQueryCriteria{ +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/cart/service/impl/YxStoreCartServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/cart/service/impl/YxStoreCartServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..dcd00d30bc25f5d30ca921f15e498f49d28267a0 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/cart/service/impl/YxStoreCartServiceImpl.java @@ -0,0 +1,452 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.cart.service.impl; + +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.CartTypeEnum; +import co.yixiang.enums.OrderInfoEnum; +import co.yixiang.enums.ProductTypeEnum; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.activity.domain.YxStoreBargain; +import co.yixiang.modules.activity.service.YxStoreBargainService; +import co.yixiang.modules.activity.service.mapper.YxStoreBargainMapper; +import co.yixiang.modules.activity.service.mapper.YxStoreCombinationMapper; +import co.yixiang.modules.activity.service.mapper.YxStoreSeckillMapper; +import co.yixiang.modules.cart.domain.YxStoreCart; +import co.yixiang.modules.cart.service.YxStoreCartService; +import co.yixiang.modules.cart.service.dto.YxStoreCartDto; +import co.yixiang.modules.cart.service.dto.YxStoreCartQueryCriteria; +import co.yixiang.modules.cart.service.mapper.StoreCartMapper; +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.order.service.dto.CountDto; +import co.yixiang.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.service.YxStoreProductAttrService; +import co.yixiang.modules.product.service.YxStoreProductService; +import co.yixiang.modules.product.vo.YxStoreProductQueryVo; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.utils.FileUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +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.Arrays; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + + +/** + * @author hupeng + * @date 2020-05-12 + */ +@Service +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreCartServiceImpl extends BaseServiceImpl implements YxStoreCartService { + + @Autowired + private IGenerator generator; + + @Autowired + private StoreCartMapper yxStoreCartMapper; + @Autowired + private YxStoreSeckillMapper storeSeckillMapper; + @Autowired + private YxStoreBargainMapper yxStoreBargainMapper; + @Autowired + private YxStoreCombinationMapper storeCombinationMapper; + @Autowired + private YxStoreProductService productService; + @Autowired + private YxStoreProductAttrService productAttrService; + @Autowired + private YxStoreBargainService storeBargainService; + @Autowired + private YxUserService userService; + + + /** + * 删除购物车 + * + * @param uid uid + * @param ids 购物车id集合 + */ + @Override + public void removeUserCart(Long uid, List ids) { + List newids = ids.stream().map(Long::new).collect(Collectors.toList()); + yxStoreCartMapper.delete(Wrappers.lambdaQuery() + .eq(YxStoreCart::getUid, uid) + .in(YxStoreCart::getId, newids)); + } + + /** + * 改购物车数量 + * + * @param cartId 购物车id + * @param cartNum 数量 + * @param uid uid + */ + @Override + public void changeUserCartNum(Long cartId, int cartNum, Long uid) { + YxStoreCart cart = this.lambdaQuery() + .eq(YxStoreCart::getUid, uid) + .eq(YxStoreCart::getId, cartId) + .one(); + if (cart == null) { + throw new YshopException("购物车不存在"); + } + + if (cartNum <= 0) { + throw new YshopException("库存错误"); + } + + //普通商品库存 + int stock = productService.getProductStock(cart.getProductId() + , cart.getProductAttrUnique(), ""); + if (stock < cartNum) { + throw new YshopException("该产品库存不足" + cartNum); + } + + if (cartNum == cart.getCartNum()) { + return; + } + + YxStoreCart storeCart = new YxStoreCart(); + storeCart.setCartNum(cartNum); + storeCart.setId(cartId); + + yxStoreCartMapper.updateById(storeCart); + + + } + + /** + * 购物车列表 + * + * @param uid 用户id + * @param cartIds 购物车id,多个逗号隔开 + * @param status 0-购购物车列表 + * @return map valid-有效购物车 invalid-失效购物车 + */ + @Override + public Map getUserProductCartList(Long uid, String cartIds, Integer status) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreCart::getUid, uid) + .eq(YxStoreCart::getIsPay, OrderInfoEnum.PAY_STATUS_0.getValue()) + .orderByDesc(YxStoreCart::getId); + if (status == null) { + wrapper.eq(YxStoreCart::getIsNew, CartTypeEnum.NEW_0.getValue()); + } + if (StrUtil.isNotEmpty(cartIds)) { + wrapper.in(YxStoreCart::getId, Arrays.asList(cartIds.split(","))); + } + List carts = yxStoreCartMapper.selectList(wrapper); + + List valid = new ArrayList<>(); + List invalid = new ArrayList<>(); + + for (YxStoreCart storeCart : carts) { + YxStoreProductQueryVo storeProduct = null; + if (storeCart.getCombinationId() != null && storeCart.getCombinationId() > 0) { + storeProduct = ObjectUtil.clone(storeCombinationMapper.combinatiionInfo(storeCart.getCombinationId())); + } else if (storeCart.getSeckillId() != null && storeCart.getSeckillId() > 0) { + storeProduct = ObjectUtil.clone(storeSeckillMapper.seckillInfo(storeCart.getSeckillId())); + } else if (storeCart.getBargainId() != null && storeCart.getBargainId() > 0) { + storeProduct = ObjectUtil.clone(yxStoreBargainMapper.bargainInfo(storeCart.getBargainId())); + } else { + //必须得重新克隆创建一个新对象 + storeProduct = ObjectUtil.clone(productService + .getStoreProductById(storeCart.getProductId())); + } + + YxStoreCartQueryVo storeCartQueryVo = generator.convert(storeCart, YxStoreCartQueryVo.class); + + if (ObjectUtil.isNull(storeProduct)) { + this.removeById(storeCart.getId()); + } else if (ShopCommonEnum.SHOW_0.getValue().equals(storeProduct.getIsShow()) || (storeProduct.getStock() == 0 && StrUtil.isEmpty(storeCart.getProductAttrUnique()))) { + storeCartQueryVo.setProductInfo(storeProduct); + invalid.add(storeCartQueryVo); + } else { + if (StrUtil.isNotEmpty(storeCart.getProductAttrUnique())) { + YxStoreProductAttrValue productAttrValue = productAttrService + .uniqueByAttrInfo(storeCart.getProductAttrUnique()); + if (ObjectUtil.isNull(productAttrValue) || productAttrValue.getStock() == 0) { + storeCartQueryVo.setProductInfo(storeProduct); + invalid.add(storeCartQueryVo); + } else { + storeProduct.setAttrInfo(productAttrValue); + storeCartQueryVo.setProductInfo(storeProduct); + + //设置真实价格 + //设置VIP价格 + double vipPrice = userService.setLevelPrice( + productAttrValue.getPrice().doubleValue(), uid); + //砍价金额 + if ( storeCart.getBargainId() > 0 + ) { + vipPrice = storeProduct.getPrice().doubleValue(); + } + //设置拼团价格 + if(storeCart.getCombinationId() > 0 ){ + vipPrice = productAttrValue.getPinkPrice().doubleValue(); + } + //设置秒杀价格 + if( storeCart.getSeckillId() > 0){ + vipPrice = productAttrValue.getSeckillPrice().doubleValue(); + } + storeCartQueryVo.setTruePrice(vipPrice); + //设置会员价 + storeCartQueryVo.setVipTruePrice(productAttrValue.getPrice() + .doubleValue()); + storeCartQueryVo.setCostPrice(productAttrValue.getCost() + .doubleValue()); + storeCartQueryVo.setTrueStock(productAttrValue.getStock()); + + valid.add(storeCartQueryVo); + + } + } else { + //设置VIP价格,营销商品不参与 + double vipPrice = userService.setLevelPrice( + storeProduct.getPrice().doubleValue(), uid); + if (storeCart.getCombinationId() > 0 || storeCart.getSeckillId() > 0 + || storeCart.getBargainId() > 0) { + vipPrice = storeProduct.getPrice().doubleValue(); + } + + storeCartQueryVo.setTruePrice(vipPrice); + // 设置会员价 + storeCartQueryVo.setVipTruePrice(0d); + storeCartQueryVo.setCostPrice(storeProduct.getCost() + .doubleValue()); + storeCartQueryVo.setTrueStock(storeProduct.getStock()); + storeCartQueryVo.setProductInfo(storeProduct); + + valid.add(storeCartQueryVo); + } + } + + } + + Map map = new LinkedHashMap<>(); + map.put("valid", valid); + map.put("invalid", invalid); + return map; + } + + /** + * 添加购物车 + * @param uid 用户id + * @param productId 普通产品编号 + * @param cartNum 购物车数量 + * @param productAttrUnique 属性唯一值 + * @param isNew 1 加入购物车直接购买 0 加入购物车 + * @param combinationId 拼团id + * @param seckillId 秒杀id + * @param bargainId 砍价id + * @return 购物车id + */ + @Override + public long addCart(Long uid, Long productId, Integer cartNum, String productAttrUnique, + Integer isNew, Long combinationId, Long seckillId, Long bargainId) { + + this.checkProductStock(uid, productId, cartNum, productAttrUnique, combinationId, seckillId, bargainId); + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreCart::getUid, uid) + .eq(YxStoreCart::getIsPay, OrderInfoEnum.PAY_STATUS_0.getValue()) + .eq(YxStoreCart::getProductId, productId) + .eq(YxStoreCart::getIsNew, isNew) + .eq(YxStoreCart::getProductAttrUnique, productAttrUnique) + .eq(YxStoreCart::getBargainId, bargainId) + .eq(YxStoreCart::getCombinationId, combinationId) + .eq(YxStoreCart::getSeckillId, seckillId) + .orderByDesc(YxStoreCart::getId) + .last("limit 1"); + + YxStoreCart cart = yxStoreCartMapper.selectOne(wrapper); + + YxStoreCart storeCart = YxStoreCart.builder() + .cartNum(cartNum) + .productAttrUnique(productAttrUnique) + .productId(productId) + .bargainId(bargainId) + .combinationId(combinationId) + .seckillId(seckillId) + .isNew(isNew) + .uid(uid) + .build(); + if (cart != null) { + if (CartTypeEnum.NEW_0.getValue().equals(isNew)) { + storeCart.setCartNum(cartNum + cart.getCartNum()); + } + storeCart.setId(cart.getId()); + yxStoreCartMapper.updateById(storeCart); + } else { + yxStoreCartMapper.insert(storeCart); + } + + return storeCart.getId(); + } + + /** + * 返回当前用户购物车总数量 + * + * @param uid 用户id + * @return int + */ + @Override + public int getUserCartNum(Long uid) { + return yxStoreCartMapper.cartSum(uid); + } + +// @Override +// public YxStoreCartQueryVo getYxStoreCartById(Serializable id){ +// return yxStoreCartMapper.getYxStoreCartById(id); +// } + + /** + * 检测商品/秒杀/砍价/拼团库存 + * + * @param uid 用户ID + * @param productId 产品ID + * @param cartNum 购买数量 + * @param productAttrUnique 商品属性Unique + * @param combinationId 拼团产品ID + * @param seckillId 秒杀产品ID + * @param bargainId 砍价产品ID + */ + @Override + public void checkProductStock(Long uid, Long productId, Integer cartNum, String productAttrUnique, + Long combinationId, Long seckillId, Long bargainId) { + Date now = new Date(); + //拼团 + if (combinationId != null && combinationId > 0) { + YxStoreProduct product = productService + .lambdaQuery().eq(YxStoreProduct::getId, productId) + .eq(YxStoreProduct::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .one(); + if (product == null) { + throw new YshopException("该产品已下架或删除"); + } + + int stock = productService.getProductStock(productId, productAttrUnique, ProductTypeEnum.PINK.getValue()); + if (stock < cartNum) { + throw new YshopException(product.getStoreName() + "库存不足" + cartNum); + } + //秒杀 + } else if (seckillId != null && seckillId > 0) { + YxStoreProduct product = productService + .lambdaQuery().eq(YxStoreProduct::getId, productId) + .eq(YxStoreProduct::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .one(); + if (product == null) { + throw new YshopException("该产品已下架或删除"); + } + + int stock = productService.getProductStock(productId, productAttrUnique, ProductTypeEnum.SECKILL.getValue()); + if (stock < cartNum) { + throw new YshopException(product.getStoreName() + "库存不足" + cartNum); + } + //砍价 + } else if (bargainId != null && bargainId > 0) { + YxStoreBargain yxStoreBargain = storeBargainService + .lambdaQuery().eq(YxStoreBargain::getId, bargainId) + .eq(YxStoreBargain::getStatus, ShopCommonEnum.IS_STATUS_1.getValue()) + .le(YxStoreBargain::getStartTime, now) + .ge(YxStoreBargain::getStopTime, now) + .one(); + if (yxStoreBargain == null) { + throw new YshopException("该产品已下架或删除"); + } + if (yxStoreBargain.getStock() < cartNum) { + throw new YshopException("该产品库存不足"); + } + + } else { + YxStoreProduct product = productService + .lambdaQuery().eq(YxStoreProduct::getId, productId) + .eq(YxStoreProduct::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .one(); + if (product == null) { + throw new YshopException("该产品已下架或删除"); + } + + int stock = productService.getProductStock(productId, productAttrUnique, ""); + if (stock < cartNum) { + throw new YshopException(product.getStoreName() + "库存不足" + cartNum); + } + } + + } + + + //====================================================================// + + + @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 yxStoreCartMapper.findCateName(); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCartMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/cart/service/mapper/StoreCartMapper.java similarity index 48% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCartMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/cart/service/mapper/StoreCartMapper.java index 6bb75f8a3b38b1c475db81ccae1b6ad65ac09bf8..88383a72c759525b89b21b0646bcb67887192797 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCartMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/cart/service/mapper/StoreCartMapper.java @@ -2,26 +2,33 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.mapper; +package co.yixiang.modules.cart.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 co.yixiang.modules.cart.domain.YxStoreCart; +import co.yixiang.modules.order.service.dto.CountDto; +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 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface StoreCartMapper extends CoreMapper { + + @Select("select IFNULL(sum(cart_num),0) from yx_store_cart " + + "where is_pay=0 and is_del=0 and is_new=0 and uid=#{uid}") + int cartSum(@Param("uid") Long uid); + + @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 " + diff --git a/yshop-mall/src/main/java/co/yixiang/modules/cart/vo/YxStoreCartQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/cart/vo/YxStoreCartQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..a45009fc4ab72aac24dfe0597469d115914cedb1 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/cart/vo/YxStoreCartQueryVo.java @@ -0,0 +1,77 @@ +package co.yixiang.modules.cart.vo; + +import co.yixiang.modules.product.vo.YxStoreProductQueryVo; +import co.yixiang.serializer.DoubleSerializer; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 购物车表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-25 + */ +@Data +@ApiModel(value = "YxStoreCartQueryVo对象", description = "购物车表查询参数") +public class YxStoreCartQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "购物车表ID") + private Long id; + + @ApiModelProperty(value = "用户ID") + private Long uid; + + @ApiModelProperty(value = "类型") + private String type; + + @ApiModelProperty(value = "商品ID") + private Long productId; + + @ApiModelProperty(value = "商品属性") + private String productAttrUnique; + + @ApiModelProperty(value = "商品数量") + private Integer cartNum; + + + @ApiModelProperty(value = "拼团id") + private Long combinationId; + + @ApiModelProperty(value = "秒杀产品ID") + private Long seckillId; + + @ApiModelProperty(value = "砍价id") + private Long bargainId; + + @ApiModelProperty(value = "商品信息") + private YxStoreProductQueryVo productInfo; + + @ApiModelProperty(value = "成本价") + @JsonSerialize(using = DoubleSerializer.class) + private Double costPrice; + + @ApiModelProperty(value = "真实价格") + @JsonSerialize(using = DoubleSerializer.class) + private Double truePrice; + + @ApiModelProperty(value = "真实库存") + private Integer trueStock; + + @JsonSerialize(using = DoubleSerializer.class) + @ApiModelProperty(value = "vip真实价格") + private Double vipTruePrice; + + @ApiModelProperty(value = "唯一id") + private String unique; + + @ApiModelProperty(value = "是否评价") + private Long isReply; + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCategory.java b/yshop-mall/src/main/java/co/yixiang/modules/category/domain/YxStoreCategory.java similarity index 73% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCategory.java rename to yshop-mall/src/main/java/co/yixiang/modules/category/domain/YxStoreCategory.java index 1448c5263f6713e33889fb4340c77cea3bbe48f1..6ce984c9182412cb5169748e2483a3b56e946567 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreCategory.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/category/domain/YxStoreCategory.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.category.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; @@ -12,16 +11,16 @@ import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import lombok.EqualsAndHashCode; import javax.validation.constraints.NotBlank; -import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ - +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_store_category") public class YxStoreCategory extends BaseDomain { @@ -52,7 +51,8 @@ public class YxStoreCategory extends BaseDomain { - public void copy(YxStoreCategory source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + + public void copy(YxStoreCategory source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/category/service/YxStoreCategoryService.java b/yshop-mall/src/main/java/co/yixiang/modules/category/service/YxStoreCategoryService.java new file mode 100644 index 0000000000000000000000000000000000000000..29a53a90e4ae19f25bdc2252805b54ca83a39924 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/category/service/YxStoreCategoryService.java @@ -0,0 +1,74 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.category.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.category.domain.YxStoreCategory; +import co.yixiang.modules.category.service.dto.YxStoreCategoryDto; +import co.yixiang.modules.category.service.dto.YxStoreCategoryQueryCriteria; +import co.yixiang.utils.CateDTO; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreCategoryService extends BaseService{ + + List getList(); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreCategoryQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreCategoryQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + /** + * 构建树形 + * @param categoryDTOS 分类列表 + * @return map + */ + Map buildTree(List categoryDTOS); + + /** + * 检测分类是否操过二级 + * @param pid 父级id + * @return boolean + */ + boolean checkCategory(int pid); + + /** + * 检测商品分类必选选择二级 + * @param id 分类id + * @return boolean + */ + boolean checkProductCategory(int id); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryDto.java b/yshop-mall/src/main/java/co/yixiang/modules/category/service/dto/YxStoreCategoryDto.java similarity index 83% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/category/service/dto/YxStoreCategoryDto.java index 0611dab6002ff6c39d9bfb002e269cd9379e074b..396b10c2e71c0f46ccbcb2dbc634b2fc5fadd897 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/category/service/dto/YxStoreCategoryDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.category.service.dto; import com.fasterxml.jackson.annotation.JsonInclude; import lombok.Data; @@ -13,9 +12,9 @@ import java.io.Serializable; import java.util.List; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxStoreCategoryDto implements Serializable { diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/category/service/dto/YxStoreCategoryQueryCriteria.java similarity index 51% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/category/service/dto/YxStoreCategoryQueryCriteria.java index 9ead271342abea052006a72a701e578d1c250bdc..ac9566a5b97cbaacfdc79d659b0575a1ac3803b2 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategoryQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/category/service/dto/YxStoreCategoryQueryCriteria.java @@ -1,20 +1,19 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.category.service.dto; import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxStoreCategoryQueryCriteria { +public class YxStoreCategoryQueryCriteria{ @Query private String cateName; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategorySmallDto.java b/yshop-mall/src/main/java/co/yixiang/modules/category/service/dto/YxStoreCategorySmallDto.java similarity index 69% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategorySmallDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/category/service/dto/YxStoreCategorySmallDto.java index eaa5cc46579ab8ee9c4b524e3185230f2d7d558e..23d9ca9cef54d9e0d9db535a0ca04998141c4522 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCategorySmallDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/category/service/dto/YxStoreCategorySmallDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.category.service.dto; import lombok.Data; @@ -12,9 +11,9 @@ import java.io.Serializable; /** - * @author hupeng - * @date 2019-10-03 - */ +* @author hupeng +* @date 2019-10-03 +*/ @Data public class YxStoreCategorySmallDto implements Serializable { @@ -26,4 +25,5 @@ public class YxStoreCategorySmallDto implements Serializable { private String cateName; + } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCategoryServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/category/service/impl/YxStoreCategoryServiceImpl.java similarity index 60% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCategoryServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/category/service/impl/YxStoreCategoryServiceImpl.java index dd7e7ecc5be36b564affd7f0f32d46bfc68819c2..04768c4f67743dc0cccbc6cc9b0d7aecd7f4be1e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCategoryServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/category/service/impl/YxStoreCategoryServiceImpl.java @@ -2,21 +2,28 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.impl; +package co.yixiang.modules.category.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; -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.YxStoreCategoryQueryCriteria; -import co.yixiang.modules.shop.service.mapper.StoreCategoryMapper; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.category.domain.YxStoreCategory; +import co.yixiang.modules.category.service.YxStoreCategoryService; +import co.yixiang.modules.category.service.dto.YxStoreCategoryDto; +import co.yixiang.modules.category.service.dto.YxStoreCategoryQueryCriteria; +import co.yixiang.modules.category.service.mapper.StoreCategoryMapper; +import co.yixiang.utils.CateDTO; import co.yixiang.utils.FileUtil; +import co.yixiang.utils.TreeUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.pagehelper.PageInfo; +import com.google.common.collect.Maps; import lombok.AllArgsConstructor; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; @@ -26,28 +33,42 @@ import org.springframework.util.CollectionUtils; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.*; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.LinkedHashSet; +import java.util.List; +import java.util.Map; +import java.util.Set; import java.util.stream.Collectors; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreCategory") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxStoreCategoryServiceImpl extends BaseServiceImpl implements YxStoreCategoryService { private final IGenerator generator; + /** + * 获取分类列表树形列表 + * @return List + */ + @Override + public List getList() { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreCategory::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .orderByAsc(YxStoreCategory::getSort); + List list = generator.convert(baseMapper.selectList(wrapper),CateDTO.class); + return TreeUtil.list2TreeConverter(list,0); + } + + //===============================// + @Override - //@Cacheable public Map queryAll(YxStoreCategoryQueryCriteria criteria, Pageable pageable) { getPage(pageable); PageInfo page = new PageInfo<>(queryAll(criteria)); @@ -59,9 +80,9 @@ public class YxStoreCategoryServiceImpl extends BaseServiceImpl queryAll(YxStoreCategoryQueryCriteria criteria) { - return generator.convert(baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCategory.class, criteria)), YxStoreCategoryDto.class); + public List queryAll(YxStoreCategoryQueryCriteria criteria){ + return generator.convert(this.baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCategory.class, criteria)), + YxStoreCategoryDto.class); } @@ -69,7 +90,7 @@ public class YxStoreCategoryServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxStoreCategoryDto yxStoreCategory : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("父id", yxStoreCategory.getPid()); map.put("分类名称", yxStoreCategory.getCateName()); map.put("排序", yxStoreCategory.getSort()); @@ -80,14 +101,19 @@ public class YxStoreCategoryServiceImpl extends BaseServiceImpl categoryDTOS) { + public Map 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 = this.list(); for (YxStoreCategoryDto deptDTO : categoryDTOS) { @@ -122,7 +148,7 @@ public class YxStoreCategoryServiceImpl extends BaseServiceImpl map = Maps.newHashMap(); map.put("totalElements", totalElements); map.put("content", CollectionUtils.isEmpty(trees) ? categoryDTOS : trees); return map; @@ -135,17 +161,13 @@ public class YxStoreCategoryServiceImpl extends BaseServiceImpllambdaQuery() - .eq(YxStoreCategory::getId, pid)); - if (yxStoreCategory.getPid() > 0) { - return false; - } - - return true; + YxStoreCategory yxStoreCategory = this.getOne(Wrappers.lambdaQuery() + .eq(YxStoreCategory::getId,pid)); + return yxStoreCategory.getPid() <= 0; } /** @@ -154,15 +176,10 @@ public class YxStoreCategoryServiceImpl extends BaseServiceImpllambdaQuery() - .eq(YxStoreCategory::getId, id)); - - if (yxStoreCategory.getPid() == 0) { - return false; - } - - return true; + public boolean checkProductCategory(int id){ + YxStoreCategory yxStoreCategory = this.getOne(Wrappers.lambdaQuery() + .eq(YxStoreCategory::getId,id)); + return yxStoreCategory.getPid() != 0; } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCategoryMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/category/service/mapper/StoreCategoryMapper.java similarity index 41% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCategoryMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/category/service/mapper/StoreCategoryMapper.java index 616af0fa05286ce735f23c4d18b5bcd1210fb32b..668d192501a7e4ac24116980e7018211536d9e67 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreCategoryMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/category/service/mapper/StoreCategoryMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.mapper; +package co.yixiang.modules.category.service.mapper; import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.shop.domain.YxStoreCategory; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.category.domain.YxStoreCategory; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface StoreCategoryMapper extends CoreMapper { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/customer/domain/YxStoreCustomer.java b/yshop-mall/src/main/java/co/yixiang/modules/customer/domain/YxStoreCustomer.java new file mode 100644 index 0000000000000000000000000000000000000000..aa8d83b9db500541359efa92ea3c3653a1ba32dd --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/customer/domain/YxStoreCustomer.java @@ -0,0 +1,50 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.customer.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; +import javax.validation.constraints.*; +import java.util.Date; +import co.yixiang.domain.BaseDomain; + +/** +* @author Bug +* @date 2020-12-10 +*/ +@Data +@TableName("yx_store_customer") +public class YxStoreCustomer extends BaseDomain { + /** id */ + @TableId + private Long id; + + /** 用户昵称 */ + private String nickName; + + /** openId */ + @NotBlank(message = "请用户扫码后提交") + private String openId; + + /** 备注 */ + private String remark; + + + + + /** 是否启用 */ + private Integer isEnable; + + + public void copy(YxStoreCustomer source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/customer/service/YxStoreCustomerService.java b/yshop-mall/src/main/java/co/yixiang/modules/customer/service/YxStoreCustomerService.java new file mode 100644 index 0000000000000000000000000000000000000000..1f3110c3e650ac4ca09ae7b0cd08c6e9a2f388d9 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/customer/service/YxStoreCustomerService.java @@ -0,0 +1,48 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.customer.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.customer.domain.YxStoreCustomer; +import co.yixiang.modules.customer.service.dto.YxStoreCustomerDto; +import co.yixiang.modules.customer.service.dto.YxStoreCustomerQueryCriteria; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import co.yixiang.domain.PageResult; +/** +* @author Bug +* @date 2020-12-10 +*/ +public interface YxStoreCustomerService extends BaseService{ + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + PageResult queryAll(YxStoreCustomerQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreCustomerQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/customer/service/dto/YxStoreCustomerDto.java b/yshop-mall/src/main/java/co/yixiang/modules/customer/service/dto/YxStoreCustomerDto.java new file mode 100644 index 0000000000000000000000000000000000000000..82fb9da60239920ad267c80af7964315d90e9c92 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/customer/service/dto/YxStoreCustomerDto.java @@ -0,0 +1,44 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.customer.service.dto; + +import lombok.Data; +import java.util.Date; +import java.io.Serializable; + +/** +* @author Bug +* @date 2020-12-10 +*/ +@Data +public class YxStoreCustomerDto implements Serializable { + + /** id */ + private Long id; + + /** 用户昵称 */ + private String nickName; + + /** openId */ + private String openId; + + /** 备注 */ + private String remark; + + /** 添加时间 */ + private Date createTime; + + /** 修改时间 */ + private Date updateTime; + + private Integer isDel; + + /** 是否启用 */ + private Integer isEnable; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/customer/service/dto/YxStoreCustomerQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/customer/service/dto/YxStoreCustomerQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..ab692a4935beeb4077eb77183713942754ab518c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/customer/service/dto/YxStoreCustomerQueryCriteria.java @@ -0,0 +1,21 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.customer.service.dto; + +import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; + +/** +* @author Bug +* @date 2020-12-10 +*/ +@Data +public class YxStoreCustomerQueryCriteria{ +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/customer/service/impl/YxStoreCustomerServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/customer/service/impl/YxStoreCustomerServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..1b2b9b653f373076003e44dec69a8ceb1bda48a0 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/customer/service/impl/YxStoreCustomerServiceImpl.java @@ -0,0 +1,84 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.customer.service.impl; + +import co.yixiang.modules.customer.domain.YxStoreCustomer; +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.customer.service.YxStoreCustomerService; +import co.yixiang.modules.customer.service.dto.YxStoreCustomerDto; +import co.yixiang.modules.customer.service.dto.YxStoreCustomerQueryCriteria; +import co.yixiang.modules.customer.service.mapper.YxStoreCustomerMapper; +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.List; +import java.util.Map; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import co.yixiang.domain.PageResult; +/** +* @author Bug +* @date 2020-12-10 +*/ +@Service +@AllArgsConstructor +//@CacheConfig(cacheNames = "yxStoreCustomer") +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreCustomerServiceImpl extends BaseServiceImpl implements YxStoreCustomerService { + + private final IGenerator generator; + + @Override + //@Cacheable + public PageResult queryAll(YxStoreCustomerQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + return generator.convertPageInfo(page,YxStoreCustomerDto.class); + } + + + @Override + //@Cacheable + public List queryAll(YxStoreCustomerQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCustomer.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreCustomerDto yxStoreCustomer : all) { + Map map = new LinkedHashMap<>(); + map.put("用户昵称", yxStoreCustomer.getNickName()); + map.put("openId", yxStoreCustomer.getOpenId()); + map.put("备注", yxStoreCustomer.getRemark()); + map.put("添加时间", yxStoreCustomer.getCreateTime()); + map.put("修改时间", yxStoreCustomer.getUpdateTime()); + map.put(" isDel", yxStoreCustomer.getIsDel()); + map.put("是否启用", yxStoreCustomer.getIsEnable()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/customer/service/mapper/YxStoreCustomerMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/customer/service/mapper/YxStoreCustomerMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..ca96028d0c1bbc2d6bb3831d33cbfe54b47fda17 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/customer/service/mapper/YxStoreCustomerMapper.java @@ -0,0 +1,23 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.customer.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.customer.domain.YxStoreCustomer; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author Bug +* @date 2020-12-10 +*/ +@Repository +public interface YxStoreCustomerMapper extends CoreMapper { + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/customer/vo/YzCustomerVo.java b/yshop-mall/src/main/java/co/yixiang/modules/customer/vo/YzCustomerVo.java new file mode 100644 index 0000000000000000000000000000000000000000..6a254bfcf6acaea6c3651cd2f81a23c01397b105 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/customer/vo/YzCustomerVo.java @@ -0,0 +1,43 @@ +package co.yixiang.modules.customer.vo; + +import com.baomidou.mybatisplus.annotation.TableField; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 订单通知用户表 接收订单通知的用户 查询结果对象 + *

+ * + * @author LionCity + * @date 2020-04-02 + */ +@Data +@ApiModel(description = "订单通知用户表") +public class YzCustomerVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "id") + private Long id; + + @ApiModelProperty(value = "用户昵称") + private String nickName; + + @ApiModelProperty(value = "openId") + private String openId; + + @ApiModelProperty(value = "备注") + private String remark; + + + @ApiModelProperty(value = "创建时间 创建时间") + private Date createTime; + + @ApiModelProperty(value = "更新时间 最后更新时间") + private Date updateTime; + +} \ No newline at end of file diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Dict.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/domain/Dict.java similarity index 46% rename from yshop-admin/src/main/java/co/yixiang/modules/system/domain/Dict.java rename to yshop-mall/src/main/java/co/yixiang/modules/dict/domain/Dict.java index d88ab6c6495d7df08696e4ba02d07022a86cbcc5..d57cc3d33b6a748d6a8ebe0023b9d3513a5b23b6 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/Dict.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/domain/Dict.java @@ -1,30 +1,30 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.system.domain; +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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.EqualsAndHashCode; import javax.validation.constraints.NotBlank; -import java.io.Serializable; -import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -@TableName("dict") +@EqualsAndHashCode(callSuper = true) +@TableName("sys_dict") public class Dict extends BaseDomain { /** 字典ID */ @@ -43,7 +43,7 @@ public class Dict extends BaseDomain { - public void copy(Dict source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(Dict source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/DictDetail.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/domain/DictDetail.java similarity index 53% rename from yshop-admin/src/main/java/co/yixiang/modules/system/domain/DictDetail.java rename to yshop-mall/src/main/java/co/yixiang/modules/dict/domain/DictDetail.java index 39b25779addff703ff17583cbde26cd2dc165721..6cc537723e5ef7d610a22b1162889c9f9b7f77d3 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/domain/DictDetail.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/domain/DictDetail.java @@ -1,29 +1,27 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.system.domain; +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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 java.io.Serializable; -import java.sql.Timestamp; - /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data -@TableName("dict_detail") +@TableName("sys_dict_detail") public class DictDetail extends BaseDomain { /** 字典详细 */ @@ -52,7 +50,7 @@ public class DictDetail extends BaseDomain { - public void copy(DictDetail source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(DictDetail source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/dict/service/DictDetailService.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/DictDetailService.java new file mode 100644 index 0000000000000000000000000000000000000000..ea2350354635db40596f6912d985c6c9305be96c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/DictDetailService.java @@ -0,0 +1,68 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.dict.domain.DictDetail; +import co.yixiang.modules.dict.service.dto.DictDetailDto; +import co.yixiang.modules.dict.service.dto.DictDetailQueryCriteria; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-14 +*/ +public interface DictDetailService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(DictDetailQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(DictDetailQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + + /** + * 按名称查询字典值返回label + * + * @param dictName dict类型名称 + * @return {@link Map}<{@link String}, {@link String}> + */ + Map queryDetailsByName(String dictName); + + /** + * 按名称查询字典值返回key + * + * @param dictName dict类型名称 + * @return {@link Map}<{@link String}, {@link String}> + */ + Map queryDetailsByKey(String dictName); + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/dict/service/DictService.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/DictService.java new file mode 100644 index 0000000000000000000000000000000000000000..ed3e1c8fc1a6c70d4328668a2b96b43b5ba16d5f --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/DictService.java @@ -0,0 +1,50 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.dict.domain.Dict; +import co.yixiang.modules.dict.service.dto.DictDto; +import co.yixiang.modules.dict.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; + +/** +* @author hupeng +* @date 2020-05-14 +*/ +public interface DictService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(DictQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(DictQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictDetailDto.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictDetailDto.java similarity index 50% rename from yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictDetailDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictDetailDto.java index b501ee26783b82a8b3f5a7bdee4b53433b733dbb..f571d0cc3b01bc54ddeadb60ea22aee29b2b7baf 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictDetailDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictDetailDto.java @@ -1,10 +1,12 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.system.service.dto; +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.service.dto; import lombok.Data; @@ -12,9 +14,9 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data public class DictDetailDto implements Serializable { diff --git a/yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictDetailQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictDetailQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..4b7f80351b07e4996154f7f815a44535a5b27cb7 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictDetailQueryCriteria.java @@ -0,0 +1,25 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.service.dto; + +import co.yixiang.annotation.Query; +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-14 +*/ +@Data +public class DictDetailQueryCriteria{ + + @Query(type = Query.Type.INNER_LIKE) + private String label; + + private String dictName; +} diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictDto.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictDto.java similarity index 48% rename from yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictDto.java index 656f867c4d051403aa30e5baee7667a75bd22942..4813ed6281c2c7e6384dd2aeb999c56964456eee 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/dto/DictDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictDto.java @@ -1,10 +1,12 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.system.service.dto; +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.service.dto; import lombok.Data; @@ -13,9 +15,9 @@ import java.sql.Timestamp; import java.util.List; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Data public class DictDto implements Serializable { diff --git a/yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..e231d8bb29dc30dd39ffdc87a24155cf260bb76e --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/dto/DictQueryCriteria.java @@ -0,0 +1,23 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.service.dto; + +import co.yixiang.annotation.Query; +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-14 +*/ +@Data +public class DictQueryCriteria{ + + @Query(blurry = "name,remark") + private String blurry; +} diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/DictDetailServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/impl/DictDetailServiceImpl.java similarity index 54% rename from yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/DictDetailServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/dict/service/impl/DictDetailServiceImpl.java index f9d5b128c1b28d7df609d89d3244a0812c28a19e..bcaf11e8211a66f7525d2897d59c278e0b8501f7 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/DictDetailServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/impl/DictDetailServiceImpl.java @@ -1,18 +1,20 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.system.service.impl; +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.system.domain.DictDetail; -import co.yixiang.modules.system.service.DictDetailService; -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.modules.dict.domain.DictDetail; +import co.yixiang.modules.dict.service.DictDetailService; +import co.yixiang.modules.dict.service.dto.DictDetailDto; +import co.yixiang.modules.dict.service.dto.DictDetailQueryCriteria; +import co.yixiang.modules.dict.service.mapper.DictDetailMapper; import co.yixiang.utils.FileUtil; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; @@ -27,6 +29,7 @@ import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; // 默认不使用缓存 //import org.springframework.cache.annotation.CacheConfig; @@ -34,9 +37,9 @@ import java.util.Map; //import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Service @AllArgsConstructor //@CacheConfig(cacheNames = "dictDetail") @@ -59,8 +62,8 @@ public class DictDetailServiceImpl extends BaseServiceImpl queryAll(DictDetailQueryCriteria criteria) { - List list = baseMapper.selectDictDetailList(criteria.getLabel(), criteria.getDictName()); + public List queryAll(DictDetailQueryCriteria criteria){ + List list = baseMapper.selectDictDetailList(criteria.getLabel(),criteria.getDictName()); return list; } @@ -69,7 +72,7 @@ public class DictDetailServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (DictDetailDto dictDetail : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("字典标签", dictDetail.getLabel()); map.put("字典值", dictDetail.getValue()); map.put("排序", dictDetail.getSort()); @@ -79,4 +82,30 @@ public class DictDetailServiceImpl extends BaseServiceImpl queryDetailsByName(String dictName) { + List dtoList = getDictDetailDtos(dictName); + return dtoList.stream().collect(Collectors.toMap(DictDetailDto::getValue, DictDetailDto::getLabel)); + } + + @Override + public Map queryDetailsByKey(String dictName) { + List dtoList = getDictDetailDtos(dictName); + return dtoList.stream().collect(Collectors.toMap(DictDetailDto::getLabel, DictDetailDto::getValue)); + } + + /** + * 获取dictDetailDto列表 + * + * @param dictName dict类型名称 + * @return {@link List}<{@link DictDetailDto}> + */ + private List getDictDetailDtos(String dictName) { + DictDetailQueryCriteria criteria =new DictDetailQueryCriteria(); + criteria.setDictName(dictName); + List list = baseMapper.selectDictDetailList(criteria.getLabel(),criteria.getDictName()); + return generator.convert(list, DictDetailDto.class); + } + } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/DictServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/impl/DictServiceImpl.java similarity index 51% rename from yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/DictServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/dict/service/impl/DictServiceImpl.java index d4c4fabda07f8e57ce0b0490c5bfc2a872f3fceb..9f8857a94546d0de535ff9b553a688438f6bddce 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/impl/DictServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/impl/DictServiceImpl.java @@ -1,19 +1,23 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.system.service.impl; +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.service.impl; +import cn.hutool.core.collection.CollectionUtil; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; -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 co.yixiang.modules.system.service.mapper.DictMapper; +import co.yixiang.modules.dict.domain.Dict; +import co.yixiang.modules.dict.service.DictService; +import co.yixiang.modules.dict.service.dto.DictDetailDto; +import co.yixiang.modules.dict.service.dto.DictDto; +import co.yixiang.modules.dict.service.dto.DictQueryCriteria; +import co.yixiang.modules.dict.service.mapper.DictMapper; import co.yixiang.utils.FileUtil; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; @@ -35,9 +39,9 @@ import java.util.Map; //import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Service @AllArgsConstructor //@CacheConfig(cacheNames = "dict") @@ -60,7 +64,7 @@ public class DictServiceImpl extends BaseServiceImpl implement @Override //@Cacheable - public List queryAll(DictQueryCriteria criteria) { + public List queryAll(DictQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(Dict.class, criteria)); } @@ -69,11 +73,25 @@ public class DictServiceImpl extends BaseServiceImpl implement public void download(List all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (DictDto dict : all) { - Map map = new LinkedHashMap<>(); - map.put("字典名称", dict.getName()); - map.put("描述", dict.getRemark()); - map.put("创建日期", dict.getCreateTime()); - list.add(map); + if(CollectionUtil.isNotEmpty(dict.getDictDetails())){ + for (DictDetailDto dictDetail : dict.getDictDetails()) { + Map map = new LinkedHashMap<>(); + map.put("字典名称", dict.getName()); + map.put("字典描述", dict.getRemark()); + map.put("字典标签", dictDetail.getLabel()); + map.put("字典值", dictDetail.getValue()); + map.put("创建日期", dictDetail.getCreateTime()); + list.add(map); + } + } else { + Map map = new LinkedHashMap<>(); + map.put("字典名称", dict.getName()); + map.put("字典描述", dict.getRemark()); + map.put("字典标签", null); + map.put("字典值", null); + map.put("创建日期", dict.getCreateTime()); + list.add(map); + } } FileUtil.downloadExcel(list, response); } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/DictDetailMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/mapper/DictDetailMapper.java similarity index 30% rename from yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/DictDetailMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/dict/service/mapper/DictDetailMapper.java index 6bfa15dcd5c63c6076c78674add0cbaffcefe5af..281b7ff51c2cab3c03c2f1aa7992d60340e11afe 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/DictDetailMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/mapper/DictDetailMapper.java @@ -1,14 +1,15 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.system.service.mapper; +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.service.mapper; import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.system.domain.DictDetail; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.dict.domain.DictDetail; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; @@ -16,13 +17,12 @@ import org.springframework.stereotype.Repository; import java.util.List; /** - * @author hupeng - * @date 2020-05-14 - */ +* @author hupeng +* @date 2020-05-14 +*/ @Repository -@Mapper public interface DictDetailMapper extends CoreMapper { - @Select("") - List selectDictDetailList(@Param("label") String label, @Param("dictName") String dictName); + @Select("") + List selectDictDetailList(@Param("label") String label,@Param("dictName") String dictName); } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/dict/service/mapper/DictMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/mapper/DictMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..9d195cfee664d9c18af3a093497e3ffe61759175 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/dict/service/mapper/DictMapper.java @@ -0,0 +1,22 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.dict.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.dict.domain.Dict; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-14 +*/ +@Repository +public interface DictMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxExpress.java b/yshop-mall/src/main/java/co/yixiang/modules/order/domain/YxExpress.java similarity index 74% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxExpress.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/domain/YxExpress.java index 6fc170ede2b713fa34a6725edfc995430ea44bdf..04befbe0b778ba875389313fa4575322e49dbcb7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxExpress.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/domain/YxExpress.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.order.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; @@ -12,16 +11,17 @@ import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import lombok.EqualsAndHashCode; import javax.validation.constraints.NotBlank; -import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_express") public class YxExpress extends BaseDomain { @@ -37,7 +37,6 @@ public class YxExpress extends BaseDomain { /** 快递公司全称 */ @NotBlank(message = "请输入快递公司名称") - private String name; @@ -49,7 +48,7 @@ public class YxExpress extends BaseDomain { private Integer isShow; - public void copy(YxExpress source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxExpress source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrder.java b/yshop-mall/src/main/java/co/yixiang/modules/order/domain/YxStoreOrder.java similarity index 80% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrder.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/domain/YxStoreOrder.java index b0ad8e5c4cdfd0084e568c06ce591adbb708faa0..357b9c54388e32fff869e4eb37d4b63cfa103fe3 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrder.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/domain/YxStoreOrder.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.order.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; @@ -12,17 +11,26 @@ import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; import java.math.BigDecimal; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) @TableName("yx_store_order") public class YxStoreOrder extends BaseDomain { @@ -171,15 +179,23 @@ public class YxStoreOrder extends BaseDomain { private String mark; + /** 唯一id(md5加密)类似id */ - @TableField(value = "`unique`") - //@NotBlank + @TableField(value = "`unique`") private String unique; + /** 管理员备注 */ private String remark; + /** 商户ID */ + private Integer merId; + + + private Integer isMerCheck; + + /** 拼团产品id0一般产品 */ private Long combinationId; @@ -212,8 +228,19 @@ public class YxStoreOrder extends BaseDomain { private Integer shippingType; + /** 支付渠道(0微信公众号1微信小程序) */ + private Integer isChannel; + + + private Integer isRemind; + + + private Integer isSystemDel; + + @ApiModelProperty(value = "实际支付积分") + private BigDecimal payIntegral; - public void copy(YxStoreOrder source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreOrder source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderCartInfo.java b/yshop-mall/src/main/java/co/yixiang/modules/order/domain/YxStoreOrderCartInfo.java similarity index 69% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderCartInfo.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/domain/YxStoreOrderCartInfo.java index 756cc9b795fa36dc80c404b6666ea649d25e132e..0ea9ea7441fbe2bcd12cd3af9ff9d23282621209 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderCartInfo.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/domain/YxStoreOrderCartInfo.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.order.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; @@ -16,9 +15,9 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data @TableName("yx_store_order_cart_info") @@ -31,6 +30,11 @@ public class YxStoreOrderCartInfo implements Serializable { /** 订单id */ private Long oid; + /** + * 订单号 + */ + private String orderId; + /** 购物车id */ private Long cartId; @@ -48,8 +52,11 @@ public class YxStoreOrderCartInfo implements Serializable { @TableField(value = "`unique`") private String unique; + /** 是否能售后0不能1能 */ + private Integer isAfterSales; + - public void copy(YxStoreOrderCartInfo source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + 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-mall/src/main/java/co/yixiang/modules/order/domain/YxStoreOrderStatus.java similarity index 71% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderStatus.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/domain/YxStoreOrderStatus.java index b87057edb89045b237ba7416a93bbfb878c361fb..34b3fae021677aeb5f3d4920922b6f4c7e3eb8ba 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreOrderStatus.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/domain/YxStoreOrderStatus.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.order.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; @@ -16,9 +15,9 @@ import java.io.Serializable; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data @TableName("yx_store_order_status") @@ -44,7 +43,7 @@ public class YxStoreOrderStatus implements Serializable { private Date changeTime; - public void copy(YxStoreOrderStatus source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreOrderStatus source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/param/ExpressParam.java b/yshop-mall/src/main/java/co/yixiang/modules/order/param/ExpressParam.java similarity index 59% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/param/ExpressParam.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/param/ExpressParam.java index c1722c8055e8bc03a21a203a2b77c9b5e68d17df..36182c05100fbb665c8cd9a74cd0dd48830b52a8 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/param/ExpressParam.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/param/ExpressParam.java @@ -1,11 +1,11 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.param; +package co.yixiang.modules.order.param; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -17,8 +17,13 @@ import java.io.Serializable; **/ @Data public class ExpressParam implements Serializable { - ////@NotBlank() + + @ApiModelProperty(value = "订单编号") private String orderCode; + + @ApiModelProperty(value = "快递公司编码") private String shipperCode; + + @ApiModelProperty(value = "物流单号") private String logisticCode; } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/param/OrderParam.java b/yshop-mall/src/main/java/co/yixiang/modules/order/param/OrderParam.java new file mode 100644 index 0000000000000000000000000000000000000000..897b7bfd686b76089c231765c9d571bff1f318cc --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/param/OrderParam.java @@ -0,0 +1,65 @@ +package co.yixiang.modules.order.param; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import java.io.Serializable; + +/** + * @ClassName OrderParam + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/28 + **/ +@Data +public class OrderParam implements Serializable { + + @ApiModelProperty(value = "地址ID") + private String addressId; + + @ApiModelProperty(value = "砍价产品ID") + private String bargainId; + + @ApiModelProperty(value = "拼团ID") + private String combinationId; + + @ApiModelProperty(value = "优惠券ID") + private String couponId; + + @ApiModelProperty(value = "来源") + private String from; + + @Size(max = 200,message = "长度超过了限制") + @ApiModelProperty(value = "备注") + private String mark; + + @NotBlank(message="请选择支付方式") + @ApiModelProperty(value = "支付方式") + private String payType; + + @ApiModelProperty(value = "门店电话") + private String phone; + + @ApiModelProperty(value = "拼团id 0没有拼团") + private String pinkId; + + @ApiModelProperty(value = "门店联系人") + private String realName; + + @ApiModelProperty(value = "秒杀产品ID") + private String seckillId; + + @ApiModelProperty(value = "配送方式 1=快递 ,2=门店自提") + private String shippingType; + + @ApiModelProperty(value = "使用积分 1-表示使用") + private String useIntegral; + + @ApiModelProperty(value = "支付渠道(0微信公众号1微信小程序) ") + private String isChannel; + + @ApiModelProperty(value = "门店ID") + private String storeId; + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxExpressService.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/YxExpressService.java similarity index 36% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxExpressService.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/YxExpressService.java index 99bfde905121b61f04def50ae804b1ee8f8a2bc3..64b4635a73a21f4fb2b8879deddf0ccef51fd828 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxExpressService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/YxExpressService.java @@ -1,15 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service; +package co.yixiang.modules.order.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.YxExpressQueryCriteria; +import co.yixiang.modules.order.domain.YxExpress; +import co.yixiang.modules.order.service.dto.YxExpressDto; +import co.yixiang.modules.order.service.dto.YxExpressQueryCriteria; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,31 +17,31 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxExpressService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxExpressService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxExpressQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxExpressQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxExpressQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @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/YxStoreOrderCartInfoService.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/YxStoreOrderCartInfoService.java similarity index 31% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderCartInfoService.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/YxStoreOrderCartInfoService.java index cac59250f47f8deb5be520af15f626c18b8228b0..9ecc8c44714c4e72450b1a4455fa24e4d3fd74f7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderCartInfoService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/YxStoreOrderCartInfoService.java @@ -1,15 +1,15 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service; +package co.yixiang.modules.order.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 co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.order.domain.YxStoreOrderCartInfo; +import co.yixiang.modules.order.service.dto.YxStoreOrderCartInfoDto; +import co.yixiang.modules.order.service.dto.YxStoreOrderCartInfoQueryCriteria; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,31 +18,42 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxStoreOrderCartInfoService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreOrderCartInfoService extends BaseService{ /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map + * 添加购物车商品信息 + * @param oid 订单id + * @param orderId 订单号 + * @param cartInfo 购物车信息 */ - Map queryAll(YxStoreOrderCartInfoQueryCriteria criteria, Pageable pageable); + void saveCartInfo(Long oid, String orderId,List cartInfo); + + YxStoreOrderCartInfo findByUni(String unique); + /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询数据分页 + * @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 / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/YxStoreOrderService.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/YxStoreOrderService.java new file mode 100644 index 0000000000000000000000000000000000000000..69c481feba605f2985e633b2c6d1f1a76a738fd6 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/YxStoreOrderService.java @@ -0,0 +1,309 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.order.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.order.domain.YxStoreOrder; +import co.yixiang.modules.order.domain.YxStoreOrderCartInfo; +import co.yixiang.modules.order.param.OrderParam; +import co.yixiang.modules.order.service.dto.OrderCountDto; +import co.yixiang.modules.order.service.dto.OrderTimeDataDto; +import co.yixiang.modules.order.service.dto.YxStoreOrderDto; +import co.yixiang.modules.order.service.dto.YxStoreOrderQueryCriteria; +import co.yixiang.modules.order.vo.ComputeVo; +import co.yixiang.modules.order.vo.ConfirmOrderVo; +import co.yixiang.modules.order.vo.OrderDataVo; +import co.yixiang.modules.order.vo.ShoperOrderTimeDataVo; +import co.yixiang.modules.order.vo.UserOrderCountVo; +import co.yixiang.modules.order.vo.YxStoreOrderQueryVo; +import co.yixiang.modules.user.domain.YxUser; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreOrderService extends BaseService{ + + /** + * 订单评价 + * @param orderCartInfo + * @param user user + * @param unique 订单orderCart唯一值 + * @param comment 评论内容 + * @param pics 图片 + * @param productScore 评分 + * @param serviceScore 评分 + */ + void orderComment(YxStoreOrderCartInfo orderCartInfo, YxUser user, String unique, String comment, String pics, String productScore, + String serviceScore); + + /** + * 返回订单确认数据 + * @param yxUser yxUser + * @param cartIds 购物车id + * @return ConfirmOrderVO + */ + ConfirmOrderVo confirmOrder(YxUser yxUser, String cartIds); + + + + /** + * 确认订单退款 + * + * @param orderId 单号 + * @param price 金额 + * @param type ShopCommonEnum + * @param salesId 售后id + */ + void orderRefund(String orderId, BigDecimal price, Integer type,Long salesId); + + /** + * 订单发货 + * @param orderId 单号 + * @param deliveryId 快递单号 + * @param deliveryName 快递公司code + * @param deliveryType 快递方式 + */ + void orderDelivery(String orderId,String deliveryId,String deliveryName,String deliveryType); + + /** + * 修改快递单号 + * @param orderId 单号 + * @param deliveryId 快递单号 + * @param deliveryName 快递公司code + * @param deliveryType 快递方式 + */ + void updateDelivery(String orderId,String deliveryId,String deliveryName,String deliveryType); + /** + * 修改订单价格 + * @param orderId 单号 + * @param price 价格 + */ + void editOrderPrice(String orderId,String price); + + /** + * 订单每月统计数据 + * @param page page + * @param limit list + * @return List + */ + List getOrderDataPriceCount(int page, int limit); + + /** + * 获取 今日 昨日 本月 订单金额 + * @return ShoperOrderTimeDataVo + */ + ShoperOrderTimeDataVo getShoperOrderTimeData(); + + /** + * 获取拼团订单 + * @param pid 拼团id + * @param uid 用户id + * @return YxStoreOrder + */ + YxStoreOrder getOrderPink(Long pid,Long uid); + + + /** + * 未付款取消订单 + * @param orderId 订单号 + * @param uid 用户id + */ + void cancelOrder(String orderId,Long uid); + + + /** + * 申请退款 + * @param explain 退款备注 + * @param Img 图片 + * @param text 理由 + * @param orderId 订单号 + * @param uid uid + */ + void orderApplyRefund(String explain,String Img,String text,String orderId, Long uid); + + /** + * 删除订单 + * @param orderId 单号 + * @param uid uid + */ + void removeOrder(String orderId,Long uid); + + + + /** + * 订单确认收货 + * @param orderId 单号 + * @param uid uid + */ + void takeOrder(String orderId,Long uid); + + /** + * 核销订单 + * @param verifyCode 核销码 + * @param isConfirm OrderInfoEnum + * @param uid uid + * @return YxStoreOrderQueryVo + */ + YxStoreOrderQueryVo verifyOrder(String verifyCode, Integer isConfirm , Long uid); + + /** + * 订单列表 + * @param uid 用户id + * @param type OrderStatusEnum + * @param page page + * @param limit limit + * @return list + */ + Map orderList(Long uid,int type,int page,int limit); + + /** + * 获取某个用户的订单统计数据 + * @param uid uid>0 取用户 否则取所有 + * @return UserOrderCountVo + */ + UserOrderCountVo orderData(Long uid); + + /** + * 处理订单返回的状态 + * @param order order + * @return YxStoreOrderQueryVo + */ + YxStoreOrderQueryVo handleOrder(YxStoreOrderQueryVo order); + + /** + * 支付成功后操作 + * @param orderId 订单号 + * @param payType 支付方式 + */ + void paySuccess(String orderId,String payType); + + /** + * 余额支付 + * @param orderId 订单号 + * @param uid 用户id + */ + void yuePay(String orderId,Long uid); + + /** + * 积分兑换 + * @param orderId 订单号 + * @param uid 用户id + */ + void integralPay(String orderId,Long uid); + + + String aliPay(String orderId) throws Exception; + + + /** + * 创建订单 + * @param userInfo 用户信息 + * @param key key + * @param param param + * @return YxStoreOrder + */ + YxStoreOrder createOrder(YxUser userInfo, String key, OrderParam param); + + /** + *计算订单价格 + * @param userInfo 用户 + * @param key 订单缓存key + * @param couponId 优惠券id + * @param useIntegral 使用积分 1-表示使用 + * @param shippingType 发货类型 OrderInfoEnum + * @return ComputeVo + */ + ComputeVo computedOrder(YxUser userInfo, String key, String couponId, + String useIntegral, String shippingType,String addressId); + + /** + * 订单信息 + * @param unique 唯一值或者单号 + * @param uid 用户id + * @return YxStoreOrderQueryVo + */ + YxStoreOrderQueryVo getOrderInfo(String unique, Long uid); + + + + + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreOrderQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreOrderQueryCriteria criteria); + + + //YxStoreOrderDto create(YxStoreOrder resources); + + void update(YxStoreOrder resources); + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + /** + * 获取订单详情 + * @param orderId + * @return + */ + YxStoreOrderDto getOrderDetail(Long orderId); + + Map queryAll(List ids); + + + + + /** + * 根据商品分类统计订单占比 + * @return OrderCountDto + */ + OrderCountDto getOrderCount(); + + /** + * 首页订单/用户等统计 + * @return OrderTimeDataDto + */ + OrderTimeDataDto getOrderTimeData(); + + /** + * 返回本月订单金额与数量 + * @return map + */ + Map chartCount(); + + + /** + * 回滚库存、退积分、优惠券 + * + * @param orderId 订单id + */ + void returnStock(String orderId); +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/YxStoreOrderStatusService.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/YxStoreOrderStatusService.java new file mode 100644 index 0000000000000000000000000000000000000000..d42e23698739ffb41063606597a8bf4c368bd0b7 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/YxStoreOrderStatusService.java @@ -0,0 +1,58 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.order.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.order.domain.YxStoreOrderStatus; +import co.yixiang.modules.order.service.dto.YxStoreOrderStatusDto; +import co.yixiang.modules.order.service.dto.YxStoreOrderStatusQueryCriteria; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreOrderStatusService extends BaseService{ + + /** + * 添加订单操作记录 + * @param oid 订单id + * @param changetype 操作状态 + * @param changeMessage 操作内容 + */ + void create(Long oid,String changetype,String changeMessage); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreOrderStatusQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreOrderStatusQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/CacheDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/CacheDto.java new file mode 100644 index 0000000000000000000000000000000000000000..fa65bc04306f22ed14f42724d2374198d896c8a5 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/CacheDto.java @@ -0,0 +1,19 @@ +package co.yixiang.modules.order.service.dto; + +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @ClassName CacheDto + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/27 + **/ +@Data +public class CacheDto implements Serializable { + private List cartInfo; + private PriceGroupDto priceGroup; + private OtherDto other; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ChartDataDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/ChartDataDto.java similarity index 56% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ChartDataDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/ChartDataDto.java index 3f8769e7af2ccc75c5aee50994ca66f542daaef7..a13d0555646a767c7a18ea0bbabef6131f4367c8 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ChartDataDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/ChartDataDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.order.service.dto; import lombok.Data; @@ -16,7 +15,7 @@ import lombok.Data; @Data public class ChartDataDto { - // @Value("#{target.adminCount}") - private Double num; - private String time; + // @Value("#{target.adminCount}") + private Double num; + private String time; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/CountDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/CountDto.java similarity index 59% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/CountDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/CountDto.java index 924f2e651e744c203838e76f48fb052b0a856335..73d27d0f01cbb6d721c590696819dffb44577be8 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/CountDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/CountDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.order.service.dto; import lombok.Data; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderCountDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/OrderCountDto.java similarity index 66% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderCountDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/OrderCountDto.java index df4f3557c98d47008a98816e0b1e225f2944b81c..0fd4fee7c0d8e53563250958ada627232b2c10ca 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderCountDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/OrderCountDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.order.service.dto; import lombok.Data; @@ -19,7 +18,7 @@ public class OrderCountDto { private List orderCountDatas; @Data - public static class OrderCountData { + public static class OrderCountData{ private String name; private Integer value; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderTimeDataDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/OrderTimeDataDto.java similarity index 88% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderTimeDataDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/OrderTimeDataDto.java index d988620745b0ee7a2bcbe7ebdef00fa08eabc091..2061187a0aeee7213225e1a828194c0a7f3da181 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/OrderTimeDataDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/OrderTimeDataDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.order.service.dto; import lombok.Data; diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/OtherDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/OtherDto.java new file mode 100644 index 0000000000000000000000000000000000000000..45e7c3dc8b2e8c848f0381fc976e925ad2ff6c17 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/OtherDto.java @@ -0,0 +1,25 @@ +package co.yixiang.modules.order.service.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName OtherDto + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/27 + **/ +@Data +public class OtherDto implements Serializable { + //线下包邮 + private String offlinePostage; + //积分抵扣 + private String integralRatio; + + //最大 + private String integralMax; + + //满多少 + private String integralFull; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/PriceGroupDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/PriceGroupDto.java new file mode 100644 index 0000000000000000000000000000000000000000..c6a593a17ff5e4dda56d71518f0f388769b30ba7 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/PriceGroupDto.java @@ -0,0 +1,34 @@ +package co.yixiang.modules.order.service.dto; + +import co.yixiang.serializer.BigDecimalSerializer; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @ClassName PriceGroup + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/27 + **/ +@Data +public class PriceGroupDto { + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal costPrice; + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal storeFreePostage; + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal storePostage; + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal totalPrice; + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal vipPrice; + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal payIntegral; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/ProductAttrDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/ProductAttrDto.java new file mode 100644 index 0000000000000000000000000000000000000000..68aa6f1a543f775e89308d01e3ce9492dedd8030 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/ProductAttrDto.java @@ -0,0 +1,27 @@ +package co.yixiang.modules.order.service.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName ProductAttrDto + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/3 + **/ +@Data +public class ProductAttrDto implements Serializable { + + @ApiModelProperty(value = "产品属性ID") + private Long productId; + + @ApiModelProperty(value = "产品属性sku") + private String sku; + + @ApiModelProperty(value = "产品属性价格") + private Double price; + + @ApiModelProperty(value = "产品属性图片") + private String image; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/ProductDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/ProductDto.java new file mode 100644 index 0000000000000000000000000000000000000000..5d465e788f34a1bb98c2623d5b78c529998efa67 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/ProductDto.java @@ -0,0 +1,28 @@ +package co.yixiang.modules.order.service.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName ProductVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/3 + **/ +@Data +public class ProductDto implements Serializable { + + @ApiModelProperty(value = "产品图片") + private String image; + + @ApiModelProperty(value = "产品价格") + private Double price; + + @ApiModelProperty(value = "产品名称") + private String storeName; + + @ApiModelProperty(value = "产品属性信息") + private ProductAttrDto attrInfo; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/StatusDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/StatusDto.java new file mode 100644 index 0000000000000000000000000000000000000000..6fae57e28acc034ba648cf02fae8a2106d47425c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/StatusDto.java @@ -0,0 +1,19 @@ +package co.yixiang.modules.order.service.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName StatusDto + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/30 + **/ +@Data +public class StatusDto implements Serializable { + private String _class; + private String _msg; + private String _payType; + private String _title; + private String _type; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/StoreOrderCartInfoDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/StoreOrderCartInfoDto.java similarity index 61% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/StoreOrderCartInfoDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/StoreOrderCartInfoDto.java index 8fbd99e7b09d0696dede4c5b2a81d61d7fb4decd..cfc9de1e4a1ce37ecd9bfec1e96732e0792506ac 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/StoreOrderCartInfoDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/StoreOrderCartInfoDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.order.service.dto; import lombok.Data; @@ -21,13 +20,13 @@ import java.util.Map; public class StoreOrderCartInfoDto { - private Long id; + private Integer id; - private Long oid; + private Integer oid; - private Long cartId; + private Integer cartId; private String cartInfo; @@ -35,7 +34,7 @@ public class StoreOrderCartInfoDto { private String unique; - private Map cartInfoMap; + private Map cartInfoMap; } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/TemplateDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/TemplateDto.java new file mode 100644 index 0000000000000000000000000000000000000000..0e818fcc597d11cacef29dcdfa09fe032c625050 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/TemplateDto.java @@ -0,0 +1,30 @@ +package co.yixiang.modules.order.service.dto; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.math.BigDecimal; + +/** + * @ClassName TemplateDTO + * @Author hupeng <610796224@qq.com> + * @Date 2020/5/28 + **/ +@Getter +@Setter +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class TemplateDto { + private Double number; + private BigDecimal price; + private Double first; + private BigDecimal firstPrice; + private Double _continue; + private BigDecimal continuePrice; + private Integer tempId; + private Integer cityId; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxExpressDto.java similarity index 76% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxExpressDto.java index c21f813f1bce1827c53d48040c75449dfb3eea4c..824fee3ea7d00e0c7ba9c993cb4b151a03e5b95c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxExpressDto.java @@ -1,19 +1,18 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.order.service.dto; import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxExpressDto implements Serializable { diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxExpressQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxExpressQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..beb1d4e93f977d8a439c56211bb58fa9941be7a2 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxExpressQueryCriteria.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.order.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxExpressQueryCriteria{ +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxOrderNowOrderStatusDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxOrderNowOrderStatusDto.java new file mode 100644 index 0000000000000000000000000000000000000000..5ea67460dd60da4a37e35fb15efc23a32d5de26f --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxOrderNowOrderStatusDto.java @@ -0,0 +1,36 @@ +package co.yixiang.modules.order.service.dto; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.io.Serializable; +import java.util.Date; + +/** + * @author :LionCity + * @date :Created in 2020-05-29 11:16 + * @description: + * @modified By: + * @version: + */ +@Data +public class YxOrderNowOrderStatusDto implements Serializable { + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date cacheKeyCreateOrder; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date paySuccess; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date deliveryGoods; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date orderVerific; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date userTakeDelivery; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date checkOrderOver; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date applyRefund; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date refundOrderSuccess; + private int size; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderCartInfoDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderCartInfoDto.java similarity index 60% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderCartInfoDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderCartInfoDto.java index 11935b37f810f2ef1dceda12da5b2a7c37d09145..80e1613df3315bcf4b561fda64bac415c76f670a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderCartInfoDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderCartInfoDto.java @@ -1,32 +1,36 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.order.service.dto; import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxStoreOrderCartInfoDto implements Serializable { - private Long id; + private Integer id; /** 订单id */ - private Long oid; + private Integer oid; + + /** + * 订单号 + */ + private String orderId; /** 购物车id */ - private Long cartId; + private Integer cartId; /** 商品ID */ - private Long productId; + private Integer productId; /** 购买东西的详细信息 */ private String cartInfo; diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderCartInfoQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderCartInfoQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..2c07169ef761b80f0eb88283330fbd54ca89564e --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderCartInfoQueryCriteria.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.order.service.dto; + +import lombok.Data; + +/** +* @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-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderDto.java similarity index 83% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderDto.java index db5fb4492133d0321933d4d3cb6e12ea34ddc55b..90dfb4397eefc1ad95ed14b2d645e35360312968 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderDto.java @@ -1,11 +1,12 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.order.service.dto; +import co.yixiang.modules.user.service.dto.YxUserDto; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; @@ -14,9 +15,9 @@ import java.util.Date; import java.util.List; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxStoreOrderDto implements Serializable { // 订单ID @@ -35,6 +36,10 @@ public class YxStoreOrderDto implements Serializable { private List cartInfoList; + /** + * 订单状态列表 + */ + private List storeOrderStatusList; // 订单号 private String orderId; @@ -142,9 +147,18 @@ public class YxStoreOrderDto implements Serializable { // 备注 private String mark; + + // 唯一id(md5加密)类似id + private String unique; + // 管理员备注 private String remark; + // 商户ID + private Integer merId; + + private Integer isMerCheck; + // 拼团产品id0一般产品 private Long combinationId; @@ -171,4 +185,13 @@ public class YxStoreOrderDto implements Serializable { // 配送方式 1=快递 ,2=门店自提 private Integer shippingType; + // 支付渠道(0微信公众号1微信小程序) + private Integer isChannel; + + private Integer isRemind; + + @ApiModelProperty(value = "实际支付积分") + private BigDecimal payIntegral; + + } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderQueryCriteria.java similarity index 68% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderQueryCriteria.java index d1bfc8119809f5b288bed2063841188d948f8514..5158323d8217bbf134581d6fcfee9e059e23d475 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderQueryCriteria.java @@ -1,26 +1,26 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.order.service.dto; import co.yixiang.annotation.Query; import lombok.Data; +import java.math.BigDecimal; import java.util.List; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxStoreOrderQueryCriteria { +public class YxStoreOrderQueryCriteria{ // 模糊 @Query(type = Query.Type.UNIX_TIMESTAMP) - private List addTime; + private List createTime; // 模糊 @@ -56,18 +56,21 @@ public class YxStoreOrderQueryCriteria { @Query private Integer bargainId; - @Query(propName = "combinationId", type = Query.Type.NOT_EQUAL) + @Query(propName="combinationId",type = Query.Type.NOT_EQUAL) private Integer newCombinationId; - @Query(propName = "seckillId", type = Query.Type.NOT_EQUAL) + @Query(propName="seckillId",type = Query.Type.NOT_EQUAL) private Integer newSeckillId; - @Query(propName = "bargainId", type = Query.Type.NOT_EQUAL) + @Query(propName="bargainId",type = Query.Type.NOT_EQUAL) private Integer newBargainId; @Query private Integer shippingType; + @Query(type = Query.Type.GREATER_THAN_NQ) + private BigDecimal payIntegral; + @Query private Integer storeId; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusDto.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderStatusDto.java similarity index 53% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderStatusDto.java index a52aa8bb83217fb81a7c39e7906c12d9f9ed9ad6..0ea6d25d7947cfc9b2f26bf8410947edf15c3243 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderStatusDto.java @@ -1,27 +1,28 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.order.service.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; import java.io.Serializable; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxStoreOrderStatusDto implements Serializable { - private Long id; + private Integer id; /** 订单id */ - private Long oid; + private Integer oid; /** 操作类型 */ private String changeType; @@ -30,5 +31,7 @@ public class YxStoreOrderStatusDto implements Serializable { private String changeMessage; /** 操作时间 */ + @DateTimeFormat(pattern="yyyy-MM-dd HH:mm:ss") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date changeTime; } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderStatusQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderStatusQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..f8b36894d5e858659b307efb2a371f889a55edd9 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/dto/YxStoreOrderStatusQueryCriteria.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.order.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxStoreOrderStatusQueryCriteria{ +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxExpressServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxExpressServiceImpl.java similarity index 74% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxExpressServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxExpressServiceImpl.java index 8dc3d2c07c391530260c3a92e1305ab90c2254fb..91b45c39d70725e5097ac5891b7c661e05076071 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxExpressServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxExpressServiceImpl.java @@ -1,19 +1,18 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.impl; +package co.yixiang.modules.order.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.shop.domain.YxExpress; -import co.yixiang.modules.shop.service.YxExpressService; -import co.yixiang.modules.shop.service.dto.YxExpressDto; -import co.yixiang.modules.shop.service.dto.YxExpressQueryCriteria; -import co.yixiang.modules.shop.service.mapper.ExpressMapper; +import co.yixiang.modules.order.domain.YxExpress; +import co.yixiang.modules.order.service.YxExpressService; +import co.yixiang.modules.order.service.dto.YxExpressDto; +import co.yixiang.modules.order.service.dto.YxExpressQueryCriteria; +import co.yixiang.modules.order.service.mapper.ExpressMapper; import co.yixiang.utils.FileUtil; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; @@ -29,18 +28,13 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxExpress") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxExpressServiceImpl extends BaseServiceImpl implements YxExpressService { @@ -60,7 +54,7 @@ public class YxExpressServiceImpl extends BaseServiceImpl queryAll(YxExpressQueryCriteria criteria) { + public List queryAll(YxExpressQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxExpress.class, criteria)); } @@ -69,7 +63,7 @@ public class YxExpressServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxExpressDto yxExpress : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("快递公司简称", yxExpress.getCode()); map.put("快递公司全称", yxExpress.getName()); map.put("排序", yxExpress.getSort()); diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderCartInfoServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderCartInfoServiceImpl.java similarity index 57% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderCartInfoServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderCartInfoServiceImpl.java index 7b40ddf6712f0de7f207db68bba654399943cbe8..178babeee33cc9aa1c2950beb84941389c6ad1a9 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderCartInfoServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderCartInfoServiceImpl.java @@ -1,20 +1,23 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.impl; +package co.yixiang.modules.order.service.impl; +import cn.hutool.core.util.IdUtil; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.shop.domain.YxStoreOrderCartInfo; -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 co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.order.domain.YxStoreOrderCartInfo; +import co.yixiang.modules.order.service.YxStoreOrderCartInfoService; +import co.yixiang.modules.order.service.dto.YxStoreOrderCartInfoDto; +import co.yixiang.modules.order.service.dto.YxStoreOrderCartInfoQueryCriteria; +import co.yixiang.modules.order.service.mapper.StoreOrderCartInfoMapper; import co.yixiang.utils.FileUtil; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; import org.springframework.data.domain.Pageable; @@ -29,23 +32,52 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-12 - */ +* @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 + public YxStoreOrderCartInfo findByUni(String unique) { + LambdaQueryWrapper wrapper= new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreOrderCartInfo::getUnique,unique); + return this.baseMapper.selectOne(wrapper); + } + + /** + * 添加购物车商品信息 + * @param oid 订单id + * @param orderId + * @param cartInfo 购物车信息 + */ + @Override + public void saveCartInfo(Long oid, String orderId, List cartInfo) { + + List list = new ArrayList<>(); + for (YxStoreCartQueryVo cart : cartInfo) { + YxStoreOrderCartInfo info = new YxStoreOrderCartInfo(); + info.setOid(oid); + info.setOrderId(orderId); + info.setCartId(cart.getId()); + info.setProductId(cart.getProductId()); + info.setCartInfo(JSONObject.toJSON(cart).toString()); + info.setUnique(IdUtil.simpleUUID()); + info.setIsAfterSales(1); + list.add(info); + } + + this.saveBatch(list); + } + + @Override //@Cacheable public Map queryAll(YxStoreOrderCartInfoQueryCriteria criteria, Pageable pageable) { @@ -60,7 +92,7 @@ public class YxStoreOrderCartInfoServiceImpl extends BaseServiceImpl queryAll(YxStoreOrderCartInfoQueryCriteria criteria) { + public List queryAll(YxStoreOrderCartInfoQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreOrderCartInfo.class, criteria)); } @@ -69,7 +101,7 @@ public class YxStoreOrderCartInfoServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxStoreOrderCartInfoDto yxStoreOrderCartInfo : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("订单id", yxStoreOrderCartInfo.getOid()); map.put("购物车id", yxStoreOrderCartInfo.getCartId()); map.put("商品ID", yxStoreOrderCartInfo.getProductId()); diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..4999f7d9ba53051691282e6457861c60d2967428 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderServiceImpl.java @@ -0,0 +1,2573 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.order.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.BusinessException; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.constant.ShopConstants; +import co.yixiang.constant.SystemConfigConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.*; +import co.yixiang.event.TemplateBean; +import co.yixiang.event.TemplateEvent; +import co.yixiang.event.TemplateListenEnum; +import co.yixiang.exception.BadRequestException; +import co.yixiang.exception.EntityExistException; +import co.yixiang.exception.ErrorRequestException; +import co.yixiang.modules.activity.domain.YxStoreCouponUser; +import co.yixiang.modules.activity.domain.YxStorePink; +import co.yixiang.modules.activity.service.YxStoreBargainService; +import co.yixiang.modules.activity.service.YxStoreBargainUserService; +import co.yixiang.modules.activity.service.YxStoreCouponUserService; +import co.yixiang.modules.activity.service.YxStorePinkService; +import co.yixiang.modules.activity.vo.StoreCouponUserVo; +import co.yixiang.modules.cart.domain.YxStoreCart; +import co.yixiang.modules.cart.service.YxStoreCartService; +import co.yixiang.modules.cart.service.mapper.StoreCartMapper; +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.order.domain.YxExpress; +import co.yixiang.modules.order.domain.YxStoreOrder; +import co.yixiang.modules.order.domain.YxStoreOrderCartInfo; +import co.yixiang.modules.order.domain.YxStoreOrderStatus; +import co.yixiang.modules.order.param.OrderParam; +import co.yixiang.modules.order.service.YxExpressService; +import co.yixiang.modules.order.service.YxStoreOrderCartInfoService; +import co.yixiang.modules.order.service.YxStoreOrderService; +import co.yixiang.modules.order.service.YxStoreOrderStatusService; +import co.yixiang.modules.order.service.dto.*; +import co.yixiang.modules.order.service.mapper.StoreOrderMapper; +import co.yixiang.modules.order.vo.*; +import co.yixiang.modules.product.domain.YxStoreProductReply; +import co.yixiang.modules.product.service.YxStoreProductReplyService; +import co.yixiang.modules.product.service.YxStoreProductService; +import co.yixiang.modules.product.vo.YxStoreProductQueryVo; +import co.yixiang.modules.sales.domain.StoreAfterSales; +import co.yixiang.modules.sales.service.StoreAfterSalesService; +import co.yixiang.modules.shop.domain.YxSystemStore; +import co.yixiang.modules.shop.service.YxSystemConfigService; +import co.yixiang.modules.shop.service.YxSystemStoreService; +import co.yixiang.modules.shop.service.YxSystemStoreStaffService; +import co.yixiang.modules.template.domain.YxShippingTemplates; +import co.yixiang.modules.template.domain.YxShippingTemplatesFree; +import co.yixiang.modules.template.domain.YxShippingTemplatesRegion; +import co.yixiang.modules.template.service.YxShippingTemplatesFreeService; +import co.yixiang.modules.template.service.YxShippingTemplatesRegionService; +import co.yixiang.modules.template.service.YxShippingTemplatesService; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.domain.YxUserAddress; +import co.yixiang.modules.user.service.YxUserAddressService; +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.dto.YxUserDto; +import co.yixiang.modules.user.vo.YxUserQueryVo; +import co.yixiang.modules.tools.domain.AlipayConfig; +import co.yixiang.modules.tools.domain.vo.TradeVo; +import co.yixiang.modules.tools.service.AlipayConfigService; +import co.yixiang.utils.*; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.cache.annotation.CacheEvict; +import org.springframework.context.ApplicationEventPublisher; +import org.springframework.data.domain.Pageable; +import org.springframework.data.redis.core.RedisTemplate; +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.math.BigDecimal; +import java.util.*; +import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; + + +/** + * @author hupeng + * @date 2020-05-12 + */ +@Slf4j +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class YxStoreOrderServiceImpl extends BaseServiceImpl implements YxStoreOrderService { + + @Autowired + private IGenerator generator; + + + @Autowired + private YxStorePinkService storePinkService; + @Autowired + private YxStoreOrderCartInfoService storeOrderCartInfoService; + @Autowired + private YxStoreCartService storeCartService; + @Autowired + private YxUserAddressService userAddressService; + @Autowired + private YxStoreOrderCartInfoService orderCartInfoService; + @Autowired + private YxStoreOrderStatusService orderStatusService; + @Autowired + private YxUserBillService billService; + @Autowired + private YxStoreCouponUserService couponUserService; + @Autowired + private YxUserService userService; + @Autowired + private YxStoreProductService productService; + @Autowired + private YxStorePinkService pinkService; + @Autowired + private YxStoreBargainUserService storeBargainUserService; + @Autowired + private YxStoreBargainService storeBargainService; + @Autowired + private YxExpressService expressService; + @Autowired + private AlipayConfigService alipayService; + @Autowired + private YxSystemStoreService systemStoreService; + @Autowired + private YxStoreProductReplyService productReplyService; + @Autowired + private YxStoreCartService yxStoreCartService; + @Autowired + private YxSystemStoreStaffService systemStoreStaffService; + @Autowired + private YxShippingTemplatesService shippingTemplatesService; + @Autowired + private YxShippingTemplatesRegionService shippingTemplatesRegionService; + @Autowired + private YxShippingTemplatesFreeService shippingTemplatesFreeService; + @Autowired + private YxSystemConfigService systemConfigService; + @Autowired + private YxUserLevelService userLevelService; + + + @Autowired + private StoreOrderMapper yxStoreOrderMapper; + @Autowired + private StoreCartMapper storeCartMapper; + + + @Autowired + private RedisUtils redisUtils; + + + @Autowired + private RedisTemplate redisTemplate; + + @Autowired + private ApplicationEventPublisher publisher; + + @Autowired + private StoreAfterSalesService storeAfterSalesService; + + + /** + * 返回订单确认数据 + * + * @param yxUser yxUser + * @param cartIds 购物车id + * @return ConfirmOrderVO + */ + @Override + public ConfirmOrderVo confirmOrder(YxUser yxUser, String cartIds) { + Long uid = yxUser.getUid(); + Map cartGroup = yxStoreCartService.getUserProductCartList(uid, + cartIds, ShopConstants.YSHOP_ONE_NUM); + if (ObjectUtil.isNotEmpty(cartGroup.get("invalid"))) { + throw new YshopException("有失效的商品请重新提交"); + } + if (ObjectUtil.isEmpty(cartGroup.get("valid"))) { + throw new YshopException("请提交购买的商品"); + } + + OtherDto other = new OtherDto(); + other.setIntegralRatio(systemConfigService.getData(SystemConfigConstants.INTERGRAL_RATIO)); + other.setIntegralFull(systemConfigService.getData(SystemConfigConstants.INTERGRAL_FULL)); + other.setIntegralMax(systemConfigService.getData(SystemConfigConstants.INTERGRAL_MAX)); + + //拼团 砍价 秒杀 + Long combinationId = null; + Long secKillId = null; + Long bargainId = null; + if (cartIds.split(",").length == 1) { + YxStoreCart cartQueryVo = yxStoreCartService.getById(cartIds); + combinationId = cartQueryVo.getCombinationId(); + secKillId = cartQueryVo.getSeckillId(); + bargainId = cartQueryVo.getBargainId(); + } + + boolean deduction = false; + boolean enableIntegral = true; + + //拼团砍价秒杀类产品不参与抵扣 + if ((combinationId != null && combinationId > 0) || (secKillId != null && secKillId > 0) + || (bargainId != null && bargainId > 0)) { + deduction = true; + } + + //获取默认地址 + YxUserAddress userAddress = userAddressService.getOne(Wrappers.lambdaQuery() + .eq(YxUserAddress::getUid, uid) + .eq(YxUserAddress::getIsDefault, ShopCommonEnum.DEFAULT_1.getValue()), false); + + List cartInfo = (List) cartGroup.get("valid"); + PriceGroupDto priceGroup = this.getOrderPriceGroup(cartInfo, userAddress); + + //判断积分是否满足订单额度 + if (priceGroup.getTotalPrice().compareTo(new BigDecimal(other.getIntegralFull())) < 0) { + enableIntegral = false; + } + + String cacheKey = this.cacheOrderInfo(uid, cartInfo, priceGroup, other); + + + //获取可用优惠券 + List productIds = cartInfo.stream() + .map(YxStoreCartQueryVo::getProductId) + .map(Object::toString) + .collect(Collectors.toList()); + List storeCouponUsers = couponUserService + .getUsableCouponList(uid, priceGroup.getTotalPrice().doubleValue(), productIds); + + StoreCouponUserVo storeCouponUser = null; + if (storeCouponUsers != null && !storeCouponUsers.isEmpty()) { + storeCouponUser = storeCouponUsers.get(0); + } + + return ConfirmOrderVo.builder() + .addressInfo(userAddress) + .cartInfo(cartInfo) + .priceGroup(priceGroup) + .userInfo(generator.convert(yxUser, YxUserQueryVo.class)) + .orderKey(cacheKey) + .deduction(deduction) + .enableIntegral(enableIntegral) + .enableIntegralNum(Double.valueOf(other.getIntegralMax())) + //.integralRatio(d) + .storeSelfMention(Integer.valueOf(RedisUtil.get(ShopKeyUtils.getStoreSelfMention()))) + .usableCoupon(storeCouponUser) + .systemStore(systemStoreService.getStoreInfo("", "")) + .build(); + + } + + + /** + * 计算订单价格 + * + * @param userInfo 用户 + * @param key 订单缓存key + * @param couponId 优惠券id + * @param useIntegral 使用积分 1-表示使用 + * @param shippingType 发货类型 OrderInfoEnum + * @return ComputeVo + */ + @Override + public ComputeVo computedOrder(YxUser userInfo, String key, String couponId, + String useIntegral, String shippingType, String addressId) { + Long uid = userInfo.getUid(); + CacheDto cacheDTO = this.getCacheOrderInfo(uid, key); + if (ObjectUtil.isNull(cacheDTO)) { + throw new YshopException("订单已过期,请刷新当前页面"); + } + BigDecimal payPrice = cacheDTO.getPriceGroup().getTotalPrice(); + + + //处理运费模板 + YxUserAddress userAddress = null; + if (StrUtil.isNotBlank(addressId)) { + userAddress = userAddressService.getById(addressId); + } + PriceGroupDto priceGroup = this.getOrderPriceGroup(cacheDTO.getCartInfo(), userAddress); + BigDecimal payPostage = priceGroup.getStorePostage(); + + Integer shippingTypeI = Integer.valueOf(shippingType); + //1-配送 2-到店 + if (OrderInfoEnum.SHIPPIING_TYPE_1.getValue().equals(shippingTypeI)) { + payPrice = NumberUtil.add(payPrice, payPostage); + } else { + payPostage = BigDecimal.ZERO; + } + + Long combinationId = null; + Long seckillId = null; + Long bargainId = null; + List cartInfo = cacheDTO.getCartInfo(); + for (YxStoreCartQueryVo cart : cartInfo) { + combinationId = cart.getCombinationId(); + seckillId = cart.getSeckillId(); + bargainId = cart.getBargainId(); + } + + //拼团等不参与抵扣 + if ((combinationId != null && combinationId > 0) || (seckillId != null && seckillId > 0) + || (bargainId != null && bargainId > 0)) { + couponId = ""; + useIntegral = ""; + } + + BigDecimal couponPrice = BigDecimal.ZERO; + if (StrUtil.isNotBlank(couponId) && !ShopConstants.YSHOP_ZERO.equals(couponId)) {//使用优惠券 + YxStoreCouponUser couponUser = couponUserService.getCoupon(Integer.valueOf(couponId), uid); + if (couponUser == null) { + throw new YshopException("使用优惠劵失败"); + } + + if (couponUser.getUseMinPrice().compareTo(payPrice) > 0) { + throw new YshopException("不满足优惠劵的使用条件"); + } + payPrice = NumberUtil.sub(payPrice, couponUser.getCouponPrice()); + couponPrice = couponUser.getCouponPrice(); + } + + // 积分抵扣 + BigDecimal deductionPrice = BigDecimal.ZERO; //积分抵扣金额 + double usedIntegral = 0; //使用了多少积分 + if (StrUtil.isNotBlank(useIntegral) && ShopConstants.YSHOP_ONE.equals(useIntegral) + && userInfo.getIntegral().intValue() > 0) { + Double integralMax = Double.valueOf(cacheDTO.getOther().getIntegralMax()); + BigDecimal integralFull = new BigDecimal(cacheDTO.getOther().getIntegralFull()); + Double integralRatio = Double.valueOf(cacheDTO.getOther().getIntegralRatio()); + + if (cacheDTO.getPriceGroup().getTotalPrice().compareTo(integralFull) >= 0) { + Double userIntegral = userInfo.getIntegral().doubleValue(); + if (integralMax.intValue() > 0 && Double.compare(userIntegral, integralMax) >= 0) { + userIntegral = integralMax; + } + deductionPrice = BigDecimal.valueOf(NumberUtil.mul(userIntegral, integralRatio)); + if (deductionPrice.compareTo(payPrice) < 0) { + payPrice = NumberUtil.sub(payPrice, deductionPrice); + usedIntegral = userIntegral; + } else { + deductionPrice = payPrice; + payPrice = BigDecimal.ZERO; + usedIntegral = NumberUtil.round(NumberUtil.div(deductionPrice, + BigDecimal.valueOf(integralRatio)), 2).doubleValue(); + } + } + } + + if (payPrice.compareTo(BigDecimal.ZERO) <= 0) { + payPrice = BigDecimal.ZERO; + } + + return ComputeVo.builder() + .totalPrice(cacheDTO.getPriceGroup().getTotalPrice()) + .payPrice(payPrice) + .payPostage(payPostage) + .couponPrice(couponPrice) + .deductionPrice(deductionPrice) + .usedIntegral(usedIntegral) + .payIntegral(cacheDTO.getPriceGroup().getPayIntegral()) + .build(); + } + + + /** + * 创建订单 + * + * @param userInfo 用户信息 + * @param key key + * @param param param + * @return YxStoreOrder + */ + @Override + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) + public YxStoreOrder createOrder(YxUser userInfo, String key, OrderParam param) { + + ComputeVo computeVo = this.computedOrder(userInfo, key, param.getCouponId(), + param.getUseIntegral(), param.getShippingType(), param.getAddressId()); + + Long uid = userInfo.getUid(); + + //处理选择门店与正常选择地址下单 + YxUserAddress userAddress = null; + if (OrderInfoEnum.SHIPPIING_TYPE_1.getValue().equals(Integer.valueOf(param.getShippingType()))) { + if (StrUtil.isEmpty(param.getAddressId())) { + throw new YshopException("请选择收货地址"); + } + userAddress = userAddressService.getById(param.getAddressId()); + if (ObjectUtil.isNull(userAddress)) { + throw new YshopException("地址选择有误"); + } + } else { //门店 + if (StrUtil.isBlank(param.getRealName()) || StrUtil.isBlank(param.getPhone())) { + throw new YshopException("请填写姓名和电话"); + } + userAddress = new YxUserAddress(); + userAddress.setRealName(param.getRealName()); + userAddress.setPhone(param.getPhone()); + userAddress.setProvince(""); + userAddress.setCity(""); + userAddress.setDistrict(""); + userAddress.setDetail(""); + } + + Integer totalNum = 0; + //Integer gainIntegral = 0; + List cartIds = new ArrayList<>(); + Long combinationId = 0L; + Long seckillId = 0L; + Long bargainId = 0L; + + Boolean isIntegral = false; + BigDecimal integral = BigDecimal.ZERO; + + CacheDto cacheDTO = this.getCacheOrderInfo(uid, key); + List cartInfo = cacheDTO.getCartInfo(); + + for (YxStoreCartQueryVo cart : cartInfo) { + //检测库存 + yxStoreCartService.checkProductStock(uid, cart.getProductId(), cart.getCartNum(), + cart.getProductAttrUnique(), cart.getCombinationId(), + cart.getSeckillId(), cart.getBargainId()); + + combinationId = cart.getCombinationId(); + seckillId = cart.getSeckillId(); + bargainId = cart.getBargainId(); + + cartIds.add(cart.getId().toString()); + totalNum += cart.getCartNum(); + if (cart.getProductInfo().getIsIntegral() != null + && cart.getProductInfo().getIsIntegral() == 1) { + integral = NumberUtil.add(integral, + NumberUtil.mul(cart.getCartNum(), cart.getProductInfo().getAttrInfo().getIntegral())); + } + } + + + //计算奖励积分 + BigDecimal gainIntegral = this.getGainIntegral(cartInfo); + if (PayTypeEnum.INTEGRAL.getValue().equals(param.getPayType())) { + gainIntegral = BigDecimal.ZERO; + isIntegral = true; + } + //生成分布式唯一值 + String orderSn = IdUtil.getSnowflake(0, 0).nextIdStr(); + //组合数据 + YxStoreOrder storeOrder = new YxStoreOrder(); + storeOrder.setUid(Long.valueOf(String.valueOf(uid))); + storeOrder.setOrderId(orderSn); + storeOrder.setRealName(userAddress.getRealName()); + storeOrder.setUserPhone(userAddress.getPhone()); + storeOrder.setUserAddress(userAddress.getProvince() + " " + userAddress.getCity() + + " " + userAddress.getDistrict() + " " + userAddress.getDetail()); + storeOrder.setCartId(StrUtil.join(",", cartIds)); + storeOrder.setTotalNum(totalNum); + storeOrder.setTotalPrice(computeVo.getTotalPrice()); + storeOrder.setTotalPostage(computeVo.getPayPostage()); + + storeOrder.setCouponId(param.getCouponId() == null ? null : Integer.valueOf(param.getCouponId())); + storeOrder.setCouponPrice(computeVo.getCouponPrice()); + storeOrder.setPayPrice(computeVo.getPayPrice()); + storeOrder.setPayPostage(computeVo.getPayPostage()); + storeOrder.setDeductionPrice(computeVo.getDeductionPrice()); + storeOrder.setPaid(OrderInfoEnum.PAY_STATUS_0.getValue()); + storeOrder.setPayType(param.getPayType()); + if (isIntegral) { + storeOrder.setPayIntegral(integral); + } + storeOrder.setUseIntegral(BigDecimal.valueOf(computeVo.getUsedIntegral())); + storeOrder.setBackIntegral(BigDecimal.ZERO); + storeOrder.setGainIntegral(gainIntegral); + storeOrder.setMark(param.getMark()); + storeOrder.setCombinationId(combinationId); + storeOrder.setPinkId(Long.valueOf(param.getPinkId())); + storeOrder.setSeckillId(seckillId); + storeOrder.setBargainId(bargainId); + storeOrder.setCost(cacheDTO.getPriceGroup().getCostPrice()); + if (AppFromEnum.ROUNTINE.getValue().equals(param.getFrom())) { + storeOrder.setIsChannel(OrderInfoEnum.PAY_CHANNEL_1.getValue()); + } else { + storeOrder.setIsChannel(OrderInfoEnum.PAY_CHANNEL_0.getValue()); + } + storeOrder.setUnique(key); + storeOrder.setShippingType(Integer.valueOf(param.getShippingType())); + //处理门店 + if (OrderInfoEnum.SHIPPIING_TYPE_2.getValue().toString().equals(param.getShippingType())) { + YxSystemStore systemStoreQueryVo = systemStoreService.getById(param.getStoreId()); + if (systemStoreQueryVo == null) { + throw new ErrorRequestException("暂无门店无法选择门店自提"); + } + storeOrder.setVerifyCode(StrUtil.sub(orderSn, orderSn.length(), -12)); + storeOrder.setStoreId(systemStoreQueryVo.getId()); + } + + boolean res = this.save(storeOrder); + if (!res) { + throw new YshopException("订单生成失败"); + } + + //使用了积分扣积分 + if (computeVo.getUsedIntegral() > 0) { + this.decIntegral(userInfo, computeVo.getUsedIntegral(), computeVo.getDeductionPrice().doubleValue()); + } + + //使用了优惠券扣优惠券 + if (computeVo.getCouponPrice().compareTo(BigDecimal.ZERO) > 0) { + couponUserService.useCoupon(Integer.valueOf(param.getCouponId())); + } + + + // 减库存加销量 + this.deStockIncSale(cartInfo); + + + //保存购物车商品信息 + orderCartInfoService.saveCartInfo(storeOrder.getId(), storeOrder.getOrderId(),cartInfo); + + + //购物车状态修改 + YxStoreCart cartObj = new YxStoreCart(); + cartObj.setIsPay(OrderInfoEnum.PAY_STATUS_1.getValue()); + storeCartMapper.update(cartObj, Wrappers.lambdaQuery() + .in(YxStoreCart::getId, cartIds)); + + //删除缓存 + this.delCacheOrderInfo(uid, key); + + //增加状态 + orderStatusService.create(storeOrder.getId(), OrderLogEnum.CREATE_ORDER.getValue(), + OrderLogEnum.CREATE_ORDER.getDesc()); + + + //加入redis,30分钟自动取消 + String redisKey = String.valueOf(StrUtil.format("{}{}", + ShopConstants.REDIS_ORDER_OUTTIME_UNPAY, storeOrder.getId())); + redisTemplate.opsForValue().set(redisKey, storeOrder.getOrderId(), + ShopConstants.ORDER_OUTTIME_UNPAY, TimeUnit.MINUTES); + + //使用MQ延时消息 +// TemplateBean templateBean = TemplateBean.builder() +// .orderId(storeOrder.getId()+"") +// .uid(storeOrder.getUid()) +// .templateType(TemplateListenEnum.TYPE_7.getValue()) +// .time(DateUtil.formatTime(new Date())) +// .build(); +// publisher.publishEvent(new TemplateEvent(this,templateBean)); + + + return storeOrder; + } + + + /** + * 订单评价 + * + * @param orderCartInfo + * @param user user + * @param unique 订单orderCart唯一值 + * @param comment 评论内容 + * @param pics 图片 + * @param productScore 评分 + * @param serviceScore 评分 + */ + @Override + public void orderComment(YxStoreOrderCartInfo orderCartInfo, YxUser user, String unique, String comment, String pics, String productScore, + String serviceScore) { + + if (ObjectUtil.isEmpty(orderCartInfo)) { + throw new YshopException("评价产品不存在"); + } + + Long count = productReplyService.count(Wrappers.lambdaQuery() + .eq(YxStoreProductReply::getOid, orderCartInfo.getOid()) + .eq(YxStoreProductReply::getProductId, orderCartInfo.getProductId())); + if (count > 0) { + throw new YshopException("该产品已评价"); + } + + + YxStoreProductReply storeProductReply = YxStoreProductReply.builder() + .uid(user.getUid()) + .oid(orderCartInfo.getOid()) + .productId(orderCartInfo.getProductId()) + .productScore(Integer.valueOf(productScore)) + .serviceScore(Integer.valueOf(serviceScore)) + .comment(comment) + .pics(pics) + .unique(unique) + .build(); + + productReplyService.save(storeProductReply); + //获取评价商品数量 + Long replyCount = productReplyService.count(new LambdaQueryWrapper().eq(YxStoreProductReply::getOid, orderCartInfo.getOid())); + //购买商品数量 + Long cartCount = storeOrderCartInfoService.count(new LambdaQueryWrapper().eq(YxStoreOrderCartInfo::getOid, orderCartInfo.getOid())); + if (replyCount == cartCount) { + YxStoreOrder storeOrder = new YxStoreOrder(); + storeOrder.setStatus(OrderInfoEnum.STATUS_3.getValue()); + storeOrder.setId(orderCartInfo.getOid()); + yxStoreOrderMapper.updateById(storeOrder); + + } + } + + /** + * 确认订单退款 + * + * @param orderId 单号 + * @param price 金额 + * @param type ShopCommonEnum + * @param salesId 售后id + */ + @Override + public void orderRefund(String orderId, BigDecimal price, Integer type, Long salesId) { + + YxStoreOrderQueryVo orderQueryVo = getOrderInfo(orderId, null); + if (ObjectUtil.isNull(orderQueryVo)) { + throw new YshopException("订单不存在"); + } + + YxUserQueryVo userQueryVo = userService.getYxUserById(orderQueryVo.getUid()); + if (ObjectUtil.isNull(userQueryVo)) { + throw new YshopException("用户不存在"); + } + + if (OrderInfoEnum.REFUND_STATUS_2.getValue().equals(orderQueryVo.getRefundStatus())) { + throw new YshopException("订单已经退款了哦!"); + } + + if (orderQueryVo.getPayPrice().compareTo(price) < 0) { + throw new YshopException("退款金额不正确"); + } + + YxStoreOrder storeOrder = new YxStoreOrder(); + //修改状态 + storeOrder.setId(orderQueryVo.getId()); + if (ShopCommonEnum.AGREE_2.getValue().equals(type)) { + storeOrder.setRefundStatus(OrderInfoEnum.REFUND_STATUS_0.getValue()); + yxStoreOrderMapper.updateById(storeOrder); + if (null != salesId) { + StoreAfterSales storeAfterSales = storeAfterSalesService.lambdaQuery() + .eq(StoreAfterSales::getUserId, orderQueryVo.getUid()) + .eq(StoreAfterSales::getOrderCode, orderQueryVo.getOrderId()) + .eq(StoreAfterSales::getId, salesId) + .one(); + if (ObjectUtil.isNotNull(storeAfterSales)) { + storeAfterSalesService.lambdaUpdate() + .eq(StoreAfterSales::getId, storeAfterSales.getId()) + .set(StoreAfterSales::getSalesState, ShopCommonEnum.AGREE_2.getValue()) + .update(); + } + } + return; + } + + //根据支付类型不同退款不同 + if (PayTypeEnum.YUE.getValue().equals(orderQueryVo.getPayType())) { + storeOrder.setRefundStatus(OrderInfoEnum.REFUND_STATUS_2.getValue()); + storeOrder.setRefundPrice(price); + yxStoreOrderMapper.updateById(storeOrder); + //退款到余额 + userService.incMoney(orderQueryVo.getUid(), price); + + //增加流水 + billService.income(orderQueryVo.getUid(), "商品退款", BillDetailEnum.CATEGORY_1.getValue(), + BillDetailEnum.TYPE_5.getValue(), + price.doubleValue(), + NumberUtil.add(price, userQueryVo.getNowMoney()).doubleValue(), + "订单退款到余额" + price + "元", orderQueryVo.getId().toString()); + this.returnStock(orderQueryVo.getOrderId()); + + if (null != salesId) { + StoreAfterSales storeAfterSales = storeAfterSalesService.lambdaQuery() + .eq(StoreAfterSales::getUserId, orderQueryVo.getUid()) + .eq(StoreAfterSales::getOrderCode, orderQueryVo.getOrderId()) + .eq(StoreAfterSales::getId, salesId) + .one(); + if (ObjectUtil.isNotNull(storeAfterSales)) { + storeAfterSalesService.lambdaUpdate() + .eq(StoreAfterSales::getId, storeAfterSales.getId()) + .set(StoreAfterSales::getState, AfterSalesStatusEnum.STATUS_3.getValue()) + .update(); + } + } + + } else if (PayTypeEnum.INTEGRAL.getValue().equals(orderQueryVo.getPayType())) { + storeOrder.setRefundStatus(OrderInfoEnum.REFUND_STATUS_2.getValue()); + storeOrder.setRefundPrice(price); + yxStoreOrderMapper.updateById(storeOrder); + + orderStatusService.create(orderQueryVo.getId(), OrderLogEnum.ORDER_EDIT.getValue(), "退款给用户:" + orderQueryVo.getPayIntegral() + "分"); + this.returnStock(orderQueryVo.getOrderId()); + } + + orderStatusService.create(orderQueryVo.getId(), OrderLogEnum.REFUND_ORDER_SUCCESS.getValue(), "退款给用户:" + price + "元"); + + TemplateBean templateBean = TemplateBean.builder() + .orderId(orderQueryVo.getOrderId()) + .price(orderQueryVo.getPayPrice().toString()) + .uid(orderQueryVo.getUid()) + .templateType(TemplateListenEnum.TYPE_2.getValue()) + .time(DateUtil.formatTime(new Date())) + .payType(orderQueryVo.getPayType()) + .build(); + publisher.publishEvent(new TemplateEvent(this, templateBean)); + + + } + + + /** + * 订单发货 + * + * @param orderId 单号 + * @param deliveryId 快递单号 + * @param deliveryName 快递公司code + * @param deliveryType 快递方式 + */ + @Override + public void orderDelivery(String orderId, String deliveryId, String deliveryName, String deliveryType) { + YxStoreOrderQueryVo orderQueryVo = this.getOrderInfo(orderId, null); + if (ObjectUtil.isNull(orderQueryVo)) { + throw new YshopException("订单不存在"); + } + + if (!OrderInfoEnum.STATUS_0.getValue().equals(orderQueryVo.getStatus()) || + OrderInfoEnum.PAY_STATUS_0.getValue().equals(orderQueryVo.getPaid())) { + throw new YshopException("订单状态错误"); + } + + if (!OrderInfoEnum.REFUND_STATUS_0.getValue().equals(orderQueryVo.getRefundStatus())) { + throw new YshopException("订单退款中或已退款"); + } + + YxExpress expressQueryVo = expressService.getOne(new LambdaQueryWrapper().eq(YxExpress::getName, deliveryName)); + if (ObjectUtil.isNull(expressQueryVo)) { + throw new YshopException("请后台先添加快递公司"); + } + + //判断拼团产品 + if (orderQueryVo.getPinkId() != null && orderQueryVo.getPinkId() > 0) { + YxStorePink pink = pinkService.getById(orderQueryVo.getPinkId()); + if (!OrderInfoEnum.PINK_STATUS_2.getValue().equals(pink.getStatus())) { + throw new YshopException("拼团未成功不能发货"); + } + } + + YxStoreOrder storeOrder = YxStoreOrder.builder() + .id(orderQueryVo.getId()) + .status(OrderInfoEnum.STATUS_1.getValue()) + .deliveryId(deliveryId) + .deliveryName(expressQueryVo.getName()) + .deliveryType(deliveryType) + .deliverySn(expressQueryVo.getCode()) + .build(); + + yxStoreOrderMapper.updateById(storeOrder); + + //增加状态 + orderStatusService.create(orderQueryVo.getId(), OrderLogEnum.DELIVERY_GOODS.getValue(), + "已发货 快递公司:" + expressQueryVo.getName() + "快递单号:" + deliveryId); + + //模板消息发布事件 + TemplateBean templateBean = TemplateBean.builder() + .orderId(orderQueryVo.getOrderId()) + .deliveryId(deliveryId) + .deliveryName(expressQueryVo.getName()) + .uid(orderQueryVo.getUid()) + .templateType(TemplateListenEnum.TYPE_3.getValue()) + .build(); + publisher.publishEvent(new TemplateEvent(this, templateBean)); + + + //加入redis,7天后自动确认收货 + String redisKey = String.valueOf(StrUtil.format("{}{}", + ShopConstants.REDIS_ORDER_OUTTIME_UNCONFIRM, orderQueryVo.getId())); + redisTemplate.opsForValue().set(redisKey, orderQueryVo.getOrderId(), + ShopConstants.ORDER_OUTTIME_UNCONFIRM, TimeUnit.DAYS); + + } + + /** + * 修改快递单号 + * + * @param orderId 单号 + * @param deliveryId 快递单号 + * @param deliveryName 快递公司code + * @param deliveryType 快递方式 + */ + @Override + public void updateDelivery(String orderId, String deliveryId, String deliveryName, String deliveryType) { + YxStoreOrderQueryVo orderQueryVo = this.getOrderInfo(orderId, null); + if (ObjectUtil.isNull(orderQueryVo)) { + throw new YshopException("订单不存在"); + } + + if (!OrderInfoEnum.STATUS_1.getValue().equals(orderQueryVo.getStatus()) || + OrderInfoEnum.PAY_STATUS_0.getValue().equals(orderQueryVo.getPaid())) { + throw new YshopException("订单状态错误"); + } + + YxExpress expressQueryVo = expressService.getOne(new LambdaQueryWrapper().eq(YxExpress::getName, deliveryName)); + if (ObjectUtil.isNull(expressQueryVo)) { + throw new YshopException("请后台先添加快递公司"); + } + + + YxStoreOrder storeOrder = YxStoreOrder.builder() + .id(orderQueryVo.getId()) + .deliveryId(deliveryId) + .deliveryName(expressQueryVo.getName()) + .deliveryType(deliveryType) + .deliverySn(expressQueryVo.getCode()) + .build(); + + yxStoreOrderMapper.updateById(storeOrder); + } + + + /** + * 修改订单价格 + * + * @param orderId 单号 + * @param price 价格 + */ + @Override + public void editOrderPrice(String orderId, String price) { + YxStoreOrderQueryVo orderQueryVo = getOrderInfo(orderId, null); + if (ObjectUtil.isNull(orderQueryVo)) { + throw new YshopException("订单不存在"); + } + + + if (orderQueryVo.getPayPrice().compareTo(new BigDecimal(price)) == 0) { + return; + } + + + if (OrderInfoEnum.PAY_STATUS_1.getValue().equals(orderQueryVo.getPaid())) { + throw new YshopException("订单状态错误"); + } + + + YxStoreOrder storeOrder = new YxStoreOrder(); + storeOrder.setId(orderQueryVo.getId()); + storeOrder.setPayPrice(new BigDecimal(price)); + + //判断金额是否有变动,生成一个额外订单号去支付 + if (orderQueryVo.getPayPrice().compareTo(new BigDecimal(price)) != 0) { + String orderSn = IdUtil.getSnowflake(0, 0).nextIdStr(); + storeOrder.setExtendOrderId(orderSn); + } + + yxStoreOrderMapper.updateById(storeOrder); + + //增加状态 + orderStatusService.create(storeOrder.getId(), OrderLogEnum.ORDER_EDIT.getValue(), "修改实际支付金额"); + + } + + /** + * 获取拼团订单 + * + * @param pid 拼团id + * @param uid 用户id + * @return YxStoreOrder + */ + @Override + public YxStoreOrder getOrderPink(Long pid, Long uid) { + return this.lambdaQuery().eq(YxStoreOrder::getUid, uid) + .eq(YxStoreOrder::getPinkId, pid) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .one(); + } + + + /** + * 未付款取消订单 + * + * @param orderId 订单号 + * @param uid 用户id + */ + @Override + public void cancelOrder(String orderId, Long uid) { + YxStoreOrderQueryVo order = this.getOrderInfo(orderId, uid); + if (ObjectUtil.isNull(order)) { + throw new YshopException("订单不存在"); + } + + this.regressionIntegral(order, 0); + + this.regressionStock(order, 0); + + this.regressionCoupon(order, 0); + + yxStoreOrderMapper.deleteById(order.getId()); + } + + + /** + * 删除订单 + * + * @param orderId 单号 + * @param uid uid + */ + @Override + public void removeOrder(String orderId, Long uid) { + YxStoreOrderQueryVo order = getOrderInfo(orderId, (long) uid); + if (order == null) { + throw new YshopException("订单不存在"); + } + order = handleOrder(order); + if (!OrderInfoEnum.STATUS_3.getValue().equals(order.getStatus())) { + throw new YshopException("该订单无法删除"); + } + + yxStoreOrderMapper.deleteById(order.getId()); + + //增加状态 + orderStatusService.create(order.getId(), + OrderLogEnum.REMOVE_ORDER.getValue(), + OrderLogEnum.REMOVE_ORDER.getDesc()); + } + + /** + * 订单确认收货 + * + * @param orderId 单号 + * @param uid uid + */ + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) + @Override + public void takeOrder(String orderId, Long uid) { + YxStoreOrderQueryVo order = this.getOrderInfo(orderId, uid); + if (ObjectUtil.isNull(order)) { + throw new YshopException("订单不存在"); + } + order = handleOrder(order); + if (!OrderStatusEnum.STATUS_2.getValue().toString().equals(order.get_status().get_type())) { + throw new BusinessException("订单状态错误"); + } + + YxStoreOrder storeOrder = new YxStoreOrder(); + storeOrder.setStatus(OrderInfoEnum.STATUS_2.getValue()); + storeOrder.setId(order.getId()); + yxStoreOrderMapper.updateById(storeOrder); + + //增加状态 + orderStatusService.create(order.getId(), OrderLogEnum.TAKE_ORDER_DELIVERY.getValue(), OrderLogEnum.TAKE_ORDER_DELIVERY.getDesc()); + + //奖励积分 + this.gainUserIntegral(order); + + //分销计算 + userService.backOrderBrokerage(order); + + //检查是否符合会员升级条件 + // userLevelService.setLevelComplete(uid); + } + + + /** + * 核销订单 + * + * @param verifyCode 核销码 + * @param isConfirm OrderInfoEnum + * @param uid uid + * @return YxStoreOrderQueryVo + */ + @Override + public YxStoreOrderQueryVo verifyOrder(String verifyCode, Integer isConfirm, Long uid) { + + YxStoreOrder order = this.getOne(Wrappers.lambdaQuery() + .eq(YxStoreOrder::getVerifyCode, verifyCode) + .eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue())); + if (order == null) { + throw new YshopException("核销的订单不存在或未支付或已退款"); + } + + if (uid != null) { + boolean checkStatus = systemStoreStaffService.checkStatus(uid, order.getStoreId()); + if (!checkStatus) { + throw new YshopException("您没有当前店铺核销权限"); + } + } + + if (!OrderInfoEnum.STATUS_0.getValue().equals(order.getStatus())) { + throw new YshopException("订单已经核销"); + } + + if (order.getCombinationId() != null && order.getCombinationId() > 0 + && order.getPinkId() != null && order.getPinkId() > 0) { + YxStorePink storePink = storePinkService.getById(order.getPinkId()); + if (!OrderInfoEnum.PINK_STATUS_2.getValue().equals(storePink.getStatus())) { + throw new YshopException("拼团订单暂未成功无法核销"); + } + } + + YxStoreOrderQueryVo orderQueryVo = generator.convert(order, YxStoreOrderQueryVo.class); + if (OrderInfoEnum.CONFIRM_STATUS_0.getValue().equals(isConfirm)) { + return orderQueryVo; + } + + + YxStoreOrder storeOrder = new YxStoreOrder(); + storeOrder.setStatus(OrderInfoEnum.STATUS_2.getValue()); + storeOrder.setId(order.getId()); + yxStoreOrderMapper.updateById(storeOrder); + + //增加状态 + orderStatusService.create(order.getId(), OrderLogEnum.TAKE_ORDER_DELIVERY.getValue(), "已核销"); + + //奖励积分 + this.gainUserIntegral(orderQueryVo); + + //分销计算 + userService.backOrderBrokerage(orderQueryVo); + + //检查是否符合会员升级条件 + userLevelService.setLevelComplete(order.getUid()); + + return null; + } + + /** + * 申请退款 + * + * @param explain 退款备注 + * @param Img 图片 + * @param text 理由 + * @param orderId 订单号 + * @param uid uid + */ + @Override + public void orderApplyRefund(String explain, String Img, String text, String orderId, Long uid) { + YxStoreOrderQueryVo order = getOrderInfo(orderId, uid); + if (order == null) { + throw new YshopException("订单不存在"); + } + + if (OrderInfoEnum.REFUND_STATUS_2.getValue().equals(order.getRefundStatus())) { + throw new YshopException("订单已退款"); + } + if (OrderInfoEnum.REFUND_STATUS_1.getValue().equals(order.getRefundStatus())) { + throw new YshopException("正在申请退款中"); + } + if (OrderInfoEnum.STATUS_1.getValue().equals(order.getStatus())) { + throw new YshopException("订单当前无法退款"); + } + + + YxStoreOrder storeOrder = new YxStoreOrder(); + storeOrder.setRefundStatus(OrderInfoEnum.REFUND_STATUS_1.getValue()); + storeOrder.setRefundReasonTime(new Date()); + storeOrder.setRefundReasonWapExplain(explain); + storeOrder.setRefundReasonWapImg(Img); + storeOrder.setRefundReasonWap(text); + storeOrder.setId(order.getId()); + yxStoreOrderMapper.updateById(storeOrder); + + //增加状态 + orderStatusService.create(order.getId(), + OrderLogEnum.REFUND_ORDER_APPLY.getValue(), + "用户申请退款,原因:" + text); + + //模板消息发布事件 + TemplateBean templateBean = TemplateBean.builder() + .orderId(order.getOrderId()) + .price(order.getPayPrice().toString()) + .uid(order.getUid()) + .templateType(TemplateListenEnum.TYPE_9.getValue()) + .time(DateUtil.formatTime(new Date())) + .build(); + publisher.publishEvent(new TemplateEvent(this, templateBean)); + + } + + /** + * 订单列表 + * + * @param uid 用户id + * @param type OrderStatusEnum + * @param page page + * @param limit limit + * @return list + */ + @Override + public Map orderList(Long uid, int type, int page, int limit) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + if (uid != null) { + wrapper.eq(YxStoreOrder::getUid, uid); + } + wrapper.orderByDesc(YxStoreOrder::getId); + + switch (OrderStatusEnum.toType(type)) { + case STATUS__1: + break; + //未支付 + case STATUS_0: + wrapper.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_0.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_0.getValue()); + break; + //待发货 + case STATUS_1: + wrapper.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_0.getValue()); + break; + //待收货 + case STATUS_2: + wrapper.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_1.getValue()); + break; + //待评价 + case STATUS_3: + wrapper.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_2.getValue()); + break; + //已完成 + case STATUS_4: + wrapper.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_3.getValue()); + break; + //退款中 + case STATUS_MINUS_1: + wrapper.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_1.getValue()); + break; + //已退款 + case STATUS_MINUS_2: + wrapper.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_0.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_2.getValue()); + break; + //退款 + case STATUS_MINUS_3: + String[] strs = {"1", "2"}; + wrapper.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .in(YxStoreOrder::getRefundStatus, Arrays.asList(strs)); + break; + default: + } + + Page pageModel = new Page<>(page, limit); + IPage pageList = yxStoreOrderMapper.selectPage(pageModel, wrapper); + List list = generator.convert(pageList.getRecords(), YxStoreOrderQueryVo.class); + Map map = new HashMap<>(); + map.put("list", list.stream() + .map(this::handleOrder) + .collect(Collectors.toList())); + map.put("total", pageList.getTotal()); + map.put("totalPage", pageList.getPages()); + return map; + + } + + /** + * chart图标统计 + * + * @param cate + * @param type + * @return + */ + // @Override + @Deprecated + /** + public Map chartCount(int cate,int type) { + 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())); + double price = 0d; + List list = null; + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq("paid",1).eq("refund_status",0).eq("is_del",0); + + switch (OrderCountEnum.toType(cate)){ + case TODAY: //今天 + wrapper.ge("pay_time",today); + break; + case YESTERDAY: //昨天 + wrapper.lt("pay_time",today).ge("pay_time",yesterday); + break; + case WEEK: //上周 + wrapper.ge("pay_time",lastWeek); + break; + case MONTH: //本月 + wrapper.ge("pay_time",nowMonth); + break; + } + if(type == 1){ + list = yxStoreOrderMapper.chartList(wrapper); + price = yxStoreOrderMapper.todayPrice(wrapper); + }else{ + list = yxStoreOrderMapper.chartListT(wrapper); + price = yxStoreOrderMapper.selectCount(wrapper).doubleValue(); + } + + Map map = new LinkedHashMap<>(); + map.put("chart",list); + map.put("time",price); + return map; + } + **/ + + /** + * 获取 今日 昨日 本月 订单金额 + * @return ShoperOrderTimeDataVo + */ + @Override + public ShoperOrderTimeDataVo getShoperOrderTimeData() { + + Date today = DateUtil.beginOfDay(new Date()); + Date yesterday = DateUtil.beginOfDay(DateUtil.yesterday()); + Date nowMonth = DateUtil.beginOfMonth(new Date()); + Date lastWeek = DateUtil.beginOfDay(DateUtil.lastWeek()); + + ShoperOrderTimeDataVo orderTimeDataVo = new ShoperOrderTimeDataVo(); + + //今日成交额 + LambdaQueryWrapper wrapperOne = new LambdaQueryWrapper<>(); + wrapperOne + .ge(YxStoreOrder::getPayTime, today) + .eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()); + orderTimeDataVo.setTodayPrice(yxStoreOrderMapper.todayPrice(wrapperOne)); + //今日订单数 + orderTimeDataVo.setTodayCount(yxStoreOrderMapper.selectCount(wrapperOne)); + + //昨日成交额 + LambdaQueryWrapper wrapperTwo = new LambdaQueryWrapper<>(); + wrapperTwo + .lt(YxStoreOrder::getPayTime, today) + .ge(YxStoreOrder::getPayTime, yesterday) + .eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()); + orderTimeDataVo.setProPrice(yxStoreOrderMapper.todayPrice(wrapperTwo)); + //昨日订单数 + orderTimeDataVo.setProCount(yxStoreOrderMapper.selectCount(wrapperTwo)); + + //本月成交额 + LambdaQueryWrapper wrapperThree = new LambdaQueryWrapper<>(); + wrapperThree + .ge(YxStoreOrder::getPayTime, nowMonth) + .eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()); + orderTimeDataVo.setMonthPrice(yxStoreOrderMapper.todayPrice(wrapperThree)); + //本月订单数 + orderTimeDataVo.setMonthCount(yxStoreOrderMapper.selectCount(wrapperThree)); + + //上周成交额 + LambdaQueryWrapper wrapperLastWeek = new LambdaQueryWrapper<>(); + wrapperLastWeek + .lt(YxStoreOrder::getPayTime, today) + .ge(YxStoreOrder::getPayTime, lastWeek) + .eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()); + orderTimeDataVo.setLastWeekPrice(yxStoreOrderMapper.todayPrice(wrapperLastWeek)); + //上周订单数 + orderTimeDataVo.setLastWeekCount(yxStoreOrderMapper.selectCount(wrapperLastWeek)); + + + return orderTimeDataVo; + } + + /** + * 订单每月统计数据 + * + * @param page page + * @param limit list + * @return List + */ + @Override + public List getOrderDataPriceCount(int page, int limit) { + Page pageModel = new Page<>(page, limit); + return yxStoreOrderMapper.getOrderDataPriceList(pageModel); + } + + /** + * 获取某个用户的订单统计数据 + * + * @param uid uid>0 取用户 否则取所有 + * @return UserOrderCountVo + */ + @Override + public UserOrderCountVo orderData(Long uid) { + + //订单支付没有退款 数量 + LambdaQueryWrapper wrapperOne = new LambdaQueryWrapper<>(); + if (uid != null) { + wrapperOne.eq(YxStoreOrder::getUid, uid); + } + wrapperOne.eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()); + Long orderCount = yxStoreOrderMapper.selectCount(wrapperOne); + + //订单支付没有退款 支付总金额 + double sumPrice = yxStoreOrderMapper.sumPrice(uid); + + //订单待支付 数量 + LambdaQueryWrapper wrapperTwo = new LambdaQueryWrapper<>(); + if (uid != null) { + wrapperTwo.eq(YxStoreOrder::getUid, uid); + } + wrapperTwo.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_0.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_0.getValue()); + Long unpaidCount = yxStoreOrderMapper.selectCount(wrapperTwo); + + //订单待发货 数量 + LambdaQueryWrapper wrapperThree = new LambdaQueryWrapper<>(); + if (uid != null) { + wrapperThree.eq(YxStoreOrder::getUid, uid); + } + wrapperThree.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_0.getValue()); + Long unshippedCount = yxStoreOrderMapper.selectCount(wrapperThree); + + //订单待收货 数量 + LambdaQueryWrapper wrapperFour = new LambdaQueryWrapper<>(); + if (uid != null) { + wrapperFour.eq(YxStoreOrder::getUid, uid); + } + wrapperFour.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_1.getValue()); + Long receivedCount = yxStoreOrderMapper.selectCount(wrapperFour); + + //订单待评价 数量 + LambdaQueryWrapper wrapperFive = new LambdaQueryWrapper<>(); + if (uid != null) { + wrapperFive.eq(YxStoreOrder::getUid, uid); + } + wrapperFive.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_2.getValue()); + Long evaluatedCount = yxStoreOrderMapper.selectCount(wrapperFive); + + //订单已完成 数量 + LambdaQueryWrapper wrapperSix = new LambdaQueryWrapper<>(); + if (uid != null) { + wrapperSix.eq(YxStoreOrder::getUid, uid); + } + wrapperSix.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getRefundStatus, OrderInfoEnum.REFUND_STATUS_0.getValue()) + .eq(YxStoreOrder::getStatus, OrderInfoEnum.STATUS_3.getValue()); + Long completeCount = yxStoreOrderMapper.selectCount(wrapperSix); + + //订单退款 + LambdaQueryWrapper wrapperSeven = new LambdaQueryWrapper<>(); + if (uid != null) { + wrapperSeven.eq(YxStoreOrder::getUid, uid); + } + String[] strArr = {"1", "2"}; + wrapperSeven.eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_1.getValue()) + .in(YxStoreOrder::getRefundStatus, Arrays.asList(strArr)); + Long refundCount = yxStoreOrderMapper.selectCount(wrapperSeven); + //售后退款 + Long salesCount = storeAfterSalesService.lambdaQuery() + .eq(Objects.nonNull(uid),StoreAfterSales::getUserId, uid) + .count(); + + return UserOrderCountVo.builder() + .orderCount(orderCount) + .sumPrice(sumPrice) + .unpaidCount(unpaidCount) + .unshippedCount(unshippedCount) + .receivedCount(receivedCount) + .evaluatedCount(evaluatedCount) + .completeCount(completeCount) + .refundCount(salesCount) + .build(); + } + + /** + * 处理订单返回的状态 + * + * @param order order + * @return YxStoreOrderQueryVo + */ + @Override + public YxStoreOrderQueryVo handleOrder(YxStoreOrderQueryVo order) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreOrderCartInfo::getOid, order.getId()); + List cartInfos = orderCartInfoService.list(wrapper); + + List cartInfo = cartInfos.stream() + .map(cart -> { + YxStoreCartQueryVo cartQueryVo = JSON.parseObject(cart.getCartInfo(), YxStoreCartQueryVo.class); + cartQueryVo.setUnique(cart.getUnique()); + cartQueryVo.setIsReply(productReplyService.replyCount(cart.getUnique())); + return cartQueryVo; + }) + .collect(Collectors.toList()); + order.setCartInfo(cartInfo); + + StatusDto statusDTO = new StatusDto(); + if (OrderStatusEnum.STATUS_0.getValue().equals(order.getPaid())) { + //计算未支付到自动取消订 时间 + int offset = Integer.valueOf(String.valueOf(ShopConstants.ORDER_OUTTIME_UNPAY)); + Date time = DateUtil.offsetMinute(order.getCreateTime(), offset); + statusDTO.set_class("nobuy"); + statusDTO.set_msg(StrUtil.format("请在{}前完成支付", DateUtil.formatDateTime(time))); + statusDTO.set_type("0"); + statusDTO.set_title("未支付"); + } else if (OrderInfoEnum.REFUND_STATUS_1.getValue().equals(order.getRefundStatus())) { + statusDTO.set_class("state-sqtk"); + statusDTO.set_msg("商家审核中,请耐心等待"); + statusDTO.set_type("-1"); + statusDTO.set_title("申请退款中"); + } else if (OrderInfoEnum.REFUND_STATUS_2.getValue().equals(order.getRefundStatus())) { + statusDTO.set_class("state-sqtk"); + statusDTO.set_msg("已为您退款,感谢您的支持"); + statusDTO.set_type("-2"); + statusDTO.set_title("已退款"); + } else if (OrderInfoEnum.STATUS_0.getValue().equals(order.getStatus())) { + // 拼团 + if (order.getPinkId() > 0) { + if (pinkService.pinkIngCount(order.getPinkId()) > 0) { + statusDTO.set_class("state-nfh"); + statusDTO.set_msg("待其他人参加拼团"); + statusDTO.set_type("1"); + statusDTO.set_title("拼团中"); + } else { + statusDTO.set_class("state-nfh"); + statusDTO.set_msg("商家未发货,请耐心等待"); + statusDTO.set_type("1"); + statusDTO.set_title("未发货"); + } + } else { + if (OrderInfoEnum.SHIPPIING_TYPE_1.getValue().equals(order.getShippingType())) { + statusDTO.set_class("state-nfh"); + statusDTO.set_msg("商家未发货,请耐心等待"); + statusDTO.set_type("1"); + statusDTO.set_title("未发货"); + } else { + statusDTO.set_class("state-nfh"); + statusDTO.set_msg("待核销,请到核销点进行核销"); + statusDTO.set_type("1"); + statusDTO.set_title("待核销"); + } + } + + } else if (OrderInfoEnum.STATUS_1.getValue().equals(order.getStatus())) { + statusDTO.set_class("state-ysh"); + statusDTO.set_msg("服务商已发货"); + statusDTO.set_type("2"); + statusDTO.set_title("待收货"); + } else if (OrderInfoEnum.STATUS_2.getValue().equals(order.getStatus())) { + statusDTO.set_class("state-ypj"); + statusDTO.set_msg("已收货,快去评价一下吧"); + statusDTO.set_type("3"); + statusDTO.set_title("待评价"); + } else if (OrderInfoEnum.STATUS_3.getValue().equals(order.getStatus())) { + statusDTO.set_class("state-ytk"); + statusDTO.set_msg("交易完成,感谢您的支持"); + statusDTO.set_type("4"); + statusDTO.set_title("交易完成"); + } + + if (PayTypeEnum.WEIXIN.getValue().equals(order.getPayType())) { + statusDTO.set_payType("微信支付"); + } else if (PayTypeEnum.YUE.getValue().equals(order.getPayType())) { + statusDTO.set_payType("余额支付"); + } else { + statusDTO.set_payType("积分支付"); + } + + order.set_status(statusDTO); + + + return order; + } + + /** + * 支付成功后操作 + * + * @param orderId 订单号 + * @param payType 支付方式 + */ + @Override + public void paySuccess(String orderId, String payType) { + YxStoreOrderQueryVo orderInfo = getOrderInfo(orderId, null); + + //更新订单状态 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreOrder::getOrderId, orderId); + YxStoreOrder storeOrder = new YxStoreOrder(); + storeOrder.setPaid(OrderInfoEnum.PAY_STATUS_1.getValue()); + storeOrder.setPayType(payType); + storeOrder.setPayTime(new Date()); + yxStoreOrderMapper.update(storeOrder, wrapper); + + //增加用户购买次数 + userService.incPayCount(orderInfo.getUid()); + //增加状态 + orderStatusService.create(orderInfo.getId(), OrderLogEnum.PAY_ORDER_SUCCESS.getValue(), + OrderLogEnum.PAY_ORDER_SUCCESS.getDesc()); + //拼团 + if (orderInfo.getCombinationId() > 0) { + pinkService.createPink(orderInfo); + } + + //砍价 + if (orderInfo.getBargainId() > 0) { + storeBargainUserService.setBargainUserStatus(orderInfo.getBargainId(), orderInfo.getUid()); + } + + YxUser userInfo = userService.getById(orderInfo.getUid()); + //增加流水 + String payTypeMsg = PayTypeEnum.WEIXIN.getDesc(); + if (PayTypeEnum.YUE.getValue().equals(payType)) { + payTypeMsg = PayTypeEnum.YUE.getDesc(); + } + billService.expend(userInfo.getUid(), "购买商品", + BillDetailEnum.CATEGORY_1.getValue(), + BillDetailEnum.TYPE_3.getValue(), + orderInfo.getPayPrice().doubleValue(), userInfo.getNowMoney().doubleValue(), + payTypeMsg + orderInfo.getPayPrice() + "元购买商品"); + + + //模板消息支付成功发布事件 + TemplateBean templateBean = TemplateBean.builder() + .orderId(orderInfo.getOrderId()) + .price(orderInfo.getPayPrice().toString()) + .uid(orderInfo.getUid()) + .templateType(TemplateListenEnum.TYPE_1.getValue()) + .build(); + publisher.publishEvent(new TemplateEvent(this, templateBean)); + + } + + + /** + * 支付宝支付 + * + * @param orderId,支付宝支付 本系统已经集成,请自行根据下面找到代码整合下即可 + * @return + */ + @Override + public String aliPay(String orderId) throws Exception { + AlipayConfig alipay = alipayService.find(); + if (ObjectUtil.isNull(alipay)) { + throw new YshopException("请先配置支付宝"); + } + YxStoreOrderQueryVo orderInfo = getOrderInfo(orderId, null); + if (ObjectUtil.isNull(orderInfo)) { + throw new YshopException("订单不存在"); + } + if (OrderInfoEnum.PAY_STATUS_1.getValue().equals(orderInfo.getPaid())) { + throw new YshopException("该订单已支付"); + } + + if (orderInfo.getPayPrice().compareTo(BigDecimal.ZERO) <= 0) { + throw new YshopException("该支付无需支付"); + } + TradeVo trade = new TradeVo(); + trade.setOutTradeNo(orderId); + String payUrl = alipayService.toPayAsWeb(alipay, trade); + return payUrl; + } + + + /** + * 余额支付 + * + * @param orderId 订单号 + * @param uid 用户id + */ + @Override + public void yuePay(String orderId, Long uid) { + YxStoreOrderQueryVo orderInfo = getOrderInfo(orderId, uid); + if (ObjectUtil.isNull(orderInfo)) { + throw new YshopException("订单不存在"); + } + + if (OrderInfoEnum.PAY_STATUS_1.getValue().equals(orderInfo.getPaid())) { + throw new YshopException("该订单已支付"); + } + + YxUserQueryVo userInfo = userService.getYxUserById(uid); + + if (userInfo.getNowMoney().compareTo(orderInfo.getPayPrice()) < 0) { + throw new YshopException("余额不足"); + } + + userService.decPrice(uid, orderInfo.getPayPrice()); + + //支付成功后处理 + this.paySuccess(orderInfo.getOrderId(), PayTypeEnum.YUE.getValue()); + } + + + /** + * 积分兑换 + * + * @param orderId 订单号 + * @param uid 用户id + */ + @Override + public void integralPay(String orderId, Long uid) { + YxStoreOrderQueryVo orderInfo = getOrderInfo(orderId, uid); + if (ObjectUtil.isNull(orderInfo)) { + throw new YshopException("订单不存在"); + } + + if (OrderInfoEnum.PAY_STATUS_1.getValue().equals(orderInfo.getPaid())) { + throw new YshopException("该订单已支付"); + } + orderInfo = handleOrder(orderInfo); + orderInfo.getCartInfo().forEach(cart -> { + if (cart.getProductInfo().getIsIntegral() == 0) { + throw new YshopException("该商品不为积分商品"); + } + }); + YxUser userInfo = userService.getById(uid); + + if (userInfo.getIntegral().compareTo(orderInfo.getPayIntegral()) < 0) { + throw new YshopException("积分不足"); + } + + //扣除积分 + //userService.decIntegral(uid,orderInfo.getPayIntegral().doubleValue()); + BigDecimal newIntegral = NumberUtil.sub(userInfo.getIntegral(), orderInfo.getPayIntegral()); + userInfo.setIntegral(newIntegral); + userService.updateById(userInfo); + //增加流水 + billService.expend(userInfo.getUid(), "兑换商品", BillDetailEnum.CATEGORY_2.getValue(), + BillDetailEnum.TYPE_8.getValue(), + orderInfo.getPayIntegral().doubleValue(), + newIntegral.doubleValue(), + "兑换商品扣除" + orderInfo.getPayIntegral().doubleValue() + "积分"); + //支付成功后处理 + this.paySuccess(orderInfo.getOrderId(), PayTypeEnum.INTEGRAL.getValue()); + } + + + /** + * 订单信息 + * + * @param unique 唯一值或者单号 + * @param uid 用户id + * @return YxStoreOrderQueryVo + */ + @Override + public YxStoreOrderQueryVo getOrderInfo(String unique, Long uid) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.and( + i -> i.eq(YxStoreOrder::getOrderId, unique).or().eq(YxStoreOrder::getUnique, unique).or() + .eq(YxStoreOrder::getExtendOrderId, unique)); + if (uid != null) { + wrapper.eq(YxStoreOrder::getUid, uid); + } + + return generator.convert(yxStoreOrderMapper.selectOne(wrapper), YxStoreOrderQueryVo.class); + } + + + /** + * 奖励积分 + * + * @param order 订单 + */ + private void gainUserIntegral(YxStoreOrderQueryVo order) { + if (order.getGainIntegral().compareTo(BigDecimal.ZERO) > 0) { + YxUser user = userService.getById(order.getUid()); + + BigDecimal newIntegral = NumberUtil.add(user.getIntegral(), order.getGainIntegral()); + user.setIntegral(newIntegral); + user.setUid(order.getUid()); + userService.updateById(user); + + //增加流水 + billService.income(user.getUid(), "购买商品赠送积分", BillDetailEnum.CATEGORY_2.getValue(), + BillDetailEnum.TYPE_9.getValue(), + order.getGainIntegral().doubleValue(), + newIntegral.doubleValue(), + "购买商品赠送" + order.getGainIntegral() + "积分", order.getId().toString()); + } + } + + /** + * 减库存增加销量 + * + * @param cartInfo 购物车 + */ + public void deStockIncSale(List cartInfo) { + for (YxStoreCartQueryVo storeCartVO : cartInfo) { + Long combinationId = storeCartVO.getCombinationId(); + Long seckillId = storeCartVO.getSeckillId(); + Long bargainId = storeCartVO.getBargainId(); + if (combinationId != null && combinationId > 0) { + productService.decProductStock(storeCartVO.getCartNum(), storeCartVO.getProductId(), + storeCartVO.getProductAttrUnique(), combinationId, ProductTypeEnum.COMBINATION.getValue()); + } else if (seckillId != null && seckillId > 0) { + productService.decProductStock(storeCartVO.getCartNum(), storeCartVO.getProductId(), + storeCartVO.getProductAttrUnique(), seckillId, ProductTypeEnum.SECKILL.getValue()); + } else if (bargainId != null && bargainId > 0) { + storeBargainService.decStockIncSales(storeCartVO.getCartNum(), bargainId); + } else { + productService.decProductStock(storeCartVO.getCartNum(), storeCartVO.getProductId(), + storeCartVO.getProductAttrUnique(), 0L, ""); + } + } + } + + + /** + * 积分抵扣 + * + * @param userInfo 用户信息 + * @param usedIntegral 使用得积分 + * @param deductionPrice 抵扣的金额 + */ + private void decIntegral(YxUser userInfo, double usedIntegral, double deductionPrice) { + userService.decIntegral(userInfo.getUid(), usedIntegral); + billService.expend(userInfo.getUid(), "积分抵扣", BillDetailEnum.CATEGORY_2.getValue(), + BillDetailEnum.TYPE_8.getValue(), usedIntegral, userInfo.getIntegral().doubleValue(), + "购买商品使用" + usedIntegral + "积分抵扣" + deductionPrice + "元"); + } + + /** + * 计算奖励的积分 + * + * @param cartInfo cartInfo + * @return double + */ + private BigDecimal getGainIntegral(List cartInfo) { + BigDecimal gainIntegral = BigDecimal.ZERO; + for (YxStoreCartQueryVo cart : cartInfo) { + if (cart.getCombinationId() > 0 || cart.getSeckillId() > 0 || cart.getBargainId() > 0) { + continue; + } + BigDecimal cartInfoGainIntegral = BigDecimal.ZERO; + Double gain = cart.getProductInfo().getGiveIntegral().doubleValue(); + if (gain > 0) { + cartInfoGainIntegral = NumberUtil.round(NumberUtil.mul(cart.getCartNum(), gain), 2); + } + gainIntegral = NumberUtil.add(gainIntegral, cartInfoGainIntegral); + } + return gainIntegral; + } + + + /** + * 退回优惠券 + * + * @param order 订单 + */ + private void regressionCoupon(YxStoreOrderQueryVo order, Integer type) { + if (type == 0) { + if (OrderInfoEnum.PAY_STATUS_1.getValue().equals(order.getPaid()) + || OrderStatusEnum.STATUS_MINUS_2.getValue().equals(order.getStatus())) { + return; + } + } else { + if (!(OrderInfoEnum.PAY_STATUS_1.getValue().equals(order.getPaid()) + && OrderInfoEnum.REFUND_STATUS_2.getValue().equals(order.getRefundStatus()))) { + return; + } + } + + if (order.getCouponId() != null && order.getCouponId() > 0) { + YxStoreCouponUser couponUser = couponUserService + .getOne(Wrappers.lambdaQuery() + .eq(YxStoreCouponUser::getId, order.getCouponId()) + .eq(YxStoreCouponUser::getStatus, CouponEnum.STATUS_1.getValue()) + .eq(YxStoreCouponUser::getUid, order.getUid())); + + if (ObjectUtil.isNotNull(couponUser)) { + YxStoreCouponUser storeCouponUser = new YxStoreCouponUser(); + storeCouponUser.setStatus(CouponEnum.STATUS_0.getValue()); + storeCouponUser.setUseTime(null); + couponUserService.update(storeCouponUser, Wrappers.lambdaQuery() + .eq(YxStoreCouponUser::getId, order.getCouponId()) + .eq(YxStoreCouponUser::getUid, order.getUid())); + } + } + + } + + /** + * 退回库存 + * + * @param order 订单 + */ + private void regressionStock(YxStoreOrderQueryVo order, Integer type) { + if (type == 0) { + if (OrderInfoEnum.PAY_STATUS_1.getValue().equals(order.getPaid()) + || OrderStatusEnum.STATUS_MINUS_2.getValue().equals(order.getStatus())) { + return; + } + } else { + if (!(OrderInfoEnum.PAY_STATUS_1.getValue().equals(order.getPaid()) + && OrderInfoEnum.REFUND_STATUS_2.getValue().equals(order.getRefundStatus()))) { + return; + } + } + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.in(YxStoreOrderCartInfo::getCartId, Arrays.asList(order.getCartId().split(","))); + + List cartInfoList = orderCartInfoService.list(wrapper); + for (YxStoreOrderCartInfo cartInfo : cartInfoList) { + YxStoreCartQueryVo cart = JSONObject.parseObject(cartInfo.getCartInfo() + , YxStoreCartQueryVo.class); + if (order.getCombinationId() != null && order.getCombinationId() > 0) {//拼团 + productService.incProductStock(cart.getCartNum(), cart.getProductId(), cart.getProductAttrUnique(), order.getCombinationId(), ProductTypeEnum.COMBINATION.getValue()); + } else if (order.getSeckillId() != null && order.getSeckillId() > 0) {//秒杀 + productService.incProductStock(cart.getCartNum(), cart.getProductId(), cart.getProductAttrUnique(), order.getSeckillId(), ProductTypeEnum.SECKILL.getValue()); + } else if (order.getBargainId() != null && order.getBargainId() > 0) {//砍价 + storeBargainService.incStockDecSales(cart.getCartNum(), order.getBargainId()); + } else { + productService.incProductStock(cart.getCartNum(), cart.getProductId() + , cart.getProductAttrUnique(), 0L, null); + } + + } + } + + /** + * 退回积分 + * + * @param order 订单 + */ + private void regressionIntegral(YxStoreOrderQueryVo order, Integer type) { + if (type == 0) { + if (OrderInfoEnum.PAY_STATUS_1.getValue().equals(order.getPaid()) + || OrderStatusEnum.STATUS_MINUS_2.getValue().equals(order.getStatus())) { + return; + } + } else { + if (!(OrderInfoEnum.PAY_STATUS_1.getValue().equals(order.getPaid()) + && OrderInfoEnum.REFUND_STATUS_2.getValue().equals(order.getRefundStatus()))) { + return; + } + } + + if (order.getPayIntegral().compareTo(BigDecimal.ZERO) > 0) { + order.setUseIntegral(order.getPayIntegral()); + } + if (order.getUseIntegral().compareTo(BigDecimal.ZERO) <= 0) { + return; + } + + if (!OrderStatusEnum.STATUS_MINUS_2.getValue().equals(order.getStatus()) + && !OrderInfoEnum.REFUND_STATUS_2.getValue().equals(order.getRefundStatus()) + && order.getBackIntegral().compareTo(BigDecimal.ZERO) > 0) { + return; + } + + YxUser yxUser = userService.getById(order.getUid()); + + //增加积分 + BigDecimal newIntegral = NumberUtil.add(order.getUseIntegral(), yxUser.getIntegral()); + yxUser.setIntegral(newIntegral); + userService.updateById(yxUser); + + //增加流水 + billService.income(yxUser.getUid(), "积分回退", BillDetailEnum.CATEGORY_2.getValue(), + BillDetailEnum.TYPE_8.getValue(), + order.getUseIntegral().doubleValue(), + newIntegral.doubleValue(), + "购买商品失败,回退积分" + order.getUseIntegral(), order.getId().toString()); + + //更新回退积分 + YxStoreOrder storeOrder = new YxStoreOrder(); + storeOrder.setBackIntegral(order.getUseIntegral()); + storeOrder.setId(order.getId()); + yxStoreOrderMapper.updateById(storeOrder); + } + + /** + * 获取订单缓存 + * + * @param uid uid + * @param key key + * @return CacheDto + */ + private CacheDto getCacheOrderInfo(Long uid, String key) { + Object obj = redisUtils.get(ShopConstants.YSHOP_ORDER_CACHE_KEY + uid + key); + if (obj == null) { + return null; + } + return JSON.parseObject(obj.toString(), CacheDto.class); + } + + + /** + * 删除订单缓存 + * + * @param uid uid + * @param key key + */ + private void delCacheOrderInfo(Long uid, String key) { + redisUtils.del(ShopConstants.YSHOP_ORDER_CACHE_KEY + uid + key); + } + + /** + * 缓存订单 + * + * @param uid uid + * @param cartInfo cartInfo + * @param priceGroup priceGroup + * @param other other + * @return string + */ + private String cacheOrderInfo(Long uid, List cartInfo, PriceGroupDto priceGroup, OtherDto other) { + String key = IdUtil.simpleUUID(); + CacheDto cacheDTO = new CacheDto(); + cacheDTO.setCartInfo(cartInfo); + cacheDTO.setPriceGroup(priceGroup); + cacheDTO.setOther(other); + redisUtils.set(ShopConstants.YSHOP_ORDER_CACHE_KEY + uid + key, + JSON.toJSONString(cacheDTO), + ShopConstants.YSHOP_ORDER_CACHE_TIME); + return key; + } + + /** + * 获取订单价格 + * + * @param cartInfo 购物车列表 + * @return PriceGroupDto + */ + private PriceGroupDto getOrderPriceGroup(List cartInfo, YxUserAddress userAddress) { + + BigDecimal storePostage = BigDecimal.ZERO; + + + String storeFreePostageStr = systemConfigService.getData(SystemConfigConstants.STORE_FREE_POSTAGE);//满额包邮 + BigDecimal storeFreePostage = BigDecimal.ZERO; + if (NumberUtil.isNumber(storeFreePostageStr) && StrUtil.isNotBlank(storeFreePostageStr)) { + storeFreePostage = new BigDecimal(storeFreePostageStr); + } + + + BigDecimal totalPrice = this.getOrderSumPrice(cartInfo, "truePrice");//获取订单总金额 + BigDecimal costPrice = this.getOrderSumPrice(cartInfo, "costPrice");//获取订单成本价 + BigDecimal vipPrice = this.getOrderSumPrice(cartInfo, "vipTruePrice");//获取订单会员优惠金额 + BigDecimal payIntegral = this.getOrderSumPrice(cartInfo, "payIntegral");//获取订单需要的积分 + + //如果设置满包邮0 表示全局包邮,如果设置大于0表示满这价格包邮,否则走运费模板算法 + if (storeFreePostage.compareTo(BigDecimal.ZERO) != 0 && totalPrice.compareTo(storeFreePostage) <= 0) { + storePostage = this.handlePostage(cartInfo, userAddress); + } + if (cartInfo.size() == 1 && cartInfo.get(0).getProductInfo().getIsIntegral() != null + && cartInfo.get(0).getProductInfo().getIsIntegral() == 1) { + totalPrice = BigDecimal.ZERO; + } + + PriceGroupDto priceGroupDTO = new PriceGroupDto(); + priceGroupDTO.setStorePostage(storePostage); + priceGroupDTO.setStoreFreePostage(storeFreePostage); + priceGroupDTO.setTotalPrice(totalPrice); + priceGroupDTO.setCostPrice(costPrice); + priceGroupDTO.setVipPrice(vipPrice); + priceGroupDTO.setPayIntegral(payIntegral); + return priceGroupDTO; + } + + + /** + * 根据运费模板算法返回邮费 + * + * @param cartInfo 购物车 + * @param userAddress 地址 + * @return double + */ + private BigDecimal handlePostage(List cartInfo, YxUserAddress userAddress) { + BigDecimal storePostage = BigDecimal.ZERO; + if (userAddress != null) { + if (userAddress.getCityId() == null) { + return storePostage; + } + //城市包括默认 + int cityId = userAddress.getCityId(); + List citys = new ArrayList<>(); + citys.add(cityId); + citys.add(0); + + List storeProductVOList = cartInfo + .stream() + .map(YxStoreCartQueryVo::getProductInfo) + .collect(Collectors.toList()); + List tempIdS = storeProductVOList + .stream() + .map(YxStoreProductQueryVo::getTempId) + .collect(Collectors.toList()); + + + //获取商品用到的运费模板 + List shippingTemplatesList = shippingTemplatesService + .list(Wrappers.lambdaQuery() + .in(YxShippingTemplates::getId, tempIdS)); + //获取运费模板区域列表按照城市排序 + List shippingTemplatesRegionList = shippingTemplatesRegionService + .list(Wrappers.lambdaQuery() + .in(YxShippingTemplatesRegion::getTempId, tempIdS) + .in(YxShippingTemplatesRegion::getCityId, citys) + .orderByAsc(YxShippingTemplatesRegion::getCityId)); + //提取运费模板类型 + Map shippingTemplatesMap = shippingTemplatesList + .stream() + .collect(Collectors.toMap(YxShippingTemplates::getId, + YxShippingTemplates::getType)); + //提取运费模板有相同值覆盖 + Map shippingTemplatesRegionMap = + shippingTemplatesRegionList.stream() + .collect(Collectors.toMap(YxShippingTemplatesRegion::getTempId, + YxShippingTemplatesRegion -> YxShippingTemplatesRegion, + (key1, key2) -> key2)); + + + Map templateDTOMap = new HashMap<>(); + for (YxStoreCartQueryVo storeCartVO : cartInfo) { + Integer tempId = storeCartVO.getProductInfo().getTempId(); + + //处理拼团等营销商品没有设置运费模板 + if (tempId == null) { + return storePostage; + } + + //根据模板类型获取相应的数量 + double num = 0d; + if (ShippingTempEnum.TYPE_1.getValue().equals(shippingTemplatesMap.get(tempId))) { + num = storeCartVO.getCartNum().doubleValue(); + } else if (ShippingTempEnum.TYPE_2.getValue().equals(shippingTemplatesMap.get(tempId))) { + num = NumberUtil.mul(storeCartVO.getCartNum(), + storeCartVO.getProductInfo().getAttrInfo().getWeight()).doubleValue(); + } else if (ShippingTempEnum.TYPE_3.getValue().equals(shippingTemplatesMap.get(tempId))) { + num = NumberUtil.mul(storeCartVO.getCartNum(), + storeCartVO.getProductInfo().getAttrInfo().getVolume()).doubleValue(); + } + + YxShippingTemplatesRegion shippingTemplatesRegion = shippingTemplatesRegionMap.get(tempId); + BigDecimal price = NumberUtil.round(NumberUtil.mul(storeCartVO.getCartNum(), + storeCartVO.getTruePrice()), 2); + if (!templateDTOMap.containsKey(tempId)) { + TemplateDto templateDTO = TemplateDto.builder() + .number(num) + .price(price) + .first(shippingTemplatesRegion.getFirst().doubleValue()) + .firstPrice(shippingTemplatesRegion.getFirstPrice()) + ._continue(shippingTemplatesRegion.getContinues().doubleValue()) + .continuePrice(shippingTemplatesRegion.getContinuePrice()) + .tempId(tempId) + .cityId(cityId) + .build(); + templateDTOMap.put(tempId, templateDTO); + } else { + TemplateDto templateDTO = templateDTOMap.get(tempId); + templateDTO.setNumber(templateDTO.getNumber() + num); + templateDTO.setPrice(NumberUtil.add(templateDTO.getPrice().doubleValue(), price)); + } + + + } + + //处理包邮情况 + jj: for (Map.Entry entry : templateDTOMap.entrySet()) { + Integer mapKey = entry.getKey(); + TemplateDto mapValue = entry.getValue(); + + Long count = shippingTemplatesFreeService.count(Wrappers.lambdaQuery() + .eq(YxShippingTemplatesFree::getTempId, mapValue.getTempId()) + .eq(YxShippingTemplatesFree::getCityId, mapValue.getCityId()) + .le(YxShippingTemplatesFree::getNumber, mapValue.getNumber()) + .le(YxShippingTemplatesFree::getPrice, mapValue.getPrice())); + //满足包邮条件剔除 + if (count > 0) { + templateDTOMap.remove(mapKey); + break jj; + } + } + + //处理区域邮费 + boolean isFirst = true; //用来是否多个产品的标识 false表示数量大于1 + for (TemplateDto templateDTO : templateDTOMap.values()) { + if (isFirst) {//首件 + //只满足首件 + if (Double.compare(templateDTO.getNumber(), templateDTO.getFirst()) <= 0) { + storePostage = NumberUtil.round(NumberUtil.add(storePostage, + templateDTO.getFirstPrice()), 2); + } else { + BigDecimal firstPrice = NumberUtil.add(storePostage, templateDTO.getFirstPrice()); + + if (templateDTO.get_continue() <= 0) { + storePostage = firstPrice; + } else { + //续件平均值且向上取整数 + double average = Math.ceil(NumberUtil.div(NumberUtil.sub(templateDTO.getNumber(), + templateDTO.getFirst()), + templateDTO.get_continue().doubleValue())); + //最终邮费 + storePostage = NumberUtil.add(firstPrice, NumberUtil.mul(average, + templateDTO.getContinuePrice())); + } + + } + + isFirst = false; + } else { + //多件直接在以前的基数继续续建 + if (templateDTO.get_continue() > 0) { + //续件平均值且向上取整数 + double average = Math.ceil( + NumberUtil.div( + templateDTO.getNumber(), + templateDTO.get_continue() + ) + ); + //最终邮费 + storePostage = NumberUtil.add(storePostage.doubleValue(), NumberUtil.mul(average, + templateDTO.getContinuePrice())); + } + } + } + } + + + return storePostage; + } + + /** + * 获取某字段价格 + * + * @param cartInfo 购物车 + * @param key key值 + * @return Double + */ + private BigDecimal getOrderSumPrice(List cartInfo, String key) { + BigDecimal sumPrice = BigDecimal.ZERO; + + if ("truePrice".equals(key)) { + for (YxStoreCartQueryVo storeCart : cartInfo) { + sumPrice = NumberUtil.add(sumPrice, NumberUtil.mul(storeCart.getCartNum(), storeCart.getTruePrice())); + } + } else if ("costPrice".equals(key)) { + for (YxStoreCartQueryVo storeCart : cartInfo) { + sumPrice = NumberUtil.add(sumPrice, + NumberUtil.mul(storeCart.getCartNum(), storeCart.getCostPrice())); + } + } else if ("vipTruePrice".equals(key)) { + for (YxStoreCartQueryVo storeCart : cartInfo) { + sumPrice = NumberUtil.add(sumPrice, + NumberUtil.mul(storeCart.getCartNum(), storeCart.getVipTruePrice())); + } + } else if ("payIntegral".equals(key)) { + for (YxStoreCartQueryVo storeCart : cartInfo) { + if (storeCart.getProductInfo().getAttrInfo() != null && storeCart.getProductInfo().getAttrInfo().getIntegral() != null) { + sumPrice = NumberUtil.add(sumPrice, + NumberUtil.mul(storeCart.getCartNum(), storeCart.getProductInfo().getAttrInfo().getIntegral())); + } + + } + } + + return sumPrice; + } + + + //=======================================================// + + + /** + * 根据商品分类统计订单占比 + * + * @return OrderCountDto + */ + @Override + public OrderCountDto getOrderCount() { + //获取所有订单转态为已支付的 + List nameList = storeCartService.findCateName(); + Map childrenMap = new HashMap<>(); + nameList.forEach(i -> { + if (i != null) { + if (childrenMap.containsKey(i.getCatename())) { + childrenMap.put(i.getCatename(), childrenMap.get(i.getCatename()) + 1); + } else { + childrenMap.put(i.getCatename(), 1); + } + } + + }); + List list = new ArrayList<>(); + List columns = new ArrayList<>(); + childrenMap.forEach((k, v) -> { + OrderCountDto.OrderCountData orderCountData = new OrderCountDto.OrderCountData(); + orderCountData.setName(k); + orderCountData.setValue(v); + columns.add(k); + list.add(orderCountData); + }); + OrderCountDto orderCountDto = new OrderCountDto(); + orderCountDto.setColumn(columns); + orderCountDto.setOrderCountDatas(list); + return orderCountDto; + } + + /** + * 首页订单/用户等统计 + * + * @return OrderTimeDataDto + */ + @Override + public OrderTimeDataDto getOrderTimeData() { + OrderTimeDataDto orderTimeDataDto = new OrderTimeDataDto(); + + ShoperOrderTimeDataVo shoperOrderTimeData = this.getShoperOrderTimeData(); + + BeanUtil.copyProperties(shoperOrderTimeData, orderTimeDataDto); + + + orderTimeDataDto.setUserCount(userService.count()); + orderTimeDataDto.setOrderCount(this.count()); + orderTimeDataDto.setPriceCount(yxStoreOrderMapper.sumTotalPrice()); + orderTimeDataDto.setGoodsCount(productService.count()); + + return orderTimeDataDto; + } + + /** + * 返回本月订单金额与数量 + * + * @return map + */ + @Override + public Map chartCount() { + Map map = new LinkedHashMap<>(); + Date nowMonth = DateUtil.beginOfMonth(new Date()); + + map.put("chart", yxStoreOrderMapper.chartList(nowMonth)); + map.put("chartT", yxStoreOrderMapper.chartListT(nowMonth)); + + return map; + } + + @Override + public void returnStock(String orderId) { + YxStoreOrderQueryVo order = this.getOrderInfo(orderId, null); + this.regressionIntegral(order, 1); + this.regressionStock(order, 1); + this.regressionCoupon(order, 1); + } + + @Override + public Map queryAll(YxStoreOrderQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + List storeOrderDTOS = new ArrayList<>(); + for (YxStoreOrder yxStoreOrder : page.getList()) { + this.orderList(storeOrderDTOS, yxStoreOrder); + + } + Map map = new LinkedHashMap<>(2); + map.put("content", storeOrderDTOS); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + public List queryAll(YxStoreOrderQueryCriteria criteria) { + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreOrder.class, criteria)); + } + + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(YxStoreOrder resources) { + YxStoreOrder yxStoreOrder = this.getById(resources.getId()); + YxStoreOrder yxStoreOrder1 = this.getOne(new LambdaQueryWrapper() + .eq(YxStoreOrder::getUnique, resources.getUnique())); + if (yxStoreOrder1 != null && !yxStoreOrder1.getId().equals(yxStoreOrder.getId())) { + throw new EntityExistException(YxStoreOrder.class, "unique", resources.getUnique()); + } + yxStoreOrder.copy(resources); + this.saveOrUpdate(yxStoreOrder); + } + + + @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("订单状态(-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("唯一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()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + /** + * 获取订单详情 + * + * @param orderId + * @return + */ + @Override + public YxStoreOrderDto getOrderDetail(Long orderId) { + YxStoreOrder yxStoreOrder = this.getById(orderId); + if (ObjectUtil.isEmpty(yxStoreOrder)) { + throw new BadRequestException("订单详情不存在"); + } + 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 = DateUtil.formatDateTime(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(this.orderType(yxStoreOrder.getId() + , yxStoreOrder.getPinkId(), yxStoreOrder.getCombinationId() + , yxStoreOrder.getSeckillId(), yxStoreOrder.getBargainId(), + yxStoreOrder.getShippingType(), yxStoreOrder.getPayIntegral())); + + //添加订单状态 + List storeOrderStatuses = orderStatusService.list(new LambdaQueryWrapper() + .eq(YxStoreOrderStatus::getOid, yxStoreOrder.getId())); + List orderStatusDtos = generator.convert(storeOrderStatuses, YxStoreOrderStatusDto.class); + yxStoreOrderDto.setStoreOrderStatusList(orderStatusDtos); + //添加购物车详情 + List cartInfos = storeOrderCartInfoService.list( + new LambdaQueryWrapper().eq(YxStoreOrderCartInfo::getOid, 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()); + } + return yxStoreOrderDto; + } + + @Override + public Map queryAll(List ids) { + List yxStoreOrders = this.list(new LambdaQueryWrapper().in(YxStoreOrder::getOrderId, ids)); + List storeOrderDTOS = new ArrayList<>(); + for (YxStoreOrder yxStoreOrder : yxStoreOrders) { + this.orderList(storeOrderDTOS, yxStoreOrder); + } + + Map map = new LinkedHashMap<>(2); + map.put("content", storeOrderDTOS); + + 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) { + YxSystemStore systemStore = systemStoreService.getById(yxStoreOrder.getStoreId()); + if (Objects.nonNull(systemStore)) { + String storeName = systemStore.getName(); + yxStoreOrderDto.setStoreName(storeName); + } + } + + //订单状态 + String orderStatusStr = OrderUtil.orderStatusStr(yxStoreOrder.getPaid() + , yxStoreOrder.getStatus(), yxStoreOrder.getShippingType() + , yxStoreOrder.getRefundStatus()); + + if (_status == 3) { + + String refundTime = DateUtil.formatDateTime(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(this.orderType(yxStoreOrder.getId() + , yxStoreOrder.getPinkId(), yxStoreOrder.getCombinationId() + , yxStoreOrder.getSeckillId(), yxStoreOrder.getBargainId(), + yxStoreOrder.getShippingType(), yxStoreOrder.getPayIntegral())); + + List cartInfos = storeOrderCartInfoService.list( + new LambdaQueryWrapper().eq(YxStoreOrderCartInfo::getOid, 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); + } + + + /** + * 订单状态处理 + * + * @param id 订单id + * @param pinkId 拼团id + * @param combinationId 拼团产品id + * @param seckillId 秒杀id + * @param bargainId 砍价id + * @param shippingType 发货类型 + * @return string + */ + private String orderType(Long id, Long pinkId, Long combinationId, Long seckillId, + Long bargainId, Integer shippingType, BigDecimal payIntegral) { + String str = "[普通订单]"; + if (pinkId > 0 || combinationId > 0) { + YxStorePink storePink = storePinkService.getOne(new LambdaQueryWrapper() + .eq(YxStorePink::getOrderIdKey, id)); + if (ObjectUtil.isNull(storePink)) { + str = "[拼团订单]"; + } else { + if (OrderInfoEnum.PINK_STATUS_1.getValue().equals(storePink.getStatus())) { + str = "[拼团订单]正在进行中"; + } else if (OrderInfoEnum.PINK_STATUS_2.getValue().equals(storePink.getStatus())) { + str = "[拼团订单]已完成"; + } else if (OrderInfoEnum.PINK_STATUS_3.getValue().equals(storePink.getStatus())) { + str = "[拼团订单]未完成"; + } else { + str = "[拼团订单]历史订单"; + } + + } + + } else if (seckillId > 0) { + str = "[秒杀订单]"; + } else if (bargainId > 0) { + str = "[砍价订单]"; + } + + if (OrderInfoEnum.SHIPPIING_TYPE_2.getValue().equals(shippingType)) { + str = "[核销订单]"; + } + if (payIntegral.compareTo(new BigDecimal("0.00")) == 1) { + str = "[积分兑换]"; + } + return str; + } + + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderStatusServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderStatusServiceImpl.java similarity index 69% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderStatusServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderStatusServiceImpl.java index 291b95e455ebb2b1a64723df2ed1a22404af52d9..6aef21bbe002435c235e63f88167bfc4ea28cefc 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderStatusServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/impl/YxStoreOrderStatusServiceImpl.java @@ -1,19 +1,18 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.impl; +package co.yixiang.modules.order.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.shop.domain.YxStoreOrderStatus; -import co.yixiang.modules.shop.service.YxStoreOrderStatusService; -import co.yixiang.modules.shop.service.dto.YxStoreOrderStatusDto; -import co.yixiang.modules.shop.service.dto.YxStoreOrderStatusQueryCriteria; -import co.yixiang.modules.shop.service.mapper.StoreOrderStatusMapper; +import co.yixiang.modules.order.domain.YxStoreOrderStatus; +import co.yixiang.modules.order.service.YxStoreOrderStatusService; +import co.yixiang.modules.order.service.dto.YxStoreOrderStatusDto; +import co.yixiang.modules.order.service.dto.YxStoreOrderStatusQueryCriteria; +import co.yixiang.modules.order.service.mapper.StoreOrderStatusMapper; import co.yixiang.utils.FileUtil; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; @@ -29,23 +28,37 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreOrderStatus") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxStoreOrderStatusServiceImpl extends BaseServiceImpl implements YxStoreOrderStatusService { private final IGenerator generator; + + /** + * 添加订单操作记录 + * @param oid 订单id + * @param changetype 操作状态 + * @param changeMessage 操作内容 + */ + @Override + public void create(Long oid, String changetype, String changeMessage) { + YxStoreOrderStatus storeOrderStatus = new YxStoreOrderStatus(); + storeOrderStatus.setOid(oid); + storeOrderStatus.setChangeType(changetype); + storeOrderStatus.setChangeMessage(changeMessage); + this.baseMapper.insert(storeOrderStatus); + } + + + @Override //@Cacheable public Map queryAll(YxStoreOrderStatusQueryCriteria criteria, Pageable pageable) { @@ -60,7 +73,7 @@ public class YxStoreOrderStatusServiceImpl extends BaseServiceImpl queryAll(YxStoreOrderStatusQueryCriteria criteria) { + public List queryAll(YxStoreOrderStatusQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreOrderStatus.class, criteria)); } @@ -69,7 +82,7 @@ public class YxStoreOrderStatusServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxStoreOrderStatusDto yxStoreOrderStatus : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("订单id", yxStoreOrderStatus.getOid()); map.put("操作类型", yxStoreOrderStatus.getChangeType()); map.put("操作备注", yxStoreOrderStatus.getChangeMessage()); diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/ExpressMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/mapper/ExpressMapper.java similarity index 41% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/ExpressMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/mapper/ExpressMapper.java index c0effd24d415c4dd5df0d3dc4eba03ac38c130ce..4a62a10e3fbc49b7992c1603c44baa35ce80cc18 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/ExpressMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/mapper/ExpressMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.mapper; +package co.yixiang.modules.order.service.mapper; import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.shop.domain.YxExpress; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.order.domain.YxExpress; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @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/StoreOrderCartInfoMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/mapper/StoreOrderCartInfoMapper.java similarity index 42% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderCartInfoMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/mapper/StoreOrderCartInfoMapper.java index 9aefc9ac636ebb57fe5e7c5d3f65a9938f6a70a2..c6e90b5fc2eb215975efe85393e9273c089ce1bd 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderCartInfoMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/mapper/StoreOrderCartInfoMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.mapper; +package co.yixiang.modules.order.service.mapper; import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.shop.domain.YxStoreOrderCartInfo; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.order.domain.YxStoreOrderCartInfo; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @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-mall/src/main/java/co/yixiang/modules/order/service/mapper/StoreOrderMapper.java similarity index 33% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/mapper/StoreOrderMapper.java index a1ebb4bb60c213ac909dd7097acd38477459e8b3..e0fae038bbdcb257ba5cbabd0d0c1ca38775ee87 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/mapper/StoreOrderMapper.java @@ -2,52 +2,73 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.mapper; +package co.yixiang.modules.order.service.mapper; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.order.domain.YxStoreOrder; +import co.yixiang.modules.order.service.dto.ChartDataDto; +import co.yixiang.modules.order.vo.OrderDataVo; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import org.apache.ibatis.annotations.Param; import org.apache.ibatis.annotations.Select; import org.springframework.stereotype.Repository; +import java.util.Date; import java.util.List; -import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.shop.domain.YxStoreOrder; -import co.yixiang.modules.shop.service.dto.ChartDataDto; - /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface StoreOrderMapper extends CoreMapper { + + + @Select("SELECT sum(pay_price) as price,count(id) as count," + + "DATE_FORMAT(create_time, '%m-%d') as time FROM yx_store_order" + + " WHERE is_del = 0 AND paid = 1 AND refund_status = 0 " + + "GROUP BY DATE_FORMAT(create_time,'%Y-%m-%d') ORDER BY create_time DESC") + List getOrderDataPriceList(Page page); + + + @Select("SELECT IFNULL(sum(pay_price),0) " + + " FROM yx_store_order ${ew.customSqlSegment}") + Double todayPrice(@Param(Constants.WRAPPER) Wrapper wrapper); + + + + @Select("select IFNULL(sum(pay_price),0) from yx_store_order " + + "where paid=1 and is_del=0 and refund_status=0 and uid=#{uid}") + double sumPrice(@Param("uid") Long uid); + + @Select("SELECT COUNT(*) FROM yx_store_order WHERE pay_time >= ${today}") - Integer countByPayTimeGreaterThanEqual(@Param("today") int 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); + Integer countByPayTimeLessThanAndPayTimeGreaterThanEqual(@Param("today")int today, @Param("yesterday")int yesterday); - @Select("select IFNULL(sum(pay_price),0) from yx_store_order " + + @Select( "select IFNULL(sum(pay_price),0) from yx_store_order " + "where refund_status=0 and is_del=0 and paid=1") Double sumTotalPrice(); - //修复了“错误代码1055与sql_mode = only_full_group_by不兼容”问题 - //修复方式create_time外面包裹ANY_VALUE关键字 @Select("SELECT IFNULL(sum(pay_price),0) as num," + - "FROM_UNIXTIME(ANY_VALUE(create_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(ANY_VALUE(create_time),'%Y-%m-%d') " + + "DATE_FORMAT(ANY_VALUE(create_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 DATE_FORMAT(ANY_VALUE(create_time),'%Y-%m-%d') " + " ORDER BY ANY_VALUE(create_time) ASC") - List chartList(@Param("time") int time); - + List chartList(@Param("time") Date time); @Select("SELECT count(id) as num," + - "FROM_UNIXTIME(ANY_VALUE(create_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(ANY_VALUE(create_time),'%Y-%m-%d') " + + "DATE_FORMAT(ANY_VALUE(create_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 DATE_FORMAT(ANY_VALUE(create_time),'%Y-%m-%d') " + " ORDER BY ANY_VALUE(create_time) ASC") - List chartListT(@Param("time") int time); + List chartListT(@Param("time") Date time); } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderStatusMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/order/service/mapper/StoreOrderStatusMapper.java similarity index 42% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderStatusMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/order/service/mapper/StoreOrderStatusMapper.java index fa4461df44c132b177d0bdc66373c671fcd9d600..e565401a285d132226b4e0b9c5905fae6f56de80 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreOrderStatusMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/service/mapper/StoreOrderStatusMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.mapper; +package co.yixiang.modules.order.service.mapper; import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.shop.domain.YxStoreOrderStatus; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.order.domain.YxStoreOrderStatus; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface StoreOrderStatusMapper extends CoreMapper { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/vo/ComputeVo.java b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/ComputeVo.java new file mode 100644 index 0000000000000000000000000000000000000000..fd7e2de4bca8238daa1c36ab92382180d791f995 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/ComputeVo.java @@ -0,0 +1,43 @@ +package co.yixiang.modules.order.vo; + +import co.yixiang.serializer.BigDecimalSerializer; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + * @ClassName ComputeVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/27 + **/ +@Data +@Builder +@NoArgsConstructor +@AllArgsConstructor +public class ComputeVo implements Serializable { + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal couponPrice; + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal deductionPrice; + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal payPostage; + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal payPrice; + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal totalPrice; + + private Double usedIntegral; //使用了多少积分 + + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal payIntegral; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/vo/ConfirmOrderVo.java b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/ConfirmOrderVo.java new file mode 100644 index 0000000000000000000000000000000000000000..30eaa498e67e0b74268ee032b85423326174fa13 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/ConfirmOrderVo.java @@ -0,0 +1,66 @@ +package co.yixiang.modules.order.vo; + +import co.yixiang.modules.activity.vo.StoreCouponUserVo; +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.order.service.dto.PriceGroupDto; +import co.yixiang.modules.product.vo.YxSystemStoreQueryVo; +import co.yixiang.modules.user.domain.YxUserAddress; +import co.yixiang.modules.user.vo.YxUserQueryVo; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import java.io.Serializable; +import java.util.List; + +/** + * @ClassName ConfirmOrderVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/27 + **/ +@Data +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class ConfirmOrderVo implements Serializable { + //地址信息 + private YxUserAddress addressInfo; + + //砍价id + private Integer bargainId; + + private List cartInfo; + + private Integer combinationId; + + //优惠券减 + private Boolean deduction; + + private Boolean enableIntegral; + + private Double enableIntegralNum; + + //积分抵扣 + private Integer integralRatio; + + private String orderKey; + + private PriceGroupDto priceGroup; + + private Integer seckillId; + + //店铺自提 + private Integer storeSelfMention; + + //店铺信息 + private YxSystemStoreQueryVo systemStore; + + + private StoreCouponUserVo usableCoupon; + + private YxUserQueryVo userInfo; + + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/vo/OrderCartInfoVo.java b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/OrderCartInfoVo.java new file mode 100644 index 0000000000000000000000000000000000000000..a0e0cd9bdc060be8a2b9cabfafba4f4a7f0d5b7f --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/OrderCartInfoVo.java @@ -0,0 +1,45 @@ +package co.yixiang.modules.order.vo; + +import co.yixiang.modules.order.service.dto.ProductDto; +import io.swagger.annotations.ApiModelProperty; +import lombok.Builder; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 订单商品对象 + *

+ * + * @author hupeng + * @date 2019-11-03 + */ +@Data +@Builder +public class OrderCartInfoVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "订单ID") + private String orderId; + + @ApiModelProperty(value = "商品ID") + private Long productId; + + @ApiModelProperty(value = "购物车数量") + private Integer cartNum; + + @ApiModelProperty(value = "拼团产品ID") + private Long combinationId; + + @ApiModelProperty(value = "秒杀产品ID") + private Long seckillId; + + @ApiModelProperty(value = "砍价产品ID") + private Long bargainId; + + @ApiModelProperty(value = "产品信息") + private ProductDto productInfo; + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/vo/OrderDataVo.java b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/OrderDataVo.java new file mode 100644 index 0000000000000000000000000000000000000000..e0b03d4fb469e3efcd05baa735fdd8be0bf1618a --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/OrderDataVo.java @@ -0,0 +1,20 @@ +package co.yixiang.modules.order.vo; + +import co.yixiang.serializer.DoubleSerializer; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName OrderDataVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/25 + **/ +@Data +public class OrderDataVo implements Serializable { + private Integer count; + @JsonSerialize(using = DoubleSerializer.class) + private Double price; + private String time; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/vo/ShoperOrderTimeDataVo.java b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/ShoperOrderTimeDataVo.java new file mode 100644 index 0000000000000000000000000000000000000000..5d824766e2eeec9529baf2fa3a4251a617889cd1 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/ShoperOrderTimeDataVo.java @@ -0,0 +1,38 @@ +package co.yixiang.modules.order.vo; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName OrderTimeDataDTO + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/25 + **/ +@Data +public class ShoperOrderTimeDataVo implements Serializable { + + /**今日成交额*/ + private Double todayPrice; + + /**今日订单数*/ + private Long todayCount; + + /**昨日成交额*/ + private Double proPrice; + + /**昨日订单数*/ + private Long proCount; + + /**本月成交额*/ + private Double monthPrice; + + /**本月订单数*/ + private Long monthCount; + + /**上周订单数*/ + private Long lastWeekCount; + + /**上周成交额*/ + private Double lastWeekPrice; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/vo/UserOrderCountVo.java b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/UserOrderCountVo.java new file mode 100644 index 0000000000000000000000000000000000000000..0e2e9cefa3f69f2005a9c1e404ee6c1373f8c81e --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/UserOrderCountVo.java @@ -0,0 +1,55 @@ +package co.yixiang.modules.order.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.io.Serializable; + +/** + * @ClassName OrderCountDTO + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/30 + **/ +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +@Builder +public class UserOrderCountVo implements Serializable { + + /**订单支付没有退款 数量*/ + @ApiModelProperty(value = "订单支付没有退款数量") + private Long orderCount; + + /**订单支付没有退款 支付总金额*/ + @ApiModelProperty(value = "订单支付没有退款支付总金额") + private Double sumPrice; + + /**订单待支付 数量*/ + @ApiModelProperty(value = "订单待支付数量") + private Long unpaidCount; + + /**订单待发货数量*/ + @ApiModelProperty(value = "订单待发货数量") + private Long unshippedCount; + + /**订单待收货数量*/ + @ApiModelProperty(value = "订单待收货数量") + private Long receivedCount; + + /**订单待评价数量*/ + @ApiModelProperty(value = "订单待评价数量") + private Long evaluatedCount; + + /**订单已完成数量*/ + @ApiModelProperty(value = "订单已完成数量") + private Long completeCount; + + /**订单退款数量*/ + @ApiModelProperty(value = "订单退款数量") + private Long refundCount; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/vo/YxStoreOrderCartInfoQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/YxStoreOrderCartInfoQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..c330911dd7d7e17794d8bcf5b8ea38eb948df102 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/YxStoreOrderCartInfoQueryVo.java @@ -0,0 +1,39 @@ +package co.yixiang.modules.order.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 订单购物详情表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-27 + */ +@Data +@ApiModel(value = "YxStoreOrderCartInfoQueryVo对象", description = "订单购物详情表查询参数") +public class YxStoreOrderCartInfoQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + private Integer id; + + @ApiModelProperty(value = "订单id") + private Integer oid; + + @ApiModelProperty(value = "购物车id") + private Integer cartId; + + @ApiModelProperty(value = "商品ID") + private Integer productId; + + @ApiModelProperty(value = "购买东西的详细信息") + private String cartInfo; + + @ApiModelProperty(value = "唯一id") + private String unique; + +} \ No newline at end of file diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/vo/YxStoreOrderQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/YxStoreOrderQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..3539eebde6de0a325f1a15d9d76bfa12249ebdeb --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/YxStoreOrderQueryVo.java @@ -0,0 +1,209 @@ +package co.yixiang.modules.order.vo; + + +import cn.hutool.core.util.StrUtil; +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.order.service.dto.StatusDto; +import co.yixiang.modules.product.vo.YxSystemStoreQueryVo; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; + +/** + *

+ * 订单表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-27 + */ +@Data +@ApiModel(value = "YxStoreOrderQueryVo对象", description = "订单表查询参数") +public class YxStoreOrderQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "订单ID") + private Long id; + + @ApiModelProperty(value = "订单号") + private String orderId; + + + private String extendOrderId; + + @ApiModelProperty(value = "用户id") + private Long uid; + + @ApiModelProperty(value = "用户姓名") + private String realName; + + @ApiModelProperty(value = "用户电话") + private String userPhone; + + @ApiModelProperty(value = "详细地址") + private String userAddress; + + @ApiModelProperty(value = "购物车id") + private String cartId; + + private List cartInfo; + + private StatusDto _status; + + @ApiModelProperty(value = "运费金额") + private BigDecimal freightPrice; + + @ApiModelProperty(value = "订单商品总数") + private Integer totalNum; + + @ApiModelProperty(value = "订单总价") + private BigDecimal totalPrice; + + @ApiModelProperty(value = "邮费") + private BigDecimal totalPostage; + + @ApiModelProperty(value = "实际支付金额") + private BigDecimal payPrice; + + @ApiModelProperty(value = "实际支付积分") + private BigDecimal payIntegral; + + @ApiModelProperty(value = "支付邮费") + private BigDecimal payPostage; + + @ApiModelProperty(value = "抵扣金额") + private BigDecimal deductionPrice; + + @ApiModelProperty(value = "优惠券id") + private Integer couponId; + + @ApiModelProperty(value = "优惠券金额") + private BigDecimal couponPrice; + + @ApiModelProperty(value = "支付状态") + private Integer paid; + + @ApiModelProperty(value = "支付时间") + private Date payTime; + + @ApiModelProperty(value = "支付方式") + private String payType; + + @ApiModelProperty(value = "创建时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date createTime; + + @ApiModelProperty(value = "订单状态(-1 : 申请退款 -2 : 退货成功 0:待发货;1:待收货;2:已收货;3:待评价;-1:已退款)") + private Integer status; + + @ApiModelProperty(value = "0 未退款 1 申请中 2 已退款") + private Integer refundStatus; + + @ApiModelProperty(value = "退款图片") + private String refundReasonWapImg; + + @ApiModelProperty(value = "退款用户说明") + private String refundReasonWapExplain; + + @ApiModelProperty(value = "退款时间") + private Date refundReasonTime; + + @ApiModelProperty(value = "前台退款原因") + private String refundReasonWap; + + @ApiModelProperty(value = "不退款的理由") + private String refundReason; + + @ApiModelProperty(value = "退款金额") + private BigDecimal refundPrice; + + @ApiModelProperty(value = "快递名称/送货人姓名") + private String deliveryName; + + private String deliverySn; + + @ApiModelProperty(value = "发货类型") + private String deliveryType; + + public String getDeliveryType() { + if(StrUtil.isBlank(deliveryType)) { + return "express"; + } + return deliveryType; + } + + + @ApiModelProperty(value = "快递单号/手机号") + private String deliveryId; + + @ApiModelProperty(value = "消费赚取积分") + private BigDecimal gainIntegral; + + @ApiModelProperty(value = "使用积分") + private BigDecimal useIntegral; + + @ApiModelProperty(value = "给用户退了多少积分") + private BigDecimal backIntegral; + + @ApiModelProperty(value = "备注") + private String mark; + + @ApiModelProperty(value = "唯一id(md5加密)类似id") + private String unique; + + @ApiModelProperty(value = "管理员备注") + private String remark; + + @ApiModelProperty(value = "商户ID") + private Integer merId; + + private Integer isMerCheck; + + @ApiModelProperty(value = "拼团产品id0一般产品") + private Long combinationId; + + @ApiModelProperty(value = "拼团id 0没有拼团") + private Long pinkId; + + @ApiModelProperty(value = "成本价") + private BigDecimal cost; + + @ApiModelProperty(value = "秒杀产品ID") + private Long seckillId; + + @ApiModelProperty(value = "砍价id") + private Long bargainId; + + @ApiModelProperty(value = "核销码") + private String verifyCode; + + @ApiModelProperty(value = "门店id") + private Integer storeId; + + @ApiModelProperty(value = "配送方式 1=快递 ,2=门店自提") + private Integer shippingType; + + + @ApiModelProperty(value = "支付渠道(0微信公众号1微信小程序)") + private Integer isChannel; + + private Integer isRemind; + + private Integer isSystemDel; + + @ApiModelProperty(value = "门店信息与二维码链接") + private String code; + + @ApiModelProperty(value = "腾讯地图key") + private String mapKey; + + @ApiModelProperty(value = "门店信息") + private YxSystemStoreQueryVo systemStore; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/order/vo/YxStoreOrderStatusQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/YxStoreOrderStatusQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..40036c652df006590099da88225b48629b7852b3 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/order/vo/YxStoreOrderStatusQueryVo.java @@ -0,0 +1,36 @@ +package co.yixiang.modules.order.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 订单操作记录表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-27 + */ +@Data +@ApiModel(value = "YxStoreOrderStatusQueryVo对象", description = "订单操作记录表查询参数") +public class YxStoreOrderStatusQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + private Integer id; + + @ApiModelProperty(value = "订单id") + private Integer oid; + + @ApiModelProperty(value = "操作类型") + private String changeType; + + @ApiModelProperty(value = "操作备注") + private String changeMessage; + + @ApiModelProperty(value = "操作时间") + private Integer changeTime; + +} \ No newline at end of file diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProduct.java b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProduct.java similarity index 37% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProduct.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProduct.java index d3ea835cfb95cbb8751720cacbcc52a5b6f907dc..e82621703176c8cd9878e19a4ca61a9746ad59af 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProduct.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProduct.java @@ -1,27 +1,35 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.product.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; +import co.yixiang.modules.category.domain.YxStoreCategory; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import lombok.*; - -import javax.validation.constraints.*; -import java.io.Serializable; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import javax.validation.constraints.DecimalMax; +import javax.validation.constraints.DecimalMin; +import javax.validation.constraints.Min; +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; import java.math.BigDecimal; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @TableName("yx_store_product") @@ -34,139 +42,209 @@ public class YxStoreProduct extends BaseDomain { /** 商品id */ @TableId + @ApiModelProperty(value = "商品ID") private Long id; + /** 商户Id(0为总后台管理员创建,不为0的时候是商户后台创建) */ + @ApiModelProperty(value = "商户Id(0为总后台管理员创建,不为0的时候是商户后台创建) 预留字段") + private Integer merId; + + /** 商品图片 */ @NotBlank(message = "请上传商品图片") + @ApiModelProperty(value = "商品图片") private String image; /** 轮播图 */ - @NotBlank(message = "请上传商品轮播") + @NotBlank(message = "请上传商品轮播图") + @ApiModelProperty(value = "商品轮播图") private String sliderImage; /** 商品名称 */ @NotBlank(message = "商品名称不能空") + @ApiModelProperty(value = "商品名称") private String storeName; /** 商品简介 */ + @ApiModelProperty(value = "商品简介") private String storeInfo; /** 关键字 */ + @ApiModelProperty(value = "关键字") private String keyword; /** 产品条码(一维码) */ + @ApiModelProperty(value = "产品条码(一维码)") private String barCode; /** 分类id */ + @ApiModelProperty(value = "分类id") private String cateId; /** 商品价格 */ + @ApiModelProperty(value = "商品价格") @NotNull(message = "请输入商品价格") - @DecimalMin(value = "0.00", message = "商品价格不在合法范围内") - @DecimalMax(value = "99999999.99", message = "商品价格不在合法范围内") + @DecimalMin(value="0.00", message = "商品价格不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "商品价格不在合法范围内") private BigDecimal price; /** 会员价格 */ + @ApiModelProperty(value = "会员价格") private BigDecimal vipPrice; /** 市场价 */ + @ApiModelProperty(value = "市场价") @NotNull(message = "请输入市场价") - @DecimalMin(value = "0.00", message = "市场价不在合法范围内") - @DecimalMax(value = "99999999.99", message = "市场价不在合法范围内") + @DecimalMin(value="0.00", message = "市场价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "市场价不在合法范围内") private BigDecimal otPrice; /** 邮费 */ + @ApiModelProperty(value = "邮费") private BigDecimal postage; /** 单位名 */ @NotBlank(message = "请填写单位") + @ApiModelProperty(value = "单位名") private String unitName; /** 排序 */ + @ApiModelProperty(value = "排序") private Integer sort; /** 销量 */ + @ApiModelProperty(value = "销量") private Integer sales; /** 库存 */ + @ApiModelProperty(value = "库存") @NotNull(message = "请输入库存") - @Min(message = "库存不能小于0", value = 1) + @Min(message = "库存不能小于0",value = 1) private Integer stock; + /** 需要多少积分兑换 */ + @ApiModelProperty(value = "需要多少积分兑换 只在开启积分兑换时生效") + private Integer integral; + + /** 状态(0:未上架,1:上架) */ + @ApiModelProperty(value = "状态(0:未上架,1:上架)") private Integer isShow; /** 是否热卖 */ + @ApiModelProperty(value = "是否热卖(0:否,1:是)") private Integer isHot; /** 是否优惠 */ + @ApiModelProperty(value = "是否猜你喜欢(0:否,1:是)") private Integer isBenefit; /** 是否精品 */ + @ApiModelProperty(value = "是否精品(0:否,1:是)") private Integer isBest; /** 是否新品 */ + @ApiModelProperty(value = "是否新品(0:否,1:是)") private Integer isNew; /** 产品描述 */ @NotBlank(message = "请填写商品详情") + @ApiModelProperty(value = "商品详情") private String description; /** 是否包邮 */ + @ApiModelProperty(value = "是否包邮") private Integer isPostage; + /** 商户是否代理 0不可代理1可代理 */ + @ApiModelProperty(value = "商户是否代理 0不可代理1可代理 ") + private Integer merUse; + + /** 获得积分 */ - @DecimalMin(value = "0.00", message = "获得积分不在合法范围内") - @DecimalMax(value = "99999999.99", message = "获得积分不在合法范围内") + @ApiModelProperty(value = "获得积分") + @DecimalMin(value="0.00", message = "获得积分不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "获得积分不在合法范围内") private BigDecimal giveIntegral; /** 成本价 */ + @ApiModelProperty(value = "成本价") @NotNull(message = "请输入成本价") - @DecimalMin(value = "0.00", message = "成本价不在合法范围内") - @DecimalMax(value = "99999999.99", message = "成本价不在合法范围内") + @DecimalMin(value="0.00", message = "成本价不在合法范围内" ) + @DecimalMax(value="99999999.99", message = "成本价不在合法范围内") private BigDecimal cost; + /** 秒杀状态 0 未开启 1已开启 */ + @ApiModelProperty(value = "秒杀状态 0 未开启 1已开启") + private Integer isSeckill; + + + /** 砍价状态 0未开启 1开启 */ + @ApiModelProperty(value = "砍价状态 0 未开启 1已开启") + private Integer isBargain; + + /** 是否优品推荐 */ + @ApiModelProperty(value = "是否优品推荐(0:否,1:是)") private Integer isGood; /** 虚拟销量 */ + @ApiModelProperty(value = "虚拟销量") private Integer ficti; /** 浏览量 */ + @ApiModelProperty(value = "浏览量") private Integer browse; + + /** 产品二维码地址(用户小程序海报) */ + @ApiModelProperty(value = "品二维码地址(用户小程序海报) ") + private String codePath; + + @ApiModelProperty(value = "邮费模版ID") + private Integer tempId; + + @ApiModelProperty(value = "规格 0单 1多 ") + private Integer specType; + + @ApiModelProperty(value = "是否单独分佣") + private Integer isSub; + + @ApiModelProperty(value = "是否开启积分兑换") + private Integer isIntegral; + @TableField(exist = false) private YxStoreCategory storeCategory; - public void copy(YxStoreProduct source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreProduct source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttr.java b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductAttr.java similarity index 63% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttr.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductAttr.java index deb2212e34bc95f48489a61ef07bd0fffdeecd75..2f29cb064f3228ddf6b3049bedb97c979271aea5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttr.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductAttr.java @@ -1,25 +1,30 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.product.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; +import lombok.NoArgsConstructor; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@Builder +@AllArgsConstructor +@NoArgsConstructor @TableName("yx_store_product_attr") public class YxStoreProductAttr implements Serializable { @@ -39,7 +44,7 @@ public class YxStoreProductAttr implements Serializable { private String attrValues; - public void copy(YxStoreProductAttr source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreProductAttr source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrResult.java b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductAttrResult.java similarity index 70% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrResult.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductAttrResult.java index 0af24962d49eef957e499622e341ef2b578b1020..44188fb68e90f6280701943cde4842533531d00e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductAttrResult.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductAttrResult.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.product.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; @@ -16,9 +15,9 @@ import java.io.Serializable; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data @TableName("yx_store_product_attr_result") @@ -40,7 +39,7 @@ public class YxStoreProductAttrResult implements Serializable { private Date changeTime; - public void copy(YxStoreProductAttrResult source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreProductAttrResult source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductAttrValue.java b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductAttrValue.java new file mode 100644 index 0000000000000000000000000000000000000000..01c2b960c8e777d09085e3d7fffa1813cdf9f357 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductAttrValue.java @@ -0,0 +1,133 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.product.domain; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import co.yixiang.serializer.BigDecimalSerializer; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** +* @author hupeng +* @date 2020-05-12 +*/ + +@Builder +@AllArgsConstructor +@NoArgsConstructor +@Getter +@Setter +@TableName("yx_store_product_attr_value") +public class YxStoreProductAttrValue implements Serializable { + + @TableId + private Long id; + + + /** 商品ID */ + @ApiModelProperty(value = "商品ID") + private Long productId; + + + /** 商品属性索引值 (attr_value|attr_value[|....]) */ + @ApiModelProperty(value = "商品属性索引值 (attr_value|attr_value[|....])") + private String sku; + + + /** 属性对应的库存 */ + @ApiModelProperty(value = "属性对应的库存") + private Integer stock; + + /** 拼团库存属性对应的库存 */ + @ApiModelProperty(value = "拼团库存属性对应的库存") + private Integer pinkStock; + + /** 秒杀库存属性对应的库存 */ + @ApiModelProperty(value = "秒杀库存属性对应的库存") + private Integer seckillStock; + + /** 销量 */ + @ApiModelProperty(value = "销量") + private Integer sales; + + + /** 属性金额 */ + @ApiModelProperty(value = "属性金额") + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal price; + + /** 拼团属性对应的金额 */ + @ApiModelProperty(value = "拼团属性对应的金额") + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal pinkPrice; + + /** 秒杀属性对应的金额 */ + @ApiModelProperty(value = "秒杀属性对应的金额") + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal seckillPrice; + + /** 图片 */ + @ApiModelProperty(value = "属性对应的图片") + private String image; + + + /** 唯一值 */ + @TableField(value = "`unique`") + @ApiModelProperty(value = "唯一值") + private String unique; + + + /** 成本价 */ + @ApiModelProperty(value = "成本价") + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal cost; + + /** 商品条码 */ + @ApiModelProperty(value = "商品条码") + private String barCode; + + /** 原价 */ + @ApiModelProperty(value = "原价") + private BigDecimal otPrice; + + /** 重量 */ + @ApiModelProperty(value = "重量") + private BigDecimal weight; + + /** 体积 */ + @ApiModelProperty(value = "体积") + private BigDecimal volume; + + + /** 一级返佣 */ + @ApiModelProperty(value = "一级返佣") + private BigDecimal brokerage; + + /** 二级返佣 */ + @ApiModelProperty(value = "二级返佣") + private BigDecimal brokerageTwo; + + /** 所需多少积分兑换商品 */ + @ApiModelProperty(value = "所需多少积分兑换商品") + private Integer integral; + + + public void copy(YxStoreProductAttrValue source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductRelation.java b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductRelation.java new file mode 100644 index 0000000000000000000000000000000000000000..0d5465a89ec3690d3c3f943f26015da532812b98 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductRelation.java @@ -0,0 +1,49 @@ +package co.yixiang.modules.product.domain; + + +import co.yixiang.domain.BaseDomain; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + *

+ * 商品点赞和收藏表 + *

+ * + * @author hupeng + * @since 2019-10-23 + */ + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class YxStoreProductRelation extends BaseDomain { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "用户ID") + private Long uid; + + @ApiModelProperty(value = "商品ID") + private Long productId; + + @ApiModelProperty(value = "类型(收藏(collect)、点赞(like)、足迹(foot))") + private String type; + + @ApiModelProperty(value = "某种类型的商品(普通商品、秒杀商品)") + private String category; + + + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductReply.java b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductReply.java similarity index 71% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductReply.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductReply.java index 3b8b261535126de4c5c19385c1e41ebb3a80a42b..651051b952ec7865672491e68c0fff94b4cd58cf 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxStoreProductReply.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductReply.java @@ -1,28 +1,36 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.product.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; +import co.yixiang.modules.user.domain.YxUser; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; +import lombok.AllArgsConstructor; +import lombok.Builder; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; -import java.io.Serializable; +import javax.validation.constraints.NotBlank; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) +@AllArgsConstructor +@NoArgsConstructor +@Builder @TableName("yx_store_product_reply") public class YxStoreProductReply extends BaseDomain { @@ -68,7 +76,9 @@ public class YxStoreProductReply extends BaseDomain { private String pics; + /** 管理员回复内容 */ + @NotBlank(message = "回复内容不能为空") private String merchantReplyContent; @@ -85,7 +95,7 @@ public class YxStoreProductReply extends BaseDomain { @TableField(exist = false) private YxUser user; - public void copy(YxStoreProductReply source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxStoreProductReply source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductRule.java b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductRule.java new file mode 100644 index 0000000000000000000000000000000000000000..7622f1819c554d13c38939f360c706b4e561b89a --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/domain/YxStoreProductRule.java @@ -0,0 +1,51 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.product.domain; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import co.yixiang.domain.BaseDomain; +import com.alibaba.fastjson.JSONArray; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; + +/** +* @author hupeng +* @date 2020-06-28 +*/ +@Data +@TableName(value = "yx_store_product_rule",autoResultMap = true) +public class YxStoreProductRule extends BaseDomain { + + @TableId + private Integer id; + + + /** 规格名称 */ + @NotBlank(message = "请输入规则名称") + private String ruleName; + + + /** 规格值 */ + @TableField(typeHandler = FastjsonTypeHandler.class) + @NotNull(message = "规格名称/值必填") + private JSONArray ruleValue; + + + + public void copy(YxStoreProductRule source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/param/YxStoreProductQueryParam.java b/yshop-mall/src/main/java/co/yixiang/modules/product/param/YxStoreProductQueryParam.java new file mode 100644 index 0000000000000000000000000000000000000000..3ec842e3617e478c5be3b958b1bea01fe2808452 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/param/YxStoreProductQueryParam.java @@ -0,0 +1,43 @@ +package co.yixiang.modules.product.param; + +import co.yixiang.common.web.param.QueryParam; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 商品表 查询参数对象 + *

+ * + * @author hupeng + * @date 2019-10-19 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value="YxStoreProductQueryParam对象", description="商品表查询参数") +public class YxStoreProductQueryParam extends QueryParam { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "类别") + private String type; + + @ApiModelProperty(value = "分类ID") + private String sid; + + @ApiModelProperty(value = "是否新品") + private String news; + + @ApiModelProperty(value = "是否积分兑换商品") + private Integer isIntegral; + + @ApiModelProperty(value = "价格排序") + private String priceOrder; + + @ApiModelProperty(value = "销量排序") + private String salesOrder; + + @ApiModelProperty(value = "关键字") + private String keyword; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductAttrResultService.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductAttrResultService.java new file mode 100644 index 0000000000000000000000000000000000000000..b3044c7876b674ab8b5fa481022f9db4a312e928 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductAttrResultService.java @@ -0,0 +1,29 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.product.domain.YxStoreProductAttrResult; + +import java.util.Map; + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreProductAttrResultService extends BaseService{ + + /** + * 新增商品属性详情 + * @param map map + * @param productId 商品id + */ + void insertYxStoreProductAttrResult(Map map, Long productId); +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductAttrService.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductAttrService.java new file mode 100644 index 0000000000000000000000000000000000000000..69f5ba3c4af305292cbed793565b6243541fa591 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductAttrService.java @@ -0,0 +1,66 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.product.domain.YxStoreProductAttr; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.service.dto.FromatDetailDto; +import co.yixiang.modules.product.service.dto.ProductFormatDto; + +import java.util.List; +import java.util.Map; + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreProductAttrService extends BaseService{ + + /** + * 增加库存减去销量 + * @param num 数量 + * @param productId 商品id + * @param unique sku唯一值 + */ + void incProductAttrStock(Integer num, Long productId, String unique,String type); + + /** + * 减少库存增加销量 + * @param num 数量 + * @param productId 商品id + * @param unique sku唯一值 + */ + void decProductAttrStock(int num, Long productId, String unique,String type); + + + /** + * 更加sku 唯一值获取sku对象 + * @param unique 唯一值 + * @return YxStoreProductAttrValue + */ + YxStoreProductAttrValue uniqueByAttrInfo(String unique); + + /** + * 获取商品sku属性 + * @param productId 商品id + * @return map + */ + Map getProductAttrDetail(long productId); + + /** + * 新增商品属性 + * @param items attr + * @param attrs value + * @param productId 商品id + */ + void insertYxStoreProductAttr(List items, List attrs, + Long productId); +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductAttrValueService.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductAttrValueService.java new file mode 100644 index 0000000000000000000000000000000000000000..18e0f6117c9794178f892471a82754fad241d238 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductAttrValueService.java @@ -0,0 +1,21 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreProductAttrValueService extends BaseService{ + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductRelationService.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductRelationService.java new file mode 100644 index 0000000000000000000000000000000000000000..76a8565eea8ffe08365725686806345ef47e6dcf --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductRelationService.java @@ -0,0 +1,93 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service; + + +import co.yixiang.common.service.BaseService; +import co.yixiang.domain.PageResult; +import co.yixiang.modules.product.domain.YxStoreProductRelation; +import co.yixiang.modules.product.service.dto.YxStoreProductRelationDto; +import co.yixiang.modules.product.service.dto.YxStoreProductRelationQueryCriteria; +import co.yixiang.modules.product.vo.YxStoreProductRelationQueryVo; +import javax.servlet.http.HttpServletResponse; +import org.springframework.data.domain.Pageable; +import java.io.IOException; +import java.util.List; + +/** + *

+ * 商品点赞和收藏表 服务类 + *

+ * + * @author hupeng + * @since 2019-10-23 + */ +public interface YxStoreProductRelationService extends BaseService { + + /** + * 是否收藏 + * @param productId 商品ID + * @param uid 用户ID + * @return Boolean + */ + Boolean isProductRelation(long productId, long uid,String category); + + /** + *添加收藏 + * @param productId 商品id + * @param uid 用户id + */ + void addRroductRelation(long productId,long uid,String category,String type); + + /** + * 取消收藏 + * @param productId 商品id + * @param uid 用户id + */ + void delRroductRelation(long productId,long uid,String category,String type); + + /** + * 获取用户收藏列表 + * @param page page + * @param limit limit + * @param uid 用户id + * @return list + */ + List userCollectProduct(int page, int limit, Long uid,String type); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + PageResult queryAll(YxStoreProductRelationQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreProductRelationQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + + /** + * 批量删除 + * @param ids / + */ + void collectDelFoot(List ids); +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductReplyService.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductReplyService.java new file mode 100644 index 0000000000000000000000000000000000000000..55fa29926f5c9a226177442eac39b6b262704f5c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductReplyService.java @@ -0,0 +1,92 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.product.domain.YxStoreProductReply; +import co.yixiang.modules.product.service.dto.YxStoreProductReplyDto; +import co.yixiang.modules.product.service.dto.YxStoreProductReplyQueryCriteria; +import co.yixiang.modules.product.vo.ReplyCountVo; +import co.yixiang.modules.product.vo.YxStoreProductReplyQueryVo; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreProductReplyService extends BaseService{ + + /** + * 评价数据 + * @param productId 商品id + * @return ReplyCountVO + */ + ReplyCountVo getReplyCount(long productId); + + /** + * 处理评价 + * @param replyQueryVo replyQueryVo + * @return YxStoreProductReplyQueryVo + */ + YxStoreProductReplyQueryVo handleReply(YxStoreProductReplyQueryVo replyQueryVo); + + /** + * 获取单条评价 + * @param productId 商品di + * @return YxStoreProductReplyQueryVo + */ + YxStoreProductReplyQueryVo getReply(long productId); + + /** + * 获取评价列表 + * @param productId 商品id + * @param type 0-全部 1-好评 2-中评 3-差评 + * @param page page + * @param limit limit + * @return list + */ + List getReplyList(long productId,int type,int page, int limit); + + Long getInfoCount(Integer oid, String unique); + + Long productReplyCount(long productId); + + Long replyCount(String unique); + + String replyPer(long productId); + + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreProductReplyQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreProductReplyQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductRuleService.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductRuleService.java new file mode 100644 index 0000000000000000000000000000000000000000..bcb78ba06f9c6d3b2a501172e03af4e03e39939f --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductRuleService.java @@ -0,0 +1,50 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.product.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.product.domain.YxStoreProductRule; +import co.yixiang.modules.product.service.dto.YxStoreProductRuleDto; +import co.yixiang.modules.product.service.dto.YxStoreProductRuleQueryCriteria; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-06-28 +*/ +public interface YxStoreProductRuleService extends BaseService { + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreProductRuleQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreProductRuleQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductService.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductService.java new file mode 100644 index 0000000000000000000000000000000000000000..03b8d160a45172fb230eea4d333768e81aa06941 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/YxStoreProductService.java @@ -0,0 +1,151 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.param.YxStoreProductQueryParam; +import co.yixiang.modules.product.service.dto.StoreProductDto; +import co.yixiang.modules.product.service.dto.YxStoreProductDto; +import co.yixiang.modules.product.service.dto.YxStoreProductQueryCriteria; +import co.yixiang.modules.product.vo.ProductVo; +import co.yixiang.modules.product.vo.YxStoreProductQueryVo; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxStoreProductService extends BaseService{ + + /** + * 增加库存 减少销量 + * @param num 数量 + * @param productId 商品id + * @param unique sku唯一值 + */ + void incProductStock(Integer num, Long productId, String unique,Long activityId, String type); + + /** + * 减少库存与增加销量 + * @param num 数量 + * @param productId 商品id + * @param unique sku + */ + void decProductStock(int num, Long productId, String unique,Long activityId,String type); + + YxStoreProduct getProductInfo(Long id); + + /** + * 获取单个商品 + * @param id 商品id + * @return YxStoreProductQueryVo + */ + YxStoreProductQueryVo getStoreProductById(Long id); + + /** + * 返回普通商品库存 + * @param productId 商品id + * @param unique sku唯一值 + * @return int + */ + int getProductStock(Long productId, String unique,String type); + + /** + * 商品列表 + * @param productQueryParam YxStoreProductQueryParam + * @return list + */ + List getGoodsList(YxStoreProductQueryParam productQueryParam); + + /** + * 商品详情 + * @param id 商品id + * @param uid 用户id + * @param latitude 纬度 + * @param longitude 经度 + * @return ProductVo + */ + ProductVo goodsDetail(Long id, Long uid, String latitude, String longitude); + + /** + * 商品浏览量 + * @param productId + */ + void incBrowseNum(Long productId); + + /** + * 商品列表 + * @param page 页码 + * @param limit 条数 + * @param order ProductEnum + * @return List + */ + List getList(int page, int limit, int order); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreProductQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreProductQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + + + /** + * 商品上架下架 + * @param id 商品id + * @param status ShopCommonEnum + */ + void onSale(Long id,Integer status); + + /** + * 获取生成的属性 + * @param id 商品id + * @param jsonStr jsonStr + * @return map + */ + Map getFormatAttr(Long id, String jsonStr,boolean isActivity); + + + + + /** + * 新增/保存商品 + * @param storeProductDto 商品 + */ + void insertAndEditYxStoreProduct(StoreProductDto storeProductDto); + + /**+ + * 删除商品转发海报 + * @param id + */ + void deleteForwardImg(Long id); +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/AttrValueDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/AttrValueDto.java new file mode 100644 index 0000000000000000000000000000000000000000..a52df4bb5c9ae18f4e1780e1deaaf0795ae494a3 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/AttrValueDto.java @@ -0,0 +1,19 @@ +package co.yixiang.modules.product.service.dto; + +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** + * @ClassName AttrValueDTO + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/23 + **/ +@Data +public class AttrValueDto { + + @ApiModelProperty(value = "属性") + private String attr; + + @ApiModelProperty(value = "是否选择") + private Boolean check = false; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/DetailDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/DetailDto.java similarity index 70% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/DetailDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/DetailDto.java index ddc89a957d5b303d0c21f861834116f80adf0e04..eef3510001626091761bcb7dc4567afd74a72803 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/DetailDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/DetailDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.product.service.dto; import lombok.Data; @@ -22,5 +21,5 @@ public class DetailDto { //private List>>> res; - private List>> res; + private List>> res; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/FromatDetailDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/FromatDetailDto.java similarity index 49% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/FromatDetailDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/FromatDetailDto.java index 916a3ea373f73471553caa40ddbb533099dcec70..5cec7ab72b8c0daaba009ab3a95dc584ecfe743f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/FromatDetailDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/FromatDetailDto.java @@ -1,12 +1,15 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.product.service.dto; -import lombok.Data; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; import java.util.List; @@ -16,11 +19,15 @@ import java.util.List; * @Date 2019/10/12 **/ -@Data +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +@Builder public class FromatDetailDto { - private boolean attrHidden; + private String attrHidden; - private String detailValue; + private String detailValue; private List detail; diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/ProductDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/ProductDto.java new file mode 100644 index 0000000000000000000000000000000000000000..e6c823b8f95a41c2ed85c6d1c1c7b22967c30fa9 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/ProductDto.java @@ -0,0 +1,150 @@ +package co.yixiang.modules.product.service.dto; + + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.List; +import java.util.Map; + +/** + * 商品对象VO + * + * @author hupeng + * @date 2020-04-25 + */ +@NoArgsConstructor +@AllArgsConstructor +@Getter +@Setter +public class ProductDto +{ + + /** 商品id */ + private Long id; + + + /** 商品图片 */ + private String image; + + /** 轮播图 */ + @JsonProperty("slider_image") + private List sliderImage; + + /** 商品名称 */ + @JsonProperty("store_name") + private String storeName; + + /** 商品简介 */ + @JsonProperty("store_info") + private String storeInfo; + + /** 关键字 */ + private String keyword; + + /** 商品条码(一维码) */ + @JsonProperty("bar_code") + private String barCode; + + /** 分类id */ + @JsonProperty("cate_id") + private String cateId; + + /** 商品价格 */ + private Double price; + + + /** 市场价 */ + @JsonProperty("ot_price") + private Double otPrice; + + /** 邮费 */ + private Double postage; + + /** 单位名 */ + @JsonProperty("unit_name") + private String unitName; + + /** 排序 */ + private Long sort; + + /** 销量 */ + private Long sales; + + /** 库存 */ + private Long stock; + + /** 状态(0:未上架,1:上架) */ + @JsonProperty("is_show") + private Integer isShow; + + /** 是否热卖 */ + @JsonProperty("is_hot") + private Integer isHot; + + /** 是否优惠 */ + @JsonProperty("is_benefit") + private Integer isBenefit; + + /** 是否精品 */ + @JsonProperty("is_best") + private Integer isBest; + + /** 是否新品 */ + @JsonProperty("is_new") + private Integer isNew; + + /** 商品描述 */ + private String description; + + + /** 是否包邮 */ + @JsonProperty("is_postage") + private Integer isPostage; + + + /** 获得积分 */ + @JsonProperty("give_integral") + private Double giveIntegral; + + /** 成本价 */ + private Double cost; + + + /** 是否优品推荐 */ + @JsonProperty("is_good") + private Integer isGood; + + /** 是否单独分佣 */ + @JsonProperty("is_sub") + private Integer isSub; + + /** 是否开启啊积分兑换 */ + @JsonProperty("is_integral") + private Integer isIntegral; + + /** 虚拟销量 */ + private Long ficti; + + + /** 运费模板ID */ + @JsonProperty("temp_id") + private Long tempId; + + /** 规格 0单 1多 */ + @JsonProperty("spec_type") + private Integer specType; + + private ProductFormatDto attr; + + private List items; + + private List attrs; + + + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/ProductFormatDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/ProductFormatDto.java new file mode 100644 index 0000000000000000000000000000000000000000..1d53c7405f93cdcbb0bfae85ae39645e92bf65c9 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/ProductFormatDto.java @@ -0,0 +1,71 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.product.service.dto; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.util.Map; + +/** + * @ClassName ProductFormatDTO + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/12 + **/ + +@Builder +@AllArgsConstructor +@NoArgsConstructor +@Getter +@Setter +public class ProductFormatDto { + + private String sku = ""; + + @JsonProperty("bar_code") + private String barCode = ""; + + private Double brokerage = 0d; + + @JsonProperty("brokerage_two") + private Double brokerageTwo = 0d; + + private Double price = 0d; + + @JsonProperty("ot_price") + private Double otPrice = 0d; + + private Double cost = 0d; + + private Integer stock = 0; + + private Integer integral = 0; + + private String pic = ""; + + private String value1 = ""; + + private String value2 = ""; + + private Double volume = 0d; + + private Double weight = 0d; + @JsonProperty("pink_price") + private Double pinkPrice = 0d; + @JsonProperty("pink_stock") + private Integer pinkStock = 0; + @JsonProperty("seckill_price") + private Double seckillPrice = 0d; + @JsonProperty("seckill_stock") + private Integer seckillStock = 0; + + private Map detail; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/ProductResultDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/ProductResultDto.java new file mode 100644 index 0000000000000000000000000000000000000000..7b614cdd3466b3f3285eaaf0b62982d1bdf87e6b --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/ProductResultDto.java @@ -0,0 +1,26 @@ +package co.yixiang.modules.product.service.dto; + +import io.swagger.models.auth.In; +import lombok.Builder; +import lombok.Getter; +import lombok.Setter; + +/** + * @ClassName 产品结果DTO + * @Author hupeng <610796224@qq.com> + * @Date 2020/4/24 + **/ +@Getter +@Setter +@Builder +public class ProductResultDto { + private Double minPrice; + + private Double minOtPrice; + + private Double minCost; + + private Integer stock; + + private Integer minIntegral; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/StoreProductDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/StoreProductDto.java new file mode 100644 index 0000000000000000000000000000000000000000..3e75bb1168b4462e59ad615c45b60b7d75485352 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/StoreProductDto.java @@ -0,0 +1,150 @@ +package co.yixiang.modules.product.service.dto; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.util.List; +import java.util.Map; + + +/** + * 商品对象DTO + * + * @author hupeng + * @date 2020-04-23 + */ +@Getter +@Setter +@ToString +public class StoreProductDto +{ + + /** 商品id */ + private Long id; + + + /** 商品图片 */ + @NotBlank(message = "商品图片必传") + private String image; + + /** 轮播图 */ + @NotNull(message = "轮播图不为空") + @JsonProperty("slider_image") + private List sliderImage; + + /** 商品名称 */ + @NotBlank(message = "商品名称不能为空") + @JsonProperty("store_name") + private String storeName; + + /** 商品简介 */ + @JsonProperty("store_info") + private String storeInfo; + + /** 关键字 */ + @NotBlank(message = "关键字不能为空") + private String keyword; + + /** 商品条码(一维码) */ + @JsonProperty("bar_code") + private String barCode; + + /** 分类id */ + @NotNull(message = "分类id不能为空") + @JsonProperty("cate_id") + private String cateId; + + /** 商品价格 */ + private Double price; + + /** 市场价 */ + private Double otPrice; + + /** 邮费 */ + private Double postage; + + /** 单位名 */ + @JsonProperty("unit_name") + private String unitName; + + /** 排序 */ + private Long sort; + + /** 销量 */ + private Long sales; + + /** 库存 */ + private Long stock; + + /** 状态(0:未上架,1:上架) */ + @JsonProperty("is_show") + private Integer isShow; + + /** 是否热卖 */ + @JsonProperty("is_hot") + private Integer isHot; + + /** 是否优惠 */ + @JsonProperty("is_benefit") + private Integer isBenefit; + + /** 是否精品 */ + @JsonProperty("is_best") + private Integer isBest; + + /** 是否新品 */ + @JsonProperty("is_new") + private Integer isNew; + + /** 商品描述 */ + @NotBlank(message = "商品详情不能为空") + private String description; + + + /** 是否包邮 */ + @JsonProperty("is_postage") + private Integer isPostage; + + /** 获得积分 */ + @JsonProperty("give_integral") + private Double giveIntegral; + + /** 成本价 */ + private Double cost; + + + /** 是否优品推荐 */ + @JsonProperty("is_good") + private Integer isGood; + + /** 是否单独分佣 */ + @JsonProperty("is_sub") + private Integer isSub; + + /** 是否开启啊积分兑换 */ + @JsonProperty("is_integral") + private Integer isIntegral; + + /** 虚拟销量 */ + private Long ficti; + + /** 运费模板ID */ + @JsonProperty("temp_id") + private Long tempId; + + /** 规格 0单 1多 */ + @JsonProperty("spec_type") + private Integer specType; + + //属性项目 + private List items; + + //sku结果集 + private List attrs; + + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductAttrQueryCriteria.java similarity index 61% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductAttrQueryCriteria.java index ffb42b6c329f06355ec41efc4307ec83cccf8b3e..bd74a715c9d4ebdb46d3f5b0a5d8c0accf983584 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductAttrQueryCriteria.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.product.service.dto; import lombok.Data; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrValueQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductAttrValueQueryCriteria.java similarity index 62% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrValueQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductAttrValueQueryCriteria.java index a7dc75c2f87ae7702e026e25d3900498998cdd96..fe092091f65aa62c97a2ba9f15deeaa34a1acd38 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductAttrValueQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductAttrValueQueryCriteria.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.product.service.dto; import lombok.Data; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductDto.java similarity index 66% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductDto.java index 04790894ee6892d89152c49899f1b76a44b3a824..c0d2645b5b84574047d4ad04169db8643f9fc0a0 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductDto.java @@ -1,26 +1,29 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.product.service.dto; +import co.yixiang.modules.category.service.dto.YxStoreCategorySmallDto; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; -import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxStoreProductDto implements Serializable { /** 商品id */ - private Long id; + private Integer id; + + /** 商户Id(0为总后台管理员创建,不为0的时候是商户后台创建) */ + private Integer merId; /** 商品图片 */ private String image; @@ -86,17 +89,29 @@ public class YxStoreProductDto implements Serializable { private String description; /** 添加时间 */ - private Date createTime; + private Integer addTime; /** 是否包邮 */ private Integer isPostage; + /** 是否删除 */ + private Integer isDel; + + /** 商户是否代理 0不可代理1可代理 */ + private Integer merUse; + /** 获得积分 */ private BigDecimal giveIntegral; /** 成本价 */ private BigDecimal cost; + /** 秒杀状态 0 未开启 1已开启 */ + private Integer isSeckill; + + /** 砍价状态 0未开启 1开启 */ + private Integer isBargain; + /** 是否优品推荐 */ private Integer isGood; @@ -106,6 +121,14 @@ public class YxStoreProductDto implements Serializable { /** 浏览量 */ private Integer browse; + /** 产品二维码地址(用户小程序海报) */ + private String codePath; + + /** 淘宝京东1688类型 */ + private String soureLink; + + @ApiModelProperty(value = "是否开启积分兑换") + private Integer isIntegral; private YxStoreCategorySmallDto storeCategory; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductQueryCriteria.java similarity index 61% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductQueryCriteria.java index 4a7dd492c4ba890aa58ea5ddc940f8d35dd01e82..e65473cbbddf8a3a9ad35f040a8627b36c035b3f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductQueryCriteria.java @@ -1,20 +1,19 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.product.service.dto; import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxStoreProductQueryCriteria { +public class YxStoreProductQueryCriteria{ // 模糊 @Query(type = Query.Type.INNER_LIKE) @@ -26,4 +25,10 @@ public class YxStoreProductQueryCriteria { @Query private Integer isShow; + + @Query + private Integer cateId; + + @Query + private Integer isIntegral; } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRelationDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRelationDto.java new file mode 100644 index 0000000000000000000000000000000000000000..fa4160184b7f676359304d3d26e806113f1495e3 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRelationDto.java @@ -0,0 +1,54 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service.dto; + +import co.yixiang.modules.product.domain.YxStoreProduct; +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.sql.Timestamp; +import java.io.Serializable; + +/** + * @author hupeng + * @date 2020-09-03 + */ +@Data +public class YxStoreProductRelationDto implements Serializable { + + private Long id; + + /** 用户ID */ + private Long uid; + + private String userName; + + /** 商品ID */ + private Long productId; + + private YxStoreProduct product; + + /** 类型(收藏(collect)、点赞(like)) */ + private String type; + + /** 某种类型的商品(普通商品、秒杀商品) */ + private String category; + + /** 添加时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Timestamp createTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Timestamp updateTime; + + private Integer isDel; +} + diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRelationQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRelationQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..155070e2e33523fc1250cdecd07337d8afd73e84 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRelationQueryCriteria.java @@ -0,0 +1,23 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service.dto; + +import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; + +/** + * @author hupeng + * @date 2020-09-03 + */ +@Data +public class YxStoreProductRelationQueryCriteria{ + @Query(type = Query.Type.EQUAL) + private String type; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductReplyDto.java similarity index 85% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductReplyDto.java index ca7a6ecde671d57c6c7cfa86e125e2645e99d602..f5ca7ada4bd0be39f572ced1fb2adcba9a6ad483 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductReplyDto.java @@ -1,20 +1,20 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.product.service.dto; +import co.yixiang.modules.user.service.dto.YxUserSmallDto; import lombok.Data; import java.io.Serializable; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxStoreProductReplyDto implements Serializable { @@ -54,7 +54,7 @@ public class YxStoreProductReplyDto implements Serializable { private String pics; // 评论时间 - private Integer addTime; + private Date createTime; // 管理员回复内容 private String merchantReplyContent; @@ -62,7 +62,6 @@ public class YxStoreProductReplyDto implements Serializable { // 管理员回复时间 private Date merchantReplyTime; - // 0未回复1已回复 private Integer isReply; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductReplyQueryCriteria.java similarity index 50% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductReplyQueryCriteria.java index 1a1eb7ef0b54a4820e841c796ecafd218e62fcf8..319ad68478c5eba8449118f48c6cc88dd5a1ae6a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductReplyQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductReplyQueryCriteria.java @@ -1,20 +1,19 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.product.service.dto; import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxStoreProductReplyQueryCriteria { +public class YxStoreProductReplyQueryCriteria{ @Query private Integer isDel; } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRuleDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRuleDto.java new file mode 100644 index 0000000000000000000000000000000000000000..0fea7050e9a7005084a5df270cfce2b8cb529cee --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRuleDto.java @@ -0,0 +1,37 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.product.service.dto; + +import com.alibaba.fastjson.JSONArray; +import lombok.Data; + +import java.io.Serializable; +import java.sql.Timestamp; + +/** +* @author hupeng +* @date 2020-06-28 +*/ +@Data +public class YxStoreProductRuleDto implements Serializable { + + private Integer id; + + /** 规格名称 */ + private String ruleName; + + /** 规格值 */ + private JSONArray ruleValue; + + private Timestamp createTime; + + private Timestamp updateTime; + + private Integer isDel; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRuleQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRuleQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..72783144b404a6116cfc7da02c716916f8cb0c46 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductRuleQueryCriteria.java @@ -0,0 +1,19 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.product.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-06-28 +*/ +@Data +public class YxStoreProductRuleQueryCriteria{ +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductSmallDto.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductSmallDto.java similarity index 71% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductSmallDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductSmallDto.java index 5f7c193d8556c050b39df6542aa8ed7bc8c9a264..632adf9aa52b3fc3177833fdbf9691a7e052c177 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreProductSmallDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/dto/YxStoreProductSmallDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.product.service.dto; import lombok.Data; @@ -12,9 +11,9 @@ import java.io.Serializable; /** - * @author hupeng - * @date 2019-10-04 - */ +* @author hupeng +* @date 2019-10-04 +*/ @Data public class YxStoreProductSmallDto implements Serializable { diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductAttrResultServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductAttrResultServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..7fe6e4fc8772fb1acf25a6d53d3452e35997fa86 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductAttrResultServiceImpl.java @@ -0,0 +1,59 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service.impl; + +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.modules.product.domain.YxStoreProductAttrResult; +import co.yixiang.modules.product.service.YxStoreProductAttrResultService; +import co.yixiang.modules.product.service.mapper.StoreProductAttrResultMapper; +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.AllArgsConstructor; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.Map; + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Service +@AllArgsConstructor +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreProductAttrResultServiceImpl extends BaseServiceImpl implements YxStoreProductAttrResultService { + + /** + * 新增商品属性详情 + * @param map map + * @param productId 商品id + */ + @Override + public void insertYxStoreProductAttrResult(Map map, Long productId) + { + YxStoreProductAttrResult yxStoreProductAttrResult = new YxStoreProductAttrResult(); + yxStoreProductAttrResult.setProductId(productId); + yxStoreProductAttrResult.setResult(JSON.toJSONString(map)); + yxStoreProductAttrResult.setChangeTime(new Date()); + + long count = this.count(Wrappers.lambdaQuery() + .eq(YxStoreProductAttrResult::getProductId,productId)); + if(count > 0) { + this.remove(Wrappers.lambdaQuery() + .eq(YxStoreProductAttrResult::getProductId,productId)); + } + + this.save(yxStoreProductAttrResult); + } + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductAttrServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductAttrServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..2ce44ee7ff790ccf905001cdd4dce461a419adf1 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductAttrServiceImpl.java @@ -0,0 +1,273 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.BusinessException; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.ProductTypeEnum; +import co.yixiang.exception.BadRequestException; +import co.yixiang.modules.product.domain.YxStoreProductAttr; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.service.YxStoreProductAttrResultService; +import co.yixiang.modules.product.service.YxStoreProductAttrService; +import co.yixiang.modules.product.service.YxStoreProductAttrValueService; +import co.yixiang.modules.product.service.dto.AttrValueDto; +import co.yixiang.modules.product.service.dto.FromatDetailDto; +import co.yixiang.modules.product.service.dto.ProductFormatDto; +import co.yixiang.modules.product.service.mapper.StoreProductAttrMapper; +import co.yixiang.modules.product.service.mapper.StoreProductAttrValueMapper; +import co.yixiang.modules.product.vo.YxStoreProductAttrQueryVo; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Propagation; +import org.springframework.transaction.annotation.Transactional; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Collections; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.Objects; +import java.util.stream.Collectors; + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class YxStoreProductAttrServiceImpl extends BaseServiceImpl implements YxStoreProductAttrService { + + @Autowired + private IGenerator generator; + + @Autowired + private StoreProductAttrMapper yxStoreProductAttrMapper; + @Autowired + private StoreProductAttrValueMapper yxStoreProductAttrValueMapper; + + @Autowired + private YxStoreProductAttrValueService storeProductAttrValueService; + @Autowired + private YxStoreProductAttrResultService storeProductAttrResultService; + + /** + * 新增商品属性 + * @param items attr + * @param attrs value + * @param productId 商品id + */ + @Override + @Transactional(rollbackFor = Exception.class) + public void insertYxStoreProductAttr(List items, List attrs, + Long productId) + { + List attrGroup = new ArrayList<>(); + for (FromatDetailDto fromatDetailDto : items) { + YxStoreProductAttr yxStoreProductAttr = YxStoreProductAttr.builder() + .productId(productId) + .attrName(fromatDetailDto.getValue()) + .attrValues(StrUtil.join(",",fromatDetailDto.getDetail())) + .build(); + + attrGroup.add(yxStoreProductAttr); + } + + /*int count = storeProductAttrValueService.count(Wrappers.lambdaQuery().eq(YxStoreProductAttrValue::getProductId, productId)); + if (count > 0 ) { + throw new BadRequestException("该产品已被添加到其他活动,禁止操作!"); + }*/ + + List valueGroup = new ArrayList<>(); + for (ProductFormatDto productFormatDto : attrs) { + + if(productFormatDto.getPinkStock()>productFormatDto.getStock() || productFormatDto.getSeckillStock()>productFormatDto.getStock()){ + throw new BadRequestException("活动商品库存不能大于原有商品库存"); + } + List stringList = new ArrayList<>(productFormatDto.getDetail().values()); + Collections.sort(stringList); + YxStoreProductAttrValue oldAttrValue = storeProductAttrValueService.getOne(new LambdaQueryWrapper() + .eq(YxStoreProductAttrValue::getSku, productFormatDto.getSku()) + .eq(YxStoreProductAttrValue::getProductId, productId)); + + String unique = IdUtil.simpleUUID(); + if (Objects.nonNull(oldAttrValue)) { + unique = oldAttrValue.getUnique(); + } + + YxStoreProductAttrValue yxStoreProductAttrValue = YxStoreProductAttrValue.builder() + .id(Objects.isNull(oldAttrValue) ? null : oldAttrValue.getId()) + .productId(productId) + .sku(StrUtil.join(",",stringList)) + .price(BigDecimal.valueOf(productFormatDto.getPrice())) + .cost(BigDecimal.valueOf(productFormatDto.getCost())) + .otPrice(BigDecimal.valueOf(productFormatDto.getOtPrice())) + .unique(unique) + .image(productFormatDto.getPic()) + .barCode(productFormatDto.getBarCode()) + .weight(BigDecimal.valueOf(productFormatDto.getWeight())) + .volume(BigDecimal.valueOf(productFormatDto.getVolume())) + .brokerage(BigDecimal.valueOf(productFormatDto.getBrokerage())) + .brokerageTwo(BigDecimal.valueOf(productFormatDto.getBrokerageTwo())) + .stock(productFormatDto.getStock()) + .integral(productFormatDto.getIntegral()) + .pinkPrice(BigDecimal.valueOf(productFormatDto.getPinkPrice()==null?0:productFormatDto.getPinkPrice())) + .seckillPrice(BigDecimal.valueOf(productFormatDto.getSeckillPrice()==null?0:productFormatDto.getSeckillPrice())) + .pinkStock(productFormatDto.getPinkStock()==null?0:productFormatDto.getPinkStock()) + .seckillStock(productFormatDto.getSeckillStock()==null?0:productFormatDto.getSeckillStock()) + .build(); + + valueGroup.add(yxStoreProductAttrValue); + } + + if(attrGroup.isEmpty() || valueGroup.isEmpty()){ + throw new BusinessException("请设置至少一个属性!"); + } + + //清理属性 + this.clearProductAttr(productId); + + //批量添加 + this.saveBatch(attrGroup); + storeProductAttrValueService.saveBatch(valueGroup); + + Map map = new LinkedHashMap<>(); + map.put("attr",items); + map.put("value",attrs); + + storeProductAttrResultService.insertYxStoreProductAttrResult(map,productId); + } + + /** + * 删除YxStoreProductAttrValue表的属性 + * @param productId 商品id + */ + private void clearProductAttr(Long productId) { + if(ObjectUtil.isNull(productId)) { + throw new YshopException("产品不存在"); + } + + yxStoreProductAttrMapper.delete(Wrappers.lambdaQuery() + .eq(YxStoreProductAttr::getProductId,productId)); + yxStoreProductAttrValueMapper.delete(Wrappers.lambdaQuery() + .eq(YxStoreProductAttrValue::getProductId,productId)); + + } + + + /** + * 增加库存减去销量 + * @param num 数量 + * @param productId 商品id + * @param unique sku唯一值 + */ + @Override + public void incProductAttrStock(Integer num, Long productId, String unique, String type ) { + + if(ProductTypeEnum.COMBINATION.getValue().equals(type)){ + yxStoreProductAttrValueMapper.incCombinationStockDecSales(num,productId,unique); + }else if(ProductTypeEnum.SECKILL.getValue().equals(type)){ + yxStoreProductAttrValueMapper.incSeckillStockDecSales(num,productId,unique); + }else { + yxStoreProductAttrValueMapper.incStockDecSales(num,productId,unique); + } + } + + /** + * 减少库存增加销量(针对sku操作) + * @param num 数量 + * @param productId 商品id + * @param unique sku唯一值 + */ + @Override + public void decProductAttrStock(int num, Long productId, String unique,String type) { + int res = 0; + if(ProductTypeEnum.COMBINATION.getValue().equals(type)){ + res = yxStoreProductAttrValueMapper.decCombinationStockIncSales(num,productId,unique); + }else if(ProductTypeEnum.SECKILL.getValue().equals(type)){ + res = yxStoreProductAttrValueMapper.decSeckillStockIncSales(num,productId,unique); + }else { + res = yxStoreProductAttrValueMapper.decStockIncSales(num,productId,unique); + } + if(res == 0) { + throw new YshopException("商品库存不足"); + } + } + + + + /** + * 更加sku 唯一值获取sku对象 + * @param unique 唯一值 + * @return YxStoreProductAttrValue + */ + @Override + public YxStoreProductAttrValue uniqueByAttrInfo(String unique) { + return yxStoreProductAttrValueMapper.selectOne(Wrappers.lambdaQuery() + .eq(YxStoreProductAttrValue::getUnique,unique)); + } + + + /** + * 获取商品sku属性 + * @param productId 商品id + * @return map + */ + @Override + public Map getProductAttrDetail(long productId) { + + List storeProductAttrs = yxStoreProductAttrMapper + .selectList(Wrappers.lambdaQuery() + .eq(YxStoreProductAttr::getProductId,productId) + .orderByAsc(YxStoreProductAttr::getAttrValues)); + + List productAttrValues = storeProductAttrValueService + .list(Wrappers.lambdaQuery() + .eq(YxStoreProductAttrValue::getProductId,productId)); + + + Map map = productAttrValues.stream() + .collect(Collectors.toMap(YxStoreProductAttrValue::getSku, p -> p)); + + List yxStoreProductAttrQueryVoList = new ArrayList<>(); + + for (YxStoreProductAttr attr : storeProductAttrs) { + List stringList = Arrays.asList(attr.getAttrValues().split(",")); + List attrValueDTOS = new ArrayList<>(); + for (String str : stringList) { + AttrValueDto attrValueDTO = new AttrValueDto(); + attrValueDTO.setAttr(str); + attrValueDTOS.add(attrValueDTO); + } + YxStoreProductAttrQueryVo attrQueryVo = generator.convert(attr,YxStoreProductAttrQueryVo.class); + attrQueryVo.setAttrValue(attrValueDTOS); + attrQueryVo.setAttrValueArr(stringList); + + yxStoreProductAttrQueryVoList.add(attrQueryVo); + } + + Map returnMap = new LinkedHashMap<>(2); + returnMap.put("productAttr",yxStoreProductAttrQueryVoList); + returnMap.put("productValue",map); + + return returnMap; + } + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrValueServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductAttrValueServiceImpl.java similarity index 53% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrValueServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductAttrValueServiceImpl.java index d7fe1e23b5622ad76d92f97e3ca3540e7ed8e9dd..9597e76898b09c11ace992a74f1f3d36a5e4f267 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrValueServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductAttrValueServiceImpl.java @@ -2,31 +2,28 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.impl; +package co.yixiang.modules.product.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; -import co.yixiang.modules.shop.domain.YxStoreProductAttrValue; -import co.yixiang.modules.shop.service.YxStoreProductAttrValueService; -import co.yixiang.modules.shop.service.mapper.StoreProductAttrValueMapper; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.service.YxStoreProductAttrValueService; +import co.yixiang.modules.product.service.mapper.StoreProductAttrValueMapper; import lombok.AllArgsConstructor; 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 - */ +* @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-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductRelationServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductRelationServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..4966f1d697dce7c689361f6f9a22f9398a9b11d2 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductRelationServiceImpl.java @@ -0,0 +1,221 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service.impl; + +import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.util.ArrayUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.domain.PageResult; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.ProductTypeEnum; +import co.yixiang.modules.activity.domain.YxStoreCombination; +import co.yixiang.modules.activity.domain.YxStoreSeckill; +import co.yixiang.modules.activity.service.YxStoreCombinationService; +import co.yixiang.modules.activity.service.YxStoreSeckillService; +import co.yixiang.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.domain.YxStoreProductRelation; +import co.yixiang.modules.product.service.YxStoreProductRelationService; +import co.yixiang.modules.product.service.YxStoreProductService; +import co.yixiang.modules.product.service.dto.YxStoreProductRelationDto; +import co.yixiang.modules.product.service.dto.YxStoreProductRelationQueryCriteria; +import co.yixiang.modules.product.service.mapper.YxStoreProductRelationMapper; +import co.yixiang.modules.product.vo.YxStoreProductRelationQueryVo; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.utils.FileUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageInfo; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import javax.servlet.http.HttpServletResponse; +import org.springframework.data.domain.Pageable; +import java.io.IOException; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + + +/** + *

+ * 商品点赞和收藏表 服务实现类 + *

+ * + * @author hupeng + * @since 2019-10-23 + */ +@Slf4j +@Service +@AllArgsConstructor +@Transactional(rollbackFor = Exception.class) +public class YxStoreProductRelationServiceImpl extends BaseServiceImpl implements YxStoreProductRelationService { + + private final YxStoreProductRelationMapper yxStoreProductRelationMapper; + private final YxStoreProductService storeProductService; + private final YxUserService userService; + private final IGenerator generator; + private final YxStoreCombinationService storeCombinationService; + private final YxStoreSeckillService storeSeckillService; + + /** + * 获取用户收藏列表 + * @param page page + * @param limit limit + * @param uid 用户id + * @return list + */ + @Override + public List userCollectProduct(int page, int limit, Long uid,String type) { + Page pageModel = new Page<>(page, limit); + IPage pageList = yxStoreProductRelationMapper.selectPage(pageModel + ,new LambdaQueryWrapper().eq(YxStoreProductRelation::getUid,uid) + .eq(YxStoreProductRelation::getType,type)); + List list = ListUtil.list(false); + for (YxStoreProductRelation yxStoreProductRelation : pageList.getRecords()) { + YxStoreProductRelationQueryVo relationQueryVo = generator + .convert(yxStoreProductRelation,YxStoreProductRelationQueryVo.class); + String storeName = ""; + String image = ""; + Double price = 0d; + if(ProductTypeEnum.PRODUCT.getValue().equals(yxStoreProductRelation.getCategory())){ + YxStoreProduct yxStoreProduct = storeProductService.getById(yxStoreProductRelation.getProductId()); + storeName = yxStoreProduct.getStoreName(); + image = yxStoreProduct.getImage(); + price = yxStoreProduct.getPrice().doubleValue(); + relationQueryVo.setIsIntegral(yxStoreProduct.getIsIntegral()); + }else if(ProductTypeEnum.COMBINATION.getValue().equals(yxStoreProductRelation.getCategory())){ + YxStoreCombination yxStoreCombination = storeCombinationService.getById(yxStoreProductRelation.getProductId()); + storeName = yxStoreCombination.getTitle(); + image = yxStoreCombination.getImage(); + price = yxStoreCombination.getPrice().doubleValue(); + }else if(ProductTypeEnum.SECKILL.getValue().equals(yxStoreProductRelation.getCategory())){ + YxStoreSeckill yxStoreSeckill = storeSeckillService.getById(yxStoreProductRelation.getProductId()); + storeName = yxStoreSeckill.getTitle(); + image = yxStoreSeckill.getImage(); + price = yxStoreSeckill.getPrice().doubleValue(); + } + relationQueryVo.setStoreName(storeName); + relationQueryVo.setImage(image); + relationQueryVo.setPrice(price); + list.add(relationQueryVo); + } + // List list = yxStoreProductRelationMapper.selectRelationList(pageModel,uid,type); + return list; + } + + /** + * 添加收藏 + * @param productId 商品id + * @param uid 用户id + */ + @Override + public void addRroductRelation(long productId,long uid,String category,String type) { + if(isProductRelation(productId,uid,category)) { + throw new YshopException("已收藏"); + } + YxStoreProductRelation storeProductRelation = YxStoreProductRelation.builder() + .productId(productId) + .uid(uid) + .type(type) + .category(category) + .build(); + yxStoreProductRelationMapper.insert(storeProductRelation); + } + + /** + * 取消收藏 + * @param productId 商品id + * @param uid 用户id + */ + @Override + public void delRroductRelation(long productId,long uid,String category,String type) { + YxStoreProductRelation productRelation = this.lambdaQuery() + .eq(YxStoreProductRelation::getProductId,productId) + .eq(YxStoreProductRelation::getUid,uid) + .eq(YxStoreProductRelation::getType,type) + .eq(YxStoreProductRelation::getCategory,category) + .one(); + if(productRelation == null) { + throw new YshopException("已取消"); + } + this.removeById(productRelation.getId()); + } + + + /** + * 是否收藏 + * @param productId 商品ID + * @param uid 用户ID + * @return Boolean + */ + @Override + public Boolean isProductRelation(long productId, long uid,String category) { + Long count = yxStoreProductRelationMapper + .selectCount(Wrappers.lambdaQuery() + .eq(YxStoreProductRelation::getUid,uid) + .eq(YxStoreProductRelation::getType,"collect") + .eq(YxStoreProductRelation::getCategory,category) + .eq(YxStoreProductRelation::getProductId,productId)); + if(count > 0) { + return true; + } + + return false; + } + + @Override + //@Cacheable + public PageResult queryAll(YxStoreProductRelationQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + PageResult relationDtoPageResult = generator.convertPageInfo(page, YxStoreProductRelationDto.class); + relationDtoPageResult.getContent().forEach(i ->{ + i.setProduct(storeProductService.getById(i.getProductId())); + i.setUserName(userService.getYxUserById(i.getUid()).getNickname()); + }); + return relationDtoPageResult; + } + + + @Override + //@Cacheable + public List queryAll(YxStoreProductRelationQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreProductRelation.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreProductRelationDto yxStoreProductRelation : all) { + Map map = new LinkedHashMap<>(); + map.put("用户ID", yxStoreProductRelation.getUid()); + map.put("商品ID", yxStoreProductRelation.getProductId()); + map.put("类型(收藏(collect)、点赞(like))", yxStoreProductRelation.getType()); + map.put("某种类型的商品(普通商品、秒杀商品)", yxStoreProductRelation.getCategory()); + map.put("添加时间", yxStoreProductRelation.getCreateTime()); + map.put(" updateTime", yxStoreProductRelation.getUpdateTime()); + map.put(" isDel", yxStoreProductRelation.getIsDel()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + @Override + public void collectDelFoot(List ids) { + yxStoreProductRelationMapper.deleteBatchIds(ids); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductReplyServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductReplyServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..4f0d653fde3b9b006133655dda8e5e6bfa7004e4 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductReplyServiceImpl.java @@ -0,0 +1,280 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service.impl; + +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.product.domain.YxStoreProductReply; +import co.yixiang.modules.product.service.YxStoreProductReplyService; +import co.yixiang.modules.product.service.YxStoreProductService; +import co.yixiang.modules.product.service.dto.YxStoreProductReplyDto; +import co.yixiang.modules.product.service.dto.YxStoreProductReplyQueryCriteria; +import co.yixiang.modules.product.service.mapper.StoreProductReplyMapper; +import co.yixiang.modules.product.vo.ReplyCountVo; +import co.yixiang.modules.product.vo.YxStoreProductReplyQueryVo; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.utils.FileUtil; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.BeanUtils; +import org.springframework.beans.factory.annotation.Autowired; +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.math.BigDecimal; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Service +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxStoreProductReplyServiceImpl extends BaseServiceImpl implements YxStoreProductReplyService { + + @Autowired + private IGenerator generator; + + @Autowired + private YxUserService yxUserService; + + @Autowired + private YxStoreProductService yxStoreProductService; + + + /** + * 评价数据 + * @param productId 商品id + * @return ReplyCountVO + */ + @Override + public ReplyCountVo getReplyCount(long productId) { + Long sumCount = productReplyCount(productId); + + if(sumCount == 0) { + return new ReplyCountVo(); + } + + //好评 + Long goodCount = this.baseMapper.selectCount(Wrappers.lambdaQuery() + .eq(YxStoreProductReply::getProductId,productId) + .eq(YxStoreProductReply::getProductScore,5)); + + //中评 + Long inCount = this.baseMapper.selectCount(Wrappers.lambdaQuery() + .eq(YxStoreProductReply::getProductId,productId) + .lt(YxStoreProductReply::getProductScore,5) + .gt(YxStoreProductReply::getProductScore,2)); + + //差评 + Long poorCount = this.baseMapper.selectCount(Wrappers.lambdaQuery() + .eq(YxStoreProductReply::getProductId,productId) + .lt(YxStoreProductReply::getProductScore,2)); + + //好评率 + String replyChance = ""+NumberUtil.round(NumberUtil.mul(NumberUtil.div(goodCount,sumCount),100),2); + String replyStar = ""+NumberUtil.round(NumberUtil.mul(NumberUtil.div(goodCount,sumCount),5),2); + + return ReplyCountVo.builder() + .sumCount(sumCount) + .goodCount(goodCount) + .inCount(inCount) + .poorCount(poorCount) + .replyChance(replyChance) + .replySstar(replyStar) + .build(); + + } + + /** + * 处理评价 + * @param replyQueryVo replyQueryVo + * @return YxStoreProductReplyQueryVo + */ + @Override + public YxStoreProductReplyQueryVo handleReply(YxStoreProductReplyQueryVo replyQueryVo) { + YxStoreCartQueryVo cartInfo = JSONObject.parseObject(replyQueryVo.getCartInfo() + ,YxStoreCartQueryVo.class); + if(ObjectUtil.isNotNull(cartInfo)){ + if(ObjectUtil.isNotNull(cartInfo.getProductInfo())){ + if(ObjectUtil.isNotNull(cartInfo.getProductInfo().getAttrInfo())){ + replyQueryVo.setSku(cartInfo.getProductInfo().getAttrInfo().getSku()); + } + } + } + + BigDecimal star = NumberUtil.add(replyQueryVo.getProductScore(), + replyQueryVo.getServiceScore()); + + star = NumberUtil.div(star,2); + + replyQueryVo.setStar(String.valueOf(star.intValue())); + + if(StrUtil.isEmpty(replyQueryVo.getComment())){ + replyQueryVo.setComment("此用户没有填写评价"); + } + + return replyQueryVo; + } + + /** + * 获取单条评价 + * @param productId 商品di + * @return YxStoreProductReplyQueryVo + */ + @Override + public YxStoreProductReplyQueryVo getReply(long productId) { + YxStoreProductReplyQueryVo vo = this.baseMapper.getReply(productId); + if(ObjectUtil.isNotNull(vo)){ + return handleReply(this.baseMapper.getReply(productId)); + } + return null; + } + + + /** + * 获取评价列表 + * @param productId 商品id + * @param type 0-全部 1-好评 2-中评 3-差评 + * @param page page + * @param limit limit + * @return list + */ + @Override + public List getReplyList(long productId,int type,int page, int limit) { + List newList = new ArrayList<>(); + Page pageModel = new Page<>(page, limit); + List list = this.baseMapper + .selectReplyList(pageModel,productId,type); + List list1 = list.stream().map(i ->{ + YxStoreProductReplyQueryVo vo = new YxStoreProductReplyQueryVo(); + BeanUtils.copyProperties(i,vo); + if(i.getPictures().contains(",")){ + vo.setPics(i.getPictures().split(",")); + } + return vo; + }).collect(Collectors.toList()); + for (YxStoreProductReplyQueryVo queryVo : list1) { + newList.add(handleReply(queryVo)); + } + return newList; + } + + @Override + public Long getInfoCount(Integer oid, String unique) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreProductReply::getUnique, unique).eq(YxStoreProductReply::getOid, oid); + return this.baseMapper.selectCount(wrapper); + } + + @Override + public Long productReplyCount(long productId) { + + return this.baseMapper.selectCount(Wrappers.lambdaQuery() + .eq(YxStoreProductReply::getProductId,productId)); + + } + + @Override + public Long replyCount(String unique) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreProductReply::getUnique,unique); + return this.baseMapper.selectCount(wrapper); + } + + /** + * 好评比例 + * @param productId 商品id + * @return % + */ + @Override + public String replyPer(long productId) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreProductReply::getProductId,productId) + .eq(YxStoreProductReply::getIsDel,ShopCommonEnum.DELETE_0.getValue()) + .eq(YxStoreProductReply::getProductScore,5); + Long productScoreCount = this.baseMapper.selectCount(wrapper); + Long count = productReplyCount(productId); + if(count > 0){ + return ""+NumberUtil.round(NumberUtil.mul(NumberUtil.div(productScoreCount,count),100),2); + } + + return "0"; + } + + + + + + //===================================// + + @Override + //@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 + //@Cacheable + public List queryAll(YxStoreProductReplyQueryCriteria criteria){ + List storeProductReplyList = baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreProductReply.class, criteria)); + storeProductReplyList.forEach(yxStoreProductReply->{ + yxStoreProductReply.setUser(yxUserService.getById(yxStoreProductReply.getUid())); + yxStoreProductReply.setStoreProduct(yxStoreProductService.getById(yxStoreProductReply.getProductId())); + }); + return storeProductReplyList; + } + + + @Override + 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.getMerchantReplyContent()); + map.put("管理员回复时间", yxStoreProductReply.getMerchantReplyTime()); + map.put("0未回复1已回复", yxStoreProductReply.getIsReply()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserRechargeServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductRuleServiceImpl.java similarity index 38% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserRechargeServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductRuleServiceImpl.java index 656379273f67c55ca7ce381f4bd12178db34e673..caa6520179d525607c3d6663e0680cac5cc74150 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserRechargeServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductRuleServiceImpl.java @@ -1,19 +1,21 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.impl; +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.product.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; 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 co.yixiang.modules.shop.service.mapper.UserRechargeMapper; +import co.yixiang.modules.product.domain.YxStoreProductRule; +import co.yixiang.modules.product.service.YxStoreProductRuleService; +import co.yixiang.modules.product.service.dto.YxStoreProductRuleDto; +import co.yixiang.modules.product.service.dto.YxStoreProductRuleQueryCriteria; +import co.yixiang.modules.product.service.mapper.YxStoreProductRuleMapper; import co.yixiang.utils.FileUtil; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; @@ -29,30 +31,26 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-06-28 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxUserRecharge") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxUserRechargeServiceImpl extends BaseServiceImpl implements YxUserRechargeService { +public class YxStoreProductRuleServiceImpl extends BaseServiceImpl implements YxStoreProductRuleService { private final IGenerator generator; @Override //@Cacheable - public Map queryAll(YxUserRechargeQueryCriteria criteria, Pageable pageable) { + public Map queryAll(YxStoreProductRuleQueryCriteria criteria, Pageable pageable) { getPage(pageable); - PageInfo page = new PageInfo<>(queryAll(criteria)); + PageInfo page = new PageInfo<>(queryAll(criteria)); Map map = new LinkedHashMap<>(2); - map.put("content", generator.convert(page.getList(), YxUserRechargeDto.class)); + map.put("content", page.getList()); map.put("totalElements", page.getTotal()); return map; } @@ -60,24 +58,21 @@ public class YxUserRechargeServiceImpl extends BaseServiceImpl queryAll(YxUserRechargeQueryCriteria criteria) { - return baseMapper.selectList(QueryHelpPlus.getPredicate(YxUserRecharge.class, criteria)); + public List queryAll(YxStoreProductRuleQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreProductRule.class, criteria)); } @Override - public void download(List all, HttpServletResponse response) throws IOException { + public void download(List all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); - for (YxUserRechargeDto yxUserRecharge : all) { - Map map = new LinkedHashMap<>(); - map.put("充值用户UID", yxUserRecharge.getUid()); - map.put("订单号", yxUserRecharge.getOrderId()); - map.put("充值金额", yxUserRecharge.getPrice()); - map.put("充值类型", yxUserRecharge.getRechargeType()); - map.put("是否充值", yxUserRecharge.getPaid()); - map.put("充值支付时间", yxUserRecharge.getPayTime()); - map.put("退款金额", yxUserRecharge.getRefundPrice()); - map.put("昵称", yxUserRecharge.getNickname()); + for (YxStoreProductRule yxStoreProductRule : all) { + Map map = new LinkedHashMap<>(); + map.put("规格名称", yxStoreProductRule.getRuleName()); + map.put("规格值", yxStoreProductRule.getRuleValue()); + map.put(" createTime", yxStoreProductRule.getCreateTime()); + map.put(" updateTime", yxStoreProductRule.getUpdateTime()); + map.put(" isDel", yxStoreProductRule.getIsDel()); list.add(map); } FileUtil.downloadExcel(list, response); diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..0c1ae01a94b16ef351dcc047f832cab1c8baa507 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/impl/YxStoreProductServiceImpl.java @@ -0,0 +1,977 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.collection.ListUtil; +import cn.hutool.core.util.ArrayUtil; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.CommonEnum; +import co.yixiang.enums.ProductEnum; +import co.yixiang.enums.ProductTypeEnum; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.enums.SortEnum; +import co.yixiang.enums.SpecTypeEnum; +import co.yixiang.exception.BadRequestException; +import co.yixiang.exception.ErrorRequestException; +import co.yixiang.modules.category.service.YxStoreCategoryService; +import co.yixiang.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.domain.YxStoreProductRelation; +import co.yixiang.modules.product.param.YxStoreProductQueryParam; +import co.yixiang.modules.product.service.YxStoreProductAttrService; +import co.yixiang.modules.product.service.YxStoreProductAttrValueService; +import co.yixiang.modules.product.service.YxStoreProductRelationService; +import co.yixiang.modules.product.service.YxStoreProductReplyService; +import co.yixiang.modules.product.service.YxStoreProductService; +import co.yixiang.modules.product.service.dto.DetailDto; +import co.yixiang.modules.product.service.dto.FromatDetailDto; +import co.yixiang.modules.product.service.dto.ProductFormatDto; +import co.yixiang.modules.product.service.dto.ProductResultDto; +import co.yixiang.modules.product.service.dto.StoreProductDto; +import co.yixiang.modules.product.service.dto.YxStoreProductDto; +import co.yixiang.modules.product.service.dto.YxStoreProductQueryCriteria; +import co.yixiang.modules.product.service.mapper.StoreProductMapper; +import co.yixiang.modules.product.vo.ProductVo; +import co.yixiang.modules.product.vo.YxStoreProductAttrQueryVo; +import co.yixiang.modules.product.vo.YxStoreProductQueryVo; +import co.yixiang.modules.product.vo.YxStoreProductReplyQueryVo; +import co.yixiang.modules.shop.service.YxSystemStoreService; +import co.yixiang.modules.template.domain.YxShippingTemplates; +import co.yixiang.modules.template.service.YxShippingTemplatesService; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.utils.FileUtil; +import co.yixiang.utils.RedisUtil; +import co.yixiang.utils.RegexUtil; +import co.yixiang.utils.ShopKeyUtils; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageInfo; +import com.qiniu.util.StringUtils; +import org.springframework.beans.factory.annotation.Autowired; +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.math.BigDecimal; +import java.util.*; +import java.util.stream.Collectors; + + +/** + * @author hupeng + * @date 2020-05-12 + */ +@Service +@Transactional(propagation = Propagation.REQUIRED, rollbackFor = Exception.class) +public class YxStoreProductServiceImpl extends BaseServiceImpl implements YxStoreProductService { + + @Autowired + private IGenerator generator; + @Autowired + private StoreProductMapper storeProductMapper; + @Autowired + private YxStoreCategoryService yxStoreCategoryService; + @Autowired + private YxStoreProductAttrService yxStoreProductAttrService; + @Autowired + private YxStoreProductAttrValueService yxStoreProductAttrValueService; + @Autowired + private YxUserService userService; + @Autowired + private YxStoreProductReplyService replyService; + @Autowired + private YxStoreProductRelationService relationService; + @Autowired + private YxSystemStoreService systemStoreService; + @Autowired + private YxShippingTemplatesService shippingTemplatesService; + + + /** + * 增加库存 减少销量 + * + * @param num 数量 + * @param productId 商品id + * @param unique sku唯一值 + */ + @Override + public void incProductStock(Integer num, Long productId, String unique, Long activityId, String type) { + //处理属性sku + if (StrUtil.isNotEmpty(unique)) { + yxStoreProductAttrService.incProductAttrStock(num, productId, unique, type); + } + //先处理商品库存,活动商品也要处理,因为共享库存 + storeProductMapper.incStockDecSales(num, productId); + //处理商品外层显示的库存 + if (ProductTypeEnum.COMBINATION.getValue().equals(type)) { + storeProductMapper.incCombinationStockIncSales(num, productId, activityId); + } else if (ProductTypeEnum.SECKILL.getValue().equals(type)) { + storeProductMapper.incSeckillStockIncSales(num, productId, activityId); + } + //todo 处理砍价商品库存 + } + + /** + * 减少库存与增加销量 + * + * @param num 数量 + * @param productId 商品id + * @param unique sku + */ + @Override + public void decProductStock(int num, Long productId, String unique, Long activityId, String type) { + //处理属性sku + if (StrUtil.isNotEmpty(unique)) { + yxStoreProductAttrService.decProductAttrStock(num, productId, unique, type); + } + //先处理商品库存,活动商品也要处理,因为共享库存 + int product = storeProductMapper.decStockIncSales(num, productId); + if (product == 0) { + throw new YshopException("共享商品库存不足"); + } + //处理商品外层显示的库存 + if (ProductTypeEnum.COMBINATION.getValue().equals(type)) { + int combinationRes = storeProductMapper.decCombinationStockIncSales(num, productId, activityId); + if (combinationRes == 0) { + throw new YshopException("拼团商品库存不足"); + } + } else if (ProductTypeEnum.SECKILL.getValue().equals(type)) { + int seckillRes = storeProductMapper.decSeckillStockIncSales(num, productId, activityId); + if (seckillRes == 0) { + throw new YshopException("秒杀商品库存不足"); + } + } + //todo 处理砍价库存 + + } + + + @Override + public YxStoreProduct getProductInfo(Long id) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreProduct::getIsShow, 1).eq(YxStoreProduct::getId, id); + YxStoreProduct storeProduct = this.baseMapper.selectOne(wrapper); + if (ObjectUtil.isNull(storeProduct)) { + throw new ErrorRequestException("商品不存在或已下架"); + } + + return storeProduct; + } + + + /** + * 获取单个商品 + * + * @param id 商品id + * @return YxStoreProductQueryVo + */ + @Override + public YxStoreProductQueryVo getStoreProductById(Long id) { + return generator.convert(this.baseMapper.selectById(id), YxStoreProductQueryVo.class); + } + + + /** + * 返回普通商品库存 + * + * @param productId 商品id + * @param unique sku唯一值 + * @return int + */ + @Override + public int getProductStock(Long productId, String unique, String type) { + YxStoreProductAttrValue storeProductAttrValue = yxStoreProductAttrValueService + .getOne(Wrappers.lambdaQuery() + .eq(YxStoreProductAttrValue::getUnique, unique) + .eq(YxStoreProductAttrValue::getProductId, productId)); + + if (storeProductAttrValue == null) { + return 0; + } + if (ProductTypeEnum.PINK.getValue().equals(type)) { + return storeProductAttrValue.getPinkStock(); + } else if (ProductTypeEnum.SECKILL.getValue().equals(type)) { + return storeProductAttrValue.getSeckillStock(); + } + return storeProductAttrValue.getStock(); + + } + + + /** + * 商品列表 + * + * @param productQueryParam YxStoreProductQueryParam + * @return list + */ + @Override + public List getGoodsList(YxStoreProductQueryParam productQueryParam) { + + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreProduct::getIsShow, CommonEnum.SHOW_STATUS_1.getValue()); + wrapper.eq(YxStoreProduct::getIsDel, CommonEnum.DEL_STATUS_0.getValue()); +// wrapper.eq(YxStoreProduct::getIsIntegral, CommonEnum.SHOW_STATUS_1.getValue()); + + if(productQueryParam.getIsIntegral()!=null){ + wrapper.eq(YxStoreProduct::getIsIntegral, productQueryParam.getIsIntegral()); + } + //多字段模糊查询分类搜索 + if (StrUtil.isNotBlank(productQueryParam.getSid()) && + !ShopConstants.YSHOP_ZERO.equals(productQueryParam.getSid())) { + wrapper.eq(YxStoreProduct::getCateId, productQueryParam.getSid()); + } + //关键字搜索 + if (StrUtil.isNotEmpty(productQueryParam.getKeyword())) { + wrapper.and(wrapper1 -> { + wrapper1.or(); + wrapper1.like(YxStoreProduct::getStoreName, productQueryParam.getKeyword()); + wrapper1.or(); + wrapper1.like(YxStoreProduct::getStoreInfo, productQueryParam.getKeyword()); + wrapper1.or(); + wrapper1.like(YxStoreProduct::getKeyword, productQueryParam.getKeyword()); + }); + } + //新品搜索 + if (StrUtil.isNotBlank(productQueryParam.getNews()) && + !ShopConstants.YSHOP_ZERO.equals(productQueryParam.getNews())) { + wrapper.eq(YxStoreProduct::getIsNew, ShopCommonEnum.IS_NEW_1.getValue()); + } + + //销量排序 + if (SortEnum.DESC.getValue().equals(productQueryParam.getSalesOrder())) { + wrapper.orderByDesc(YxStoreProduct::getSales); + } else if (SortEnum.ASC.getValue().equals(productQueryParam.getSalesOrder())) { + wrapper.orderByAsc(YxStoreProduct::getSales); + } + + //价格排序 + if (SortEnum.DESC.getValue().equals(productQueryParam.getPriceOrder())) { + wrapper.orderByDesc(YxStoreProduct::getPrice); + } else if (SortEnum.ASC.getValue().equals(productQueryParam.getPriceOrder())) { + wrapper.orderByAsc(YxStoreProduct::getPrice); + } + + //无其他排序条件时,防止因为商品排序导致商品重复 + if (StringUtils.isNullOrEmpty(productQueryParam.getPriceOrder()) && StringUtils.isNullOrEmpty(productQueryParam.getSalesOrder())) { + wrapper.orderByDesc(YxStoreProduct::getId); + wrapper.orderByDesc(YxStoreProduct::getSort); + } + Page pageModel = new Page<>(productQueryParam.getPage(), + productQueryParam.getLimit()); + + IPage pageList = storeProductMapper.selectPage(pageModel, wrapper); + + List list = generator.convert(pageList.getRecords(), YxStoreProductQueryVo.class); + + return list; + } + + /** + * 商品详情 + * + * @param id 商品id + * @param uid 用户id + * @param latitude 纬度 + * @param longitude 经度 + * @return ProductVo + */ + @Override + public ProductVo goodsDetail(Long id, Long uid, String latitude, String longitude) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreProduct::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .eq(YxStoreProduct::getId, id); + YxStoreProduct storeProduct = storeProductMapper.selectOne(wrapper); + if (ObjectUtil.isNull(storeProduct)) { + throw new ErrorRequestException("商品不存在或已下架"); + } + + //获取商品sku + Map returnMap = yxStoreProductAttrService.getProductAttrDetail(id); + ProductVo productVo = new ProductVo(); + YxStoreProductQueryVo storeProductQueryVo = generator.convert(storeProduct, YxStoreProductQueryVo.class); + + //设置销量 + storeProductQueryVo.setSales(storeProductQueryVo.getSales() + storeProductQueryVo.getFicti()); + + if (uid.longValue() > 0) { + //设置VIP价格 + double vipPrice = userService.setLevelPrice( + storeProductQueryVo.getPrice().doubleValue(), uid); + storeProductQueryVo.setVipPrice(BigDecimal.valueOf(vipPrice)); + + //收藏 + boolean isCollect = relationService.isProductRelation(id, uid,ProductTypeEnum.PRODUCT.getValue()); + storeProductQueryVo.setUserCollect(isCollect); + } + //总条数 + Long totalCount = replyService.productReplyCount(id); + productVo.setReplyCount(totalCount); + + //评价 + YxStoreProductReplyQueryVo storeProductReplyQueryVo = replyService.getReply(id); + productVo.setReply(storeProductReplyQueryVo); + + //好评比例 + String replyPer = replyService.replyPer(id); + productVo.setReplyChance(replyPer); + + //获取运费模板名称 + String storeFreePostage = RedisUtil.get("store_free_postage"); + String tempName = ""; + if (StrUtil.isBlank(storeFreePostage) + || !NumberUtil.isNumber(storeFreePostage) + || Integer.valueOf(storeFreePostage) == 0) { + tempName = "全国包邮"; + } else { + YxShippingTemplates shippingTemplates = shippingTemplatesService.getById(storeProduct.getTempId()); + if (ObjectUtil.isNotNull(shippingTemplates)) { + tempName = shippingTemplates.getName(); + } else { + throw new BadRequestException("请配置运费模板"); + } + + } + productVo.setTempName(tempName); + + //设置商品相关信息 + productVo.setStoreInfo(storeProductQueryVo); + productVo.setProductAttr((List) returnMap.get("productAttr")); + productVo.setProductValue((Map) returnMap.get("productValue")); + + + //门店 + productVo.setSystemStore(systemStoreService.getStoreInfo(latitude, longitude)); + productVo.setMapKey(RedisUtil.get(ShopKeyUtils.getTengXunMapKey())); + if (uid.longValue() > 0) { + //添加足迹 + YxStoreProductRelation foot = relationService.getOne(new LambdaQueryWrapper() + .eq(YxStoreProductRelation::getUid, uid) + .eq(YxStoreProductRelation::getProductId, storeProductQueryVo.getId()) + .eq(YxStoreProductRelation::getCategory,ProductTypeEnum.PRODUCT.getValue()) + .eq(YxStoreProductRelation::getType, "foot")); + + if (ObjectUtil.isNotNull(foot)) { + foot.setCreateTime(new Date()); + relationService.saveOrUpdate(foot); + } else { + YxStoreProductRelation storeProductRelation = new YxStoreProductRelation(); + storeProductRelation.setProductId(storeProductQueryVo.getId()); + storeProductRelation.setUid(uid); + storeProductRelation.setCreateTime(new Date()); + storeProductRelation.setType("foot"); + storeProductRelation.setCategory(ProductTypeEnum.PRODUCT.getValue()); + relationService.save(storeProductRelation); + } + } + + return productVo; + } + + /** + * 商品浏览量 + * + * @param productId + */ + @Override + public void incBrowseNum(Long productId) { + storeProductMapper.incBrowseNum(productId); + } + + + /** + * 商品列表 + * + * @param page 页码 + * @param limit 条数 + * @param order ProductEnum + * @return List + */ + @Override + public List getList(int page, int limit, int order) { + + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxStoreProduct::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .eq(YxStoreProduct::getIsDel,ShopCommonEnum.DELETE_0.getValue()) + .orderByDesc(YxStoreProduct::getSort); + wrapper.eq(YxStoreProduct::getIsIntegral,0); + // order + switch (ProductEnum.toType(order)) { + //精品推荐 + case TYPE_1: + wrapper.eq(YxStoreProduct::getIsBest, + ShopCommonEnum.IS_STATUS_1.getValue()); + break; + //首发新品 + case TYPE_3: + wrapper.eq(YxStoreProduct::getIsNew, + ShopCommonEnum.IS_STATUS_1.getValue()); + break; + // 猜你喜欢 + case TYPE_4: + wrapper.eq(YxStoreProduct::getIsBenefit, + ShopCommonEnum.IS_STATUS_1.getValue()); + break; + // 热门榜单 + case TYPE_2: + wrapper.eq(YxStoreProduct::getIsHot, + ShopCommonEnum.IS_STATUS_1.getValue()); + break; + default: + } + Page pageModel = new Page<>(page, limit); + + IPage pageList = storeProductMapper.selectPage(pageModel, wrapper); + + return generator.convert(pageList.getRecords(), YxStoreProductQueryVo.class); + } + + + //============ 分割线================// + + + @Override + 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) { + List yxStoreProductList = baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreProduct.class, criteria)); + yxStoreProductList.forEach(yxStoreProduct -> { + yxStoreProduct.setStoreCategory(yxStoreCategoryService.getById(yxStoreProduct.getCateId())); + }); + return yxStoreProductList; + } + + + @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); + } + + + /** + * 商品上架下架 + * + * @param id 商品id + * @param status ShopCommonEnum + */ + @Override + public void onSale(Long id, Integer status) { + if (ShopCommonEnum.SHOW_1.getValue().equals(status)) { + status = ShopCommonEnum.SHOW_0.getValue(); + } else { + status = ShopCommonEnum.SHOW_1.getValue(); + } + storeProductMapper.updateOnsale(status, id); + } + + + /** + * 新增/保存商品 + * + * @param storeProductDto 商品 + */ + @Override + public void insertAndEditYxStoreProduct(StoreProductDto storeProductDto) { + storeProductDto.setDescription(RegexUtil.converProductDescription(storeProductDto.getDescription())); + ProductResultDto resultDTO = this.computedProduct(storeProductDto.getAttrs()); + + //添加商品 + YxStoreProduct yxStoreProduct = new YxStoreProduct(); + BeanUtil.copyProperties(storeProductDto, yxStoreProduct, "sliderImage"); + if (storeProductDto.getSliderImage().isEmpty()) { + throw new YshopException("请上传轮播图"); + } + + yxStoreProduct.setPrice(BigDecimal.valueOf(resultDTO.getMinPrice())); + yxStoreProduct.setOtPrice(BigDecimal.valueOf(resultDTO.getMinOtPrice())); + yxStoreProduct.setCost(BigDecimal.valueOf(resultDTO.getMinCost())); + yxStoreProduct.setIntegral(resultDTO.getMinIntegral()); + yxStoreProduct.setStock(resultDTO.getStock()); + yxStoreProduct.setSliderImage(String.join(",", storeProductDto.getSliderImage())); + + if (storeProductDto.getId() != null) { + //清空商品转发图 + deleteForwardImg(storeProductDto.getId()); + } + + this.saveOrUpdate(yxStoreProduct); + + //属性处理 + //处理单sKu + if (SpecTypeEnum.TYPE_0.getValue().equals(storeProductDto.getSpecType())) { + FromatDetailDto fromatDetailDto = FromatDetailDto.builder() + .value("规格") + .detailValue("") + .attrHidden("") + .detail(ListUtil.toList("默认")) + .build(); + List attrs = storeProductDto.getAttrs(); + ProductFormatDto productFormatDto = attrs.get(0); + productFormatDto.setValue1("规格"); + Map map = new HashMap<>(); + map.put("规格", "默认"); + productFormatDto.setDetail(map); + yxStoreProductAttrService.insertYxStoreProductAttr(ListUtil.toList(fromatDetailDto), + ListUtil.toList(productFormatDto), yxStoreProduct.getId()); + } else { + yxStoreProductAttrService.insertYxStoreProductAttr(storeProductDto.getItems(), + storeProductDto.getAttrs(), yxStoreProduct.getId()); + } + + + } + + + /** + * 获取生成的属性 + * + * @param id 商品id + * @param jsonStr jsonStr + * @return map + */ + @Override + public Map getFormatAttr(Long id, String jsonStr, boolean isActivity) { + JSONObject jsonObject = JSON.parseObject(jsonStr); + Map resultMap = new LinkedHashMap<>(3); + + if (jsonObject == null || jsonObject.get("attrs") == null || jsonObject.getJSONArray("attrs").isEmpty()) { + resultMap.put("attr", new ArrayList<>()); + resultMap.put("value", new ArrayList<>()); + resultMap.put("header", new ArrayList<>()); + return resultMap; + } + + + List fromatDetailDTOList = JSON.parseArray(jsonObject.get("attrs").toString(), + FromatDetailDto.class); + + //fromatDetailDTOList + DetailDto detailDto = this.attrFormat(fromatDetailDTOList); + + List> headerMapList = null; + List> valueMapList = new ArrayList<>(); + String align = "center"; + Map headerMap = new LinkedHashMap<>(); + for (Map> map : detailDto.getRes()) { + Map detail = map.get("detail"); + String[] detailArr = detail.values().toArray(new String[]{}); + Arrays.sort(detailArr); + + String sku = String.join(",", detailArr); + + Map valueMap = new LinkedHashMap<>(); + + List detailKeys = + detail.entrySet() + .stream() + .map(Map.Entry::getKey) + .collect(Collectors.toList()); + + int i = 0; + headerMapList = new ArrayList<>(); + for (String title : detailKeys) { + headerMap.put("title", title); + headerMap.put("minWidth", "130"); + headerMap.put("align", align); + headerMap.put("key", "value" + (i + 1)); + headerMap.put("slot", "value" + (i + 1)); + headerMapList.add(ObjectUtil.clone(headerMap)); + i++; + } + + String[] detailValues = detail.values().toArray(new String[]{}); + for (int j = 0; j < detailValues.length; j++) { + String key = "value" + (j + 1); + valueMap.put(key, detailValues[j]); + } +// /** 拼团属性对应的金额 */ +// private BigDecimal pinkPrice; +// +// /** 秒杀属性对应的金额 */ +// private BigDecimal seckillPrice; +// /** 拼团库存属性对应的库存 */ +// private Integer pinkStock; +// +// private Integer seckillStock; + valueMap.put("detail", detail); + valueMap.put("sku", ""); + valueMap.put("pic", ""); + valueMap.put("price", 0); + valueMap.put("cost", 0); + valueMap.put("ot_price", 0); + valueMap.put("stock", 0); + valueMap.put("bar_code", ""); + valueMap.put("weight", 0); + valueMap.put("volume", 0); + valueMap.put("brokerage", 0); + valueMap.put("brokerage_two", 0); + valueMap.put("pink_price", 0); + valueMap.put("seckill_price", 0); + valueMap.put("pink_stock", 0); + valueMap.put("seckill_stock", 0); + valueMap.put("integral", 0); + if (id > 0) { + YxStoreProductAttrValue storeProductAttrValue = yxStoreProductAttrValueService + .getOne(Wrappers.lambdaQuery() + .eq(YxStoreProductAttrValue::getProductId, id) + .eq(YxStoreProductAttrValue::getSku, sku)); + if (storeProductAttrValue != null) { + valueMap.put("sku",storeProductAttrValue.getSku()); + valueMap.put("pic", storeProductAttrValue.getImage()); + valueMap.put("price", storeProductAttrValue.getPrice()); + valueMap.put("cost", storeProductAttrValue.getCost()); + valueMap.put("ot_price", storeProductAttrValue.getOtPrice()); + valueMap.put("stock", storeProductAttrValue.getStock()); + valueMap.put("bar_code", storeProductAttrValue.getBarCode()); + valueMap.put("weight", storeProductAttrValue.getWeight()); + valueMap.put("volume", storeProductAttrValue.getVolume()); + valueMap.put("brokerage", storeProductAttrValue.getBrokerage()); + valueMap.put("brokerage_two", storeProductAttrValue.getBrokerageTwo()); + valueMap.put("pink_price", storeProductAttrValue.getPinkPrice()); + valueMap.put("seckill_price", storeProductAttrValue.getSeckillPrice()); + valueMap.put("pink_stock", storeProductAttrValue.getPinkStock()); + valueMap.put("seckill_stock", storeProductAttrValue.getSeckillStock()); + valueMap.put("integral", storeProductAttrValue.getIntegral()); + } + } + + valueMapList.add(ObjectUtil.clone(valueMap)); + + } + + this.addMap(headerMap, headerMapList, align, isActivity); + + + resultMap.put("attr", fromatDetailDTOList); + resultMap.put("value", valueMapList); + resultMap.put("header", headerMapList); + + return resultMap; + } + + + /** + * 计算产品数据 + * + * @param attrs attrs + * @return ProductResultDto + */ + private ProductResultDto computedProduct(List attrs) { + //取最小价格 + Double minPrice = attrs + .stream() + .map(ProductFormatDto::getPrice) + .min(Comparator.naturalOrder()) + .orElse(0d); + + //取最小积分 + Integer minIntegral = attrs + .stream() + .map(ProductFormatDto::getIntegral) + .min(Comparator.naturalOrder()) + .orElse(0); + + Double minOtPrice = attrs + .stream() + .map(ProductFormatDto::getOtPrice) + .min(Comparator.naturalOrder()) + .orElse(0d); + + Double minCost = attrs + .stream() + .map(ProductFormatDto::getCost) + .min(Comparator.naturalOrder()) + .orElse(0d); + //计算库存 + Integer stock = attrs + .stream() + .map(ProductFormatDto::getStock) + .reduce(Integer::sum) + .orElse(0); + + if (stock <= 0) { + throw new YshopException("库存不能低于0"); + } + + return ProductResultDto.builder() + .minPrice(minPrice) + .minOtPrice(minOtPrice) + .minCost(minCost) + .stock(stock) + .minIntegral(minIntegral) + .build(); + } + + /** + * mapTobean + * + * @param listMap listMap + * @return list + */ + private List ListMapToListBean(List> listMap) { + List list = new ArrayList<>(); + // 循环遍历出map对象 + for (Map m : listMap) { + list.add(BeanUtil.mapToBean(m, ProductFormatDto.class, true)); + } + return list; + } + + /** + * 增加表头 + * + * @param headerMap headerMap + * @param headerMapList headerMapList + * @param align align + */ + private void addMap(Map headerMap, List> headerMapList, String align, boolean isActivity) { + headerMap.put("title", "图片"); + headerMap.put("slot", "pic"); + headerMap.put("align", align); + headerMap.put("minWidth", 80); + headerMapList.add(ObjectUtil.clone(headerMap)); + + headerMap.put("title", "售价"); + headerMap.put("slot", "price"); + headerMap.put("align", align); + headerMap.put("minWidth", 120); + headerMapList.add(ObjectUtil.clone(headerMap)); + + headerMap.put("title", "成本价"); + headerMap.put("slot", "cost"); + headerMap.put("align", align); + headerMap.put("minWidth", 140); + headerMapList.add(ObjectUtil.clone(headerMap)); + + headerMap.put("title", "原价"); + headerMap.put("slot", "ot_price"); + headerMap.put("align", align); + headerMap.put("minWidth", 140); + headerMapList.add(ObjectUtil.clone(headerMap)); + + headerMap.put("title", "库存"); + headerMap.put("slot", "stock"); + headerMap.put("align", align); + headerMap.put("minWidth", 140); + headerMapList.add(ObjectUtil.clone(headerMap)); + + headerMap.put("title", "产品编号"); + headerMap.put("slot", "bar_code"); + headerMap.put("align", align); + headerMap.put("minWidth", 140); + headerMapList.add(ObjectUtil.clone(headerMap)); + + headerMap.put("title", "重量(KG)"); + headerMap.put("slot", "weight"); + headerMap.put("align", align); + headerMap.put("minWidth", 140); + headerMapList.add(ObjectUtil.clone(headerMap)); + + headerMap.put("title", "体积(m³)"); + headerMap.put("slot", "volume"); + headerMap.put("align", align); + headerMap.put("minWidth", 140); + headerMapList.add(ObjectUtil.clone(headerMap)); + + headerMap.put("title", "所需兑换积分"); + headerMap.put("slot", "integral"); + headerMap.put("align", align); + headerMap.put("minWidth", 140); + headerMapList.add(ObjectUtil.clone(headerMap)); + + if (isActivity) { + headerMap.put("title", "拼团价"); + headerMap.put("slot", "pink_price"); + headerMap.put("align", align); + headerMap.put("minWidth", 140); + headerMapList.add(ObjectUtil.clone(headerMap)); + + headerMap.put("title", "拼团活动库存"); + headerMap.put("slot", "pink_stock"); + headerMap.put("align", align); + headerMap.put("minWidth", 140); + headerMapList.add(ObjectUtil.clone(headerMap)); + + headerMap.put("title", "秒杀价"); + headerMap.put("slot", "seckill_price"); + headerMap.put("align", align); + headerMap.put("minWidth", 140); + headerMapList.add(ObjectUtil.clone(headerMap)); + + headerMap.put("title", "秒杀活动库存"); + headerMap.put("slot", "seckill_stock"); + headerMap.put("align", align); + headerMap.put("minWidth", 140); + headerMapList.add(ObjectUtil.clone(headerMap)); + } + + headerMap.put("title", "操作"); + headerMap.put("slot", "action"); + headerMap.put("align", align); + headerMap.put("minWidth", 70); + headerMapList.add(ObjectUtil.clone(headerMap)); + } + + /** + * 组合规则属性算法 + * + * @param fromatDetailDTOList + * @return DetailDto + */ + private DetailDto attrFormat(List fromatDetailDTOList) { + + List data = new ArrayList<>(); + List>> res = new ArrayList<>(); + + fromatDetailDTOList.stream() + .map(FromatDetailDto::getDetail) + .forEach(i -> { + if (i == null || i.isEmpty()) { + throw new YshopException("请至少添加一个规格值哦"); + } + String str = ArrayUtil.join(i.toArray(), ","); + if (str.contains("-")) { + throw new YshopException("规格值里包含'-',请重新添加"); + } + }); + + if (fromatDetailDTOList.size() > 1) { + for (int i = 0; i < fromatDetailDTOList.size() - 1; i++) { + if (i == 0) { + data = fromatDetailDTOList.get(i).getDetail(); + } + List tmp = new LinkedList<>(); + for (String v : data) { + for (String g : fromatDetailDTOList.get(i + 1).getDetail()) { + String rep2 = ""; + if (i == 0) { + rep2 = fromatDetailDTOList.get(i).getValue() + "_" + v + "-" + + fromatDetailDTOList.get(i + 1).getValue() + "_" + g; + } else { + rep2 = v + "-" + + fromatDetailDTOList.get(i + 1).getValue() + "_" + g; + } + + tmp.add(rep2); + + if (i == fromatDetailDTOList.size() - 2) { + Map> rep4 = new LinkedHashMap<>(); + Map reptemp = new LinkedHashMap<>(); + for (String h : Arrays.asList(rep2.split("-"))) { + List rep3 = Arrays.asList(h.split("_")); + if (rep3.size() > 1) { + reptemp.put(rep3.get(0), rep3.get(1)); + } else { + reptemp.put(rep3.get(0), ""); + } + } + rep4.put("detail", reptemp); + + res.add(rep4); + } + } + + } + + if (!tmp.isEmpty()) { + data = tmp; + } + } + } else { + List dataArr = new ArrayList<>(); + for (FromatDetailDto fromatDetailDTO : fromatDetailDTOList) { + for (String str : fromatDetailDTO.getDetail()) { + Map> map2 = new LinkedHashMap<>(); + dataArr.add(fromatDetailDTO.getValue() + "_" + str); + Map map1 = new LinkedHashMap<>(); + map1.put(fromatDetailDTO.getValue(), str); + map2.put("detail", map1); + res.add(map2); + } + } + String s = StrUtil.join("-", dataArr); + data.add(s); + } + + DetailDto detailDto = new DetailDto(); + detailDto.setData(data); + detailDto.setRes(res); + + return detailDto; + } + + @Override + public void deleteForwardImg(Long id) { + baseMapper.deleteForwardImg(id, "_product_detail_wap"); + } + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrMapper.java similarity index 42% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrMapper.java index f737facc2803cf7f4a804d5872d06b3b5cdbe4e3..645840ce6430ef9d4b3c76b81d9a0bc2098d3fb3 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.mapper; +package co.yixiang.modules.product.service.mapper; import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.shop.domain.YxStoreProductAttr; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.product.domain.YxStoreProductAttr; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @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-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrResultMapper.java similarity index 42% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrResultMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrResultMapper.java index 511792f6af0e84be3a1d57bf8b7c22ce3677e8a1..6dadc945d5414289e86c63d57aa07e3fa4c96d8d 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrResultMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrResultMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.mapper; +package co.yixiang.modules.product.service.mapper; import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.shop.domain.YxStoreProductAttrResult; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.product.domain.YxStoreProductAttrResult; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface StoreProductAttrResultMapper extends CoreMapper { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrValueMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrValueMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..fef1a0bd65c6cc716f6609ce7d1d88ca7ddbadac --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductAttrValueMapper.java @@ -0,0 +1,100 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +public interface StoreProductAttrValueMapper extends CoreMapper { + + + /** + * 正常商品 加库存 减销量 + * @param num + * @param productId + * @param unique + * @return + */ + @Update("update yx_store_product_attr_value set stock=stock+#{num}, sales=sales-#{num}" + + " where product_id=#{productId} and `unique`=#{unique}") + int incStockDecSales(@Param("num") Integer num,@Param("productId") Long productId, + @Param("unique") String unique); + + + /** + * 拼团商品 加库存 减销量 + * @param num + * @param productId + * @param unique + * @return + */ + + @Update("update yx_store_product_attr_value set stock=stock+#{num}, pink_stock=pink_stock+#{num}, sales=sales-#{num}" + + " where product_id=#{productId} and `unique`=#{unique}") + int incCombinationStockDecSales(@Param("num") Integer num,@Param("productId") Long productId, + @Param("unique") String unique); + + + /** + * 秒杀 加库存 减销量 + * @param num + * @param productId + * @param unique + * @return + */ + @Update("update yx_store_product_attr_value set stock=stock+#{num},seckill_stock=seckill_stock+#{num}, sales=sales-#{num}" + + " where product_id=#{productId} and `unique`=#{unique}") + int incSeckillStockDecSales(@Param("num") Integer num,@Param("productId") Long productId, + @Param("unique") String unique); + + + /** + * 普通商品 减库存 加销量 + * @param num + * @param productId + * @param unique + * @return + */ + @Update("update yx_store_product_attr_value set stock=stock-#{num}, sales=sales+#{num}" + + " where product_id=#{productId} and `unique`=#{unique} and stock >= #{num}") + int decStockIncSales(@Param("num") Integer num, @Param("productId") Long productId, + @Param("unique") String unique); + + /** + * 拼团产品 减库存 加销量 + * @param num + * @param productId + * @param unique + * @return + */ + @Update("update yx_store_product_attr_value set stock=stock-#{num}, pink_stock=pink_stock-#{num} ,sales=sales+#{num}" + + " where product_id=#{productId} and `unique`=#{unique} and stock >= #{num} and pink_stock>=#{num}") + int decCombinationStockIncSales(@Param("num") Integer num, @Param("productId") Long productId, + @Param("unique") String unique); + + /** + * 秒杀产品 减库存 加销量 + * @param num + * @param productId + * @param unique + * @return + */ + @Update("update yx_store_product_attr_value set stock=stock-#{num}, seckill_stock=seckill_stock-#{num},sales=sales+#{num}" + + " where product_id=#{productId} and `unique`=#{unique} and stock >= #{num} and seckill_stock>=#{num}") + int decSeckillStockIncSales(@Param("num") Integer num, @Param("productId") Long productId, + @Param("unique") String unique); +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..d9027dd0723cca4a52d087c1d3906b000799ff33 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductMapper.java @@ -0,0 +1,111 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.product.domain.YxStoreProduct; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import org.apache.ibatis.annotations.Delete; +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 +public interface StoreProductMapper extends CoreMapper { + + /** + * 正常商品库存 减库存 加销量 + * @param num + * @param productId + * @return + */ + @Update("update yx_store_product set stock=stock-#{num}, sales=sales+#{num}" + + " where id=#{productId} and stock >= #{num}") + int decStockIncSales(@Param("num") Integer num,@Param("productId") Long productId); + + /** + * 正常商品库存 加库存 减销量 + * @param num + * @param productId + * @return + */ + @Update("update yx_store_product set stock=stock+#{num}, sales=sales-#{num}" + + " where id=#{productId}") + int incStockDecSales(@Param("num") Integer num,@Param("productId") Long productId); + + + @Update("update yx_store_product set is_show = #{status} where id = #{id}") + void updateOnsale(@Param("status") Integer status, @Param("id") Long id); + + /** + * 拼团商品库存,减库存 加销量 + * @param num + * @param productId + * @param activityId + * @return + */ + @Update("update yx_store_combination set stock=stock-#{num}, sales=sales+#{num}" + + " where id=#{activityId} and stock >= #{num}") + int decCombinationStockIncSales(@Param("num") Integer num, @Param("productId") Long productId,@Param("activityId") Long activityId); + + /** + * 秒杀产品库存 减库存,加销量 + * @param num + * @param productId + * @param activityId + * @return + */ + @Update("update yx_store_seckill set stock=stock-#{num}, sales=sales+#{num}" + + " where id=#{activityId} and stock >= #{num}") + int decSeckillStockIncSales(@Param("num") Integer num, @Param("productId") Long productId,@Param("activityId") Long activityId); + + /** + * 拼团商品库存,加库存 减销量 + * @param num + * @param productId + * @param activityId + */ + @Update("update yx_store_combination set stock=stock+#{num}, sales=sales-#{num}" + + " where id=#{activityId} and stock >= #{num}") + void incCombinationStockIncSales(@Param("num") Integer num, @Param("productId") Long productId,@Param("activityId") Long activityId); + + /** + * 秒杀产品库存 加库存,减销量 + * @param num + * @param productId + * @param activityId + * @return + */ + @Update("update yx_store_seckill set stock=stock+#{num}, sales=sales-#{num}" + + " where id=#{activityId} and stock >= #{num}") + void incSeckillStockIncSales(@Param("num") Integer num, @Param("productId") Long productId,@Param("activityId") Long activityId); + + /** + * 商品浏览量 + * @param productId + * @return + */ + @Update("update yx_store_product set browse=browse+1 " + + "where id=#{productId}") + int incBrowseNum(@Param("productId") Long productId); + + @Delete("DELETE from yx_system_attachment where name like CONCAT(#{id},'_%',#{name}, '%')") + void deleteForwardImg(@Param("id") Long id,@Param("name") String name); + + @Override + @Select("SELECT id,spec_type,ot_price,mer_use,description,is_postage,is_sub,is_best,(sales+ficti) as sales,price,is_bargain,vip_price,store_name,stock,keyword,image,cost,is_good,unit_name,is_benefit,update_time,give_integral,is_new,sort,slider_image,is_show,bar_code,postage,code_path,create_time,cate_id,is_seckill,mer_id,temp_id,ficti,store_info,is_del,is_hot,is_integral,integral,browse FROM yx_store_product ${ew.customSqlSegment}") + > E selectPage(E page, @Param(Constants.WRAPPER) Wrapper queryWrapper); +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductReplyMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductReplyMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..6bf0a38df427bf8fa94038cf7028047f9479ecd5 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/StoreProductReplyMapper.java @@ -0,0 +1,51 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.product.domain.YxStoreProductReply; +import co.yixiang.modules.product.vo.YxStoreProductReplyQueryVo; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +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 +public interface StoreProductReplyMapper extends CoreMapper { + + @Select("select A.product_score as productScore,A.service_score as serviceScore," + + "A.comment,A.merchant_reply_content as merchantReplyContent," + + "A.merchant_reply_time as merchantReplyTime,A.pics as pictures,A.create_Time as createTime," + + "B.nickname,B.avatar,C.cart_info as cartInfo" + + " from yx_store_product_reply A left join yx_user B " + + "on A.uid = B.uid left join yx_store_order_cart_info C on A.`unique` = C.`unique`" + + " where A.product_id=#{productId} and A.is_del=0 " + + "order by A.create_Time DESC limit 1") + YxStoreProductReplyQueryVo getReply(long productId); + + @Select("") + List selectReplyList(Page page, @Param("productId") long productId, @Param("type") int type); + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/YxStoreProductRelationMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/YxStoreProductRelationMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..69f079dc801f23696835c7fe52f3c7c5dea9db95 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/YxStoreProductRelationMapper.java @@ -0,0 +1,40 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.service.mapper; + + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.product.domain.YxStoreProductRelation; +import co.yixiang.modules.product.vo.YxStoreProductRelationQueryVo; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +import java.util.List; + +/** + *

+ * 商品点赞和收藏表 Mapper 接口 + *

+ * + * @author hupeng + * @since 2019-10-23 + */ +@Repository +public interface YxStoreProductRelationMapper extends CoreMapper { + + @Select("select B.id pid,A.type as category,B.store_name as storeName,B.price,B.is_integral as isIntegral,A.id id," + + "B.ot_price as otPrice,B.sales,B.image,B.is_show as isShow" + + " from yx_store_product_relation A left join yx_store_product B " + + "on A.product_id = B.id where A.type=#{type} and A.uid=#{uid} and A.is_del = 0 and B.is_del = 0 order by A.create_time desc") + List selectRelationList(Page page, @Param("uid") Long uid, @Param("type") String type); + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/YxStoreProductRuleMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/YxStoreProductRuleMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..07048d832ec975e6bd5f5dad59d22cbf8c59042b --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/service/mapper/YxStoreProductRuleMapper.java @@ -0,0 +1,23 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.product.service.mapper; + + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.product.domain.YxStoreProductRule; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-06-28 +*/ +@Repository +public interface YxStoreProductRuleMapper extends CoreMapper { + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/vo/ProductVo.java b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/ProductVo.java new file mode 100644 index 0000000000000000000000000000000000000000..db5def88eb51663a1a4c4dbb4ea4e458c65294b1 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/ProductVo.java @@ -0,0 +1,62 @@ +package co.yixiang.modules.product.vo; + +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** + *

+ * 商品dto + *

+ * + * @author hupeng + * @date 2019-10-23 + */ +@Data +public class ProductVo{ + + @ApiModelProperty(value = "商品信息列表") + private List goodList = new ArrayList(); + + @ApiModelProperty(value = "商户ID,预留字段") + private Integer merId = 0; + + private String priceName = ""; + + private List productAttr = new ArrayList(); + + private Map productValue = new LinkedHashMap<>(); + + @ApiModelProperty(value = "评论信息") + private YxStoreProductReplyQueryVo reply; + + @ApiModelProperty(value = "回复渠道") + private String replyChance; + + @ApiModelProperty(value = "回复数") + private Long replyCount; + + //todo + private List similarity = new ArrayList(); + + @ApiModelProperty(value = "商品信息") + private YxStoreProductQueryVo storeInfo; + + @ApiModelProperty(value = "腾讯地图key") + private String mapKey; + + @ApiModelProperty(value = "门店信息") + private YxSystemStoreQueryVo systemStore; + + @ApiModelProperty(value = "用户ID") + private Integer uid = 0; + + @ApiModelProperty(value = "模版名称") + private String tempName; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/vo/ReplyCountVo.java b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/ReplyCountVo.java new file mode 100644 index 0000000000000000000000000000000000000000..4880b2704182fdbb416669fbe0d96fc80786ecd7 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/ReplyCountVo.java @@ -0,0 +1,42 @@ +package co.yixiang.modules.product.vo; + +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +import java.io.Serializable; + +/** + * @ClassName ReplyCount + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/4 + **/ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +public class ReplyCountVo implements Serializable { + + @ApiModelProperty(value = "总的评论数") + private Long sumCount; + + @ApiModelProperty(value = "好评数") + private Long goodCount; + + @ApiModelProperty(value = "中评数") + private Long inCount; + + @ApiModelProperty(value = "差评数") + private Long poorCount; + + @ApiModelProperty(value = "好评率") + private String replyChance; + + @ApiModelProperty(value = "好评星星数") + private String replySstar; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductAttrQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductAttrQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..b585476c9011d8c9f3f95a504eacc4a15857e7b8 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductAttrQueryVo.java @@ -0,0 +1,41 @@ +package co.yixiang.modules.product.vo; + +import co.yixiang.modules.product.service.dto.AttrValueDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + *

+ * 商品属性表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-23 + */ +@Data +@ApiModel(value = "YxStoreProductAttrQueryVo对象", description = "商品属性表查询参数") +public class YxStoreProductAttrQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + private Long id; + + @ApiModelProperty(value = "商品ID") + private Long productId; + + @ApiModelProperty(value = "属性名") + private String attrName; + + @ApiModelProperty(value = "属性值") + private String attrValues; + + @ApiModelProperty(value = "属性值集合") + private List attrValue; + + @ApiModelProperty(value = "属性") + private List attrValueArr; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..387cf76106832f6f8b95d85b10cc440fe9b3d3cb --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductQueryVo.java @@ -0,0 +1,160 @@ +package co.yixiang.modules.product.vo; + + + +import cn.hutool.core.util.StrUtil; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.serializer.BigDecimalSerializer; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.List; + +/** + *

+ * 商品表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-19 + */ +@Data +@ApiModel(value = "YxStoreProductQueryVo对象", description = "商品表查询参数") +public class YxStoreProductQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "商品id") + private Long id; + + @ApiModelProperty(value = "商户Id(0为总后台管理员创建,不为0的时候是商户后台创建)") + private Integer merId; + + @ApiModelProperty(value = "商品图片") + private String image; + + private String image_base; + + private String codeBase; + + public String getImage_base() { + return image; + } + + @ApiModelProperty(value = "是否收藏") + private Boolean userCollect = false; + + @ApiModelProperty(value = "是否喜欢") + private Boolean userLike = false; + + @ApiModelProperty(value = "轮播图,多个用,分割") + private String sliderImage; + + private List sliderImageArr; + + public List getSliderImageArr() { + //Arrays.asList(sliderImage.split(",")); + if(StrUtil.isNotEmpty(sliderImage)){ + return Arrays.asList(sliderImage.split(",")); + } + return new ArrayList<>(); + } + + private YxStoreProductAttrValue attrInfo; + + @ApiModelProperty(value = "商品名称") + private String storeName; + + @ApiModelProperty(value = "商品简介") + private String storeInfo; + + @ApiModelProperty(value = "关键字") + private String keyword; + + @ApiModelProperty(value = "分类id") + private String cateId; + + @ApiModelProperty(value = "商品价格") + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal price; + + @ApiModelProperty(value = "会员价格") + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal vipPrice; + + @ApiModelProperty(value = "市场价") + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal otPrice; + + @ApiModelProperty(value = "邮费") + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal postage; + + @ApiModelProperty(value = "单位名") + private String unitName; + + @ApiModelProperty(value = "排序") + private Integer sort; + + @ApiModelProperty(value = "销量") + private Integer sales; + + @ApiModelProperty(value = "库存") + private Integer stock; + + @ApiModelProperty(value = "产品描述") + private String description; + + @ApiModelProperty(value = "是否包邮") + private Integer isPostage; + + @ApiModelProperty(value = "成本价") + @JsonSerialize(using = BigDecimalSerializer.class) + private BigDecimal cost; + + @ApiModelProperty(value = "秒杀状态 0 未开启 1已开启") + private Integer isSeckill; + + @ApiModelProperty(value = "砍价状态 0未开启 1开启") + private Integer isBargain; + + @ApiModelProperty(value = "是否优品推荐") + private Integer isGood; + + @ApiModelProperty(value = "虚拟销量") + private Integer ficti; + + @ApiModelProperty(value = "浏览量") + private Integer browse; + + @ApiModelProperty(value = "状态(0:未上架,1:上架)") + private Integer isShow; + + @ApiModelProperty(value = "获得积分") + private BigDecimal giveIntegral; + + @ApiModelProperty(value = "运费模板ID") + private Integer tempId; + + /** 是否单独分佣 */ + @ApiModelProperty(value = "是否单独分佣") + private Integer isSub; + + /** 规格 0单 1多 */ + @ApiModelProperty(value = "规格 0单 1多 ") + private Integer specType; + + /** 是否开启积分兑换*/ + @ApiModelProperty(value = "是否开启积分兑换") + private Integer isIntegral; + + /** 需要多少积分*/ + @ApiModelProperty(value = "需要多少积分") + private Integer integral; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductRelationQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductRelationQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..979914253e23645fd81d64cb70243e83f4cc9e0c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductRelationQueryVo.java @@ -0,0 +1,68 @@ +package co.yixiang.modules.product.vo; + +import co.yixiang.serializer.DoubleSerializer; +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 商品点赞和收藏表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-23 + */ +@Data +@ApiModel(value = "YxStoreProductRelationQueryVo对象", description = "商品点赞和收藏表查询参数") +public class YxStoreProductRelationQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + private Long id; + + @ApiModelProperty(value = "用户ID") + private Long uid; + + @ApiModelProperty(value = "商品ID") + private Long productId; + + @ApiModelProperty(value = "类型(收藏(collect)、点赞(like))") + private String type; + + @ApiModelProperty(value = "某种类型的商品(普通商品、秒杀商品)") + private String category; + + @ApiModelProperty(value = "添加时间") + private Date createTime; + + @ApiModelProperty(value = "产品图片") + private String image; + + @ApiModelProperty(value = "是否显示") + private Integer isShow; + + @ApiModelProperty(value = "原价") + @JsonSerialize(using = DoubleSerializer.class) + private Double otPrice; + + @ApiModelProperty(value = "父ID") + private Integer pid; + + @ApiModelProperty(value = "产品价格") + @JsonSerialize(using = DoubleSerializer.class) + private Double price; + + @ApiModelProperty(value = "产品销量") + private Integer sales; + + @ApiModelProperty(value = "商品名称") + private String storeName; + + @ApiModelProperty(value = "是否开启积分兑换") + private Integer isIntegral; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductReplyQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductReplyQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..8036ea9b1aca5fc8ace48b3e3a2ad78545e914c9 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxStoreProductReplyQueryVo.java @@ -0,0 +1,86 @@ +package co.yixiang.modules.product.vo; + +import cn.hutool.core.util.StrUtil; +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.Date; + +/** + *

+ * 评论表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-23 + */ +@Data +@ApiModel(value = "YxStoreProductReplyQueryVo对象", description = "评论表查询参数") +public class YxStoreProductReplyQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "评论ID") + private Long id; + + @ApiModelProperty(value = "产品id") + private Long productId; + + @ApiModelProperty(value = "某种商品类型(普通商品、秒杀商品)") + private String replyType; + + @ApiModelProperty(value = "商品分数") + private Integer productScore; + + @ApiModelProperty(value = "服务分数") + private Integer serviceScore; + + @ApiModelProperty(value = "评论内容") + private String comment; + + @ApiModelProperty(value = "评论图片") + private String[] pics; + + private String pictures; + + private String[] picturesArr; + + public String[] getPicturesArr() { + if(StrUtil.isNotEmpty(pictures)){ + return pictures.split(","); + }else{ + return new String[]{}; + } + + } + + + @ApiModelProperty(value = "管理员回复内容") + private String merchantReplyContent; + + @ApiModelProperty(value = "管理员回复时间") + private Date merchantReplyTime; + + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date createTime; + + @ApiModelProperty(value = "评价星星数") + private String star; + + @ApiModelProperty(value = "用户昵称") + private String nickname; + + @ApiModelProperty(value = "用户头像") + private String avatar; + + @ApiModelProperty(value = "商品sku") + private String sku; + + @JsonIgnore + private String cartInfo; + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxSystemStoreQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxSystemStoreQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..75230c2c7105baa6e0b667938e34c23a3e624916 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/product/vo/YxSystemStoreQueryVo.java @@ -0,0 +1,64 @@ +package co.yixiang.modules.product.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 门店自提 查询结果对象 + *

+ * + * @author hupeng + * @date 2020-03-04 + */ +@Data +@ApiModel(value = "YxSystemStoreQueryVo对象", description = "门店自提查询参数") +public class YxSystemStoreQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "门店ID") + private Integer id; + + @ApiModelProperty(value = "门店名称") + private String name; + + @ApiModelProperty(value = "简介") + private String introduction; + + @ApiModelProperty(value = "手机号码") + private String phone; + + @ApiModelProperty(value = "省市区") + private String address; + + @ApiModelProperty(value = "详细地址") + private String detailedAddress; + + @ApiModelProperty(value = "门店logo") + private String image; + + @ApiModelProperty(value = "纬度") + private String latitude; + + @ApiModelProperty(value = "经度") + private String longitude; + + @ApiModelProperty(value = "核销有效日期") + private String validTime; + + private String latlng; + + public String getLatlng(){ + return latitude+","+longitude; + } + + @ApiModelProperty(value = "每日营业开关时间") + private String dayTime; + + @ApiModelProperty(value = "距离") + private String distance; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/domain/StoreAfterSales.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/domain/StoreAfterSales.java new file mode 100644 index 0000000000000000000000000000000000000000..d1cf43cf2c16e75873dc47c517ca6552c58f21c5 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/domain/StoreAfterSales.java @@ -0,0 +1,79 @@ +package co.yixiang.modules.sales.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.math.BigDecimal; +import java.sql.Timestamp; + +/** + * @author : gzlv 2021/6/27 15:42 + */ +@Data +@TableName("yx_store_after_sales") +public class StoreAfterSales { + + /** id */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** 订单号 */ + private String orderCode; + + /** 退款金额 */ + private BigDecimal refundAmount; + + /** 服务类型0仅退款1退货退款 */ + private Integer serviceType; + + /** 申请原因 */ + private String reasons; + + /** 说明 */ + private String explains; + + /** 说明图片->多个用逗号分割 */ + private String explainImg; + + @ApiModelProperty(value = "快递公司编码") + private String shipperCode; + + /** 物流单号 */ + private String deliverySn; + + /** 物流名称 */ + private String deliveryName; + + /** 状态 0已提交等待平台审核 1平台已审核 等待用户发货/退款 2 用户已发货 3已完成 */ + private Integer state; + + /** 售后状态-0正常1用户取消2商家拒绝 */ + private Integer salesState; + + /** 添加时间 */ + private Timestamp createTime; + + /** 逻辑删除 */ + private Integer isDel; + + /** 用户id */ + private Long userId; + + /** + * 收货人 + */ + private String consignee; + + /** + * 手机号 + */ + private String phoneNumber; + + /** + * 地址 + */ + private String address; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/domain/StoreAfterSalesItem.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/domain/StoreAfterSalesItem.java new file mode 100644 index 0000000000000000000000000000000000000000..1102f24fd203719620d55525879ad50b121b49ea --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/domain/StoreAfterSalesItem.java @@ -0,0 +1,30 @@ +package co.yixiang.modules.sales.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +/** + * @author : gzlv 2021/6/27 15:49 + */ +@Data +@TableName("yx_store_after_sales_item") +public class StoreAfterSalesItem { + + /** 主键id */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** 售后id */ + private Long storeAfterSalesId; + + /** 商品id */ + private Long productId; + + /** 退货东西的详情信息 */ + private String cartInfo; + + /** 逻辑删除 */ + private Integer isDel; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/domain/StoreAfterSalesStatus.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/domain/StoreAfterSalesStatus.java new file mode 100644 index 0000000000000000000000000000000000000000..74418cf6938948adb3f02c28fd56e2ecad845793 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/domain/StoreAfterSalesStatus.java @@ -0,0 +1,35 @@ +package co.yixiang.modules.sales.domain; + +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.sql.Timestamp; + +/** + * @author : gzlv 2021/6/27 15:51 + */ +@Data +@TableName("yx_store_after_sales_status") +public class StoreAfterSalesStatus { + + /** Id */ + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + /** 售后id */ + private Long storeAfterSalesId; + + /** 操作类型 0售后订单生成 1后台审核成功 2用户发货 3打款 4审核失败 5用户撤销*/ + private Integer changeType; + + /** 操作备注 */ + private String changeMessage; + + /** 操作时间 */ + private Timestamp changeTime; + + /** 操作人 */ + private String operator; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/param/ProsuctParam.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/param/ProsuctParam.java new file mode 100644 index 0000000000000000000000000000000000000000..f267fde341f8b5d1b4834de54bf0f242f736ac45 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/param/ProsuctParam.java @@ -0,0 +1,16 @@ +package co.yixiang.modules.sales.param; + +import lombok.Data; + +/** + * @author : gzlv 2021/6/27 17:18 + */ +@Data +public class ProsuctParam { + + /** + * 商品id + */ + private Long productId; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/param/SalesCheckDto.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/param/SalesCheckDto.java new file mode 100644 index 0000000000000000000000000000000000000000..973d8fcb97a65b479201617ebed955a0d36b3fb0 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/param/SalesCheckDto.java @@ -0,0 +1,40 @@ +package co.yixiang.modules.sales.param; + +import lombok.Data; + +/** + * @author : gzlv 2021/6/29 5:25 + */ +@Data +public class SalesCheckDto { + + /** + * 售后id + */ + private Long salesId; + + /** + * 订单编号 + */ + private String orderCode; + + /** + * 审核状态0成功1失败 + */ + private Integer approvalStatus; + + /** + * 收货人 + */ + private String consignee; + + /** + * 手机号 + */ + private String phoneNumber; + + /** + * 地址 + */ + private String address; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/param/StoreAfterSalesParam.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/param/StoreAfterSalesParam.java new file mode 100644 index 0000000000000000000000000000000000000000..6a046a6572939ef248bcc71e3cd557aecaa1d9bd --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/param/StoreAfterSalesParam.java @@ -0,0 +1,48 @@ +package co.yixiang.modules.sales.param; + +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +/** + * @author : gzlv 2021/6/27 16:36 + */ +@Data +public class StoreAfterSalesParam { + + /** + * 订单号 + */ + @NotBlank + private String orderCode; + + /** + * 服务类型 0仅退款1退货退款 + */ + @NotBlank + private Integer serviceType; + + /** + * 申请原因 + */ + @NotBlank + private String reasonForApplication; + + /** + * 申请说明 + */ + private String applicationInstructions; + + /** + * 申请说明图片 + */ + private String applicationDescriptionPicture; + + /** + * 商品数据 + */ + @NotBlank + private List productParamList; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/param/YxStoreAfterSalesDto.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/param/YxStoreAfterSalesDto.java new file mode 100644 index 0000000000000000000000000000000000000000..cf6336681624a15b4deb489be9d10d90e20164cb --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/param/YxStoreAfterSalesDto.java @@ -0,0 +1,75 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.sales.param; + +import lombok.Data; +import java.util.Date; +import java.math.BigDecimal; +import java.io.Serializable; + +/** +* @author gzlv +* @date 2021-06-30 +*/ +@Data +public class YxStoreAfterSalesDto implements Serializable { + + private Long id; + + /** 订单号 */ + private String orderCode; + + /** 退款金额 */ + private BigDecimal refundAmount; + + /** 服务类型0仅退款1退货退款 */ + private Integer serviceType; + + /** 申请原因 */ + private String reasons; + + /** 说明 */ + private String explains; + + /** 说明图片->多个用逗号分割 */ + private String explainImg; + + /** 物流公司编码 */ + private String shipperCode; + + /** 物流单号 */ + private String deliverySn; + + /** 物流名称 */ + private String deliveryName; + + /** 状态 0已提交等待平台审核 1平台已审核 等待用户发货/退款 2 用户已发货 3退款成功 */ + private Integer state; + + /** 售后状态-0正常1用户取消2商家拒绝 */ + private Integer salesState; + + /** 添加时间 */ + private Date createTime; + + /** 逻辑删除 */ + private Integer isDel; + + /** 用户id */ + private Long userId; + + /** 商家收货人 */ + private String consignee; + + /** 商家手机号 */ + private String phoneNumber; + + /** 商家地址 */ + private String address; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/param/YxStoreAfterSalesQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/param/YxStoreAfterSalesQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..7635f33e00663344befe398c5926e10682f0d853 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/param/YxStoreAfterSalesQueryCriteria.java @@ -0,0 +1,41 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.sales.param; + +import com.fasterxml.jackson.annotation.JsonFormat; +import lombok.Data; + +import java.sql.Timestamp; +import java.util.Date; +import java.util.List; +import co.yixiang.annotation.Query; + +/** +* @author gzlv +* @date 2021-06-30 +*/ +@Data +public class YxStoreAfterSalesQueryCriteria{ + + /** + * 订单号 + */ + private String orderCode; + + /** 售后状态-0正常1用户取消2商家拒绝 */ + private Integer salesState; + + private List time; + + /** 状态 0已提交等待平台审核 1平台已审核 等待用户发货/退款 2 用户已发货 3已完成 */ + private Integer state; + + /** 服务类型0仅退款1退货退款 */ + private Integer serviceType; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesItemService.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesItemService.java new file mode 100644 index 0000000000000000000000000000000000000000..bd56779941b3ab6e5eac643fb4520f2692eebe0c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesItemService.java @@ -0,0 +1,10 @@ +package co.yixiang.modules.sales.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.sales.domain.StoreAfterSalesItem; + +/** + * @author : gzlv 2021/6/27 15:55 + */ +public interface StoreAfterSalesItemService extends BaseService { +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesService.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesService.java new file mode 100644 index 0000000000000000000000000000000000000000..198079ff1517e5dbf138a06a4c53718735e08d16 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesService.java @@ -0,0 +1,140 @@ +package co.yixiang.modules.sales.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.sales.domain.StoreAfterSales; +import co.yixiang.modules.sales.param.StoreAfterSalesParam; +import co.yixiang.modules.sales.param.YxStoreAfterSalesDto; +import co.yixiang.modules.sales.param.YxStoreAfterSalesQueryCriteria; +import co.yixiang.modules.sales.service.vo.StoreAfterSalesVo; +import co.yixiang.modules.sales.service.vo.YxStoreOrderCartInfoVo; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** + * @author : gzlv 2021/6/27 15:54 + */ +public interface StoreAfterSalesService extends BaseService { + + /** + * 创建售后订单 + * + * @param userId 用户id + * @param nickname 用户昵称 + * @param storeAfterSalesParam / + */ + void applyForAfterSales(Long userId, String nickname, StoreAfterSalesParam storeAfterSalesParam); + + /** + * 查询订单详情 + * @param key 订单号 + * @return + */ + List checkOrderDetails(String key); + + /** + * 查询列表 + * @param uid 用户id + * @param status 状态 + * @param page 页 + * @param orderCode + * @param limit 数量 + * @return + */ + Map salesList(Long uid, Integer status, Integer page, String orderCode, Integer limit); + + /** + * 查询详情 + * @param key 订单号 + * @param id 售后单id + * @param uid 用户id + */ + StoreAfterSalesVo getStoreInfoByOrderCodeAndAfterIdAndUid(String key, Long id, Long uid); + + /** + * 查询详情 + * @param key 订单号 + * @param uid 用户id + */ + List getStoreInfoByOrderCodeAndUid(String key, Long uid); + + /** + * + * @param storeInfo + * @return + */ + StoreAfterSalesVo handleSales(StoreAfterSalesVo storeInfo); + + /** + * 撤销申请 + * @param key 订单号 + * @param uid 用户id + * @param aLong + * @return Boolean + */ + Boolean revoke(String key, Long uid, Long aLong); + + /** + * 添加快递信息 + * + * @param code 物流公司编码 + * @param name 物流公司名称 + * @param postalCode + * @param orderCode + * @param id + * @return + */ + Boolean addLogisticsInformation(String code, String name, String postalCode ,String orderCode, Long id); + + /** + * 删除售后订单 + * @param orderCode / + * @param id + * @return / + */ + Boolean deleteAfterSalesOrder(String orderCode, Long id); + + /** + * 售后订单审核 + * @param salesId 售后id + * @param orderCode 订单id + * @param approvalStatus 审核状态 + * @param consignee 收货人 + * @param phoneNumber 收货人电话 + * @param address 地址 + * @return / + */ + Object salesCheck(Long salesId, String orderCode, Integer approvalStatus, String consignee, String phoneNumber, String address); + + /** + * 打款 + */ + StoreAfterSales makeMoney(Long salesId, String orderCode); + + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxStoreAfterSalesQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxStoreAfterSalesQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesStatusService.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesStatusService.java new file mode 100644 index 0000000000000000000000000000000000000000..3232e20a1abdc0b365484dada24be6b305c138a8 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/StoreAfterSalesStatusService.java @@ -0,0 +1,10 @@ +package co.yixiang.modules.sales.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.sales.domain.StoreAfterSalesStatus; + +/** + * @author : gzlv 2021/6/27 15:55 + */ +public interface StoreAfterSalesStatusService extends BaseService { +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesItemServiceImpl.java similarity index 32% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesItemServiceImpl.java index 5f4dc98c6dffe365c7dad4e51552bff428a8197d..049759c3c7c020ec5b7fc382aa1b0fbc29b53b88 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesItemServiceImpl.java @@ -1,34 +1,19 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.impl; +package co.yixiang.modules.sales.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; -import co.yixiang.modules.shop.domain.YxStoreProductAttr; -import co.yixiang.modules.shop.service.YxStoreProductAttrService; -import co.yixiang.modules.shop.service.mapper.StoreProductAttrMapper; +import co.yixiang.modules.sales.domain.StoreAfterSalesItem; +import co.yixiang.modules.sales.service.StoreAfterSalesItemService; +import co.yixiang.modules.sales.service.mapper.StoreAfterSalesItemMapper; import lombok.AllArgsConstructor; 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 + * @author : gzlv 2021/6/27 15:55 */ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreProductAttr") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreProductAttrServiceImpl extends BaseServiceImpl implements YxStoreProductAttrService { - - +public class StoreAfterSalesItemServiceImpl extends BaseServiceImpl implements StoreAfterSalesItemService { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..bb39c25cc00293e3aea0eb26c96752b0f9e3848c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesServiceImpl.java @@ -0,0 +1,475 @@ +package co.yixiang.modules.sales.service.impl; + +import cn.hutool.core.util.NumberUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.AfterSalesStatusEnum; +import co.yixiang.enums.OrderInfoEnum; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.exception.ErrorRequestException; +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.order.domain.YxStoreOrder; +import co.yixiang.modules.order.domain.YxStoreOrderCartInfo; +import co.yixiang.modules.order.service.mapper.StoreOrderCartInfoMapper; +import co.yixiang.modules.order.service.mapper.StoreOrderMapper; +import co.yixiang.modules.sales.domain.StoreAfterSales; +import co.yixiang.modules.sales.domain.StoreAfterSalesItem; +import co.yixiang.modules.sales.domain.StoreAfterSalesStatus; +import co.yixiang.modules.sales.param.ProsuctParam; +import co.yixiang.modules.sales.param.StoreAfterSalesParam; +import co.yixiang.modules.sales.param.YxStoreAfterSalesDto; +import co.yixiang.modules.sales.param.YxStoreAfterSalesQueryCriteria; +import co.yixiang.modules.sales.service.StoreAfterSalesService; +import co.yixiang.modules.sales.service.mapper.StoreAfterSalesItemMapper; +import co.yixiang.modules.sales.service.mapper.StoreAfterSalesMapper; +import co.yixiang.modules.sales.service.mapper.StoreAfterSalesStatusMapper; +import co.yixiang.modules.sales.service.vo.StoreAfterSalesVo; +import co.yixiang.modules.sales.service.vo.YxStoreOrderCartInfoVo; +import co.yixiang.utils.FileUtil; +import co.yixiang.utils.RedisUtils; +import co.yixiang.utils.SecurityUtils; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.AllArgsConstructor; +import org.apache.commons.collections.CollectionUtils; +import org.apache.commons.lang3.ObjectUtils; +import org.apache.commons.lang3.StringUtils; +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.math.BigDecimal; +import java.sql.Timestamp; +import java.time.LocalDateTime; +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author : gzlv 2021/6/27 15:56 + */ +@Service +@AllArgsConstructor +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class StoreAfterSalesServiceImpl extends BaseServiceImpl implements StoreAfterSalesService { + + private final StoreOrderMapper storeOrderMapper; + private final StoreOrderCartInfoMapper storeOrderCartInfoMapper; + private final StoreAfterSalesItemMapper storeAfterSalesItemMapper; + private final StoreAfterSalesStatusMapper storeAfterSalesStatusMapper; + private final IGenerator generator; + private final RedisUtils redisUtils; + + @Override + public void applyForAfterSales(Long userId, String nickname, StoreAfterSalesParam storeAfterSalesParam) { + + YxStoreOrder yxStoreOrder = storeOrderMapper.selectOne(Wrappers.lambdaQuery().eq(YxStoreOrder::getOrderId, storeAfterSalesParam.getOrderCode()).eq(YxStoreOrder::getUid, userId)); + redisUtils.set(ShopConstants.YSHOP_ORDER_SALE_STATUS_KEY + userId + storeAfterSalesParam.getOrderCode(), + yxStoreOrder.getStatus()); + checkOrder(yxStoreOrder); + //商品除去优惠后的总价格 + BigDecimal totalPrice = BigDecimal.ZERO; + //拿到所有的商品 + List yxStoreOrderCartInfos = storeOrderCartInfoMapper.selectList(Wrappers.lambdaQuery().eq(YxStoreOrderCartInfo::getOid, yxStoreOrder.getId())); + for (YxStoreOrderCartInfo yxStoreOrderCartInfo : yxStoreOrderCartInfos) { + YxStoreCartQueryVo cartInfo = JSONObject.parseObject(yxStoreOrderCartInfo.getCartInfo(), YxStoreCartQueryVo.class); + ProsuctParam prosuctParam = storeAfterSalesParam.getProductParamList().stream().filter(item -> item.getProductId().equals(yxStoreOrderCartInfo.getProductId())).findFirst().orElse(new ProsuctParam()); + if (prosuctParam.getProductId() != null) { + //商品优惠前总金额 + BigDecimal totalAmountOfGoods = NumberUtil.mul(cartInfo.getTruePrice(), cartInfo.getCartNum()); + //商品优惠总金额 + // BigDecimal commodityDiscountAmount = NumberUtil.mul(NumberUtil.div(totalAmountOfGoods, NumberUtil.sub(yxStoreOrder.getTotalPrice(), yxStoreOrder.getPayPostage())), yxStoreOrder.getCouponPrice()); + BigDecimal totalPriceMinusPostage = NumberUtil.sub(yxStoreOrder.getTotalPrice(), yxStoreOrder.getPayPostage()); + BigDecimal commodityDiscountAmount; + + if (totalPriceMinusPostage.compareTo(BigDecimal.ZERO) != 0) { + commodityDiscountAmount = NumberUtil.mul(NumberUtil.div(totalAmountOfGoods, totalPriceMinusPostage), yxStoreOrder.getCouponPrice()); + } else { + // 处理除数为零的情况,返回默认值 + commodityDiscountAmount = BigDecimal.ZERO; + } + + //商品优惠后总金额 + totalPrice = NumberUtil.add(totalPrice, NumberUtil.sub(totalAmountOfGoods, commodityDiscountAmount)); + // todo 根据自己的业务逻辑修改,是否退运费,默认退运费 + totalPrice = NumberUtil.add(totalPrice, yxStoreOrder.getPayPostage()); + yxStoreOrderCartInfo.setIsAfterSales(0); + storeOrderCartInfoMapper.updateById(yxStoreOrderCartInfo); + + } + } + //更新订单状态 + yxStoreOrder.setStatus(OrderInfoEnum.STATUS_NE1.getValue()); + yxStoreOrder.setRefundStatus(OrderInfoEnum.REFUND_STATUS_1.getValue()); + yxStoreOrder.setRefundReasonWap(storeAfterSalesParam.getReasonForApplication()); + yxStoreOrder.setRefundReasonWapExplain(storeAfterSalesParam.getApplicationInstructions()); + yxStoreOrder.setRefundReasonTime(new Date()); + storeOrderMapper.updateById(yxStoreOrder); + //生成售后订单 + StoreAfterSales storeAfterSales = new StoreAfterSales(); + storeAfterSales.setOrderCode(storeAfterSalesParam.getOrderCode()); + //此处需要对比原来订单的支付价格 + if(totalPrice.compareTo(yxStoreOrder.getPayPrice()) > 0){ + storeAfterSales.setRefundAmount(yxStoreOrder.getPayPrice()); + }else{ + storeAfterSales.setRefundAmount(totalPrice); + } + storeAfterSales.setServiceType(storeAfterSalesParam.getServiceType()); + storeAfterSales.setReasons(storeAfterSalesParam.getReasonForApplication()); + storeAfterSales.setExplains(storeAfterSalesParam.getApplicationInstructions()); + storeAfterSales.setExplainImg(storeAfterSalesParam.getApplicationDescriptionPicture()); + storeAfterSales.setState(AfterSalesStatusEnum.STATUS_0.getValue()); + storeAfterSales.setSalesState(0); + storeAfterSales.setCreateTime(Timestamp.valueOf(LocalDateTime.now())); + storeAfterSales.setIsDel(0); + storeAfterSales.setUserId(userId); + baseMapper.insert(storeAfterSales); + //售后商品详情 + for (ProsuctParam prosuctParam : storeAfterSalesParam.getProductParamList()) { + YxStoreOrderCartInfo yxStoreOrderCartInfo = yxStoreOrderCartInfos.stream().filter(item -> item.getProductId().equals(prosuctParam.getProductId())).findFirst().orElse(new YxStoreOrderCartInfo()); + StoreAfterSalesItem storeAfterSalesItem = new StoreAfterSalesItem(); + storeAfterSalesItem.setStoreAfterSalesId(storeAfterSales.getId()); + storeAfterSalesItem.setProductId(yxStoreOrderCartInfo.getProductId()); + storeAfterSalesItem.setCartInfo(yxStoreOrderCartInfo.getCartInfo()); + storeAfterSalesItem.setIsDel(0); + storeAfterSalesItemMapper.insert(storeAfterSalesItem); + } + + //操作记录 + StoreAfterSalesStatus storeAfterSalesStatus = new StoreAfterSalesStatus(); + storeAfterSalesStatus.setStoreAfterSalesId(storeAfterSales.getId()); + storeAfterSalesStatus.setChangeType(0); + storeAfterSalesStatus.setChangeMessage("售后订单生成"); + storeAfterSalesStatus.setChangeTime(Timestamp.valueOf(LocalDateTime.now())); + storeAfterSalesStatus.setOperator(nickname); + storeAfterSalesStatusMapper.insert(storeAfterSalesStatus); + + } + + @Override + public List checkOrderDetails(String key) { + List yxStoreOrderCartInfos = storeOrderCartInfoMapper.selectList(Wrappers.lambdaQuery().eq(YxStoreOrderCartInfo::getOid, key)); + YxStoreOrder yxStoreOrder = storeOrderMapper.selectById(key); + //查询 售后信息 + StoreAfterSales storeAfterSales = baseMapper.selectOne(Wrappers.lambdaQuery().eq(StoreAfterSales::getOrderCode, yxStoreOrder.getOrderId())); + List yxStoreOrderCartInfoVos = new ArrayList<>(); + for (YxStoreOrderCartInfo yxStoreOrderCartInfo : yxStoreOrderCartInfos) { + + YxStoreOrderCartInfoVo yxStoreOrderCartInfoVo = new YxStoreOrderCartInfoVo(); + yxStoreOrderCartInfoVo.setId(yxStoreOrderCartInfo.getId()); + yxStoreOrderCartInfoVo.setOid(yxStoreOrderCartInfo.getOid()); + yxStoreOrderCartInfoVo.setCartId(yxStoreOrderCartInfo.getCartId()); + yxStoreOrderCartInfoVo.setProductId(yxStoreOrderCartInfo.getProductId()); + YxStoreCartQueryVo cartInfo = JSONObject.parseObject(yxStoreOrderCartInfo.getCartInfo(), YxStoreCartQueryVo.class); + yxStoreOrderCartInfoVo.setCartInfo(cartInfo); + yxStoreOrderCartInfoVo.setUnique(yxStoreOrderCartInfo.getUnique()); + yxStoreOrderCartInfoVo.setIsAfterSales(yxStoreOrderCartInfo.getIsAfterSales() == null ? 0 : yxStoreOrderCartInfo.getIsAfterSales()); + + //商品优惠前总金额 + BigDecimal totalAmountOfGoods = NumberUtil.mul(cartInfo.getTruePrice(), cartInfo.getCartNum()); + //商品优惠总金额 + BigDecimal commodityDiscountAmount = NumberUtil.mul(NumberUtil.div(totalAmountOfGoods, NumberUtil.sub(yxStoreOrder.getTotalPrice(), yxStoreOrder.getPayPostage())), yxStoreOrder.getCouponPrice()); + + yxStoreOrderCartInfoVo.setRefundablePrice(NumberUtil.sub(totalAmountOfGoods, commodityDiscountAmount)); + + yxStoreOrderCartInfoVo.setReasons(storeAfterSales.getReasons()); + yxStoreOrderCartInfoVos.add(yxStoreOrderCartInfoVo); + } + + return yxStoreOrderCartInfoVos; + + } + + @Override + public Map salesList(Long uid, Integer status, Integer page, String orderCode, Integer limit) { + Page storeAfterSalesPage = new Page<>(page, limit); + List integers = new ArrayList<>(); + if (status == 1) { + integers.add(0); + integers.add(1); + integers.add(2); + } + if (status == 2) { + integers.add(3); + } + baseMapper.selectPage(storeAfterSalesPage, Wrappers.lambdaQuery() + .eq(uid != null, StoreAfterSales::getUserId, uid).in(status.equals(AfterSalesStatusEnum.STATUS_1.getValue()), StoreAfterSales::getState, integers) + .in(!status.equals(AfterSalesStatusEnum.STATUS_0.getValue()), StoreAfterSales::getState, integers) + .eq(StringUtils.isNotBlank(orderCode), StoreAfterSales::getOrderCode, orderCode) + .orderByDesc(StoreAfterSales::getCreateTime) + .eq(StoreAfterSales::getIsDel, ShopCommonEnum.DELETE_0.getValue())); + List storeAfterSalesVos = generator.convert(storeAfterSalesPage.getRecords(), StoreAfterSalesVo.class); + Map map = new HashMap<>(); + if (uid == null) { + map.put("content", storeAfterSalesVos.stream().map(this::handleSales).collect(Collectors.toList())); + map.put("totalElements", storeAfterSalesPage.getTotal()); + } else { + map.put("list", storeAfterSalesVos.stream().map(this::handleSales).collect(Collectors.toList())); + map.put("total", storeAfterSalesPage.getTotal()); + map.put("totalPage", storeAfterSalesPage.getPages()); + } + return map; + } + + @Override + public StoreAfterSalesVo getStoreInfoByOrderCodeAndAfterIdAndUid(String key, Long id, Long uid) { + StoreAfterSales storeAfterSales = baseMapper.selectOne(Wrappers.lambdaQuery().eq(id != null, StoreAfterSales::getId, id).eq(StoreAfterSales::getUserId, uid).eq(StoreAfterSales::getOrderCode, key)); + StoreAfterSalesVo salesVo = generator.convert(storeAfterSales, StoreAfterSalesVo.class); +// salesVo.setCloseAfterSaleTime(DateUtil.tomorrow().toTimestamp()); + return salesVo; + } + + @Override + public List getStoreInfoByOrderCodeAndUid(String key, Long uid) { + List storeAfterSales = baseMapper.selectList(Wrappers.lambdaQuery().eq(StoreAfterSales::getUserId, uid).eq(StoreAfterSales::getOrderCode, key)); + return generator.convert(storeAfterSales, StoreAfterSalesVo.class); + } + + /** + * 处理售后订单返回的状态 + * + * @param storeAfterSalesVo / + * @return StoreAfterSalesVo / + */ + @Override + public StoreAfterSalesVo handleSales(StoreAfterSalesVo storeAfterSalesVo) { + List storeAfterSalesItems = storeAfterSalesItemMapper.selectList(Wrappers.lambdaQuery().eq(StoreAfterSalesItem::getStoreAfterSalesId, storeAfterSalesVo.getId())); + List cartInfo = storeAfterSalesItems.stream() + .map(cart -> JSON.parseObject(cart.getCartInfo(), YxStoreCartQueryVo.class)) + .collect(Collectors.toList()); + storeAfterSalesVo.setCartInfo(cartInfo); + List storeAfterSalesStatuses = storeAfterSalesStatusMapper.selectList(Wrappers.lambdaQuery().eq(StoreAfterSalesStatus::getStoreAfterSalesId, storeAfterSalesVo.getId())); + + storeAfterSalesVo.setCompleteTime(storeAfterSalesStatuses.stream().filter(item -> item.getChangeType() == 3).findFirst().orElse(new StoreAfterSalesStatus()).getChangeTime()); + storeAfterSalesVo.setDeliveryTime(storeAfterSalesStatuses.stream().filter(item -> item.getChangeType() == 2).findFirst().orElse(new StoreAfterSalesStatus()).getChangeTime()); + storeAfterSalesVo.setAuditFailedTime(storeAfterSalesStatuses.stream().filter(item -> item.getChangeType() == 4).findFirst().orElse(new StoreAfterSalesStatus()).getChangeTime()); + storeAfterSalesVo.setReviewTime(storeAfterSalesStatuses.stream().filter(item -> item.getChangeType() == 1).findFirst().orElse(new StoreAfterSalesStatus()).getChangeTime()); + storeAfterSalesVo.setRevocationTime(storeAfterSalesStatuses.stream().filter(item -> item.getChangeType() == 5).findFirst().orElse(new StoreAfterSalesStatus()).getChangeTime()); + return storeAfterSalesVo; + } + + @Override + public Boolean revoke(String key, Long uid, Long id) { + StoreAfterSales storeAfterSales = baseMapper.selectOne(Wrappers.lambdaQuery(). + eq(StoreAfterSales::getUserId, uid).eq(StoreAfterSales::getId, id) + .eq(StoreAfterSales::getOrderCode, key)); + if (storeAfterSales == null) { + throw new YshopException("未查询到售后订单信息"); + } + if (storeAfterSales.getState().equals(AfterSalesStatusEnum.STATUS_2.getValue()) + || storeAfterSales.getState().equals(AfterSalesStatusEnum.STATUS_3.getValue())) { + throw new YshopException("订单不能撤销"); + } + storeAfterSales.setSalesState(1); + + YxStoreOrder yxStoreOrder = storeOrderMapper.selectOne(Wrappers.lambdaQuery().eq(YxStoreOrder::getOrderId, key)); + Object o = redisUtils.get(ShopConstants.YSHOP_ORDER_SALE_STATUS_KEY + uid + key); + yxStoreOrder.setStatus(o == null ? 0 : Integer.parseInt(o.toString())); + yxStoreOrder.setRefundStatus(OrderInfoEnum.STATUS_0.getValue()); + storeOrderMapper.updateById(yxStoreOrder); + + List yxStoreOrderCartInfos = storeOrderCartInfoMapper.selectList(Wrappers.lambdaQuery() + .eq(YxStoreOrderCartInfo::getOid, yxStoreOrder.getId())); + for (YxStoreOrderCartInfo yxStoreOrderCartInfo : yxStoreOrderCartInfos) { + yxStoreOrderCartInfo.setIsAfterSales(1); + storeOrderCartInfoMapper.updateById(yxStoreOrderCartInfo); + } + + //操作记录 + StoreAfterSalesStatus storeAfterSalesStatus = new StoreAfterSalesStatus(); + storeAfterSalesStatus.setStoreAfterSalesId(storeAfterSales.getId()); + storeAfterSalesStatus.setChangeType(5); + storeAfterSalesStatus.setChangeMessage("售后订单撤回"); + storeAfterSalesStatus.setChangeTime(Timestamp.valueOf(LocalDateTime.now())); + storeAfterSalesStatus.setOperator("用户操作"); + storeAfterSalesStatusMapper.insert(storeAfterSalesStatus); + + redisUtils.del(ShopConstants.YSHOP_ORDER_SALE_STATUS_KEY + uid + key); + return baseMapper.updateById(storeAfterSales) > 0; + } + + @Override + public Boolean addLogisticsInformation(String code, String name, String postalCode, String orderCode, Long id) { + StoreAfterSales storeAfterSales = baseMapper.selectOne(Wrappers.lambdaQuery() + .eq(StoreAfterSales::getId, id) + .eq(StoreAfterSales::getOrderCode, orderCode) + ); + if (!storeAfterSales.getState().equals(AfterSalesStatusEnum.STATUS_1.getValue())) { + throw new YshopException("当前状态不能添加物流信息!"); + } + storeAfterSales.setShipperCode(code); + storeAfterSales.setDeliverySn(postalCode); + storeAfterSales.setDeliveryName(name); + storeAfterSales.setState(AfterSalesStatusEnum.STATUS_2.getValue()); + + //操作记录 + StoreAfterSalesStatus storeAfterSalesStatus = new StoreAfterSalesStatus(); + storeAfterSalesStatus.setStoreAfterSalesId(storeAfterSales.getId()); + storeAfterSalesStatus.setChangeType(2); + storeAfterSalesStatus.setChangeMessage("售后订单生成"); + storeAfterSalesStatus.setChangeTime(Timestamp.valueOf(LocalDateTime.now())); + storeAfterSalesStatus.setOperator("用户操作"); + storeAfterSalesStatusMapper.insert(storeAfterSalesStatus); + + return baseMapper.updateById(storeAfterSales) > 0; + } + + @Override + public Boolean deleteAfterSalesOrder(String orderCode, Long id) { + StoreAfterSales storeAfterSales = baseMapper.selectOne(Wrappers.lambdaQuery().eq(StoreAfterSales::getId, id).eq(StoreAfterSales::getOrderCode, orderCode)); + return baseMapper.deleteById(storeAfterSales.getId()) > 0; + } + + @Override + public Object salesCheck(Long salesId, String orderCode, Integer approvalStatus, String consignee, String phoneNumber, String address) { + StoreAfterSales storeAfterSales = baseMapper.selectOne(Wrappers.lambdaQuery().eq(StoreAfterSales::getOrderCode, orderCode).eq(StoreAfterSales::getId, salesId)); + if (approvalStatus == 0) { + storeAfterSales.setState(AfterSalesStatusEnum.STATUS_1.getValue()); + if (storeAfterSales.getServiceType() == 1) { + if (StringUtils.isEmpty(consignee) || StringUtils.isEmpty(phoneNumber) || StringUtils.isEmpty(address)) { + throw new ErrorRequestException("请输入收货人信息"); + } + storeAfterSales.setConsignee(consignee); + storeAfterSales.setPhoneNumber(phoneNumber); + storeAfterSales.setAddress(address); + }else { + this.makeMoney(storeAfterSales.getId(),storeAfterSales.getOrderCode()); + } + //操作记录 + StoreAfterSalesStatus storeAfterSalesStatus = new StoreAfterSalesStatus(); + storeAfterSalesStatus.setStoreAfterSalesId(storeAfterSales.getId()); + storeAfterSalesStatus.setChangeType(1); + storeAfterSalesStatus.setChangeMessage("平台审核成功"); + storeAfterSalesStatus.setChangeTime(Timestamp.valueOf(LocalDateTime.now())); + storeAfterSalesStatus.setOperator(SecurityUtils.getUsername()); + storeAfterSalesStatusMapper.insert(storeAfterSalesStatus); + + } else { + storeAfterSales.setState(AfterSalesStatusEnum.STATUS_3.getValue()); + storeAfterSales.setSalesState(2); + //操作记录 + StoreAfterSalesStatus storeAfterSalesStatus = new StoreAfterSalesStatus(); + storeAfterSalesStatus.setStoreAfterSalesId(storeAfterSales.getId()); + storeAfterSalesStatus.setChangeType(4); + storeAfterSalesStatus.setChangeMessage("平台审核失败"); + storeAfterSalesStatus.setChangeTime(Timestamp.valueOf(LocalDateTime.now())); + storeAfterSalesStatus.setOperator(SecurityUtils.getUsername()); + storeAfterSalesStatusMapper.insert(storeAfterSalesStatus); + + YxStoreOrder yxStoreOrder = storeOrderMapper.selectOne(Wrappers.lambdaQuery().eq(YxStoreOrder::getOrderId, storeAfterSales.getOrderCode())); + Object o = redisUtils.get(ShopConstants.YSHOP_ORDER_SALE_STATUS_KEY + storeAfterSales.getUserId() + storeAfterSales.getOrderCode()); + yxStoreOrder.setStatus(o == null ? 0 : Integer.parseInt(o.toString())); + yxStoreOrder.setRefundStatus(OrderInfoEnum.STATUS_0.getValue()); + storeOrderMapper.updateById(yxStoreOrder); + + redisUtils.del(ShopConstants.YSHOP_ORDER_SALE_STATUS_KEY + storeAfterSales.getUserId() + storeAfterSales.getOrderCode()); + } + return baseMapper.updateById(storeAfterSales) > 0; + } + + @Override + public StoreAfterSales makeMoney(Long salesId, String orderCode) { + StoreAfterSales storeAfterSales = baseMapper.selectOne(Wrappers.lambdaQuery().eq(StoreAfterSales::getOrderCode, orderCode).eq(StoreAfterSales::getId, salesId)); + storeAfterSales.setState(AfterSalesStatusEnum.STATUS_3.getValue()); + baseMapper.updateById(storeAfterSales); + //操作记录 + StoreAfterSalesStatus storeAfterSalesStatus = new StoreAfterSalesStatus(); + storeAfterSalesStatus.setStoreAfterSalesId(storeAfterSales.getId()); + storeAfterSalesStatus.setChangeType(3); + storeAfterSalesStatus.setChangeMessage("平台打款成功"); + storeAfterSalesStatus.setChangeTime(Timestamp.valueOf(LocalDateTime.now())); + storeAfterSalesStatus.setOperator(SecurityUtils.getUsername()); + storeAfterSalesStatusMapper.insert(storeAfterSalesStatus); + + YxStoreOrder yxStoreOrder = storeOrderMapper.selectOne(Wrappers.lambdaQuery().eq(YxStoreOrder::getOrderId, storeAfterSales.getOrderCode())); + yxStoreOrder.setStatus(-2); + storeOrderMapper.updateById(yxStoreOrder); + return storeAfterSales; + } + + /** + * 检查订单是否符合售后订单 + * + * @param yxStoreOrder 订单 + */ + private void checkOrder(YxStoreOrder yxStoreOrder) { + if (yxStoreOrder == null) { + throw new YshopException("未查询到订单信息"); + } + + if (!yxStoreOrder.getPaid().equals(OrderInfoEnum.PAY_STATUS_1.getValue()) + || !yxStoreOrder.getRefundStatus().equals(OrderInfoEnum.REFUND_STATUS_0.getValue()) + || yxStoreOrder.getStatus() < OrderInfoEnum.STATUS_0.getValue()) { + throw new YshopException("订单状态不能售后"); + } + } + + @Override + //@Cacheable + public Map queryAll(YxStoreAfterSalesQueryCriteria criteria, Pageable pageable) { + Page storeAfterSalesPage = new Page<>(pageable.getPageNumber(), pageable.getPageSize()); + + LambdaQueryWrapper eq = Wrappers.lambdaQuery() + .in(ObjectUtils.isNotEmpty(criteria.getState()), StoreAfterSales::getState, criteria.getState()) + .eq(StringUtils.isNotBlank(criteria.getOrderCode()), StoreAfterSales::getOrderCode, criteria.getOrderCode()) + .eq(ObjectUtils.isNotEmpty(criteria.getSalesState()), StoreAfterSales::getSalesState, criteria.getSalesState()) + .eq(ObjectUtils.isNotEmpty(criteria.getServiceType()), StoreAfterSales::getServiceType, criteria.getServiceType()) + .orderByDesc(StoreAfterSales::getCreateTime) + .eq(StoreAfterSales::getIsDel, ShopCommonEnum.DELETE_0.getValue()); + if (CollectionUtils.isNotEmpty(criteria.getTime())) { + eq.ge(StoreAfterSales::getCreateTime, criteria.getTime().get(0)) + .le(StoreAfterSales::getCreateTime, criteria.getTime().get(1)); + } + + baseMapper.selectPage(storeAfterSalesPage, eq); + List storeAfterSalesVos = generator.convert(storeAfterSalesPage.getRecords(), StoreAfterSalesVo.class); + Map map = new HashMap<>(); + map.put("content", storeAfterSalesVos.stream().map(this::handleSales).collect(Collectors.toList())); + map.put("totalElements", storeAfterSalesPage.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxStoreAfterSalesQueryCriteria criteria) { + return baseMapper.selectList(QueryHelpPlus.getPredicate(StoreAfterSales.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxStoreAfterSalesDto yxStoreAfterSales : all) { + Map map = new LinkedHashMap<>(); + map.put("订单号", yxStoreAfterSales.getOrderCode()); + map.put("退款金额", yxStoreAfterSales.getRefundAmount()); + map.put("服务类型0仅退款1退货退款", yxStoreAfterSales.getServiceType()); + map.put("申请原因", yxStoreAfterSales.getReasons()); + map.put("说明", yxStoreAfterSales.getExplains()); + map.put("说明图片->多个用逗号分割", yxStoreAfterSales.getExplainImg()); + map.put("物流公司编码", yxStoreAfterSales.getShipperCode()); + map.put("物流单号", yxStoreAfterSales.getDeliverySn()); + map.put("物流名称", yxStoreAfterSales.getDeliveryName()); + map.put("状态 0已提交等待平台审核 1平台已审核 等待用户发货/退款 2 用户已发货 3退款成功", yxStoreAfterSales.getState()); + map.put("售后状态-0正常1用户取消2商家拒绝", yxStoreAfterSales.getSalesState()); + map.put("添加时间", yxStoreAfterSales.getCreateTime()); + map.put("逻辑删除", yxStoreAfterSales.getIsDel()); + map.put("用户id", yxStoreAfterSales.getUserId()); + map.put("商家收货人", yxStoreAfterSales.getConsignee()); + map.put("商家手机号", yxStoreAfterSales.getPhoneNumber()); + map.put("商家地址", yxStoreAfterSales.getAddress()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrResultServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesStatusServiceImpl.java similarity index 31% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrResultServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesStatusServiceImpl.java index 273dfa2cb557f72eb3a397ef0fbdbd097c99fe01..a66a5cb23186a63ff82f31581d75e56cdc5cb047 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductAttrResultServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/impl/StoreAfterSalesStatusServiceImpl.java @@ -1,34 +1,19 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.impl; +package co.yixiang.modules.sales.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; -import co.yixiang.modules.shop.domain.YxStoreProductAttrResult; -import co.yixiang.modules.shop.service.YxStoreProductAttrResultService; -import co.yixiang.modules.shop.service.mapper.StoreProductAttrResultMapper; +import co.yixiang.modules.sales.domain.StoreAfterSalesStatus; +import co.yixiang.modules.sales.service.StoreAfterSalesStatusService; +import co.yixiang.modules.sales.service.mapper.StoreAfterSalesStatusMapper; import lombok.AllArgsConstructor; 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 + * @author : gzlv 2021/6/27 15:56 */ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreProductAttrResult") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreProductAttrResultServiceImpl extends BaseServiceImpl implements YxStoreProductAttrResultService { - - +public class StoreAfterSalesStatusServiceImpl extends BaseServiceImpl implements StoreAfterSalesStatusService { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/mapper/StoreAfterSalesItemMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/mapper/StoreAfterSalesItemMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..a21ebd20b6943d361d4ba63145da532bab6007b3 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/mapper/StoreAfterSalesItemMapper.java @@ -0,0 +1,10 @@ +package co.yixiang.modules.sales.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.sales.domain.StoreAfterSalesItem; + +/** + * @author : gzlv 2021/6/27 15:53 + */ +public interface StoreAfterSalesItemMapper extends CoreMapper { +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/mapper/StoreAfterSalesMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/mapper/StoreAfterSalesMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..51fd30e78abd155beb3eae603d28dfcf99366fe3 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/mapper/StoreAfterSalesMapper.java @@ -0,0 +1,10 @@ +package co.yixiang.modules.sales.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.sales.domain.StoreAfterSales; + +/** + * @author : gzlv 2021/6/27 15:53 + */ +public interface StoreAfterSalesMapper extends CoreMapper { +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/mapper/StoreAfterSalesStatusMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/mapper/StoreAfterSalesStatusMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..a7ce7d43c201c7e63927d3d175e3e0ca73c654a6 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/mapper/StoreAfterSalesStatusMapper.java @@ -0,0 +1,10 @@ +package co.yixiang.modules.sales.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.sales.domain.StoreAfterSalesStatus; + +/** + * @author : gzlv 2021/6/27 15:52 + */ +public interface StoreAfterSalesStatusMapper extends CoreMapper { +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/vo/StoreAfterSalesVo.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/vo/StoreAfterSalesVo.java new file mode 100644 index 0000000000000000000000000000000000000000..329220e11474011bd76c22a1efb7e2349cba15b0 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/vo/StoreAfterSalesVo.java @@ -0,0 +1,124 @@ +package co.yixiang.modules.sales.service.vo; + +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import org.springframework.format.annotation.DateTimeFormat; + +import java.math.BigDecimal; +import java.sql.Timestamp; +import java.util.List; + +/** + * @author : gzlv 2021/6/28 0:43 + */ +@Data +public class StoreAfterSalesVo { + + /** id */ + private Long id; + + /** 订单号 */ + private String orderCode; + + /** 退款金额 */ + private BigDecimal refundAmount; + + /** 服务类型0仅退款1退货退款 */ + private Integer serviceType; + + /** 申请原因 */ + private String reasons; + + /** 说明 */ + private String explains; + + /** 说明图片->多个用逗号分割 */ + private String explainImg; + + /** 物流单号 */ + private String deliverySn; + + /** 物流名称 */ + private String deliveryName; + + @ApiModelProperty(value = "快递公司编码") + private String shipperCode; + + /** 状态 0已提交等待平台审核 1平台已审核 等待用户发货/退款 2 用户已发货 3退款成功 */ + private Integer state; + + /** 售后状态-0正常1用户取消2商家拒绝 */ + private Integer salesState; + + /** 添加时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Timestamp createTime; + + /** 逻辑删除 */ + private Integer isDel; + + /** 用户id */ + private Long userId; + + private List cartInfo; + + /** + * 收货人 + */ + private String consignee; + + /** + * 手机号 + */ + private String phoneNumber; + + /** + * 地址 + */ + private String address; + + + /** + * 审核时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Timestamp reviewTime; + + /** + * 发货时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Timestamp deliveryTime; + + /** + * 完成时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Timestamp completeTime; + + /** + * 审核失败时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Timestamp auditFailedTime; + + /** + * 撤销时间 + */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @DateTimeFormat(pattern = "yyyy-MM-dd HH:mm:ss") + private Timestamp revocationTime; + + /** + * 关闭售后时间 + */ + private Timestamp closeAfterSaleTime; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/sales/service/vo/YxStoreOrderCartInfoVo.java b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/vo/YxStoreOrderCartInfoVo.java new file mode 100644 index 0000000000000000000000000000000000000000..ba5c5c1c84487a076b2ba4f78f8b15d747155f9e --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/sales/service/vo/YxStoreOrderCartInfoVo.java @@ -0,0 +1,49 @@ +package co.yixiang.modules.sales.service.vo; + +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @author : gzlv 2021/6/27 22:40 + */ +@Data +public class YxStoreOrderCartInfoVo { + + @TableId + private Long id; + + + /** 订单id */ + private Long oid; + + + /** 购物车id */ + private Long cartId; + + + /** 商品ID */ + private Long productId; + + + /** 购买东西的详细信息 */ + private YxStoreCartQueryVo cartInfo; + + + /** 唯一id */ + @TableField(value = "`unique`") + private String unique; + + /** 是否能售后0不能1能 */ + private Integer isAfterSales; + + /** 可退價格 */ + private BigDecimal refundablePrice; + + /** 申请原因 */ + private String reasons; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxAppVersion.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxAppVersion.java new file mode 100644 index 0000000000000000000000000000000000000000..3f396a6b934b380ef781b23f633b37d8c45d81e5 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxAppVersion.java @@ -0,0 +1,54 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.shop.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; +import javax.validation.constraints.*; +import java.util.Date; +import co.yixiang.domain.BaseDomain; + +/** +* @author lioncity +* @date 2020-12-09 +*/ +@Data +@TableName("yx_app_version") +public class YxAppVersion extends BaseDomain { + @TableId + private Integer id; + + + + + /** 版本code */ + private String versionCode; + + /** 版本名称 */ + private String versionName; + + /** 版本描述 */ + private String versionInfo; + + /** 安卓下载链接 */ + private String androidUrl; + + /** 是否强制升级 */ + private Integer forceUpdate; + + /** ios store应用商店链接 */ + private String iosUrl; + + + public void copy(YxAppVersion source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterial.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxMaterial.java similarity index 63% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterial.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxMaterial.java index 7bd1f7c9c8a855fe2031d5c6e21ae1c27217c7b0..a2bcd1f4efdb51a54b98c4ce115e582238247b07 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterial.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxMaterial.java @@ -1,26 +1,26 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -import com.baomidou.mybatisplus.annotation.*; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; - -import java.io.Serializable; -import java.sql.Timestamp; +import lombok.EqualsAndHashCode; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_material") public class YxMaterial extends BaseDomain { @@ -49,7 +49,7 @@ public class YxMaterial extends BaseDomain { private String url; - public void copy(YxMaterial source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxMaterial source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterialGroup.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxMaterialGroup.java similarity index 57% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterialGroup.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxMaterialGroup.java index e75162ef14d64f5fb3eb57867497b1bb25b5fad0..6ef7b3fedd6a3383f7645fe34a5e0a411e7cbe16 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxMaterialGroup.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxMaterialGroup.java @@ -1,26 +1,26 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -import com.baomidou.mybatisplus.annotation.*; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; - -import java.io.Serializable; -import java.sql.Timestamp; +import lombok.EqualsAndHashCode; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_material_group") public class YxMaterialGroup extends BaseDomain { @@ -37,7 +37,7 @@ public class YxMaterialGroup extends BaseDomain { private String name; - public void copy(YxMaterialGroup source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxMaterialGroup source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemAttachment.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemAttachment.java new file mode 100644 index 0000000000000000000000000000000000000000..d3b589312df81a8d33d1d69ffe668e551de4f78b --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemAttachment.java @@ -0,0 +1,64 @@ +package co.yixiang.modules.shop.domain; + + +import co.yixiang.domain.BaseDomain; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + *

+ * 附件管理表 + *

+ * + * @author hupeng + * @since 2019-11-11 + */ +@Getter +@Setter +@Builder +@AllArgsConstructor +@NoArgsConstructor +@ApiModel(value = "YxSystemAttachment对象", description = "附件管理表") +public class YxSystemAttachment extends BaseDomain { + + private static final long serialVersionUID = 1L; + + @TableId(value = "att_id", type = IdType.AUTO) + private Long attId; + + @ApiModelProperty(value = "附件名称") + private String name; + + @ApiModelProperty(value = "附件路径") + private String attDir; + + @ApiModelProperty(value = "压缩图片路径") + private String sattDir; + + @ApiModelProperty(value = "附件大小") + private String attSize; + + @ApiModelProperty(value = "附件类型") + private String attType; + + @ApiModelProperty(value = "分类ID0编辑器,1产品图片,2拼团图片,3砍价图片,4秒杀图片,5文章图片,6组合数据图") + private Integer pid; + + @ApiModelProperty(value = "图片上传类型 1本地 2七牛云 3OSS 4COS ") + private Integer imageType; + + @ApiModelProperty(value = "图片上传模块类型 1 后台上传 2 用户生成") + private Integer moduleType; + + private Long uid; + + private String inviteCode; + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemConfig.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemConfig.java similarity index 75% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemConfig.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemConfig.java index 482895e629f21c3148d4a4153b87919a3970f0e7..e31a527d378fcc0b3d5a18c08029b53bc6c3b599 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemConfig.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.domain; @@ -15,9 +14,9 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data @TableName("yx_system_config") @@ -44,7 +43,7 @@ public class YxSystemConfig implements Serializable { private Integer status; - public void copy(YxSystemConfig source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxSystemConfig source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemGroupData.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemGroupData.java similarity index 68% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemGroupData.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemGroupData.java index 6988496769e479c82e2d5c8b7b3c02cb597326da..8fc3c98537a9af113724970dab086d1dbee4e203 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemGroupData.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemGroupData.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.domain; @@ -11,16 +10,22 @@ import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; -import lombok.Data; - -import java.io.Serializable; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; /** - * @author hupeng - * @date 2020-05-12 - */ - -@Data +* @author hupeng +* @date 2020-05-12 +*/ + +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder @TableName("yx_system_group_data") public class YxSystemGroupData extends BaseDomain { @@ -45,7 +50,7 @@ public class YxSystemGroupData extends BaseDomain { private Integer status; - public void copy(YxSystemGroupData source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxSystemGroupData source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStore.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemStore.java similarity index 82% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStore.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemStore.java index d01fc075bb774bb2b22224c435b26dceed683cb3..bf9b0d4dfa48bf936d50179e88676ad4e83664af 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStore.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemStore.java @@ -1,30 +1,28 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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.EqualsAndHashCode; import javax.validation.constraints.NotBlank; -import java.io.Serializable; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_system_store") public class YxSystemStore extends BaseDomain { @@ -81,9 +79,11 @@ public class YxSystemStore extends BaseDomain { private String dayTime; + /** 是否显示 */ private Integer isShow; + private Date validTimeEnd; private Date validTimeStart; @@ -93,7 +93,7 @@ public class YxSystemStore extends BaseDomain { private Date dayTimeEnd; - public void copy(YxSystemStore source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxSystemStore source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStoreStaff.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemStoreStaff.java similarity index 77% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStoreStaff.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemStoreStaff.java index bd6dfbf96768e6ede599d90214620f254d41959a..2734fa1119242942bce58ada054753bbd0dd63f7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemStoreStaff.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemStoreStaff.java @@ -1,30 +1,28 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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.EqualsAndHashCode; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; -import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_system_store_staff") public class YxSystemStoreStaff extends BaseDomain { @@ -64,6 +62,7 @@ public class YxSystemStoreStaff extends BaseDomain { private Integer status; + /** 微信昵称 */ private String nickname; @@ -72,7 +71,7 @@ public class YxSystemStoreStaff extends BaseDomain { private String storeName; - public void copy(YxSystemStoreStaff source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxSystemStoreStaff source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserLevel.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserLevel.java similarity index 83% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserLevel.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserLevel.java index 22d9170d440d9b6ad3ed7c4a660e52b25c778e09..de40c2491132378c6a7a021a99957434e7dec366 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserLevel.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserLevel.java @@ -1,37 +1,41 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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.EqualsAndHashCode; import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotNull; -import java.io.Serializable; import java.math.BigDecimal; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_system_user_level") public class YxSystemUserLevel extends BaseDomain { @TableId private Integer id; + + /** 商户id */ + private Integer merId; + + /** 会员名称 */ @NotBlank(message = "名称必填") private String name; @@ -82,7 +86,7 @@ public class YxSystemUserLevel extends BaseDomain { - public void copy(YxSystemUserLevel source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxSystemUserLevel source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxAppVersionService.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxAppVersionService.java new file mode 100644 index 0000000000000000000000000000000000000000..db56b6a94b3402dd7c41b8f373c1f200742f4e15 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxAppVersionService.java @@ -0,0 +1,48 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.shop.service; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.shop.domain.YxAppVersion; +import co.yixiang.modules.shop.service.dto.YxAppVersionDto; +import co.yixiang.modules.shop.service.dto.YxAppVersionQueryCriteria; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import co.yixiang.domain.PageResult; +/** +* @author lioncity +* @date 2020-12-09 +*/ +public interface YxAppVersionService extends BaseService{ + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + PageResult queryAll(YxAppVersionQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxAppVersionQueryCriteria 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/YxMaterialGroupService.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxMaterialGroupService.java similarity index 47% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialGroupService.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxMaterialGroupService.java index b8c6c5efeb25a8c1f1a47667b26db141b6646bc4..55c61d86221417e78d465595f1b5b571512b5b83 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialGroupService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxMaterialGroupService.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.service; @@ -18,31 +20,31 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxMaterialGroupService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxMaterialGroupService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxMaterialGroupQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxMaterialGroupQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxMaterialGroupQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @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/YxMaterialService.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxMaterialService.java similarity index 36% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialService.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxMaterialService.java index 5edd02d147060162529091dfa0ed5ffe23277d5b..b8470be0fa8ab82d28a6928d45167034b9e241dc 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxMaterialService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxMaterialService.java @@ -2,47 +2,40 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ 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; import org.springframework.data.domain.Pageable; -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxMaterialService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxMaterialService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxMaterialQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxMaterialQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxMaterialQueryCriteria criteria); - /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List all, HttpServletResponse response) throws IOException; + } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemAttachmentService.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemAttachmentService.java new file mode 100644 index 0000000000000000000000000000000000000000..b710051b2d257e230f54da18244e478d6a9a0658 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemAttachmentService.java @@ -0,0 +1,60 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.shop.service; + + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.shop.domain.YxSystemAttachment; + +/** + *

+ * 附件管理表 服务类 + *

+ * + * @author hupeng + * @since 2019-11-11 + */ +public interface YxSystemAttachmentService extends BaseService { + + /** + * 根据名称获取 + * @param name name + * @return YxSystemAttachment + */ + YxSystemAttachment getInfo(String name); + + /** + * 根据code获取 + * @param code code + * @return YxSystemAttachment + */ + YxSystemAttachment getByCode(String code); + + /** + * 添加附件记录 + * @param name 名称 + * @param attSize 附件大小 + * @param attDir 路径 + * @param sattDir 路径 + */ + void attachmentAdd(String name,String attSize,String attDir,String sattDir); + + /** + * 添加附件记录 + * @param name 名称 + * @param attSize 附件大小 + * @param attDir 路径 + * @param sattDir 路径 + * @param uid 用户id + * @param code 邀请码 + */ + void newAttachmentAdd(String name,String attSize,String attDir,String sattDir,Long uid,String code); + + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java similarity index 46% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java index b934e662e79272826f144a9fd82474fb2bb63e0c..bd003f020e39cb0414bfa276a0296a8da6e3cb3c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemConfigService.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.service; @@ -18,32 +20,39 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxSystemConfigService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxSystemConfigService extends BaseService{ /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map + * 获取配置值 + * @param name 配置名 + * @return string */ - Map queryAll(YxSystemConfigQueryCriteria criteria, Pageable pageable); + String getData(String name); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxSystemConfigQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxSystemConfigQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; YxSystemConfig findByKey(String store_brokerage_statu); diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java similarity index 43% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java index 119753733d5289109d6f06cb4f61288ced2d52d3..3961e9aaef885ea41a8e955286a30f223d4c5433 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemGroupDataService.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.service; @@ -10,6 +12,7 @@ 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.YxSystemGroupDataQueryCriteria; +import com.alibaba.fastjson.JSONObject; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,31 +21,38 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxSystemGroupDataService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxSystemGroupDataService extends BaseService{ /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map + * 获取配置数据 + * @param name 配置名称 + * @return List */ - Map queryAll(YxSystemGroupDataQueryCriteria criteria, Pageable pageable); + List getDatas(String name); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxSystemGroupDataQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxSystemGroupDataQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @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-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreService.java similarity index 35% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreService.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreService.java index d5e828dad4dd5f75d88b2b5571aaf89768ce3eec..c5a3d066d45d835e4f80c291b8c333a699df2965 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreService.java @@ -2,11 +2,14 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.service; import co.yixiang.common.service.BaseService; +import co.yixiang.modules.product.vo.YxSystemStoreQueryVo; import co.yixiang.modules.shop.domain.YxSystemStore; import co.yixiang.modules.shop.service.dto.YxSystemStoreDto; import co.yixiang.modules.shop.service.dto.YxSystemStoreQueryCriteria; @@ -18,31 +21,51 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxSystemStoreService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxSystemStoreService extends BaseService{ + + YxSystemStoreQueryVo getYxSystemStoreById(int id); /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map + * 获取门店列表 + * @param latitude 纬度 + * @param longitude 经度 + * @param page page + * @param limit limit + * @return List */ - Map queryAll(YxSystemStoreQueryCriteria criteria, Pageable pageable); + List getStoreList(String latitude, String longitude, int page, int limit); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List + * 获取最新单个门店 + * @param latitude 纬度 + * @param longitude 经度 + * @return YxSystemStoreQueryVo */ + YxSystemStoreQueryVo getStoreInfo(String latitude,String longitude); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxSystemStoreQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxSystemStoreQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @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/YxSystemStoreStaffService.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreStaffService.java similarity index 43% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreStaffService.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreStaffService.java index d2950a6f87b0b6896ddd3b69d8008f299d0fddcb..55f3063e854868273ec33906424a3e88432a66fa 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreStaffService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/YxSystemStoreStaffService.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.service; @@ -18,31 +20,40 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxSystemStoreStaffService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxSystemStoreStaffService extends BaseService{ /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map + * 接测店员客服状态 + * @param uid 用户id + * @param storeId 门店id + * @return boolean true=可核销 */ - Map queryAll(YxSystemStoreStaffQueryCriteria criteria, Pageable pageable); + boolean checkStatus(Long uid,Integer storeId); + /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxSystemStoreStaffQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxSystemStoreStaffQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxAppVersionDto.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxAppVersionDto.java new file mode 100644 index 0000000000000000000000000000000000000000..4709ced3437f3516ee7d7f9133ba0e402c4e2c68 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxAppVersionDto.java @@ -0,0 +1,48 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.shop.service.dto; + +import lombok.Data; +import java.util.Date; +import java.io.Serializable; + +/** +* @author lioncity +* @date 2020-12-09 +*/ +@Data +public class YxAppVersionDto implements Serializable { + + private Integer id; + + private Integer isDel; + + /** 更新时间 */ + private Date createTime; + + private Date updateTime; + + /** 版本code */ + private String versionCode; + + /** 版本名称 */ + private String versionName; + + /** 版本描述 */ + private String versionInfo; + + /** 安卓下载链接 */ + private String androidUrl; + + /** 是否强制升级 */ + private Integer forceUpdate; + + /** ios store应用商店链接 */ + private String iosUrl; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxAppVersionQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxAppVersionQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..c9dad5c8b87392a82d87b320c32cb4301d526aed --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxAppVersionQueryCriteria.java @@ -0,0 +1,21 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.shop.service.dto; + +import lombok.Data; +import java.util.List; +import co.yixiang.annotation.Query; + +/** +* @author lioncity +* @date 2020-12-09 +*/ +@Data +public class YxAppVersionQueryCriteria{ +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialDto.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialDto.java similarity index 70% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialDto.java index d21b50122f5677783a2fd41ae863ffed2006ab47..45501c76a0a9467f2f8d0b586c62abda34063b44 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialDto.java @@ -1,30 +1,29 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; import java.io.Serializable; -import java.sql.Timestamp; +import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxMaterialDto implements Serializable { /** PK */ private String id; - /** 所属租户 */ - private String userId; - /** 逻辑删除标记(0:显示;1:隐藏) */ + /** 创建时间 */ + private Date createTime; + /** 创建者ID */ private String createId; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupDto.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupDto.java similarity index 75% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupDto.java index 9902433d6c6827af63d4cb89b4d5cba2030cd8fb..b922854b9511a0597aea1f3a4f202caac8f0fcdf 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupDto.java @@ -1,26 +1,28 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; import java.io.Serializable; -import java.sql.Timestamp; +import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxMaterialGroupDto implements Serializable { /** PK */ private String id; + /** 创建时间 */ + private Date createTime; + /** 创建者ID */ private String createId; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupQueryCriteria.java similarity index 55% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupQueryCriteria.java index 1f06d818a97cb90f982096395a5a3c4a171f65d3..b19cb7ae1beeefe44e6091fe6034d0ce7a710dd1 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxExpressQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupQueryCriteria.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxExpressQueryCriteria { +public class YxMaterialGroupQueryCriteria{ } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialQueryCriteria.java similarity index 63% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialQueryCriteria.java index d5984ee390b26d97d1775ff0c4c6ae7b53a4de6a..d0af1db4acad7328e2e967e41967282955310e8f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.service.dto; @@ -10,11 +9,11 @@ import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxMaterialQueryCriteria { +public class YxMaterialQueryCriteria{ @Query private String groupId; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigDto.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigDto.java similarity index 83% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigDto.java index f6d15c42de822890099070bb7345d9512875b8c3..eddb7274b5ca680e459699af5c73e751c1775a1b 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.service.dto; @@ -11,9 +10,9 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxSystemConfigDto implements Serializable { diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..06525b4c0772d13cf1c89047f6a003edb84c7909 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigQueryCriteria.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxSystemConfigQueryCriteria{ +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataDto.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataDto.java similarity index 76% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataDto.java index d64dfb854035da0e967c3254933204d4a469eed0..6e84df27c393d88a05e9a55152433ffeb5d3dd6c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataDto.java @@ -1,21 +1,19 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.service.dto; import lombok.Data; import java.io.Serializable; -import java.util.Date; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxSystemGroupDataDto implements Serializable { @@ -28,10 +26,10 @@ public class YxSystemGroupDataDto implements Serializable { // 数据组对应的数据值(json数据) private String value; - private Map map; + private Map map; // 添加数据时间 - private Date createTime; + private Integer addTime; // 数据排序 private Integer sort; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataQueryCriteria.java similarity index 64% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataQueryCriteria.java index 30d1cf68f43e709120e10449dee99e26472f25e5..2cd214436049f5d8c1c474990864424f5707107d 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemGroupDataQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.service.dto; @@ -10,13 +9,16 @@ import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxSystemGroupDataQueryCriteria { +public class YxSystemGroupDataQueryCriteria{ // 精确 @Query private String groupName; + + @Query + private Integer status; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreDto.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreDto.java similarity index 91% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreDto.java index c86c25c95e8a1d20b6a89309c11469922f6d79fd..9f8cf5be28af4d05cfd781dfc2663b3e2ac3adec 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.service.dto; @@ -12,9 +11,9 @@ import java.io.Serializable; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxSystemStoreDto implements Serializable { @@ -50,6 +49,8 @@ public class YxSystemStoreDto implements Serializable { /** 每日营业开关时间 */ private String dayTime; + /** 添加时间 */ + private Date createTime; /** 是否显示 */ private Integer isShow; diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..8c10b3debf59a7ab3120cb14f1ff662bcaee73bc --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreQueryCriteria.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxSystemStoreQueryCriteria{ +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffDto.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffDto.java similarity index 89% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffDto.java index 9494bb4d1c7f86af14fefee2c23cf0c0c855d812..7fd9d84082afb79230d10d1af510f5d59f00edec 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.service.dto; @@ -12,9 +11,9 @@ import java.io.Serializable; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxSystemStoreStaffDto implements Serializable { diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffQueryCriteria.java similarity index 72% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffQueryCriteria.java index 2f052d88f21f808c5422b2d4f843c1ee7f994ca8..4b1cdab592849d04856dd31d42bdc50ac208a504 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreStaffQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.service.dto; @@ -10,11 +9,11 @@ import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxSystemStoreStaffQueryCriteria { +public class YxSystemStoreStaffQueryCriteria{ /** 模糊 */ @Query(type = Query.Type.INNER_LIKE) diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCartServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxAppVersionServiceImpl.java similarity index 39% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCartServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxAppVersionServiceImpl.java index a74c6740ab96319d41b669f114591cafbf75f847..67eb312d9502fc385ccca6496ad3f898d5576a93 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreCartServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxAppVersionServiceImpl.java @@ -1,95 +1,86 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ package co.yixiang.modules.shop.service.impl; +import co.yixiang.modules.shop.domain.YxAppVersion; import co.yixiang.common.service.impl.BaseServiceImpl; -import co.yixiang.common.utils.QueryHelpPlus; +import lombok.AllArgsConstructor; import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.shop.domain.YxStoreCart; -import co.yixiang.modules.shop.service.YxStoreCartService; -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 co.yixiang.modules.shop.service.mapper.StoreCartMapper; -import co.yixiang.utils.FileUtil; +import com.github.pagehelper.PageHelper; import com.github.pagehelper.PageInfo; -import lombok.AllArgsConstructor; -import org.springframework.data.domain.Pageable; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.utils.ValidationUtil; +import co.yixiang.utils.FileUtil; +import co.yixiang.modules.shop.service.YxAppVersionService; +import co.yixiang.modules.shop.service.dto.YxAppVersionDto; +import co.yixiang.modules.shop.service.dto.YxAppVersionQueryCriteria; +import co.yixiang.modules.shop.service.mapper.YxAppVersionMapper; 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 java.util.List; -import java.util.Map; - // 默认不使用缓存 //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; +import co.yixiang.domain.PageResult; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author lioncity +* @date 2020-12-09 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreCart") +//@CacheConfig(cacheNames = "yxAppVersion") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreCartServiceImpl extends BaseServiceImpl implements YxStoreCartService { +public class YxAppVersionServiceImpl extends BaseServiceImpl implements YxAppVersionService { private final IGenerator generator; - private final StoreCartMapper storeCartMapper; - @Override //@Cacheable - public Map queryAll(YxStoreCartQueryCriteria criteria, Pageable pageable) { + public PageResult queryAll(YxAppVersionQueryCriteria 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; + PageInfo page = new PageInfo<>(queryAll(criteria)); + return generator.convertPageInfo(page,YxAppVersionDto.class); } @Override //@Cacheable - public List queryAll(YxStoreCartQueryCriteria criteria) { - return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreCart.class, criteria)); + public List queryAll(YxAppVersionQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxAppVersion.class, criteria)); } @Override - public void download(List all, HttpServletResponse response) throws IOException { + 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("0 = 未购买 1 = 已购买", yxStoreCart.getIsPay()); - map.put("是否为立即购买", yxStoreCart.getIsNew()); - map.put("拼团id", yxStoreCart.getCombinationId()); - map.put("秒杀产品ID", yxStoreCart.getSeckillId()); - map.put("砍价id", yxStoreCart.getBargainId()); + for (YxAppVersionDto yxAppVersion : all) { + Map map = new LinkedHashMap<>(); + map.put(" isDel", yxAppVersion.getIsDel()); + map.put("更新时间", yxAppVersion.getCreateTime()); + map.put(" updateTime", yxAppVersion.getUpdateTime()); + map.put("版本code", yxAppVersion.getVersionCode()); + map.put("版本名称", yxAppVersion.getVersionName()); + map.put("版本描述", yxAppVersion.getVersionInfo()); + map.put("安卓下载链接", yxAppVersion.getAndroidUrl()); + map.put("是否强制升级", yxAppVersion.getForceUpdate()); + map.put("ios store应用商店链接", yxAppVersion.getIosUrl()); 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/YxMaterialGroupServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialGroupServiceImpl.java similarity index 85% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialGroupServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialGroupServiceImpl.java index 5ea02952e5cbd44405dfd24d9d1b23885a3ac76e..5e9e46c279ca534c0c8d635a5b6f1ffbb5f4f668 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialGroupServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialGroupServiceImpl.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.service.impl; @@ -29,25 +31,20 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxMaterialGroup") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxMaterialGroupServiceImpl extends BaseServiceImpl implements YxMaterialGroupService { private final IGenerator generator; @Override - //@Cacheable public Map queryAll(YxMaterialGroupQueryCriteria criteria, Pageable pageable) { getPage(pageable); PageInfo page = new PageInfo<>(queryAll(criteria)); @@ -59,8 +56,7 @@ public class YxMaterialGroupServiceImpl extends BaseServiceImpl queryAll(YxMaterialGroupQueryCriteria criteria) { + public List queryAll(YxMaterialGroupQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxMaterialGroup.class, criteria)); } @@ -69,7 +65,8 @@ public class YxMaterialGroupServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxMaterialGroupDto yxMaterialGroup : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); + map.put("创建时间", yxMaterialGroup.getCreateTime()); map.put("创建者ID", yxMaterialGroup.getCreateId()); map.put("分组名", yxMaterialGroup.getName()); list.add(map); diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialServiceImpl.java similarity index 60% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialServiceImpl.java index 2994612e5219ad09d26a232e638c5353e2583c4c..5b42a2b66f944b0b509c1aabbba4114b437018dc 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxMaterialServiceImpl.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.service.impl; @@ -14,7 +16,6 @@ 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.MaterialMapper; -import co.yixiang.utils.FileUtil; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; import org.springframework.data.domain.Pageable; @@ -22,25 +23,17 @@ 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 java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxMaterial") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxMaterialServiceImpl extends BaseServiceImpl implements YxMaterialService { @@ -60,24 +53,10 @@ public class YxMaterialServiceImpl extends BaseServiceImpl queryAll(YxMaterialQueryCriteria criteria) { + public List queryAll(YxMaterialQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxMaterial.class, criteria)); } - @Override - 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("创建者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); - } + } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemAttachmentServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemAttachmentServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..4fb3c61d26990a5b6832b55c4ad76cfa4d054892 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemAttachmentServiceImpl.java @@ -0,0 +1,111 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.shop.service.impl; + + +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.modules.shop.domain.YxSystemAttachment; +import co.yixiang.modules.shop.service.YxSystemAttachmentService; +import co.yixiang.modules.shop.service.mapper.YxSystemAttachmentMapper; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + + +/** + *

+ * 附件管理表 服务实现类 + *

+ * + * @author hupeng + * @since 2019-11-11 + */ +@Slf4j +@Service +@AllArgsConstructor +@Transactional(rollbackFor = Exception.class) +public class YxSystemAttachmentServiceImpl extends BaseServiceImpl implements YxSystemAttachmentService { + + private final YxSystemAttachmentMapper yxSystemAttachmentMapper; + + /** + * 根据名称获取 + * @param name name + * @return YxSystemAttachment + */ + @Override + public YxSystemAttachment getInfo(String name) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxSystemAttachment::getName,name) + .last("limit 1"); + return yxSystemAttachmentMapper.selectOne(wrapper); + } + + /** + * 根据code获取 + * @param code code + * @return YxSystemAttachment + */ + @Override + public YxSystemAttachment getByCode(String code) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxSystemAttachment::getInviteCode,code) + .last("limit 1"); + return yxSystemAttachmentMapper.selectOne(wrapper); + } + + /** + * 添加附件记录 + * @param name 名称 + * @param attSize 附件大小 + * @param attDir 路径 + * @param sattDir 路径 + */ + @Override + public void attachmentAdd(String name, String attSize, String attDir,String sattDir) { + YxSystemAttachment attachment = YxSystemAttachment.builder() + .name(name) + .attSize(attSize) + .attDir(attDir) + .attType("image/jpeg") + .sattDir(sattDir) + .build(); + yxSystemAttachmentMapper.insert(attachment); + } + + /** + * 添加附件记录 + * @param name 名称 + * @param attSize 附件大小 + * @param attDir 路径 + * @param sattDir 路径 + * @param uid 用户id + * @param code 邀请码 + */ + @Override + public void newAttachmentAdd(String name, String attSize, String attDir, String sattDir, + Long uid, String code) { + + YxSystemAttachment attachment = YxSystemAttachment.builder() + .name(name) + .attSize(attSize) + .attDir(attDir) + .attType("image/jpeg") + .sattDir(sattDir) + .uid(uid) + .inviteCode(code) + .build(); + yxSystemAttachmentMapper.insert(attachment); + } + + + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java similarity index 71% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java index 4761a69776ac5004d4e5a70997f68552cbf808d9..8af046c73c843b5677c0ed27a050483aa7450eb0 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemConfigServiceImpl.java @@ -2,10 +2,13 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.service.impl; +import cn.hutool.core.util.StrUtil; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; @@ -15,6 +18,7 @@ import co.yixiang.modules.shop.service.dto.YxSystemConfigDto; import co.yixiang.modules.shop.service.dto.YxSystemConfigQueryCriteria; import co.yixiang.modules.shop.service.mapper.SystemConfigMapper; import co.yixiang.utils.FileUtil; +import co.yixiang.utils.RedisUtils; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; @@ -30,22 +34,39 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxSystemConfig") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxSystemConfigServiceImpl extends BaseServiceImpl implements YxSystemConfigService { private final IGenerator generator; + private final RedisUtils redisUtils; + + /** + * 获取配置值 + * @param name 配置名 + * @return string + */ + @Override + public String getData(String name) { + String result = redisUtils.getY(name); + if (StrUtil.isNotBlank(result)) { + return result; + } + + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxSystemConfig::getMenuName, name); + YxSystemConfig systemConfig = this.baseMapper.selectOne(wrapper); + if (systemConfig == null) { + return ""; + } + return systemConfig.getValue(); + } @Override //@Cacheable @@ -61,7 +82,7 @@ public class YxSystemConfigServiceImpl extends BaseServiceImpl queryAll(YxSystemConfigQueryCriteria criteria) { + public List queryAll(YxSystemConfigQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemConfig.class, criteria)); } @@ -70,7 +91,7 @@ public class YxSystemConfigServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxSystemConfigDto yxSystemConfig : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("字段名称", yxSystemConfig.getMenuName()); map.put("默认值", yxSystemConfig.getValue()); map.put("排序", yxSystemConfig.getSort()); @@ -82,6 +103,7 @@ public class YxSystemConfigServiceImpl extends BaseServiceImpl().eq(YxSystemConfig::getMenuName, key)); + return this.getOne(new LambdaQueryWrapper() + .eq(YxSystemConfig::getMenuName,key)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java similarity index 64% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java index d3ed2781c831faecc1d791dfd2afd582c99f00a1..deaca51eab19669901ae12209ca157f3212482b8 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemGroupDataServiceImpl.java @@ -2,13 +2,16 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.CommonEnum; import co.yixiang.modules.shop.domain.YxSystemGroupData; import co.yixiang.modules.shop.service.YxSystemGroupDataService; import co.yixiang.modules.shop.service.dto.YxSystemGroupDataDto; @@ -16,6 +19,8 @@ import co.yixiang.modules.shop.service.dto.YxSystemGroupDataQueryCriteria; import co.yixiang.modules.shop.service.mapper.SystemGroupDataMapper; import co.yixiang.utils.FileUtil; import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; import org.springframework.data.domain.Pageable; @@ -29,24 +34,48 @@ import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; + -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxSystemGroupData") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxSystemGroupDataServiceImpl extends BaseServiceImpl implements YxSystemGroupDataService { private final IGenerator generator; + + /** + * 获取配置数据 + * @param name 配置名称 + * @return List + */ + @Override + //@Cacheable(value = "yshop:configDatas",key = "#name") + public List getDatas(String name) { + List systemGroupDatas = this.baseMapper + .selectList(Wrappers.lambdaQuery() + .eq(YxSystemGroupData::getGroupName,name) + .eq(YxSystemGroupData::getStatus,CommonEnum.SHOW_STATUS_1.getValue()) + .orderByDesc(YxSystemGroupData::getSort)); + + List list = systemGroupDatas + .stream() + .map(YxSystemGroupData::getValue) + .map(JSONObject::parseObject) + .collect(Collectors.toList()); + + return list; + } + + + //===============管理后台============== + @Override //@Cacheable public Map queryAll(YxSystemGroupDataQueryCriteria criteria, Pageable pageable) { @@ -56,19 +85,19 @@ public class YxSystemGroupDataServiceImpl extends BaseServiceImpl systemGroupDataDTOS = new ArrayList<>(); for (YxSystemGroupData systemGroupData : page.getList()) { - YxSystemGroupDataDto systemGroupDataDTO = generator.convert(systemGroupData, YxSystemGroupDataDto.class); + YxSystemGroupDataDto systemGroupDataDTO = generator.convert(systemGroupData,YxSystemGroupDataDto.class); systemGroupDataDTO.setMap(JSON.parseObject(systemGroupData.getValue())); systemGroupDataDTOS.add(systemGroupDataDTO); } - map.put("content", systemGroupDataDTOS); - map.put("totalElements", page.getTotal()); + map.put("content",systemGroupDataDTOS); + map.put("totalElements",page.getTotal()); return map; } @Override //@Cacheable - public List queryAll(YxSystemGroupDataQueryCriteria criteria) { + public List queryAll(YxSystemGroupDataQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemGroupData.class, criteria)); } @@ -77,9 +106,10 @@ public class YxSystemGroupDataServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxSystemGroupDataDto yxSystemGroupData : all) { - Map map = new LinkedHashMap<>(); + 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); diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java similarity index 48% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java index a6e01f1cba6d7ec5d8e1c1144016ae29fb070c86..a339d8af6a1040509aedd112f0d5550fe1e3653f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreServiceImpl.java @@ -2,19 +2,30 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.service.impl; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.StrUtil; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.product.vo.YxSystemStoreQueryVo; 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.modules.shop.service.mapper.SystemStoreMapper; import co.yixiang.utils.FileUtil; +import co.yixiang.utils.RedisUtil; +import co.yixiang.utils.ShopKeyUtils; +import co.yixiang.utils.location.LocationUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; import org.springframework.data.domain.Pageable; @@ -29,22 +40,79 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxSystemStore") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxSystemStoreServiceImpl extends BaseServiceImpl implements YxSystemStoreService { private final IGenerator generator; + private final SystemStoreMapper systemStoreMapper; + + @Override + public YxSystemStoreQueryVo getYxSystemStoreById(int id){ + return generator.convert(this.getById(id),YxSystemStoreQueryVo.class); + } + + /** + * 获取门店列表 + * @param latitude 纬度 + * @param longitude 经度 + * @param page page + * @param limit limit + * @return List + */ + @Override + public List getStoreList(String latitude, String longitude, int page, int limit) { + Page pageModel = new Page<>(page, limit); + if(StrUtil.isBlank(latitude) || StrUtil.isBlank(longitude)){ + return generator.convert(this.page(pageModel).getRecords(),YxSystemStoreQueryVo.class); + } + List list = systemStoreMapper.getStoreList(pageModel,Double.valueOf(longitude),Double.valueOf(latitude)); + list.forEach(item->{ + String newDis = NumberUtil.round(Double.valueOf(item.getDistance()) / 1000,2).toString(); + item.setDistance(newDis); + }); + return list; + } + + /** + * 获取最新单个门店 + * @param latitude 纬度 + * @param longitude 经度 + * @return YxSystemStoreQueryVo + */ + @Override + public YxSystemStoreQueryVo getStoreInfo(String latitude,String longitude) { + YxSystemStore yxSystemStore = systemStoreMapper.selectOne( + Wrappers.lambdaQuery() + .eq(YxSystemStore::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .orderByDesc(YxSystemStore::getId) + .last("limit 1")); + if(yxSystemStore == null) { + return null; + } + String mention = RedisUtil.get(ShopKeyUtils.getStoreSelfMention()); + if(StrUtil.isBlank(mention) || ShopCommonEnum.ENABLE_2.getValue().toString().equals(mention)) { + return null; + } + YxSystemStoreQueryVo systemStoreQueryVo = generator.convert(yxSystemStore,YxSystemStoreQueryVo.class); + if(StrUtil.isNotEmpty(latitude) && StrUtil.isNotEmpty(longitude)){ + double distance = LocationUtils.getDistance(Double.valueOf(latitude),Double.valueOf(longitude), + Double.valueOf(yxSystemStore.getLatitude()),Double.valueOf(yxSystemStore.getLongitude())); + systemStoreQueryVo.setDistance(String.valueOf(distance)); + } + return systemStoreQueryVo; + } + + + + //===================================// @Override //@Cacheable @@ -60,7 +128,7 @@ public class YxSystemStoreServiceImpl extends BaseServiceImpl queryAll(YxSystemStoreQueryCriteria criteria) { + public List queryAll(YxSystemStoreQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemStore.class, criteria)); } @@ -69,7 +137,7 @@ public class YxSystemStoreServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxSystemStoreDto yxSystemStore : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("门店名称", yxSystemStore.getName()); map.put("简介", yxSystemStore.getIntroduction()); map.put("手机号码", yxSystemStore.getPhone()); diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java similarity index 75% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java index 35869913aacf15367f561668d946fcfda27afe27..806d4cb0bdb1c0145e25b585c88850e9deb47670 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemStoreStaffServiceImpl.java @@ -2,19 +2,23 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.ShopCommonEnum; import co.yixiang.modules.shop.domain.YxSystemStoreStaff; 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.SystemStoreStaffMapper; import co.yixiang.utils.FileUtil; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; import org.springframework.data.domain.Pageable; @@ -29,23 +33,37 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxSystemStoreStaff") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxSystemStoreStaffServiceImpl extends BaseServiceImpl implements YxSystemStoreStaffService { private final IGenerator generator; + + /** + * 接测店员客服状态 + * @param uid 用户id + * @param storeId 门店id + * @return boolean true=可核销 + */ + @Override + public boolean checkStatus(Long uid,Integer storeId) { + YxSystemStoreStaff storeStaff = new YxSystemStoreStaff(); + storeStaff.setUid(uid); + storeStaff.setVerifyStatus(ShopCommonEnum.IS_STATUS_1.getValue()); + if(storeId != null) { + storeStaff.setStoreId(storeId); + } + return this.baseMapper.selectCount(Wrappers.query(storeStaff)) > 0; + } + @Override //@Cacheable public Map queryAll(YxSystemStoreStaffQueryCriteria criteria, Pageable pageable) { @@ -60,7 +78,7 @@ public class YxSystemStoreStaffServiceImpl extends BaseServiceImpl queryAll(YxSystemStoreStaffQueryCriteria criteria) { + public List queryAll(YxSystemStoreStaffQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemStoreStaff.class, criteria)); } @@ -69,7 +87,7 @@ public class YxSystemStoreStaffServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxSystemStoreStaffDto yxSystemStoreStaff : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("微信用户id", yxSystemStoreStaff.getUid()); map.put("店员头像", yxSystemStoreStaff.getAvatar()); map.put("门店id", yxSystemStoreStaff.getStoreId()); diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialGroupMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialGroupMapper.java similarity index 57% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialGroupMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialGroupMapper.java index e1d9b5e09037cd2114c3d305b4dd84e88a5e3a82..9df3cfa7c50ebd0940c2b24b47a45b85bad3a675 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialGroupMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialGroupMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ 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 - */ +* @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-mall/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialMapper.java similarity index 56% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialMapper.java index 47c5398163cdcbaa718ad39be901817707106f7e..9306679dba7a839166be5d6e75d94641a67a10bb 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/MaterialMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ 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 - */ +* @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/SystemConfigMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemConfigMapper.java similarity index 57% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemConfigMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemConfigMapper.java index 6a4c082841431ba352e6ea2411e1845695d07ce4..da2df771fa74faa899e8773679960d463891d638 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemConfigMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemConfigMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ 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 - */ +* @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-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemGroupDataMapper.java similarity index 57% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemGroupDataMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemGroupDataMapper.java index 29405cfa13e5e28d8b48d1599a5ffa3580cdd544..0f27e934b722d1212532092364124a595a40f077 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemGroupDataMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemGroupDataMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ 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 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface SystemGroupDataMapper extends CoreMapper { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..549752f7c8056e7bb47260d6edb61ee5019ded1e --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreMapper.java @@ -0,0 +1,34 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.product.vo.YxSystemStoreQueryVo; +import co.yixiang.modules.shop.domain.YxSystemStore; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +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 +public interface SystemStoreMapper extends CoreMapper { + + @Select("SELECT*,ROUND(6378.138 * 2 * ASIN(SQRT(POW(SIN((#{lat} * PI() / 180 - latitude * PI() / 180" + + " ) / 2),2) + COS(40.0497810000 * PI() / 180) * COS(latitude * PI() / 180) * POW(" + + " SIN((#{lon} * PI() / 180 - longitude * PI() / 180) / 2),2))) * 1000) AS distance" + + " FROM yx_system_store WHERE is_del=0 AND is_show = 1 ORDER BY distance ASC" + ) + List getStoreList(Page page, @Param("lon") double lon, @Param("lat") double lat); +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreStaffMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreStaffMapper.java similarity index 57% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreStaffMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreStaffMapper.java index 31fbc4125bcb18b4d33c3d8856e1deae061753fc..223bc487ed7d52dbf78079f575e9bcf289e5560b 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreStaffMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreStaffMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ 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 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface SystemStoreStaffMapper extends CoreMapper { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/YxAppVersionMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/YxAppVersionMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..2903a89385a8a46874e6f262b2309d05ccf42b52 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/YxAppVersionMapper.java @@ -0,0 +1,23 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.shop.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxAppVersion; +import org.apache.ibatis.annotations.Mapper; +import org.springframework.stereotype.Repository; + +/** +* @author lioncity +* @date 2020-12-09 +*/ +@Repository +public interface YxAppVersionMapper extends CoreMapper { + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemAttachmentMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemAttachmentMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..383e72d235ea75c0255b9eae6378dde9a2edadf7 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/service/mapper/YxSystemAttachmentMapper.java @@ -0,0 +1,27 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.shop.service.mapper; + + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.shop.domain.YxSystemAttachment; +import org.springframework.stereotype.Repository; + +/** + *

+ * 附件管理表 Mapper 接口 + *

+ * + * @author hupeng + * @since 2019-11-11 + */ +@Repository +public interface YxSystemAttachmentMapper extends CoreMapper { + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/vo/AppCheckVersion.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/vo/AppCheckVersion.java new file mode 100644 index 0000000000000000000000000000000000000000..a64ac42b525676c2112378a9961888ee0c73d56d --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/vo/AppCheckVersion.java @@ -0,0 +1,26 @@ +package co.yixiang.modules.shop.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * @author :LionCity + * @date :Created in 2020-12-09 10:47 + * @description: + * @modified By: + * @version: + */ +@Data +@ApiModel(description = "app校验升级") +public class AppCheckVersion implements Serializable { + + private static final long serialVersionUID = 1L; + @ApiModelProperty(value = "类型 1101 安卓 1102 ios") + private String type; + + @ApiModelProperty(value = "app版本名称") + private String versionName; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/vo/YxAppVersionVo.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/vo/YxAppVersionVo.java new file mode 100644 index 0000000000000000000000000000000000000000..dc11c8f5add89ab83edc346ebaa88d6407a8313d --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/vo/YxAppVersionVo.java @@ -0,0 +1,45 @@ +package co.yixiang.modules.shop.vo; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import co.yixiang.domain.BaseDomain; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import java.io.Serializable; + +/** + * @author :LionCity + * @date :Created in 2020-12-09 10:25 + * @description: + * @modified By: + * @version: + */ + +@Data +public class YxAppVersionVo implements Serializable { + + private static final long serialVersionUID = 1L; + + private Integer id; + + /** 版本code */ + private String versionCode; + + /** 版本名称 */ + private String versionName; + + /** 版本描述 */ + private String versionInfo; + + /** 安卓下载链接 */ + private String downloadUrl; + + /**是否强制升级*/ + private Boolean forceUpdate; + + public void copy(co.yixiang.modules.shop.domain.YxAppVersion source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/shop/vo/YxSystemGroupDataVo.java b/yshop-mall/src/main/java/co/yixiang/modules/shop/vo/YxSystemGroupDataVo.java new file mode 100644 index 0000000000000000000000000000000000000000..1f98fffcef04a84a918ddda32cb72888d7f93e50 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/shop/vo/YxSystemGroupDataVo.java @@ -0,0 +1,42 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.shop.vo; + +import com.alibaba.fastjson.JSONObject; +import lombok.Getter; +import lombok.Setter; + +/** +* @author hupeng +* @date 2020-05-12 +*/ + +@Getter +@Setter +public class YxSystemGroupDataVo{ + + /** 组合数据详情ID */ + + private Integer id; + + + /** 对应的数据名称 */ + private String groupName; + + + /** 数据组对应的数据值(json数据) */ + private JSONObject value; + + + /** 数据排序 */ + private Integer sort; + + + /** 状态(1:开启;2:关闭;) */ + private Integer status; + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxShippingTemplates.java b/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxShippingTemplates.java new file mode 100644 index 0000000000000000000000000000000000000000..9f220c8e8d1d3db96ebaa4cfd39683c98d127716 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxShippingTemplates.java @@ -0,0 +1,62 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.domain; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import co.yixiang.domain.BaseDomain; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("yx_shipping_templates") +public class YxShippingTemplates extends BaseDomain { + + /** 模板ID */ + @TableId + private Integer id; + + + /** 模板名称 */ + private String name; + + + /** 计费方式 */ + private Integer type; + + + /** 地域以及费用 */ + private String regionInfo; + + + /** 指定包邮开关 */ + private Integer appoint; + + + /** 指定包邮内容 */ + private String appointInfo; + + + + + /** 排序 */ + private Integer sort; + + + public void copy(YxShippingTemplates source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxShippingTemplatesFree.java b/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxShippingTemplatesFree.java new file mode 100644 index 0000000000000000000000000000000000000000..b611cf16e8876b4726bbc21b1121618518af2b65 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxShippingTemplatesFree.java @@ -0,0 +1,79 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.domain; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.math.BigDecimal; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@AllArgsConstructor +@NoArgsConstructor +@Builder +@Data +@TableName("yx_shipping_templates_free") +public class YxShippingTemplatesFree implements Serializable { + + /** 编号 */ + @TableId + private Integer id; + + + /** 省ID */ + @NotNull + private Integer provinceId; + + + /** 模板ID */ + @NotNull + private Integer tempId; + + + /** 城市ID */ + @NotNull + private Integer cityId; + + + /** 包邮件数 */ + @NotNull + private BigDecimal number; + + + /** 包邮金额 */ + @NotNull + private BigDecimal price; + + + /** 计费方式 */ + @NotNull + private Integer type; + + + /** 分组唯一值 */ + @NotBlank + private String uniqid; + + + public void copy(YxShippingTemplatesFree source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxShippingTemplatesRegion.java b/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxShippingTemplatesRegion.java new file mode 100644 index 0000000000000000000000000000000000000000..c172ae9f4f7c37319b52337e99ad04160f92b303 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxShippingTemplatesRegion.java @@ -0,0 +1,89 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.domain; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.NoArgsConstructor; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.math.BigDecimal; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@AllArgsConstructor +@NoArgsConstructor +@Builder +@Data +@TableName("yx_shipping_templates_region") +public class YxShippingTemplatesRegion implements Serializable { + + /** 编号 */ + @TableId + private Integer id; + + + /** 省ID */ + @NotNull + private Integer provinceId; + + + /** 模板ID */ + @NotNull + private Integer tempId; + + + /** 城市ID */ + @NotNull + private Integer cityId; + + + /** 首件 */ + @NotNull + private BigDecimal first; + + + /** 首件运费 */ + @NotNull + private BigDecimal firstPrice; + + + /** 续件 */ + @NotNull + private BigDecimal continues; + + + /** 续件运费 */ + @NotNull + private BigDecimal continuePrice; + + + /** 计费方式 */ + @NotNull + private Integer type; + + + /** 分组唯一值 */ + @NotBlank + private String uniqid; + + + public void copy(YxShippingTemplatesRegion source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxSystemCity.java b/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxSystemCity.java new file mode 100644 index 0000000000000000000000000000000000000000..7e70ffdf60215800434a5e5913fad287968731b5 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/domain/YxSystemCity.java @@ -0,0 +1,88 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.domain; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Data +@TableName("yx_system_city") +public class YxSystemCity implements Serializable { + + @TableId + private Integer id; + + + /** 城市id */ + @NotNull + @JsonProperty(value = "city_id") + private Integer cityId; + + + /** 省市级别 */ + @NotNull + private Integer level; + + + /** 父级id */ + @NotNull + private Integer parentId; + + + /** 区号 */ + @NotBlank + private String areaCode; + + + /** 名称 */ + @NotBlank + private String name; + + + /** 合并名称 */ + @NotBlank + private String mergerName; + + + /** 经度 */ + @NotBlank + private String lng; + + + /** 纬度 */ + @NotBlank + private String lat; + + + /** 是否展示 */ + @NotNull + private Integer isShow; + + @TableField(exist = false) + private List children; + + + public void copy(YxSystemCity source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxShippingTemplatesFreeService.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxShippingTemplatesFreeService.java new file mode 100644 index 0000000000000000000000000000000000000000..d5935184600e81b0937008d55a0f0cd2d90aec07 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxShippingTemplatesFreeService.java @@ -0,0 +1,50 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.template.domain.YxShippingTemplatesFree; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesFreeDto; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesFreeQueryCriteria; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +public interface YxShippingTemplatesFreeService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxShippingTemplatesFreeQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxShippingTemplatesFreeQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxShippingTemplatesRegionService.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxShippingTemplatesRegionService.java new file mode 100644 index 0000000000000000000000000000000000000000..27b275539d3e16a5858c4ecbad14dc227e9d8c50 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxShippingTemplatesRegionService.java @@ -0,0 +1,50 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.template.domain.YxShippingTemplatesRegion; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesRegionDto; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesRegionQueryCriteria; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +public interface YxShippingTemplatesRegionService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxShippingTemplatesRegionQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxShippingTemplatesRegionQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxShippingTemplatesService.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxShippingTemplatesService.java new file mode 100644 index 0000000000000000000000000000000000000000..18081cadc5f0dd9a8e28eafbf5f2ccdde9286428 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxShippingTemplatesService.java @@ -0,0 +1,58 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.template.domain.YxShippingTemplates; +import co.yixiang.modules.template.service.dto.ShippingTemplatesDto; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesDto; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesQueryCriteria; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +public interface YxShippingTemplatesService extends BaseService{ + + /** + * 新增与更新模板 + * @param id 模板id + * @param shippingTemplatesDto ShippingTemplatesDto + */ + void addAndUpdate(Integer id,ShippingTemplatesDto shippingTemplatesDto); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxShippingTemplatesQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxShippingTemplatesQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxSystemCityService.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxSystemCityService.java new file mode 100644 index 0000000000000000000000000000000000000000..5f65191ee085ded761c548a4d2bd244fa9646a17 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/YxSystemCityService.java @@ -0,0 +1,50 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.template.domain.YxSystemCity; +import co.yixiang.modules.template.service.dto.YxSystemCityDto; +import co.yixiang.modules.template.service.dto.YxSystemCityQueryCriteria; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +public interface YxSystemCityService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxSystemCityQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxSystemCityQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/AppointInfoDto.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/AppointInfoDto.java new file mode 100644 index 0000000000000000000000000000000000000000..55e2ea4d79a708d7215a0159b0336a011d0f1712 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/AppointInfoDto.java @@ -0,0 +1,28 @@ +package co.yixiang.modules.template.service.dto; + +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +/** + * @ClassName AppointInfoDto + * @Author hupeng <610796224@qq.com> + * @Date 2020/5/26 + **/ +@Getter +@Setter +public class AppointInfoDto { + + /** 包邮件数 */ + private String a_num; + + /** 包邮费用 */ + private String a_price; + + /** 包邮地区 */ + private List place; + + private String placeName; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/RegionChildrenDto.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/RegionChildrenDto.java new file mode 100644 index 0000000000000000000000000000000000000000..45decb1a0eb2fc9a774b756f36233ccc7c7cf773 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/RegionChildrenDto.java @@ -0,0 +1,16 @@ +package co.yixiang.modules.template.service.dto; + +import lombok.Getter; +import lombok.Setter; + +/** + * @ClassName RegionChildrenDto + * @Author hupeng <610796224@qq.com> + * @Date 2020/5/25 + **/ +@Getter +@Setter +public class RegionChildrenDto { + + private String city_id; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/RegionDto.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/RegionDto.java new file mode 100644 index 0000000000000000000000000000000000000000..1b2c77e757c16548ea272e3db355ca23884bbcce --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/RegionDto.java @@ -0,0 +1,23 @@ +package co.yixiang.modules.template.service.dto; + +import lombok.Getter; +import lombok.Setter; + +import java.util.List; + +/** + * @ClassName RegionDto + * @Author hupeng <610796224@qq.com> + * @Date 2020/5/25 + **/ +@Getter +@Setter +public class RegionDto { + + private String name; + + private String city_id; + + List children; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/RegionInfoDto.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/RegionInfoDto.java new file mode 100644 index 0000000000000000000000000000000000000000..6c46d09f845c1e00a6c4e69a144af406396fb947 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/RegionInfoDto.java @@ -0,0 +1,38 @@ +package co.yixiang.modules.template.service.dto; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +import javax.validation.constraints.NotBlank; +import java.util.List; + +/** + * @ClassName RegionInfoDto + * @Author hupeng <610796224@qq.com> + * @Date 2020/5/25 + **/ +@Getter +@Setter +@ToString +public class RegionInfoDto { + + @NotBlank(message = "请填写可配送区域") + private String regionName; + + @NotBlank(message = "请填写首件") + private String first; + + @NotBlank(message = "请填写首件价格") + private String price; + + @NotBlank(message = "请填写续件") + @JsonProperty("_continue") + private String _continue; + + @NotBlank(message = "请填写续件价格") + private String continue_price; + + private List region; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/ShippingTemplatesDto.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/ShippingTemplatesDto.java new file mode 100644 index 0000000000000000000000000000000000000000..7fff6f3524acbec8c9d583e84d5e543776a29ec8 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/ShippingTemplatesDto.java @@ -0,0 +1,51 @@ +package co.yixiang.modules.template.service.dto; + +import com.fasterxml.jackson.annotation.JsonProperty; +import lombok.Getter; +import lombok.Setter; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.List; + +/** + * 运费模板对象 yx_shipping_templates + * + * @author hupeng + * @date 2020-05-23 + */ +@Getter +@Setter +public class ShippingTemplatesDto implements Serializable +{ + private static final long serialVersionUID = 1L; + + /** 模板ID */ + private Integer id; + + /** 模板名称 */ + @NotBlank(message = "模板名称不能为空") + private String name; + + /** 计费方式 */ + private Integer type; + + /** 地域以及费用 */ + @NotNull(message = "请设置地域") + @JsonProperty(value = "region_info") + private List regionInfo; + + /** 指定包邮开关 */ + private Integer appoint; + + /** 指定包邮内容 */ + @JsonProperty(value = "appoint_info") + private List appointInfo; + + /** 排序 */ + private Long sort; + + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesDto.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesDto.java new file mode 100644 index 0000000000000000000000000000000000000000..1ee930763f1bea111cdd8e29fdef4a0cdef0d367 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesDto.java @@ -0,0 +1,50 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.sql.Timestamp; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Data +public class YxShippingTemplatesDto implements Serializable { + + /** 模板ID */ + private Integer id; + + /** 模板名称 */ + private String name; + + /** 计费方式 */ + private Integer type; + + /** 地域以及费用 */ + private String regionInfo; + + /** 指定包邮开关 */ + private Integer appoint; + + /** 指定包邮内容 */ + private String appointInfo; + + /** 添加时间 */ + private Timestamp createTime; + + private Timestamp updateTime; + + private Integer isDel; + + /** 排序 */ + private Integer sort; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesFreeDto.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesFreeDto.java new file mode 100644 index 0000000000000000000000000000000000000000..01672c9b93bfc5ed7ee1195ff64a1399354f311c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesFreeDto.java @@ -0,0 +1,46 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Data +public class YxShippingTemplatesFreeDto implements Serializable { + + /** 编号 */ + private Integer id; + + /** 省ID */ + private Integer provinceId; + + /** 模板ID */ + private Integer tempId; + + /** 城市ID */ + private Integer cityId; + + /** 包邮件数 */ + private BigDecimal number; + + /** 包邮金额 */ + private BigDecimal price; + + /** 计费方式 */ + private Integer type; + + /** 分组唯一值 */ + private String uniqid; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesFreeQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesFreeQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..e369c3af82ecbb44e566aad6d610250fb407f8a1 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesFreeQueryCriteria.java @@ -0,0 +1,19 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Data +public class YxShippingTemplatesFreeQueryCriteria{ +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..78d624cbe7716a2c2037bb338d7ac885a42ccd8f --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesQueryCriteria.java @@ -0,0 +1,19 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Data +public class YxShippingTemplatesQueryCriteria{ +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesRegionDto.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesRegionDto.java new file mode 100644 index 0000000000000000000000000000000000000000..fb2cd4e74d42c0ac5a9c2f16d50cee97e9d26af4 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesRegionDto.java @@ -0,0 +1,52 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Data +public class YxShippingTemplatesRegionDto implements Serializable { + + /** 编号 */ + private Integer id; + + /** 省ID */ + private Integer provinceId; + + /** 模板ID */ + private Integer tempId; + + /** 城市ID */ + private Integer cityId; + + /** 首件 */ + private BigDecimal first; + + /** 首件运费 */ + private BigDecimal firstPrice; + + /** 续件 */ + private BigDecimal continues; + + /** 续件运费 */ + private BigDecimal continuePrice; + + /** 计费方式 */ + private Integer type; + + /** 分组唯一值 */ + private String uniqid; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesRegionQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesRegionQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..e24dc24defb50d7ea8206ae896aebd668f564aa3 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxShippingTemplatesRegionQueryCriteria.java @@ -0,0 +1,19 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Data +public class YxShippingTemplatesRegionQueryCriteria{ +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxSystemCityDto.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxSystemCityDto.java new file mode 100644 index 0000000000000000000000000000000000000000..d3abe900b934ca13aa0f0dcb9b6632c654debfb6 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxSystemCityDto.java @@ -0,0 +1,50 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Data +public class YxSystemCityDto implements Serializable { + + private Integer id; + + /** 城市id */ + private Integer cityId; + + /** 省市级别 */ + private Integer level; + + /** 父级id */ + private Integer parentId; + + /** 区号 */ + private String areaCode; + + /** 名称 */ + private String name; + + /** 合并名称 */ + private String mergerName; + + /** 经度 */ + private String lng; + + /** 纬度 */ + private String lat; + + /** 是否展示 */ + private Integer isShow; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxSystemCityQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxSystemCityQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..ba72a3de50e6fdcef39b6ad2ee22d4311d4dbe63 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/dto/YxSystemCityQueryCriteria.java @@ -0,0 +1,19 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Data +public class YxSystemCityQueryCriteria{ +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxShippingTemplatesFreeServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxShippingTemplatesFreeServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..d042be813898ffb9e4c52cc506f9bf5b7612eb3d --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxShippingTemplatesFreeServiceImpl.java @@ -0,0 +1,82 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.impl; + + +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.template.domain.YxShippingTemplatesFree; +import co.yixiang.modules.template.service.YxShippingTemplatesFreeService; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesFreeDto; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesFreeQueryCriteria; +import co.yixiang.modules.template.service.mapper.YxShippingTemplatesFreeMapper; +import co.yixiang.utils.FileUtil; +import com.github.pagehelper.PageInfo; +import lombok.AllArgsConstructor; +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 java.util.List; +import java.util.Map; + + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Service +@AllArgsConstructor +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxShippingTemplatesFreeServiceImpl extends BaseServiceImpl implements YxShippingTemplatesFreeService { + + private final IGenerator generator; + + @Override + //@Cacheable + public Map queryAll(YxShippingTemplatesFreeQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxShippingTemplatesFreeDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxShippingTemplatesFreeQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxShippingTemplatesFree.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxShippingTemplatesFreeDto yxShippingTemplatesFree : all) { + Map map = new LinkedHashMap<>(); + map.put("省ID", yxShippingTemplatesFree.getProvinceId()); + map.put("模板ID", yxShippingTemplatesFree.getTempId()); + map.put("城市ID", yxShippingTemplatesFree.getCityId()); + map.put("包邮件数", yxShippingTemplatesFree.getNumber()); + map.put("包邮金额", yxShippingTemplatesFree.getPrice()); + map.put("计费方式", yxShippingTemplatesFree.getType()); + map.put("分组唯一值", yxShippingTemplatesFree.getUniqid()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxShippingTemplatesRegionServiceImpl.java similarity index 39% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxShippingTemplatesRegionServiceImpl.java index 6b01126857e78b5019146ac161a8d11a647c89cd..8119c1a7d67898a6a49fe14aa63af252c22fb877 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStorePinkServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxShippingTemplatesRegionServiceImpl.java @@ -1,19 +1,22 @@ /** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.activity.service.impl; +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.impl; + import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.activity.domain.YxStorePink; -import co.yixiang.modules.activity.service.YxStorePinkService; -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.template.domain.YxShippingTemplatesRegion; +import co.yixiang.modules.template.service.YxShippingTemplatesRegionService; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesRegionDto; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesRegionQueryCriteria; +import co.yixiang.modules.template.service.mapper.YxShippingTemplatesRegionMapper; import co.yixiang.utils.FileUtil; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; @@ -35,24 +38,24 @@ import java.util.Map; //import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-06-29 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "yxStorePink") +//@CacheConfig(cacheNames = "yxShippingTemplatesRegion") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStorePinkServiceImpl extends BaseServiceImpl implements YxStorePinkService { +public class YxShippingTemplatesRegionServiceImpl extends BaseServiceImpl implements YxShippingTemplatesRegionService { private final IGenerator generator; @Override //@Cacheable - public Map queryAll(YxStorePinkQueryCriteria criteria, Pageable pageable) { + public Map queryAll(YxShippingTemplatesRegionQueryCriteria criteria, Pageable pageable) { getPage(pageable); - PageInfo page = new PageInfo<>(queryAll(criteria)); + PageInfo page = new PageInfo<>(queryAll(criteria)); Map map = new LinkedHashMap<>(2); - map.put("content", generator.convert(page.getList(), YxStorePinkDto.class)); + map.put("content", generator.convert(page.getList(), YxShippingTemplatesRegionDto.class)); map.put("totalElements", page.getTotal()); return map; } @@ -60,29 +63,25 @@ public class YxStorePinkServiceImpl extends BaseServiceImpl queryAll(YxStorePinkQueryCriteria criteria) { - return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStorePink.class, criteria)); + public List queryAll(YxShippingTemplatesRegionQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxShippingTemplatesRegion.class, criteria)); } @Override - public void download(List all, HttpServletResponse response) throws IOException { + 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.getStopTime()); - map.put("团长id 0为团长", yxStorePink.getKId()); - map.put("是否退款 0未退款 1已退款", yxStorePink.getIsRefund()); - map.put("状态1进行中2已完成3未完成", yxStorePink.getStatus()); + for (YxShippingTemplatesRegionDto yxShippingTemplatesRegion : all) { + Map map = new LinkedHashMap<>(); + map.put("省ID", yxShippingTemplatesRegion.getProvinceId()); + map.put("模板ID", yxShippingTemplatesRegion.getTempId()); + map.put("城市ID", yxShippingTemplatesRegion.getCityId()); + map.put("首件", yxShippingTemplatesRegion.getFirst()); + map.put("首件运费", yxShippingTemplatesRegion.getFirstPrice()); + map.put("续件", yxShippingTemplatesRegion.getContinues()); + map.put("续件运费", yxShippingTemplatesRegion.getContinuePrice()); + map.put("计费方式", yxShippingTemplatesRegion.getType()); + map.put("分组唯一值", yxShippingTemplatesRegion.getUniqid()); list.add(map); } FileUtil.downloadExcel(list, response); diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxShippingTemplatesServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxShippingTemplatesServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..17fb1b7b39815a8034f2115e3d4911862c919844 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxShippingTemplatesServiceImpl.java @@ -0,0 +1,257 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.impl; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.util.IdUtil; +import co.yixiang.api.BusinessException; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.template.domain.YxShippingTemplates; +import co.yixiang.modules.template.domain.YxShippingTemplatesFree; +import co.yixiang.modules.template.domain.YxShippingTemplatesRegion; +import co.yixiang.modules.template.service.YxShippingTemplatesFreeService; +import co.yixiang.modules.template.service.YxShippingTemplatesRegionService; +import co.yixiang.modules.template.service.YxShippingTemplatesService; +import co.yixiang.modules.template.service.dto.AppointInfoDto; +import co.yixiang.modules.template.service.dto.RegionChildrenDto; +import co.yixiang.modules.template.service.dto.RegionDto; +import co.yixiang.modules.template.service.dto.RegionInfoDto; +import co.yixiang.modules.template.service.dto.ShippingTemplatesDto; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesDto; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesQueryCriteria; +import co.yixiang.modules.template.service.mapper.YxShippingTemplatesMapper; +import co.yixiang.utils.FileUtil; +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.github.pagehelper.PageInfo; +import lombok.AllArgsConstructor; +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.math.BigDecimal; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + + + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Service +@AllArgsConstructor +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxShippingTemplatesServiceImpl extends BaseServiceImpl implements YxShippingTemplatesService { + + private final IGenerator generator; + + + private final YxShippingTemplatesRegionService yxShippingTemplatesRegionService; + private final YxShippingTemplatesFreeService yxShippingTemplatesFreeService; + + + /** + * 新增与更新模板 + * @param id 模板id + * @param shippingTemplatesDto ShippingTemplatesDto + */ + @Override + public void addAndUpdate(Integer id,ShippingTemplatesDto shippingTemplatesDto) { + if(ShopCommonEnum.ENABLE_1.getValue().equals(shippingTemplatesDto.getAppoint()) + && shippingTemplatesDto.getAppointInfo().isEmpty()){ + throw new YshopException("请指定包邮地区"); + } + YxShippingTemplates shippingTemplates = new YxShippingTemplates(); + BeanUtil.copyProperties(shippingTemplatesDto,shippingTemplates); + shippingTemplates.setRegionInfo(JSON.toJSONString(shippingTemplatesDto.getRegionInfo())); + shippingTemplates.setAppointInfo(JSON.toJSONString(shippingTemplatesDto.getAppointInfo())); + if(id != null && id > 0){ + shippingTemplates.setId(id); + this.updateById(shippingTemplates); + }else{ + this.save(shippingTemplates); + } + + this.saveRegion(shippingTemplatesDto,shippingTemplates.getId()); + this.saveFreeReigion(shippingTemplatesDto,shippingTemplates.getId()); + } + + @Override + //@Cacheable + public Map queryAll(YxShippingTemplatesQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxShippingTemplatesDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxShippingTemplatesQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxShippingTemplates.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxShippingTemplatesDto yxShippingTemplates : all) { + Map map = new LinkedHashMap<>(); + map.put("模板名称", yxShippingTemplates.getName()); + map.put("计费方式", yxShippingTemplates.getType()); + map.put("地域以及费用", yxShippingTemplates.getRegionInfo()); + map.put("指定包邮开关", yxShippingTemplates.getAppoint()); + map.put("指定包邮内容", yxShippingTemplates.getAppointInfo()); + map.put("添加时间", yxShippingTemplates.getCreateTime()); + map.put(" updateTime", yxShippingTemplates.getUpdateTime()); + map.put(" isDel", yxShippingTemplates.getIsDel()); + map.put("排序", yxShippingTemplates.getSort()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + /** + * 保存包邮区域 + * @param yxShippingTemplates ShippingTemplatesDto + * @param tempId 模板id + */ + private void saveFreeReigion(ShippingTemplatesDto yxShippingTemplates,Integer tempId){ + + if(yxShippingTemplates.getAppointInfo() == null + || yxShippingTemplates.getAppointInfo().isEmpty()){ + return; + } + + Long count = yxShippingTemplatesFreeService.count(Wrappers + .lambdaQuery() + .eq(YxShippingTemplatesFree::getTempId,tempId)); + if(count > 0) { + yxShippingTemplatesFreeService.remove(Wrappers + .lambdaQuery() + .eq(YxShippingTemplatesFree::getTempId,tempId)); + } + + List shippingTemplatesFrees = new ArrayList<>(); + + + List appointInfo = yxShippingTemplates.getAppointInfo(); + for (AppointInfoDto appointInfoDto : appointInfo){ + String uni = IdUtil.simpleUUID(); + + if(appointInfoDto.getPlace() != null && !appointInfoDto.getPlace().isEmpty()){ + for (RegionDto regionDto : appointInfoDto.getPlace()){ + if(regionDto.getChildren() != null && !regionDto.getChildren().isEmpty()){ + for (RegionChildrenDto childrenDto : regionDto.getChildren()){ + YxShippingTemplatesFree shippingTemplatesFree = YxShippingTemplatesFree.builder() + .tempId(tempId) + .number(new BigDecimal(appointInfoDto.getA_num())) + .price(new BigDecimal(appointInfoDto.getA_price())) + .type(yxShippingTemplates.getType()) + .uniqid(uni) + .provinceId(Integer.valueOf(regionDto.getCity_id())) + .cityId(Integer.valueOf(childrenDto.getCity_id())) + .build(); + shippingTemplatesFrees.add(shippingTemplatesFree); + } + } + } + } + } + + + if(shippingTemplatesFrees.isEmpty()) { + throw new YshopException("请添加包邮区域"); + } + + yxShippingTemplatesFreeService.saveBatch(shippingTemplatesFrees); + + + } + + /** + * 保存模板设置的区域价格 + * @param yxShippingTemplates ShippingTemplatesDTO + * @param tempId 运费模板id + */ + private void saveRegion(ShippingTemplatesDto yxShippingTemplates,Integer tempId){ + Long count = yxShippingTemplatesRegionService.count(Wrappers + .lambdaQuery() + .eq(YxShippingTemplatesRegion::getTempId,tempId)); + if(count > 0) { + yxShippingTemplatesRegionService.remove(Wrappers + .lambdaQuery() + .eq(YxShippingTemplatesRegion::getTempId,tempId)); + } + + List shippingTemplatesRegions = new ArrayList<>(); + + + List regionInfo = yxShippingTemplates.getRegionInfo(); + + + for (RegionInfoDto regionInfoDto : regionInfo){ + String uni = IdUtil.simpleUUID(); + if(regionInfoDto.getRegion() != null && !regionInfoDto.getRegion().isEmpty()){ + for (RegionDto regionDto : regionInfoDto.getRegion()){ + if(regionDto.getChildren() != null && !regionDto.getChildren().isEmpty()){ + for (RegionChildrenDto childrenDtp : regionDto.getChildren()){ + YxShippingTemplatesRegion shippingTemplatesRegion = YxShippingTemplatesRegion.builder() + .tempId(tempId) + .first(new BigDecimal(regionInfoDto.getFirst())) + .firstPrice(new BigDecimal(regionInfoDto.getPrice())) + .continues(new BigDecimal(regionInfoDto.get_continue())) + .continuePrice(new BigDecimal(regionInfoDto.getContinue_price())) + .type(yxShippingTemplates.getType()) + .uniqid(uni) + .provinceId(Integer.valueOf(regionDto.getCity_id())) + .cityId(Integer.valueOf(childrenDtp.getCity_id())) + .build(); + shippingTemplatesRegions.add(shippingTemplatesRegion); + } + }else{ + YxShippingTemplatesRegion shippingTemplatesRegion = YxShippingTemplatesRegion.builder() + .tempId(tempId) + .first(new BigDecimal(regionInfoDto.getFirst())) + .firstPrice(new BigDecimal(regionInfoDto.getPrice())) + .continues(new BigDecimal(regionInfoDto.get_continue())) + .continuePrice(new BigDecimal(regionInfoDto.getContinue_price())) + .type(yxShippingTemplates.getType()) + .uniqid(uni) + .provinceId(Integer.valueOf(regionDto.getCity_id())) + .build(); + shippingTemplatesRegions.add(shippingTemplatesRegion); + } + } + } + } + + if(shippingTemplatesRegions.isEmpty()) { + throw new BusinessException("请添加区域"); + } + + yxShippingTemplatesRegionService.saveBatch(shippingTemplatesRegions); + + } + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxSystemCityServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxSystemCityServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..6993e71f4b6f028caeb19eca5221e1255688b483 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/impl/YxSystemCityServiceImpl.java @@ -0,0 +1,83 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.impl; + +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.template.domain.YxSystemCity; +import co.yixiang.modules.template.service.YxSystemCityService; +import co.yixiang.modules.template.service.dto.YxSystemCityDto; +import co.yixiang.modules.template.service.dto.YxSystemCityQueryCriteria; +import co.yixiang.modules.template.service.mapper.YxSystemCityMapper; +import co.yixiang.utils.FileUtil; +import com.github.pagehelper.PageInfo; +import lombok.AllArgsConstructor; +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 java.util.List; +import java.util.Map; + + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Service +@AllArgsConstructor +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxSystemCityServiceImpl extends BaseServiceImpl implements YxSystemCityService { + + private final IGenerator generator; + + @Override + //@Cacheable + public Map queryAll(YxSystemCityQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + map.put("content", generator.convert(page.getList(), YxSystemCityDto.class)); + map.put("totalElements", page.getTotal()); + return map; + } + + + @Override + //@Cacheable + public List queryAll(YxSystemCityQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemCity.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxSystemCityDto yxSystemCity : all) { + Map map = new LinkedHashMap<>(); + map.put("城市id", yxSystemCity.getCityId()); + map.put("省市级别", yxSystemCity.getLevel()); + map.put("父级id", yxSystemCity.getParentId()); + map.put("区号", yxSystemCity.getAreaCode()); + map.put("名称", yxSystemCity.getName()); + map.put("合并名称", yxSystemCity.getMergerName()); + map.put("经度", yxSystemCity.getLng()); + map.put("纬度", yxSystemCity.getLat()); + map.put("是否展示", yxSystemCity.getIsShow()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxShippingTemplatesFreeMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxShippingTemplatesFreeMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..916a3b9e8fafa55651f1a0b750c89cdf3036d511 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxShippingTemplatesFreeMapper.java @@ -0,0 +1,22 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.template.domain.YxShippingTemplatesFree; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Repository +public interface YxShippingTemplatesFreeMapper extends CoreMapper { + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxShippingTemplatesMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxShippingTemplatesMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..597de537b349732638939fe9cf1c5dab096e7132 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxShippingTemplatesMapper.java @@ -0,0 +1,22 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.template.domain.YxShippingTemplates; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Repository +public interface YxShippingTemplatesMapper extends CoreMapper { + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxShippingTemplatesRegionMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxShippingTemplatesRegionMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..138368cfbf5dffeaf950129bcacf509168fa073c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxShippingTemplatesRegionMapper.java @@ -0,0 +1,22 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.template.domain.YxShippingTemplatesRegion; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Repository +public interface YxShippingTemplatesRegionMapper extends CoreMapper { + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxSystemCityMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxSystemCityMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..1c6e33368aa83a00ffed46881de41e2a64d83cfe --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/template/service/mapper/YxSystemCityMapper.java @@ -0,0 +1,22 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.template.domain.YxSystemCity; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@Repository +public interface YxSystemCityMapper extends CoreMapper { + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserTask.java b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxSystemUserTask.java similarity index 70% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserTask.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxSystemUserTask.java index 7954ccaa302cfcc1a79d7a00383454c3d6bddee8..7a0c55bc073a14674af4fa26a69ea5dd329171b5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxSystemUserTask.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxSystemUserTask.java @@ -1,26 +1,21 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.user.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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 java.io.Serializable; - /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data @TableName("yx_system_user_task") @@ -66,8 +61,7 @@ public class YxSystemUserTask extends BaseDomain { private String illustrate; - - public void copy(YxSystemUserTask source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxSystemUserTask source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUser.java b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUser.java similarity index 73% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUser.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUser.java index 59e5efe9ab9a4418eb08c03ea3611869e9b942d0..c417af2eb5c9dccfbc08ccd7b611cd2b0a783517 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUser.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUser.java @@ -1,31 +1,43 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.user.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -import co.yixiang.modules.shop.service.dto.WechatUserDto; -import com.baomidou.mybatisplus.annotation.FieldFill; +import co.yixiang.modules.user.service.dto.WechatUserDto; import com.baomidou.mybatisplus.annotation.IdType; import com.baomidou.mybatisplus.annotation.TableField; import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.extension.handlers.FastjsonTypeHandler; -import lombok.Data; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; +import lombok.ToString; +import lombok.experimental.Accessors; -import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ -@Data +* @author hupeng +* @date 2020-05-12 +*/ + +@Builder +@Getter +@Setter +@NoArgsConstructor +@AllArgsConstructor +@Accessors(chain = true) +@ToString +@TableName(value = "yx_user",autoResultMap = true) public class YxUser extends BaseDomain { /** 用户id */ @@ -37,10 +49,13 @@ public class YxUser extends BaseDomain { private String username; + + /** 用户密码(跟pwd) */ private String password; + /** 真实姓名 */ private String realName; @@ -57,6 +72,14 @@ public class YxUser extends BaseDomain { private String mark; + /** 合伙人id */ + private Integer partnerId; + + + /** 用户分组id */ + private Integer groupId; + + /** 用户昵称 */ private String nickname; @@ -68,10 +91,13 @@ public class YxUser extends BaseDomain { /** 手机号码 */ private String phone; + + /** 添加ip */ private String addIp; + /** 最后一次登录ip */ private String lastIp; @@ -119,8 +145,10 @@ public class YxUser extends BaseDomain { /** 用户购买次数 */ private Integer payCount; + /** 下级人数 */ - private Integer spreadCount; + private Long spreadCount; + /** 详细地址 */ @@ -139,7 +167,7 @@ public class YxUser extends BaseDomain { private WechatUserDto wxProfile; - public void copy(YxUser source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxUser source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserAddress.java b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserAddress.java new file mode 100644 index 0000000000000000000000000000000000000000..fc8a2d38ffc1fbd854efddef52474680b6c7c6e9 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserAddress.java @@ -0,0 +1,72 @@ +package co.yixiang.modules.user.domain; + + +import co.yixiang.domain.BaseDomain; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + *

+ * 用户地址表 + *

+ * + * @author hupeng + * @since 2019-10-28 + */ +@Getter +@Setter +@AllArgsConstructor +@NoArgsConstructor +@Builder +@ApiModel(value = "YxUserAddress对象", description = "用户地址表") +public class YxUserAddress extends BaseDomain { + + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "用户地址id") + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "用户id") + private Long uid; + + @ApiModelProperty(value = "收货人姓名") + private String realName; + + @ApiModelProperty(value = "收货人电话") + private String phone; + + @ApiModelProperty(value = "收货人所在省") + private String province; + + @ApiModelProperty(value = "收货人所在市") + private String city; + + private Integer cityId; + + @ApiModelProperty(value = "收货人所在区") + private String district; + + @ApiModelProperty(value = "收货人详细地址") + private String detail; + + @ApiModelProperty(value = "邮编") + private String postCode; + + @ApiModelProperty(value = "经度") + private String longitude; + + @ApiModelProperty(value = "纬度") + private String latitude; + + @ApiModelProperty(value = "是否默认") + private Integer isDefault; + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserBill.java b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserBill.java similarity index 71% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserBill.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserBill.java index 076749b211441077a58a992783c877040a631047..124585955cb0040197572df56b0edfa5d22257ac 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserBill.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserBill.java @@ -1,29 +1,33 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.user.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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.AllArgsConstructor; +import lombok.Builder; import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; -import java.io.Serializable; import java.math.BigDecimal; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) @TableName("yx_user_bill") public class YxUserBill extends BaseDomain { @@ -68,11 +72,12 @@ public class YxUserBill extends BaseDomain { private String mark; + /** 0 = 带确定 1 = 有效 -1 = 无效 */ private Integer status; - public void copy(YxUserBill source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxUserBill source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserLevel.java b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserLevel.java new file mode 100644 index 0000000000000000000000000000000000000000..89fda054418078944e08d9de7c74d8dcf38677a7 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserLevel.java @@ -0,0 +1,60 @@ +package co.yixiang.modules.user.domain; + +import co.yixiang.domain.BaseDomain; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 用户等级记录表 + *

+ * + * @author hupeng + * @since 2019-12-06 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "YxUserLevel对象", description = "用户等级记录表") +public class YxUserLevel extends BaseDomain { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @ApiModelProperty(value = "用户uid") + private Long uid; + + @ApiModelProperty(value = "等级vip") + private Integer levelId; + + @ApiModelProperty(value = "会员等级") + private Integer grade; + + @ApiModelProperty(value = "过期时间") + private Integer validTime; + + @ApiModelProperty(value = "是否永久") + private Integer isForever; + + @ApiModelProperty(value = "商户id") + private Integer merId; + + @ApiModelProperty(value = "0:禁止,1:正常") + private Integer status; + + @ApiModelProperty(value = "备注") + private String mark; + + @ApiModelProperty(value = "是否已通知") + private Integer remind; + + + @ApiModelProperty(value = "享受折扣") + private Integer discount; + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserRecharge.java b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserRecharge.java similarity index 69% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserRecharge.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserRecharge.java index 6990767f89a0edd64a00c0e1ff5caeb79d07bb05..a252a3030ed7ad5bd4c1f517c5b383d84861c8d4 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/domain/YxUserRecharge.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserRecharge.java @@ -1,30 +1,28 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.domain; +package co.yixiang.modules.user.domain; import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.bean.copier.CopyOptions; import co.yixiang.domain.BaseDomain; -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.EqualsAndHashCode; -import java.io.Serializable; import java.math.BigDecimal; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_user_recharge") public class YxUserRecharge extends BaseDomain { @@ -43,6 +41,8 @@ public class YxUserRecharge extends BaseDomain { /** 充值金额 */ private BigDecimal price; + private BigDecimal givePrice; + /** 充值类型 */ private String rechargeType; @@ -56,6 +56,7 @@ public class YxUserRecharge extends BaseDomain { private Date payTime; + /** 退款金额 */ private BigDecimal refundPrice; @@ -64,7 +65,7 @@ public class YxUserRecharge extends BaseDomain { private String nickname; - public void copy(YxUserRecharge source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxUserRecharge source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserSign.java b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserSign.java new file mode 100644 index 0000000000000000000000000000000000000000..13219869a1d207af2495971acf7e3b84a5cdfb4e --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserSign.java @@ -0,0 +1,48 @@ +package co.yixiang.modules.user.domain; + + +import co.yixiang.domain.BaseDomain; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Data; +import lombok.EqualsAndHashCode; +import lombok.NoArgsConstructor; + +/** + *

+ * 签到记录表 + *

+ * + * @author hupeng + * @since 2019-12-05 + */ +@Data +@Builder +@AllArgsConstructor +@NoArgsConstructor +@EqualsAndHashCode(callSuper = true) +@ApiModel(value = "YxUserSign对象", description = "签到记录表") +public class YxUserSign extends BaseDomain { + + private static final long serialVersionUID = 1L; + + @TableId(value = "id", type = IdType.AUTO) + private Long id; + + @ApiModelProperty(value = "用户uid") + private Long uid; + + @ApiModelProperty(value = "签到说明") + private String title; + + @ApiModelProperty(value = "获得积分") + private Integer number; + + @ApiModelProperty(value = "剩余积分") + private Integer balance; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserTaskFinish.java b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserTaskFinish.java new file mode 100644 index 0000000000000000000000000000000000000000..d74bfa1f4306e00574b4710157be45be7a71acba --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/domain/YxUserTaskFinish.java @@ -0,0 +1,39 @@ +package co.yixiang.modules.user.domain; + + +import co.yixiang.domain.BaseDomain; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; +import lombok.EqualsAndHashCode; + +/** + *

+ * 用户任务完成记录表 + *

+ * + * @author hupeng + * @since 2019-12-07 + */ +@Data +@EqualsAndHashCode(callSuper = true) +@TableName("yx_user_task_finish") +public class YxUserTaskFinish extends BaseDomain { + + + @TableId(value = "id", type = IdType.AUTO) + private Integer id; + + @ApiModelProperty(value = "任务id") + private Integer taskId; + + @ApiModelProperty(value = "用户id") + private Long uid; + + @ApiModelProperty(value = "是否有效") + private Integer status; + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/param/AddressDetailParam.java b/yshop-mall/src/main/java/co/yixiang/modules/user/param/AddressDetailParam.java new file mode 100644 index 0000000000000000000000000000000000000000..d3e8c4b0649559c2aff9b51842787a819052cb17 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/param/AddressDetailParam.java @@ -0,0 +1,29 @@ +package co.yixiang.modules.user.param; + +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName AddressDetailParam + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/28 + **/ +@Data +public class AddressDetailParam implements Serializable { + + @JsonProperty(value = "city_id") + @ApiModelProperty(value = "城市ID") + private Integer cityId; + + @ApiModelProperty(value = "城市") + private String city; + + @ApiModelProperty(value = "地区") + private String district; + + @ApiModelProperty(value = "省份") + private String province; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/param/AddressParam.java b/yshop-mall/src/main/java/co/yixiang/modules/user/param/AddressParam.java new file mode 100644 index 0000000000000000000000000000000000000000..f9df5ce5e451e3ede00ed32febdb96ad8565fcd4 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/param/AddressParam.java @@ -0,0 +1,46 @@ +package co.yixiang.modules.user.param; + +import com.fasterxml.jackson.annotation.JsonIgnoreProperties; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.Size; +import java.io.Serializable; + +/** + * @ClassName AddressParam + * @Author hupeng <610796224@qq.com> + * @Date 2019/10/28 + **/ +@Data +@JsonIgnoreProperties(ignoreUnknown = true) +public class AddressParam implements Serializable { + + @ApiModelProperty(value = "地址ID") + private String id; + @NotBlank + @Size(min = 1, max = 30,message = "长度超过了限制") + @ApiModelProperty(value = "收货地址真实名字") + private String real_name; + + @ApiModelProperty(value = "收货地址邮编") + private String post_code; + + @ApiModelProperty(value = "是否默认收货地址 true是 false否") + private String is_default; + + private String wx_export; + + @NotBlank + @Size(min = 1, max = 60,message = "长度超过了限制") + @ApiModelProperty(value = "收货详细地址") + private String detail; + + @NotBlank + @ApiModelProperty(value = "收货手机号码") + private String phone; + + @ApiModelProperty(value = "收货地址详情") + private AddressDetailParam address; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserLevelService.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxSystemUserLevelService.java similarity index 31% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserLevelService.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/YxSystemUserLevelService.java index 76d5beabfb21d3e56e486bc972e879ac12fcd83d..25b4877ecd53f28f294dc4ff0bf30740319ef6a6 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserLevelService.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxSystemUserLevelService.java @@ -2,14 +2,17 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service; +package co.yixiang.modules.user.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.YxSystemUserLevelQueryCriteria; +import co.yixiang.modules.user.service.dto.UserLevelDto; +import co.yixiang.modules.user.service.dto.YxSystemUserLevelDto; +import co.yixiang.modules.user.service.dto.YxSystemUserLevelQueryCriteria; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,31 +21,48 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxSystemUserLevelService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxSystemUserLevelService extends BaseService{ + /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map + * 获取当前的下一个会员等级id + * @param levelId 等级id + * @return int */ - Map queryAll(YxSystemUserLevelQueryCriteria criteria, Pageable pageable); + int getNextLevelId(int levelId); + + //boolean getClear(int levelId); + /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List + * 获取会员等级列表及其任务列表 + * @return UserLevelDto */ + UserLevelDto getLevelInfo(Long uid); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxSystemUserLevelQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxSystemUserLevelQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxSystemUserTaskService.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxSystemUserTaskService.java new file mode 100644 index 0000000000000000000000000000000000000000..eaa3822547524ec68d2f718a95de3a482d72f740 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxSystemUserTaskService.java @@ -0,0 +1,69 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.user.domain.YxSystemUserTask; +import co.yixiang.modules.user.service.dto.TaskDto; +import co.yixiang.modules.user.service.dto.YxSystemUserTaskDto; +import co.yixiang.modules.user.service.dto.YxSystemUserTaskQueryCriteria; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxSystemUserTaskService extends BaseService{ + + + /** + * 获取已经完成的任务数量 + * + * @param levelId 等级id + * @param uid uid + * @return int + */ + Long getTaskComplete(int levelId,Long uid); + + /** + * 获取等级会员任务列表 + * @param levelId 等级id + * @param uid uid + * @return TaskDto + */ + TaskDto getTaskList(int levelId, Long uid); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxSystemUserTaskQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxSystemUserTaskQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserAddressService.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserAddressService.java new file mode 100644 index 0000000000000000000000000000000000000000..37d497396b73120881b31ddfc0122ddb228db427 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserAddressService.java @@ -0,0 +1,66 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service; + + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.user.domain.YxUserAddress; +import co.yixiang.modules.user.param.AddressParam; +import co.yixiang.modules.user.vo.YxUserAddressQueryVo; + +import java.util.List; + +/** + *

+ * 用户地址表 服务类 + *

+ * + * @author hupeng + * @since 2019-10-28 + */ +public interface YxUserAddressService extends BaseService { + + /** + * 设置默认地址 + * @param uid uid + * @param addressId 地址id + */ + void setDefault(Long uid,Long addressId); + + /** + * 添加或者修改地址 + * @param uid uid + * @param param AddressParam + */ + Long addAndEdit(Long uid, AddressParam param); + + /** + * 地址详情 + * @param id 地址id + * @return YxUserAddressQueryVo + */ + YxUserAddressQueryVo getDetail(Long id); + + /** + * 获取用户地址 + * @param uid uid + * @param page page + * @param limit limit + * @return List + */ + List getList(Long uid,int page,int limit); + + /** + * 获取默认地址 + * @param uid uid + * @return YxUserAddress + */ + YxUserAddress getUserDefaultAddress(Long uid); + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserBillService.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserBillService.java new file mode 100644 index 0000000000000000000000000000000000000000..693b3cf7ea826f84d82b1d872f034312456b86e7 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserBillService.java @@ -0,0 +1,118 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.user.domain.YxUserBill; +import co.yixiang.modules.user.service.dto.YxUserBillDto; +import co.yixiang.modules.user.service.dto.YxUserBillQueryCriteria; +import co.yixiang.modules.user.vo.YxUserBillQueryVo; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxUserBillService extends BaseService{ + + /** + * 增加支出流水 + * @param uid uid + * @param title 账单标题 + * @param category 明细种类 + * @param type 明细类型 + * @param number 明细数字 + * @param balance 剩余 + * @param mark 备注 + */ + void expend(Long uid,String title,String category,String type,double number,double balance,String mark); + + /** + * 增加收入/支入流水 + * @param uid uid + * @param title 账单标题 + * @param category 明细种类 + * @param type 明细类型 + * @param number 明细数字 + * @param balance 剩余 + * @param mark 备注 + * @param linkid 关联id + */ + void income(Long uid,String title,String category,String type,double number, + double balance,String mark,String linkid); + + Long cumulativeAttendance(Long uid); + + /** + * 获取推广订单列表 + * @param uid uid + * @param page page + * @param limit limit + * @return Map + */ + Map spreadOrder(Long uid,int page,int limit); + + /** + * 获取用户账单记录 + * @param page page + * @param limit limit + * @param uid uid + * @param type BillDetailEnum + * @return map + */ + Map getUserBillList(int page, int limit, long uid, int type); + + + double getBrokerage(int uid); + + /** + * 统计昨天的佣金 + * @param uid uid + * @return double + */ + double yesterdayCommissionSum(Long uid); + + /** + * 根据类别获取账单记录 + * @param uid uid + * @param category BillDetailEnum + * @param page page + * @param limit limit + * @return List + */ + List userBillList(Long uid,String category,int page,int limit); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxUserBillQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxUserBillQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserLevelService.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserLevelService.java new file mode 100644 index 0000000000000000000000000000000000000000..08f57e5149cd2925128c97c3cae57e485eab41e6 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserLevelService.java @@ -0,0 +1,43 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.user.domain.YxUserLevel; + + +/** + *

+ * 用户等级记录表 服务类 + *

+ * + * @author hupeng + * @since 2019-12-06 + */ +public interface YxUserLevelService extends BaseService { + + + /** + * 检查是否能成为会员 + * @param uid 用户id + */ + boolean setLevelComplete(Long uid); + + //UserLevelInfoDto getUserLevelInfo(int id); + + /** + * 获取当前用户会员等级返回当前用户等级 + * @param uid uid + * @param grade 用户级别 + * @return YxUserLevel + */ + YxUserLevel getUserLevel(Long uid, Integer grade); + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserRechargeService.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserRechargeService.java new file mode 100644 index 0000000000000000000000000000000000000000..9b32fae0519ee5e3074d56c40e004e192a2c3e4d --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserRechargeService.java @@ -0,0 +1,64 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.domain.YxUserRecharge; +import co.yixiang.modules.user.service.dto.YxUserRechargeDto; +import co.yixiang.modules.user.service.dto.YxUserRechargeQueryCriteria; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxUserRechargeService extends BaseService{ + + + void updateRecharge(YxUserRecharge userRecharge); + + YxUserRecharge getInfoByOrderId(String orderId); + + /** + * 添加充值记录 + * @param user 用户 + * @param price 充值金额 + * @param paidPrice 赠送金额 + */ + String addRecharge(YxUser user, String price, String paidPrice); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxUserRechargeQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxUserRechargeQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserService.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserService.java new file mode 100644 index 0000000000000000000000000000000000000000..4092f9abded8d4dfe125534dddd4a2ac03dbe384 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserService.java @@ -0,0 +1,193 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.order.vo.YxStoreOrderQueryVo; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.service.dto.PromUserDto; +import co.yixiang.modules.user.service.dto.UserMoneyDto; +import co.yixiang.modules.user.service.dto.YxUserDto; +import co.yixiang.modules.user.service.dto.YxUserQueryCriteria; +import co.yixiang.modules.user.vo.YxUserQueryVo; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxUserService extends BaseService{ + + /** + * 返回用户累计充值金额与消费金额 + * @param uid uid + * @return Double[] + */ + Double[] getUserMoney(Long uid); + + /** + * 一级返佣 + * @param order 订单 + */ + void backOrderBrokerage(YxStoreOrderQueryVo order); + + + + /** + * 统计分销人员 + * + * @param uid uid + * @return map + */ + Map getSpreadCount(Long uid); + + /** + * 获取我的分销下人员列表 + * @param uid uid + * @param page page + * @param limit limit + * @param grade ShopCommonEnum.GRADE_0 + * @param keyword 关键字搜索 + * @param sort 排序 + * @return list + */ + List getUserSpreadGrade(Long uid, int page, int limit, Integer grade, String keyword, String sort); + + /** + * 减去用户积分 + * @param uid 用户id + * @param integral 积分 + */ + void decIntegral(Long uid,double integral); + + /** + * 增加购买次数 + * @param uid uid + */ + void incPayCount(Long uid); + + /** + * 减去用户余额 + * @param uid uid + * @param payPrice 金额 + */ + void decPrice(Long uid, BigDecimal payPrice); + + // YxUser findByName(String name); + + /** + * 更新用户余额 + * @param uid y用户id + * @param price 金额 + */ + void incMoney(Long uid,BigDecimal price); + + /** + * 增加积分 + * @param uid uid + * @param integral 积分 + */ + void incIntegral(Long uid,double integral); + + /** + * 获取用户信息 + * @param uid uid + * @return YxUserQueryVo + */ + YxUserQueryVo getYxUserById(Long uid); + + /** + * 获取用户个人详细信息 + * @param yxUser yxUser + * @return YxUserQueryVo + */ + YxUserQueryVo getNewYxUserById(YxUser yxUser); + + /** + * 转换用户信息 + * @param yxUser user + * @return YxUserQueryVo + */ + YxUserQueryVo handleUser(YxUser yxUser); + + /** + * 返回会员价 + * @param price 原价 + * @param uid 用户id + * @return vip 价格 + */ + double setLevelPrice(double price, long uid); + + /** + * 设置推广关系 + * @param spread 上级人 + * @param uid 本人 + */ + void setSpread(String spread, long uid); + + + /** + * 查看下级 + * @param uid uid + * @param grade 等级 + * @return list + */ + List querySpread(Long uid, Integer grade); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxUserQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxUserQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + /** + * 更新用户状态 + * @param uid uid + * @param status ShopCommonEnum + */ + void onStatus(Long uid, Integer status); + + /** + * 修改余额 + * @param param UserMoneyDto + */ + void updateMoney(UserMoneyDto param); + + /** + * 增加佣金 + * @param price 金额 + * @param uid 用户id + */ + void incBrokeragePrice(BigDecimal price, Long uid); + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserSignService.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserSignService.java new file mode 100644 index 0000000000000000000000000000000000000000..083911b5459a2e9256b5a0e4b57ae8d7a5464f2d --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserSignService.java @@ -0,0 +1,61 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service; + + + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.domain.YxUserSign; +import co.yixiang.modules.user.vo.SignVo; +import co.yixiang.modules.user.vo.YxUserQueryVo; + +import java.util.List; + +/** + *

+ * 签到记录表 服务类 + *

+ * + * @author hupeng + * @since 2019-12-05 + */ +public interface YxUserSignService extends BaseService { + + /** + * + * @param yxUser 用户 + * @return 签到积分 + */ + int sign(YxUser yxUser); + + /** + * 分页获取用户签到数据 + * @param uid 用户id + * @param page page + * @param limit limit + * @return list + */ + List getSignList(Long uid, int page, int limit); + + //boolean getYesterDayIsSign(int uid); + + //boolean getToDayIsSign(int uid); + + //int getSignSumDay(int uid); + + /** + * 获取签到用户信息 + * @param yxUser yxUser + * @return YxUserQueryVo + */ + YxUserQueryVo userSignInfo(YxUser yxUser); + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserTaskFinishService.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserTaskFinishService.java new file mode 100644 index 0000000000000000000000000000000000000000..1f53951deed4c26eeb4f0510941935d36c0dff08 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/YxUserTaskFinishService.java @@ -0,0 +1,33 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service; + + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.user.domain.YxUserTaskFinish; + +/** + *

+ * 用户任务完成记录表 服务类 + *

+ * + * @author hupeng + * @since 2019-12-07 + */ +public interface YxUserTaskFinishService extends BaseService { + + /** + * 设置任务完成 + * @param uid uid + * @param taskId 任务id + */ + void setFinish(Long uid,int taskId); + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/BillOrderDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/BillOrderDto.java new file mode 100644 index 0000000000000000000000000000000000000000..184df7d15add11c7710d4ec2a0a7d03aa959175c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/BillOrderDto.java @@ -0,0 +1,17 @@ +package co.yixiang.modules.user.service.dto; + +import lombok.Data; + +import java.util.List; + +/** + * @ClassName BillVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/12 + **/ +@Data +public class BillOrderDto { + private String time; + private Integer count; + private List child; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/BillOrderRecordDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/BillOrderRecordDto.java new file mode 100644 index 0000000000000000000000000000000000000000..af658a3a6d4f78dda96934eed964248585370d0c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/BillOrderRecordDto.java @@ -0,0 +1,17 @@ +package co.yixiang.modules.user.service.dto; + +import lombok.Data; + +/** + * @ClassName BillVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/12 + **/ +@Data +public class BillOrderRecordDto { + private String orderId; + private String time; + private Double number; + private String avatar; + private String nickname; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/MUserBillDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/MUserBillDto.java new file mode 100644 index 0000000000000000000000000000000000000000..0587612c9a8ae04a5df0bfd587f883e02027c60b --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/MUserBillDto.java @@ -0,0 +1,16 @@ +package co.yixiang.modules.user.service.dto; + +import lombok.Data; + +/** + * @ClassName UserBillDTO + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/12 + **/ +@Data +public class MUserBillDto { + private String addTime; + private String title; + private Double number; + private Integer pm; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/PromUserDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/PromUserDto.java new file mode 100644 index 0000000000000000000000000000000000000000..110ce594d0360b3bd75d7a96918536bbd8d1d50d --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/PromUserDto.java @@ -0,0 +1,21 @@ +package co.yixiang.modules.user.service.dto; + +import lombok.Data; + +import java.math.BigDecimal; + +/** + * @ClassName PromUserDto + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/12 + **/ +@Data +public class PromUserDto { + private String avatar; + private String nickname; + private Integer childCount; + private BigDecimal numberCount; + private Integer orderCount; + private Integer uid; + private String time; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/TaskDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/TaskDto.java new file mode 100644 index 0000000000000000000000000000000000000000..8d13a71042cded2d46eefdea7847b4ae95010c2f --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/TaskDto.java @@ -0,0 +1,20 @@ +package co.yixiang.modules.user.service.dto; + + +import co.yixiang.modules.user.vo.YxSystemUserTaskQueryVo; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @ClassName TaskDto + * @Author hupeng <610796224@qq.com> + * @Date 2019/12/6 + **/ +@Data +public class TaskDto implements Serializable { + private List list; + private Long reachCount; + private List task; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserBillDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserBillDto.java similarity index 79% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserBillDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserBillDto.java index 67cbc40e1817f75a3127355ae454efa104e66055..284b899c456aa98c630664f0400f7694c8678031 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserBillDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserBillDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.user.service.dto; import lombok.Data; diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserLevelDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserLevelDto.java new file mode 100644 index 0000000000000000000000000000000000000000..7daf035554a997add753e17216485353ea8ae57a --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserLevelDto.java @@ -0,0 +1,19 @@ +package co.yixiang.modules.user.service.dto; + + +import co.yixiang.modules.user.vo.YxSystemUserLevelQueryVo; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + * @ClassName UserLevelDto + * @Author hupeng <610796224@qq.com> + * @Date 2019/12/6 + **/ +@Data +public class UserLevelDto implements Serializable { + private List list; + private TaskDto task; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserLevelInfoDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserLevelInfoDto.java new file mode 100644 index 0000000000000000000000000000000000000000..c2b43a5334bd28ac4225659c71a3e3f4af9d029c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserLevelInfoDto.java @@ -0,0 +1,21 @@ +package co.yixiang.modules.user.service.dto; + +import lombok.Data; + +import java.io.Serializable; + +/** + * @ClassName UserLevelInfoDto + * @Author hupeng <610796224@qq.com> + * @Date 2019/12/7 + **/ +@Data +public class UserLevelInfoDto implements Serializable { + private Integer id; + private Integer addTime; + private Double discount; + private Integer levelId; + private String name; + private String icon; + private Integer grade; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserMoneyDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserMoneyDto.java similarity index 58% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserMoneyDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserMoneyDto.java index b7d88f59c234b411d06db3bab8c0600a5cdd3bc3..25a982cb062a8ec42d3a9105ebc8be4ee036c71c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/UserMoneyDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/UserMoneyDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.user.service.dto; import lombok.Data; @@ -18,11 +17,11 @@ import java.io.Serializable; **/ @Data public class UserMoneyDto implements Serializable { - //@NotNull(message = "参数缺失") + //@NotNull(message = "参数缺失") private Long uid; - //@NotNull(message = "请选择修改余额方式") + //@NotNull(message = "请选择修改余额方式") private Integer ptype; - //@NotNull(message = "金额必填") - @Min(message = "最低金额为0", value = 0) + //@NotNull(message = "金额必填") + @Min(message = "最低金额为0",value = 0) private Double money; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/WechatUserDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/WechatUserDto.java similarity index 88% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/WechatUserDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/WechatUserDto.java index 30f269cead2aef186b851d87e106aaf7159bf34b..74ddbc09ea7aa1ac0158c86a87e8b48b861303ed 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/WechatUserDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/WechatUserDto.java @@ -1,45 +1,45 @@ -package co.yixiang.modules.shop.service.dto; - -import lombok.AllArgsConstructor; -import lombok.Builder; -import lombok.Getter; -import lombok.NoArgsConstructor; -import lombok.Setter; - -/** - * @ClassName WechatUserDTO - * @Author hupeng <610796224@qq.com> - * @Date 2020/6/4 - **/ -@Getter -@Setter -@Builder -@AllArgsConstructor -@NoArgsConstructor -public class WechatUserDto { - - private String openid; - - private String unionId; - - private String routineOpenid; - - private String nickname; - - private String headimgurl; - - private Integer sex; - - private String city; - - private String language; - - private String province; - - private String country; - - private Boolean subscribe; - - private Long subscribeTime; - -} \ No newline at end of file +package co.yixiang.modules.user.service.dto; + +import lombok.AllArgsConstructor; +import lombok.Builder; +import lombok.Getter; +import lombok.NoArgsConstructor; +import lombok.Setter; + +/** + * @ClassName WechatUserDTO + * @Author hupeng <610796224@qq.com> + * @Date 2020/6/4 + **/ +@Getter +@Setter +@Builder +@AllArgsConstructor +@NoArgsConstructor +public class WechatUserDto { + + private String openid; + + private String unionId; + + private String routineOpenid; + + private String nickname; + + private String headimgurl; + + private Integer sex; + + private String city; + + private String language; + + private String province; + + private String country; + + private Boolean subscribe; + + private Long subscribeTime; + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserLevelDto.java similarity index 83% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserLevelDto.java index 6496697d855ec6287405a3e748bb73f1855b5541..aa9d562ea9f879e68fcc02ad2e1b627b0d5e2d00 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserLevelDto.java @@ -1,21 +1,19 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.user.service.dto; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; -import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxSystemUserLevelDto implements Serializable { @@ -58,5 +56,8 @@ public class YxSystemUserLevelDto implements Serializable { private String explain; /** 添加时间 */ - private Date createTime; + private Integer addTime; + + /** 是否删除.1=删除,0=未删除 */ + private Integer isDel; } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserLevelQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserLevelQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..a06f597669abd0c32759990014033328751673c3 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserLevelQueryCriteria.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.user.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxSystemUserLevelQueryCriteria{ +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserTaskDto.java similarity index 79% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserTaskDto.java index 8905f14ae7ba633889ba569f0342148ab685634c..a0c79cb147367f5e9b43c50591821b652b93d09a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserTaskDto.java @@ -1,20 +1,18 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.user.service.dto; import lombok.Data; import java.io.Serializable; -import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxSystemUserTaskDto implements Serializable { private Integer id; @@ -49,5 +47,5 @@ public class YxSystemUserTaskDto implements Serializable { private String illustrate; // 新增时间 - private Date createTime; + private Integer addTime; } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserTaskQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserTaskQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..ac59f656f9e9c3bff8630ef455929fbb546a021c --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxSystemUserTaskQueryCriteria.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.user.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxSystemUserTaskQueryCriteria{ +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserBillDto.java similarity index 81% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserBillDto.java index 6b5e6473f3d30c3f24dbdf45185f4fc0af2c7ebe..5b57dc2c96a0fba7d739a859cff849fa43ee3749 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserBillDto.java @@ -1,11 +1,11 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.user.service.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; @@ -13,9 +13,9 @@ import java.math.BigDecimal; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxUserBillDto implements Serializable { @@ -50,6 +50,7 @@ public class YxUserBillDto implements Serializable { private String mark; /** 添加时间 */ + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") private Date createTime; /** 0 = 带确定 1 = 有效 -1 = 无效 */ diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserBillQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserBillQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..11a0e80b934428a3ee09e80b81e22c6775dd0504 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserBillQueryCriteria.java @@ -0,0 +1,30 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.user.service.dto; + +import co.yixiang.annotation.Query; +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxUserBillQueryCriteria{ + @Query(type = Query.Type.EQUAL) + private String nickname = ""; + @Query(type = Query.Type.EQUAL) + private String category = ""; + @Query(type = Query.Type.EQUAL) + private String type = ""; + @Query(type = Query.Type.EQUAL) + private Integer pm; + @Query(type = Query.Type.EQUAL) + private String title = ""; + private String startTime; + + private String endTime; +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java similarity index 77% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java index 44fcd1a061c2e47c700b6e1bfc74faeb8353a6d0..adcbdfa2ad68ce22b01fe6a2fa05ceca6fe4ff2f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserDto.java @@ -1,20 +1,21 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.user.service.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; import java.math.BigDecimal; +import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxUserDto implements Serializable { @@ -24,14 +25,9 @@ public class YxUserDto implements Serializable { /** 用户账户(跟accout一样) */ private String username; - /** 用户账号 */ - private String account; - /** 用户密码(跟pwd) */ private String password; - /** 用户密码 */ - private String pwd; /** 真实姓名 */ private String realName; @@ -61,16 +57,12 @@ public class YxUserDto implements Serializable { private String phone; /** 添加时间 */ - private Integer addTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date createTime; /** 添加ip */ private String addIp; - /** 最后一次登录时间 */ - private Integer lastTime; - - /** 最后一次登录ip */ - private String lastIp; /** 用户余额 */ private BigDecimal nowMoney; @@ -91,10 +83,10 @@ public class YxUserDto implements Serializable { private Integer level; /** 推广元id */ - private Integer spreadUid; + private Long spreadUid; /** 推广员关联时间 */ - private Integer spreadTime; + private Date spreadTime; /** 用户类型 */ private String userType; @@ -108,9 +100,6 @@ public class YxUserDto implements Serializable { /** 下级人数 */ private Integer spreadCount; - /** 清理会员时间 */ - private Integer cleanTime; - /** 详细地址 */ private String addres; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserQueryCriteria.java similarity index 69% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserQueryCriteria.java index b3d401ab3597ca36a69ff25422b7ea13a0500862..10a7bea4540f184780d912451badabd9761a7a1c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserQueryCriteria.java @@ -1,20 +1,19 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.user.service.dto; import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxUserQueryCriteria { +public class YxUserQueryCriteria{ // 模糊 @Query(type = Query.Type.INNER_LIKE) @@ -29,4 +28,8 @@ public class YxUserQueryCriteria { @Query private String userType; + + private Long uid; + + private Integer grade; } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserRechargeDto.java similarity index 84% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserRechargeDto.java index 38f0ea2d4676785b2d7b3dd1ee3ff5310120d22b..9171a005ed358b012a19de62210211231ca5fd0f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserRechargeDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.user.service.dto; import lombok.Data; @@ -13,9 +12,9 @@ import java.math.BigDecimal; import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxUserRechargeDto implements Serializable { diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserRechargeQueryCriteria.java similarity index 56% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeQueryCriteria.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserRechargeQueryCriteria.java index 931c9b08d4619a6517f696b33fc0cbde180c5b4a..58cfb22940504651023023ebf60beceee3f2c02e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserRechargeQueryCriteria.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserRechargeQueryCriteria.java @@ -1,20 +1,19 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.user.service.dto; import co.yixiang.annotation.Query; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxUserRechargeQueryCriteria { +public class YxUserRechargeQueryCriteria{ /** 模糊 */ @Query(type = Query.Type.INNER_LIKE) diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserSmallDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserSmallDto.java similarity index 73% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserSmallDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserSmallDto.java index 20d3e97ba57c0989a8bc35eb22e1acb9fe8e564d..77a3b324d98cd4b553b399eb611447e471deda4e 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserSmallDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxUserSmallDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.user.service.dto; import lombok.Data; @@ -12,9 +11,9 @@ import java.io.Serializable; /** - * @author hupeng - * @date 2019-10-06 - */ +* @author hupeng +* @date 2019-10-06 +*/ @Data public class YxUserSmallDto implements Serializable { diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserDto.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxWechatUserDto.java similarity index 93% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserDto.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxWechatUserDto.java index 2f69a29112e8bcf553f891372e8d932a4cd23143..2d7993a412f6a7a677a550c867317b4111e214fe 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserDto.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxWechatUserDto.java @@ -1,10 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.service.dto; +package co.yixiang.modules.user.service.dto; import lombok.Data; @@ -12,9 +11,9 @@ import java.io.Serializable; import java.math.BigDecimal; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxWechatUserDto implements Serializable { diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxWechatUserQueryCriteria.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxWechatUserQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..a2d80b0dc0bed8be77bfc7449937a0f3b8a03cc7 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/dto/YxWechatUserQueryCriteria.java @@ -0,0 +1,16 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + + */ +package co.yixiang.modules.user.service.dto; + +import lombok.Data; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Data +public class YxWechatUserQueryCriteria{ +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemUserLevelServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserLevelServiceImpl.java similarity index 36% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemUserLevelServiceImpl.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserLevelServiceImpl.java index 5499e95d713f2a82411435fa5c355dc38a555930..7e1aae163421171a49494ec97b8b0718d738a221 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxSystemUserLevelServiceImpl.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxSystemUserLevelServiceImpl.java @@ -2,21 +2,32 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.impl; +package co.yixiang.modules.user.service.impl; +import cn.hutool.core.util.ObjectUtil; +import co.yixiang.api.YshopException; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.ShopCommonEnum; import co.yixiang.modules.shop.domain.YxSystemUserLevel; -import co.yixiang.modules.shop.service.YxSystemUserLevelService; -import co.yixiang.modules.shop.service.dto.YxSystemUserLevelDto; -import co.yixiang.modules.shop.service.dto.YxSystemUserLevelQueryCriteria; -import co.yixiang.modules.shop.service.mapper.SystemUserLevelMapper; +import co.yixiang.modules.user.domain.YxUserLevel; +import co.yixiang.modules.user.service.YxSystemUserLevelService; +import co.yixiang.modules.user.service.YxSystemUserTaskService; +import co.yixiang.modules.user.service.YxUserLevelService; +import co.yixiang.modules.user.service.dto.TaskDto; +import co.yixiang.modules.user.service.dto.UserLevelDto; +import co.yixiang.modules.user.service.dto.YxSystemUserLevelDto; +import co.yixiang.modules.user.service.dto.YxSystemUserLevelQueryCriteria; +import co.yixiang.modules.user.service.mapper.SystemUserLevelMapper; +import co.yixiang.modules.user.vo.YxSystemUserLevelQueryVo; import co.yixiang.utils.FileUtil; import com.github.pagehelper.PageInfo; -import lombok.AllArgsConstructor; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.data.domain.Pageable; import org.springframework.stereotype.Service; import org.springframework.transaction.annotation.Propagation; @@ -29,22 +40,124 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service -@AllArgsConstructor -//@CacheConfig(cacheNames = "yxSystemUserLevel") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxSystemUserLevelServiceImpl extends BaseServiceImpl implements YxSystemUserLevelService { - private final IGenerator generator; + @Autowired + private IGenerator generator; + + @Autowired + private SystemUserLevelMapper yxSystemUserLevelMapper; + @Autowired + private YxUserLevelService userLevelService; + @Autowired + private YxSystemUserTaskService systemUserTaskService; + + /** + * 获取当前的下一个会员等级id + * @param levelId 等级id + * @return int + */ + @Override + public int getNextLevelId(int levelId) { + List list = this.lambdaQuery() + .eq(YxSystemUserLevel::getIsShow,ShopCommonEnum.SHOW_1.getValue()) + .orderByAsc(YxSystemUserLevel::getGrade) + .list(); + + int grade = 0; + for (YxSystemUserLevel userLevel : list) { + if(userLevel.getId() == levelId) { + grade = userLevel.getGrade(); + } + } + + YxSystemUserLevel userLevel = this.lambdaQuery() + .eq(YxSystemUserLevel::getIsShow,ShopCommonEnum.SHOW_1.getValue()) + .orderByAsc(YxSystemUserLevel::getGrade) + .gt(YxSystemUserLevel::getGrade,grade) + .last("limit 1") + .one(); + if(ObjectUtil.isNull(userLevel)) { + return 0; + } + return userLevel.getId(); + } + +// @Override +// public boolean getClear(int levelId) { +// List systemUserLevelQueryVos = this.getLevelListAndGrade(levelId); +// for (YxSystemUserLevelQueryVo userLevelQueryVo : systemUserLevelQueryVos) { +// if(userLevelQueryVo.getId() == levelId) return userLevelQueryVo.getIsClear(); +// } +// return false; +// } + + + + /** + * 获取会员等级列表及其任务列表 + * @return UserLevelDto + */ + @Override + public UserLevelDto getLevelInfo(Long uid) { + int levelId = 0; //用户当前等级id 0-表示无 + YxUserLevel userLevel = userLevelService.getUserLevel(uid, null); + if(userLevel != null){ + levelId = userLevel.getLevelId(); + } + + + //会员等级列表 + List list = this.getLevelListAndGrade(levelId); + if(list.isEmpty()) { + throw new YshopException("请后台设置会员等级"); + } + + //任务列表 + TaskDto taskDTO = systemUserTaskService.getTaskList(list.get(0).getId(),uid); + + UserLevelDto userLevelDTO = new UserLevelDto(); + userLevelDTO.setList(list); + userLevelDTO.setTask(taskDTO); + + return userLevelDTO; + } + + /** + * 获取会员等级列表 + * @param levelId 等级id + * @return list + */ + private List getLevelListAndGrade(Integer levelId) { + Integer grade = 0; + List list = this.lambdaQuery() + .eq(YxSystemUserLevel::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .orderByAsc(YxSystemUserLevel::getGrade) + .list(); + List newList = generator.convert(list,YxSystemUserLevelQueryVo.class); + for (YxSystemUserLevelQueryVo userLevelQueryVo : newList) { + if(userLevelQueryVo.getId().compareTo(levelId) == 0) { + grade = userLevelQueryVo.getGrade(); + } + if(grade.compareTo(userLevelQueryVo.getGrade()) < 0){ + userLevelQueryVo.setIsClear(true); //不解锁 + }else{ + userLevelQueryVo.setIsClear(false);//开启会员解锁 + } + } + return newList; + } + + + //=========================================================================================// @Override //@Cacheable @@ -60,7 +173,7 @@ public class YxSystemUserLevelServiceImpl extends BaseServiceImpl queryAll(YxSystemUserLevelQueryCriteria criteria) { + public List queryAll(YxSystemUserLevelQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemUserLevel.class, criteria)); } @@ -69,7 +182,7 @@ public class YxSystemUserLevelServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxSystemUserLevelDto yxSystemUserLevel : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("商户id", yxSystemUserLevel.getMerId()); map.put("会员名称", yxSystemUserLevel.getName()); map.put("购买金额", yxSystemUserLevel.getMoney()); @@ -82,6 +195,8 @@ public class YxSystemUserLevelServiceImpl extends BaseServiceImpl implements YxSystemUserTaskService { - private final IGenerator generator; - private final YxSystemUserLevelService systemUserLevelService; + @Autowired + private IGenerator generator; + @Autowired + private YxSystemUserLevelService systemUserLevelService; + + @Autowired + private SystemUserTaskMapper yxSystemUserTaskMapper; + @Autowired + private YxUserTaskFinishMapper yxUserTaskFinishMapper; + + @Autowired + private UserBillMapper userBillMapper; + @Autowired + private StoreOrderMapper storeOrderMapper; + + @Autowired + private YxUserTaskFinishService userTaskFinishService; + @Autowired + private YxUserBillService userBillService; + + + + + + /** + * 获取已经完成的任务数量 + * + * @param levelId 等级id + * @param uid uid + * @return int + */ + @Override + public Long getTaskComplete(int levelId, Long uid) { + List list = this.lambdaQuery() + .eq(YxSystemUserTask::getLevelId,levelId) + .eq(YxSystemUserTask::getIsShow,ShopCommonEnum.SHOW_1.getValue()) + .list(); + List taskIds = list.stream().map(YxSystemUserTask::getId) + .collect(Collectors.toList()); + if(taskIds.isEmpty()) { + return 0L; + } + + Long count = yxUserTaskFinishMapper.selectCount(Wrappers.lambdaQuery() + .in(YxUserTaskFinish::getTaskId,taskIds) + .eq(YxUserTaskFinish::getUid,uid)); + return count; + } + + /** + * 获取等级会员任务列表 + * @param levelId 等级id + * @param uid uid + * @return TaskDto + */ + @Override + public TaskDto getTaskList(int levelId, Long uid) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxSystemUserTask::getLevelId,levelId) + .eq(YxSystemUserTask::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .orderByDesc(YxSystemUserTask::getSort); + List list = generator.convert(yxSystemUserTaskMapper + .selectList(wrapper),YxSystemUserTaskQueryVo.class); + + TaskDto taskDTO = new TaskDto(); + taskDTO.setList(list); + taskDTO.setReachCount(this.getTaskComplete(levelId,uid)); + taskDTO.setTask(this.tidyTask(list,uid)); + + return taskDTO; + } + + + /** + * 设置任务内容完成情况 + * @param task 任务列表 + * @param uid uid + * @return list + */ + private List tidyTask(List task,Long uid) { + for (YxSystemUserTaskQueryVo taskQueryVo : task) { + Long count = userTaskFinishService.lambdaQuery() + .eq(YxUserTaskFinish::getTaskId,taskQueryVo.getId()) + .eq(YxUserTaskFinish::getUid,uid) + .count(); + if(count > 0){ + taskQueryVo.setNewNumber(taskQueryVo.getNumber()); + taskQueryVo.setSpeed(100); //完成比例 + taskQueryVo.setFinish(ShopCommonEnum.IS_FINISH_1.getValue()); + taskQueryVo.setTaskTypeTitle(""); + }else{ + double sumNumber = 0d; + String title = ""; + switch (taskQueryVo.getTaskType()){ + case "SatisfactionIntegral": + sumNumber = userBillMapper.sumIntegral(uid); + title = "还需要{0}经验"; + break; + case "ConsumptionAmount": + sumNumber = storeOrderMapper.sumPrice(uid); + title = "还需消费{0}元"; + break; + case "CumulativeAttendance": + sumNumber = userBillService.cumulativeAttendance(uid); + title = "还需签到{0}天"; + break; + default: + } + + if(sumNumber >= taskQueryVo.getNumber()){ + userTaskFinishService.setFinish(uid,taskQueryVo.getId()); + taskQueryVo.setFinish(ShopCommonEnum.IS_FINISH_1.getValue()); + taskQueryVo.setSpeed(100); + taskQueryVo.setTaskTypeTitle(""); + taskQueryVo.setNewNumber(taskQueryVo.getNumber()); + }else{ + double numdata = NumberUtil.sub(taskQueryVo.getNumber().doubleValue(),sumNumber); + taskQueryVo.setTaskTypeTitle(MessageFormat.format(title,numdata)); + double speed = NumberUtil.div(sumNumber,taskQueryVo.getNumber().doubleValue()); + taskQueryVo.setSpeed(Double.valueOf(NumberUtil.mul(speed,100)).intValue()); + taskQueryVo.setFinish(ShopCommonEnum.IS_FINISH_0.getValue()); + taskQueryVo.setNewNumber(Double.valueOf(sumNumber).intValue()); + } + } + } + + return task; + } + + + //==========================================================// @Override //@Cacheable public Map queryAll(YxSystemUserTaskQueryCriteria criteria, Pageable pageable) { getPage(pageable); PageInfo page = new PageInfo<>(queryAll(criteria)); - List systemUserTaskDTOS = generator.convert(page.getList(), YxSystemUserTaskDto.class); + List systemUserTaskDTOS = generator.convert(page.getList(),YxSystemUserTaskDto.class); for (YxSystemUserTaskDto systemUserTaskDTO : systemUserTaskDTOS) { - YxSystemUserLevel userLevel = systemUserLevelService.getById(systemUserTaskDTO.getLevelId()); + YxSystemUserLevel userLevel=systemUserLevelService.getById(systemUserTaskDTO.getLevelId()); if(userLevel == null) { - systemUserTaskDTO.setLevalName("--"); continue; } systemUserTaskDTO.setLevalName(userLevel.getName()); @@ -72,7 +210,7 @@ public class YxSystemUserTaskServiceImpl extends BaseServiceImpl queryAll(YxSystemUserTaskQueryCriteria criteria) { + public List queryAll(YxSystemUserTaskQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxSystemUserTask.class, criteria)); } @@ -81,7 +219,7 @@ public class YxSystemUserTaskServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxSystemUserTaskDto yxSystemUserTask : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("任务名称", yxSystemUserTask.getName()); map.put("配置原名", yxSystemUserTask.getRealName()); map.put("任务类型", yxSystemUserTask.getTaskType()); @@ -91,6 +229,7 @@ public class YxSystemUserTaskServiceImpl extends BaseServiceImpl + * 用户地址表 服务实现类 + *

+ * + * @author hupeng + * @since 2019-10-28 + */ +@Slf4j +@Service +@AllArgsConstructor +@Transactional(rollbackFor = Exception.class) +public class YxUserAddressServiceImpl extends BaseServiceImpl implements YxUserAddressService { + + private final YxUserAddressMapper yxUserAddressMapper; + private final IGenerator generator; + + /** + * 设置默认地址 + * @param uid uid + * @param addressId 地址id + */ + @Override + public void setDefault(Long uid,Long addressId){ + YxUserAddress address = new YxUserAddress(); + address.setIsDefault(ShopCommonEnum.DEFAULT_0.getValue()); + yxUserAddressMapper.update(address, + new LambdaQueryWrapper().eq(YxUserAddress::getUid,uid)); + + YxUserAddress userAddress = new YxUserAddress(); + userAddress.setIsDefault(ShopCommonEnum.DEFAULT_1.getValue()); + userAddress.setId(addressId); + yxUserAddressMapper.updateById(userAddress); + } + + + /** + * 添加或者修改地址 + * @param uid uid + * @param param AddressParam + */ + @Override + public Long addAndEdit(Long uid, AddressParam param){ + YxUserAddress userAddress = YxUserAddress.builder() + .city(param.getAddress().getCity()) + .cityId(param.getAddress().getCityId()) + .district(param.getAddress().getDistrict()) + .province(param.getAddress().getProvince()) + .detail(param.getDetail()) + .uid(uid) + .phone(param.getPhone()) + .postCode(param.getPost_code()) + .realName(param.getReal_name()) + .build(); + if("true".equals(param.getIs_default())){ + userAddress.setIsDefault(ShopCommonEnum.DEFAULT_1.getValue()); + //新增地址如果是默认,把之前的状态改掉 + YxUserAddress address = new YxUserAddress(); + address.setIsDefault(ShopCommonEnum.DEFAULT_0.getValue()); + baseMapper.update(address,new LambdaQueryWrapper().eq(YxUserAddress::getUid,uid)); + }else{ + userAddress.setIsDefault(ShopCommonEnum.DEFAULT_0.getValue()); + } + if(StrUtil.isBlank(param.getId())){ + this.save(userAddress); + }else{ + userAddress.setId(Long.valueOf(param.getId())); + this.updateById(userAddress); + } + + return userAddress.getId(); + } + + /** + * 地址详情 + * @param id 地址id + * @return YxUserAddressQueryVo + */ + @Override + public YxUserAddressQueryVo getDetail(Long id){ + return generator.convert(this.getById(id),YxUserAddressQueryVo.class); + } + + + /** + * 获取用户地址 + * @param uid uid + * @param page page + * @param limit limit + * @return List + */ + @Override + public List getList(Long uid,int page,int limit){ + Page pageModel = new Page<>(page, limit); + IPage pageList = this.lambdaQuery().eq(YxUserAddress::getUid,uid).page(pageModel); + return generator.convert(pageList.getRecords(),YxUserAddressQueryVo.class); + } + + /** + * 获取默认地址 + * @param uid uid + * @return YxUserAddress + */ + @Override + public YxUserAddress getUserDefaultAddress(Long uid) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxUserAddress::getIsDefault,1). + eq(YxUserAddress::getUid,uid) + .last("limit 1"); + return getOne(wrapper); + } + + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserBillServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserBillServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..a089e89a1793ae94cce2dd73302e3d5dcb53fe1b --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserBillServiceImpl.java @@ -0,0 +1,309 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service.impl; + +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.BillDetailEnum; +import co.yixiang.enums.BillEnum; +import co.yixiang.enums.BillInfoEnum; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.user.domain.YxUserBill; +import co.yixiang.modules.user.service.YxUserBillService; +import co.yixiang.modules.user.service.dto.BillOrderDto; +import co.yixiang.modules.user.service.dto.BillOrderRecordDto; +import co.yixiang.modules.user.service.dto.YxUserBillDto; +import co.yixiang.modules.user.service.dto.YxUserBillQueryCriteria; +import co.yixiang.modules.user.service.mapper.UserBillMapper; +import co.yixiang.modules.user.vo.BillVo; +import co.yixiang.modules.user.vo.YxUserBillQueryVo; +import co.yixiang.utils.FileUtil; +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.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageInfo; +import lombok.AllArgsConstructor; +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.math.BigDecimal; +import java.util.*; + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Service +@AllArgsConstructor +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxUserBillServiceImpl extends BaseServiceImpl implements YxUserBillService { + + private final IGenerator generator; + private final UserBillMapper yxUserBillMapper; + + + /** + * 增加支出流水 + * @param uid uid + * @param title 账单标题 + * @param category 明细种类 + * @param type 明细类型 + * @param number 明细数字 + * @param balance 剩余 + * @param mark 备注 + */ + @Override + public void expend(Long uid,String title,String category,String type,double number,double balance,String mark){ + YxUserBill userBill = YxUserBill.builder() + .uid(uid) + .title(title) + .category(category) + .type(type) + .number(BigDecimal.valueOf(number)) + .balance(BigDecimal.valueOf(balance)) + .mark(mark) + .pm(BillEnum.PM_0.getValue()) + .build(); + + yxUserBillMapper.insert(userBill); + } + + /** + * 增加收入/支入流水 + * @param uid uid + * @param title 账单标题 + * @param category 明细种类 + * @param type 明细类型 + * @param number 明细数字 + * @param balance 剩余 + * @param mark 备注 + * @param linkid 关联id + */ + @Override + public void income(Long uid,String title,String category,String type,double number, + double balance,String mark,String linkid){ + YxUserBill userBill = YxUserBill.builder() + .uid(uid) + .title(title) + .category(category) + .type(type) + .number(BigDecimal.valueOf(number)) + .balance(BigDecimal.valueOf(balance)) + .mark(mark) + .pm(BillEnum.PM_1.getValue()) + .linkId(linkid) + .build(); + + yxUserBillMapper.insert(userBill); + } + + /** + * 签到了多少次 + * + * @param uid + * @return + */ + @Override + public Long cumulativeAttendance(Long uid) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxUserBill::getUid,uid).eq(YxUserBill::getCategory,"integral") + .eq(YxUserBill::getType,"sign").eq(YxUserBill::getPm,1); + return yxUserBillMapper.selectCount(wrapper); + } + + /** + * 获取推广订单列表 + * @param uid uid + * @param page page + * @param limit limit + * @return Map + */ + @Override + public Map spreadOrder(Long uid, int page, int limit) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.lambda().in(YxUserBill::getUid, uid) + .eq(YxUserBill::getType, BillDetailEnum.TYPE_2.getValue()) + .eq(YxUserBill::getCategory, BillDetailEnum.CATEGORY_1.getValue()); + wrapper.orderByDesc("time").groupBy("time"); + Page pageModel = new Page<>(page, limit); + List list = yxUserBillMapper.getBillOrderList(wrapper, pageModel); + + Long count = yxUserBillMapper.selectCount(Wrappers.lambdaQuery() + .eq(YxUserBill::getUid, uid) + .eq(YxUserBill::getType, BillDetailEnum.TYPE_2.getValue()) + .eq(YxUserBill::getCategory, BillDetailEnum.CATEGORY_1.getValue())); + List listT = new ArrayList<>(); + for (String str : list) { + BillOrderDto billOrderDTO = new BillOrderDto(); + List orderRecordDTOS = yxUserBillMapper + .getBillOrderRList(str, uid); + billOrderDTO.setChild(orderRecordDTOS); + billOrderDTO.setCount(orderRecordDTOS.size()); + billOrderDTO.setTime(str); + + listT.add(billOrderDTO); + } + + Map map = new LinkedHashMap<>(2); + map.put("list", listT); + map.put("count", count); + + return map; + } + + /** + * 获取用户账单记录 + * @param page page + * @param limit limit + * @param uid uid + * @param type BillDetailEnum + * @return map + */ + @Override + public Map getUserBillList(int page, int limit, long uid, int type) { + QueryWrapper wrapper = new QueryWrapper<>(); + wrapper.lambda().eq(YxUserBill::getUid,uid).orderByDesc(YxUserBill::getCreateTime) + .orderByAsc(YxUserBill::getId); + wrapper.groupBy("time"); + switch (BillInfoEnum.toType(type)){ + case PAY_PRODUCT: + wrapper.lambda().eq(YxUserBill::getCategory,BillDetailEnum.CATEGORY_1.getValue()); + wrapper.lambda().eq(YxUserBill::getType,BillDetailEnum.TYPE_3.getValue()); + break; + case RECHAREGE: + wrapper.lambda().eq(YxUserBill::getCategory,BillDetailEnum.CATEGORY_1.getValue()); + wrapper.lambda().eq(YxUserBill::getType,BillDetailEnum.TYPE_1.getValue()); + break; + case BROKERAGE: + wrapper.lambda().eq(YxUserBill::getCategory,BillDetailEnum.CATEGORY_1.getValue()); + wrapper.lambda().eq(YxUserBill::getType,BillDetailEnum.TYPE_2.getValue()); + break; + case EXTRACT: + wrapper.lambda().eq(YxUserBill::getCategory,BillDetailEnum.CATEGORY_1.getValue()); + wrapper.lambda().eq(YxUserBill::getType,BillDetailEnum.TYPE_4.getValue()); + break; + case SIGN_INTEGRAL: + wrapper.lambda().eq(YxUserBill::getCategory,BillDetailEnum.CATEGORY_2.getValue()); + wrapper.lambda().eq(YxUserBill::getType,BillDetailEnum.TYPE_10.getValue()); + break; + default: + wrapper.lambda().eq(YxUserBill::getCategory,BillDetailEnum.CATEGORY_1.getValue()); + + } + Page pageModel = new Page<>(page, limit); + List billDTOList = yxUserBillMapper.getBillList(wrapper,pageModel); + for (BillVo billDTO : billDTOList) { + LambdaQueryWrapper wrapperT = new LambdaQueryWrapper<>(); + wrapperT.in(YxUserBill::getId,Arrays.asList(billDTO.getIds().split(","))); + wrapperT.orderByDesc(YxUserBill::getCreateTime); + billDTO.setList(yxUserBillMapper.getUserBillList(wrapperT)); + + } + Map map = new HashMap<>(); + map.put("list",billDTOList); + map.put("total",pageModel.getTotal()); + map.put("totalPage",pageModel.getPages()); + return map; + // return billDTOList; + } + + @Override + public double getBrokerage(int uid) { + return yxUserBillMapper.sumPrice(uid); + } + + /** + * 统计昨天的佣金 + * @param uid uid + * @return double + */ + @Override + public double yesterdayCommissionSum(Long uid) { + return yxUserBillMapper.sumYesterdayPrice(uid); + } + + /** + * 根据类别获取账单记录 + * @param uid uid + * @param category BillDetailEnum + * @param page page + * @param limit limit + * @return List + */ + @Override + public List userBillList(Long uid,String category,int page,int limit) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper + .eq(YxUserBill::getStatus, ShopCommonEnum.IS_STATUS_1.getValue()) + .eq(YxUserBill::getUid,uid) + .eq(YxUserBill::getCategory,category) + .orderByDesc(YxUserBill::getId); + Page pageModel = new Page<>(page, limit); + IPage pageList = yxUserBillMapper.selectPage(pageModel,wrapper); + return generator.convert(pageList.getRecords(),YxUserBillQueryVo.class); + } + + + //============================================// + + @Override + //@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){ + String date =null; + String date1 = null; + if(StringUtils.isNotEmpty(criteria.getStartTime())){ + date = criteria.getStartTime()+ " 00:00:00"; + if(StringUtils.isNotEmpty(criteria.getEndTime())){ + date1 =criteria.getEndTime()+ " 23:59:59"; + } + } + + return baseMapper.findAllByQueryCriteria(criteria.getCategory(),criteria.getType(),criteria.getNickname(),criteria.getPm(),date,date1,criteria.getTitle()); + } + + + @Override + 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("0 = 带确定 1 = 有效 -1 = 无效", yxUserBill.getStatus()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserLevelServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserLevelServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..76f377bbaba9a8df25181815bc355f9b6ab4b8dd --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserLevelServiceImpl.java @@ -0,0 +1,176 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service.impl; + +import cn.hutool.core.util.ObjectUtil; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.constant.ShopConstants; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.shop.domain.YxSystemUserLevel; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.domain.YxUserLevel; +import co.yixiang.modules.user.service.YxSystemUserLevelService; +import co.yixiang.modules.user.service.YxSystemUserTaskService; +import co.yixiang.modules.user.service.YxUserLevelService; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.modules.user.service.mapper.SystemUserTaskMapper; +import co.yixiang.modules.user.service.mapper.YxUserLevelMapper; +import co.yixiang.utils.OrderUtil; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + + +/** + *

+ * 用户等级记录表 服务实现类 + *

+ * + * @author hupeng + * @since 2019-12-06 + */ +@Slf4j +@Service +@Transactional(rollbackFor = Exception.class) +public class YxUserLevelServiceImpl extends BaseServiceImpl implements YxUserLevelService { + + @Autowired + private YxUserLevelMapper yxUserLevelMapper; + @Autowired + private SystemUserTaskMapper yxSystemUserTaskMapper; + + @Autowired + private YxUserService userService; + @Autowired + private YxSystemUserLevelService systemUserLevelService; + @Autowired + private YxSystemUserTaskService systemUserTaskService; + + + /** + * 检查是否能成为会员 + * @param uid 用户id + */ + @Override + public boolean setLevelComplete(Long uid) { + //获取当前用户级别 + int levelId = 0; + YxUserLevel yxUserLevel = this.getUserLevel(uid,null); + if(yxUserLevel != null ){ + levelId = yxUserLevel.getLevelId(); + } + int nextLevelId = systemUserLevelService.getNextLevelId(levelId); + if(nextLevelId == 0) { + return false; + } + + Long finishCount = systemUserTaskService.getTaskComplete(nextLevelId,uid); + + //目前任务固定,如果增加任务需要自己增加逻辑,目前每个会员任务固定3 + if(finishCount == ShopConstants.TASK_FINISH_COUNT){ + this.setUserLevel(uid,nextLevelId); + return true; + } + return false; + } + + + + /** + * 获取当前用户会员等级返回当前用户等级 + * @param uid uid + * @param grade 用户级别 + * @return YxUserLevel + */ + @Override + public YxUserLevel getUserLevel(Long uid, Integer grade) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper + .eq(YxUserLevel::getStatus, ShopCommonEnum.IS_STATUS_1.getValue()) + .eq(YxUserLevel::getUid,uid) + .orderByDesc(YxUserLevel::getGrade); + if(grade != null) { + wrapper.lt(YxUserLevel::getGrade,grade); + } + YxUserLevel userLevel = this.getOne(wrapper,false); + if(ObjectUtil.isNull(userLevel)) { + return null; + } + if(ShopCommonEnum.IS_FOREVER_1.getValue().equals(userLevel.getIsForever())) { + return userLevel; + } + int nowTime = OrderUtil.getSecondTimestampTwo(); + if(nowTime > userLevel.getValidTime()){ + if(ShopCommonEnum.IS_STATUS_1.getValue().equals(userLevel.getStatus())){ + userLevel.setStatus(ShopCommonEnum.IS_STATUS_0.getValue()); + yxUserLevelMapper.updateById(userLevel); + } + return this.getUserLevel(uid,userLevel.getGrade()); + } + return userLevel; + } + + + /** + * 设置会员等级 + * @param uid 用户id + * @param levelId 等级id + */ + private void setUserLevel(Long uid, int levelId){ + YxSystemUserLevel systemUserLevelQueryVo = systemUserLevelService + .getById(levelId); + if(ObjectUtil.isNull(systemUserLevelQueryVo)) { + return; + } + + int validTime = systemUserLevelQueryVo.getValidDate() * 86400; + + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxUserLevel::getStatus,ShopCommonEnum.IS_STATUS_1.getValue()) + .eq(YxUserLevel::getUid,uid) + .eq(YxUserLevel::getLevelId,levelId) + .last("limit 1"); + + YxUserLevel yxUserLevel = new YxUserLevel(); + yxUserLevel.setIsForever(systemUserLevelQueryVo.getIsForever()); + yxUserLevel.setStatus(ShopCommonEnum.IS_STATUS_1.getValue()); + yxUserLevel.setGrade(systemUserLevelQueryVo.getGrade()); + yxUserLevel.setUid(uid); + yxUserLevel.setLevelId(levelId); + yxUserLevel.setDiscount(systemUserLevelQueryVo.getDiscount().intValue()); + + if(ShopCommonEnum.IS_FOREVER_1.getValue().equals(systemUserLevelQueryVo.getIsForever())){ + yxUserLevel.setValidTime(0); //永久 + }else{ + yxUserLevel.setValidTime(validTime+OrderUtil.getSecondTimestampTwo()); + } + + yxUserLevel.setMark("恭喜你成为了"+systemUserLevelQueryVo.getName()); + yxUserLevelMapper.insert(yxUserLevel); + + //更新用户等级 + YxUser yxUser = new YxUser(); + yxUser.setLevel(levelId); + yxUser.setUid(uid); + userService.updateById(yxUser); + + } + + + + // @Override +// public UserLevelInfoDto getUserLevelInfo(int id) { +// return yxUserLevelMapper.getUserLevelInfo(id); +// } + + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserRechargeServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserRechargeServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..c9bdaf919176f7c43b27116f16f9ec8d5fd1b846 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserRechargeServiceImpl.java @@ -0,0 +1,190 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service.impl; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.BillDetailEnum; +import co.yixiang.enums.OrderInfoEnum; +import co.yixiang.enums.PayTypeEnum; +import co.yixiang.event.TemplateBean; +import co.yixiang.event.TemplateEvent; +import co.yixiang.event.TemplateListenEnum; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.domain.YxUserRecharge; +import co.yixiang.modules.user.service.YxUserBillService; +import co.yixiang.modules.user.service.YxUserRechargeService; +import co.yixiang.modules.user.service.dto.YxUserRechargeDto; +import co.yixiang.modules.user.service.dto.YxUserRechargeQueryCriteria; +import co.yixiang.modules.user.service.mapper.UserMapper; +import co.yixiang.modules.user.service.mapper.UserRechargeMapper; +import co.yixiang.utils.FileUtil; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationEventPublisher; +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.math.BigDecimal; +import java.util.ArrayList; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + + + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@SuppressWarnings("unchecked") +@Service +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxUserRechargeServiceImpl extends BaseServiceImpl implements YxUserRechargeService { + @Autowired + private IGenerator generator; + + @Autowired + private UserRechargeMapper yxUserRechargeMapper; + @Autowired + private YxUserBillService billService; + + @Autowired + private UserMapper yxUserMapper; + + @Autowired + private ApplicationEventPublisher publisher; + + + @Override + public void updateRecharge(YxUserRecharge userRecharge) { + YxUser user = yxUserMapper.selectById(userRecharge.getUid()); + + //修改状态 + userRecharge.setPaid(OrderInfoEnum.PAY_STATUS_1.getValue()); + userRecharge.setPayTime(new Date()); + yxUserRechargeMapper.updateById(userRecharge); + + //最终充值金额 + BigDecimal newPrice = NumberUtil.add(userRecharge.getPrice(),user.getNowMoney()); + newPrice = newPrice.add(userRecharge.getGivePrice()); + + + //增加流水 + billService.income(userRecharge.getUid(),"用户余额充值",BillDetailEnum.CATEGORY_1.getValue(), + BillDetailEnum.TYPE_1.getValue(),userRecharge.getPrice().doubleValue(),newPrice.doubleValue(), + "成功充值余额"+userRecharge.getPrice(),userRecharge.getId().toString()); + + + //update 余额 + user.setNowMoney(newPrice); + yxUserMapper.updateById(user); + + //模板消息发布事件 + TemplateBean templateBean = TemplateBean.builder() + .time(DateUtil.formatTime(userRecharge.getPayTime())) + .price(userRecharge.getPrice().toString()) + .orderId(userRecharge.getOrderId()) + .uid(userRecharge.getUid()) + .templateType(TemplateListenEnum.TYPE_4.getValue()) + .build(); + publisher.publishEvent(new TemplateEvent(this, templateBean)); + + } + + @Override + public YxUserRecharge getInfoByOrderId(String orderId) { + YxUserRecharge userRecharge = new YxUserRecharge(); + userRecharge.setOrderId(orderId); + + return yxUserRechargeMapper.selectOne(Wrappers.query(userRecharge)); + } + + /** + * 添加充值记录 + * @param user 用户 + * @param price 充值金额 + * @param paidPrice 赠送金额 + */ + @Override + public String addRecharge(YxUser user,String price,String paidPrice) { + if(StrUtil.isBlank(price) || StrUtil.isBlank(paidPrice)){ + throw new YshopException("参数非法"); + } + YxUserRecharge yxUserRecharge = new YxUserRecharge(); + + String orderSn = IdUtil.getSnowflake(0,0).nextIdStr(); + + yxUserRecharge.setNickname(user.getNickname()); + yxUserRecharge.setOrderId(orderSn); + yxUserRecharge.setUid(user.getUid()); + yxUserRecharge.setPrice(new BigDecimal(price)); + yxUserRecharge.setGivePrice(new BigDecimal(paidPrice)); + yxUserRecharge.setRechargeType(PayTypeEnum.WEIXIN.getValue()); + yxUserRecharge.setPaid(OrderInfoEnum.PAY_STATUS_0.getValue()); + + yxUserRechargeMapper.insert(yxUserRecharge); + + return orderSn; + + } + + + + //==========================================================================// + + @Override + //@Cacheable + 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 baseMapper.selectList(QueryHelpPlus.getPredicate(YxUserRecharge.class, criteria)); + } + + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxUserRechargeDto yxUserRecharge : all) { + Map map = new LinkedHashMap<>(); + map.put("充值用户UID", yxUserRecharge.getUid()); + map.put("订单号", yxUserRecharge.getOrderId()); + map.put("充值金额", yxUserRecharge.getPrice()); + map.put("充值类型", yxUserRecharge.getRechargeType()); + map.put("是否充值", yxUserRecharge.getPaid()); + map.put("充值支付时间", yxUserRecharge.getPayTime()); + map.put("退款金额", yxUserRecharge.getRefundPrice()); + map.put("昵称", yxUserRecharge.getNickname()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..315dd70d41ab3d5bae72044e594d412f2aa2d188 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserServiceImpl.java @@ -0,0 +1,693 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service.impl; + +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.ApiCode; +import co.yixiang.api.UnAuthenticatedException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.constant.SystemConfigConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.BillDetailEnum; +import co.yixiang.enums.Brokerage; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.activity.service.YxStoreCouponUserService; +import co.yixiang.modules.cart.vo.YxStoreCartQueryVo; +import co.yixiang.modules.order.domain.YxStoreOrderCartInfo; +import co.yixiang.modules.order.service.YxStoreOrderCartInfoService; +import co.yixiang.modules.order.service.YxStoreOrderService; +import co.yixiang.modules.order.service.mapper.StoreOrderMapper; +import co.yixiang.modules.order.vo.YxStoreOrderQueryVo; +import co.yixiang.modules.product.vo.YxStoreProductQueryVo; +import co.yixiang.modules.shop.domain.YxSystemUserLevel; +import co.yixiang.modules.shop.service.YxSystemConfigService; +import co.yixiang.modules.shop.service.YxSystemStoreStaffService; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.domain.YxUserLevel; +import co.yixiang.modules.user.service.YxSystemUserLevelService; +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.dto.PromUserDto; +import co.yixiang.modules.user.service.dto.UserMoneyDto; +import co.yixiang.modules.user.service.dto.YxUserDto; +import co.yixiang.modules.user.service.dto.YxUserQueryCriteria; +import co.yixiang.modules.user.service.mapper.UserBillMapper; +import co.yixiang.modules.user.service.mapper.UserMapper; +import co.yixiang.modules.user.vo.YxUserQueryVo; +import co.yixiang.utils.FileUtil; +import com.alibaba.fastjson.JSON; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageInfo; +import org.springframework.beans.factory.annotation.Autowired; +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.math.BigDecimal; +import java.util.ArrayList; +import java.util.Arrays; +import java.util.Date; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Service +@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) +public class YxUserServiceImpl extends BaseServiceImpl implements YxUserService { + + @Autowired + private IGenerator generator; + + @Autowired + private UserMapper yxUserMapper; + @Autowired + private StoreOrderMapper storeOrderMapper; + @Autowired + private UserBillMapper userBillMapper; + + + @Autowired + private YxSystemUserLevelService systemUserLevelService; + @Autowired + private YxUserLevelService userLevelService; + @Autowired + private YxStoreOrderService orderService; + @Autowired + private YxSystemConfigService systemConfigService; + @Autowired + private YxUserBillService billService; + @Autowired + private YxStoreCouponUserService storeCouponUserService; + @Autowired + private YxSystemStoreStaffService systemStoreStaffService; + @Autowired + private YxStoreOrderCartInfoService storeOrderCartInfoService; + + + /** + * 返回用户累计充值金额与消费金额 + * @param uid uid + * @return Double[] + */ + @Override + public Double[] getUserMoney(Long uid){ + double sumPrice = storeOrderMapper.sumPrice(uid); + double sumRechargePrice = userBillMapper.sumRechargePrice(uid); + return new Double[]{sumPrice,sumRechargePrice}; + } + + + /** + * 增加购买次数 + * @param uid uid + */ + @Override + public void incPayCount(Long uid) { + yxUserMapper.incPayCount(uid); + } + + /** + * 减去用户余额 + * @param uid uid + * @param payPrice 金额 + */ + @Override + public void decPrice(Long uid, BigDecimal payPrice) { + yxUserMapper.decPrice(payPrice,uid); + } + + /** + * 减去用户积分 + * @param uid 用户id + * @param integral 积分 + */ + @Override + public void decIntegral(Long uid, double integral) { + yxUserMapper.decIntegral(integral,uid); + } + + + /** + * 获取我的分销下人员列表 + * @param uid uid + * @param page page + * @param limit limit + * @param grade ShopCommonEnum.GRADE_0 + * @param keyword 关键字搜索 + * @param sort 排序 + * @return list + */ + @Override + public List getUserSpreadGrade(Long uid, int page, int limit, Integer grade, + String keyword, String sort) { + List userList = yxUserMapper.selectList(Wrappers.lambdaQuery() + .eq(YxUser::getSpreadUid, uid)); + List userIds = userList.stream() + .map(YxUser::getUid) + .collect(Collectors.toList()); + + List list = new ArrayList<>(); + if (userIds.isEmpty()) { + return list; + } + + if (StrUtil.isBlank(sort)) { + sort = "u.uid desc"; + } + + Page pageModel = new Page<>(page, limit); + if (ShopCommonEnum.GRADE_0.getValue().equals(grade)) {//-级 + list = yxUserMapper.getUserSpreadCountList(pageModel, userIds, + keyword, sort); + } else {//二级 + List userListT = yxUserMapper.selectList(Wrappers.lambdaQuery() + .in(YxUser::getSpreadUid, userIds)); + List userIdsT = userListT.stream() + .map(YxUser::getUid) + .collect(Collectors.toList()); + if (userIdsT.isEmpty()) { + return list; + } + list = yxUserMapper.getUserSpreadCountList(pageModel, userIdsT, + keyword, sort); + + } + return list; + } + + /** + * 统计分销人员 + * + * @param uid uid + * @return map + */ + @Override + public Map getSpreadCount(Long uid) { + Long countOne = yxUserMapper.selectCount(Wrappers.lambdaQuery() + .eq(YxUser::getSpreadUid,uid)); + + Long countTwo = 0L; + List userList = yxUserMapper.selectList((Wrappers.lambdaQuery() + .eq(YxUser::getSpreadUid,uid))); + List userIds = userList.stream().map(YxUser::getUid) + .collect(Collectors.toList()); + if(!userIds.isEmpty()){ + countTwo = yxUserMapper.selectCount(Wrappers.lambdaQuery() + .in(YxUser::getSpreadUid,userIds)); + } + + Map map = new LinkedHashMap<>(2); + map.put("first",countOne); //一级 + map.put("second",countTwo);//二级 + + return map; + } + + /** + * 一级返佣 + * @param order 订单 + */ + @Override + public void backOrderBrokerage(YxStoreOrderQueryVo order) { + //如果分销没开启直接返回 + String open = systemConfigService.getData(SystemConfigConstants.STORE_BROKERAGE_OPEN); + if(StrUtil.isBlank(open) || ShopCommonEnum.ENABLE_2.getValue().toString().equals(open)) { + return; + } + + + //获取购买商品的用户 + YxUser userInfo = this.getById(order.getUid()); + System.out.println("userInfo:"+userInfo); + //当前用户不存在 没有上级 直接返回 + if(ObjectUtil.isNull(userInfo) || userInfo.getSpreadUid() == 0) { + return; + } + + + YxUser preUser = this.getById(userInfo.getSpreadUid()); + + //一级返佣金额 + BigDecimal brokeragePrice = this.computeProductBrokerage(order, Brokerage.LEVEL_1); + + //返佣金额小于等于0 直接返回不返佣金 + + if(brokeragePrice.compareTo(BigDecimal.ZERO) <= 0) { + return; + } + + //计算上级推广员返佣之后的金额 + double balance = NumberUtil.add(preUser.getBrokeragePrice(),brokeragePrice).doubleValue(); + String mark = userInfo.getNickname()+"成功消费"+order.getPayPrice()+"元,奖励推广佣金"+ + brokeragePrice; + //增加流水 + billService.income(userInfo.getSpreadUid(),"获得推广佣金",BillDetailEnum.CATEGORY_1.getValue(), + BillDetailEnum.TYPE_2.getValue(),brokeragePrice.doubleValue(),balance, mark,order.getId().toString()); + + //添加用户余额 + yxUserMapper.incBrokeragePrice(brokeragePrice, userInfo.getSpreadUid()); + + //一级返佣成功 跳转二级返佣 + this.backOrderBrokerageTwo(order); + + } + + + + + /** + * 更新用户余额 + * @param uid y用户id + * @param price 金额 + */ + @Override + public void incMoney(Long uid, BigDecimal price) { + if(price!=null&&price.doubleValue()>0){ + yxUserMapper.incMoney(uid,price); + } + } + + /** + * 增加积分 + * @param uid uid + * @param integral 积分 + */ + @Override + public void incIntegral(Long uid, double integral) { + yxUserMapper.incIntegral(integral,uid); + } + + + /** + * 获取用户信息 + * @param uid uid + * @return YxUserQueryVo + */ + @Override + public YxUserQueryVo getYxUserById(Long uid) { + return generator.convert(this.getById(uid),YxUserQueryVo.class); + } + + + /** + * 转换用户信息 + * @param yxUser user + * @return YxUserQueryVo + */ + @Override + public YxUserQueryVo handleUser(YxUser yxUser) { + return generator.convert(yxUser,YxUserQueryVo.class); + } + + /** + * 获取用户个人详细信息 + * @param yxUser yxUser + * @return YxUserQueryVo + */ + @Override + public YxUserQueryVo getNewYxUserById(YxUser yxUser) { + YxUserQueryVo userQueryVo = generator.convert(yxUser,YxUserQueryVo.class); + if(userQueryVo == null){ + throw new UnAuthenticatedException(ApiCode.UNAUTHORIZED); + } + userQueryVo.setOrderStatusNum(orderService.orderData(yxUser.getUid())); + userQueryVo.setCouponCount(storeCouponUserService.getUserValidCouponCount(yxUser.getUid())); + //判断分销类型,指定分销废弃掉,只有一种分销方式 + /** + String statu = systemConfigService.getData(SystemConfigConstants.STORE_BROKERAGE_STATU); + if(StrUtil.isNotEmpty(statu)){ + userQueryVo.setStatu(Integer.valueOf(statu)); + }else{ + userQueryVo.setStatu(0); + } + **/ + + //获取核销权限 + userQueryVo.setCheckStatus(systemStoreStaffService.checkStatus(yxUser.getUid(),null)); + + this.setUserSpreadCount(yxUser); + return userQueryVo; + } + + + + /** + * 返回会员价 + * @param price 原价 + * @param uid 用户id + * @return vip 价格 + */ + @Override + public double setLevelPrice(double price, long uid) { + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.eq(YxUserLevel::getStatus, ShopCommonEnum.IS_STATUS_1.getValue()) + .eq(YxUserLevel::getUid,uid) + .orderByDesc(YxUserLevel::getGrade) + .last("limit 1"); + YxUserLevel userLevel = userLevelService.getOne(wrapper); + YxSystemUserLevel systemUserLevel = new YxSystemUserLevel(); + if(ObjectUtil.isNotNull(userLevel)) { + systemUserLevel= systemUserLevelService.getById(userLevel.getLevelId()); + } + int discount = 100; + if(ObjectUtil.isNotNull(userLevel)) { + discount = systemUserLevel.getDiscount().intValue(); + } + return NumberUtil.mul(NumberUtil.div(discount,100),price); + } + + + /** + * 设置推广关系 + * @param spread 上级人 + * @param uid 本人 + */ + @Override + public void setSpread(String spread, long uid) { + if(StrUtil.isBlank(spread) || !NumberUtil.isNumber(spread)) { + return; + } + + //如果分销没开启直接返回 + String open = systemConfigService.getData(SystemConfigConstants.STORE_BROKERAGE_OPEN); + if(StrUtil.isBlank(open) || ShopCommonEnum.ENABLE_2.getValue().toString().equals(open)) { + return; + } + //当前用户信息 + YxUser userInfo = this.getById(uid); + if(ObjectUtil.isNull(userInfo)) { + return; + } + + //当前用户有上级直接返回 + if(userInfo.getSpreadUid() != null && userInfo.getSpreadUid() > 0) { + return; + } + //没有推广编号直接返回 + long spreadInt = Long.valueOf(spread); + if(spreadInt == 0) { + return; + } + if(spreadInt == uid) { + return; + } + + //不能互相成为上下级 + YxUser userInfoT = this.getById(spreadInt); + if(ObjectUtil.isNull(userInfoT)) { + return; + } + + if(userInfoT.getSpreadUid() == uid) { + return; + } + + YxUser yxUser = YxUser.builder() + .spreadUid(spreadInt) + .spreadTime(new Date()) + .uid(uid) + .build(); + + yxUserMapper.updateById(yxUser); + + } + + + /** + * 二级返佣 + * @param order 订单 + */ + private void backOrderBrokerageTwo(YxStoreOrderQueryVo order) { + + YxUser userInfo = this.getById(order.getUid()); + + //获取上推广人 + YxUser userInfoTwo = this.getById(userInfo.getSpreadUid()); + + //上推广人不存在 或者 上推广人没有上级 直接返回 + if(ObjectUtil.isNull(userInfoTwo) || userInfoTwo.getSpreadUid() == 0) { + return; + } + + + //指定分销 判断 上上级是否时推广员 如果不是推广员直接返回 + YxUser preUser = this.getById(userInfoTwo.getSpreadUid()); + + + //二级返佣金额 + BigDecimal brokeragePrice = this.computeProductBrokerage(order,Brokerage.LEVEL_2); + + //返佣金额小于等于0 直接返回不返佣金 + if(brokeragePrice.compareTo(BigDecimal.ZERO) <= 0) { + return; + } + + //获取上上级推广员信息 + double balance = NumberUtil.add(preUser.getBrokeragePrice(),brokeragePrice).doubleValue(); + String mark = "二级推广人"+userInfo.getNickname()+"成功消费"+order.getPayPrice()+"元,奖励推广佣金"+ + brokeragePrice; + + //增加流水 + billService.income(userInfoTwo.getSpreadUid(),"获得推广佣金",BillDetailEnum.CATEGORY_1.getValue(), + BillDetailEnum.TYPE_2.getValue(),brokeragePrice.doubleValue(),balance, mark,order.getId().toString()); + //添加用户余额 + yxUserMapper.incBrokeragePrice(brokeragePrice, + userInfoTwo.getSpreadUid()); + } + + + /** + * 计算获取返佣金额 + * @param order 订单信息 + * @param level 分销级别 + * @return double + */ + private BigDecimal computeProductBrokerage(YxStoreOrderQueryVo order , Brokerage level){ + List storeOrderCartInfoList = storeOrderCartInfoService + .list(Wrappers.lambdaQuery() + .in(YxStoreOrderCartInfo::getCartId, Arrays.asList(order.getCartId().split(",")))); + BigDecimal oneBrokerage = BigDecimal.ZERO;//一级返佣金额 + BigDecimal twoBrokerage = BigDecimal.ZERO;//二级返佣金额 + + List cartInfos = storeOrderCartInfoList.stream() + .map(YxStoreOrderCartInfo::getCartInfo) + .collect(Collectors.toList()); + + for (String cartInfo : cartInfos){ + YxStoreCartQueryVo cart = JSON.parseObject(cartInfo,YxStoreCartQueryVo.class); + + YxStoreProductQueryVo storeProductVO = cart.getProductInfo(); + //产品是否单独分销 + if(ShopCommonEnum.IS_SUB_1.getValue().equals(storeProductVO.getIsSub())){ + oneBrokerage = NumberUtil.round(NumberUtil.add(oneBrokerage, + NumberUtil.mul(cart.getCartNum(),storeProductVO.getAttrInfo().getBrokerage())) + ,2); + + twoBrokerage = NumberUtil.round(NumberUtil.add(twoBrokerage, + NumberUtil.mul(cart.getCartNum(),storeProductVO.getAttrInfo().getBrokerageTwo())) + ,2); + } + + } + + //获取后台一级返佣比例 + String storeBrokerageRatioStr = systemConfigService.getData(SystemConfigConstants.STORE_BROKERAGE_RATIO); + String storeBrokerageTwoStr = systemConfigService.getData(SystemConfigConstants.STORE_BROKERAGE_TWO); + + + //一级返佣比例未设置直接返回 + if(StrUtil.isBlank(storeBrokerageRatioStr) + || !NumberUtil.isNumber(storeBrokerageRatioStr)){ + return oneBrokerage; + } + //二级返佣比例未设置直接返回 + if(StrUtil.isBlank(storeBrokerageTwoStr) + || !NumberUtil.isNumber(storeBrokerageTwoStr)){ + return twoBrokerage; + } + + + switch (level){ + case LEVEL_1: + //根据订单获取一级返佣比例 + BigDecimal storeBrokerageRatio = NumberUtil.round(NumberUtil.div(storeBrokerageRatioStr,"100"),2); + BigDecimal brokeragePrice = NumberUtil + .round(NumberUtil.mul(order.getTotalPrice(),storeBrokerageRatio),2); + //固定返佣 + 比例返佣 = 总返佣金额 + return NumberUtil.add(oneBrokerage,brokeragePrice); + case LEVEL_2: + //根据订单获取一级返佣比例 + BigDecimal storeBrokerageTwo = NumberUtil.round(NumberUtil.div(storeBrokerageTwoStr,"100"),2); + BigDecimal storeBrokerageTwoPrice = NumberUtil + .round(NumberUtil.mul(order.getTotalPrice(),storeBrokerageTwo),2); + //固定返佣 + 比例返佣 = 总返佣金额 + return NumberUtil.add(twoBrokerage,storeBrokerageTwoPrice); + default: + } + + + return BigDecimal.ZERO; + + } + + + + /** + * 更新下级人数 + * @param yxUser user + */ + private void setUserSpreadCount(YxUser yxUser) { + Long count = yxUserMapper.selectCount(Wrappers.lambdaQuery() + .eq(YxUser::getSpreadUid,yxUser.getUid())); + yxUser.setSpreadCount(count); + yxUserMapper.updateById(yxUser); + } + + + //===========后面管理后台部分=====================// + + + /** + * 查看下级 + * @param uid uid + * @param grade 等级 + * @return list + */ + @Override + public List querySpread(Long uid, Integer grade) { + return this.getUserSpreadGrade(uid,1, 999,grade,"",""); + } + + + @Override + 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("用户密码(跟pwd)", yxUser.getPassword()); + 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.getCreateTime()); + map.put("添加ip", yxUser.getAddIp()); + 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.getAddres()); + map.put("管理员编号 ", yxUser.getAdminid()); + map.put("用户登陆类型,h5,wechat,routine", yxUser.getLoginType()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + /** + * 更新用户状态 + * @param uid uid + * @param status ShopCommonEnum + */ + @Override + public void onStatus(Long uid, Integer status) { + if(ShopCommonEnum.IS_STATUS_1.getValue().equals(status)){ + status = ShopCommonEnum.IS_STATUS_0.getValue(); + }else{ + status = ShopCommonEnum.IS_STATUS_1.getValue(); + } + yxUserMapper.updateOnstatus(status,uid); + } + + /** + * 修改余额 + * @param param UserMoneyDto + */ + @Override + public void updateMoney(UserMoneyDto param) { + YxUser yxUser = this.getById(param.getUid()); + double newMoney = 0d; + String mark = ""; + if(param.getPtype() == 1){ + mark = "系统增加了"+param.getMoney()+"余额"; + newMoney = NumberUtil.add(yxUser.getNowMoney(),param.getMoney()).doubleValue(); + billService.income(yxUser.getUid(),"系统增加余额", BillDetailEnum.CATEGORY_1.getValue(), + BillDetailEnum.TYPE_6.getValue(),param.getMoney(),newMoney, mark,""); + }else{ + mark = "系统扣除了"+param.getMoney()+"余额"; + newMoney = NumberUtil.sub(yxUser.getNowMoney(),param.getMoney()).doubleValue(); + if(newMoney < 0) { + newMoney = 0d; + } + billService.expend(yxUser.getUid(), "系统减少余额", + BillDetailEnum.CATEGORY_1.getValue(), + BillDetailEnum.TYPE_7.getValue(), + param.getMoney(), newMoney, mark); + } +// YxUser user = new YxUser(); +// user.setUid(yxUser.getUid()); + yxUser.setNowMoney(BigDecimal.valueOf(newMoney)); + saveOrUpdate(yxUser); + } + + /** + * 增加佣金 + * @param price 金额 + * @param uid 用户id + */ + @Override + public void incBrokeragePrice(BigDecimal price, Long uid) { + yxUserMapper.incBrokeragePrice(price,uid); + } +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserSignServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserSignServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..9937543583b024709184c9a58e024672ee90bfe6 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserSignServiceImpl.java @@ -0,0 +1,224 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service.impl; + +import cn.hutool.core.date.DateUtil; +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; +import co.yixiang.api.YshopException; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.BillDetailEnum; +import co.yixiang.modules.shop.service.YxSystemGroupDataService; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.domain.YxUserBill; +import co.yixiang.modules.user.domain.YxUserSign; +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.YxUserSignService; +import co.yixiang.modules.user.service.mapper.UserBillMapper; +import co.yixiang.modules.user.service.mapper.YxUserSignMapper; +import co.yixiang.modules.user.vo.SignVo; +import co.yixiang.modules.user.vo.YxUserQueryVo; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + +import java.util.Date; +import java.util.List; +import java.util.Map; + + +/** + *

+ * 签到记录表 服务实现类 + *

+ * + * @author hupeng + * @since 2019-12-05 + */ +@Slf4j +@Service +@Transactional(rollbackFor = Exception.class) +public class YxUserSignServiceImpl extends BaseServiceImpl implements YxUserSignService { + + @Autowired + private YxUserSignMapper yxUserSignMapper; + @Autowired + private UserBillMapper userBillMapper; + + @Autowired + private IGenerator generator; + + @Autowired + private YxSystemGroupDataService systemGroupDataService; + @Autowired + private YxUserService yxUserService; + @Autowired + private YxUserBillService billService; + @Autowired + private YxUserLevelService userLevelService; + + + /** + * + * @param yxUser 用户 + * @return 签到积分 + */ + @Override + public int sign(YxUser yxUser) { + List list = systemGroupDataService.getDatas(ShopConstants.YSHOP_SIGN_DAY_NUM); + if(ObjectUtil.isNull(list) || list.isEmpty()) { + throw new YshopException("请先配置签到天数"); + } + + boolean isDaySign = this.getToDayIsSign(yxUser.getUid()); + if(isDaySign) { + throw new YshopException("已签到"); + } + //积分 + int signNumber = 0; + //签到次数 + int userSignNum = yxUser.getSignNum(); + if(getYesterDayIsSign(yxUser.getUid())){ + if(yxUser.getSignNum() > (list.size() - 1)){ + userSignNum = 0; + } + }else{ + userSignNum = 0; + } + int index = 0; + for (Map map : list) { + if(index == userSignNum){ + signNumber = Integer.parseInt(map.get("sign_num").toString()); + break; + } + index++; + } + + userSignNum += 1; + + YxUserSign userSign = new YxUserSign(); + userSign.setUid(yxUser.getUid()); + String title = "签到奖励"; + if(userSignNum == list.size()){ + title = "连续签到奖励"; + } + userSign.setTitle(title); + userSign.setNumber(signNumber); + userSign.setBalance(yxUser.getIntegral().intValue()); + yxUserSignMapper.insert(userSign); + + //用户积分增加 + YxUser user = YxUser.builder() + .integral(NumberUtil.add(yxUser.getIntegral(),signNumber)) + .uid(yxUser.getUid()) + .signNum(userSignNum) + .build(); + boolean res = yxUserService.updateById(user); + if(!res) { + throw new YshopException("签到失败"); + } + + //插入流水 + billService.income(yxUser.getUid(),title, BillDetailEnum.CATEGORY_2.getValue(), + BillDetailEnum.TYPE_10.getValue(),signNumber,yxUser.getIntegral().doubleValue(), + "",""); + + //检查是否符合会员升级条件 + userLevelService.setLevelComplete(yxUser.getUid()); + return signNumber; + } + + /** + * 分页获取用户签到数据 + * @param uid 用户id + * @param page page + * @param limit limit + * @return list + */ + @Override + public List getSignList(Long uid, int page, int limit) { + Page pageModel = new Page<>(page, limit); + return userBillMapper.getSignList(uid,pageModel); + } + + + /** + * 获取签到用户信息 + * @param yxUser yxUser + * @return YxUserQueryVo + */ + @Override + public YxUserQueryVo userSignInfo(YxUser yxUser) { + YxUserQueryVo userQueryVo = generator.convert(yxUser,YxUserQueryVo.class); + Long uid = yxUser.getUid(); + Long sumSignDay = this.getSignSumDay(uid); + boolean isDaySign = this.getToDayIsSign(uid); + boolean isYesterDaySign = this.getYesterDayIsSign(uid); + userQueryVo.setSumSignDay(sumSignDay); + userQueryVo.setIsDaySign(isDaySign); + userQueryVo.setIsYesterDaySign(isYesterDaySign); + if(!isDaySign && !isYesterDaySign) { + userQueryVo.setSignNum(0); + } + return userQueryVo; + } + + /** + * 获取用户今天是否签到 + * @param uid uid + * @return boolean true=YES false=NO + */ + private boolean getToDayIsSign(Long uid) { + Date today = DateUtil.beginOfDay(new Date()); + Long count = this.lambdaQuery().eq(YxUserSign::getUid,uid) + .ge(YxUserSign::getCreateTime,today) + .count(); + if(count > 0) { + return true; + } + return false; + } + + /** + * 获取用户昨天是否签到 + * @param uid uid + * @return boolean + */ + private boolean getYesterDayIsSign(Long uid) { + Date today = DateUtil.beginOfDay(new Date()); + Date yesterday = DateUtil.beginOfDay(DateUtil.yesterday()); + + Long count = this.lambdaQuery().eq(YxUserSign::getUid,uid) + .lt(YxUserSign::getCreateTime,today) + .ge(YxUserSign::getCreateTime,yesterday) + .count(); + if(count > 0) { + return true; + } + return false; + } + + /** + * 获取用户累计签到次数 + * @param uid 用户id + * @return int + */ + private Long getSignSumDay(Long uid) { + return this.lambdaQuery().eq(YxUserSign::getUid,uid).count(); + } + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserTaskFinishServiceImpl.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserTaskFinishServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..8cc0746eff2e7cd076e4ed7dc8edc89af4f76f6a --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/impl/YxUserTaskFinishServiceImpl.java @@ -0,0 +1,60 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service.impl; + + +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.modules.user.domain.YxUserTaskFinish; +import co.yixiang.modules.user.service.YxUserTaskFinishService; +import co.yixiang.modules.user.service.mapper.YxUserTaskFinishMapper; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; + + +/** + *

+ * 用户任务完成记录表 服务实现类 + *

+ * + * @author hupeng + * @since 2019-12-07 + */ +@Slf4j +@Service +@AllArgsConstructor +@Transactional(rollbackFor = Exception.class) +public class YxUserTaskFinishServiceImpl extends BaseServiceImpl implements YxUserTaskFinishService { + + private final YxUserTaskFinishMapper yxUserTaskFinishMapper; + + + /** + * 设置任务完成 + * @param uid uid + * @param taskId 任务id + */ + @Override + public void setFinish(Long uid, int taskId) { + Long count = this.lambdaQuery() + .eq(YxUserTaskFinish::getUid,uid) + .eq(YxUserTaskFinish::getTaskId,taskId) + .count(); + if(count == 0){ + YxUserTaskFinish userTaskFinish = new YxUserTaskFinish(); + userTaskFinish.setUid(uid); + userTaskFinish.setTaskId(taskId); + yxUserTaskFinishMapper.insert(userTaskFinish); + } + } + + + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemUserLevelMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/SystemUserLevelMapper.java similarity index 50% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemUserLevelMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/SystemUserLevelMapper.java index 1477f21688064b7936d6ad81522e1e43b410855e..8ab2fe09cc0c3f3f30b2f112ed5d760863efffc5 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemUserLevelMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/SystemUserLevelMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.mapper; +package co.yixiang.modules.user.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 - */ +* @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-mall/src/main/java/co/yixiang/modules/user/service/mapper/SystemUserTaskMapper.java similarity index 42% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemUserTaskMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/SystemUserTaskMapper.java index da1597579e0327764c51236a2f4b621fec5775c5..cda325b199e50afbbcae582bf9c123843b994b39 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemUserTaskMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/SystemUserTaskMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.mapper; +package co.yixiang.modules.user.service.mapper; import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.shop.domain.YxSystemUserTask; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.user.domain.YxSystemUserTask; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface SystemUserTaskMapper extends CoreMapper { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/UserBillMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/UserBillMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..5e954eba2f567a7c3f1969a474697f5262cd5513 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/UserBillMapper.java @@ -0,0 +1,91 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.user.domain.YxUserBill; +import co.yixiang.modules.user.service.dto.BillOrderRecordDto; +import co.yixiang.modules.user.service.dto.MUserBillDto; +import co.yixiang.modules.user.service.dto.YxUserBillDto; +import co.yixiang.modules.user.vo.BillVo; +import co.yixiang.modules.user.vo.SignVo; +import com.baomidou.mybatisplus.core.conditions.Wrapper; +import com.baomidou.mybatisplus.core.toolkit.Constants; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +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 +public interface UserBillMapper extends CoreMapper { + + @Select("select IFNULL(sum(number),0) from yx_user_bill " + + "where status=1 and type='sign' and pm=1 and category='integral' " + + "and uid=#{uid}") + double sumIntegral(@Param("uid") Long uid); + + @Select("SELECT DATE_FORMAT(a.create_time,'%Y-%m-%d') as addTime,a.title,a.number " + + "FROM yx_user_bill a INNER JOIN yx_user u ON u.uid=a.uid WHERE a.category = 'integral'" + + " AND a.type = 'sign' AND a.status = 1 AND a.uid = #{uid} " + + "ORDER BY a.create_time DESC") + List getSignList(@Param("uid") Long uid, Page page); + + @Select("SELECT o.order_id as orderId,DATE_FORMAT(b.create_time, '%Y-%m-%d %H:%i') as time," + + "b.number,u.avatar,u.nickname FROM yx_user_bill b " + + "INNER JOIN yx_store_order o ON o.id=b.link_id " + + "RIGHT JOIN yx_user u ON u.uid=o.uid" + + " WHERE b.uid = #{uid} AND ( DATE_FORMAT(b.create_time, '%Y-%m')= #{time} ) AND " + + "b.category = 'now_money' AND b.type = 'brokerage' ORDER BY time DESC") + List getBillOrderRList(@Param("time") String time, @Param("uid") Long uid); + + @Select("SELECT DATE_FORMAT(create_time,'%Y-%m') as time " + + " FROM yx_user_bill ${ew.customSqlSegment}") + List getBillOrderList(@Param(Constants.WRAPPER) Wrapper userWrapper, Page page); + + @Select("SELECT DATE_FORMAT(create_time,'%Y-%m') as time,group_concat(id SEPARATOR ',') ids " + + " FROM yx_user_bill ${ew.customSqlSegment}") + List getBillList(@Param(Constants.WRAPPER) Wrapper userWrapper, Page page); + + @Select("SELECT DATE_FORMAT(create_time,'%Y-%m-%d %H:%i') as add_time,title,number,pm " + + " FROM yx_user_bill ${ew.customSqlSegment}") + List getUserBillList(@Param(Constants.WRAPPER) Wrapper userWrapper); + + @Select("select IFNULL(sum(number),0) from yx_user_bill " + + "where status=1 and type='brokerage' and pm=1 and category='now_money' " + + "and uid=#{uid}") + double sumPrice(@Param("uid") int uid); + + @Select("select IFNULL(sum(number),0) from yx_user_bill " + + "where status=1 and type='recharge' and pm=1 and category='now_money' " + + "and uid=#{uid}") + double sumRechargePrice(@Param("uid") Long uid); + + + @Select("select IFNULL(sum(number),0) from yx_user_bill " + + "where status=1 and type='brokerage' and pm=1 and category='now_money' " + + "and uid=#{uid} and TO_DAYS(NOW()) - TO_DAYS(create_time) <= 1") + double sumYesterdayPrice(@Param("uid") Long uid); + + @Select(" ") + List findAllByQueryCriteria(@Param("category") String category, @Param("type") String type, @Param("nickname") String nickname, @Param("pm") Integer pm, @Param("date")String date, @Param("date1")String date1,@Param("title")String title); +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/UserMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/UserMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..d150938768b5c9bdd5eb6375f58dcd2e9abb1684 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/UserMapper.java @@ -0,0 +1,80 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.service.dto.PromUserDto; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Select; +import org.apache.ibatis.annotations.Update; +import org.springframework.stereotype.Repository; + +import java.math.BigDecimal; +import java.util.List; + +/** +* @author hupeng +* @date 2020-05-12 +*/ +@Repository +public interface UserMapper extends CoreMapper { + + + @Select("") + List getUserSpreadCountList(Page page, + @Param("uids") List uids, + @Param("keyword") String keyword, + @Param("orderByStr") String orderBy); + + @Update("update yx_user set now_money=now_money-#{payPrice}" + + " where uid=#{uid}") + int decPrice(@Param("payPrice") BigDecimal payPrice, @Param("uid") Long uid); +// +// @Update("update yx_user set brokerage_price=brokerage_price+#{brokeragePrice}" + +// " where uid=#{uid}") +// int incBrokeragePrice(@Param("brokeragePrice") double brokeragePrice,@Param("uid") int uid); + + @Update("update yx_user set pay_count=pay_count+1" + + " where uid=#{uid}") + int incPayCount(@Param("uid") Long uid); + + @Update("update yx_user set now_money=now_money+#{price}" + + " where uid=#{uid}") + int incMoney(@Param("uid") Long uid,BigDecimal price); + + @Update("update yx_user set integral=integral-#{integral}" + + " where uid=#{uid}") + int decIntegral(@Param("integral") double integral,@Param("uid") Long uid); + + @Update("update yx_user set integral=integral+#{integral}" + + " where uid=#{uid}") + int incIntegral(@Param("integral") double integral,@Param("uid") Long uid); + + @Update( "update yx_user set status = #{status} where uid = #{id}") + void updateOnstatus(@Param("status") Integer status, @Param("id") Long id); + + @Update( "update yx_user set now_money = now_money + ${money} where uid = #{id}") + void updateMoney(@Param("money") double money, @Param("id") long id); + + @Update("update yx_user set brokerage_price = brokerage_price+ ${price} where uid = #{id}") + void incBrokeragePrice(@Param("price") BigDecimal price,@Param("id") Long id); + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserRechargeMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/UserRechargeMapper.java similarity index 42% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserRechargeMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/UserRechargeMapper.java index cc2748bef3fe1542d32ace6fd8ac5ba4dccfe80d..f0107a59d85201de3eb8313e5b8f7133f62a93e6 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserRechargeMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/UserRechargeMapper.java @@ -2,21 +2,21 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.service.mapper; +package co.yixiang.modules.user.service.mapper; import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.shop.domain.YxUserRecharge; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.user.domain.YxUserRecharge; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface UserRechargeMapper extends CoreMapper { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserAddressMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserAddressMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..33a5e0003db45d4a3ad5789dc0d05d60dcabdd86 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserAddressMapper.java @@ -0,0 +1,27 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service.mapper; + + +import co.yixiang.modules.user.domain.YxUserAddress; +import com.baomidou.mybatisplus.core.mapper.BaseMapper; +import org.springframework.stereotype.Repository; + +/** + *

+ * 用户地址表 Mapper 接口 + *

+ * + * @author hupeng + * @since 2019-10-28 + */ +@Repository +public interface YxUserAddressMapper extends BaseMapper { + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserLevelMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserLevelMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..36c944d86ece736e98226668b873d2084b6d4680 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserLevelMapper.java @@ -0,0 +1,35 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.user.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.user.domain.YxUserLevel; +import co.yixiang.modules.user.service.dto.UserLevelInfoDto; +import org.apache.ibatis.annotations.Select; +import org.springframework.stereotype.Repository; + +/** + *

+ * 用户等级记录表 Mapper 接口 + *

+ * + * @author hupeng + * @since 2019-12-06 + */ +@Repository +public interface YxUserLevelMapper extends CoreMapper { + + @Select("SELECT l.id,a.add_time as addTime,l.discount,a.level_id as levelId,l.name," + + "l.icon,l.grade FROM yx_user_level a INNER JOIN yx_system_user_level l " + + "ON l.id=a.level_id WHERE a.status = 1 AND a.is_del = 0 AND a.id = #{id} LIMIT 1") + UserLevelInfoDto getUserLevelInfo(int id); + + + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserSignMapper.java similarity index 32% rename from yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserSignMapper.java index 41083214d70df66ecfd698e29527690597dfc481..8dc930d78b66f928eeaf38194dc2d240431d60a7 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreBargainMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserSignMapper.java @@ -2,21 +2,27 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.activity.service.mapper; +package co.yixiang.modules.user.service.mapper; + import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.activity.domain.YxStoreBargain; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.user.domain.YxUserSign; import org.springframework.stereotype.Repository; /** + *

+ * 签到记录表 Mapper 接口 + *

+ * * @author hupeng - * @date 2020-05-13 + * @since 2019-12-05 */ @Repository -@Mapper -public interface YxStoreBargainMapper extends CoreMapper { +public interface YxUserSignMapper extends CoreMapper { + } diff --git a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/DictMapper.java b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserTaskFinishMapper.java similarity index 31% rename from yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/DictMapper.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserTaskFinishMapper.java index 591e90081331b1cb8448bb32d47eae600936e7eb..5e612371d01bc1eea7d8a6875857fd7fdada99c8 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/system/service/mapper/DictMapper.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/service/mapper/YxUserTaskFinishMapper.java @@ -2,21 +2,26 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.system.service.mapper; +package co.yixiang.modules.user.service.mapper; + import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.system.domain.Dict; -import org.apache.ibatis.annotations.Mapper; +import co.yixiang.modules.user.domain.YxUserTaskFinish; import org.springframework.stereotype.Repository; /** + *

+ * 用户任务完成记录表 Mapper 接口 + *

+ * * @author hupeng - * @date 2020-05-14 + * @since 2019-12-07 */ @Repository -@Mapper -public interface DictMapper extends CoreMapper { +public interface YxUserTaskFinishMapper extends CoreMapper { } diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/vo/BillVo.java b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/BillVo.java new file mode 100644 index 0000000000000000000000000000000000000000..d9cc41004fb267d727dd4050e67ad5910f9578f9 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/BillVo.java @@ -0,0 +1,20 @@ +package co.yixiang.modules.user.vo; + +import co.yixiang.modules.user.service.dto.MUserBillDto; +import com.fasterxml.jackson.annotation.JsonIgnore; +import lombok.Data; + +import java.util.List; + +/** + * @ClassName BillVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/11/12 + **/ +@Data +public class BillVo { + private String time; + @JsonIgnore + private String ids; + private List list; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/vo/CityVo.java b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/CityVo.java new file mode 100644 index 0000000000000000000000000000000000000000..eec82ac21e79f7bb2818f6aea7473ed5f892f06b --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/CityVo.java @@ -0,0 +1,33 @@ +package co.yixiang.modules.user.vo; + + +import lombok.Getter; +import lombok.Setter; +import lombok.ToString; + +import java.io.Serializable; +import java.util.List; + + +/** + * 商城商品分类CateVO + * @author hupeng + * @since 2020-05-07 + */ +@Getter +@Setter +@ToString +public class CityVo implements Serializable { + + private static final long serialVersionUID = 1L; + + private Integer v; //id + + private String n; //名称 + + private Integer pid; + + private List c; //子集 + + +} diff --git a/yshop-admin/src/main/java/co/yixiang/modules/security/security/vo/OnlineUser.java b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/OnlineUser.java similarity index 79% rename from yshop-admin/src/main/java/co/yixiang/modules/security/security/vo/OnlineUser.java rename to yshop-mall/src/main/java/co/yixiang/modules/user/vo/OnlineUser.java index b44bf51430e812ee700da12a551f754946383294..9e202e31bdd454e339a2ac77bb036506ff45b3a8 100644 --- a/yshop-admin/src/main/java/co/yixiang/modules/security/security/vo/OnlineUser.java +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/OnlineUser.java @@ -1,15 +1,15 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.security.security.vo; +package co.yixiang.modules.user.vo; import lombok.AllArgsConstructor; import lombok.Data; import lombok.NoArgsConstructor; +import java.io.Serializable; import java.util.Date; /** @@ -18,7 +18,7 @@ import java.util.Date; @Data @AllArgsConstructor @NoArgsConstructor -public class OnlineUser { +public class OnlineUser implements Serializable { private String userName; diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/vo/SignVo.java b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/SignVo.java new file mode 100644 index 0000000000000000000000000000000000000000..a780385d697783eb82109a792e1f8e6746cbf907 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/SignVo.java @@ -0,0 +1,19 @@ +package co.yixiang.modules.user.vo; + + +import lombok.Data; + +import java.io.Serializable; + + +/** + * @ClassName SignVo + * @Author hupeng <610796224@qq.com> + * @Date 2019/12/5 + **/ +@Data +public class SignVo implements Serializable { + private String addTime; + private String title; + private Integer number; +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxSystemUserLevelQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxSystemUserLevelQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..1d85e1939589ca7561f6081494854f4907d05c5b --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxSystemUserLevelQueryVo.java @@ -0,0 +1,66 @@ +package co.yixiang.modules.user.vo; + + +import co.yixiang.modules.user.service.dto.TaskDto; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + *

+ * 设置用户等级表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-12-06 + */ +@Data +@ApiModel(value = "YxSystemUserLevelQueryVo对象", description = "设置用户等级表查询参数") +public class YxSystemUserLevelQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + private Integer id; + + @ApiModelProperty(value = "商户id") + private Integer merId; + + @ApiModelProperty(value = "会员名称") + private String name; + + @ApiModelProperty(value = "购买金额") + private BigDecimal money; + + @ApiModelProperty(value = "有效时间") + private Integer validDate; + + + @ApiModelProperty(value = "会员等级") + private Integer grade; + + @ApiModelProperty(value = "享受折扣") + private BigDecimal discount; + + @ApiModelProperty(value = "会员卡背景") + private String image; + + @ApiModelProperty(value = "会员图标") + private String icon; + + @ApiModelProperty(value = "说明") + private String explain; + + @ApiModelProperty(value = "添加时间") + private Integer addTime; + + private TaskDto taskList; + + private Boolean isClear; + + private Integer isForever; + + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxSystemUserTaskQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxSystemUserTaskQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..5a225926f1bbfb6a747c275645e581e15ee6f502 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxSystemUserTaskQueryVo.java @@ -0,0 +1,62 @@ +package co.yixiang.modules.user.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 等级任务设置 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-12-06 + */ +@Data +@ApiModel(value = "YxSystemUserTaskQueryVo对象", description = "等级任务设置查询参数") +public class YxSystemUserTaskQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + private Integer id; + + @ApiModelProperty(value = "任务名称") + private String name; + + @ApiModelProperty(value = "配置原名") + private String realName; + + @ApiModelProperty(value = "任务类型") + private String taskType; + + @ApiModelProperty(value = "限定数") + private Integer number; + + @ApiModelProperty(value = "等级id") + private Integer levelId; + + @ApiModelProperty(value = "排序") + private Integer sort; + + @ApiModelProperty(value = "是否显示") + private Integer isShow; + + @ApiModelProperty(value = "是否务必达成任务,1务必达成,0=满足其一") + private Integer isMust; + + @ApiModelProperty(value = "任务说明") + private String illustrate; + + @ApiModelProperty(value = "新增时间") + private Integer addTime; + + private Integer newNumber;//已经完成了多少 + + private Integer speed;//进度比例 + + private Integer finish;//是否完成 + + private String taskTypeTitle;//任务类型标题 + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserAddressQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserAddressQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..679cd34904bbd87c62e70f636d5261cbe7492c8f --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserAddressQueryVo.java @@ -0,0 +1,59 @@ +package co.yixiang.modules.user.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 用户地址表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-28 + */ +@Data +@ApiModel(value = "YxUserAddressQueryVo对象", description = "用户地址表查询参数") +public class YxUserAddressQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "用户地址id") + private Long id; + + @ApiModelProperty(value = "用户id") + private Long uid; + + @ApiModelProperty(value = "收货人姓名") + private String realName; + + @ApiModelProperty(value = "收货人电话") + private String phone; + + @ApiModelProperty(value = "收货人所在省") + private String province; + + @ApiModelProperty(value = "收货人所在市") + private String city; + + @ApiModelProperty(value = "收货人所在区") + private String district; + + @ApiModelProperty(value = "收货人详细地址") + private String detail; + + @ApiModelProperty(value = "邮编") + private Integer postCode; + + @ApiModelProperty(value = "经度") + private String longitude; + + @ApiModelProperty(value = "纬度") + private String latitude; + + @ApiModelProperty(value = "是否默认") + private Integer isDefault; + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserBillQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserBillQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..77b414582673b4bf324b290f8dfd25d0030242ea --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserBillQueryVo.java @@ -0,0 +1,49 @@ +package co.yixiang.modules.user.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + *

+ * 用户账单表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-27 + */ +@Data +@ApiModel(value = "YxUserBillQueryVo对象", description = "用户账单表查询参数") +public class YxUserBillQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "用户账单id") + private Long id; + + + + @ApiModelProperty(value = "0 = 支出 1 = 获得") + private Integer pm; + + @ApiModelProperty(value = "账单标题") + private String title; + + @ApiModelProperty(value = "明细数字") + private BigDecimal number; + + + @ApiModelProperty(value = "备注") + private String mark; + + @ApiModelProperty(value = "添加时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date createTime; + + + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..e8f65504e2ea5e7c478e15a2308afd7f6c6fa885 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserQueryVo.java @@ -0,0 +1,141 @@ +package co.yixiang.modules.user.vo; + + +import co.yixiang.modules.order.vo.UserOrderCountVo; +import com.fasterxml.jackson.annotation.JsonIgnore; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; + +/** + *

+ * 用户表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-16 + */ +@Data +@ApiModel(value = "YxUserQueryVo对象", description = "用户表查询参数") +public class YxUserQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "用户id") + private Long uid; + + @ApiModelProperty(value = "用户账户(跟accout一样)") + private String username; + + @ApiModelProperty(value = "用户账号") + private String account; + + @ApiModelProperty(value = "优惠券数量") + private Long couponCount = 0L; + + @ApiModelProperty(value = "订单详情数据") + private UserOrderCountVo orderStatusNum; + + + private Integer statu; + + @ApiModelProperty(value = "总的签到天数") + private Long sumSignDay; + + @ApiModelProperty(value = "当天是否签到") + private Boolean isDaySign; + + @ApiModelProperty(value = "昨天是否签到") + private Boolean isYesterDaySign; + + @ApiModelProperty(value = "核销权限") + private Boolean checkStatus; + + + + @ApiModelProperty(value = "真实姓名") + private String realName; + + @ApiModelProperty(value = "生日") + private Integer birthday; + + @ApiModelProperty(value = "身份证号码") + @JsonIgnore + private String cardId; + + @ApiModelProperty(value = "用户备注") + private String mark; + + + @ApiModelProperty(value = "用户昵称") + private String nickname; + + @ApiModelProperty(value = "用户头像") + private String avatar; + + @ApiModelProperty(value = "手机号码") + private String phone; + + @ApiModelProperty(value = "添加ip") + private String addIp; + + @ApiModelProperty(value = "最后一次登录ip") + private String lastIp; + + @ApiModelProperty(value = "用户余额") + private BigDecimal nowMoney; + + @ApiModelProperty(value = "佣金金额") + private BigDecimal brokeragePrice; + + @ApiModelProperty(value = "用户剩余积分") + private BigDecimal integral; + + @ApiModelProperty(value = "连续签到天数") + private Integer signNum; + + @ApiModelProperty(value = "1为正常,0为禁止") + private Boolean status; + + @ApiModelProperty(value = "等级") + private Integer level; + + @ApiModelProperty(value = "推广元id") + private Long spreadUid; + + @ApiModelProperty(value = "用户类型") + private String userType; + + @ApiModelProperty(value = "是否为推广员") + private Integer isPromoter; + + @ApiModelProperty(value = "用户购买次数") + private Integer payCount; + + @ApiModelProperty(value = "下级人数") + private Integer spreadCount; + + @ApiModelProperty(value = "详细地址") + private String addres; + + @ApiModelProperty(value = "管理员编号 ") + private Integer adminid; + + @ApiModelProperty(value = "用户登陆类型,h5,wechat,routine") + private String loginType; + + @ApiModelProperty(value = "是否会员") + private Boolean vip; + + @ApiModelProperty(value = "会员ID") + private Integer vipId; + + @ApiModelProperty(value = "会员图标") + private String vipIcon; + + @ApiModelProperty(value = "会员名称") + private String vipName; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserSignQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserSignQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..8e32fd8f8c1c058da3c6a70eb81e2dfc9c5b2390 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserSignQueryVo.java @@ -0,0 +1,39 @@ +package co.yixiang.modules.user.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 签到记录表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-12-05 + */ +@Data +@ApiModel(value = "YxUserSignQueryVo对象", description = "签到记录表查询参数") +public class YxUserSignQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + private Integer id; + + @ApiModelProperty(value = "用户uid") + private Integer uid; + + @ApiModelProperty(value = "签到说明") + private String title; + + @ApiModelProperty(value = "获得积分") + private Integer number; + + @ApiModelProperty(value = "剩余积分") + private Integer balance; + + @ApiModelProperty(value = "添加时间") + private Integer addTime; + +} diff --git a/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserTaskFinishQueryVo.java b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserTaskFinishQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..c5b108309608fa64779a48adbaa9cab20d5248c7 --- /dev/null +++ b/yshop-mall/src/main/java/co/yixiang/modules/user/vo/YxUserTaskFinishQueryVo.java @@ -0,0 +1,36 @@ +package co.yixiang.modules.user.vo; + +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 用户任务完成记录表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-12-07 + */ +@Data +@ApiModel(value = "YxUserTaskFinishQueryVo对象", description = "用户任务完成记录表查询参数") +public class YxUserTaskFinishQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + private Integer id; + + @ApiModelProperty(value = "任务id") + private Integer taskId; + + @ApiModelProperty(value = "用户id") + private Integer uid; + + @ApiModelProperty(value = "是否有效") + private Boolean status; + + @ApiModelProperty(value = "添加时间") + private Integer addTime; + +} diff --git a/yshop-message/pom.xml b/yshop-message/pom.xml new file mode 100644 index 0000000000000000000000000000000000000000..954a0c184348f90c6c36c3b3b7a7e27b9aac0fca --- /dev/null +++ b/yshop-message/pom.xml @@ -0,0 +1,24 @@ + + + + yshop + co.yixiang + 3.3 + + 4.0.0 + + yshop-message + 消息队列模块 + + + + co.yixiang + yshop-mall + 3.3 + + + + + diff --git a/yshop-message/src/main/java/co/yixiang/message/redis/config/RedisConfigProperties.java b/yshop-message/src/main/java/co/yixiang/message/redis/config/RedisConfigProperties.java new file mode 100644 index 0000000000000000000000000000000000000000..c0b674c247b937e7b557aaf47fc15cade0eedc5b --- /dev/null +++ b/yshop-message/src/main/java/co/yixiang/message/redis/config/RedisConfigProperties.java @@ -0,0 +1,32 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.message.redis.config; + + +import lombok.Data; +import org.springframework.boot.context.properties.ConfigurationProperties; +import org.springframework.context.annotation.Configuration; + + +/** + * reids相关配置 + * @author hupeng + * @since 2020-02-27 + */ +@Data +@Configuration(proxyBeanMethods = false) +@ConfigurationProperties(prefix = "spring.redis") +public class RedisConfigProperties { + + private String host = "host"; + private String port = "port"; + private String password = "password"; + private String database = "database"; + +} diff --git a/yshop-message/src/main/java/co/yixiang/message/redis/config/RedisKeyInitialization.java b/yshop-message/src/main/java/co/yixiang/message/redis/config/RedisKeyInitialization.java new file mode 100644 index 0000000000000000000000000000000000000000..ae125bea03da98db2ae42b6b795ad00e7e517462 --- /dev/null +++ b/yshop-message/src/main/java/co/yixiang/message/redis/config/RedisKeyInitialization.java @@ -0,0 +1,59 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.message.redis.config; + +import co.yixiang.modules.shop.domain.YxSystemConfig; +import co.yixiang.modules.shop.service.YxSystemConfigService; +import co.yixiang.utils.RedisUtils; +import lombok.RequiredArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.boot.CommandLineRunner; +import org.springframework.stereotype.Component; + +import java.util.List; + + +/** + * api服务启动初始化reids + */ +@Slf4j +@Component +@RequiredArgsConstructor(onConstructor = @__(@Autowired)) +public class RedisKeyInitialization implements CommandLineRunner { + + + private final YxSystemConfigService systemConfigService; + + + private final RedisUtils redisUtils; + + + /** + * 初始化redis + */ + private void redisKeyInitialization(){ + try { + List systemConfigs = systemConfigService.list(); + for (YxSystemConfig systemConfig : systemConfigs) { + redisUtils.set(systemConfig.getMenuName(),systemConfig.getValue()); + } + + log.info("---------------redisKey初始化成功---------------"); + }catch (Exception e){ + log.error("redisKey初始化失败: {}",e.getMessage()); + } + + } + + @Override + public void run(String... args) throws Exception { + this.redisKeyInitialization(); + } +} diff --git a/yshop-message/src/main/java/co/yixiang/message/redis/config/RedisListenerConfig.java b/yshop-message/src/main/java/co/yixiang/message/redis/config/RedisListenerConfig.java new file mode 100644 index 0000000000000000000000000000000000000000..0a78226f0572876aa1a700a67fa715b7fd68afdf --- /dev/null +++ b/yshop-message/src/main/java/co/yixiang/message/redis/config/RedisListenerConfig.java @@ -0,0 +1,49 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.message.redis.config; + + +import cn.hutool.core.util.StrUtil; +import co.yixiang.message.redis.listener.RedisKeyExpirationListener; +import co.yixiang.modules.activity.service.YxStorePinkService; +import co.yixiang.modules.order.service.YxStoreOrderService; +import lombok.AllArgsConstructor; +import org.springframework.context.annotation.Bean; +import org.springframework.context.annotation.Configuration; +import org.springframework.data.redis.connection.RedisConnectionFactory; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.listener.PatternTopic; +import org.springframework.data.redis.listener.RedisMessageListenerContainer; + +/** + * redis监听配置 + * @author hupeng + * @since 2020-02-27 + */ + +@Configuration(proxyBeanMethods = false) +@AllArgsConstructor +public class RedisListenerConfig { + + private final RedisTemplate redisTemplate; + private final RedisConfigProperties redisConfigProperties; + private final YxStoreOrderService storeOrderService; + private final YxStorePinkService storePinkService; + + @Bean + RedisMessageListenerContainer container(RedisConnectionFactory factory) { + String topic =StrUtil.format("__keyevent@{}__:expired", redisConfigProperties.getDatabase()); + RedisMessageListenerContainer container = new RedisMessageListenerContainer(); + container.setConnectionFactory(factory); + container.addMessageListener(new RedisKeyExpirationListener(redisTemplate,redisConfigProperties + ,storeOrderService,storePinkService), new PatternTopic(topic)); + return container; + } +} + diff --git a/yshop-message/src/main/java/co/yixiang/message/redis/listener/RedisKeyExpirationListener.java b/yshop-message/src/main/java/co/yixiang/message/redis/listener/RedisKeyExpirationListener.java new file mode 100644 index 0000000000000000000000000000000000000000..dcb501c4d0f56c1d946b11f4b71313c815db6d86 --- /dev/null +++ b/yshop-message/src/main/java/co/yixiang/message/redis/listener/RedisKeyExpirationListener.java @@ -0,0 +1,109 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.message.redis.listener; + + +import cn.hutool.core.util.StrUtil; +import co.yixiang.constant.ShopConstants; +import co.yixiang.enums.OrderInfoEnum; +import co.yixiang.message.redis.config.RedisConfigProperties; +import co.yixiang.modules.activity.domain.YxStorePink; +import co.yixiang.modules.activity.service.YxStorePinkService; +import co.yixiang.modules.order.domain.YxStoreOrder; +import co.yixiang.modules.order.service.YxStoreOrderService; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import lombok.extern.slf4j.Slf4j; +import org.springframework.data.redis.connection.Message; +import org.springframework.data.redis.connection.MessageListener; +import org.springframework.data.redis.core.RedisTemplate; +import org.springframework.data.redis.serializer.RedisSerializer; +import org.springframework.stereotype.Component; + +/** + * redis过期监听 + * @author hupeng + * @since 2020-02-27 + */ +@Component +@Slf4j +public class RedisKeyExpirationListener implements MessageListener { + + private RedisTemplate redisTemplate; + private RedisConfigProperties redisConfigProperties; + private YxStoreOrderService storeOrderService; + private YxStorePinkService storePinkService; + + public RedisKeyExpirationListener(RedisTemplate redisTemplate, + RedisConfigProperties redisConfigProperties, + YxStoreOrderService storeOrderService, + YxStorePinkService storePinkService){ + this.redisTemplate = redisTemplate; + this.redisConfigProperties = redisConfigProperties; + this.storeOrderService = storeOrderService; + this.storePinkService = storePinkService; + } + @Override + public void onMessage(Message message, byte[] bytes) { + RedisSerializer serializer = redisTemplate.getValueSerializer(); + String channel = String.valueOf(serializer.deserialize(message.getChannel())); + String body = String.valueOf(serializer.deserialize(message.getBody())); + //key过期监听 + if(StrUtil.format("__keyevent@{}__:expired", redisConfigProperties.getDatabase()).equals(channel)){ + //订单自动取消 + if(body.contains(ShopConstants.REDIS_ORDER_OUTTIME_UNPAY)) { + body = body.replace(ShopConstants.REDIS_ORDER_OUTTIME_UNPAY, ""); + log.info("body:{}",body); + String orderId = body; + YxStoreOrder order = storeOrderService.getOne(new LambdaQueryWrapper() + .eq(YxStoreOrder::getId, orderId) + .eq(YxStoreOrder::getPaid, OrderInfoEnum.PAY_STATUS_0.getValue())); + //只有待支付的订单能取消 + if(order != null){ + storeOrderService.cancelOrder(order.getOrderId(),null); + log.info("订单id:{},未在规定时间支付取消成功",body); + } + } + //订单自动收货 + if(body.contains(ShopConstants.REDIS_ORDER_OUTTIME_UNCONFIRM)) { + body = body.replace(ShopConstants.REDIS_ORDER_OUTTIME_UNCONFIRM, ""); + log.info("body:{}",body); + String orderId = body; + YxStoreOrder order = storeOrderService.getOne(new LambdaQueryWrapper() + .eq(YxStoreOrder::getId, orderId) + .eq(YxStoreOrder::getPaid,OrderInfoEnum.PAY_STATUS_1.getValue()) + .eq(YxStoreOrder::getStatus,OrderInfoEnum.STATUS_1.getValue())); + + //只有待收货的订单能收货 + if(order != null){ + storeOrderService.takeOrder(order.getOrderId(),null); + log.info("订单id:{},自动收货成功",body); + } + } + + //拼团过期取消 + if(body.contains(ShopConstants.REDIS_PINK_CANCEL_KEY)) { + body = body.replace(ShopConstants.REDIS_PINK_CANCEL_KEY, ""); + log.info("body:{}",body); + String pinkId = body; + YxStorePink storePink = storePinkService.getOne(Wrappers.lambdaQuery() + .eq(YxStorePink::getId,pinkId) + .eq(YxStorePink::getStatus,OrderInfoEnum.PINK_STATUS_1.getValue()) + .eq(YxStorePink::getIsRefund,OrderInfoEnum.PINK_REFUND_STATUS_0.getValue())); + + //取消拼团 + if(storePink != null){ + storePinkService.removePink(storePink.getUid(),storePink.getCid(),storePink.getId()); + log.info("拼团订单id:{},未在规定时间完成取消成功",body); + } + } + } + + } +} diff --git a/yshop-mproot/pom.xml b/yshop-mproot/pom.xml index cdf173cfc8eed7b608530fede878b2c4f3cf2ceb..e571f1e891a4914e0b0a1317753251ebaef9d049 100644 --- a/yshop-mproot/pom.xml +++ b/yshop-mproot/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.3 + 3.3 4.0.0 MyBatisPlus模块 diff --git a/yshop-mproot/src/main/java/co/yixiang/annotation/Query.java b/yshop-mproot/src/main/java/co/yixiang/annotation/Query.java index 0b49dda81edfa0c4cc7645dfa8e17acfca235ee2..c07eecdc96cf47ab763d656c37b8f3008153961e 100644 --- a/yshop-mproot/src/main/java/co/yixiang/annotation/Query.java +++ b/yshop-mproot/src/main/java/co/yixiang/annotation/Query.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.annotation; @@ -21,7 +20,6 @@ public @interface Query { // Dong ZhaoYang 2017/8/7 基本对象的属性名 String propName() default ""; - // Dong ZhaoYang 2017/8/7 查询方式 Type type() default Type.EQUAL; @@ -35,6 +33,8 @@ public @interface Query { EQUAL // Dong ZhaoYang 2017/8/7 大于等于 , GREATER_THAN + //大于 + , GREATER_THAN_NQ // Dong ZhaoYang 2017/8/7 小于等于 , LESS_THAN // Dong ZhaoYang 2017/8/7 中模糊查询 @@ -48,13 +48,13 @@ public @interface Query { // jie 2019/6/4 包含 , IN // 不等于 - , NOT_EQUAL + ,NOT_EQUAL // between - , BETWEEN + ,BETWEEN // 不为空 - , NOT_NULL + ,NOT_NULL // 查询时间 - , UNIX_TIMESTAMP + ,UNIX_TIMESTAMP } } 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 index 8f5bdbefc6afc9c8785804004dfa2d599e141acf..2ad67ca495a0831abaa02b7ef65a92dbbc9eeb54 100644 --- a/yshop-mproot/src/main/java/co/yixiang/common/entity/BaseEntity.java +++ b/yshop-mproot/src/main/java/co/yixiang/common/entity/BaseEntity.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.common.entity; @@ -12,5 +11,5 @@ import java.io.Serializable; @ApiModel("BaseEntity") -public abstract class BaseEntity implements Serializable { +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 index dcda09a14a82b87a96a0b2310c7fd3bc32df7925..cf1367157dd45057b5c93046e251f0573eb8084f 100644 --- a/yshop-mproot/src/main/java/co/yixiang/common/mapper/CoreMapper.java +++ b/yshop-mproot/src/main/java/co/yixiang/common/mapper/CoreMapper.java @@ -1,11 +1,9 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.common.mapper; - import com.baomidou.mybatisplus.core.mapper.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 index bc90c6430f135a76be975a9c65f6a6b17e8e75f8..77c16cf1348ae06a7ec90da971adc2c6868babfb 100644 --- a/yshop-mproot/src/main/java/co/yixiang/common/service/BaseService.java +++ b/yshop-mproot/src/main/java/co/yixiang/common/service/BaseService.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.common.service; 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 index 2fa164885bcdf725a210f75e131d8b38965da589..8b8f78002eb3dff478f538cc725aa8ee14a1b000 100644 --- 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 @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.common.service.impl; @@ -30,7 +29,7 @@ import java.util.List; public abstract class BaseServiceImpl, T> extends ServiceImpl implements BaseService { protected Page setPageParam(QueryParam queryParam) { - return setPageParam(queryParam, null); + return setPageParam(queryParam,null); } protected Page setPageParam(QueryParam queryParam, OrderItem defaultOrder) { @@ -43,15 +42,15 @@ public abstract class BaseServiceImpl, T> extends Servic * 如果是queryParam是OrderQueryParam,并且不为空,则使用前端排序 * 否则使用默认排序 */ - if (queryParam instanceof OrderQueryParam) { + if (queryParam instanceof OrderQueryParam){ OrderQueryParam orderQueryParam = (OrderQueryParam) queryParam; List orderItems = orderQueryParam.getOrders(); - if (CollectionUtil.isEmpty(orderItems)) { + if (CollectionUtil.isEmpty(orderItems)){ page.setOrders(Arrays.asList(defaultOrder)); - } else { + }else{ page.setOrders(orderItems); } - } else { + }else{ page.setOrders(Arrays.asList(defaultOrder)); } @@ -59,15 +58,15 @@ public abstract class BaseServiceImpl, T> extends Servic } 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"; + 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); + 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 index d9d7ae23223d46f8503b5092a7d432ddbd6ca4d2..7cd4af357e00e4146ccb6f777eea1d9ec3a23851 100644 --- a/yshop-mproot/src/main/java/co/yixiang/common/utils/QueryHelpPlus.java +++ b/yshop-mproot/src/main/java/co/yixiang/common/utils/QueryHelpPlus.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.common.utils; @@ -17,6 +16,7 @@ import java.text.SimpleDateFormat; import java.util.ArrayList; import java.util.Arrays; import java.util.Collection; +import java.util.Date; import java.util.List; /** @@ -53,10 +53,10 @@ public class QueryHelpPlus { String[] blurrys = blurry.split(","); //queryWrapper.or(); queryWrapper.and(wrapper -> { - for (int i = 0; i < blurrys.length; i++) { + for (int i=0;i< blurrys.length;i++) { String column = humpToUnderline(blurrys[i]); //if(i!=0){ - wrapper.or(); + wrapper.or(); //} wrapper.like(column, val.toString()); } @@ -70,44 +70,47 @@ public class QueryHelpPlus { queryWrapper.eq(attributeName, val); break; case GREATER_THAN: - queryWrapper.ge(finalAttributeName, val); + queryWrapper.ge(finalAttributeName, val); + break; + case GREATER_THAN_NQ: + queryWrapper.gt(finalAttributeName, val); break; case LESS_THAN: queryWrapper.le(finalAttributeName, val); break; case LESS_THAN_NQ: - queryWrapper.lt(finalAttributeName, val); + queryWrapper.lt(finalAttributeName, val); break; case INNER_LIKE: - queryWrapper.like(finalAttributeName, val); + queryWrapper.like(finalAttributeName, val); break; case LEFT_LIKE: - queryWrapper.likeLeft(finalAttributeName, val); + queryWrapper.likeLeft(finalAttributeName, val); break; case RIGHT_LIKE: - queryWrapper.likeRight(finalAttributeName, val); + queryWrapper.likeRight(finalAttributeName, val); break; case IN: if (CollUtil.isNotEmpty((Collection) val)) { - queryWrapper.in(finalAttributeName, (Collection) val); + queryWrapper.in(finalAttributeName, (Collection) val); } break; case NOT_EQUAL: - queryWrapper.ne(finalAttributeName, val); + queryWrapper.ne(finalAttributeName, val); break; case NOT_NULL: - queryWrapper.isNotNull(finalAttributeName); + queryWrapper.isNotNull(finalAttributeName); break; case BETWEEN: List between = new ArrayList<>((List) val); - queryWrapper.between(finalAttributeName, between.get(0), between.get(1)); + queryWrapper.between(finalAttributeName, between.get(0), between.get(1)); break; case UNIX_TIMESTAMP: - List UNIX_TIMESTAMP = new ArrayList<>((List) val); - if (!UNIX_TIMESTAMP.isEmpty()) { + 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; + Date time1 = fm.parse(UNIX_TIMESTAMP.get(0).toString()); + Date time2 = fm.parse(UNIX_TIMESTAMP.get(1).toString()); queryWrapper.between(finalAttributeName, time1, time2); } break; @@ -125,6 +128,7 @@ public class QueryHelpPlus { } + private static boolean isBlank(final CharSequence cs) { int strLen; if (cs == null || (strLen = cs.length()) == 0) { 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 index 6bfa2235324a0d1b1ab4ec6ca09a05bea53b4061..d593b9aec1e84cacef54592e65b55066a0ed0928 100644 --- 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 @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.common.web.param; @@ -20,18 +19,18 @@ import java.util.List; @Data @EqualsAndHashCode(callSuper = true) @ApiModel("可排序查询参数对象") -public abstract class OrderQueryParam extends QueryParam { +public abstract class OrderQueryParam extends QueryParam{ private static final long serialVersionUID = 57714391204790143L; @ApiModelProperty(value = "排序") private List orders; - public void defaultOrder(OrderItem orderItem) { + public void defaultOrder(OrderItem orderItem){ this.defaultOrders(Arrays.asList(orderItem)); } - public void defaultOrders(List orderItems) { - if (CollectionUtil.isEmpty(orderItems)) { + 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 index 8821524db4707347ad69b0dc2800960636cb3831..a49139958dc403fbc01f34d0f9696f3b5cf0c3d1 100644 --- 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 @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.common.web.param; @@ -15,28 +14,29 @@ import java.io.Serializable; @Data @ApiModel("查询参数对象") -public abstract class QueryParam implements Serializable { +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; + private Integer page =1; + @ApiModelProperty(value = "页大小,默认为10") + private Integer limit = 10; @ApiModelProperty(value = "搜索字符串") private String keyword; + @ApiModelProperty(value = "当前第几页") public void setCurrent(Integer current) { - if (current == null || current <= 0) { - this.page = 1; - } else { + 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 { + 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 index 73d33e38252fd22ecbdd76d367611ec54bcf6b2b..30fa65f8af82aa5ca49f58c3c7e7d2617bfb838f 100644 --- 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 @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.common.web.vo; diff --git a/yshop-mproot/src/main/java/co/yixiang/config/MetaHandler.java b/yshop-mproot/src/main/java/co/yixiang/config/MetaHandler.java index 9e229f344245ace5f1f318d037b3c2c4aaf078e3..9d3b3ee303b398c38b27bdead5df539c3ec23676 100644 --- a/yshop-mproot/src/main/java/co/yixiang/config/MetaHandler.java +++ b/yshop-mproot/src/main/java/co/yixiang/config/MetaHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config; @@ -20,6 +19,7 @@ import org.apache.ibatis.reflection.MetaObject; import org.springframework.stereotype.Component; import java.sql.Timestamp; +import java.util.Date; /** * 处理新增和更新的基础数据填充,配合BaseEntity和MyBatisPlusConfig使用 @@ -37,7 +37,7 @@ public class MetaHandler implements MetaObjectHandler { @Override public void insertFill(MetaObject metaObject) { try { - Timestamp time = new Timestamp(System.currentTimeMillis()); + Timestamp time=new Timestamp(System.currentTimeMillis()); if (metaObject.hasSetter("createTime")) { log.debug("自动插入 createTime"); this.setFieldValByName("createTime", time, metaObject); @@ -58,6 +58,14 @@ public class MetaHandler implements MetaObjectHandler { log.debug("自动插入 delFlag"); this.setFieldValByName("delFlag", false, metaObject); } + if (metaObject.hasSetter("isDel")) { + log.debug("自动插入 isDel"); + this.setFieldValByName("isDel", 0, metaObject); + } + if (metaObject.hasSetter("addTime")) { + String timestamp = String.valueOf(System.currentTimeMillis() / 1000); + this.setFieldValByName("addTime", Integer.valueOf(timestamp), metaObject); + } } catch (Exception e) { log.error("自动注入失败:{}", e); } @@ -71,7 +79,7 @@ public class MetaHandler implements MetaObjectHandler { @Override public void updateFill(MetaObject metaObject) { try { - Timestamp time = new Timestamp(System.currentTimeMillis()); + Timestamp time=new Timestamp(System.currentTimeMillis()); if (metaObject.hasSetter("updateTime")) { log.debug("自动插入 updateTime"); this.setFieldValByName("updateTime", time, metaObject); diff --git a/yshop-mproot/src/main/java/co/yixiang/config/MybatisConfig.java b/yshop-mproot/src/main/java/co/yixiang/config/MybatisConfig.java index dcbc1cfe74f8c9fcb2499ac647e216d0b0f6c3fd..b0fe6d72dc919a2e7b6b1a82d8a2077ea0e52f55 100644 --- a/yshop-mproot/src/main/java/co/yixiang/config/MybatisConfig.java +++ b/yshop-mproot/src/main/java/co/yixiang/config/MybatisConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.config; @@ -20,21 +19,21 @@ import org.springframework.context.annotation.Configuration; import java.util.Properties; -@Configuration +@Configuration(proxyBeanMethods = false) public class MybatisConfig { /** * 配置mybatis的分页插件pageHelper * @return */ @Bean - public PageHelper pageHelper() { + public PageHelper pageHelper(){ PageHelper pageHelper = new PageHelper(); Properties properties = new Properties(); - properties.setProperty("offsetAsPageNum", "true"); - properties.setProperty("rowBoundsWithCount", "true"); - properties.setProperty("reasonable", "true"); + properties.setProperty("offsetAsPageNum","true"); + properties.setProperty("rowBoundsWithCount","true"); + properties.setProperty("reasonable","true"); //配置mysql数据库的方言 - properties.setProperty("dialect", "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 0000000000000000000000000000000000000000..66132c8414617bb196fd39cfc8090b07844388bb --- /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-mproot/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports b/yshop-mproot/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports deleted file mode 100644 index ae31224e7454bceb52a9de6ae22203b22959385c..0000000000000000000000000000000000000000 --- a/yshop-mproot/src/main/resources/META-INF/spring/org.springframework.boot.autoconfigure.AutoConfiguration.imports +++ /dev/null @@ -1,2 +0,0 @@ -co.yixiang.config.MetaHandler -co.yixiang.config.MybatisConfig diff --git a/yshop-oss/pom.xml b/yshop-oss/pom.xml index 7542d8f18a9bf75396af1986057d3d131523a61e..40fbd7d3b110c3bc7e40214b2c7b09e7c1cc6fc6 100644 --- a/yshop-oss/pom.xml +++ b/yshop-oss/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.3 + 3.3 4.0.0 @@ -26,7 +26,7 @@ co.yixiang yshop-common - 2.3 + 3.3 cn.hutool diff --git a/yshop-shop/pom.xml b/yshop-shop/pom.xml index 7c121677a963e9f5b6f8e551897757be18b46f3e..9d93885245e2bb196aba99ddb630ef84a1768670 100644 --- a/yshop-shop/pom.xml +++ b/yshop-shop/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.3 + 3.3 4.0.0 @@ -17,25 +17,11 @@ - - - co.yixiang - yshop-tools - 2.3 - - co.yixiang yshop-weixin - 2.3 - - - co.yixiang - yshop-common - - + 3.3 - 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 569bf42eaff10f88f3edd5e50fb0d83c57112d87..e14727a94ddb2748266c1f1927b23b944940387e 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 @@ -2,16 +2,19 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.rest; import cn.hutool.core.util.ObjectUtil; -import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.api.YshopException; import co.yixiang.modules.activity.domain.YxStoreBargain; import co.yixiang.modules.activity.service.YxStoreBargainService; import co.yixiang.modules.activity.service.dto.YxStoreBargainQueryCriteria; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.logging.aop.log.Log; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -19,12 +22,18 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-12-22 - */ +* @author hupeng +* @date 2019-12-22 +*/ @Api(tags = "商城:砍价管理") @RestController @RequestMapping("api") @@ -40,30 +49,37 @@ public class StoreBargainController { @ApiOperation(value = "查询砍价") @GetMapping(value = "/yxStoreBargain") @PreAuthorize("hasAnyRole('admin','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_SELECT')") - public ResponseEntity getYxStoreBargains(YxStoreBargainQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxStoreBargainService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxStoreBargains(YxStoreBargainQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxStoreBargainService.queryAll(criteria,pageable),HttpStatus.OK); } - @NoRepeatSubmit + + @ForbidSubmit @Log("修改砍价") @ApiOperation(value = "修改砍价") @PutMapping(value = "/yxStoreBargain") @PreAuthorize("hasAnyRole('admin','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxStoreBargain resources) { - if (ObjectUtil.isNull(resources.getId())) { - return new ResponseEntity(yxStoreBargainService.save(resources), HttpStatus.CREATED); - } else { + public ResponseEntity update(@Validated @RequestBody YxStoreBargain resources){ + if(resources.getBargainMinPrice().compareTo(resources.getBargainMaxPrice()) >= 0){ + throw new YshopException("单次砍最低价不能高于单次砍最高价"); + } + if(resources.getMinPrice().compareTo(resources.getPrice()) >= 0){ + throw new YshopException("允许砍到最低价不能高于砍价金额"); + } + if(ObjectUtil.isNull(resources.getId())){ + return new ResponseEntity<>(yxStoreBargainService.save(resources),HttpStatus.CREATED); + }else{ yxStoreBargainService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } } - @NoRepeatSubmit + @ForbidSubmit @Log("删除砍价") @ApiOperation(value = "删除砍价") @DeleteMapping(value = "/yxStoreBargain/{id}") @PreAuthorize("hasAnyRole('admin','YXSTOREBARGAIN_ALL','YXSTOREBARGAIN_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { + public ResponseEntity delete(@PathVariable Integer id){ yxStoreBargainService.removeById(id); return new ResponseEntity(HttpStatus.OK); } 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 b92369d0cfc49463dfee18eb45330bee4b057364..bbb203b3776ac368600e5f0061308feea8bffbc0 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,82 +1,204 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.rest; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.ObjectUtil; -import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.SpecTypeEnum; import co.yixiang.modules.activity.domain.YxStoreCombination; import co.yixiang.modules.activity.service.YxStoreCombinationService; +import co.yixiang.modules.activity.service.dto.YxStoreCombinationDto; import co.yixiang.modules.activity.service.dto.YxStoreCombinationQueryCriteria; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.product.domain.YxStoreProductAttrResult; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.service.YxStoreProductAttrResultService; +import co.yixiang.modules.product.service.YxStoreProductAttrValueService; +import co.yixiang.modules.product.service.YxStoreProductRuleService; +import co.yixiang.modules.product.service.dto.ProductFormatDto; +import co.yixiang.modules.template.domain.YxShippingTemplates; +import co.yixiang.modules.template.service.YxShippingTemplatesService; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; +import org.springframework.cache.annotation.CacheEvict; 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.ArrayList; +import java.util.Arrays; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; +import java.util.stream.Collectors; /** - * @author hupeng - * @date 2019-11-18 - */ +* @author hupeng +* @date 2019-11-18 +*/ @Api(tags = "商城:拼团管理") @RestController @RequestMapping("api") public class StoreCombinationController { private final YxStoreCombinationService yxStoreCombinationService; - - public StoreCombinationController(YxStoreCombinationService yxStoreCombinationService) { + private final YxShippingTemplatesService yxShippingTemplatesService; + private final YxStoreProductRuleService yxStoreProductRuleService; + private final YxStoreProductAttrResultService yxStoreProductAttrResultService; + private final YxStoreProductAttrValueService storeProductAttrValueService; + private final IGenerator generator; + public StoreCombinationController(YxStoreCombinationService yxStoreCombinationService, YxShippingTemplatesService yxShippingTemplatesService, YxStoreProductRuleService yxStoreProductRuleService, YxStoreProductAttrResultService yxStoreProductAttrResultService, YxStoreProductAttrValueService storeProductAttrValueService, IGenerator generator) { this.yxStoreCombinationService = yxStoreCombinationService; + this.yxShippingTemplatesService = yxShippingTemplatesService; + this.yxStoreProductRuleService = yxStoreProductRuleService; + this.yxStoreProductAttrResultService = yxStoreProductAttrResultService; + this.storeProductAttrValueService = storeProductAttrValueService; + this.generator = generator; } @Log("查询拼团") @ApiOperation(value = "查询拼团") @GetMapping(value = "/yxStoreCombination") @PreAuthorize("hasAnyRole('admin','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_SELECT')") - public ResponseEntity getYxStoreCombinations(YxStoreCombinationQueryCriteria criteria, Pageable pageable) { - criteria.setIsDel(0); - return new ResponseEntity(yxStoreCombinationService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxStoreCombinations(YxStoreCombinationQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxStoreCombinationService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @ForbidSubmit + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) + @Log("新增拼团") + @ApiOperation(value = "新增拼团") + @PostMapping(value = "/yxStoreCombination") + @PreAuthorize("hasAnyRole('admin','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_EDIT')") + public ResponseEntity add(@Validated @RequestBody YxStoreCombinationDto resources){ + return new ResponseEntity<>(yxStoreCombinationService.saveCombination(resources),HttpStatus.CREATED); + } + + @ApiOperation(value = "获取商品信息") + @GetMapping(value = "/yxStoreCombination/info/{id}") + public ResponseEntity info(@PathVariable Long id){ + Map map = new LinkedHashMap<>(3); + + //运费模板 + List shippingTemplatesList = yxShippingTemplatesService.list(); + map.put("tempList", shippingTemplatesList); + + //商品规格 + map.put("ruleList",yxStoreProductRuleService.list()); + + + if(id == 0){ + return new ResponseEntity<>(map,HttpStatus.OK); + } + + //处理商品详情 + YxStoreCombination yxStoreCombination = yxStoreCombinationService.getById(id); + YxStoreCombinationDto productDto = new YxStoreCombinationDto(); + BeanUtil.copyProperties(yxStoreCombination,productDto,"images"); + productDto.setSliderImage(Arrays.asList(yxStoreCombination.getImages().split(","))); + YxStoreProductAttrResult storeProductAttrResult = yxStoreProductAttrResultService + .getOne(Wrappers.lambdaQuery() + .eq(YxStoreProductAttrResult::getProductId,yxStoreCombination.getProductId()).last("limit 1")); + JSONObject result = JSON.parseObject(storeProductAttrResult.getResult()); + List attrValues = storeProductAttrValueService.list(new LambdaQueryWrapper().eq(YxStoreProductAttrValue::getProductId, yxStoreCombination.getProductId())); + List productFormatDtos =attrValues.stream().map(i ->{ + ProductFormatDto productFormatDto = new ProductFormatDto(); + BeanUtils.copyProperties(i,productFormatDto); + productFormatDto.setPic(i.getImage()); + return productFormatDto; + }).collect(Collectors.toList()); + if(SpecTypeEnum.TYPE_1.getValue().equals(yxStoreCombination.getSpecType())){ + productDto.setAttr(new ProductFormatDto()); + productDto.setAttrs(productFormatDtos); + productDto.setItems(result.getObject("attr",ArrayList.class)); + }else{ + productFormat(productDto, result); + } + + map.put("productInfo",productDto); + + return new ResponseEntity<>(map,HttpStatus.OK); + } + + /** + * 获取商品属性 + * @param productDto + * @param result + */ + private void productFormat(YxStoreCombinationDto productDto, JSONObject result) { + Map mapAttr = (Map) result.getObject("value",ArrayList.class).get(0); + ProductFormatDto productFormatDto = ProductFormatDto.builder() + .pic(mapAttr.get("pic").toString()) + .price(Double.valueOf(mapAttr.get("price").toString())) + .cost(Double.valueOf(mapAttr.get("cost").toString())) + .otPrice(Double.valueOf(mapAttr.get("otPrice").toString())) + .stock(Integer.valueOf(mapAttr.get("stock").toString())) + .barCode(mapAttr.get("barCode").toString()) + .weight(Double.valueOf(mapAttr.get("weight").toString())) + .volume(Double.valueOf(mapAttr.get("volume").toString())) + .value1(mapAttr.get("value1").toString()) + .brokerage(Double.valueOf(mapAttr.get("brokerage").toString())) + .brokerageTwo(Double.valueOf(mapAttr.get("brokerageTwo").toString())) + .pinkPrice(Double.valueOf(mapAttr.get("pinkPrice").toString())) + .pinkStock(Integer.valueOf(mapAttr.get("pinkStock").toString())) + .seckillPrice(Double.valueOf(mapAttr.get("seckillPrice").toString())) + .seckillStock(Integer.valueOf(mapAttr.get("seckillStock").toString())) + .build(); + productDto.setAttr(productFormatDto); } - @NoRepeatSubmit + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) @Log("修改拼团") @ApiOperation(value = "新增/修改拼团") @PutMapping(value = "/yxStoreCombination") @PreAuthorize("hasAnyRole('admin','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxStoreCombination resources) { - if (ObjectUtil.isNull(resources.getId())) { - return new ResponseEntity(yxStoreCombinationService.save(resources), HttpStatus.CREATED); - } else { + public ResponseEntity update(@Validated @RequestBody YxStoreCombination resources){ + if(ObjectUtil.isNull(resources.getId())){ + return new ResponseEntity<>(yxStoreCombinationService.save(resources),HttpStatus.CREATED); + }else{ yxStoreCombinationService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } } - + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) + @ForbidSubmit @ApiOperation(value = "开启关闭") @PostMapping(value = "/yxStoreCombination/onsale/{id}") - public ResponseEntity onSale(@PathVariable Long id, @RequestBody String jsonStr) { + public ResponseEntity onSale(@PathVariable Long id,@RequestBody String jsonStr){ JSONObject jsonObject = JSON.parseObject(jsonStr); - int status = Integer.valueOf(jsonObject.get("status").toString()); - yxStoreCombinationService.onSale(id, status); + Integer status = jsonObject.getInteger("status"); + yxStoreCombinationService.onSale(id,status); return new ResponseEntity(HttpStatus.OK); } - - @NoRepeatSubmit + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) + @ForbidSubmit @Log("删除拼团") @ApiOperation(value = "删除拼团") @DeleteMapping(value = "/yxStoreCombination/{id}") @PreAuthorize("hasAnyRole('admin','YXSTORECOMBINATION_ALL','YXSTORECOMBINATION_DELETE')") - public ResponseEntity delete(@PathVariable Long id) { + public ResponseEntity delete(@PathVariable Long id){ yxStoreCombinationService.removeById(id); return new ResponseEntity(HttpStatus.OK); } 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 9fe6c11146aceaabe70f1eadd9b20354da44ed9f..ac1c2775dcfa2eea141dc95c0d30955fee5ba5af 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,16 +1,18 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.rest; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; +import co.yixiang.enums.CouponEnum; import co.yixiang.modules.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; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -18,12 +20,19 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-11-09 - */ +* @author hupeng +* @date 2019-11-09 +*/ @Api(tags = "商城:优惠券管理") @RestController @RequestMapping("api") @@ -38,41 +47,49 @@ public class StoreCouponController { @Log("查询") @ApiOperation(value = "查询") @GetMapping(value = "/yxStoreCoupon") - @PreAuthorize("hasAnyRole('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_SELECT')") - public ResponseEntity getYxStoreCoupons(YxStoreCouponQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxStoreCouponService.queryAll(criteria, pageable), HttpStatus.OK); + @PreAuthorize("@el.check('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_SELECT')") + public ResponseEntity getYxStoreCoupons(YxStoreCouponQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxStoreCouponService.queryAll(criteria,pageable),HttpStatus.OK); } - @NoRepeatSubmit @Log("新增") @ApiOperation(value = "新增") @PostMapping(value = "/yxStoreCoupon") - @PreAuthorize("hasAnyRole('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_CREATE')") - public ResponseEntity create(@Validated @RequestBody YxStoreCoupon resources) { - return new ResponseEntity(yxStoreCouponService.save(resources), HttpStatus.CREATED); + @PreAuthorize("@el.check('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_CREATE')") + public ResponseEntity create(@Validated @RequestBody YxStoreCoupon resources){ + if(CouponEnum.TYPE_1.getValue().equals(resources.getType()) + && StrUtil.isEmpty(resources.getProductId())){ + throw new YshopException("请选择商品"); + } + if(resources.getCouponPrice().compareTo(resources.getUseMinPrice()) >= 0) { + throw new YshopException("优惠券金额不能高于最低消费金额"); + } + return new ResponseEntity<>(yxStoreCouponService.save(resources),HttpStatus.CREATED); } - @NoRepeatSubmit @Log("修改") @ApiOperation(value = "修改") @PutMapping(value = "/yxStoreCoupon") - @PreAuthorize("hasAnyRole('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxStoreCoupon resources) { + @PreAuthorize("@el.check('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_EDIT')") + public ResponseEntity update(@Validated @RequestBody YxStoreCoupon resources){ + if(CouponEnum.TYPE_1.getValue().equals(resources.getType()) + && StrUtil.isEmpty(resources.getProductId())){ + throw new YshopException("请选择商品"); + } + if(resources.getCouponPrice().compareTo(resources.getUseMinPrice()) >= 0) { + throw new YshopException("优惠券金额不能高于最低消费金额"); + } yxStoreCouponService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + @ForbidSubmit @Log("删除") @ApiOperation(value = "删除") @DeleteMapping(value = "/yxStoreCoupon/{id}") - @PreAuthorize("hasAnyRole('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { - - YxStoreCoupon resources = new YxStoreCoupon(); - resources.setId(id); - resources.setIsDel(1); - yxStoreCouponService.saveOrUpdate(resources); + @PreAuthorize("@el.check('admin','YXSTORECOUPON_ALL','YXSTORECOUPON_DELETE')") + public ResponseEntity delete(@PathVariable Integer id){ + yxStoreCouponService.removeById(id); return new ResponseEntity(HttpStatus.OK); } } 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 0b0bfa995de8a028c08440caba218170db1e8f55..0bb3240757f40211024427d234b46d4357cf0b1d 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,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.rest; @@ -10,7 +9,7 @@ import co.yixiang.modules.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; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -18,12 +17,19 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-11-09 - */ +* @author hupeng +* @date 2019-11-09 +*/ @Api(tags = "商城:优惠券发布管理") @RestController @RequestMapping("api") @@ -38,38 +44,37 @@ public class StoreCouponIssueController { @Log("查询已发布") @ApiOperation(value = "查询已发布") @GetMapping(value = "/yxStoreCouponIssue") - @PreAuthorize("hasAnyRole('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_SELECT')") - public ResponseEntity getYxStoreCouponIssues(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable) { - criteria.setIsDel(0); - return new ResponseEntity(yxStoreCouponIssueService.queryAll(criteria, pageable), HttpStatus.OK); + @PreAuthorize("@el.check('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_SELECT')") + public ResponseEntity getYxStoreCouponIssues(YxStoreCouponIssueQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxStoreCouponIssueService.queryAll(criteria,pageable),HttpStatus.OK); } @Log("发布") @ApiOperation(value = "发布") @PostMapping(value = "/yxStoreCouponIssue") - @PreAuthorize("hasAnyRole('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_CREATE')") - public ResponseEntity create(@Validated @RequestBody YxStoreCouponIssue resources) { - if (resources.getTotalCount() > 0) { + @PreAuthorize("@el.check('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_CREATE')") + public ResponseEntity create(@Validated @RequestBody YxStoreCouponIssue resources){ + if(resources.getTotalCount() > 0) { resources.setRemainCount(resources.getTotalCount()); } - return new ResponseEntity(yxStoreCouponIssueService.save(resources), HttpStatus.CREATED); + return new ResponseEntity<>(yxStoreCouponIssueService.save(resources),HttpStatus.CREATED); } @Log("修改状态") @ApiOperation(value = "修改状态") @PutMapping(value = "/yxStoreCouponIssue") - @PreAuthorize("hasAnyRole('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxStoreCouponIssue resources) { + @PreAuthorize("@el.check('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_EDIT')") + public ResponseEntity update(@Validated @RequestBody YxStoreCouponIssue resources){ yxStoreCouponIssueService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + @ForbidSubmit @Log("删除") @ApiOperation(value = "删除") @DeleteMapping(value = "/yxStoreCouponIssue/{id}") - @PreAuthorize("hasAnyRole('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { + @PreAuthorize("@el.check('admin','YXSTORECOUPONISSUE_ALL','YXSTORECOUPONISSUE_DELETE')") + public ResponseEntity delete(@PathVariable Integer id){ yxStoreCouponIssueService.removeById(id); return new ResponseEntity(HttpStatus.OK); } 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 6ed6028a724a476ac398413bcc722f813ad89863..9013c6e2bb887b7cb40f47970f42b6bfdd75652f 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 @@ -2,28 +2,32 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.rest; import co.yixiang.modules.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; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; 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 org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-11-09 - */ +* @author hupeng +* @date 2019-11-09 +*/ @Api(tags = "商城:优惠券前台用户领取记录管理") @RestController @RequestMapping("api") @@ -39,34 +43,17 @@ public class StoreCouponIssueUserController { @ApiOperation(value = "查询") @GetMapping(value = "/yxStoreCouponIssueUser") @PreAuthorize("hasAnyRole('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_SELECT')") - public ResponseEntity getYxStoreCouponIssueUsers(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxStoreCouponIssueUserService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxStoreCouponIssueUsers(YxStoreCouponIssueUserQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxStoreCouponIssueUserService.queryAll(criteria,pageable),HttpStatus.OK); } - @Log("新增") - @ApiOperation(value = "新增") - @PostMapping(value = "/yxStoreCouponIssueUser") - @PreAuthorize("hasAnyRole('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_CREATE')") - public ResponseEntity create(@Validated @RequestBody YxStoreCouponIssueUser resources) { - return new ResponseEntity(yxStoreCouponIssueUserService.save(resources), HttpStatus.CREATED); - } - @Log("修改") - @ApiOperation(value = "修改") - @PutMapping(value = "/yxStoreCouponIssueUser") - @PreAuthorize("hasAnyRole('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxStoreCouponIssueUser resources) { - yxStoreCouponIssueUserService.saveOrUpdate(resources); - return new ResponseEntity(HttpStatus.NO_CONTENT); - } - - @NoRepeatSubmit + @ForbidSubmit @Log("删除") @ApiOperation(value = "删除") @DeleteMapping(value = "/yxStoreCouponIssueUser/{id}") @PreAuthorize("hasAnyRole('admin','YXSTORECOUPONISSUEUSER_ALL','YXSTORECOUPONISSUEUSER_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { - + public ResponseEntity delete(@PathVariable Integer id){ yxStoreCouponIssueUserService.removeById(id); return new ResponseEntity(HttpStatus.OK); } 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 fc2c40c44e7075fbec068a8081a7d4bff92f44c3..14b35b7b6beec0bccbb87325dc574c06ef32cd51 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 @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.rest; @@ -20,9 +22,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-11-10 - */ +* @author hupeng +* @date 2019-11-10 +*/ @Api(tags = "商城:优惠券发放记录管理") @RestController @RequestMapping("api") @@ -38,8 +40,8 @@ public class StoreCouponUserController { @ApiOperation(value = "查询") @GetMapping(value = "/yxStoreCouponUser") @PreAuthorize("hasAnyRole('admin','YXSTORECOUPONUSER_ALL','YXSTORECOUPONUSER_SELECT')") - public ResponseEntity getYxStoreCouponUsers(YxStoreCouponUserQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxStoreCouponUserService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxStoreCouponUsers(YxStoreCouponUserQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity(yxStoreCouponUserService.queryAll(criteria,pageable),HttpStatus.OK); } 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 c94022128b6baffbda84de308ac0e920176992e8..3fb1d90ad8a3ad41b32a67e3c91a980c96ef3567 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,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.activity.rest; @@ -20,9 +19,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-11-18 - */ +* @author hupeng +* @date 2019-11-18 +*/ @Api(tags = "商城:拼团记录管理") @RestController @RequestMapping("api") @@ -37,9 +36,9 @@ public class StorePinkController { @Log("查询记录") @ApiOperation(value = "查询记录") @GetMapping(value = "/yxStorePink") - @PreAuthorize("hasAnyRole('admin','YXSTOREPINK_ALL','YXSTOREPINK_SELECT')") - public ResponseEntity getYxStorePinks(YxStorePinkQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxStorePinkService.queryAll(criteria, pageable), HttpStatus.OK); + @PreAuthorize("@el.check('admin','YXSTOREPINK_ALL','YXSTOREPINK_SELECT')") + public ResponseEntity getYxStorePinks(YxStorePinkQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxStorePinkService.queryAll(criteria,pageable),HttpStatus.OK); } 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 e1054963f3a320d9d7ea6372b6245bb30d21f322..e523d1c8dba1cabf379eebe2792381778404346f 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,19 +1,36 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 */ package co.yixiang.modules.activity.rest; +import cn.hutool.core.bean.BeanUtil; import cn.hutool.core.util.ObjectUtil; +import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.SpecTypeEnum; import co.yixiang.modules.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.YxStoreSeckillDto; import co.yixiang.modules.activity.service.dto.YxStoreSeckillQueryCriteria; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.product.domain.YxStoreProductAttrResult; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.service.YxStoreProductAttrResultService; +import co.yixiang.modules.product.service.YxStoreProductAttrValueService; +import co.yixiang.modules.product.service.YxStoreProductRuleService; +import co.yixiang.modules.product.service.dto.ProductFormatDto; +import co.yixiang.modules.template.domain.YxShippingTemplates; +import co.yixiang.modules.template.service.YxShippingTemplatesService; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; +import org.springframework.cache.annotation.CacheEvict; import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; @@ -21,6 +38,9 @@ import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.validation.annotation.Validated; import org.springframework.web.bind.annotation.*; +import java.util.*; +import java.util.stream.Collectors; + /** * @author hupeng * @date 2019-12-14 @@ -30,10 +50,22 @@ import org.springframework.web.bind.annotation.*; @RequestMapping("api") public class StoreSeckillController { + private final IGenerator generator; private final YxStoreSeckillService yxStoreSeckillService; + private final YxShippingTemplatesService yxShippingTemplatesService; + private final YxStoreProductRuleService yxStoreProductRuleService; + private final YxStoreProductAttrValueService storeProductAttrValueService; + private final YxStoreProductAttrResultService yxStoreProductAttrResultService; - public StoreSeckillController(YxStoreSeckillService yxStoreSeckillService) { + public StoreSeckillController(IGenerator generator, YxStoreSeckillService yxStoreSeckillService, YxShippingTemplatesService yxShippingTemplatesService, + YxStoreProductRuleService yxStoreProductRuleService, YxStoreProductAttrValueService storeProductAttrValueService, + YxStoreProductAttrResultService yxStoreProductAttrResultService) { + this.generator = generator; this.yxStoreSeckillService = yxStoreSeckillService; + this.yxShippingTemplatesService = yxShippingTemplatesService; + this.yxStoreProductRuleService = yxStoreProductRuleService; + this.storeProductAttrValueService = storeProductAttrValueService; + this.yxStoreProductAttrResultService = yxStoreProductAttrResultService; } @Log("列表") @@ -41,30 +73,116 @@ public class StoreSeckillController { @GetMapping(value = "/yxStoreSeckill") @PreAuthorize("hasAnyRole('admin','YXSTORESECKILL_ALL','YXSTORESECKILL_SELECT')") public ResponseEntity getYxStoreSeckills(YxStoreSeckillQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxStoreSeckillService.queryAll(criteria, pageable), HttpStatus.OK); + return new ResponseEntity<>(yxStoreSeckillService.queryAll(criteria, pageable), HttpStatus.OK); } - + @ForbidSubmit + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) @Log("发布") @ApiOperation(value = "发布") @PutMapping(value = "/yxStoreSeckill") @PreAuthorize("hasAnyRole('admin','YXSTORESECKILL_ALL','YXSTORESECKILL_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxStoreSeckill resources) { - if (ObjectUtil.isNull(resources.getId())) { - return new ResponseEntity(yxStoreSeckillService.save(resources), HttpStatus.CREATED); - } else { + public ResponseEntity update(@Validated @RequestBody YxStoreSeckill resources){ + if(ObjectUtil.isNull(resources.getId())){ + return new ResponseEntity<>(yxStoreSeckillService.save(resources),HttpStatus.CREATED); + }else{ yxStoreSeckillService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } } - @NoRepeatSubmit + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) + @ForbidSubmit @Log("删除") @ApiOperation(value = "删除") @DeleteMapping(value = "/yxStoreSeckill/{id}") @PreAuthorize("hasAnyRole('admin','YXSTORESECKILL_ALL','YXSTORESECKILL_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { + public ResponseEntity delete(@PathVariable Long id) { yxStoreSeckillService.removeById(id); return new ResponseEntity(HttpStatus.OK); } + + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) + @Log("新增秒杀") + @ApiOperation(value = "新增秒杀") + @PostMapping(value = "/yxStoreSeckill") + @PreAuthorize("hasAnyRole('admin','YXSTORESECKILL_ALL','YXSTORESECKILL_EDIT')") + public ResponseEntity add(@Validated @RequestBody YxStoreSeckillDto resources) { + return new ResponseEntity<>(yxStoreSeckillService.saveSeckill(resources), HttpStatus.CREATED); + } + + @ApiOperation(value = "获取商品信息") + @GetMapping(value = "/yxStoreSecKill/info/{id}") + public ResponseEntity info(@PathVariable Long id) { + Map map = new LinkedHashMap<>(3); + + //运费模板 + List shippingTemplatesList = yxShippingTemplatesService.list(); + map.put("tempList", shippingTemplatesList); + + //商品规格 + map.put("ruleList", yxStoreProductRuleService.list()); + + + if (id == 0) { + return new ResponseEntity<>(map, HttpStatus.OK); + } + + //处理商品详情 + YxStoreSeckill yxStoreSeckill = yxStoreSeckillService.getById(id); + YxStoreSeckillDto productDto = new YxStoreSeckillDto(); + BeanUtil.copyProperties(yxStoreSeckill, productDto, "images"); + productDto.setSliderImage(Arrays.asList(yxStoreSeckill.getImages().split(","))); + YxStoreProductAttrResult storeProductAttrResult = yxStoreProductAttrResultService + .getOne(Wrappers.lambdaQuery() + .eq(YxStoreProductAttrResult::getProductId, yxStoreSeckill.getProductId()).last("limit 1")); + JSONObject result = JSON.parseObject(storeProductAttrResult.getResult()); + + List attrValues = storeProductAttrValueService.list(new LambdaQueryWrapper().eq(YxStoreProductAttrValue::getProductId, yxStoreSeckill.getProductId())); + List productFormatDtos = attrValues.stream().map(i -> { + ProductFormatDto productFormatDto = new ProductFormatDto(); + BeanUtils.copyProperties(i, productFormatDto); + productFormatDto.setPic(i.getImage()); + return productFormatDto; + }).collect(Collectors.toList()); + if (SpecTypeEnum.TYPE_1.getValue().equals(yxStoreSeckill.getSpecType())) { + productDto.setAttr(new ProductFormatDto()); + productDto.setAttrs(productFormatDtos); + productDto.setItems(result.getObject("attr", ArrayList.class)); + } else { + productFormat(productDto, result); + } + + + map.put("productInfo", productDto); + + return new ResponseEntity<>(map, HttpStatus.OK); + } + + /** + * 获取商品属性 + * @param productDto + * @param result + */ + private void productFormat(YxStoreSeckillDto productDto, JSONObject result) { + Map mapAttr = (Map) result.getObject("value", ArrayList.class).get(0); + ProductFormatDto productFormatDto = ProductFormatDto.builder() + .pic(mapAttr.get("pic").toString()) + .price(Double.valueOf(mapAttr.get("price").toString())) + .cost(Double.valueOf(mapAttr.get("cost").toString())) + .otPrice(Double.valueOf(mapAttr.get("otPrice").toString())) + .stock(Integer.valueOf(mapAttr.get("stock").toString())) + .barCode(mapAttr.get("barCode").toString()) + .weight(Double.valueOf(mapAttr.get("weight").toString())) + .volume(Double.valueOf(mapAttr.get("volume").toString())) + .value1(mapAttr.get("value1").toString()) + .brokerage(Double.valueOf(mapAttr.get("brokerage").toString())) + .brokerageTwo(Double.valueOf(mapAttr.get("brokerageTwo").toString())) + .pinkPrice(Double.valueOf(mapAttr.get("pinkPrice").toString())) + .pinkStock(Integer.valueOf(mapAttr.get("pinkStock").toString())) + .seckillPrice(Double.valueOf(mapAttr.get("seckillPrice").toString())) + .seckillStock(Integer.valueOf(mapAttr.get("seckillStock").toString())) + .build(); + productDto.setAttr(productFormatDto); + } } 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 0672b037bfe1eed170b53b87d6c4039629ab3109..1691a4f11cfc4c5a6501e79b87f7df0ebbfd3aea 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 @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.activity.rest; @@ -10,7 +12,6 @@ import co.yixiang.modules.logging.aop.log.Log; 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.aop.NoRepeatSubmit; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -18,13 +19,16 @@ 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.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-11-14 - */ +* @author hupeng +* @date 2019-11-14 +*/ @Api(tags = "商城:提现管理") @RestController @RequestMapping("api") @@ -32,26 +36,30 @@ public class UserExtractController { private final YxUserExtractService yxUserExtractService; + public UserExtractController(YxUserExtractService yxUserExtractService) { this.yxUserExtractService = yxUserExtractService; + } @Log("查询") @ApiOperation(value = "查询") @GetMapping(value = "/yxUserExtract") @PreAuthorize("hasAnyRole('admin','YXUSEREXTRACT_ALL','YXUSEREXTRACT_SELECT')") - public ResponseEntity getYxUserExtracts(YxUserExtractQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxUserExtractService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxUserExtracts(YxUserExtractQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxUserExtractService.queryAll(criteria,pageable),HttpStatus.OK); } - @NoRepeatSubmit - @Log("操作提现") - @ApiOperation(value = "操作提现") + + + @Log("修改审核") + @ApiOperation(value = "修改审核") @PutMapping(value = "/yxUserExtract") @PreAuthorize("hasAnyRole('admin','YXUSEREXTRACT_ALL','YXUSEREXTRACT_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxUserExtract resources) { + public ResponseEntity update(@Validated @RequestBody YxUserExtract resources){ yxUserExtractService.doExtract(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } + } 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 deleted file mode 100644 index 16d6cf70ccfbed20d3749335b1bbdc8ca6c7d130..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStoreBargainService.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.YxStoreBargainQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-13 - */ -public interface YxStoreBargainService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxStoreBargainQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(YxStoreBargainQueryCriteria 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/activity/service/YxStorePinkService.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java deleted file mode 100644 index 3e0bf7ac0c519b8102273f6abeca3d6430162d5d..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/YxStorePinkService.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.YxStorePinkQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxStorePinkService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxStorePinkQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(YxStorePinkQueryCriteria 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/activity/service/impl/YxStoreBargainServiceImpl.java b/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java deleted file mode 100644 index a5c5b50ed2c447f2be3862dab4f02b71f3c3a548..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreBargainServiceImpl.java +++ /dev/null @@ -1,108 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - */ -package co.yixiang.modules.activity.service.impl; - -import co.yixiang.common.service.impl.BaseServiceImpl; -import co.yixiang.common.utils.QueryHelpPlus; -import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.activity.domain.YxStoreBargain; -import co.yixiang.modules.activity.service.YxStoreBargainService; -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.FileUtil; -import co.yixiang.utils.OrderUtil; -import com.github.pagehelper.PageInfo; -import lombok.AllArgsConstructor; -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 java.util.List; -import java.util.Map; - -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; - -/** - * @author hupeng - * @date 2020-05-13 - */ -@Service -@AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreBargain") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreBargainServiceImpl extends BaseServiceImpl implements YxStoreBargainService { - - private final IGenerator generator; - - @Override - //@Cacheable - public Map queryAll(YxStoreBargainQueryCriteria criteria, Pageable pageable) { - getPage(pageable); - PageInfo page = new PageInfo<>(queryAll(criteria)); - Map map = new LinkedHashMap<>(2); - List storeBargainDtoList = generator.convert(page.getList(), YxStoreBargainDto.class); - for (YxStoreBargainDto storeBargainDto : storeBargainDtoList) { - - String statusStr = OrderUtil.checkActivityStatus(storeBargainDto.getStartTime(), - storeBargainDto.getStopTime(), storeBargainDto.getStatus()); - storeBargainDto.setStatusStr(statusStr); - } - map.put("content", storeBargainDtoList); - map.put("totalElements", page.getTotal()); - return map; - } - - - @Override - //@Cacheable - public List queryAll(YxStoreBargainQueryCriteria criteria) { - return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreBargain.class, criteria)); - } - - - @Override - 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("砍价规则", yxStoreBargain.getRule()); - map.put("砍价产品浏览量", yxStoreBargain.getLook()); - map.put("砍价产品分享量", yxStoreBargain.getShare()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} 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 deleted file mode 100644 index 5102f912e463e4c063fc961eed09d8837ec93aee..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreCombinationServiceImpl.java +++ /dev/null @@ -1,125 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.activity.service.impl; - -import co.yixiang.common.service.impl.BaseServiceImpl; -import co.yixiang.common.utils.QueryHelpPlus; -import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.activity.domain.YxStoreCombination; -import co.yixiang.modules.activity.domain.YxStorePink; -import co.yixiang.modules.activity.service.YxStoreCombinationService; -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.modules.activity.service.mapper.YxStorePinkMapper; -import co.yixiang.utils.FileUtil; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.github.pagehelper.PageInfo; -import lombok.AllArgsConstructor; -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 java.util.List; -import java.util.Map; - -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; - -/** - * @author hupeng - * @date 2020-05-13 - */ -@Service -@AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreCombination") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreCombinationServiceImpl extends BaseServiceImpl implements YxStoreCombinationService { - - private final IGenerator generator; - private final YxStorePinkMapper yxStorePinkMapper; - - - @Override - //@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(yxStorePinkMapper.selectCount(new LambdaQueryWrapper().eq(YxStorePink::getCid, combinationDTO.getId()))); - - //成团人数 - combinationDTO.setCountPeoplePink(yxStorePinkMapper.selectCount(new LambdaQueryWrapper().eq(YxStorePink::getCid, combinationDTO.getId()).eq(YxStorePink::getKId, 0))); - - } - Map map = new LinkedHashMap<>(2); - map.put("content", combinationDTOS); - map.put("totalElements", page.getTotal()); - return map; - } - - - @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("推荐图", 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.getIsShow()); - map.put(" combination", yxStoreCombination.getCombination()); - 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 - public void onSale(Long id, int status) { - if (status == 1) { - status = 0; - } else { - status = 1; - } - YxStoreCombination yxStoreCombination = new YxStoreCombination(); - yxStoreCombination.setIsShow(status); - yxStoreCombination.setId(id); - this.saveOrUpdate(yxStoreCombination); - } -} 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 deleted file mode 100644 index 6ae028a2f65c792d4abc4a0cc7fac89c7fc1786a..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/impl/YxStoreSeckillServiceImpl.java +++ /dev/null @@ -1,104 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.activity.service.impl; - -import co.yixiang.common.service.impl.BaseServiceImpl; -import co.yixiang.common.utils.QueryHelpPlus; -import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.activity.domain.YxStoreSeckill; -import co.yixiang.modules.activity.service.YxStoreSeckillService; -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.FileUtil; -import co.yixiang.utils.OrderUtil; -import com.github.pagehelper.PageInfo; -import lombok.AllArgsConstructor; -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 java.util.List; -import java.util.Map; - -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; - -/** - * @author hupeng - * @date 2020-05-13 - */ -@Service -@AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreSeckill") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreSeckillServiceImpl extends BaseServiceImpl implements YxStoreSeckillService { - - private final IGenerator generator; - - @Override - //@Cacheable - public Map queryAll(YxStoreSeckillQueryCriteria criteria, Pageable pageable) { - getPage(pageable); - PageInfo page = new PageInfo<>(queryAll(criteria)); - List storeSeckillDTOS = generator.convert(page.getList(), YxStoreSeckillDto.class); - for (YxStoreSeckillDto storeSeckillDTO : storeSeckillDTOS) { - String statusStr = OrderUtil.checkActivityStatus(storeSeckillDTO.getStartTime(), - storeSeckillDTO.getStopTime(), storeSeckillDTO.getStatus()); - storeSeckillDTO.setStatusStr(statusStr); - } - Map map = new LinkedHashMap<>(2); - map.put("content", storeSeckillDTOS); - map.put("totalElements", page.getTotal()); - return map; - } - - - @Override - //@Cacheable - public List queryAll(YxStoreSeckillQueryCriteria criteria) { - return baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreSeckill.class, criteria)); - } - - - @Override - 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.getDescription()); - map.put("开始时间", yxStoreSeckill.getStartTime()); - map.put("结束时间", yxStoreSeckill.getStopTime()); - map.put("产品状态", yxStoreSeckill.getStatus()); - map.put("最多秒杀几个", yxStoreSeckill.getNum()); - map.put("显示", yxStoreSeckill.getIsShow()); - map.put("时间段id", yxStoreSeckill.getTimeId()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} 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 deleted file mode 100644 index 050ac4526a5272cea2aaf6ee14882553deeb764b..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCombinationMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.activity.service.mapper; - -import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.activity.domain.YxStoreCombination; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; - -/** - * @author hupeng - * @date 2020-05-13 - */ -@Repository -@Mapper -public interface YxStoreCombinationMapper extends CoreMapper { - -} 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 deleted file mode 100644 index 8374ac3a7a80184246b12b437ad78f63d384071c..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStoreCouponUserMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.activity.service.mapper; - -import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.activity.domain.YxStoreCouponUser; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; - -/** - * @author hupeng - * @date 2020-05-13 - */ -@Repository -@Mapper -public interface YxStoreCouponUserMapper extends CoreMapper { - -} 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 deleted file mode 100644 index c50f9ff80a8420410a915f14a2e7b1cdc40a035e..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/activity/service/mapper/YxStorePinkMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.activity.service.mapper; - -import co.yixiang.common.mapper.CoreMapper; -import co.yixiang.modules.activity.domain.YxStorePink; -import org.apache.ibatis.annotations.Mapper; -import org.springframework.stereotype.Repository; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Repository -@Mapper -public interface YxStorePinkMapper extends CoreMapper { - -} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/aop/ForbidSubmit.java b/yshop-shop/src/main/java/co/yixiang/modules/aop/ForbidSubmit.java index 008453c0f8423e7a990f5dba1e46e36f57e7e5fb..802d8d0e72b0a08bc0807edb97f9aa6de56b35c9 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/aop/ForbidSubmit.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/aop/ForbidSubmit.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.aop; diff --git a/yshop-shop/src/main/java/co/yixiang/modules/aop/ForbidSubmitAspect.java b/yshop-shop/src/main/java/co/yixiang/modules/aop/ForbidSubmitAspect.java index f1b9ca0fc9af808aa59726a00052d6537005e0ed..7282a017979c023915bf474230ef4cf8f72ff321 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/aop/ForbidSubmitAspect.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/aop/ForbidSubmitAspect.java @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.aop; @@ -16,7 +18,6 @@ import org.springframework.stereotype.Component; /** * 重复提交aop - * * @author hupeng * @since 2020-06-02 */ @@ -26,6 +27,8 @@ import org.springframework.stereotype.Component; public class ForbidSubmitAspect { + + @Pointcut("@annotation(forbidSubmit)") public void pointCut(ForbidSubmit forbidSubmit) { } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/aop/RepeatSubmitAspect.java b/yshop-shop/src/main/java/co/yixiang/modules/aop/RepeatSubmitAspect.java deleted file mode 100644 index c31a16688161e528f820b06e7905d5e7c86eb6ac..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/aop/RepeatSubmitAspect.java +++ /dev/null @@ -1,92 +0,0 @@ -package co.yixiang.modules.aop; - -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -import co.yixiang.exception.BadRequestException; -import co.yixiang.modules.util.RedisLock; -import co.yixiang.utils.RequestHolder; -import lombok.extern.slf4j.Slf4j; -import org.aspectj.lang.ProceedingJoinPoint; -import org.aspectj.lang.annotation.Around; -import org.aspectj.lang.annotation.Aspect; -import org.aspectj.lang.annotation.Pointcut; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Component; -import org.springframework.util.Assert; - -import javax.servlet.http.HttpServletRequest; -import java.util.UUID; - -/** - * 重复提交aop - * @author hupeng - * @since 2020-06-02 - */ -@Aspect -@Component -@Slf4j -public class RepeatSubmitAspect { - - - @Autowired - private RedisLock redisLock; - - @Pointcut("@annotation(noRepeatSubmit)") - public void pointCut(NoRepeatSubmit noRepeatSubmit) { - } - - @Around("pointCut(noRepeatSubmit)") - public Object around(ProceedingJoinPoint pjp, NoRepeatSubmit noRepeatSubmit) throws Throwable { - int lockSeconds = noRepeatSubmit.lockTime(); - - HttpServletRequest request = RequestHolder.getHttpServletRequest(); - Assert.notNull(request, "request can not null"); - - String bearerToken = request.getHeader("Authorization"); - String[] tokens = bearerToken.split(" "); - String token = tokens[1]; - String path = request.getServletPath(); - String key = getKey(token, path); - String clientId = getClientId(); - - boolean isSuccess = redisLock.tryLock(key, clientId, lockSeconds); - log.info("tryLock key = [{}], clientId = [{}]", key, clientId); - - if (isSuccess) { - log.info("tryLock success, key = [{}], clientId = [{}]", key, clientId); - // 获取锁成功 - Object result; - - try { - // 执行进程 - result = pjp.proceed(); - } finally { - // 解锁 - redisLock.releaseLock(key, clientId); - log.info("releaseLock success, key = [{}], clientId = [{}]", key, clientId); - } - - return result; - - } else { - // 获取锁失败,认为是重复提交的请求 - log.info("tryLock fail, key = [{}]", key); - ///return ApiResult.fail("重复请求,请稍后再试"); - throw new BadRequestException("重复请求,请稍后再试"); - } - - } - - private String getKey(String token, String path) { - return token + path; - } - - private String getClientId() { - return UUID.randomUUID().toString(); - } - -} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/canvas/rest/StoreCanvasController.java b/yshop-shop/src/main/java/co/yixiang/modules/canvas/rest/StoreCanvasController.java new file mode 100644 index 0000000000000000000000000000000000000000..8788c3232892dcfa687fad2cd0dbaefec83ef499 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/canvas/rest/StoreCanvasController.java @@ -0,0 +1,126 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.canvas.rest; +import java.util.Arrays; + +import cn.hutool.core.io.FileUtil; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; +import co.yixiang.constant.ShopConstants; +import co.yixiang.constant.SystemConfigConstants; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.tools.service.LocalStorageService; +import co.yixiang.modules.tools.service.dto.LocalStorageDto; +import co.yixiang.oss.config.OssProperties; +import co.yixiang.oss.service.OssTemplate; +import co.yixiang.utils.RedisUtils; +import lombok.AllArgsConstructor; +import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.canvas.domain.StoreCanvas; +import co.yixiang.modules.canvas.service.StoreCanvasService; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import io.swagger.annotations.*; +import java.util.HashMap; +import java.util.Map; +import org.springframework.web.multipart.MultipartFile; + +/** +* @author yshop +* @date 2021-02-01 +*/ +@AllArgsConstructor +@Api(tags = "画布管理") +@RestController +@RequestMapping("/api/canvas") +public class StoreCanvasController { + + private final StoreCanvasService storeCanvasService; + private final LocalStorageService localStorageService; + private final RedisUtils redisUtils; + private final OssProperties ossProperties; + private final OssTemplate ossTemplate; + + @ForbidSubmit + @PostMapping("/saveCanvas") + @Log("新增或修改画布") + @ApiOperation("新增或修改画布") + public ResponseEntity create(@Validated @RequestBody StoreCanvas resources){ + return new ResponseEntity<>(storeCanvasService.saveOrUpdate(resources),HttpStatus.CREATED); + } + + + @ApiOperation("上传文件") + @PostMapping("/upload") + public ResponseEntity create(@RequestParam(defaultValue = "") String name, + @RequestParam(defaultValue = "") String type, + @RequestParam("file") MultipartFile file) { + + String localUrl = redisUtils.getY(ShopConstants.ADMIN_API_URL); + if(StrUtil.isBlank(type)){ + localUrl = redisUtils.getY(SystemConfigConstants.API_URL) + "/api"; + } + String mode = redisUtils.getY(SystemConfigConstants.FILE_STORE_MODE); + StringBuilder url = new StringBuilder(); + if (ShopCommonEnum.STORE_MODE_1.getValue().toString().equals(mode)) { + // 存在走本地 + if(StrUtil.isBlank(localUrl)){ + throw new YshopException("本地上传,请先登陆系统配置后台/移动端API地址"); + } + LocalStorageDto localStorageDTO = localStorageService.create(name, file); + if ("".equals(url.toString())) { + url = url.append(localUrl + "/file/" + localStorageDTO.getType() + "/" + localStorageDTO.getRealName()); + } else { + url = url.append(","+localUrl + "/file/" + localStorageDTO.getType() + "/" + localStorageDTO.getRealName()); + } + } else { + // 走oss存储 + String [] originalFilename = file.getOriginalFilename().split("\\."); + String fileName = ossProperties.getBucketName()+"/file/"+originalFilename[0] + "-" + IdUtil.simpleUUID() + StrUtil.DOT + FileUtil.extName(file.getOriginalFilename()); + try { + ossTemplate.putObject(ossProperties.getBucketName(), fileName, file.getInputStream()); + } catch (Exception e) { + e.printStackTrace(); + } + String fileUrl = String.format(ossProperties.getCustomDomain(), fileName); + if ("".equals(url.toString())) { + url = url.append(fileUrl); + }else{ + url = url.append(","+fileUrl); + } + } + + Map map = new HashMap<>(2); + map.put("errno", 0); + map.put("link", url); + return new ResponseEntity(map, HttpStatus.CREATED); + } + + + @GetMapping("/getCanvas") + @ApiOperation(value = "读取画布数据") + public ResponseEntity getCanvas(StoreCanvas storeCanvas){ + StoreCanvas canvas = storeCanvasService.lambdaQuery().eq(StoreCanvas::getTerminal, storeCanvas.getTerminal()).one(); + return new ResponseEntity<>(canvas,HttpStatus.OK); + } + + @Log("删除画布") + @ApiOperation("删除画布") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Long[] ids) { + Arrays.asList(ids).forEach(id->{ + storeCanvasService.removeById(id); + }); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreCategoryController.java b/yshop-shop/src/main/java/co/yixiang/modules/category/rest/StoreCategoryController.java similarity index 57% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreCategoryController.java rename to yshop-shop/src/main/java/co/yixiang/modules/category/rest/StoreCategoryController.java index fb6adb85ed95ede878b82a2fbd9804c891677a25..fd6be2c3692e8adfbadddff61d6ed5701f5493f2 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreCategoryController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/category/rest/StoreCategoryController.java @@ -2,21 +2,23 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.rest; +package co.yixiang.modules.category.rest; import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; import co.yixiang.constant.ShopConstants; -import co.yixiang.exception.BadRequestException; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; -import co.yixiang.modules.shop.domain.YxStoreCategory; -import co.yixiang.modules.shop.domain.YxStoreProduct; -import co.yixiang.modules.shop.service.YxStoreCategoryService; -import co.yixiang.modules.shop.service.YxStoreProductService; -import co.yixiang.modules.shop.service.dto.YxStoreCategoryDto; -import co.yixiang.modules.shop.service.dto.YxStoreCategoryQueryCriteria; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.category.domain.YxStoreCategory; +import co.yixiang.modules.category.service.YxStoreCategoryService; +import co.yixiang.modules.category.service.dto.YxStoreCategoryDto; +import co.yixiang.modules.category.service.dto.YxStoreCategoryQueryCriteria; +import co.yixiang.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.service.YxStoreProductService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.cache.annotation.CacheEvict; @@ -25,16 +27,23 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; import java.util.List; /** - * @author hupeng - * @date 2019-10-03 - */ +* @author hupeng +* @date 2019-10-03 +*/ @Api(tags = "商城:商品分类管理") @RestController @RequestMapping("api") @@ -54,7 +63,7 @@ public class StoreCategoryController { @Log("导出数据") @ApiOperation("导出数据") @GetMapping(value = "/yxStoreCategory/download") - @PreAuthorize("@el.check('admin','cate:list')") + @PreAuthorize("@el.check('admin','YXSTORECATEGORY_SELECT')") public void download(HttpServletResponse response, YxStoreCategoryQueryCriteria criteria) throws IOException { yxStoreCategoryService.download(yxStoreCategoryService.queryAll(criteria), response); } @@ -64,92 +73,89 @@ public class StoreCategoryController { @ApiOperation(value = "查询商品分类") @GetMapping(value = "/yxStoreCategory") @PreAuthorize("hasAnyRole('admin','YXSTORECATEGORY_ALL','YXSTORECATEGORY_SELECT')") - public ResponseEntity getYxStoreCategorys(YxStoreCategoryQueryCriteria criteria, Pageable pageable) { - + public ResponseEntity getYxStoreCategorys(YxStoreCategoryQueryCriteria criteria, Pageable pageable){ List categoryDTOList = yxStoreCategoryService.queryAll(criteria); - return new ResponseEntity(yxStoreCategoryService.buildTree(categoryDTOList), HttpStatus.OK); + return new ResponseEntity<>(yxStoreCategoryService.buildTree(categoryDTOList),HttpStatus.OK); } + @ForbidSubmit @Log("新增商品分类") @ApiOperation(value = "新增商品分类") @PostMapping(value = "/yxStoreCategory") - @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) @PreAuthorize("hasAnyRole('admin','YXSTORECATEGORY_ALL','YXSTORECATEGORY_CREATE')") - public ResponseEntity create(@Validated @RequestBody YxStoreCategory resources) { - - if (resources.getPid() > 0 && StrUtil.isBlank(resources.getPic())) { - throw new BadRequestException("子分类图片必传"); + public ResponseEntity create(@Validated @RequestBody YxStoreCategory resources){ + if(resources.getPid() != null && resources.getPid() > 0 && StrUtil.isBlank(resources.getPic())) { + throw new YshopException("子分类图片必传"); } - boolean checkResult = yxStoreCategoryService.checkCategory(resources.getPid()); - - if (!checkResult) { - throw new BadRequestException("分类最多能添加2级哦"); + if(!checkResult) { + throw new YshopException("分类最多能添加2级哦"); } - return new ResponseEntity(yxStoreCategoryService.save(resources), HttpStatus.CREATED); + return new ResponseEntity<>(yxStoreCategoryService.save(resources),HttpStatus.CREATED); } - @NoRepeatSubmit + @ForbidSubmit @Log("修改商品分类") @ApiOperation(value = "修改商品分类") - @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) @PutMapping(value = "/yxStoreCategory") @PreAuthorize("hasAnyRole('admin','YXSTORECATEGORY_ALL','YXSTORECATEGORY_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxStoreCategory resources) { - - if (resources.getPid() > 0 && StrUtil.isBlank(resources.getPic())) { - throw new BadRequestException("子分类图片必传"); + public ResponseEntity update(@Validated @RequestBody YxStoreCategory resources){ + if(resources.getPid() != null && resources.getPid() > 0 && StrUtil.isBlank(resources.getPic())) { + throw new YshopException("子分类图片必传"); } - if (resources.getId().equals(resources.getPid())) { - throw new BadRequestException("自己不能选择自己哦"); + if(resources.getId().equals(resources.getPid())){ + throw new YshopException("自己不能选择自己哦"); } boolean checkResult = yxStoreCategoryService.checkCategory(resources.getPid()); - if (!checkResult) { - throw new BadRequestException("分类最多能添加2级哦"); + if(!checkResult) { + throw new YshopException("分类最多能添加2级哦"); } yxStoreCategoryService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } + @ForbidSubmit @Log("删除商品分类") @ApiOperation(value = "删除商品分类") - @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) @DeleteMapping(value = "/yxStoreCategory/{id}") @PreAuthorize("hasAnyRole('admin','YXSTORECATEGORY_ALL','YXSTORECATEGORY_DELETE')") - public ResponseEntity delete(@PathVariable String id) { - + public ResponseEntity delete(@PathVariable String id){ String[] ids = id.split(","); - for (String newId : ids) { + for (String newId: ids) { this.delCheck(Integer.valueOf(newId)); yxStoreCategoryService.removeById(Integer.valueOf(newId)); } return new ResponseEntity(HttpStatus.OK); } + /** * 检测删除分类 * @param id 分类id */ - private void delCheck(Integer id) { + private void delCheck(Integer id){ Long count = yxStoreCategoryService.lambdaQuery() - .eq(YxStoreCategory::getPid, id) + .eq(YxStoreCategory::getPid,id) .count(); - if (count > 0) { - throw new BadRequestException("请先删除子分类"); + if(count > 0) { + throw new YshopException("请先删除子分类"); } Long countP = yxStoreProductService.lambdaQuery() - .eq(YxStoreProduct::getCateId, id) + .eq(YxStoreProduct::getCateId,id) .count(); - if (countP > 0) { - throw new BadRequestException("当前分类下有商品不可删除"); + if(countP > 0) { + throw new YshopException("当前分类下有商品不可删除"); } } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/customer/rest/QrCodeController.java b/yshop-shop/src/main/java/co/yixiang/modules/customer/rest/QrCodeController.java new file mode 100644 index 0000000000000000000000000000000000000000..4ad69f33dd0dbb96d8ceabe87026224d4c027f31 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/customer/rest/QrCodeController.java @@ -0,0 +1,116 @@ +package co.yixiang.modules.customer.rest; + +import cn.hutool.core.util.StrUtil; +import co.yixiang.annotation.AnonymousAccess; +import co.yixiang.constant.ShopConstants; +import co.yixiang.exception.BadRequestException; +import co.yixiang.modules.mp.config.WxMpConfiguration; +import co.yixiang.utils.RecodeUtil; +import co.yixiang.utils.RedisUtil; +import co.yixiang.utils.RedisUtils; +import com.alibaba.fastjson.JSONObject; +import io.swagger.annotations.Api; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.api.WxConsts; +import me.chanjar.weixin.common.bean.WxOAuth2UserInfo; +import me.chanjar.weixin.common.bean.oauth2.WxOAuth2AccessToken; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.mp.api.WxMpService; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.stereotype.Controller; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.ResponseBody; + +import javax.servlet.http.HttpServletRequest; +import javax.servlet.http.HttpServletResponse; +import java.net.URLEncoder; + +/** + * @author lioncity + * @date 2020-03-21 + */ +@Slf4j +@Api(tags = "微信") +@Controller +@RequestMapping("/api/wxmp") +@AllArgsConstructor +public class QrCodeController { + + private final RedisUtils redisUtils; + /** + * 生成微信图片二维码 + * + * @param request + * @param response + * @ + */ + @AnonymousAccess + @GetMapping("/qrcode") + public void qrcode(HttpServletRequest request, HttpServletResponse response, @RequestParam("key") String key) { + String adminApiUrl = redisUtils.getY(ShopConstants.ADMIN_API_URL); + if(StrUtil.isBlank(adminApiUrl)){ + throw new BadRequestException("请配置后台-->商城配置-->商城系统配置-->后台Api地址"); + } + final WxMpService wxService = WxMpConfiguration.getWxMpService(); + if (wxService == null) { + throw new IllegalArgumentException("未找到对应配置的服务,请核实!"); + } + String state = key; + String url = adminApiUrl + "/api/wxmp/userInfo"; + String redirectURL = wxService.getOAuth2Service().buildAuthorizationUrl(url, WxConsts.OAuth2Scope.SNSAPI_USERINFO, URLEncoder.encode(state)); + log.info("【微信网页授权】获取code,redirectURL={}", redirectURL); + //调用工具类,生成二维码 + //180为图片高度和宽度 + RecodeUtil.creatRrCode(redirectURL, 180, 180, response); + } + + @AnonymousAccess + @GetMapping("/wechatCode") + public ResponseEntity wechatCode() { + String wechatFollowImg = redisUtils.getY(ShopConstants.WECHAT_FOLLOW_IMG); + if(StrUtil.isBlank(wechatFollowImg)){ + throw new BadRequestException("请配置后台-->微信管理-->公众号配置->关注二维码"); + } + return ResponseEntity.ok(wechatFollowImg); + } + + @AnonymousAccess + @ResponseBody + @GetMapping("/userInfo") + public void userInfo(HttpServletRequest request, @RequestParam("code") String code, + @RequestParam("state") String key) throws Exception { + log.info("【微信网页授权】code={}", code); + log.info("【微信网页授权】state={}", key); + final WxMpService wxService = WxMpConfiguration.getWxMpService(); + if (wxService == null) { + throw new IllegalArgumentException("未找到对应配置的服务,请核实!"); + } + try { + WxOAuth2AccessToken wxOAuth2AccessToken = wxService.getOAuth2Service().getAccessToken(code); + WxOAuth2UserInfo wxOAuth2UserInfo = wxService.getOAuth2Service().getUserInfo(wxOAuth2AccessToken, "zh_CN"); + RedisUtil.set("qrCode:" + key, wxOAuth2UserInfo.getOpenid() + ":" + wxOAuth2UserInfo.getNickname()); + log.info("【微信网页授权】wxMpUser={}", wxOAuth2UserInfo); + } catch (WxErrorException e) { + log.info("【微信网页授权】{}", e); + throw new Exception(e.getError().getErrorMsg()); + } + } + + @ResponseBody + @GetMapping("/getOpenId") + public ResponseEntity userInfo(HttpServletRequest request, @RequestParam("key") String key) { + String openId = RedisUtil.get("qrCode:" + key); + if (openId != null) { + String[] str = openId.split(":"); + JSONObject json = new JSONObject(); + json.put("openId", str[0]); + json.put("nickName", str[1]); + return new ResponseEntity(json, HttpStatus.OK); + } + return new ResponseEntity(HttpStatus.OK); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/customer/rest/YxStoreCustomerController.java b/yshop-shop/src/main/java/co/yixiang/modules/customer/rest/YxStoreCustomerController.java new file mode 100644 index 0000000000000000000000000000000000000000..3b22909054936367ec27fd56d0f7e18e8bf67ec2 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/customer/rest/YxStoreCustomerController.java @@ -0,0 +1,95 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.customer.rest; +import java.util.Arrays; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.exception.BadRequestException; +import co.yixiang.modules.aop.ForbidSubmit; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import lombok.AllArgsConstructor; +import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.customer.domain.YxStoreCustomer; +import co.yixiang.modules.customer.service.YxStoreCustomerService; +import co.yixiang.modules.customer.service.dto.YxStoreCustomerQueryCriteria; +import co.yixiang.modules.customer.service.dto.YxStoreCustomerDto; +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; +import co.yixiang.domain.PageResult; +/** +* @author Bug +* @date 2020-12-10 +*/ +@AllArgsConstructor +@Api(tags = "customer管理") +@RestController +@RequestMapping("/api/yxStoreCustomer") +public class YxStoreCustomerController { + + private final YxStoreCustomerService yxStoreCustomerService; + private final IGenerator generator; + + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('admin','yxStoreCustomer:list')") + public void download(HttpServletResponse response, YxStoreCustomerQueryCriteria criteria) throws IOException { + yxStoreCustomerService.download(generator.convert(yxStoreCustomerService.queryAll(criteria), YxStoreCustomerDto.class), response); + } + + @GetMapping + @Log("查询customer") + @ApiOperation("查询customer") + @PreAuthorize("@el.check('admin','yxStoreCustomer:list')") + public ResponseEntity> getYxStoreCustomers(YxStoreCustomerQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxStoreCustomerService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @ForbidSubmit + @PostMapping + @Log("新增customer") + @ApiOperation("新增customer") + @PreAuthorize("@el.check('admin','yxStoreCustomer:add')") + public ResponseEntity create(@Validated @RequestBody YxStoreCustomer resources){ + Long count = yxStoreCustomerService.count(new LambdaQueryWrapper().eq(YxStoreCustomer::getOpenId, resources.getOpenId())); + if (count > 0) { + throw new BadRequestException("当前用户已存在,请勿重复提交"); + } + return new ResponseEntity<>(yxStoreCustomerService.save(resources),HttpStatus.CREATED); + } + + @ForbidSubmit + @PutMapping + @Log("修改customer") + @ApiOperation("修改customer") + @PreAuthorize("@el.check('admin','yxStoreCustomer:edit')") + public ResponseEntity update(@Validated @RequestBody YxStoreCustomer resources){ + yxStoreCustomerService.updateById(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @ForbidSubmit + @Log("删除customer") + @ApiOperation("删除customer") + @PreAuthorize("@el.check('admin','yxStoreCustomer:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Long[] ids) { + Arrays.asList(ids).forEach(id->{ + yxStoreCustomerService.removeById(id); + }); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreOrderController.java b/yshop-shop/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java similarity index 53% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreOrderController.java rename to yshop-shop/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java index fe14bb881c3e11c8a2c021835014fce2ea831e59..7529971f2e7c87e43aaef89bf316a36cad1abc6c 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreOrderController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/order/rest/StoreOrderController.java @@ -2,50 +2,43 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.rest; +package co.yixiang.modules.order.rest; -import cn.hutool.core.date.DateUtil; import cn.hutool.core.util.IdUtil; 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.constant.ShopConstants; import co.yixiang.dozer.service.IGenerator; import co.yixiang.enums.OrderInfoEnum; import co.yixiang.enums.OrderLogEnum; +import co.yixiang.enums.ShipperCodeEnum; +import co.yixiang.enums.ShopCommonEnum; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.activity.service.YxStorePinkService; -import co.yixiang.modules.aop.NoRepeatSubmit; -import co.yixiang.modules.shop.domain.YxStoreOrder; -import co.yixiang.modules.shop.domain.YxStoreOrderStatus; -import co.yixiang.modules.shop.domain.YxUser; -import co.yixiang.modules.shop.service.YxExpressService; -import co.yixiang.modules.shop.service.YxStoreOrderService; -import co.yixiang.modules.shop.service.YxStoreOrderStatusService; -import co.yixiang.modules.shop.service.YxUserService; -import co.yixiang.modules.shop.service.dto.OrderCountDto; -import co.yixiang.modules.shop.service.dto.WechatUserDto; -import co.yixiang.modules.shop.service.dto.YxExpressDto; -import co.yixiang.modules.shop.service.dto.YxStoreOrderDto; -import co.yixiang.modules.shop.service.dto.YxStoreOrderQueryCriteria; -import co.yixiang.modules.shop.service.param.ExpressParam; -import co.yixiang.modules.mp.service.YxTemplateService; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.order.domain.YxStoreOrder; +import co.yixiang.modules.order.domain.YxStoreOrderStatus; +import co.yixiang.modules.order.param.ExpressParam; +import co.yixiang.modules.order.service.YxStoreOrderService; +import co.yixiang.modules.order.service.YxStoreOrderStatusService; +import co.yixiang.modules.order.service.dto.*; import co.yixiang.modules.tools.express.ExpressService; +import co.yixiang.modules.tools.express.config.ExpressAutoConfiguration; import co.yixiang.modules.tools.express.dao.ExpressInfo; -import com.alibaba.fastjson.JSON; +import co.yixiang.modules.tools.express.dao.Traces; import com.alibaba.fastjson.JSONArray; -import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.apache.commons.lang3.StringUtils; import org.springframework.beans.factory.annotation.Value; import org.springframework.data.domain.Pageable; -import org.springframework.data.redis.core.RedisTemplate; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; @@ -59,15 +52,15 @@ import org.springframework.web.bind.annotation.RequestBody; import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RequestParam; import org.springframework.web.bind.annotation.RestController; -import org.springframework.web.client.RestTemplate; import javax.servlet.http.HttpServletResponse; import java.io.IOException; +import java.math.BigDecimal; import java.text.ParseException; -import java.util.Date; +import java.util.ArrayList; import java.util.List; import java.util.Map; -import java.util.concurrent.TimeUnit; +import java.util.stream.Collectors; /** * @author hupeng @@ -77,6 +70,7 @@ import java.util.concurrent.TimeUnit; @RestController @RequestMapping("api") @Slf4j +@SuppressWarnings("unchecked") public class StoreOrderController { @Value("${yshop.apiUrl}") @@ -85,64 +79,124 @@ public class StoreOrderController { private final IGenerator generator; private final YxStoreOrderService yxStoreOrderService; private final YxStoreOrderStatusService yxStoreOrderStatusService; - private final YxExpressService yxExpressService; - private final YxUserService userService; - private final RedisTemplate redisTemplate; - private final YxTemplateService templateService; - private final ExpressService expressService; - - - public StoreOrderController(IGenerator generator, YxStoreOrderService yxStoreOrderService, YxStoreOrderStatusService yxStoreOrderStatusService, - YxExpressService yxExpressService, YxUserService userService, - RedisTemplate redisTemplate, - YxTemplateService templateService, YxStorePinkService storePinkService, - ExpressService expressService) { + + + public StoreOrderController(IGenerator generator, YxStoreOrderService yxStoreOrderService, + YxStoreOrderStatusService yxStoreOrderStatusService) { this.generator = generator; this.yxStoreOrderService = yxStoreOrderService; this.yxStoreOrderStatusService = yxStoreOrderStatusService; - this.yxExpressService = yxExpressService; - this.userService = userService; - this.redisTemplate = redisTemplate; - this.templateService = templateService; - this.expressService = expressService; } /**@Valid * 根据商品分类统计订单占比 */ @GetMapping("/yxStoreOrder/orderCount") - @ApiOperation(value = "根据商品分类统计订单占比", notes = "根据商品分类统计订单占比", response = ExpressParam.class) - public ResponseEntity orderCount() { - OrderCountDto orderCountDto = yxStoreOrderService.getOrderCount(); - return new ResponseEntity(orderCountDto, HttpStatus.OK); + @ApiOperation(value = "根据商品分类统计订单占比",notes = "根据商品分类统计订单占比",response = ExpressParam.class) + public ResponseEntity orderCount(){ + OrderCountDto orderCountDto = yxStoreOrderService.getOrderCount(); + return new ResponseEntity<>(orderCountDto, HttpStatus.OK); } + /** + * 首页订单/用户等统计 + * @return OrderTimeDataDto + */ @GetMapping(value = "/data/count") @AnonymousAccess public ResponseEntity getCount() { - return new ResponseEntity(yxStoreOrderService.getOrderTimeData(), HttpStatus.OK); + return new ResponseEntity<>(yxStoreOrderService.getOrderTimeData(), HttpStatus.OK); } + /** + * 返回本月订单金额与数量chart + * @return map + */ @GetMapping(value = "/data/chart") @AnonymousAccess public ResponseEntity getChart() { - return new ResponseEntity(yxStoreOrderService.chartCount(), HttpStatus.OK); + return new ResponseEntity<>(yxStoreOrderService.chartCount(), HttpStatus.OK); } @ApiOperation(value = "查询订单") @GetMapping(value = "/yxStoreOrder") - @PreAuthorize("hasAnyRole('admin','YXSTOREORDER_ALL','YXSTOREORDER_SELECT')") + @PreAuthorize("hasAnyRole('admin','YXSTOREORDER_ALL','YXSTOREORDER_SELECT','YXEXPRESS_SELECT')") public ResponseEntity getYxStoreOrders(YxStoreOrderQueryCriteria criteria, Pageable pageable, @RequestParam(name = "orderStatus") String orderStatus, @RequestParam(name = "orderType") String orderType) { - return new ResponseEntity(yxStoreOrderService.queryAll(handleQuery(criteria,orderStatus,orderType), pageable), HttpStatus.OK); + YxStoreOrderQueryCriteria newCriteria = this.handleQuery(criteria,orderStatus,orderType); + + return new ResponseEntity<>(yxStoreOrderService.queryAll(newCriteria, pageable), HttpStatus.OK); + } + + @ApiOperation(value = "根据订单id获取订单详情") + @GetMapping(value = "/getStoreOrderDetail/{id}") + @PreAuthorize("hasAnyRole('admin','YXSTOREORDER_ALL','YXSTOREORDER_SELECT','YXEXPRESS_SELECT')") + public ResponseEntity getYxStoreOrders(@PathVariable Long id) { + return new ResponseEntity<>(yxStoreOrderService.getOrderDetail(id), HttpStatus.OK); } + @ApiOperation(value = "查询订单当前状态流程") + @GetMapping(value = "/getNowOrderStatus/{id}") + public ResponseEntity getNowOrderStatus(@PathVariable Long id) { + List statusList = new ArrayList<>(); + statusList.add(OrderLogEnum.CREATE_ORDER.getValue()); + statusList.add(OrderLogEnum.PAY_ORDER_SUCCESS.getValue()); + statusList.add(OrderLogEnum.DELIVERY_GOODS.getValue()); + statusList.add(OrderLogEnum.TAKE_ORDER_DELIVERY.getValue()); + statusList.add(OrderLogEnum.EVAL_ORDER.getValue()); + List orderStatusLogList = yxStoreOrderStatusService.list(new LambdaQueryWrapper().eq(YxStoreOrderStatus::getOid, id).in(YxStoreOrderStatus::getChangeType, statusList).orderByDesc(YxStoreOrderStatus::getChangeTime)); + List dtoList = getOrderStatusDto(orderStatusLogList); + YxOrderNowOrderStatusDto yxOrderNowOrderStatusDto = new YxOrderNowOrderStatusDto(); + yxOrderNowOrderStatusDto.setSize(dtoList.size()); + dtoList.forEach(dto -> { + if (OrderLogEnum.CREATE_ORDER.getDesc().equals(dto.getChangeType())) { + yxOrderNowOrderStatusDto.setCacheKeyCreateOrder(dto.getChangeTime()); + } + if (OrderLogEnum.PAY_ORDER_SUCCESS.getDesc().equals(dto.getChangeType())) { + yxOrderNowOrderStatusDto.setPaySuccess(dto.getChangeTime()); + } + if (OrderLogEnum.DELIVERY_GOODS.getDesc().equals(dto.getChangeType())) { + yxOrderNowOrderStatusDto.setDeliveryGoods(dto.getChangeTime()); + } + if (OrderLogEnum.TAKE_ORDER_DELIVERY.getDesc().equals(dto.getChangeType())) { + yxOrderNowOrderStatusDto.setUserTakeDelivery(dto.getChangeTime()); + yxOrderNowOrderStatusDto.setOrderVerific(dto.getChangeTime()); + } + if (OrderLogEnum.EVAL_ORDER.getDesc().equals(dto.getChangeType())) { + yxOrderNowOrderStatusDto.setCheckOrderOver(dto.getChangeTime()); + } + }); + + + statusList = new ArrayList<>(); + statusList.add(OrderLogEnum.REFUND_ORDER_APPLY.getValue()); + statusList.add(OrderLogEnum.REFUND_ORDER_SUCCESS.getValue()); + orderStatusLogList = yxStoreOrderStatusService.list(new LambdaQueryWrapper().eq(YxStoreOrderStatus::getOid, id).in(YxStoreOrderStatus::getChangeType, statusList).orderByDesc(YxStoreOrderStatus::getChangeTime)); + dtoList = getOrderStatusDto(orderStatusLogList); + dtoList.forEach(dto -> { + if (OrderLogEnum.REFUND_ORDER_APPLY.getDesc().equals(dto.getChangeType())) { + yxOrderNowOrderStatusDto.setApplyRefund(dto.getChangeTime()); + } + if (OrderLogEnum.REFUND_ORDER_SUCCESS.getDesc().equals(dto.getChangeType())) { + yxOrderNowOrderStatusDto.setRefundOrderSuccess(dto.getChangeTime()); + } + }); - @NoRepeatSubmit + return new ResponseEntity(yxOrderNowOrderStatusDto, HttpStatus.OK); + } + public List getOrderStatusDto(List orderStatusLogList) { + List dtoList = orderStatusLogList.stream().map(log -> { + YxStoreOrderStatusDto dto = generator.convert(log, YxStoreOrderStatusDto.class); + dto.setChangeType(OrderLogEnum.getDesc(dto.getChangeType())); + dto.setChangeTime(log.getChangeTime()); + return dto; + }).collect(Collectors.toList()); + return dtoList; + } @ApiOperation(value = "发货") @PutMapping(value = "/yxStoreOrder") @PreAuthorize("hasAnyRole('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')") @@ -153,49 +207,30 @@ public class StoreOrderController { if (StrUtil.isBlank(resources.getDeliveryId())) { throw new BadRequestException("快递单号不能为空"); } - YxExpressDto expressDTO = generator.convert(yxExpressService.getById(Integer.valueOf(resources - .getDeliveryName())), YxExpressDto.class); - if (ObjectUtil.isNull(expressDTO)) { - throw new BadRequestException("请先添加快递公司"); - } - resources.setStatus(1); - resources.setDeliveryType("express"); - resources.setDeliveryName(expressDTO.getName()); - resources.setDeliverySn(expressDTO.getCode()); - - yxStoreOrderService.update(resources); - - YxStoreOrderStatus storeOrderStatus = new YxStoreOrderStatus(); - storeOrderStatus.setOid(resources.getId()); - storeOrderStatus.setChangeType("delivery_goods"); - storeOrderStatus.setChangeMessage("已发货 快递公司:" + resources.getDeliveryName() - + " 快递单号:" + resources.getDeliveryId()); - storeOrderStatus.setChangeTime(new Date()); - - yxStoreOrderStatusService.save(storeOrderStatus); - - //模板消息通知 - try { - String openid = this.getUserOpenid(resources.getUid()); - if(StrUtil.isNotBlank(openid)){ - templateService.deliverySuccessNotice(resources.getOrderId(), - expressDTO.getName(), resources.getDeliveryId(), openid); - } - } catch (Exception e) { - log.info("当前用户不是微信用户不能发送模板消息哦!"); - } - //加入redis,7天后自动确认收货 - String redisKey = String.valueOf(StrUtil.format("{}{}", - ShopConstants.REDIS_ORDER_OUTTIME_UNCONFIRM, resources.getId())); - redisTemplate.opsForValue().set(redisKey, resources.getOrderId(), - ShopConstants.ORDER_OUTTIME_UNCONFIRM, TimeUnit.DAYS); + yxStoreOrderService.orderDelivery(resources.getOrderId(),resources.getDeliveryId(), + resources.getDeliveryName(),resources.getDeliveryType()); + return new ResponseEntity(HttpStatus.NO_CONTENT); + } + @ApiOperation(value = "修改快递单号") + @PutMapping(value = "/yxStoreOrder/updateDelivery") + @PreAuthorize("hasAnyAuthority('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')") + public ResponseEntity updateDelivery(@Validated @RequestBody YxStoreOrder resources) { + if (StrUtil.isBlank(resources.getDeliveryName())) { + throw new BadRequestException("请选择快递公司"); + } + if (StrUtil.isBlank(resources.getDeliveryId())) { + throw new BadRequestException("快递单号不能为空"); + } + yxStoreOrderService.updateDelivery(resources.getOrderId(),resources.getDeliveryId(), + resources.getDeliveryName(),resources.getDeliveryType()); return new ResponseEntity(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + + @ApiOperation(value = "订单核销") @PutMapping(value = "/yxStoreOrder/check") @PreAuthorize("hasAnyRole('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')") @@ -203,79 +238,42 @@ public class StoreOrderController { if (StrUtil.isBlank(resources.getVerifyCode())) { throw new BadRequestException("核销码不能为空"); } - YxStoreOrderDto storeOrderDTO = generator.convert(yxStoreOrderService.getById(resources.getId()), YxStoreOrderDto.class); - if (!resources.getVerifyCode().equals(storeOrderDTO.getVerifyCode())) { + YxStoreOrderDto storeOrderDTO = generator.convert(yxStoreOrderService.getById(resources.getId()),YxStoreOrderDto.class); + if(!resources.getVerifyCode().equals(storeOrderDTO.getVerifyCode())){ throw new BadRequestException("核销码不对"); } - if (OrderInfoEnum.PAY_STATUS_0.getValue().equals(storeOrderDTO.getPaid())) { + if(OrderInfoEnum.PAY_STATUS_0.getValue().equals(storeOrderDTO.getPaid())){ throw new BadRequestException("订单未支付"); } - /** - if(storeOrderDTO.getStatus() > 0) throw new BadRequestException("订单已核销"); - - if(storeOrderDTO.getCombinationId() > 0 && storeOrderDTO.getPinkId() > 0){ - YxStorePinkDTO storePinkDTO = storePinkService.findById(storeOrderDTO.getPinkId()); - if(!OrderInfoEnum.PINK_STATUS_2.getValue().equals(storePinkDTO.getStatus())){ - throw new BadRequestException("拼团订单暂未成功无法核销"); - } - } - **/ - - //远程调用API - RestTemplate rest = new RestTemplate(); - 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"); - String msg = jsonObject.getString("msg"); - - if (status != 200) { - throw new BadRequestException(msg); - } - + yxStoreOrderService.verifyOrder(resources.getVerifyCode(), + OrderInfoEnum.CONFIRM_STATUS_1.getValue(),null); return new ResponseEntity(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit @ApiOperation(value = "退款") @PostMapping(value = "/yxStoreOrder/refund") @PreAuthorize("hasAnyRole('admin','YXSTOREORDER_ALL','YXSTOREORDER_EDIT')") public ResponseEntity refund(@Validated @RequestBody YxStoreOrder resources) { - yxStoreOrderService.refund(resources); - - //模板消息通知 - try { - String openid = this.getUserOpenid(resources.getUid()); - if(StrUtil.isNotBlank(openid)){ - templateService.refundSuccessNotice(resources.getOrderId(), - resources.getPayPrice().toString(), openid, DateUtil.formatTime(new Date())); - } - } catch (Exception e) { - log.info("当前用户不是微信用户不能发送模板消息哦!"); - } - - + yxStoreOrderService.orderRefund(resources.getOrderId(),resources.getPayPrice(), + ShopCommonEnum.AGREE_1.getValue(), null); return new ResponseEntity(HttpStatus.NO_CONTENT); } + @ForbidSubmit @Log("删除") @ApiOperation(value = "删除") @DeleteMapping(value = "/yxStoreOrder/{id}") @PreAuthorize("hasAnyRole('admin','YXSTOREORDER_ALL','YXSTOREORDER_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { - + public ResponseEntity delete(@PathVariable Long id) { yxStoreOrderService.removeById(id); return new ResponseEntity(HttpStatus.OK); } - @NoRepeatSubmit + @Log("修改订单") @ApiOperation(value = "修改订单") @PostMapping(value = "/yxStoreOrder/edit") @@ -287,30 +285,22 @@ public class StoreOrderController { if (resources.getPayPrice().doubleValue() < 0) { throw new BadRequestException("金额不能低于0"); } - - YxStoreOrderDto storeOrder = generator.convert(yxStoreOrderService.getById(resources.getId()), YxStoreOrderDto.class); + YxStoreOrderDto storeOrder = generator.convert(yxStoreOrderService.getById(resources.getId()),YxStoreOrderDto.class); //判断金额是否有变动,生成一个额外订单号去支付 - int res = NumberUtil.compare(storeOrder.getPayPrice().doubleValue(), resources.getPayPrice().doubleValue()); if (res != 0) { String orderSn = IdUtil.getSnowflake(0, 0).nextIdStr(); resources.setExtendOrderId(orderSn); } - yxStoreOrderService.saveOrUpdate(resources); - YxStoreOrderStatus storeOrderStatus = new YxStoreOrderStatus(); - storeOrderStatus.setOid(resources.getId()); - storeOrderStatus.setChangeType(OrderLogEnum.ORDER_EDIT.getValue()); - storeOrderStatus.setChangeMessage("修改订单价格为:" + resources.getPayPrice()); - storeOrderStatus.setChangeTime(new Date()); - - yxStoreOrderStatusService.save(storeOrderStatus); + yxStoreOrderStatusService.create(resources.getId(),OrderLogEnum.ORDER_EDIT.getValue(), + "修改订单价格为:" + resources.getPayPrice()); return new ResponseEntity(HttpStatus.OK); } - @NoRepeatSubmit + @Log("修改订单备注") @ApiOperation(value = "修改订单备注") @PostMapping(value = "/yxStoreOrder/remark") @@ -324,24 +314,40 @@ public class StoreOrderController { } - /**@Valid - * 获取物流信息, 根据传的订单编号 ShipperCode快递公司编号 和物流单号, + /** + * 快递查询 */ @PostMapping("/yxStoreOrder/express") - @ApiOperation(value = "获取物流信息", notes = "获取物流信息", response = ExpressParam.class) - public ResponseEntity express(@RequestBody ExpressParam expressInfoDo) { + @ApiOperation(value = "获取物流信息",notes = "获取物流信息",response = ExpressParam.class) + public ResponseEntity express( @RequestBody ExpressParam expressInfoDo){ + + //顺丰轨迹查询处理 + String lastFourNumber = ""; + if (expressInfoDo.getShipperCode().equals(ShipperCodeEnum.SF.getValue())) { + YxStoreOrderDto yxStoreOrderDto; + yxStoreOrderDto = yxStoreOrderService.getOrderDetail(Long.valueOf(expressInfoDo.getOrderCode())); + lastFourNumber = yxStoreOrderDto.getUserPhone(); + if (lastFourNumber.length()==11) { + lastFourNumber = StrUtil.sub(lastFourNumber,lastFourNumber.length(),-4); + } + } + + ExpressService expressService = ExpressAutoConfiguration.expressService(); ExpressInfo expressInfo = expressService.getExpressInfo(expressInfoDo.getOrderCode(), - expressInfoDo.getShipperCode(), expressInfoDo.getLogisticCode()); - if (!expressInfo.isSuccess()) { + expressInfoDo.getShipperCode(), expressInfoDo.getLogisticCode(),lastFourNumber); + List expressInfoTraces = expressInfo.getTraces(); + // 根据时间倒序 + expressInfoTraces.sort((o1, o2) -> o2.getAcceptTime().compareTo(o1.getAcceptTime())); + if(!expressInfo.isSuccess()) { throw new BadRequestException(expressInfo.getReason()); } - return new ResponseEntity(expressInfo, HttpStatus.OK); + return new ResponseEntity<>(expressInfo, HttpStatus.OK); } @Log("导出数据") @ApiOperation("导出数据") @GetMapping(value = "/yxStoreOrder/download") - @PreAuthorize("hasAnyRole('admin','cate:list')") + @PreAuthorize("hasAnyRole('admin','YXSTOREORDER_SELECT')") public void download(HttpServletResponse response, YxStoreOrderQueryCriteria criteria, Pageable pageable, @@ -349,45 +355,34 @@ public class StoreOrderController { @RequestParam(name = "orderType") String orderType, @RequestParam(name = "listContent") String listContent) throws IOException, ParseException { List list; - if (StringUtils.isEmpty(listContent)) { - list = (List) getYxStoreList(criteria, pageable, orderStatus, orderType).get("content"); - } else { + if(StringUtils.isEmpty(listContent)){ + list = (List)getYxStoreList(criteria, pageable, orderStatus, orderType).get("content"); + }else { List idList = JSONArray.parseArray(listContent).toJavaList(String.class); - list = (List) yxStoreOrderService.queryAll(idList).get("content"); + list = (List)yxStoreOrderService.queryAll(idList).get("content"); } yxStoreOrderService.download(list, response); } - public Map getYxStoreList(YxStoreOrderQueryCriteria criteria, - Pageable pageable, - String orderStatus, - String orderType) { - - return yxStoreOrderService.queryAll(handleQuery(criteria, orderStatus, orderType), pageable); - } - /** - * 获取openid - * @param uid uid - * @return String + * 下载数据 + * @param criteria criteria + * @param pageable pageable + * @param orderStatus orderStatus + * @param orderType orderType + * @return Map */ - private String getUserOpenid(Long uid){ - YxUser yxUser = userService.getById(uid); - if(yxUser == null) { - return ""; - } - - WechatUserDto wechatUserDto = yxUser.getWxProfile(); - if(wechatUserDto == null) { - return ""; - } - if(StrUtil.isBlank(wechatUserDto.getOpenid())) { - return ""; - } - return wechatUserDto.getOpenid(); + private Map getYxStoreList(YxStoreOrderQueryCriteria criteria, + Pageable pageable, + String orderStatus, + String orderType){ + YxStoreOrderQueryCriteria newCriteria = this.handleQuery(criteria,orderStatus,orderType); + return yxStoreOrderService.queryAll(newCriteria, pageable); } + + /** * 处理订单查询 * @param criteria YxStoreOrderQueryCriteria @@ -459,6 +454,9 @@ public class StoreOrderController { case "5": criteria.setShippingType(2); break; + case "6": + criteria.setPayIntegral(new BigDecimal("0.00")); + break; default: } } @@ -467,4 +465,5 @@ public class StoreOrderController { } + } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/product/rest/StoreProductController.java b/yshop-shop/src/main/java/co/yixiang/modules/product/rest/StoreProductController.java new file mode 100644 index 0000000000000000000000000000000000000000..6791c3b29e7e5dab33221f6060f51b86668c60e2 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/product/rest/StoreProductController.java @@ -0,0 +1,308 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.product.rest; + +import cn.hutool.core.bean.BeanUtil; +import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.enums.SpecTypeEnum; +import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.category.domain.YxStoreCategory; +import co.yixiang.modules.category.service.YxStoreCategoryService; +import co.yixiang.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.domain.YxStoreProductAttrResult; +import co.yixiang.modules.product.domain.YxStoreProductAttrValue; +import co.yixiang.modules.product.service.YxStoreProductAttrResultService; +import co.yixiang.modules.product.service.YxStoreProductAttrValueService; +import co.yixiang.modules.product.service.YxStoreProductRuleService; +import co.yixiang.modules.product.service.YxStoreProductService; +import co.yixiang.modules.product.service.dto.ProductDto; +import co.yixiang.modules.product.service.dto.ProductFormatDto; +import co.yixiang.modules.product.service.dto.StoreProductDto; +import co.yixiang.modules.product.service.dto.YxStoreProductQueryCriteria; +import co.yixiang.modules.template.domain.YxShippingTemplates; +import co.yixiang.modules.template.service.YxShippingTemplatesService; +import com.alibaba.fastjson.JSON; +import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import org.springframework.beans.BeanUtils; +import org.springframework.cache.annotation.CacheEvict; +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.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.*; +import java.util.stream.Collectors; + +/** + * @author hupeng + * @date 2019-10-04 + */ +@Api(tags = "商城:商品管理") +@RestController +@RequestMapping("api") +public class StoreProductController { + + private final YxStoreProductService yxStoreProductService; + private final YxStoreCategoryService yxStoreCategoryService; + private final YxShippingTemplatesService yxShippingTemplatesService; + private final YxStoreProductRuleService yxStoreProductRuleService; + private final YxStoreProductAttrResultService yxStoreProductAttrResultService; + private final YxStoreProductAttrValueService storeProductAttrValueService; + private final IGenerator generator; + public StoreProductController(YxStoreProductService yxStoreProductService, + YxStoreCategoryService yxStoreCategoryService, + YxShippingTemplatesService yxShippingTemplatesService, + YxStoreProductRuleService yxStoreProductRuleService, + YxStoreProductAttrResultService yxStoreProductAttrResultService, YxStoreProductAttrValueService storeProductAttrValueService, IGenerator generator) { + this.yxStoreProductService = yxStoreProductService; + this.yxStoreCategoryService = yxStoreCategoryService; + this.yxShippingTemplatesService = yxShippingTemplatesService; + this.yxStoreProductRuleService = yxStoreProductRuleService; + this.yxStoreProductAttrResultService = yxStoreProductAttrResultService; + this.storeProductAttrValueService = storeProductAttrValueService; + this.generator = generator; + } + + @Log("查询商品") + @ApiOperation(value = "查询商品") + @GetMapping(value = "/yxStoreProduct") + @PreAuthorize("hasAnyRole('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_SELECT')") + public ResponseEntity getYxStoreProducts(YxStoreProductQueryCriteria criteria, Pageable pageable){ + //商品分类 + List storeCategories = yxStoreCategoryService.lambdaQuery() + .eq(YxStoreCategory::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .orderByAsc(YxStoreCategory::getPid) + .list(); + List> cateList = new ArrayList<>(); + Map queryAll = yxStoreProductService.queryAll(criteria, pageable); + queryAll.put("cateList", this.makeCate(storeCategories,cateList,0,1)); + return new ResponseEntity<>(queryAll,HttpStatus.OK); + } + + @ForbidSubmit + @Log("新增/修改商品") + @ApiOperation(value = "新增/修改商品") + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) + @PostMapping(value = "/yxStoreProduct/addOrSave") + @PreAuthorize("hasAnyRole('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_CREATE')") + public ResponseEntity create(@Validated @RequestBody StoreProductDto storeProductDto){ + yxStoreProductService.insertAndEditYxStoreProduct(storeProductDto); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + + @ForbidSubmit + @Log("删除商品") + @ApiOperation(value = "删除商品") + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) + @DeleteMapping(value = "/yxStoreProduct/{id}") + @PreAuthorize("hasAnyRole('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_DELETE')") + public ResponseEntity delete(@PathVariable Long id){ + yxStoreProductService.removeById(id); + return new ResponseEntity(HttpStatus.OK); + } + + + + @ApiOperation(value = "商品上架/下架") + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) + @PostMapping(value = "/yxStoreProduct/onsale/{id}") + public ResponseEntity onSale(@PathVariable Long id,@RequestBody String jsonStr){ + JSONObject jsonObject = JSON.parseObject(jsonStr); + Integer status = jsonObject.getInteger("status"); + yxStoreProductService.onSale(id,status); + return new ResponseEntity(HttpStatus.OK); + } + @ApiOperation(value = "生成属性(添加活动产品专用)") + @PostMapping(value = "/yxStoreProduct/isFormatAttrForActivity/{id}") + public ResponseEntity isFormatAttrForActivity(@PathVariable Long id,@RequestBody String jsonStr){ + return new ResponseEntity<>(yxStoreProductService.getFormatAttr(id,jsonStr,true),HttpStatus.OK); + } + + @ApiOperation(value = "生成属性") + @PostMapping(value = "/yxStoreProduct/isFormatAttr/{id}") + public ResponseEntity isFormatAttr(@PathVariable Long id,@RequestBody String jsonStr){ + return new ResponseEntity<>(yxStoreProductService.getFormatAttr(id,jsonStr,false),HttpStatus.OK); + } + + + + @ApiOperation(value = "获取商品信息") + @GetMapping(value = "/yxStoreProduct/info/{id}") + public ResponseEntity info(@PathVariable Long id){ + Map map = new LinkedHashMap<>(3); + + //运费模板 + List shippingTemplatesList = yxShippingTemplatesService.list(); + map.put("tempList", shippingTemplatesList); + + //商品分类 + List storeCategories = yxStoreCategoryService.lambdaQuery() + .eq(YxStoreCategory::getIsShow, ShopCommonEnum.SHOW_1.getValue()) + .orderByAsc(YxStoreCategory::getPid) + .list(); + + List> cateList = new ArrayList<>(); + map.put("cateList", this.makeCate(storeCategories,cateList,0,1)); + + //商品规格 + map.put("ruleList",yxStoreProductRuleService.list()); + + + if(id == 0){ + return new ResponseEntity<>(map,HttpStatus.OK); + } + + //处理商品详情 + YxStoreProduct yxStoreProduct = yxStoreProductService.getById(id); + ProductDto productDto = new ProductDto(); + BeanUtil.copyProperties(yxStoreProduct,productDto,"sliderImage"); + productDto.setSliderImage(Arrays.asList(yxStoreProduct.getSliderImage().split(","))); + YxStoreProductAttrResult storeProductAttrResult = yxStoreProductAttrResultService + .getOne(Wrappers.lambdaQuery() + .eq(YxStoreProductAttrResult::getProductId,id).last("limit 1")); + JSONObject result = JSON.parseObject(storeProductAttrResult.getResult()); + List attrValues = storeProductAttrValueService.list(new LambdaQueryWrapper().eq(YxStoreProductAttrValue::getProductId, yxStoreProduct.getId())); + List productFormatDtos =attrValues.stream().map(i ->{ + ProductFormatDto productFormatDto = new ProductFormatDto(); + BeanUtils.copyProperties(i,productFormatDto); + productFormatDto.setPic(i.getImage()); + return productFormatDto; + }).collect(Collectors.toList()); + if(SpecTypeEnum.TYPE_1.getValue().equals(yxStoreProduct.getSpecType())){ + productDto.setAttr(new ProductFormatDto()); + productDto.setAttrs(productFormatDtos); + productDto.setItems(result.getObject("attr",ArrayList.class)); + }else{ + productFromatNew(productDto, attrValues.get(0)); + // productFromat(productDto, result); + } + + map.put("productInfo",productDto); + + return new ResponseEntity<>(map,HttpStatus.OK); + } + + + /** + * 获取商品属性 + * @param productDto + * @param result + */ + private void productFromatNew(ProductDto productDto, YxStoreProductAttrValue result) { + ProductFormatDto productFormatDto = ProductFormatDto.builder() + .pic(result.getImage()) + .price(result.getPrice().doubleValue()) + .cost(result.getCost().doubleValue()) + .otPrice(result.getOtPrice().doubleValue()) + .stock(result.getStock()) + .barCode(result.getBarCode()) + .weight(result.getWeight().doubleValue()) + .volume(result.getVolume().doubleValue()) + .value1("规格") + .integral(result.getIntegral()) + .brokerage(result.getBrokerage().doubleValue()) + .brokerageTwo(result.getBrokerageTwo().doubleValue()) + .pinkPrice(result.getPinkPrice().doubleValue()) + .pinkStock(result.getPinkStock()) + .seckillPrice(result.getSeckillPrice().doubleValue()) + .seckillStock(result.getSeckillStock()) + .build(); + productDto.setAttr(productFormatDto); + } + + /** + * 获取商品属性 + * @param productDto + * @param result + */ + @Deprecated + private void productFromat(ProductDto productDto, JSONObject result) { + Map mapAttr = (Map) result.getObject("value",ArrayList.class).get(0); + ProductFormatDto productFormatDto = ProductFormatDto.builder() + .pic(mapAttr.get("pic").toString()) + .price(Double.valueOf(mapAttr.get("price").toString())) + .cost(Double.valueOf(mapAttr.get("cost").toString())) + .otPrice(Double.valueOf(mapAttr.get("otPrice").toString())) + .stock(Integer.valueOf(mapAttr.get("stock").toString())) + .barCode(mapAttr.get("barCode").toString()) + .weight(Double.valueOf(mapAttr.get("weight").toString())) + .volume(Double.valueOf(mapAttr.get("volume").toString())) + .value1(mapAttr.get("value1").toString()) + .integral(mapAttr.get("integral") !=null ? Integer.valueOf(mapAttr.get("integral").toString()) : 0) + .brokerage(Double.valueOf(mapAttr.get("brokerage").toString())) + .brokerageTwo(Double.valueOf(mapAttr.get("brokerageTwo").toString())) + .pinkPrice(Double.valueOf(mapAttr.get("pinkPrice").toString())) + .pinkStock(Integer.valueOf(mapAttr.get("pinkStock").toString())) + .seckillPrice(Double.valueOf(mapAttr.get("seckillPrice").toString())) + .seckillStock(Integer.valueOf(mapAttr.get("seckillStock").toString())) + .build(); + productDto.setAttr(productFormatDto); + } + + + /** + * 分类递归 + * @param data 分类列表 + * @param pid 附件id + * @param level d等级 + * @return list + */ + private List> makeCate(List data,List> cateList,int pid, int level) + { + String html = "|-----"; + String newHtml = ""; + List storeCategories = yxStoreCategoryService.lambdaQuery().eq(YxStoreCategory::getPid, 0).list(); + + for (int i = 0; i < data.size(); i++) { + YxStoreCategory storeCategory = data.get(i); + int catePid = storeCategory.getPid(); + Map map = new HashMap<>(); + if(catePid == pid){ + newHtml = String.join("", Collections.nCopies(level,html)); + map.put("value",storeCategory.getId()); + map.put("label",newHtml + storeCategory.getCateName()); + if(storeCategory.getPid() == 0){ + map.put("disabled",0); + }else{ + map.put("disabled",1); + } + cateList.add(map); + data.remove(i); + + i--; + if(storeCategory.getPid() > 0){ + this.makeCate(data,cateList,storeCategory.getPid(),level); + }else{ + this.makeCate(data,cateList,storeCategory.getId(),level + 1); + } + + } + } + + + return cateList; + } + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductReplyController.java b/yshop-shop/src/main/java/co/yixiang/modules/product/rest/StoreProductReplyController.java similarity index 54% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductReplyController.java rename to yshop-shop/src/main/java/co/yixiang/modules/product/rest/StoreProductReplyController.java index 58d2e3fcfa3d475a1ad5efec63e05896e0d7003c..7ef5d9a6df8e2d537f1f26307474a686138602fb 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductReplyController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/product/rest/StoreProductReplyController.java @@ -2,15 +2,18 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.rest; +package co.yixiang.modules.product.rest; +import co.yixiang.enums.ShopCommonEnum; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; -import co.yixiang.modules.shop.domain.YxStoreProductReply; -import co.yixiang.modules.shop.service.YxStoreProductReplyService; -import co.yixiang.modules.shop.service.dto.YxStoreProductReplyQueryCriteria; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.product.domain.YxStoreProductReply; +import co.yixiang.modules.product.service.YxStoreProductReplyService; +import co.yixiang.modules.product.service.dto.YxStoreProductReplyQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -18,12 +21,20 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import java.util.Date; /** - * @author hupeng - * @date 2019-11-03 - */ +* @author hupeng +* @date 2019-11-03 +*/ @Api(tags = "商城:评论管理") @RestController @RequestMapping("api") @@ -40,26 +51,29 @@ public class StoreProductReplyController { @ApiOperation(value = "查询") @GetMapping(value = "/yxStoreProductReply") @PreAuthorize("hasAnyRole('admin','YXSTOREPRODUCTREPLY_ALL','YXSTOREPRODUCTREPLY_SELECT')") - public ResponseEntity getYxStoreProductReplys(YxStoreProductReplyQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxStoreProductReplyService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxStoreProductReplys(YxStoreProductReplyQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxStoreProductReplyService.queryAll(criteria,pageable),HttpStatus.OK); } - @NoRepeatSubmit + + @Log("修改") @ApiOperation(value = "修改") @PutMapping(value = "/yxStoreProductReply") @PreAuthorize("hasAnyRole('admin','YXSTOREPRODUCTREPLY_ALL','YXSTOREPRODUCTREPLY_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxStoreProductReply resources) { - yxStoreProductReplyService.save(resources); + public ResponseEntity update(@Validated @RequestBody YxStoreProductReply resources){ + resources.setMerchantReplyTime(new Date()); + resources.setIsReply(ShopCommonEnum.REPLY_1.getValue()); + yxStoreProductReplyService.updateById(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + @ForbidSubmit @Log("删除") @ApiOperation(value = "删除") @DeleteMapping(value = "/yxStoreProductReply/{id}") @PreAuthorize("hasAnyRole('admin','YXSTOREPRODUCTREPLY_ALL','YXSTOREPRODUCTREPLY_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { + public ResponseEntity delete(@PathVariable Long id){ yxStoreProductReplyService.removeById(id); return new ResponseEntity(HttpStatus.OK); } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/product/rest/StoreProductRuleController.java b/yshop-shop/src/main/java/co/yixiang/modules/product/rest/StoreProductRuleController.java new file mode 100644 index 0000000000000000000000000000000000000000..75543554f3ef4e98fecfda4be886eb879e61ab0a --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/product/rest/StoreProductRuleController.java @@ -0,0 +1,95 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.product.rest; + +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.product.domain.YxStoreProductRule; +import co.yixiang.modules.product.service.YxStoreProductRuleService; +import co.yixiang.modules.product.service.dto.YxStoreProductRuleQueryCriteria; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +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.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.ArrayList; +import java.util.Arrays; + +/** +* @author hupeng +* @date 2020-06-28 +*/ +@AllArgsConstructor +@Api(tags = "sku规则管理") +@RestController +@RequestMapping("/api/yxStoreProductRule") +public class StoreProductRuleController { + + private final YxStoreProductRuleService yxStoreProductRuleService; + private final IGenerator generator; + + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('admin','yxStoreProductRule:list')") + public void download(HttpServletResponse response, YxStoreProductRuleQueryCriteria criteria) throws IOException { + yxStoreProductRuleService.download(yxStoreProductRuleService.queryAll(criteria) , response); + } + + @GetMapping + @Log("查询sku规则") + @ApiOperation("查询sku规则") + @PreAuthorize("@el.check('admin','yxStoreProductRule:list')") + public ResponseEntity getYxStoreProductRules(YxStoreProductRuleQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxStoreProductRuleService.queryAll(criteria,pageable),HttpStatus.OK); + } + + + @ForbidSubmit + @PostMapping("/save/{id}") + @Log("新增/修改sku规则") + @ApiOperation("新增/修改sku规则") + @PreAuthorize("hasAnyRole('admin','yxStoreProductRule:add','yxStoreProductRule:edit')") + public ResponseEntity create(@Validated @RequestBody YxStoreProductRule resources,@PathVariable Integer id){ + if(id != null && id > 0){ + resources.setId(id); + yxStoreProductRuleService.updateById(resources); + }else{ + yxStoreProductRuleService.save(resources); + } + + return new ResponseEntity<>(HttpStatus.CREATED); + } + + + @ForbidSubmit + @Log("删除sku规则") + @ApiOperation("删除sku规则") + @PreAuthorize("@el.check('admin','yxStoreProductRule:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Integer[] ids) { + yxStoreProductRuleService.removeByIds(new ArrayList<>(Arrays.asList(ids))); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/sales/StoreAfterSalesController.java b/yshop-shop/src/main/java/co/yixiang/modules/sales/StoreAfterSalesController.java new file mode 100644 index 0000000000000000000000000000000000000000..acacd846edbeca3a54c1ca3a1b87fe2c61f6db8c --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/sales/StoreAfterSalesController.java @@ -0,0 +1,169 @@ +package co.yixiang.modules.sales; + +import cn.hutool.core.util.ObjectUtil; +import co.yixiang.api.YshopException; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.OrderInfoEnum; +import co.yixiang.enums.PayTypeEnum; +import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.mp.service.WeixinPayService; +import co.yixiang.modules.order.service.YxStoreOrderService; +import co.yixiang.modules.order.vo.YxStoreOrderQueryVo; +import co.yixiang.modules.sales.domain.StoreAfterSales; +import co.yixiang.modules.sales.param.SalesCheckDto; +import co.yixiang.modules.sales.param.YxStoreAfterSalesDto; +import co.yixiang.modules.sales.service.StoreAfterSalesService; +import co.yixiang.modules.sales.param.YxStoreAfterSalesQueryCriteria; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.modules.user.vo.YxUserQueryVo; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import lombok.extern.slf4j.Slf4j; +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.transaction.annotation.Transactional; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.math.BigDecimal; +import java.util.Arrays; +import java.util.Map; + +/** + * @author : gzlv 2021/6/29 3:48 + */ +@Api(tags = "商城:售后管理") +@RestController +@RequestMapping("/api/yxStoreAfterSales") +@Slf4j +@SuppressWarnings("unchecked") +@AllArgsConstructor +public class StoreAfterSalesController { + + private final StoreAfterSalesService storeAfterSalesService; + private final WeixinPayService weixinPayService; + private final YxStoreOrderService storeOrderService; + private final IGenerator generator; + private final YxUserService userService; + + /** + * 审核 + */ + @Log("审核") + @ApiOperation("审核") + @PreAuthorize("@el.check('admin','yxStoreAfterSales:edit')") + @PostMapping(value = "/salesCheck") + @Transactional + public ResponseEntity salesCheck(@RequestBody SalesCheckDto salesCheckDto) { + Object salesCheck = storeAfterSalesService.salesCheck(salesCheckDto.getSalesId(), salesCheckDto.getOrderCode(), + salesCheckDto.getApprovalStatus(), salesCheckDto.getConsignee(), salesCheckDto.getPhoneNumber(), + salesCheckDto.getAddress()); + StoreAfterSales storeAfterSales = storeAfterSalesService.lambdaQuery() + .eq(StoreAfterSales::getOrderCode, salesCheckDto.getOrderCode()) + .eq(StoreAfterSales::getId, salesCheckDto.getSalesId()) + .one(); + if (salesCheckDto.getApprovalStatus().equals(0) && storeAfterSales.getServiceType() == 0) { + BigDecimal bigDecimal = new BigDecimal("100"); + int payPrice = bigDecimal.multiply(storeAfterSales.getRefundAmount()).intValue(); + YxStoreOrderQueryVo orderInfo = storeOrderService.getOrderInfo(salesCheckDto.getOrderCode(), null); + if (PayTypeEnum.WEIXIN.getValue().equals(orderInfo.getPayType())) { + checkOrderInfo(orderInfo); + weixinPayService.refundOrder(salesCheckDto.getOrderCode(), payPrice); + // 回滚库存、退积分、退优惠券 + storeOrderService.returnStock(salesCheckDto.getOrderCode()); + } else { + storeOrderService.orderRefund(salesCheckDto.getOrderCode(), storeAfterSales.getRefundAmount(), 1, storeAfterSales.getId()); + } + } + return new ResponseEntity<>(salesCheck, HttpStatus.OK); + } + + /** + * 判断订单信息 + * + * @param orderInfo 订单信息 + */ + private void checkOrderInfo(YxStoreOrderQueryVo orderInfo) { + if (ObjectUtil.isNull(orderInfo)) { + throw new YshopException("订单不存在"); + } + YxUserQueryVo userQueryVo = userService.getYxUserById(orderInfo.getUid()); + if (ObjectUtil.isNull(userQueryVo)) { + throw new YshopException("用户不存在"); + } + if (OrderInfoEnum.REFUND_STATUS_2.getValue().equals(orderInfo.getRefundStatus())) { + throw new YshopException("订单已经退款了哦!"); + } + } + + /** + * 打款 + */ + @Log("打款") + @ApiOperation("打款") + @PostMapping(value = "/makeMoney") + @PreAuthorize("@el.check('admin','yxStoreAfterSales:edit')") + public ResponseEntity makeMoney(@RequestParam(value = "salesId") Long salesId, @RequestParam("orderCode") String orderCode) { + StoreAfterSales sales = storeAfterSalesService.makeMoney(salesId, orderCode); + BigDecimal bigDecimal = new BigDecimal("100"); + int payPrice = bigDecimal.multiply(sales.getRefundAmount()).intValue(); + YxStoreOrderQueryVo orderInfo = storeOrderService.getOrderInfo(orderCode, null); + if (PayTypeEnum.WEIXIN.getValue().equals(orderInfo.getPayType())) { + checkOrderInfo(orderInfo); + weixinPayService.refundOrder(orderCode, payPrice); + // 回滚库存、退积分、退优惠券 + storeOrderService.returnStock(sales.getOrderCode()); + } else { + storeOrderService.orderRefund(orderCode, sales.getRefundAmount(), 1, salesId); + } + return new ResponseEntity<>(HttpStatus.OK); + } + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('admin','yxStoreAfterSales:list')") + public void download(HttpServletResponse response, YxStoreAfterSalesQueryCriteria criteria) throws IOException { + storeAfterSalesService.download(generator.convert(storeAfterSalesService.queryAll(criteria), YxStoreAfterSalesDto.class), response); + } + + @GetMapping(value = "/sales/List") + @Log("查询售后") + @ApiOperation("查询售后") + @PreAuthorize("@el.check('admin','yxStoreAfterSales:list')") + public ResponseEntity> getYxStoreAfterSaless(YxStoreAfterSalesQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(storeAfterSalesService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @PostMapping + @Log("新增售后") + @ApiOperation("新增售后") + @PreAuthorize("@el.check('admin','yxStoreAfterSales:add')") + public ResponseEntity create(@Validated @RequestBody StoreAfterSales resources){ + return new ResponseEntity<>(storeAfterSalesService.save(resources),HttpStatus.CREATED); + } + + @PutMapping + @Log("修改售后") + @ApiOperation("修改售后") + @PreAuthorize("@el.check('admin','yxStoreAfterSales:edit')") + public ResponseEntity update(@Validated @RequestBody StoreAfterSales resources){ + storeAfterSalesService.updateById(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除售后") + @ApiOperation("删除售后") + @PreAuthorize("@el.check('admin','yxStoreAfterSales:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Long[] ids) { + Arrays.asList(ids).forEach(storeAfterSalesService::removeById); + return new ResponseEntity<>(HttpStatus.OK); + } + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/services/WechatArticleService.java b/yshop-shop/src/main/java/co/yixiang/modules/services/WechatArticleService.java new file mode 100644 index 0000000000000000000000000000000000000000..9a94f8d025d017bb3fc7b733bf700af48c705b6b --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/services/WechatArticleService.java @@ -0,0 +1,149 @@ +package co.yixiang.modules.services; + +import cn.hutool.core.util.ReUtil; +import cn.hutool.http.HttpUtil; +import cn.hutool.json.JSONUtil; +import co.yixiang.exception.ErrorRequestException; +import co.yixiang.modules.mp.service.dto.YxArticleDto; +import co.yixiang.modules.mp.config.WxMpConfiguration; +import co.yixiang.modules.mp.utils.URLUtils; +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.api.WxConsts; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.mp.api.WxMpService; +import me.chanjar.weixin.mp.bean.WxMpMassTagMessage; +import me.chanjar.weixin.mp.bean.material.WxMediaImgUploadResult; +import me.chanjar.weixin.mp.bean.material.WxMpMaterial; +import me.chanjar.weixin.mp.bean.material.WxMpMaterialNews; +import me.chanjar.weixin.mp.bean.material.WxMpMaterialUploadResult; +import me.chanjar.weixin.mp.bean.material.WxMpNewsArticle; +import me.chanjar.weixin.mp.bean.result.WxMpMassSendResult; +import org.apache.commons.lang3.StringUtils; +import org.springframework.beans.factory.annotation.Value; +import org.springframework.stereotype.Service; + +import java.io.File; +import java.util.List; + +/** + * @ClassName WechatArticleService + * @Author hupeng <610796224@qq.com> + * @Date 2020/7/2 + **/ +@Service +@Slf4j +public class WechatArticleService { + + @Value("${file.path}") + private String uploadDirStr; + + /** + * 发布微信图文 + * @param wxNewsArticleItem YxArticleDto + * @throws WxErrorException + */ + public void publish(YxArticleDto wxNewsArticleItem) throws WxErrorException { + WxMpService wxMpService = WxMpConfiguration.getWxMpService(); + + WxMpMaterialNews wxMpMaterialNews = new WxMpMaterialNews(); + + + WxMpNewsArticle article = new WxMpNewsArticle(); + + WxMpMaterialUploadResult wxMpMaterialUploadResult = uploadPhotoToWx( wxMpService, + wxNewsArticleItem.getImageInput() ); + wxNewsArticleItem.setThumbMediaId( wxMpMaterialUploadResult.getMediaId() ); + + article.setAuthor( wxNewsArticleItem.getAuthor() ); + + + //处理content + String content = processContent(wxMpService, wxNewsArticleItem.getContent()); + System.out.println(content); + article.setContent( content ); + article.setContentSourceUrl( wxNewsArticleItem.getUrl() ); + article.setDigest( wxNewsArticleItem.getSynopsis() ); + article.setShowCoverPic( true ); + article.setThumbMediaId( wxNewsArticleItem.getThumbMediaId() ); + article.setTitle( wxNewsArticleItem.getTitle() ); + //TODO 暂时注释掉,测试号没有留言权限 + //article.setNeedOpenComment( wxNewsArticleItem ); + //article.setOnlyFansCanComment( wxNewsArticleItem ); + wxMpMaterialNews.addArticle( article ); + + log.info( "wxMpMaterialNews : {}", JSONUtil.toJsonStr( wxMpMaterialNews ) ); + + WxMpMaterialUploadResult wxMpMaterialUploadResult1 = wxMpService.getMaterialService() + .materialNewsUpload( wxMpMaterialNews ); + + //推送开始 + WxMpMassTagMessage massMessage = new WxMpMassTagMessage(); + massMessage.setMsgType(WxConsts.MassMsgType.MPNEWS); + massMessage.setMediaId(wxMpMaterialUploadResult1.getMediaId()); + massMessage.setSendAll(true); + + WxMpMassSendResult massResult = wxMpService.getMassMessageService() + .massGroupMessageSend(massMessage); + if(!"0".equals(massResult.getErrorCode())) { + log.info("error:"+massResult.getErrorMsg()); + throw new ErrorRequestException("发送失败"); + } + + log.info( "massResult : {}", JSONUtil.toJsonStr( massResult ) ); + + log.info( "wxMpMaterialUploadResult : {}", JSONUtil.toJsonStr( wxMpMaterialUploadResult1 ) ); + } + + + /** + * 上传素材 + * @param wxMpService WxMpService + * @param picPath 图片路径 + * @return WxMpMaterialUploadResult + * @throws WxErrorException + */ + private WxMpMaterialUploadResult uploadPhotoToWx(WxMpService wxMpService, String picPath) throws WxErrorException { + WxMpMaterial wxMpMaterial = new WxMpMaterial(); + + String filename = String.valueOf( (int)System.currentTimeMillis() ) + ".png"; + String downloadPath = uploadDirStr + filename; + long size = HttpUtil.downloadFile(picPath, cn.hutool.core.io.FileUtil.file(downloadPath)); + picPath = downloadPath; + File picFile = new File( picPath ); + wxMpMaterial.setFile( picFile ); + wxMpMaterial.setName( picFile.getName() ); + log.info( "picFile name : {}", picFile.getName() ); + WxMpMaterialUploadResult wxMpMaterialUploadResult = wxMpService.getMaterialService().materialFileUpload( WxConsts.MediaFileType.IMAGE, wxMpMaterial ); + log.info( "wxMpMaterialUploadResult : {}", JSONUtil.toJsonStr( wxMpMaterialUploadResult ) ); + return wxMpMaterialUploadResult; + } + + /** + * 处理内容 + * @param wxMpService WxMpService + * @param content 内容 + * @return String + * @throws WxErrorException + */ + private String processContent(WxMpService wxMpService,String content) throws WxErrorException { + if(StringUtils.isBlank( content )){ + return content; + } + String imgReg = "]+src\\s*=\\s*['\"]([^'\"]+)['\"][^>]*>"; + List imgList = ReUtil.findAllGroup1( imgReg,content); + for (int j = 0; j < imgList.size(); j++) { + String imgSrc = imgList.get( j ); + String filepath = URLUtils.getParam( imgSrc,"filepath" ); + + if(StringUtils.isBlank( filepath )){//网络图片URL,需下载到本地 + String filename = System.currentTimeMillis() + ".png"; + String downloadPath = uploadDirStr + filename; + long size = HttpUtil.downloadFile(imgSrc, cn.hutool.core.io.FileUtil.file(downloadPath)); + filepath = downloadPath; + } + WxMediaImgUploadResult wxMediaImgUploadResult = wxMpService.getMaterialService().mediaImgUpload( new File(filepath) ); + content = StringUtils.replace( content,imgList.get( j ),wxMediaImgUploadResult.getUrl()); + } + return content; + } +} 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 8439f15ced85c5901729b94d53315cb935c1b38b..6d1b41f384b9d04153a3a2e5f2786343d1a47bab 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 @@ -2,15 +2,17 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.rest; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; -import co.yixiang.modules.shop.domain.YxExpress; -import co.yixiang.modules.shop.service.YxExpressService; -import co.yixiang.modules.shop.service.dto.YxExpressQueryCriteria; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.order.domain.YxExpress; +import co.yixiang.modules.order.service.YxExpressService; +import co.yixiang.modules.order.service.dto.YxExpressQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -18,12 +20,19 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-12-12 - */ +* @author hupeng +* @date 2019-12-12 +*/ @Api(tags = "商城:快递管理") @RestController @RequestMapping("api") @@ -40,38 +49,35 @@ public class ExpressController { @ApiOperation(value = "查询快递") @GetMapping(value = "/yxExpress") @PreAuthorize("hasAnyRole('admin','YXEXPRESS_ALL','YXEXPRESS_SELECT')") - public ResponseEntity getYxExpresss(YxExpressQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxExpressService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxExpresss(YxExpressQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxExpressService.queryAll(criteria,pageable),HttpStatus.OK); } - @NoRepeatSubmit + @ForbidSubmit @Log("新增快递") @ApiOperation(value = "新增快递") @PostMapping(value = "/yxExpress") @PreAuthorize("hasAnyRole('admin','YXEXPRESS_ALL','YXEXPRESS_CREATE')") - public ResponseEntity create(@Validated @RequestBody YxExpress resources) { - - return new ResponseEntity(yxExpressService.save(resources), HttpStatus.CREATED); + public ResponseEntity create(@Validated @RequestBody YxExpress resources){ + return new ResponseEntity<>(yxExpressService.save(resources),HttpStatus.CREATED); } - @NoRepeatSubmit + @ForbidSubmit @Log("修改快递") @ApiOperation(value = "修改快递") @PutMapping(value = "/yxExpress") @PreAuthorize("hasAnyRole('admin','YXEXPRESS_ALL','YXEXPRESS_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxExpress resources) { - + public ResponseEntity update(@Validated @RequestBody YxExpress resources){ yxExpressService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + @ForbidSubmit @Log("删除快递") @ApiOperation(value = "删除快递") @DeleteMapping(value = "/yxExpress/{id}") @PreAuthorize("hasAnyRole('admin','YXEXPRESS_ALL','YXEXPRESS_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { - + public ResponseEntity delete(@PathVariable Integer id){ yxExpressService.removeById(id); return new ResponseEntity(HttpStatus.OK); } 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 8c83246654b74577a7fa49f8fb78201f33c8fede..e6cc5d08e6b8c1930bcc5e48e447e0ffb08e1cfd 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 @@ -2,13 +2,15 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.rest; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.shop.domain.YxMaterial; import co.yixiang.modules.shop.service.YxMaterialService; import co.yixiang.modules.shop.service.dto.YxMaterialQueryCriteria; @@ -19,12 +21,19 @@ import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2020-01-09 - */ +* @author hupeng +* @date 2020-01-09 +*/ @Api(tags = "商城:素材管理管理") @RestController @RequestMapping("/api/material") @@ -37,32 +46,31 @@ public class MaterialController { } + @GetMapping(value = "/page") @Log("查询素材管理") @ApiOperation("查询素材管理") - public ResponseEntity getYxMaterials(YxMaterialQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(yxMaterialService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxMaterials(YxMaterialQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxMaterialService.queryAll(criteria,pageable),HttpStatus.OK); } - @NoRepeatSubmit @PostMapping @Log("新增素材管理") @ApiOperation("新增素材管理") - public ResponseEntity create(@Validated @RequestBody YxMaterial resources) { + public ResponseEntity create(@Validated @RequestBody YxMaterial resources){ resources.setCreateId(SecurityUtils.getUsername()); - return new ResponseEntity<>(yxMaterialService.save(resources), HttpStatus.CREATED); + return new ResponseEntity<>(yxMaterialService.save(resources),HttpStatus.CREATED); } - @NoRepeatSubmit @PutMapping @Log("修改素材管理") @ApiOperation("修改素材管理") - public ResponseEntity update(@Validated @RequestBody YxMaterial resources) { + public ResponseEntity update(@Validated @RequestBody YxMaterial resources){ yxMaterialService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + @ForbidSubmit @Log("删除素材管理") @ApiOperation("删除素材管理") @DeleteMapping(value = "/{id}") 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 bf1549fb4f5b255547e873777af4f919c33849e2..4f791d17da825f6ef9da6e35ffd5c7eaa7ca240f 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 @@ -2,12 +2,14 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.rest; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.shop.domain.YxMaterialGroup; import co.yixiang.modules.shop.service.YxMaterialGroupService; import co.yixiang.modules.shop.service.dto.YxMaterialGroupQueryCriteria; @@ -17,12 +19,19 @@ import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2020-01-09 - */ +* @author hupeng +* @date 2020-01-09 +*/ @Api(tags = "商城:素材分组管理") @RestController @RequestMapping("/api/materialgroup") @@ -35,31 +44,40 @@ public class MaterialGroupController { } + @GetMapping(value = "/page") @Log("查询素材分组") @ApiOperation("查询素材分组") - public ResponseEntity getYxMaterialGroups(YxMaterialGroupQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(yxMaterialGroupService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxMaterialGroups(YxMaterialGroupQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxMaterialGroupService.queryAll(criteria,pageable),HttpStatus.OK); + } + + + @GetMapping(value = "/list") + @Log("查询所有素材分组") + @ApiOperation("查询所有素材分组") + public ResponseEntity getYxMaterialGroupsList(YxMaterialGroupQueryCriteria criteria){ + return new ResponseEntity<>(yxMaterialGroupService.queryAll(criteria),HttpStatus.OK); } - @NoRepeatSubmit + @PostMapping @Log("新增素材分组") @ApiOperation("新增素材分组") - public ResponseEntity create(@Validated @RequestBody YxMaterialGroup resources) { - return new ResponseEntity<>(yxMaterialGroupService.save(resources), HttpStatus.CREATED); + public ResponseEntity create(@Validated @RequestBody YxMaterialGroup resources){ + return new ResponseEntity<>(yxMaterialGroupService.save(resources),HttpStatus.CREATED); } - @NoRepeatSubmit + @ForbidSubmit @PutMapping @Log("修改素材分组") @ApiOperation("修改素材分组") - public ResponseEntity update(@Validated @RequestBody YxMaterialGroup resources) { + public ResponseEntity update(@Validated @RequestBody YxMaterialGroup resources){ yxMaterialGroupService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + @ForbidSubmit @Log("删除素材分组") @ApiOperation("删除素材分组") @DeleteMapping(value = "/{id}") 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 deleted file mode 100644 index 1e50ba88ad421c1214984dc46353047c0decb640..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/StoreProductController.java +++ /dev/null @@ -1,148 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.rest; - -import cn.hutool.core.util.ObjectUtil; -import cn.hutool.core.util.StrUtil; -import co.yixiang.constant.ShopConstants; -import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; -import co.yixiang.modules.shop.domain.YxStoreProduct; -import co.yixiang.modules.shop.service.YxStoreProductService; -import co.yixiang.modules.shop.service.dto.YxStoreProductQueryCriteria; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import io.swagger.annotations.Api; -import io.swagger.annotations.ApiOperation; -import org.springframework.cache.annotation.CacheEvict; -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.math.BigDecimal; - -/** - * @author hupeng - * @date 2019-10-04 - */ -@Api(tags = "商城:商品管理") -@RestController -@RequestMapping("api") -public class StoreProductController { - - private final YxStoreProductService yxStoreProductService; - - public StoreProductController(YxStoreProductService yxStoreProductService) { - this.yxStoreProductService = yxStoreProductService; - } - - @Log("查询商品") - @ApiOperation(value = "查询商品") - @GetMapping(value = "/yxStoreProduct") - @PreAuthorize("hasAnyRole('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_SELECT')") - public ResponseEntity getYxStoreProducts(YxStoreProductQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxStoreProductService.queryAll(criteria, pageable), HttpStatus.OK); - } - - @NoRepeatSubmit - @Log("新增商品") - @ApiOperation(value = "新增商品") - @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) - @PostMapping(value = "/yxStoreProduct") - @PreAuthorize("hasAnyRole('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_CREATE')") - public ResponseEntity create(@Validated @RequestBody YxStoreProduct resources) { - if (ObjectUtil.isEmpty(resources.getGiveIntegral())) { - resources.setGiveIntegral(BigDecimal.ZERO); - } - if (ObjectUtil.isEmpty(resources.getCost())) { - resources.setCost(BigDecimal.ZERO); - } - return new ResponseEntity(yxStoreProductService.saveProduct(resources), HttpStatus.CREATED); - } - - @NoRepeatSubmit - @Log("修改商品") - @ApiOperation(value = "修改商品") - @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) - @PutMapping(value = "/yxStoreProduct") - @PreAuthorize("hasAnyRole('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxStoreProduct resources) { - - yxStoreProductService.updateProduct(resources); - return new ResponseEntity(HttpStatus.NO_CONTENT); - } - - @NoRepeatSubmit - @Log("删除商品") - @ApiOperation(value = "删除商品") - @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) - @DeleteMapping(value = "/yxStoreProduct/{id}") - @PreAuthorize("hasAnyRole('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { - - yxStoreProductService.delete(id); - return new ResponseEntity(HttpStatus.OK); - } - - @ApiOperation(value = "恢复数据") - @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) - @DeleteMapping(value = "/yxStoreProduct/recovery/{id}") - @PreAuthorize("hasAnyRole('admin','YXSTOREPRODUCT_ALL','YXSTOREPRODUCT_DELETE')") - public ResponseEntity recovery(@PathVariable Integer id) { - yxStoreProductService.recovery(id); - return new ResponseEntity(HttpStatus.OK); - } - - @ApiOperation(value = "商品上架/下架") - @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) - @PostMapping(value = "/yxStoreProduct/onsale/{id}") - public ResponseEntity onSale(@PathVariable Integer id, @RequestBody String jsonStr) { - JSONObject jsonObject = JSON.parseObject(jsonStr); - int status = Integer.valueOf(jsonObject.get("status").toString()); - yxStoreProductService.onSale(id, status); - return new ResponseEntity(HttpStatus.OK); - } - - @ApiOperation(value = "生成属性") - @PostMapping(value = "/yxStoreProduct/isFormatAttr/{id}") - public ResponseEntity isFormatAttr(@PathVariable Integer id, @RequestBody String jsonStr) { - return new ResponseEntity(yxStoreProductService.isFormatAttr(id, jsonStr), HttpStatus.OK); - } - - @ApiOperation(value = "设置保存属性") - @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) - @PostMapping(value = "/yxStoreProduct/setAttr/{id}") - public ResponseEntity setAttr(@PathVariable Long id, @RequestBody String jsonStr) { - yxStoreProductService.createProductAttr(id, jsonStr); - return new ResponseEntity(HttpStatus.OK); - } - - @ApiOperation(value = "清除属性") - @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) - @PostMapping(value = "/yxStoreProduct/clearAttr/{id}") - public ResponseEntity clearAttr(@PathVariable Long id) { - yxStoreProductService.clearProductAttr(id, true); - return new ResponseEntity(HttpStatus.OK); - } - - @ApiOperation(value = "获取属性") - @GetMapping(value = "/yxStoreProduct/attr/{id}") - public ResponseEntity attr(@PathVariable Integer id) { - String str = yxStoreProductService.getStoreProductAttrResult(id); - if (StrUtil.isEmpty(str)) { - return new ResponseEntity(HttpStatus.OK); - } - JSONObject jsonObject = JSON.parseObject(str); - - return new ResponseEntity(jsonObject, HttpStatus.OK); - } - - -} 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 969d89769f0e311b706ea8324783e20fe017d842..607021507649ec7b01e5a13dc8507033eaabd089 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 @@ -2,7 +2,9 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.rest; @@ -10,12 +12,13 @@ import cn.hutool.core.util.ObjectUtil; import co.yixiang.constant.ShopConstants; import co.yixiang.constant.SystemConfigConstants; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.shop.domain.YxSystemConfig; import co.yixiang.modules.shop.service.YxSystemConfigService; import co.yixiang.modules.shop.service.dto.YxSystemConfigQueryCriteria; import co.yixiang.modules.mp.config.WxMpConfiguration; import co.yixiang.modules.mp.config.WxPayConfiguration; +import co.yixiang.modules.mp.config.WxMaConfiguration; import co.yixiang.utils.RedisUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -27,12 +30,16 @@ 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 org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-10-10 - */ +* @author hupeng +* @date 2019-10-10 +*/ @Api(tags = "商城:配置管理") @RestController @RequestMapping("api") @@ -48,38 +55,41 @@ public class SystemConfigController { @ApiOperation(value = "查询") @GetMapping(value = "/yxSystemConfig") @PreAuthorize("hasAnyRole('admin','YXSYSTEMCONFIG_ALL','YXSYSTEMCONFIG_SELECT')") - public ResponseEntity getYxSystemConfigs(YxSystemConfigQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxSystemConfigService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxSystemConfigs(YxSystemConfigQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxSystemConfigService.queryAll(criteria,pageable),HttpStatus.OK); } - @NoRepeatSubmit + @ForbidSubmit @Log("新增或修改") @ApiOperation(value = "新增或修改") @PostMapping(value = "/yxSystemConfig") - @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) @PreAuthorize("hasAnyRole('admin','YXSYSTEMCONFIG_ALL','YXSYSTEMCONFIG_CREATE')") - public ResponseEntity create(@RequestBody String jsonStr) { - + public ResponseEntity create(@RequestBody String jsonStr){ JSONObject jsonObject = JSON.parseObject(jsonStr); jsonObject.forEach( - (key, value) -> { + (key,value)->{ YxSystemConfig yxSystemConfig = yxSystemConfigService.getOne(new LambdaQueryWrapper() - .eq(YxSystemConfig::getMenuName, key)); + .eq(YxSystemConfig::getMenuName,key)); YxSystemConfig yxSystemConfigModel = new YxSystemConfig(); yxSystemConfigModel.setMenuName(key); yxSystemConfigModel.setValue(value.toString()); //重新配置微信相关 - if (SystemConfigConstants.WECHAT_APPID.equals(key)) { + if(SystemConfigConstants.WECHAT_APPID.equals(key)){ WxMpConfiguration.removeWxMpService(); WxPayConfiguration.removeWxPayService(); + WxMaConfiguration.removeWxMaService(); } - if (SystemConfigConstants.WXPAY_MCHID.equals(key) || SystemConfigConstants.WXAPP_APPID.equals(key)) { + if(SystemConfigConstants.WXPAY_MCHID.equals(key) || SystemConfigConstants.WXAPP_APPID.equals(key)){ WxPayConfiguration.removeWxPayService(); } - RedisUtil.set(key, value.toString(), 0); - if (ObjectUtil.isNull(yxSystemConfig)) { + if(SystemConfigConstants.EXP_APPID.equals(key)){ + RedisUtil.del(ShopConstants.YSHOP_EXPRESS_SERVICE); + } + RedisUtil.set(key,value.toString(),0); + if(ObjectUtil.isNull(yxSystemConfig)){ yxSystemConfigService.save(yxSystemConfigModel); - } else { + }else{ yxSystemConfigModel.setId(yxSystemConfig.getId()); yxSystemConfigService.saveOrUpdate(yxSystemConfigModel); } @@ -90,4 +100,5 @@ public class SystemConfigController { } + } 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 683cca90c443bf909e76b2718cfa493dc2997de7..f41574adbe28c53c9aa7c58316b957d10061c547 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,22 +1,22 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 */ package co.yixiang.modules.shop.rest; import cn.hutool.core.util.ObjectUtil; import cn.hutool.core.util.StrUtil; +import cn.hutool.json.JSONUtil; import co.yixiang.constant.ShopConstants; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.shop.domain.YxSystemGroupData; import co.yixiang.modules.shop.service.YxSystemGroupDataService; import co.yixiang.modules.shop.service.dto.YxSystemGroupDataQueryCriteria; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.cache.annotation.CacheEvict; @@ -28,6 +28,12 @@ import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; import org.springframework.web.bind.annotation.*; +import java.util.List; +import java.util.Map; +import java.util.Objects; + +import static co.yixiang.constant.ShopConstants.YSHOP_SECKILL_TIME; + /** * @author hupeng * @date 2019-10-18 @@ -53,43 +59,18 @@ public class SystemGroupDataController { Pageable pageableT = PageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), sort); - return new ResponseEntity(yxSystemGroupDataService.queryAll(criteria, pageableT), HttpStatus.OK); + return new ResponseEntity<>(yxSystemGroupDataService.queryAll(criteria, pageableT), HttpStatus.OK); } - @NoRepeatSubmit + @ForbidSubmit @Log("新增数据配置") @ApiOperation(value = "新增数据配置") @PostMapping(value = "/yxSystemGroupData") @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) @PreAuthorize("hasAnyRole('admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_CREATE')") public ResponseEntity create(@RequestBody String jsonStr) { - JSONObject jsonObject = JSON.parseObject(jsonStr); - - if (ObjectUtil.isNotNull(jsonObject.get("name"))) { - if (StrUtil.isEmpty(jsonObject.get("name").toString())) { - throw new BadRequestException("名称必须填写"); - } - } - - if (ObjectUtil.isNotNull(jsonObject.get("title"))) { - if (StrUtil.isEmpty(jsonObject.get("title").toString())) { - throw new BadRequestException("标题必须填写"); - } - } - - if (ObjectUtil.isNotNull(jsonObject.get("info"))) { - if (StrUtil.isEmpty(jsonObject.get("info").toString())) { - throw new BadRequestException("简介必须填写"); - } - } - - if (ObjectUtil.isNotNull(jsonObject.get("pic"))) { - if (StrUtil.isEmpty(jsonObject.get("pic").toString())) { - throw new BadRequestException("图片必须上传"); - } - } - + this.checkParam(jsonObject); YxSystemGroupData yxSystemGroupData = new YxSystemGroupData(); yxSystemGroupData.setGroupName(jsonObject.get("groupName").toString()); @@ -98,41 +79,48 @@ public class SystemGroupDataController { yxSystemGroupData.setStatus(jsonObject.getInteger("status")); yxSystemGroupData.setSort(jsonObject.getInteger("sort")); - return new ResponseEntity(yxSystemGroupDataService.save(yxSystemGroupData), HttpStatus.CREATED); + List yxSeckillTime = yxSystemGroupDataService.list(Wrappers.lambdaQuery() + .eq(YxSystemGroupData::getGroupName, YSHOP_SECKILL_TIME)); + if (yxSystemGroupData.getStatus() == 1) { + yxSeckillTime.forEach(item -> { + Map map = JSONUtil.toBean(item.getValue(), Map.class); + if (Objects.nonNull(jsonObject.getInteger("time")) && jsonObject.getInteger("time").equals(map.get("time"))) { + throw new BadRequestException("不能同时开启同一时间点"); + } + }); + } + + return new ResponseEntity<>(yxSystemGroupDataService.save(yxSystemGroupData), HttpStatus.CREATED); } - @NoRepeatSubmit + @ForbidSubmit @Log("修改数据配置") @ApiOperation(value = "修改数据配置") @PutMapping(value = "/yxSystemGroupData") @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY, allEntries = true) @PreAuthorize("hasAnyRole('admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_EDIT')") public ResponseEntity update(@RequestBody String jsonStr) { - JSONObject jsonObject = JSON.parseObject(jsonStr); - if (ObjectUtil.isNotNull(jsonObject.get("name"))) { - if (StrUtil.isEmpty(jsonObject.get("name").toString())) { - throw new BadRequestException("名称必须填写"); - } - } - - if (ObjectUtil.isNotNull(jsonObject.get("title"))) { - if (StrUtil.isEmpty(jsonObject.get("title").toString())) { - throw new BadRequestException("标题必须填写"); - } - } - - if (ObjectUtil.isNotNull(jsonObject.get("pic"))) { - if (StrUtil.isEmpty(jsonObject.get("pic").toString())) { - throw new BadRequestException("图片必须上传"); - } - } + this.checkParam(jsonObject); YxSystemGroupData yxSystemGroupData = new YxSystemGroupData(); yxSystemGroupData.setGroupName(jsonObject.get("groupName").toString()); jsonObject.remove("groupName"); yxSystemGroupData.setValue(jsonObject.toJSONString()); + yxSystemGroupData.setStatus(jsonObject.getInteger("status")); + + List yshop_seckill_time = yxSystemGroupDataService.list(Wrappers.lambdaQuery() + .eq(YxSystemGroupData::getGroupName, "yshop_seckill_time")); + if (yxSystemGroupData.getStatus() == 1 && ObjectUtil.isNotEmpty(jsonObject.getInteger("time"))) { + yshop_seckill_time.forEach(item -> { + Map map = JSONUtil.toBean(item.getValue(), Map.class); + if (jsonObject.getInteger("time").equals(map.get("time"))) { + throw new BadRequestException("不能同时开启同一时间点"); + } + }); + } + if (jsonObject.getInteger("status") == null) { yxSystemGroupData.setStatus(1); } else { @@ -151,14 +139,46 @@ public class SystemGroupDataController { return new ResponseEntity(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + @ForbidSubmit @Log("删除数据配置") @ApiOperation(value = "删除数据配置") @DeleteMapping(value = "/yxSystemGroupData/{id}") @PreAuthorize("hasAnyRole('admin','YXSYSTEMGROUPDATA_ALL','YXSYSTEMGROUPDATA_DELETE')") public ResponseEntity delete(@PathVariable Integer id) { - yxSystemGroupDataService.removeById(id); return new ResponseEntity(HttpStatus.OK); } + + /** + * 检测参数 + * + * @param jsonObject + */ + private void checkParam(JSONObject jsonObject) { + if (ObjectUtil.isNotNull(jsonObject.get("name"))) { + if (StrUtil.isEmpty(jsonObject.getString("name"))) { + throw new BadRequestException("名称必须填写"); + } + } + + if (ObjectUtil.isNotNull(jsonObject.get("title"))) { + if (StrUtil.isEmpty(jsonObject.getString("title"))) { + throw new BadRequestException("标题必须填写"); + } + } + + if (ObjectUtil.isNotNull(jsonObject.get("pic"))) { + if (StrUtil.isEmpty(jsonObject.getString("pic"))) { + throw new BadRequestException("图片必须上传"); + } + } + + + if (ObjectUtil.isNotNull(jsonObject.get("info"))) { + if (StrUtil.isEmpty(jsonObject.getString("info"))) { + throw new BadRequestException("简介必须填写"); + } + } + + } } 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 9e675613e05bd2a5d66389c516f89efe2cf9038a..8cbfe7faab734ccdd104c3aaf8a0d71c44f07602 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,24 +1,20 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.shop.rest; -import cn.hutool.core.util.StrUtil; -import cn.hutool.http.HttpUtil; -import co.yixiang.constant.ShopConstants; import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.BadRequestException; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; 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.modules.mp.config.ShopKeyUtils; -import co.yixiang.utils.RedisUtil; +import co.yixiang.utils.location.GetTencentLocationVO; +import co.yixiang.utils.location.LocationUtils; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import io.swagger.annotations.Api; @@ -28,7 +24,13 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -36,9 +38,9 @@ import java.util.ArrayList; import java.util.Arrays; /** - * @author hupeng - * @date 2020-03-03 - */ +* @author hupeng +* @date 2020-03-03 +*/ @Api(tags = "门店管理") @RestController @RequestMapping("/api/yxSystemStore") @@ -46,7 +48,6 @@ public class SystemStoreController { private final YxSystemStoreService yxSystemStoreService; private final IGenerator generator; - public SystemStoreController(YxSystemStoreService yxSystemStoreService, IGenerator generator) { this.yxSystemStoreService = yxSystemStoreService; this.generator = generator; @@ -56,15 +57,15 @@ public class SystemStoreController { @Log("所有门店") @ApiOperation("所有门店") @GetMapping(value = "/all") - @PreAuthorize("hasAnyRole('yxSystemStore:list')") - public ResponseEntity getAll(YxSystemStoreQueryCriteria criteria) { - return new ResponseEntity<>(yxSystemStoreService.queryAll(criteria), HttpStatus.OK); + @PreAuthorize("@el.check('yxSystemStore:list')") + public ResponseEntity getAll(YxSystemStoreQueryCriteria criteria) { + return new ResponseEntity<>(yxSystemStoreService.queryAll(criteria),HttpStatus.OK); } @Log("导出数据") @ApiOperation("导出数据") @GetMapping(value = "/download") - @PreAuthorize("hasAnyRole('yxSystemStore:list')") + @PreAuthorize("@el.check('yxSystemStore:list')") public void download(HttpServletResponse response, YxSystemStoreQueryCriteria criteria) throws IOException { yxSystemStoreService.download(generator.convert(yxSystemStoreService.queryAll(criteria), YxSystemStoreDto.class), response); } @@ -72,54 +73,50 @@ public class SystemStoreController { @GetMapping @Log("查询门店") @ApiOperation("查询门店") - @PreAuthorize("hasAnyRole('yxSystemStore:list')") - public ResponseEntity getYxSystemStores(YxSystemStoreQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(yxSystemStoreService.queryAll(criteria, pageable), HttpStatus.OK); + @PreAuthorize("@el.check('yxSystemStore:list')") + public ResponseEntity getYxSystemStores(YxSystemStoreQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxSystemStoreService.queryAll(criteria,pageable),HttpStatus.OK); } @PostMapping(value = "/getL") @Log("获取经纬度") @ApiOperation("获取经纬度") - @PreAuthorize("hasAnyRole('yxSystemStore:getl')") - public ResponseEntity create(@Validated @RequestBody String jsonStr) { - String key = RedisUtil.get(ShopKeyUtils.getTengXunMapKey()); - if (StrUtil.isBlank(key)) { - throw new BadRequestException("请先配置腾讯地图key"); - } + @PreAuthorize("@el.check('yxSystemStore:getl')") + public ResponseEntity create(@Validated @RequestBody String jsonStr) { JSONObject jsonObject = JSON.parseObject(jsonStr); String addr = jsonObject.getString("addr"); - String url = StrUtil.format("?address={}&key={}", addr, key); - String json = HttpUtil.get(ShopConstants.QQ_MAP_URL + url); - return new ResponseEntity<>(json, HttpStatus.CREATED); + GetTencentLocationVO locationVO = LocationUtils.getLocation(addr); + if(locationVO.getStatus()!=0){ + throw new BadRequestException(locationVO.getMessage()); + } + return new ResponseEntity<>(locationVO, HttpStatus.CREATED); } - @NoRepeatSubmit + @ForbidSubmit @PostMapping @Log("新增门店") @ApiOperation("新增门店") - @PreAuthorize("hasAnyRole('yxSystemStore:add')") - public ResponseEntity create(@Validated @RequestBody YxSystemStore resources) { - return new ResponseEntity<>(yxSystemStoreService.save(resources), HttpStatus.CREATED); + @PreAuthorize("@el.check('yxSystemStore:add')") + public ResponseEntity create(@Validated @RequestBody YxSystemStore resources){ + return new ResponseEntity<>(yxSystemStoreService.save(resources),HttpStatus.CREATED); } - @NoRepeatSubmit + @ForbidSubmit @PutMapping @Log("修改门店") @ApiOperation("修改门店") - @PreAuthorize("hasAnyRole('yxSystemStore:edit')") - public ResponseEntity update(@Validated @RequestBody YxSystemStore resources) { - + @PreAuthorize("@el.check('yxSystemStore:edit')") + public ResponseEntity update(@Validated @RequestBody YxSystemStore resources){ yxSystemStoreService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + @ForbidSubmit @Log("删除门店") @ApiOperation("删除门店") - @PreAuthorize("hasAnyRole('yxSystemStore:del')") + @PreAuthorize("@el.check('yxSystemStore:del')") @DeleteMapping public ResponseEntity deleteAll(@RequestBody Integer[] 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 2747809f7cf5fa670b22e30db2fada7ad129dab8..e16eaaaf3240c20c077ac10c01ce36f0c9ff53a9 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 @@ -2,13 +2,15 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.shop.rest; import co.yixiang.dozer.service.IGenerator; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.shop.domain.YxSystemStore; import co.yixiang.modules.shop.domain.YxSystemStoreStaff; import co.yixiang.modules.shop.service.YxSystemStoreService; @@ -23,7 +25,13 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -31,9 +39,9 @@ import java.util.ArrayList; import java.util.Arrays; /** - * @author hupeng - * @date 2020-03-22 - */ +* @author hupeng +* @date 2020-03-22 +*/ @Api(tags = "门店店员管理") @RestController @RequestMapping("/api/yxSystemStoreStaff") @@ -44,7 +52,7 @@ public class SystemStoreStaffController { private final IGenerator generator; - public SystemStoreStaffController(YxSystemStoreService yxSystemStoreService, YxSystemStoreStaffService yxSystemStoreStaffService, IGenerator generator) { + public SystemStoreStaffController(YxSystemStoreService yxSystemStoreService,YxSystemStoreStaffService yxSystemStoreStaffService, IGenerator generator) { this.yxSystemStoreService = yxSystemStoreService; this.yxSystemStoreStaffService = yxSystemStoreStaffService; this.generator = generator; @@ -62,42 +70,39 @@ public class SystemStoreStaffController { @Log("查询门店店员") @ApiOperation("查询门店店员") @PreAuthorize("@el.check('yxSystemStoreStaff:list')") - public ResponseEntity getYxSystemStoreStaffs(YxSystemStoreStaffQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(yxSystemStoreStaffService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxSystemStoreStaffs(YxSystemStoreStaffQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxSystemStoreStaffService.queryAll(criteria,pageable),HttpStatus.OK); } - @NoRepeatSubmit @PostMapping @Log("新增门店店员") @ApiOperation("新增门店店员") @PreAuthorize("@el.check('yxSystemStoreStaff:add')") - public ResponseEntity create(@Validated @RequestBody YxSystemStoreStaff resources) { + public ResponseEntity create(@Validated @RequestBody YxSystemStoreStaff resources){ YxSystemStore systemStore = yxSystemStoreService.getOne(Wrappers.lambdaQuery() - .eq(YxSystemStore::getId, resources.getStoreId())); + .eq(YxSystemStore::getId,resources.getStoreId())); resources.setStoreName(systemStore.getName()); - return new ResponseEntity<>(yxSystemStoreStaffService.save(resources), HttpStatus.CREATED); + return new ResponseEntity<>(yxSystemStoreStaffService.save(resources),HttpStatus.CREATED); } - @NoRepeatSubmit @PutMapping @Log("修改门店店员") @ApiOperation("修改门店店员") @PreAuthorize("@el.check('yxSystemStoreStaff:edit')") - public ResponseEntity update(@Validated @RequestBody YxSystemStoreStaff resources) { + public ResponseEntity update(@Validated @RequestBody YxSystemStoreStaff resources){ YxSystemStore systemStore = yxSystemStoreService.getOne(Wrappers.lambdaQuery() - .eq(YxSystemStore::getId, resources.getStoreId())); + .eq(YxSystemStore::getId,resources.getStoreId())); resources.setStoreName(systemStore.getName()); yxSystemStoreStaffService.saveOrUpdate(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + @ForbidSubmit @Log("删除门店店员") @ApiOperation("删除门店店员") @PreAuthorize("@el.check('yxSystemStoreStaff:del')") @DeleteMapping public ResponseEntity deleteAll(@RequestBody Integer[] ids) { - yxSystemStoreStaffService.removeByIds(new ArrayList<>(Arrays.asList(ids))); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxAppVersionController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxAppVersionController.java new file mode 100644 index 0000000000000000000000000000000000000000..9fb371f438e4fd5fa8357b2b4cc2e7c6346577e3 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxAppVersionController.java @@ -0,0 +1,93 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.shop.rest; + +import co.yixiang.domain.PageResult; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.shop.domain.YxAppVersion; +import co.yixiang.modules.shop.service.YxAppVersionService; +import co.yixiang.modules.shop.service.dto.YxAppVersionDto; +import co.yixiang.modules.shop.service.dto.YxAppVersionQueryCriteria; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +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.Arrays; + +/** +* @author lioncity +* @date 2020-12-09 +*/ +@AllArgsConstructor +@Api(tags = "app版本控制管理") +@RestController +@RequestMapping("/api/yxAppVersion") +public class YxAppVersionController { + + private final YxAppVersionService yxAppVersionService; + private final IGenerator generator; + + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('admin','yxAppVersion:list')") + public void download(HttpServletResponse response, YxAppVersionQueryCriteria criteria) throws IOException { + yxAppVersionService.download(generator.convert(yxAppVersionService.queryAll(criteria), YxAppVersionDto.class), response); + } + + @GetMapping + @Log("查询app版本控制") + @ApiOperation("查询app版本控制") + @PreAuthorize("@el.check('admin','yxAppVersion:list')") + public ResponseEntity> getYxAppVersions(YxAppVersionQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxAppVersionService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @ForbidSubmit + @PostMapping + @Log("新增app版本控制") + @ApiOperation("新增app版本控制") + @PreAuthorize("@el.check('admin','yxAppVersion:add')") + public ResponseEntity create(@Validated @RequestBody YxAppVersion resources){ + return new ResponseEntity<>(yxAppVersionService.save(resources),HttpStatus.CREATED); + } + + @ForbidSubmit + @PutMapping + @Log("修改app版本控制") + @ApiOperation("修改app版本控制") + @PreAuthorize("@el.check('admin','yxAppVersion:edit')") + public ResponseEntity update(@Validated @RequestBody YxAppVersion resources){ + yxAppVersionService.updateById(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @ForbidSubmit + @Log("删除app版本控制") + @ApiOperation("删除app版本控制") + @PreAuthorize("@el.check('admin','yxAppVersion:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Integer[] ids) { + Arrays.asList(ids).forEach(id->{ + yxAppVersionService.removeById(id); + }); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxStoreProductRelationController.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxStoreProductRelationController.java new file mode 100644 index 0000000000000000000000000000000000000000..e9d153033505eaaf3130f17a4b076b45fe403f66 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/YxStoreProductRelationController.java @@ -0,0 +1,87 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.shop.rest; +import java.util.Arrays; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.aop.ForbidSubmit; +import lombok.AllArgsConstructor; +import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.product.domain.YxStoreProductRelation; +import co.yixiang.modules.product.service.YxStoreProductRelationService; +import co.yixiang.modules.product.service.dto.YxStoreProductRelationQueryCriteria; +import co.yixiang.modules.product.service.dto.YxStoreProductRelationDto; +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; +import co.yixiang.domain.PageResult; +/** + * @author hupeng + * @date 2020-09-03 + */ +@AllArgsConstructor +@Api(tags = "ProductRelation管理") +@RestController +@RequestMapping("/api/yxStoreProductRelation") +public class YxStoreProductRelationController { + + private final YxStoreProductRelationService yxStoreProductRelationService; + private final IGenerator generator; + + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('admin','yxStoreProductRelation:list')") + public void download(HttpServletResponse response, YxStoreProductRelationQueryCriteria criteria) throws IOException { + yxStoreProductRelationService.download(generator.convert(yxStoreProductRelationService.queryAll(criteria), YxStoreProductRelationDto.class), response); + } + + @GetMapping + @Log("查询ProductRelation") + @ApiOperation("查询ProductRelation") + @PreAuthorize("@el.check('admin','yxStoreProductRelation:list')") + public ResponseEntity> getYxStoreProductRelations(YxStoreProductRelationQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxStoreProductRelationService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @PostMapping + @Log("新增ProductRelation") + @ApiOperation("新增ProductRelation") + @PreAuthorize("@el.check('admin','yxStoreProductRelation:add')") + public ResponseEntity create(@Validated @RequestBody YxStoreProductRelation resources){ + return new ResponseEntity<>(yxStoreProductRelationService.save(resources),HttpStatus.CREATED); + } + + @PutMapping + @Log("修改ProductRelation") + @ApiOperation("修改ProductRelation") + @PreAuthorize("@el.check('admin','yxStoreProductRelation:edit')") + public ResponseEntity update(@Validated @RequestBody YxStoreProductRelation resources){ + yxStoreProductRelationService.updateById(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @ForbidSubmit + @Log("删除ProductRelation") + @ApiOperation("删除ProductRelation") + @PreAuthorize("@el.check('admin','yxStoreProductRelation:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Long[] ids) { + Arrays.asList(ids).forEach(id->{ + yxStoreProductRelationService.removeById(id); + }); + return new ResponseEntity<>(HttpStatus.OK); + } +} 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 deleted file mode 100644 index c98fbacfd8ec92b8a979b912804736db4cd4bfac..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreCartService.java +++ /dev/null @@ -1,51 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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 javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @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 deleted file mode 100644 index 7e09c6621ff9de31d7e514746e359b2a98f4b8f2..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreCategoryService.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.YxStoreCategoryQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxStoreCategoryService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxStoreCategoryQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(YxStoreCategoryQueryCriteria criteria); - - /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List all, HttpServletResponse response) throws IOException; - - Object buildTree(List categoryDTOList); - - - boolean checkCategory(int pid); - - boolean checkProductCategory(int id); -} 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 deleted file mode 100644 index 0f75b8641534d7ba93d32e006c21a6dd3c7dcb6e..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderService.java +++ /dev/null @@ -1,70 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.YxStoreOrderQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxStoreOrderService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxStoreOrderQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(YxStoreOrderQueryCriteria criteria); - - - YxStoreOrderDto create(YxStoreOrder resources); - - void update(YxStoreOrder resources); - - /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List all, HttpServletResponse response) throws IOException; - - - Map queryAll(List ids); - - - String orderType(Long id, Long pinkId, Long combinationId, Long seckillId, - Long 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 deleted file mode 100644 index 14c40c59a34321f2e7f8e64d68f6939a1fe2dfb0..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreOrderStatusService.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.YxStoreOrderStatusQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxStoreOrderStatusService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxStoreOrderStatusQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(YxStoreOrderStatusQueryCriteria 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/YxStoreProductAttrResultService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrResultService.java deleted file mode 100644 index 39306be5e37745000011d93ba89827cca8e6ec76..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrResultService.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service; - -import co.yixiang.common.service.BaseService; -import co.yixiang.modules.shop.domain.YxStoreProductAttrResult; - -/** - * @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 deleted file mode 100644 index 30432e7c185cffec927d44b3a362b02dd625555e..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrService.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service; - -import co.yixiang.common.service.BaseService; -import co.yixiang.modules.shop.domain.YxStoreProductAttr; - -/** - * @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 deleted file mode 100644 index 0278485940086692dc020575d269b2dec1b55476..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductAttrValueService.java +++ /dev/null @@ -1,18 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service; - -import co.yixiang.common.service.BaseService; -import co.yixiang.modules.shop.domain.YxStoreProductAttrValue; - -/** - * @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 deleted file mode 100644 index ae0d456604dde35bb964a938eee9e5c5b8ab7932..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductReplyService.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.YxStoreProductReplyQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxStoreProductReplyService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxStoreProductReplyQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(YxStoreProductReplyQueryCriteria 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/YxStoreProductService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductService.java deleted file mode 100644 index 8474b7c27183103043cbfcbd491a7ce4ad6e6d45..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxStoreProductService.java +++ /dev/null @@ -1,69 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.YxStoreProductQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxStoreProductService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxStoreProductQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(YxStoreProductQueryCriteria criteria); - - /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List all, HttpServletResponse response) throws IOException; - - YxStoreProduct saveProduct(YxStoreProduct storeProduct); - - void recovery(Integer id); - - void onSale(Integer id, int status); - - List isFormatAttr(Integer id, String jsonStr); - - void createProductAttr(Long id, String jsonStr); - - void clearProductAttr(Long id, boolean isActice); - - void setResult(Map map, Long id); - - String getStoreProductAttrResult(Integer id); - - void updateProduct(YxStoreProduct resources); - - void delete(Integer id); -} 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 deleted file mode 100644 index b22f066da5cbb0e1f9ea6c01e90dda8d400469b5..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxSystemUserTaskService.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.YxSystemUserTaskQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxSystemUserTaskService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxSystemUserTaskQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(YxSystemUserTaskQueryCriteria 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/YxUserBillService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserBillService.java deleted file mode 100644 index 936f4edfa2e7cc411ffb7ed4c7a86fe8260780b0..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserBillService.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.YxUserBillQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxUserBillService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxUserBillQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(YxUserBillQueryCriteria 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/YxUserRechargeService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserRechargeService.java deleted file mode 100644 index cc43ff2ae52cc44ecf0696a7bc9c8fe8f7f91996..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserRechargeService.java +++ /dev/null @@ -1,48 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxUserRechargeService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxUserRechargeQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(YxUserRechargeQueryCriteria 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/YxUserService.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserService.java deleted file mode 100644 index a19df039fa679dbf271a335f7b4e5cd458cccf08..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/YxUserService.java +++ /dev/null @@ -1,55 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.YxUserQueryCriteria; -import org.springframework.data.domain.Pageable; - -import javax.servlet.http.HttpServletResponse; -import java.io.IOException; -import java.util.List; -import java.util.Map; - -/** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxUserService extends BaseService { - - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxUserQueryCriteria criteria, Pageable pageable); - - /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ - List queryAll(YxUserQueryCriteria criteria); - - /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ - void download(List all, HttpServletResponse response) throws IOException; - - void onStatus(Integer id, int status); - - void updateMoney(UserMoneyDto param); - - void incBrokeragePrice(double doubleValue, Long uid); -} 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 deleted file mode 100644 index c28995b005ae8fd097300a460395f9bc5e04242a..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/ProductFormatDto.java +++ /dev/null @@ -1,37 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.dto; - -import lombok.Data; - -import java.util.Map; - -/** - * @ClassName ProductFormatDTO - * @Author hupeng <610796224@qq.com> - * @Date 2019/10/12 - **/ - -@Data -public class ProductFormatDto { - - private Double price; - - private Double cost; - - private int sales; - - private String pic; - - // private Map>> detail; - - //private List> detail; - private Map detail; - private Boolean check; - - -} 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 deleted file mode 100644 index b30a9f7d68899bdf209898a94a7994a2afd92f9d..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxMaterialGroupQueryCriteria.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.dto; - -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Data -public class YxMaterialGroupQueryCriteria { -} 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 deleted file mode 100644 index 78ab0a33398d1d5d5b91bf79e3e85ddb5cfaad88..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreCartQueryCriteria.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.dto; - -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Data -public class YxStoreCartQueryCriteria { -} 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 deleted file mode 100644 index c7d0284bbc13d6ee16b90f54c0518591230d52f7..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderCartInfoQueryCriteria.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.dto; - -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Data -public class YxStoreOrderCartInfoQueryCriteria { -} 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 deleted file mode 100644 index bf0611e7e9cdc6804856d705e08e8cc05daaaf43..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxStoreOrderStatusQueryCriteria.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.dto; - -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Data -public class YxStoreOrderStatusQueryCriteria { -} 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 deleted file mode 100644 index b5bb1a4e84352453d746ceb81db278638d0fcc20..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemConfigQueryCriteria.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.dto; - -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Data -public class YxSystemConfigQueryCriteria { -} 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 deleted file mode 100644 index 8e1b0165aebb601ea0f9f93e0da79ecfdf103f04..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemStoreQueryCriteria.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.dto; - -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Data -public class YxSystemStoreQueryCriteria { -} 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 deleted file mode 100644 index 12f415bf8f69cd05226474d13a8b992788b6ccb6..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserLevelQueryCriteria.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.dto; - -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Data -public class YxSystemUserLevelQueryCriteria { -} 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 deleted file mode 100644 index 8f55515b9c19afd1f5cd3a5cd148d373752e68cd..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxSystemUserTaskQueryCriteria.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.dto; - -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Data -public class YxSystemUserTaskQueryCriteria { -} 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 deleted file mode 100644 index 4486ba24f0f4332c83a10498e80ac0f6c6b26c7c..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxUserBillQueryCriteria.java +++ /dev/null @@ -1,20 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.dto; - -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Data -public class YxUserBillQueryCriteria { - private String nickname; - private String category; - private String type; -} 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 deleted file mode 100644 index 637d79e01196b09f142ca971a5b3a9c6980f6cd0..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/dto/YxWechatUserQueryCriteria.java +++ /dev/null @@ -1,17 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.dto; - -import lombok.Data; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Data -public class YxWechatUserQueryCriteria { -} 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 deleted file mode 100644 index d447ff8977fae09b911e8a8e6dc01e34693100df..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreOrderServiceImpl.java +++ /dev/null @@ -1,464 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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 co.yixiang.common.service.impl.BaseServiceImpl; -import co.yixiang.common.utils.QueryHelpPlus; -import co.yixiang.dozer.service.IGenerator; -import co.yixiang.exception.BadRequestException; -import co.yixiang.exception.EntityExistException; -import co.yixiang.modules.activity.domain.YxStorePink; -import co.yixiang.modules.activity.service.YxStorePinkService; -import co.yixiang.modules.shop.domain.*; -import co.yixiang.modules.shop.service.*; -import co.yixiang.modules.shop.service.dto.*; -import co.yixiang.modules.shop.service.mapper.StoreOrderMapper; -import co.yixiang.modules.shop.service.mapper.StoreProductMapper; -import co.yixiang.modules.shop.service.mapper.UserMapper; -import co.yixiang.modules.mp.service.YxMiniPayService; -import co.yixiang.modules.mp.service.YxPayService; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.OrderUtil; -import com.alibaba.fastjson.JSON; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.github.binarywang.wxpay.exception.WxPayException; -import com.github.pagehelper.PageInfo; -import lombok.AllArgsConstructor; -import lombok.extern.slf4j.Slf4j; -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.math.BigDecimal; -import java.util.*; - -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; - -/** - * @author hupeng - * @date 2020-05-12 - */ -@Slf4j -@Service -@AllArgsConstructor -//@CacheConfig(cacheNames = "yxStoreOrder") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -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 YxPayService payService; - private final YxMiniPayService miniPayService; - private final YxSystemStoreService systemStoreService; - private final YxStoreCartService storeCartService; - private final StoreOrderMapper yxStoreOrderMapper; - private final StoreProductMapper yxStoreProductMapper; - - @Override - public OrderCountDto getOrderCount() { - //获取所有订单转态为已支付的 - List nameList = storeCartService.findCateName(); - Map childrenMap = new HashMap<>(); - nameList.forEach(i -> { - if (i != null) { - if (childrenMap.containsKey(i.getCatename())) { - childrenMap.put(i.getCatename(), childrenMap.get(i.getCatename()) + 1); - } else { - childrenMap.put(i.getCatename(), 1); - } - } - - }); - List list = new ArrayList<>(); - List columns = new ArrayList<>(); - childrenMap.forEach((k, v) -> { - OrderCountDto.OrderCountData orderCountData = new OrderCountDto.OrderCountData(); - orderCountData.setName(k); - orderCountData.setValue(v); - columns.add(k); - list.add(orderCountData); - }); - OrderCountDto orderCountDto = new OrderCountDto(); - orderCountDto.setColumn(columns); - orderCountDto.setOrderCountDatas(list); - return orderCountDto; - } - - @Override - // 此处方法已经废弃 - 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.setTodayCount(yxStoreOrderMapper.countByPayTimeGreaterThanEqual(today)); - - - orderTimeDataDTO.setProCount(yxStoreOrderMapper - .countByPayTimeLessThanAndPayTimeGreaterThanEqual(today, yesterday)); - - - orderTimeDataDTO.setLastWeekCount(yxStoreOrderMapper.countByPayTimeGreaterThanEqual(lastWeek)); - - - orderTimeDataDTO.setMonthCount(yxStoreOrderMapper.countByPayTimeGreaterThanEqual(nowMonth)); - - - orderTimeDataDTO.setUserCount(userMapper.selectCount(new LambdaQueryWrapper())); - orderTimeDataDTO.setOrderCount(yxStoreOrderMapper.selectCount(new LambdaQueryWrapper())); - orderTimeDataDTO.setPriceCount(yxStoreOrderMapper.sumTotalPrice()); - orderTimeDataDTO.setGoodsCount(yxStoreProductMapper.selectCount(new LambdaQueryWrapper())); - - return orderTimeDataDTO; - } - - @Override - public Map chartCount() { - Map map = new LinkedHashMap<>(); - int nowMonth = OrderUtil.dateToTimestampT(DateUtil - .beginOfMonth(new Date())); - - 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) { - YxSystemStore systemStore = systemStoreService.getById(yxStoreOrder.getStoreId()); - if (Objects.nonNull(systemStore)) { - String storeName = systemStore.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 LambdaQueryWrapper().eq(YxStoreOrderCartInfo::getOid, 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 YxStoreOrderDto create(YxStoreOrder resources) { - if (this.getOne(new LambdaQueryWrapper().eq(YxStoreOrder::getUnique, resources.getUnique())) != null) { - throw new EntityExistException(YxStoreOrder.class, "unique", resources.getUnique()); - } - this.save(resources); - return generator.convert(resources, YxStoreOrderDto.class); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void update(YxStoreOrder resources) { - YxStoreOrder yxStoreOrder = this.getById(resources.getId()); - YxStoreOrder yxStoreOrder1 = this.getOne(new LambdaQueryWrapper().eq(YxStoreOrder::getUnique, resources.getUnique())); - if (yxStoreOrder1 != null && !yxStoreOrder1.getId().equals(yxStoreOrder.getId())) { - throw new EntityExistException(YxStoreOrder.class, "unique", resources.getUnique()); - } - yxStoreOrder.copy(resources); - this.saveOrUpdate(yxStoreOrder); - } - - - @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("订单状态(-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.getRemark()); - 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()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } - - @Override - public Map queryAll(List ids) { - List yxStoreOrders = this.list(new LambdaQueryWrapper().in(YxStoreOrder::getOrderId, ids)); - List storeOrderDTOS = new ArrayList<>(); - for (YxStoreOrder yxStoreOrder : yxStoreOrders) { - 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 LambdaQueryWrapper().eq(YxStoreOrderCartInfo::getOid, 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 LambdaQueryWrapper().eq(YxUser::getUid, yxStoreOrder.getUid())), YxUserDto.class)); - - storeOrderDTOS.add(yxStoreOrderDto); - - } - - Map map = new LinkedHashMap<>(2); - map.put("content", storeOrderDTOS); - - return map; - } - - @Override - public String orderType(Long id, Long pinkId, Long combinationId, Long seckillId, - Long bargainId, int shippingType) { - String str = "[普通订单]"; - if ( pinkId > 0 || combinationId > 0) { - YxStorePink storePink = storePinkService.getOne(new LambdaQueryWrapper(). - eq(YxStorePink::getOrderIdKey, id)); - if (ObjectUtil.isNull(storePink)) { - str = "[拼团订单]"; - } else { - switch (storePink.getStatus()) { - case 1: - str = "[拼团订单]正在进行中"; - break; - case 2: - str = "[拼团订单]已完成"; - break; - case 3: - str = "[拼团订单]未完成"; - break; - default: - str = "[拼团订单]历史订单"; - break; - } - } - - } else if (seckillId > 0) { - str = "[秒杀订单]"; - } else if (bargainId > 0) { - str = "[砍价订单]"; - } - if (shippingType == 2) { - str = "[核销订单]"; - } - return str; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void refund(YxStoreOrder resources) { - if (resources.getPayPrice().doubleValue() < 0) { - throw new BadRequestException("请输入退款金额"); - } - - if ("yue".equals(resources.getPayType())) { - //修改状态 - resources.setRefundStatus(2); - resources.setRefundPrice(resources.getPayPrice()); - this.updateById(resources); - - //退款到余额 - YxUserDto userDTO = generator.convert(userService.getOne(new LambdaQueryWrapper().eq(YxUser::getUid, 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.setStatus(1); - yxUserBillService.save(userBill); - - - YxStoreOrderStatus storeOrderStatus = new YxStoreOrderStatus(); - storeOrderStatus.setOid(resources.getId()); - storeOrderStatus.setChangeType("refund_price"); - storeOrderStatus.setChangeMessage("退款给用户:" + resources.getPayPrice() + "元"); - storeOrderStatus.setChangeTime(new Date()); - - yxStoreOrderStatusService.save(storeOrderStatus); - } else { - BigDecimal bigDecimal = new BigDecimal("100"); - try { - payService.refundOrder(resources.getOrderId(), - bigDecimal.multiply(resources.getPayPrice()).intValue()); - - } catch (WxPayException e) { - log.info("refund-error:{}", e.getMessage()); - throw new BadRequestException("退款失败:" + e.getMessage()); - } - - } - } - -} 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 deleted file mode 100644 index 2dadbb145fadd1c1013d379d158c79e9743ccfdc..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductReplyServiceImpl.java +++ /dev/null @@ -1,102 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.impl; - -import co.yixiang.common.service.impl.BaseServiceImpl; -import co.yixiang.common.utils.QueryHelpPlus; -import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.shop.domain.YxStoreProductReply; -import co.yixiang.modules.shop.service.YxStoreProductReplyService; -import co.yixiang.modules.shop.service.YxStoreProductService; -import co.yixiang.modules.shop.service.YxUserService; -import co.yixiang.modules.shop.service.dto.YxStoreProductReplyDto; -import co.yixiang.modules.shop.service.dto.YxStoreProductReplyQueryCriteria; -import co.yixiang.modules.shop.service.mapper.StoreProductReplyMapper; -import co.yixiang.utils.FileUtil; -import com.github.pagehelper.PageInfo; -import lombok.AllArgsConstructor; -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 java.util.List; -import java.util.Map; - -// 默认不使用缓存 -//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 = "yxStoreProductReply") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreProductReplyServiceImpl extends BaseServiceImpl implements YxStoreProductReplyService { - - private final IGenerator generator; - - private final YxUserService yxUserService; - - private final YxStoreProductService yxStoreProductService; - - @Override - //@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 - //@Cacheable - public List queryAll(YxStoreProductReplyQueryCriteria criteria) { - List storeProductReplyList = baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreProductReply.class, criteria)); - storeProductReplyList.forEach(yxStoreProductReply -> { - yxStoreProductReply.setUser(yxUserService.getById(yxStoreProductReply.getUid())); - ; - yxStoreProductReply.setStoreProduct(yxStoreProductService.getById(yxStoreProductReply.getProductId())); - }); - return storeProductReplyList; - } - - - @Override - 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.getIsReply()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} 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 deleted file mode 100644 index ab02f58c7d2b253fa8fc53f6be493cc4e2f90d3c..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxStoreProductServiceImpl.java +++ /dev/null @@ -1,397 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.common.service.impl.BaseServiceImpl; -import co.yixiang.common.utils.QueryHelpPlus; -import co.yixiang.dozer.service.IGenerator; -import co.yixiang.exception.BadRequestException; -import co.yixiang.modules.shop.domain.YxStoreProduct; -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.service.*; -import co.yixiang.modules.shop.service.dto.*; -import co.yixiang.modules.shop.service.mapper.StoreProductMapper; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.OrderUtil; -import com.alibaba.fastjson.JSON; -import com.alibaba.fastjson.JSONObject; -import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; -import com.github.pagehelper.PageInfo; -import lombok.AllArgsConstructor; -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.math.BigDecimal; -import java.util.*; -import java.util.stream.Collectors; - -// 默认不使用缓存 -//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 = "yxStoreProduct") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxStoreProductServiceImpl extends BaseServiceImpl implements YxStoreProductService { - - private final IGenerator generator; - - private final StoreProductMapper storeProductMapper; - - private final YxStoreCategoryService yxStoreCategoryService; - - private final YxStoreProductAttrService yxStoreProductAttrService; - - private final YxStoreProductAttrValueService yxStoreProductAttrValueService; - - private final YxStoreProductAttrResultService yxStoreProductAttrResultService; - - @Override - //@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 - //@Cacheable - public List queryAll(YxStoreProductQueryCriteria criteria) { - List yxStoreProductList = baseMapper.selectList(QueryHelpPlus.getPredicate(YxStoreProduct.class, criteria)); - yxStoreProductList.forEach(yxStoreProduct -> { - yxStoreProduct.setStoreCategory(yxStoreCategoryService.getById(yxStoreProduct.getCateId())); - }); - return yxStoreProductList; - } - - - @Override - public void download(List all, HttpServletResponse response) throws IOException { - List> list = new ArrayList<>(); - for (YxStoreProductDto yxStoreProduct : all) { - Map map = new LinkedHashMap<>(); - 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.getIsPostage()); - map.put("获得积分", yxStoreProduct.getGiveIntegral()); - map.put("成本价", yxStoreProduct.getCost()); - map.put("是否优品推荐", yxStoreProduct.getIsGood()); - map.put("虚拟销量", yxStoreProduct.getFicti()); - map.put("浏览量", yxStoreProduct.getBrowse()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } - - @Override - public YxStoreProduct saveProduct(YxStoreProduct storeProduct) { - if (storeProduct.getStoreCategory().getId() == null) { - throw new BadRequestException("分类名称不能为空"); - } - boolean check = yxStoreCategoryService - .checkProductCategory(storeProduct.getStoreCategory().getId()); - if (!check) { - throw new BadRequestException("商品分类必选选择二级"); - } - storeProduct.setCateId(storeProduct.getStoreCategory().getId().toString()); - this.save(storeProduct); - return storeProduct; - } - - @Override - public void recovery(Integer id) { - storeProductMapper.updateDel(0, id); - storeProductMapper.updateOnsale(0, id); - } - - @Override - public void onSale(Integer id, int status) { - if (status == 1) { - status = 0; - } else { - status = 1; - } - storeProductMapper.updateOnsale(status, id); - } - - @Override - public List isFormatAttr(Integer id, String jsonStr) { - if (ObjectUtil.isNull(id)) { - throw new BadRequestException("产品不存在"); - } - - 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.setDetail(map.get("detail")); - productFormatDTO.setCost(yxStoreProductDTO.getCost().doubleValue()); - productFormatDTO.setPrice(yxStoreProductDTO.getPrice().doubleValue()); - productFormatDTO.setSales(yxStoreProductDTO.getSales()); - productFormatDTO.setPic(yxStoreProductDTO.getImage()); - productFormatDTO.setCheck(false); - newList.add(productFormatDTO); - } - return newList; - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void createProductAttr(Long id, String jsonStr) { - JSONObject jsonObject = JSON.parseObject(jsonStr); - List attrList = JSON.parseArray( - jsonObject.get("items").toString(), - FromatDetailDto.class); - List valueList = JSON.parseArray( - jsonObject.get("attrs").toString(), - ProductFormatDto.class); - - - List attrGroup = new ArrayList<>(); - for (FromatDetailDto fromatDetailDTO : attrList) { - YxStoreProductAttr yxStoreProductAttr = new YxStoreProductAttr(); - yxStoreProductAttr.setProductId(id); - yxStoreProductAttr.setAttrName(fromatDetailDTO.getValue()); - yxStoreProductAttr.setAttrValues(StrUtil. - join(",", fromatDetailDTO.getDetail())); - attrGroup.add(yxStoreProductAttr); - } - - - List valueGroup = new ArrayList<>(); - for (ProductFormatDto productFormatDTO : valueList) { - YxStoreProductAttrValue yxStoreProductAttrValue = new YxStoreProductAttrValue(); - yxStoreProductAttrValue.setProductId(id); - List stringList = productFormatDTO.getDetail().values() - .stream().collect(Collectors.toList()); - Collections.sort(stringList); - yxStoreProductAttrValue.setSku(StrUtil. - join(",", stringList)); - yxStoreProductAttrValue.setPrice(BigDecimal.valueOf(productFormatDTO.getPrice())); - yxStoreProductAttrValue.setCost(BigDecimal.valueOf(productFormatDTO.getCost())); - yxStoreProductAttrValue.setStock(productFormatDTO.getSales()); - yxStoreProductAttrValue.setUnique(IdUtil.simpleUUID()); - yxStoreProductAttrValue.setImage(productFormatDTO.getPic()); - - valueGroup.add(yxStoreProductAttrValue); - } - - if (attrGroup.isEmpty() || valueGroup.isEmpty()) { - throw new BadRequestException("请设置至少一个属性!"); - } - - //如果设置sku 处理价格与库存 - - ////取最小价格 - BigDecimal minPrice = valueGroup - .stream() - .map(YxStoreProductAttrValue::getPrice) - .min(Comparator.naturalOrder()) - .orElse(BigDecimal.ZERO); - - //计算库存 - Integer stock = valueGroup - .stream() - .map(YxStoreProductAttrValue::getStock) - .reduce(Integer::sum) - .orElse(0); - - YxStoreProduct yxStoreProduct = YxStoreProduct.builder() - .stock(stock) - .price(minPrice) - .id(id) - .build(); - this.updateById(yxStoreProduct); - - //插入之前清空 - clearProductAttr(id, false); - - - //保存属性 - yxStoreProductAttrService.saveOrUpdateBatch(attrGroup); - - //保存值 - yxStoreProductAttrValueService.saveOrUpdateBatch(valueGroup); - - Map map = new LinkedHashMap<>(); - map.put("attr", jsonObject.get("items")); - map.put("value", jsonObject.get("attrs")); - - //保存结果 - setResult(map, id); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void setResult(Map map, Long id) { - YxStoreProductAttrResult yxStoreProductAttrResult = new YxStoreProductAttrResult(); - yxStoreProductAttrResult.setProductId(id); - yxStoreProductAttrResult.setResult(JSON.toJSONString(map)); - yxStoreProductAttrResult.setChangeTime(new Date()); - - yxStoreProductAttrResultService.remove(new LambdaQueryWrapper().eq(YxStoreProductAttrResult::getProductId, id)); - - yxStoreProductAttrResultService.saveOrUpdate(yxStoreProductAttrResult); - } - - @Override - public String getStoreProductAttrResult(Integer id) { - YxStoreProductAttrResult yxStoreProductAttrResult = yxStoreProductAttrResultService - .getOne(new LambdaQueryWrapper().eq(YxStoreProductAttrResult::getProductId, 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("请选择分类"); - } - boolean check = yxStoreCategoryService - .checkProductCategory(resources.getStoreCategory().getId()); - if (!check) { - throw new BadRequestException("商品分类必选选择二级"); - } - resources.setCateId(resources.getStoreCategory().getId().toString()); - this.saveOrUpdate(resources); - } - - @Override - public void delete(Integer id) { - storeProductMapper.updateDel(1, id); - } - - @Override - @Transactional(rollbackFor = Exception.class) - public void clearProductAttr(Long id, boolean isActice) { - if (ObjectUtil.isNull(id)) { - throw new BadRequestException("产品不存在"); - } - - yxStoreProductAttrService.remove(new LambdaQueryWrapper().eq(YxStoreProductAttr::getProductId, id)); - yxStoreProductAttrValueService.remove(new LambdaQueryWrapper().eq(YxStoreProductAttrValue::getProductId, id)); - - if (isActice) { - yxStoreProductAttrResultService.remove(new LambdaQueryWrapper().eq(YxStoreProductAttrResult::getProductId, id)); - } - } - - /** - * 组合规则属性算法 - * @param jsonStr - * @return - */ - public DetailDto attrFormat(String jsonStr) { - JSONObject jsonObject = JSON.parseObject(jsonStr); - List fromatDetailDTOList = JSON.parseArray(jsonObject.get("items").toString(), - FromatDetailDto.class); - List data = 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(); - } - List tmp = new LinkedList<>(); - for (String v : data) { - for (String g : fromatDetailDTOList.get(i + 1).getDetail()) { - String rep2 = ""; - if (i == 0) { - rep2 = fromatDetailDTOList.get(i).getValue() + "_" + v + "-" - + fromatDetailDTOList.get(i + 1).getValue() + "_" + g; - } else { - rep2 = v + "-" - + fromatDetailDTOList.get(i + 1).getValue() + "_" + g; - } - tmp.add(rep2); - if (i == fromatDetailDTOList.size() - 2) { - Map> rep4 = new LinkedHashMap<>(); - Map reptemp = new LinkedHashMap<>(); - for (String h : Arrays.asList(rep2.split("-"))) { - List rep3 = Arrays.asList(h.split("_")); - - if (rep3.size() > 1) { - reptemp.put(rep3.get(0), rep3.get(1)); - } else { - reptemp.put(rep3.get(0), ""); - } - } - rep4.put("detail", reptemp); - res.add(rep4); - } - } - } - if (!tmp.isEmpty()) { - data = tmp; - } - } - } else { - List dataArr = new ArrayList<>(); - - for (FromatDetailDto fromatDetailDTO : fromatDetailDTOList) { - - for (String str : fromatDetailDTO.getDetail()) { - Map> map2 = new LinkedHashMap<>(); - //List> list1 = new ArrayList<>(); - dataArr.add(fromatDetailDTO.getValue() + "_" + str); - Map map1 = new LinkedHashMap<>(); - map1.put(fromatDetailDTO.getValue(), str); - //list1.add(map1); - map2.put("detail", map1); - res.add(map2); - } - } - String s = StrUtil.join("-", dataArr); - data.add(s); - } - DetailDto detailDTO = new DetailDto(); - detailDTO.setData(data); - detailDTO.setRes(res); - return detailDTO; - } -} 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 deleted file mode 100644 index b5689717060fc89c4514f3f7ad5c7f44d9f3cfa7..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserBillServiceImpl.java +++ /dev/null @@ -1,87 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.impl; - -import co.yixiang.common.service.impl.BaseServiceImpl; -import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.shop.domain.YxUserBill; -import co.yixiang.modules.shop.service.YxUserBillService; -import co.yixiang.modules.shop.service.dto.YxUserBillDto; -import co.yixiang.modules.shop.service.dto.YxUserBillQueryCriteria; -import co.yixiang.modules.shop.service.mapper.UserBillMapper; -import co.yixiang.utils.FileUtil; -import com.github.pagehelper.PageInfo; -import lombok.AllArgsConstructor; -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 java.util.List; -import java.util.Map; - -// 默认不使用缓存 -//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 = "yxUserBill") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxUserBillServiceImpl extends BaseServiceImpl implements YxUserBillService { - - private final IGenerator generator; - - @Override - //@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 - //@Cacheable - public List queryAll(YxUserBillQueryCriteria criteria) { - - return baseMapper.findAllByQueryCriteria(criteria.getCategory(), criteria.getType(), criteria.getNickname()); - } - - - @Override - 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("0 = 带确定 1 = 有效 -1 = 无效", yxUserBill.getStatus()); - list.add(map); - } - FileUtil.downloadExcel(list, response); - } -} 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 deleted file mode 100644 index fdee11115f29f145c4fd7612893b512e8d30b653..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/impl/YxUserServiceImpl.java +++ /dev/null @@ -1,179 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.shop.service.impl; - -import cn.hutool.core.util.NumberUtil; -import co.yixiang.common.service.impl.BaseServiceImpl; -import co.yixiang.common.utils.QueryHelpPlus; -import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.shop.domain.YxUser; -import co.yixiang.modules.shop.domain.YxUserBill; -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.UserMapper; -import co.yixiang.utils.FileUtil; -import co.yixiang.utils.OrderUtil; -import com.github.pagehelper.PageInfo; -import lombok.AllArgsConstructor; -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.math.BigDecimal; -import java.util.ArrayList; -import java.util.LinkedHashMap; -import java.util.List; -import java.util.Map; - -// 默认不使用缓存 -//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 = "yxUser") -@Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class YxUserServiceImpl extends BaseServiceImpl implements YxUserService { - - private final IGenerator generator; - - private final UserMapper yxUserMapper; - - private final 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 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"; - Integer pm = 1; - String title = "系统增加余额"; - if (param.getPtype() == 1) { - mark = "系统增加了" + param.getMoney() + "余额"; - newMoney = NumberUtil.add(userDTO.getNowMoney(), param.getMoney()).doubleValue(); - } else { - title = "系统减少余额"; - mark = "系统扣除了" + param.getMoney() + "余额"; - type = "system_sub"; - pm = 0; - newMoney = NumberUtil.sub(userDTO.getNowMoney(), param.getMoney()).doubleValue(); - if (newMoney < 0) { - newMoney = 0d; - } - - } - YxUser user = new YxUser(); - user.setUid(userDTO.getUid()); - user.setNowMoney(BigDecimal.valueOf(newMoney)); - saveOrUpdate(user); - - YxUserBill userBill = new YxUserBill(); - userBill.setUid(userDTO.getUid()); - userBill.setLinkId("0"); - userBill.setPm(pm); - userBill.setTitle(title); - userBill.setCategory("now_money"); - userBill.setType(type); - userBill.setNumber(BigDecimal.valueOf(param.getMoney())); - userBill.setBalance(BigDecimal.valueOf(newMoney)); - userBill.setMark(mark); - userBill.setStatus(1); - yxUserBillService.save(userBill); - } - - @Override - public void incBrokeragePrice(double price, Long uid) { - yxUserMapper.incBrokeragePrice(price, uid); - } -} 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 deleted file mode 100644 index 7895ede4f15764b96844341cf24e4fad8e088a7a..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductAttrValueMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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 deleted file mode 100644 index 194b34c89390c944c0d1b3946f859cda07ebc166..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductMapper.java +++ /dev/null @@ -1,30 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.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 deleted file mode 100644 index 9bad4a9710dd9c8bdf0a257684bc0a1dd92bc767..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/StoreProductReplyMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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/SystemStoreMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreMapper.java deleted file mode 100644 index f6472d623c08cb436a809b0ac1b1c9f7c6d88637..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/SystemStoreMapper.java +++ /dev/null @@ -1,22 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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/UserBillMapper.java b/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserBillMapper.java deleted file mode 100644 index 3eee4a9350a361e7406884de2a983606a2a2eb81..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserBillMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.Select; -import org.springframework.stereotype.Repository; - -import java.util.List; - -/** - * @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 deleted file mode 100644 index f588a318a50302aa3a9e7cc487e578135fb4dafc..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/service/mapper/UserMapper.java +++ /dev/null @@ -1,33 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为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.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") Long id); - - @Update("update yx_user set brokerage_price = brokerage_price+ ${price} where uid = #{id}") - void incBrokeragePrice(@Param("price") double price, @Param("id") Long id); - -} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/template/rest/ShippingTemplatesController.java b/yshop-shop/src/main/java/co/yixiang/modules/template/rest/ShippingTemplatesController.java new file mode 100644 index 0000000000000000000000000000000000000000..ef34ab4cd16a42bf1051bc2dec6542011cfe1a3d --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/template/rest/ShippingTemplatesController.java @@ -0,0 +1,131 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.template.rest; + +import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.exception.BadRequestException; +import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.service.YxStoreProductService; +import co.yixiang.modules.template.domain.YxSystemCity; +import co.yixiang.modules.template.service.YxShippingTemplatesService; +import co.yixiang.modules.template.service.YxSystemCityService; +import co.yixiang.modules.template.service.dto.ShippingTemplatesDto; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesDto; +import co.yixiang.modules.template.service.dto.YxShippingTemplatesQueryCriteria; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.cache.annotation.Cacheable; +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.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Arrays; +import java.util.List; + +/** +* @author hupeng +* @date 2020-06-29 +*/ +@AllArgsConstructor +@Api(tags = "运费模板管理") +@RestController +@RequestMapping("/api/yxShippingTemplates") +public class ShippingTemplatesController { + + private final YxShippingTemplatesService yxShippingTemplatesService; + private final YxSystemCityService yxSystemCityService; + private final IGenerator generator; + private final YxStoreProductService yxStoreProductService; + + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('admin','yxShippingTemplates:list')") + public void download(HttpServletResponse response, YxShippingTemplatesQueryCriteria criteria) throws IOException { + yxShippingTemplatesService.download(generator.convert(yxShippingTemplatesService.queryAll(criteria), YxShippingTemplatesDto.class), response); + } + + @GetMapping + @Log("查询运费模板") + @ApiOperation("查询运费模板") + @PreAuthorize("@el.check('admin','yxShippingTemplates:list')") + public ResponseEntity getYxShippingTemplatess(YxShippingTemplatesQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxShippingTemplatesService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @ForbidSubmit + @PostMapping("/save/{id}") + @Log("新增/保存运费模板") + @ApiOperation("新增/保存运费模板") + @PreAuthorize("hasAnyRole('admin','yxShippingTemplates:add','yxShippingTemplates:edit')") + public ResponseEntity create(@PathVariable Integer id, + @Validated @RequestBody ShippingTemplatesDto shippingTemplatesDto){ + yxShippingTemplatesService.addAndUpdate(id,shippingTemplatesDto); + return new ResponseEntity<>(HttpStatus.CREATED); + } + + + @ForbidSubmit + @Log("删除运费模板") + @ApiOperation("删除运费模板") + @PreAuthorize("@el.check('admin','yxShippingTemplates:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Integer[] ids) { + List productList = yxStoreProductService.list(); + Arrays.asList(ids).forEach(id->{ + for (YxStoreProduct yxStoreProduct : productList) { + if(id.equals(yxStoreProduct.getTempId())){ + throw new BadRequestException("运费模板存在商品关联,请删除对应商品"); + } + } + yxShippingTemplatesService.removeById(id); + }); + return new ResponseEntity<>(HttpStatus.OK); + } + + + /** + * 获取城市列表 + */ + @Cacheable(cacheNames = ShopConstants.YSHOP_REDIS_SYS_CITY_KEY) + @GetMapping("/citys") + public ResponseEntity cityList() + { + List cityList = yxSystemCityService.list(Wrappers.lambdaQuery() + .eq(YxSystemCity::getParentId,0)); + + for (YxSystemCity systemCity : cityList){ + List children = yxSystemCityService.list(Wrappers + .lambdaQuery() + .eq(YxSystemCity::getParentId,systemCity.getCityId())); + + systemCity.setChildren(children); + } + + return new ResponseEntity<>(cityList,HttpStatus.OK); + } + +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MemberController.java b/yshop-shop/src/main/java/co/yixiang/modules/user/rest/MemberController.java similarity index 51% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MemberController.java rename to yshop-shop/src/main/java/co/yixiang/modules/user/rest/MemberController.java index eafb9fac6c2957fc3a9336ec3ad3b5c8d267b208..02e2dc29d1f14609a43b8d08599eeb9316618ac4 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/MemberController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/user/rest/MemberController.java @@ -2,19 +2,18 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.rest; +package co.yixiang.modules.user.rest; -import cn.hutool.core.util.ObjectUtil; -import co.yixiang.constant.SystemConfigConstants; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; -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.YxUserQueryCriteria; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.modules.user.service.dto.UserMoneyDto; +import co.yixiang.modules.user.service.dto.YxUserQueryCriteria; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; import io.swagger.annotations.Api; @@ -24,86 +23,81 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-10-06 - */ +* @author hupeng +* @date 2019-10-06 +*/ @Api(tags = "商城:会员管理") @RestController @RequestMapping("api") public class MemberController { private final YxUserService yxUserService; - private final YxSystemConfigService yxSystemConfigService; - public MemberController(YxUserService yxUserService, YxSystemConfigService yxSystemConfigService) { + public MemberController(YxUserService yxUserService) { this.yxUserService = yxUserService; - this.yxSystemConfigService = yxSystemConfigService; + } + + @Log("查看下级") + @ApiOperation(value = "查看下级") + @PostMapping(value = "/yxUser/spread") + @PreAuthorize("hasAnyRole('admin','YXUSER_ALL','YXUSER_EDIT')") + public ResponseEntity getSpread(@RequestBody YxUserQueryCriteria criteria){ + return new ResponseEntity<>(yxUserService.querySpread(criteria.getUid(),criteria.getGrade()), + HttpStatus.OK); } @Log("查询用户") @ApiOperation(value = "查询用户") @GetMapping(value = "/yxUser") @PreAuthorize("hasAnyRole('admin','YXUSER_ALL','YXUSER_SELECT')") - public ResponseEntity getYxUsers(YxUserQueryCriteria criteria, Pageable pageable) { - if (ObjectUtil.isNotNull(criteria.getIsPromoter())) { - if (criteria.getIsPromoter() == 1) { - String key = yxSystemConfigService.findByKey(SystemConfigConstants.STORE_BROKERAGE_STATU) - .getValue(); - if (Integer.valueOf(key) == 2) { - return new ResponseEntity(null, HttpStatus.OK); - } - } - } - return new ResponseEntity(yxUserService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxUsers(YxUserQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxUserService.queryAll(criteria,pageable),HttpStatus.OK); } - @NoRepeatSubmit - @Log("新增用户") - @ApiOperation(value = "新增用户") - @PostMapping(value = "/yxUser") - @PreAuthorize("hasAnyRole('admin','YXUSER_ALL','YXUSER_CREATE')") - public ResponseEntity create(@Validated @RequestBody YxUser resources) { - return new ResponseEntity(yxUserService.save(resources), HttpStatus.CREATED); - } - @NoRepeatSubmit @Log("修改用户") @ApiOperation(value = "修改用户") @PutMapping(value = "/yxUser") @PreAuthorize("hasAnyRole('admin','YXUSER_ALL','YXUSER_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxUser resources) { + public ResponseEntity update(@Validated @RequestBody YxUser resources){ yxUserService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + @ForbidSubmit @Log("删除用户") @ApiOperation(value = "删除用户") @DeleteMapping(value = "/yxUser/{uid}") @PreAuthorize("hasAnyRole('admin','YXUSER_ALL','YXUSER_DELETE')") - public ResponseEntity delete(@PathVariable Integer uid) { - + public ResponseEntity delete(@PathVariable Integer uid){ yxUserService.removeById(uid); return new ResponseEntity(HttpStatus.OK); } + @ForbidSubmit @ApiOperation(value = "用户禁用启用") @PostMapping(value = "/yxUser/onStatus/{id}") - public ResponseEntity onStatus(@PathVariable Integer id, @RequestBody String jsonStr) { - + public ResponseEntity onStatus(@PathVariable Long id,@RequestBody String jsonStr){ JSONObject jsonObject = JSON.parseObject(jsonStr); - int status = Integer.valueOf(jsonObject.get("status").toString()); - yxUserService.onStatus(id, status); + Integer status = jsonObject.getInteger("status"); + yxUserService.onStatus(id,status); return new ResponseEntity(HttpStatus.OK); } @ApiOperation(value = "修改余额") @PostMapping(value = "/yxUser/money") @PreAuthorize("hasAnyRole('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); } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserLevelController.java b/yshop-shop/src/main/java/co/yixiang/modules/user/rest/SystemUserLevelController.java similarity index 64% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserLevelController.java rename to yshop-shop/src/main/java/co/yixiang/modules/user/rest/SystemUserLevelController.java index d079642dbcacefb0936a8e847327b662eca42c0b..9fa1af3c374eb4347a2a8e2d69b9c0fd43131143 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserLevelController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/user/rest/SystemUserLevelController.java @@ -1,16 +1,15 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.rest; +package co.yixiang.modules.user.rest; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; +import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.shop.domain.YxSystemUserLevel; -import co.yixiang.modules.shop.service.YxSystemUserLevelService; -import co.yixiang.modules.shop.service.dto.YxSystemUserLevelQueryCriteria; +import co.yixiang.modules.user.service.YxSystemUserLevelService; +import co.yixiang.modules.user.service.dto.YxSystemUserLevelQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -18,12 +17,19 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-12-04 - */ +* @author hupeng +* @date 2019-12-04 +*/ @Api(tags = "商城:用户等级管理") @RestController @RequestMapping("api") @@ -39,35 +45,35 @@ public class SystemUserLevelController { @ApiOperation(value = "查询") @GetMapping(value = "/yxSystemUserLevel") @PreAuthorize("hasAnyRole('admin','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_SELECT')") - public ResponseEntity getYxSystemUserLevels(YxSystemUserLevelQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxSystemUserLevelService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxSystemUserLevels(YxSystemUserLevelQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxSystemUserLevelService.queryAll(criteria,pageable),HttpStatus.OK); } - @NoRepeatSubmit + @ForbidSubmit @Log("新增") @ApiOperation(value = "新增") @PostMapping(value = "/yxSystemUserLevel") @PreAuthorize("hasAnyRole('admin','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_CREATE')") - public ResponseEntity create(@Validated @RequestBody YxSystemUserLevel resources) { - return new ResponseEntity(yxSystemUserLevelService.save(resources), HttpStatus.CREATED); + public ResponseEntity create(@Validated @RequestBody YxSystemUserLevel resources){ + return new ResponseEntity<>(yxSystemUserLevelService.save(resources),HttpStatus.CREATED); } - @NoRepeatSubmit + @ForbidSubmit @Log("修改") @ApiOperation(value = "修改") @PutMapping(value = "/yxSystemUserLevel") @PreAuthorize("hasAnyRole('admin','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxSystemUserLevel resources) { + public ResponseEntity update(@Validated @RequestBody YxSystemUserLevel resources){ yxSystemUserLevelService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit + @ForbidSubmit @Log("删除") @ApiOperation(value = "删除") @DeleteMapping(value = "/yxSystemUserLevel/{id}") @PreAuthorize("hasAnyRole('admin','YXSYSTEMUSERLEVEL_ALL','YXSYSTEMUSERLEVEL_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { + public ResponseEntity delete(@PathVariable Integer id){ yxSystemUserLevelService.removeById(id); return new ResponseEntity(HttpStatus.OK); } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserTaskController.java b/yshop-shop/src/main/java/co/yixiang/modules/user/rest/SystemUserTaskController.java similarity index 71% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserTaskController.java rename to yshop-shop/src/main/java/co/yixiang/modules/user/rest/SystemUserTaskController.java index c9c919ace3f2efaab41065faab924f3f78ed22e4..fc1932ec845540e73c07217eecd17cbc1213f69a 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/SystemUserTaskController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/user/rest/SystemUserTaskController.java @@ -1,16 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.rest; +package co.yixiang.modules.user.rest; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; -import co.yixiang.modules.shop.domain.YxSystemUserTask; -import co.yixiang.modules.shop.service.YxSystemUserTaskService; -import co.yixiang.modules.shop.service.dto.YxSystemUserTaskQueryCriteria; +import co.yixiang.modules.user.domain.YxSystemUserTask; +import co.yixiang.modules.user.service.YxSystemUserTaskService; +import co.yixiang.modules.user.service.dto.YxSystemUserTaskQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.PageRequest; @@ -20,12 +18,19 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-12-04 - */ +* @author hupeng +* @date 2019-12-04 +*/ @Api(tags = "商城:用户任务管理") @RestController @RequestMapping("api") @@ -42,42 +47,39 @@ public class SystemUserTaskController { @GetMapping(value = "/yxSystemUserTask") @PreAuthorize("hasAnyRole('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_SELECT')") public ResponseEntity getYxSystemUserTasks(YxSystemUserTaskQueryCriteria criteria, - Pageable pageable) { + Pageable pageable){ Sort sort = Sort.by(Sort.Direction.ASC, "level_id"); Pageable pageableT = PageRequest.of(pageable.getPageNumber(), pageable.getPageSize(), sort); - return new ResponseEntity(yxSystemUserTaskService.queryAll(criteria, pageableT), + return new ResponseEntity(yxSystemUserTaskService.queryAll(criteria,pageableT), HttpStatus.OK); } - @NoRepeatSubmit @Log("新增") @ApiOperation(value = "新增") @PostMapping(value = "/yxSystemUserTask") @PreAuthorize("hasAnyRole('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_CREATE')") - public ResponseEntity create(@Validated @RequestBody YxSystemUserTask resources) { - return new ResponseEntity(yxSystemUserTaskService.save(resources), HttpStatus.CREATED); + public ResponseEntity create(@Validated @RequestBody YxSystemUserTask resources){ + return new ResponseEntity(yxSystemUserTaskService.save(resources),HttpStatus.CREATED); } - @NoRepeatSubmit @Log("修改") @ApiOperation(value = "修改") @PutMapping(value = "/yxSystemUserTask") @PreAuthorize("hasAnyRole('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxSystemUserTask resources) { - + public ResponseEntity update(@Validated @RequestBody YxSystemUserTask resources){ + //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); yxSystemUserTaskService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } - @NoRepeatSubmit @Log("删除") @ApiOperation(value = "删除") @DeleteMapping(value = "/yxSystemUserTask/{id}") @PreAuthorize("hasAnyRole('admin','YXSYSTEMUSERTASK_ALL','YXSYSTEMUSERTASK_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { - + public ResponseEntity delete(@PathVariable Integer id){ + //if(StrUtil.isNotEmpty("22")) throw new BadRequestException("演示环境禁止操作"); yxSystemUserTaskService.removeById(id); return new ResponseEntity(HttpStatus.OK); } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserBillController.java b/yshop-shop/src/main/java/co/yixiang/modules/user/rest/UserBillController.java similarity index 66% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserBillController.java rename to yshop-shop/src/main/java/co/yixiang/modules/user/rest/UserBillController.java index 4b54fb309f1c83d061443abb00e0dd442fa6124d..9b1df9e60900c4fde704de49762d0a02944d8a6f 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserBillController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/user/rest/UserBillController.java @@ -2,13 +2,15 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ -package co.yixiang.modules.shop.rest; +package co.yixiang.modules.user.rest; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.shop.service.YxUserBillService; -import co.yixiang.modules.shop.service.dto.YxUserBillQueryCriteria; +import co.yixiang.modules.user.service.YxUserBillService; +import co.yixiang.modules.user.service.dto.YxUserBillQueryCriteria; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.data.domain.Pageable; @@ -20,9 +22,9 @@ import org.springframework.web.bind.annotation.RequestMapping; import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-11-06 - */ +* @author hupeng +* @date 2019-11-06 +*/ @Api(tags = "商城:用户账单管理") @RestController @RequestMapping("api") @@ -38,9 +40,13 @@ public class UserBillController { @ApiOperation(value = "查询") @GetMapping(value = "/yxUserBill") @PreAuthorize("hasAnyRole('admin','YXUSERBILL_ALL','YXUSERBILL_SELECT')") - public ResponseEntity getYxUserBills(YxUserBillQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxUserBillService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxUserBills(YxUserBillQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxUserBillService.queryAll(criteria,pageable),HttpStatus.OK); } + + + + } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserRechargeController.java b/yshop-shop/src/main/java/co/yixiang/modules/user/rest/UserRechargeController.java similarity index 67% rename from yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserRechargeController.java rename to yshop-shop/src/main/java/co/yixiang/modules/user/rest/UserRechargeController.java index 4985d6d0d41d008a747c897b5aefeebd2b006986..52ae36f9b50e8d615344d701d00d569b135ec9c2 100644 --- a/yshop-shop/src/main/java/co/yixiang/modules/shop/rest/UserRechargeController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/user/rest/UserRechargeController.java @@ -1,26 +1,27 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.shop.rest; +package co.yixiang.modules.user.rest; import co.yixiang.dozer.service.IGenerator; import co.yixiang.modules.logging.aop.log.Log; -import co.yixiang.modules.aop.NoRepeatSubmit; -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 co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.user.service.YxUserRechargeService; +import co.yixiang.modules.user.service.dto.YxUserRechargeDto; +import co.yixiang.modules.user.service.dto.YxUserRechargeQueryCriteria; 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 org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; @@ -28,9 +29,9 @@ import java.util.ArrayList; import java.util.Arrays; /** - * @author hupeng - * @date 2020-03-02 - */ +* @author hupeng +* @date 2020-03-02 +*/ @Api(tags = "充值管理管理") @RestController @RequestMapping("/api/yxUserRecharge") @@ -38,7 +39,6 @@ public class UserRechargeController { private final YxUserRechargeService yxUserRechargeService; private final IGenerator generator; - public UserRechargeController(YxUserRechargeService yxUserRechargeService, IGenerator generator) { this.yxUserRechargeService = yxUserRechargeService; this.generator = generator; @@ -56,26 +56,19 @@ public class UserRechargeController { @Log("查询充值管理") @ApiOperation("查询充值管理") @PreAuthorize("@el.check('yxUserRecharge:list')") - public ResponseEntity getYxUserRecharges(YxUserRechargeQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(yxUserRechargeService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxUserRecharges(YxUserRechargeQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxUserRechargeService.queryAll(criteria,pageable),HttpStatus.OK); } - @NoRepeatSubmit - @PostMapping - @Log("新增充值管理") - @ApiOperation("新增充值管理") - @PreAuthorize("@el.check('yxUserRecharge:add')") - public ResponseEntity create(@Validated @RequestBody YxUserRecharge resources) { - return new ResponseEntity<>(yxUserRechargeService.save(resources), HttpStatus.CREATED); - } - @NoRepeatSubmit + + + @ForbidSubmit @Log("删除充值管理") @ApiOperation("删除充值管理") @PreAuthorize("@el.check('yxUserRecharge:del')") @DeleteMapping public ResponseEntity deleteAll(@RequestBody Integer[] ids) { - yxUserRechargeService.removeByIds(new ArrayList<>(Arrays.asList(ids))); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/util/RedisLock.java b/yshop-shop/src/main/java/co/yixiang/modules/util/RedisLock.java deleted file mode 100644 index 8165dc978dd8c8df6d501ddff3ac7bcdc6753974..0000000000000000000000000000000000000000 --- a/yshop-shop/src/main/java/co/yixiang/modules/util/RedisLock.java +++ /dev/null @@ -1,100 +0,0 @@ -package co.yixiang.modules.util; - -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -import lombok.extern.slf4j.Slf4j; -import org.apache.commons.lang3.StringUtils; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.data.redis.core.StringRedisTemplate; -import org.springframework.stereotype.Service; -import java.util.concurrent.TimeUnit; - -/** - * Redis 分布式锁实现 - */ -@Slf4j -@Service -public class RedisLock { - - private static final Long RELEASE_SUCCESS = 1L; - private static final String LOCK_SUCCESS = "OK"; - private static final String SET_IF_NOT_EXIST = "NX"; - // 当前设置 过期时间单位, EX = seconds; PX = milliseconds - private static final String SET_WITH_EXPIRE_TIME = "EX"; - // if get(key) == value return del(key) - private static final String RELEASE_LOCK_SCRIPT = "if redis.call('get', KEYS[1]) == ARGV[1] then return redis.call('del', KEYS[1]) else return 0 end"; - - @Autowired - private StringRedisTemplate redisTemplate; - - /** - * 该加锁方法仅针对单实例 Redis 可实现分布式加锁 - * 对于 Redis 集群则无法使用 - *

- * 支持重复,线程安全 - * - * @param lockKey 加锁键 - * @param clientId 加锁客户端唯一标识(采用UUID) - * @param seconds 锁过期时间 - * @return - */ - public boolean tryLock(String lockKey, String clientId, int seconds) { - //return redisTemplate.execute((RedisCallback) redisConnection -> { - // Jedis jedis = (Jedis) redisConnection.getNativeConnection(); - // String result = jedis.set(lockKey, clientId, SetParams.setParams().nx().ex(seconds)); - // if (LOCK_SUCCESS.equals(result)) { - // return true; - // } - // return false; - //}); - if(redisTemplate.opsForValue().setIfAbsent(lockKey,clientId)){ - return true; - } - String currentValue = redisTemplate.opsForValue().get(lockKey); - - if(!StringUtils.isEmpty(currentValue) && - Long.parseLong(currentValue) 0) { - redisTemplate.expire(lockKey, seconds, TimeUnit.SECONDS); - } - if(!StringUtils.isEmpty(oldValue)&& oldValue.equals(currentValue)){ - return true; - } - } - return false; - } - - /** - * 与 tryLock 相对应,用作释放锁 - * - * @param lockKey - * @param clientId - * @return - */ - public boolean releaseLock(String lockKey, String clientId) { - //return redisTemplate.execute((RedisCallback) redisConnection -> { - // Jedis jedis = (Jedis) redisConnection.getNativeConnection(); - // Object result = jedis.eval(RELEASE_LOCK_SCRIPT, Collections.singletonList(lockKey), - // Collections.singletonList(clientId)); - // if (RELEASE_SUCCESS.equals(result)) { - // return true; - // } - // return false; - //}); - try { - String currentValue = redisTemplate.opsForValue().get(lockKey); - if (!StringUtils.isEmpty(currentValue) && currentValue.equals(clientId)) { - redisTemplate.opsForValue().getOperations().delete(lockKey); - } - return true; - } catch (Exception e){ - log.error("【redis分布式锁异常】{}",e); - return false; - } - } -} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatArticleController.java b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatArticleController.java similarity index 57% rename from yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatArticleController.java rename to yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatArticleController.java index 87669eea3453d14bb628c34586403770f5a01afc..3ec1655adb58869b319fc8a3530e86527ed96cd9 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatArticleController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatArticleController.java @@ -1,11 +1,12 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.mp.controller; +package co.yixiang.modules.wechat.rest; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.services.WechatArticleService; import co.yixiang.modules.mp.domain.YxArticle; import co.yixiang.modules.mp.service.YxArticleService; import co.yixiang.modules.mp.service.dto.YxArticleDto; @@ -18,66 +19,81 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-10-07 - */ +* @author hupeng +* @date 2019-10-07 +*/ @Api(tags = "商城:微信图文管理") @RestController @RequestMapping("api") public class WechatArticleController { private final YxArticleService yxArticleService; + private final WechatArticleService wechatArticleService; - public WechatArticleController(YxArticleService yxArticleService) { + public WechatArticleController(YxArticleService yxArticleService,WechatArticleService wechatArticleService) { this.yxArticleService = yxArticleService; + this.wechatArticleService = wechatArticleService; + } + + @ApiOperation(value = "查询单条信息") + @GetMapping(value = "/yxArticle/info/{id}") + @PreAuthorize("hasAnyRole('admin','YXARTICLE_ALL','YXARTICLE_GET')") + public ResponseEntity getInfo(@PathVariable Integer id){ + return new ResponseEntity<>(yxArticleService.getById(id),HttpStatus.OK); } @ApiOperation(value = "查询") @GetMapping(value = "/yxArticle") @PreAuthorize("hasAnyRole('admin','YXARTICLE_ALL','YXARTICLE_SELECT')") - public ResponseEntity getYxArticles(YxArticleQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity(yxArticleService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxArticles(YxArticleQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxArticleService.queryAll(criteria,pageable),HttpStatus.OK); } @ApiOperation(value = "新增") @PostMapping(value = "/yxArticle") @PreAuthorize("hasAnyRole('admin','YXARTICLE_ALL','YXARTICLE_CREATE')") - public ResponseEntity create(@Validated @RequestBody YxArticle resources) { - return new ResponseEntity(yxArticleService.save(resources), HttpStatus.CREATED); + public ResponseEntity create(@Validated @RequestBody YxArticle resources){ + return new ResponseEntity<>(yxArticleService.save(resources),HttpStatus.CREATED); } @ApiOperation(value = "修改") @PutMapping(value = "/yxArticle") @PreAuthorize("hasAnyRole('admin','YXARTICLE_ALL','YXARTICLE_EDIT')") - public ResponseEntity update(@Validated @RequestBody YxArticle resources) { + public ResponseEntity update(@Validated @RequestBody YxArticle resources){ yxArticleService.saveOrUpdate(resources); return new ResponseEntity(HttpStatus.NO_CONTENT); } - + @ForbidSubmit @ApiOperation(value = "删除") @DeleteMapping(value = "/yxArticle/{id}") @PreAuthorize("hasAnyRole('admin','YXARTICLE_ALL','YXARTICLE_DELETE')") - public ResponseEntity delete(@PathVariable Integer id) { - + public ResponseEntity delete(@PathVariable Integer id){ yxArticleService.removeById(id); return new ResponseEntity(HttpStatus.OK); } + @ForbidSubmit @ApiOperation(value = "发布文章") @GetMapping(value = "/yxArticle/publish/{id}") @PreAuthorize("hasAnyRole('admin','YXARTICLE_ALL','YXARTICLE_DELETE')") - public ResponseEntity publish(@PathVariable Integer id) throws Exception { - - YxArticleDto yxArticleDTO = new YxArticleDto(); + public ResponseEntity publish(@PathVariable Integer id) throws Exception{ + YxArticleDto yxArticleDTO= new YxArticleDto(); YxArticle yxArticle = yxArticleService.getById(id); - BeanUtils.copyProperties(yxArticle, yxArticleDTO); - yxArticleService.uploadNews(yxArticleDTO); + BeanUtils.copyProperties(yxArticle,yxArticleDTO); + wechatArticleService.publish(yxArticleDTO); return new ResponseEntity(HttpStatus.OK); } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatMenuController.java b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatMenuController.java similarity index 76% rename from yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatMenuController.java rename to yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatMenuController.java index 94ebfa92543577cb807a32d0cecc445b4c2635a0..239d199daa884e4ad4b3fe2674ba24e560abdcb9 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatMenuController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatMenuController.java @@ -1,17 +1,17 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.mp.controller; +package co.yixiang.modules.wechat.rest; import co.yixiang.constant.ShopConstants; import co.yixiang.exception.BadRequestException; -import co.yixiang.modules.mp.config.WxMpConfiguration; +import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.mp.domain.YxWechatMenu; import co.yixiang.modules.mp.service.YxWechatMenuService; +import co.yixiang.modules.mp.config.WxMpConfiguration; import co.yixiang.utils.OrderUtil; import com.alibaba.fastjson.JSON; import com.alibaba.fastjson.JSONObject; @@ -24,19 +24,23 @@ import me.chanjar.weixin.mp.api.WxMpService; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-10-06 - */ +* @author hupeng +* @date 2019-10-06 +*/ @Api(tags = "商城:微信菜單") @RestController @RequestMapping("api") @SuppressWarnings("unchecked") public class WechatMenuController { - private final co.yixiang.modules.mp.service.YxWechatMenuService YxWechatMenuService; + private final YxWechatMenuService YxWechatMenuService; public WechatMenuController(YxWechatMenuService YxWechatMenuService) { this.YxWechatMenuService = YxWechatMenuService; @@ -45,29 +49,28 @@ public class WechatMenuController { @ApiOperation(value = "查询菜单") @GetMapping(value = "/YxWechatMenu") @PreAuthorize("hasAnyRole('admin','YxWechatMenu_ALL','YxWechatMenu_SELECT')") - public ResponseEntity getYxWechatMenus() { + public ResponseEntity getYxWechatMenus(){ return new ResponseEntity(YxWechatMenuService.getOne(new LambdaQueryWrapper() - .eq(YxWechatMenu::getKey, ShopConstants.WECHAT_MENUS)), HttpStatus.OK); + .eq(YxWechatMenu::getKey,ShopConstants.WECHAT_MENUS)),HttpStatus.OK); } - + @ForbidSubmit @ApiOperation(value = "创建菜单") @PostMapping(value = "/YxWechatMenu") @PreAuthorize("hasAnyRole('admin','YxWechatMenu_ALL','YxWechatMenu_CREATE')") - public ResponseEntity create(@RequestBody String jsonStr) { - + public ResponseEntity create( @RequestBody String jsonStr){ JSONObject jsonObject = JSON.parseObject(jsonStr); String jsonButton = jsonObject.get("buttons").toString(); YxWechatMenu YxWechatMenu = new YxWechatMenu(); Boolean isExist = YxWechatMenuService.isExist(ShopConstants.WECHAT_MENUS); - WxMenu menu = JSONObject.parseObject(jsonStr, WxMenu.class); + WxMenu menu = JSONObject.parseObject(jsonStr,WxMenu.class); WxMpService wxService = WxMpConfiguration.getWxMpService(); - if (isExist) { + if(isExist){ YxWechatMenu.setKey(ShopConstants.WECHAT_MENUS); YxWechatMenu.setResult(jsonButton); YxWechatMenuService.saveOrUpdate(YxWechatMenu); - } else { + }else { YxWechatMenu.setKey(ShopConstants.WECHAT_MENUS); YxWechatMenu.setResult(jsonButton); YxWechatMenu.setAddTime(OrderUtil.getSecondTimestampTwo()); @@ -81,11 +84,13 @@ public class WechatMenuController { wxService.getMenuService().menuCreate(menu); } catch (WxErrorException e) { throw new BadRequestException(e.getMessage()); - // e.printStackTrace(); + // e.printStackTrace(); } return new ResponseEntity(HttpStatus.OK); } + + } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatReplyController.java b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatReplyController.java similarity index 67% rename from yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatReplyController.java rename to yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatReplyController.java index 306a58b0bbc7b6b55fc9851ae3b78ea3f1a750bf..c1c017ff8bad1048f0f09c53426c0f183394f863 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatReplyController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatReplyController.java @@ -1,12 +1,12 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.mp.controller; +package co.yixiang.modules.wechat.rest; import cn.hutool.core.util.ObjectUtil; +import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.mp.domain.YxWechatReply; import co.yixiang.modules.mp.service.YxWechatReplyService; import com.alibaba.fastjson.JSON; @@ -16,12 +16,16 @@ import io.swagger.annotations.ApiOperation; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.security.access.prepost.PreAuthorize; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** - * @author hupeng - * @date 2019-10-10 - */ +* @author hupeng +* @date 2019-10-10 +*/ @Api(tags = "商城:微信回復管理") @RestController @RequestMapping("api") @@ -35,17 +39,17 @@ public class WechatReplyController { @ApiOperation(value = "查询") @GetMapping(value = "/yxWechatReply") - @PreAuthorize("hasAnyRole('admin','YXWECHATREPLY_ALL','YXWECHATREPLY_SELECT')") - public ResponseEntity getYxWechatReplys() { - return new ResponseEntity(yxWechatReplyService.isExist("subscribe"), HttpStatus.OK); + @PreAuthorize("@el.check('admin','YXWECHATREPLY_ALL','YXWECHATREPLY_SELECT')") + public ResponseEntity getYxWechatReplys(){ + return new ResponseEntity<>(yxWechatReplyService.isExist("subscribe"),HttpStatus.OK); } + @ForbidSubmit @ApiOperation(value = "新增自动回复") @PostMapping(value = "/yxWechatReply") - @PreAuthorize("hasAnyRole('admin','YXWECHATREPLY_ALL','YXWECHATREPLY_CREATE')") - public ResponseEntity create(@RequestBody String jsonStr) { - + @PreAuthorize("@el.check('admin','YXWECHATREPLY_ALL','YXWECHATREPLY_CREATE')") + public ResponseEntity create(@RequestBody String jsonStr){ JSONObject jsonObject = JSON.parseObject(jsonStr); YxWechatReply yxWechatReply = new YxWechatReply(); YxWechatReply isExist = yxWechatReplyService.isExist(jsonObject.get("key").toString()); @@ -53,9 +57,9 @@ public class WechatReplyController { yxWechatReply.setStatus(Integer.valueOf(jsonObject.get("status").toString())); yxWechatReply.setData(jsonObject.get("data").toString()); yxWechatReply.setType(jsonObject.get("type").toString()); - if (ObjectUtil.isNull(isExist)) { + if(ObjectUtil.isNull(isExist)){ yxWechatReplyService.create(yxWechatReply); - } else { + }else{ yxWechatReply.setId(isExist.getId()); yxWechatReplyService.upDate(yxWechatReply); } @@ -64,4 +68,7 @@ public class WechatReplyController { } + + + } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatTemplateController.java b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatTemplateController.java similarity index 71% rename from yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatTemplateController.java rename to yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatTemplateController.java index d5800fd1adb749249cb709acc1e58a618953a095..3da72bcbc06bd8318d2b1e68b6f0fddaa269e2e9 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/controller/WechatTemplateController.java +++ b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/WechatTemplateController.java @@ -1,12 +1,12 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ -package co.yixiang.modules.mp.controller; +package co.yixiang.modules.wechat.rest; import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.aop.ForbidSubmit; import co.yixiang.modules.mp.domain.YxWechatTemplate; import co.yixiang.modules.mp.service.YxWechatTemplateService; import co.yixiang.modules.mp.service.dto.YxWechatTemplateDto; @@ -19,16 +19,22 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import javax.servlet.http.HttpServletResponse; import java.io.IOException; -import java.util.Arrays; /** - * @author hupeng - * @date 2019-12-10 - */ +* @author hupeng +* @date 2019-12-10 +*/ @Api(tags = "商城:微信模板管理") @RestController @RequestMapping("/api/yxWechatTemplate") @@ -50,32 +56,33 @@ public class WechatTemplateController { @GetMapping @ApiOperation("查询微信模板消息") @PreAuthorize("@el.check('admin','yxWechatTemplate:list')") - public ResponseEntity getYxWechatTemplates(YxWechatTemplateQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(yxWechatTemplateService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getYxWechatTemplates(YxWechatTemplateQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxWechatTemplateService.queryAll(criteria,pageable),HttpStatus.OK); } + @ForbidSubmit @PostMapping @ApiOperation("新增微信模板消息") @PreAuthorize("@el.check('admin','yxWechatTemplate:add')") - public ResponseEntity create(@Validated @RequestBody YxWechatTemplate resources) { - return new ResponseEntity<>(yxWechatTemplateService.save(resources), HttpStatus.CREATED); + public ResponseEntity create(@Validated @RequestBody YxWechatTemplate resources){ + return new ResponseEntity<>(yxWechatTemplateService.save(resources),HttpStatus.CREATED); } + @ForbidSubmit @PutMapping @ApiOperation("修改微信模板消息") @PreAuthorize("@el.check('admin','yxWechatTemplate:edit')") - public ResponseEntity update(@Validated @RequestBody YxWechatTemplate resources) { + public ResponseEntity update(@Validated @RequestBody YxWechatTemplate resources){ yxWechatTemplateService.updateById(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } + @ForbidSubmit @ApiOperation("删除微信模板消息") @PreAuthorize("@el.check('admin','yxWechatTemplate:del')") - @DeleteMapping - public ResponseEntity deleteAll(@RequestBody Integer[] ids) { - Arrays.asList(ids).forEach(id -> { - yxWechatTemplateService.removeById(id); - }); + @DeleteMapping("/{id}") + public ResponseEntity deleteAll(@PathVariable Integer id) { + yxWechatTemplateService.removeById(id); return new ResponseEntity<>(HttpStatus.OK); } } diff --git a/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveController.java b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveController.java new file mode 100644 index 0000000000000000000000000000000000000000..0f609ccccc1d244a212c9c38cab4096e067513fd --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveController.java @@ -0,0 +1,122 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.wechat.rest; + +import co.yixiang.constant.ShopConstants; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.mp.domain.YxWechatLive; +import co.yixiang.modules.mp.service.YxWechatLiveService; +import co.yixiang.modules.mp.service.dto.UpdateGoodsDto; +import co.yixiang.modules.mp.service.dto.YxWechatLiveDto; +import co.yixiang.modules.mp.service.dto.YxWechatLiveQueryCriteria; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +import org.springframework.cache.annotation.CacheEvict; +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.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Arrays; + +/** +* @author hupeng +* @date 2020-08-10 +*/ +@AllArgsConstructor +@Api(tags = "wxlive管理") +@RestController +@RequestMapping("/api/yxWechatLive") +public class YxWechatLiveController { + + private final YxWechatLiveService yxWechatLiveService; + private final IGenerator generator; + + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('admin','yxWechatLive:list')") + public void download(HttpServletResponse response, YxWechatLiveQueryCriteria criteria) throws IOException { + yxWechatLiveService.download(generator.convert(yxWechatLiveService.queryAll(criteria), YxWechatLiveDto.class), response); + } + + @GetMapping + @Log("查询wxlive") + @ApiOperation("查询wxlive") + @PreAuthorize("@el.check('admin','yxWechatLive:list')") + public ResponseEntity getYxWechatLives(YxWechatLiveQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxWechatLiveService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) + @ForbidSubmit + @PostMapping + @Log("新增wxlive") + @ApiOperation("新增wxlive") + @PreAuthorize("@el.check('admin','yxWechatLive:add')") + public ResponseEntity create(@Validated @RequestBody YxWechatLive resources){ + return new ResponseEntity<>(yxWechatLiveService.saveLive(resources),HttpStatus.CREATED); + } + + + @ForbidSubmit + @PostMapping("/addGoods") + @Log("添加商品") + @ApiOperation("添加商品") + @PreAuthorize("@el.check('admin','yxWechatLive:add')") + public ResponseEntity addGoods(@Validated @RequestBody UpdateGoodsDto resources){ + return new ResponseEntity<>(yxWechatLiveService.addGoods(resources),HttpStatus.CREATED); + } + + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) + @ForbidSubmit + @PutMapping + @Log("修改wxlive") + @ApiOperation("修改wxlive") + @PreAuthorize("@el.check('admin','yxWechatLive:edit')") + public ResponseEntity update(@Validated @RequestBody YxWechatLive resources){ + yxWechatLiveService.updateById(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) + @ForbidSubmit + @Log("删除wxlive") + @ApiOperation("删除wxlive") + @PreAuthorize("@el.check('admin','yxWechatLive:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Long[] ids) { + Arrays.asList(ids).forEach(id->{ + yxWechatLiveService.removeById(id); + }); + return new ResponseEntity<>(HttpStatus.OK); + } + + @CacheEvict(cacheNames = ShopConstants.YSHOP_REDIS_INDEX_KEY,allEntries = true) + @ApiOperation("同步数据") + @GetMapping("/synchro") + public ResponseEntity synchroWxOlLive() { + yxWechatLiveService.synchroWxOlLive(); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveGoodsController.java b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveGoodsController.java new file mode 100644 index 0000000000000000000000000000000000000000..ed39c15d739720f60de3b13cb96618a841e3d0c0 --- /dev/null +++ b/yshop-shop/src/main/java/co/yixiang/modules/wechat/rest/YxWechatLiveGoodsController.java @@ -0,0 +1,104 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.wechat.rest; + +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.aop.ForbidSubmit; +import co.yixiang.modules.mp.domain.YxWechatLiveGoods; +import co.yixiang.modules.mp.service.YxWechatLiveGoodsService; +import co.yixiang.modules.mp.service.dto.YxWechatLiveGoodsDto; +import co.yixiang.modules.mp.service.dto.YxWechatLiveGoodsQueryCriteria; +import io.swagger.annotations.Api; +import io.swagger.annotations.ApiOperation; +import lombok.AllArgsConstructor; +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.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.Arrays; + +/** +* @author hupeng +* @date 2020-08-11 +*/ +@AllArgsConstructor +@Api(tags = "yxWechatLiveGoods管理") +@RestController +@RequestMapping("/api/yxWechatLiveGoods") +public class YxWechatLiveGoodsController { + + private final YxWechatLiveGoodsService yxWechatLiveGoodsService; + private final IGenerator generator; + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('admin','yxWechatLiveGoods:list')") + public void download(HttpServletResponse response, YxWechatLiveGoodsQueryCriteria criteria) throws IOException { + yxWechatLiveGoodsService.download(generator.convert(yxWechatLiveGoodsService.queryAll(criteria), YxWechatLiveGoodsDto.class), response); + } + + @GetMapping + @Log("查询yxWechatLiveGoods") + @ApiOperation("查询yxWechatLiveGoods") + @PreAuthorize("@el.check('admin','yxWechatLiveGoods:list')") + public ResponseEntity getYxWechatLiveGoodss(YxWechatLiveGoodsQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(yxWechatLiveGoodsService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @ForbidSubmit + @PostMapping + @Log("新增yxWechatLiveGoods") + @ApiOperation("新增yxWechatLiveGoods") + @PreAuthorize("@el.check('admin','yxWechatLiveGoods:add')") + public ResponseEntity create(@Validated @RequestBody YxWechatLiveGoods resources){ + return new ResponseEntity<>(yxWechatLiveGoodsService.saveGoods(resources),HttpStatus.CREATED); + } + + @ForbidSubmit + @PutMapping + @Log("修改yxWechatLiveGoods") + @ApiOperation("修改yxWechatLiveGoods") + @PreAuthorize("@el.check('admin','yxWechatLiveGoods:edit')") + public ResponseEntity update(@Validated @RequestBody YxWechatLiveGoods resources){ + yxWechatLiveGoodsService.updateGoods(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @ForbidSubmit + @Log("删除yxWechatLiveGoods") + @ApiOperation("删除yxWechatLiveGoods") + @PreAuthorize("@el.check('admin','yxWechatLiveGoods:del')") + @DeleteMapping + public ResponseEntity deleteAll(@RequestBody Long[] ids) { + Arrays.asList(ids).forEach(id->{ + yxWechatLiveGoodsService.removeGoods(id); + }); + return new ResponseEntity<>(HttpStatus.OK); + } + + @ApiOperation("同步数据") + @PostMapping("/synchro") + public ResponseEntity synchroWxOlLiveGoods(@RequestBody Integer[] ids) { + yxWechatLiveGoodsService.synchroWxOlLive(Arrays.asList(ids)); + return new ResponseEntity<>(HttpStatus.OK); + } +} diff --git a/yshop-tools/pom.xml b/yshop-tools/pom.xml index 2094060a0b5cddc51aadf1ab44cb92fa6d5b774f..0d6c6976030849bb2ef61ff00967827137d69982 100644 --- a/yshop-tools/pom.xml +++ b/yshop-tools/pom.xml @@ -5,7 +5,7 @@ yshop co.yixiang - 2.3 + 3.3 4.0.0 @@ -23,7 +23,7 @@ co.yixiang yshop-logging - 2.3 + 3.3 @@ -44,7 +44,7 @@ co.yixiang yshop-oss - 2.3 + 3.3 diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/config/MultipartConfig.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/config/MultipartConfig.java index 49021cea0aef913db026102215fea11746d087cd..8869b2d6d3a0748974dc1b2df56dd7e412c2e155 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/config/MultipartConfig.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/config/MultipartConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.config; @@ -17,7 +16,7 @@ import java.io.File; * @date 2018-12-28 * @author https://blog.csdn.net/llibin1024530411/article/details/79474953 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class MultipartConfig { /** diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/AlipayConfig.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/AlipayConfig.java index 52d0d68ed9ab89c28c13e55721712d19eda7d225..808aa6ec102c34976030888f2a8ff87e28795de0 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/AlipayConfig.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/AlipayConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.domain; @@ -15,72 +14,72 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -@TableName("alipay_config") +@TableName("tools_alipay_config") public class AlipayConfig implements Serializable { /** 主键 */ @TableId //@GeneratedValue(strategy = GenerationType.IDENTITY) - // @Column(name = "id") + // @Column(name = "id") private Long id; /** 应用ID */ - // @Column(name = "app_id") + // @Column(name = "app_id") private String appId; /** 编码 */ - // @Column(name = "charset") + // @Column(name = "charset") private String charset; /** 类型 固定格式json */ - // @Column(name = "format") + // @Column(name = "format") private String format; /** 网关地址 */ - // @Column(name = "gateway_url") + // @Column(name = "gateway_url") private String gatewayUrl; /** 异步回调 */ - // @Column(name = "notify_url") + // @Column(name = "notify_url") private String notifyUrl; /** 私钥 */ - // @Column(name = "private_key") + // @Column(name = "private_key") private String privateKey; /** 公钥 */ - // @Column(name = "public_key") + // @Column(name = "public_key") private String publicKey; /** 回调地址 */ - // @Column(name = "return_url") + // @Column(name = "return_url") private String returnUrl; /** 签名方式 */ - // @Column(name = "sign_type") + // @Column(name = "sign_type") private String signType; /** 商户号 */ - // @Column(name = "sys_service_provider_id") + // @Column(name = "sys_service_provider_id") private String sysServiceProviderId; - public void copy(AlipayConfig source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(AlipayConfig source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/EmailConfig.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/EmailConfig.java index 04b77bc4a86b8aeb9c39e8da69838c95e3329174..51b6eccd44217b295f7289b61fd95de9e03f3600 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/EmailConfig.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/EmailConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.domain; @@ -15,47 +14,47 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -@TableName("email_config") +@TableName("tools_email_config") public class EmailConfig implements Serializable { /** ID */ @TableId //@GeneratedValue(strategy = GenerationType.IDENTITY) - // @Column(name = "id") + // @Column(name = "id") private Long id; /** 收件人 */ - // @Column(name = "from_user") + // @Column(name = "from_user") private String fromUser; /** 邮件服务器SMTP地址 */ - // @Column(name = "host") + // @Column(name = "host") private String host; /** 密码 */ - // @Column(name = "pass") + // @Column(name = "pass") private String pass; /** 端口 */ - // @Column(name = "port") + // @Column(name = "port") private String port; /** 发件者用户名 */ - // @Column(name = "user") + // @Column(name = "user") private String user; - public void copy(EmailConfig source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(EmailConfig source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/LocalStorage.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/LocalStorage.java index d17eab2db3590d013432ed8e14e85c1a3296f633..643af97a4fbf8b2bd5f137a9326a9f59c3094024 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/LocalStorage.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/LocalStorage.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.domain; @@ -19,63 +18,63 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Getter @Setter -@TableName("local_storage") +@TableName("tools_local_storage") public class LocalStorage implements Serializable { @TableId //@GeneratedValue(strategy = GenerationType.IDENTITY) - // @Column(name = "id") + // @Column(name = "id") private Long id; /** 文件真实的名称 */ - // @Column(name = "real_name") + // @Column(name = "real_name") private String realName; /** 文件名 */ - // @Column(name = "name") + // @Column(name = "name") private String name; /** 后缀 */ - // @Column(name = "suffix") + // @Column(name = "suffix") private String suffix; /** 路径 */ - // @Column(name = "path") + // @Column(name = "path") private String path; /** 类型 */ - // @Column(name = "type") + // @Column(name = "type") private String type; /** 大小 */ - // @Column(name = "size") + // @Column(name = "size") private String size; /** 操作人 */ - // @Column(name = "operate") + // @Column(name = "operate") private String operate; /** 创建日期 */ - // @Column(name = "create_time") - @TableField(fill = FieldFill.INSERT) + // @Column(name = "create_time") + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; - public LocalStorage(String realName, String name, String suffix, String path, String type, String size, String operate) { + public LocalStorage(String realName,String name, String suffix, String path, String type, String size, String operate) { this.realName = realName; this.name = name; this.suffix = suffix; @@ -85,7 +84,7 @@ public class LocalStorage implements Serializable { this.operate = operate; } - public void copy(LocalStorage source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(LocalStorage source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/Picture.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/Picture.java index 87703aeb0073281121809d6d208e0f2737618409..130f5caab87fd1377c7e2126a60ef337095d8f80 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/Picture.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/Picture.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.domain; @@ -18,67 +17,67 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -@TableName("picture") +@TableName("tools_picture") public class Picture implements Serializable { /** ID */ @TableId //@GeneratedValue(strategy = GenerationType.IDENTITY) - // @Column(name = "id") + // @Column(name = "id") private Long id; /** 上传日期 */ - // @Column(name = "create_time") - @TableField(fill = FieldFill.INSERT) + // @Column(name = "create_time") + @TableField(fill= FieldFill.INSERT) private Timestamp createTime; /** 删除的URL */ - // @Column(name = "delete_url") + // @Column(name = "delete_url") private String deleteUrl; /** 图片名称 */ - // @Column(name = "filename") + // @Column(name = "filename") private String filename; /** 图片高度 */ - // @Column(name = "height") + // @Column(name = "height") private String height; /** 图片大小 */ - // @Column(name = "size") + // @Column(name = "size") private String size; /** 图片地址 */ - // @Column(name = "url") + // @Column(name = "url") private String url; /** 用户名称 */ - // @Column(name = "username") + // @Column(name = "username") private String username; /** 图片宽度 */ - // @Column(name = "width") + // @Column(name = "width") private String width; /** 文件的MD5值 */ - // @Column(name = "md5code") + // @Column(name = "md5code") private String md5code; - public void copy(Picture source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(Picture source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/QiniuConfig.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/QiniuConfig.java index 342bd259ee0fe6bed66ddca3ce953296c0e49816..9af23610309b056157c8a4c619127f69686b2335 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/QiniuConfig.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/QiniuConfig.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.domain; @@ -15,52 +14,52 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -@TableName("qiniu_config") +@TableName("tools_qiniu_config") public class QiniuConfig implements Serializable { /** ID */ @TableId //@GeneratedValue(strategy = GenerationType.IDENTITY) - // @Column(name = "id") + // @Column(name = "id") private Long id; /** accessKey */ - // @Column(name = "access_key") + // @Column(name = "access_key") private String accessKey; /** Bucket 识别符 */ - // @Column(name = "bucket") + // @Column(name = "bucket") private String bucket; /** 外链域名 */ - // @Column(name = "host",nullable = false) + // @Column(name = "host",nullable = false) private String host; /** secretKey */ - // @Column(name = "secret_key") + // @Column(name = "secret_key") private String secretKey; /** 空间类型 */ - // @Column(name = "type") + // @Column(name = "type") private String type; /** 机房 */ - // @Column(name = "zone") + // @Column(name = "zone") private String zone; - public void copy(QiniuConfig source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(QiniuConfig source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/QiniuContent.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/QiniuContent.java index 49a4a7beb0fa2899627032a88e8b5682959436f7..7e591ac8892692062debddc7f8077ae6707fe01b 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/QiniuContent.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/QiniuContent.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.domain; @@ -18,23 +17,23 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -@TableName("qiniu_content") +@TableName("tools_qiniu_content") public class QiniuContent implements Serializable { /** ID */ @TableId //@GeneratedValue(strategy = GenerationType.IDENTITY) - // @Column(name = "id") + // @Column(name = "id") private Long id; /** Bucket 识别符 */ - // @Column(name = "bucket") + // @Column(name = "bucket") private String bucket; @@ -44,31 +43,31 @@ public class QiniuContent implements Serializable { /** 文件大小 */ - // @Column(name = "size") + // @Column(name = "size") private String size; /** 文件类型:私有或公开 */ - // @Column(name = "type") + // @Column(name = "type") private String type; /** 上传或同步的时间 */ - // @Column(name = "update_time") - @TableField(fill = FieldFill.INSERT_UPDATE) + // @Column(name = "update_time") + @TableField(fill= FieldFill.INSERT_UPDATE) private Timestamp updateTime; /** 文件url */ - // @Column(name = "url") + // @Column(name = "url") private String url; - // @Column(name = "suffix") + // @Column(name = "suffix") private String suffix; - public void copy(QiniuContent source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(QiniuContent source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/VerificationCode.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/VerificationCode.java index 79ac01065c78055eae62c63e2246391a08fba89f..40868303cdf1ff090170167b717fa6a2e820cc72 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/VerificationCode.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/VerificationCode.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.domain; @@ -25,8 +24,8 @@ import java.sql.Timestamp; @Data @AllArgsConstructor @NoArgsConstructor -@TableName("verification_code") -public class VerificationCode implements Serializable { +@TableName("tools_verification_code") +public class VerificationCode implements Serializable { @TableId //@GeneratedValue(strategy = GenerationType.IDENTITY) @@ -47,8 +46,8 @@ public class VerificationCode implements Serializable { private String value; /** 创建日期 */ - @TableField(fill = FieldFill.INSERT) - // @Column(name = "create_time") + @TableField(fill= FieldFill.INSERT) + // @Column(name = "create_time") private Timestamp createTime; public VerificationCode(String code, String scenes, @NotBlank String type, @NotBlank String value) { diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/vo/EmailVo.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/vo/EmailVo.java index bd3711960cc52d9480444fd4987e54261334a6e3..4311e9837866dbb97e6576cfe634005e6c56b54d 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/vo/EmailVo.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/vo/EmailVo.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.domain.vo; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/vo/TradeVo.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/vo/TradeVo.java index 2cd874dec2c222773aec9edadd439dc9f1d7e0b2..bea53a47c4374a7e30b0511715e67395f8247b91 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/vo/TradeVo.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/domain/vo/TradeVo.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.domain.vo; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/express/ExpressService.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/express/ExpressService.java index 0bdb44f89f547c7009ac71567ab547d8492b6498..19c587178340600913dee7327278bdd85abfda9a 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/express/ExpressService.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/express/ExpressService.java @@ -1,19 +1,23 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.express; import cn.hutool.http.HttpUtil; -import co.yixiang.modules.tools.express.config.ExpressProperties; +import co.yixiang.enums.ShipperCodeEnum; import co.yixiang.modules.tools.express.dao.ExpressInfo; +import co.yixiang.modules.tools.express.config.ExpressProperties; +import com.fasterxml.jackson.annotation.JsonInclude; +import com.fasterxml.jackson.databind.DeserializationFeature; import com.fasterxml.jackson.databind.ObjectMapper; +import com.fasterxml.jackson.databind.SerializationFeature; import org.apache.commons.logging.Log; import org.apache.commons.logging.LogFactory; import org.springframework.util.Base64Utils; +import java.io.Serializable; import java.net.URLEncoder; import java.security.MessageDigest; import java.util.HashMap; @@ -24,7 +28,7 @@ import java.util.Map; *

* 快递鸟即时查询API http://www.kdniao.com/api-track */ -public class ExpressService { +public class ExpressService implements Serializable { private final Log logger = LogFactory.getLog(ExpressService.class); //请求url @@ -62,10 +66,13 @@ public class ExpressService { * @param ShipperCode * @return */ - public ExpressInfo getExpressInfo(String OrderCode, String ShipperCode, String LogisticCode) { + public ExpressInfo getExpressInfo(String OrderCode, String ShipperCode, String LogisticCode, String lastFourNumber) { try { - String result = getOrderTracesByJson(OrderCode, ShipperCode, LogisticCode); + String result = getOrderTracesByJson(OrderCode,ShipperCode, LogisticCode,lastFourNumber); ObjectMapper objMap = new ObjectMapper(); + objMap.configure(DeserializationFeature.FAIL_ON_UNKNOWN_PROPERTIES, false); + objMap.configure(SerializationFeature.FAIL_ON_EMPTY_BEANS, false); + objMap.setSerializationInclusion(JsonInclude.Include.NON_NULL); ExpressInfo ei = objMap.readValue(result, ExpressInfo.class); ei.setShipperName(getVendorName(ShipperCode)); return ei; @@ -81,17 +88,27 @@ public class ExpressService { * * @throws Exception */ - private String getOrderTracesByJson(String OrderCode, String ShipperCode, String LogisticCode) throws Exception { + private String getOrderTracesByJson(String OrderCode,String ShipperCode, String LogisticCode,String lastFourNumber) throws Exception { if (!properties.isEnable()) { return null; } - String requestData = "{'OrderCode':'" + OrderCode + "','ShipperCode':'" + ShipperCode + "','LogisticCode':'" + LogisticCode + "'}"; + //处理顺丰查询轨迹需手机号码后4位 + String requestData; + if (ShipperCode.equals(ShipperCodeEnum.SF.getValue())) { + requestData = "{'OrderCode':'" + OrderCode + "','ShipperCode':'" + ShipperCode + "','LogisticCode':'" + LogisticCode + "','CustomerName':'" + lastFourNumber + "'}"; + } else { + requestData = "{'OrderCode':'" + OrderCode + "','ShipperCode':'" + ShipperCode + "','LogisticCode':'" + LogisticCode + "'}"; + } Map params = new HashMap<>(); params.put("RequestData", URLEncoder.encode(requestData, "UTF-8")); params.put("EBusinessID", properties.getAppId()); - params.put("RequestType", "1002"); + // 快递鸟会员套餐(付费版)自开通当日起一个月(30天)内,免费即时查询接口 + // (RequestType 为1002)仍可继续请求测试使用,一个月后将关闭测试权限,会员用户(付 + // 费版会员套餐)需调用在途监控接口(RequestType 为8001)。 + // params.put("RequestType", "1002"); + params.put("RequestType", "8001"); String dataSign = encrypt(requestData, properties.getAppKey(), "UTF-8"); params.put("DataSign", URLEncoder.encode(dataSign, "UTF-8")); params.put("DataType", "2"); diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/express/config/ExpressAutoConfiguration.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/express/config/ExpressAutoConfiguration.java index 63a043a4a8fcc4593501760c5a26613bce9f372c..1d09b9e083d6d28f8fe0e050ff0b921519f3c4e6 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/express/config/ExpressAutoConfiguration.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/express/config/ExpressAutoConfiguration.java @@ -2,30 +2,53 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.tools.express.config; + +import co.yixiang.constant.ShopConstants; +import co.yixiang.enums.ShopCommonEnum; import co.yixiang.modules.tools.express.ExpressService; -import org.springframework.boot.context.properties.EnableConfigurationProperties; -import org.springframework.context.annotation.Bean; +import co.yixiang.utils.RedisUtils; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; -@Configuration -@EnableConfigurationProperties(ExpressProperties.class) +@Configuration(proxyBeanMethods = false) public class ExpressAutoConfiguration { - private final ExpressProperties properties; - public ExpressAutoConfiguration(ExpressProperties properties) { - this.properties = properties; + private static RedisUtils redisUtil; + + @Autowired + public ExpressAutoConfiguration(RedisUtils redisUtil) { + ExpressAutoConfiguration.redisUtil = redisUtil; } - @Bean - public ExpressService expressService() { - ExpressService expressService = new ExpressService(); - expressService.setProperties(properties); - return expressService; + public static ExpressService expressService() { + ExpressService expressService = (ExpressService)redisUtil.get(ShopConstants.YSHOP_EXPRESS_SERVICE); + if(expressService != null) { + return expressService; + } + + ExpressProperties properties = new ExpressProperties(); + String enable = redisUtil.getY("exp_enable"); + String appId = redisUtil.getY("exp_appId"); + String appKey = redisUtil.getY("exp_appKey"); + properties.setAppId(appId); + properties.setAppKey(appKey); + + if(ShopCommonEnum.ENABLE_2.getValue().toString().equals(enable)){ + properties.setEnable(false); + }else{ + properties.setEnable(true); + } + ExpressService service = new ExpressService(); + service.setProperties(properties); + redisUtil.set(ShopConstants.YSHOP_EXPRESS_SERVICE,service); + return service; } } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/express/config/ExpressProperties.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/express/config/ExpressProperties.java index 8df0325359b29cbe2ae472208d78ce76daa5138a..a992653d5231ab0ab180eb8c8304e533a65f3dab 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/express/config/ExpressProperties.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/express/config/ExpressProperties.java @@ -1,18 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.express.config; -import org.springframework.boot.context.properties.ConfigurationProperties; - import java.util.ArrayList; import java.util.List; import java.util.Map; -@ConfigurationProperties(prefix = "yshop.express") public class ExpressProperties { private boolean enable; private String appId; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/express/dao/ExpressInfo.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/express/dao/ExpressInfo.java index 8b9f83c8886690bc81249a853f0eb921909efed0..b40720c04e91b3e73004b066754caa4405388b40 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/express/dao/ExpressInfo.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/express/dao/ExpressInfo.java @@ -1,20 +1,15 @@ /** * Copyright 2018 bejson.com - *

- * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 */ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.express.dao; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; import lombok.Data; import java.util.List; @@ -29,23 +24,47 @@ import java.util.List; public class ExpressInfo { @JsonProperty("LogisticCode") + @ApiModelProperty(value = "物流运单号") private String LogisticCode; + @JsonProperty("ShipperCode") + @ApiModelProperty(value = "快递公司编码") private String ShipperCode; + + @JsonProperty("Traces") + @ApiModelProperty(value = "物流轨迹") private List Traces; + + @JsonProperty("State") + @ApiModelProperty(value = "物流状态:2-在途中,3-签收,4-问题件") private String State; + + @JsonProperty("StateEx") + private String StateEx; + + @JsonProperty("Location") + private String Location; + @JsonProperty("EBusinessID") + @ApiModelProperty(value = "用户ID") private String EBusinessID; + + @JsonProperty("Success") + @ApiModelProperty(value = "成功与否") private boolean Success; + + @JsonProperty("Reason") + @ApiModelProperty(value = "失败原因") private String Reason; private String ShipperName; @JsonProperty("OrderCode") + @ApiModelProperty(value = "订单编号") private String OrderCode; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/express/dao/Traces.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/express/dao/Traces.java index 66d1b70c102e1f9af5ea465fce12159df8bf0846..4c874466fdcba5ff8d1b2b30d40206bbb80987df 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/express/dao/Traces.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/express/dao/Traces.java @@ -1,48 +1,32 @@ /** * Copyright 2018 bejson.com - *

- * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 */ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.express.dao; import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModelProperty; -/** - * Auto-generated: 2018-07-19 22:27:22 - * - * @author bejson.com (i@bejson.com) - * @website http://www.bejson.com/java2pojo/ - */ +import lombok.Data; +@Data public class Traces { @JsonProperty("AcceptStation") + @ApiModelProperty(value = "描述") private String AcceptStation; + @JsonProperty("AcceptTime") + @ApiModelProperty(value = "时间") private String AcceptTime; - public String getAcceptStation() { - return AcceptStation; - } - - public void setAcceptStation(String AcceptStation) { - this.AcceptStation = AcceptStation; - } - - public String getAcceptTime() { - return AcceptTime; - } + @JsonProperty("Action") + private String Action; + @JsonProperty("Location") + private String Location; - public void setAcceptTime(String AcceptTime) { - this.AcceptTime = AcceptTime; - } } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/AliPayController.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/AliPayController.java index b1b0b7c9f68633bc356c2ac595d51110257ef9ad..a18077d4cfb66d97a408178fc7294db929898301 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/AliPayController.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/AliPayController.java @@ -1,25 +1,29 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.rest; import co.yixiang.annotation.AnonymousAccess; import co.yixiang.modules.logging.aop.log.Log; import co.yixiang.modules.tools.domain.AlipayConfig; +import co.yixiang.modules.tools.domain.vo.TradeVo; import co.yixiang.modules.tools.service.AlipayConfigService; import co.yixiang.modules.tools.utils.AliPayStatusEnum; import co.yixiang.modules.tools.utils.AlipayUtils; -import co.yixiang.modules.tools.domain.vo.TradeVo; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; import springfox.documentation.annotations.ApiIgnore; import javax.servlet.http.HttpServletRequest; @@ -47,14 +51,14 @@ public class AliPayController { } @GetMapping - public ResponseEntity get() { - return new ResponseEntity<>(alipayService.find(), HttpStatus.OK); + public ResponseEntity get(){ + return new ResponseEntity<>(alipayService.find(),HttpStatus.OK); } @Log("配置支付宝") @ApiOperation("配置支付宝") @PutMapping - public ResponseEntity payConfig(@Validated @RequestBody AlipayConfig alipayConfig) { + public ResponseEntity payConfig(@Validated @RequestBody AlipayConfig alipayConfig){ alipayConfig.setId(1L); alipayService.update(alipayConfig); return new ResponseEntity<>(HttpStatus.OK); @@ -63,20 +67,20 @@ public class AliPayController { @Log("支付宝PC网页支付") @ApiOperation("PC网页支付") @PostMapping(value = "/toPayAsPC") - public ResponseEntity toPayAsPc(@Validated @RequestBody TradeVo trade) throws Exception { + public ResponseEntity toPayAsPc(@Validated@RequestBody TradeVo trade) throws Exception{ AlipayConfig aliPay = alipayService.find(); trade.setOutTradeNo(alipayUtils.getOrderCode()); - String payUrl = alipayService.toPayAsPc(aliPay, trade); + String payUrl = alipayService.toPayAsPc(aliPay,trade); return ResponseEntity.ok(payUrl); } @Log("支付宝手机网页支付") @ApiOperation("手机网页支付") @PostMapping(value = "/toPayAsWeb") - public ResponseEntity toPayAsWeb(@Validated @RequestBody TradeVo trade) throws Exception { + public ResponseEntity toPayAsWeb(@Validated @RequestBody TradeVo trade) throws Exception{ AlipayConfig alipay = alipayService.find(); trade.setOutTradeNo(alipayUtils.getOrderCode()); - String payUrl = alipayService.toPayAsWeb(alipay, trade); + String payUrl = alipayService.toPayAsWeb(alipay,trade); return ResponseEntity.ok(payUrl); } @@ -84,20 +88,20 @@ public class AliPayController { @GetMapping("/return") @AnonymousAccess @ApiOperation("支付之后跳转的链接") - public ResponseEntity returnPage(HttpServletRequest request, HttpServletResponse response) { + public ResponseEntity returnPage(HttpServletRequest request, HttpServletResponse response){ AlipayConfig alipay = alipayService.find(); response.setContentType("text/html;charset=" + alipay.getCharset()); //内容验签,防止黑客篡改参数 - if (alipayUtils.rsaCheck(request, alipay)) { + if(alipayUtils.rsaCheck(request,alipay)){ //商户订单号 String outTradeNo = new String(request.getParameter("out_trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); //支付宝交易号 String tradeNo = new String(request.getParameter("trade_no").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); - System.out.println("商户订单号" + outTradeNo + " " + "第三方交易号" + tradeNo); + System.out.println("商户订单号"+outTradeNo+" "+"第三方交易号"+tradeNo); // 根据业务需要返回数据,这里统一返回OK - return new ResponseEntity<>("payment successful", HttpStatus.OK); - } else { + return new ResponseEntity<>("payment successful",HttpStatus.OK); + }else{ // 根据业务需要返回数据 return new ResponseEntity<>(HttpStatus.BAD_REQUEST); } @@ -108,11 +112,11 @@ public class AliPayController { @AnonymousAccess @SuppressWarnings("all") @ApiOperation("支付异步通知(要公网访问),接收异步通知,检查通知内容app_id、out_trade_no、total_amount是否与请求中的一致,根据trade_status进行后续业务处理") - public ResponseEntity notify(HttpServletRequest request) { + public ResponseEntity notify(HttpServletRequest request){ AlipayConfig alipay = alipayService.find(); Map parameterMap = request.getParameterMap(); //内容验签,防止黑客篡改参数 - if (alipayUtils.rsaCheck(request, alipay)) { + if (alipayUtils.rsaCheck(request,alipay)) { //交易状态 String tradeStatus = new String(request.getParameter("trade_status").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); // 商户订单号 @@ -122,8 +126,8 @@ public class AliPayController { //付款金额 String totalAmount = new String(request.getParameter("total_amount").getBytes(StandardCharsets.ISO_8859_1), StandardCharsets.UTF_8); //验证 - if (tradeStatus.equals(AliPayStatusEnum.SUCCESS.getValue()) || tradeStatus.equals(AliPayStatusEnum.FINISHED.getValue())) { - // 验证通过后应该根据业务需要处理订单 + if(tradeStatus.equals(AliPayStatusEnum.SUCCESS.getValue())||tradeStatus.equals(AliPayStatusEnum.FINISHED.getValue())){ + // 验证通过后应该根据业务需要处理订单 } return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/EmailController.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/EmailController.java index 149feae5c00b204c7da1647bbfd27334e7c4bb9e..594c60441e87de082e409697b3dcf46fc135d056 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/EmailController.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/EmailController.java @@ -1,21 +1,25 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.rest; import co.yixiang.modules.logging.aop.log.Log; import co.yixiang.modules.tools.domain.EmailConfig; -import co.yixiang.modules.tools.service.EmailConfigService; import co.yixiang.modules.tools.domain.vo.EmailVo; +import co.yixiang.modules.tools.service.EmailConfigService; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RestController; /** * 发送邮件 @@ -34,15 +38,15 @@ public class EmailController { } @GetMapping - public ResponseEntity get() { - return new ResponseEntity<>(emailService.find(), HttpStatus.OK); + public ResponseEntity get(){ + return new ResponseEntity<>(emailService.find(),HttpStatus.OK); } @Log("配置邮件") @PutMapping @ApiOperation("配置邮件") - public ResponseEntity emailConfig(@Validated @RequestBody EmailConfig emailConfig) { - emailService.update(emailConfig, emailService.find()); + public ResponseEntity emailConfig(@Validated @RequestBody EmailConfig emailConfig){ + emailService.update(emailConfig,emailService.find()); return new ResponseEntity<>(HttpStatus.OK); } @@ -50,7 +54,7 @@ public class EmailController { @PostMapping @ApiOperation("发送邮件") public ResponseEntity send(@Validated @RequestBody EmailVo emailVo) throws Exception { - emailService.send(emailVo, emailService.find()); + emailService.send(emailVo,emailService.find()); return new ResponseEntity<>(HttpStatus.OK); } } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/LocalStorageController.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/LocalStorageController.java index 0e298b7e6be4d9db566c11d8851fca1360a2bc1c..ff0410ba4a2ee98dbad83791321d323b34c4ad7b 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/LocalStorageController.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/LocalStorageController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.rest; @@ -19,7 +18,14 @@ 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.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; @@ -27,9 +33,9 @@ import java.io.IOException; import java.util.Arrays; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @AllArgsConstructor @Api(tags = "文件管理") @RestController @@ -43,7 +49,7 @@ public class LocalStorageController { @Log("导出数据") @ApiOperation("导出数据") @GetMapping(value = "/download") - @PreAuthorize("@el.check('admin','localStorage:list')") + @PreAuthorize("@el.check('admin','storage:list')") public void download(HttpServletResponse response, LocalStorageQueryCriteria criteria) throws IOException { localStorageService.download(generator.convert(localStorageService.queryAll(criteria), LocalStorageDto.class), response); } @@ -51,34 +57,34 @@ public class LocalStorageController { @GetMapping @Log("查询文件") @ApiOperation("查询文件") - @PreAuthorize("@el.check('admin','localStorage:list')") - public ResponseEntity getLocalStorages(LocalStorageQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(localStorageService.queryAll(criteria, pageable), HttpStatus.OK); + @PreAuthorize("@el.check('admin','storage:list')") + public ResponseEntity getLocalStorages(LocalStorageQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(localStorageService.queryAll(criteria,pageable),HttpStatus.OK); } @PostMapping @Log("新增文件") @ApiOperation("新增文件") - @PreAuthorize("@el.check('admin','localStorage:add')") - public ResponseEntity create(@RequestParam String name, @RequestParam("file") MultipartFile file) { - return new ResponseEntity<>(localStorageService.create(name, file), HttpStatus.CREATED); + @PreAuthorize("@el.check('admin','storage:add')") + public ResponseEntity create(@RequestParam String name, @RequestParam("file") MultipartFile file){ + return new ResponseEntity<>(localStorageService.create(name,file),HttpStatus.CREATED); } @PutMapping @Log("修改文件") @ApiOperation("修改文件") - @PreAuthorize("@el.check('admin','localStorage:edit')") - public ResponseEntity update(@Validated @RequestBody LocalStorageDto resources) { + @PreAuthorize("@el.check('admin','storage:edit')") + public ResponseEntity update(@Validated @RequestBody LocalStorageDto resources){ localStorageService.updateLocalStorage(resources); return new ResponseEntity<>(HttpStatus.NO_CONTENT); } @Log("删除文件") @ApiOperation("删除文件") - @PreAuthorize("@el.check('admin','localStorage:del')") + @PreAuthorize("@el.check('admin','storage:del')") @DeleteMapping public ResponseEntity deleteAll(@RequestBody Long[] ids) { - Arrays.asList(ids).forEach(id -> { + Arrays.asList(ids).forEach(id->{ localStorageService.removeById(id); }); return new ResponseEntity<>(HttpStatus.OK); diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/PictureController.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/PictureController.java index 05e1c538402905ba1f08869e3f3fab2761c2db3f..9efd04d67bc1d4d13d3d2aaf3dea66c9da90819c 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/PictureController.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/PictureController.java @@ -1,16 +1,15 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.rest; import co.yixiang.dozer.service.IGenerator; import co.yixiang.modules.logging.aop.log.Log; +import co.yixiang.modules.tools.service.dto.PictureDto; import co.yixiang.modules.tools.domain.Picture; import co.yixiang.modules.tools.service.PictureService; -import co.yixiang.modules.tools.service.dto.PictureDto; import co.yixiang.modules.tools.service.dto.PictureQueryCriteria; import co.yixiang.utils.SecurityUtils; import io.swagger.annotations.Api; @@ -19,7 +18,13 @@ 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 org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; @@ -45,8 +50,8 @@ public class PictureController { @PreAuthorize("@el.check('pictures:list')") @GetMapping @ApiOperation("查询图片") - public ResponseEntity getRoles(PictureQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(pictureService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getRoles(PictureQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(pictureService.queryAll(criteria,pageable),HttpStatus.OK); } @Log("导出数据") @@ -61,16 +66,16 @@ public class PictureController { @PreAuthorize("@el.check('pictures:add')") @PostMapping @ApiOperation("上传图片") - public ResponseEntity upload(@RequestParam MultipartFile file) { + public ResponseEntity upload(@RequestParam MultipartFile file){ String userName = SecurityUtils.getUsername(); - Picture picture = pictureService.upload(file, userName); - return new ResponseEntity<>(picture, HttpStatus.OK); + Picture picture = pictureService.upload(file,userName); + return new ResponseEntity<>(picture,HttpStatus.OK); } @Log("同步图床数据") @ApiOperation("同步图床数据") @PostMapping(value = "/synchronize") - public ResponseEntity synchronize() { + public ResponseEntity synchronize(){ pictureService.synchronize(); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/QiniuController.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/QiniuController.java index 22ede719401126e33f34117402f7fc8a5bf2afca..73b84f09c7379450989d1e9521225574088b98f4 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/QiniuController.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/QiniuController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.rest; @@ -18,7 +17,15 @@ import org.springframework.data.domain.Pageable; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.validation.annotation.Validated; -import org.springframework.web.bind.annotation.*; +import org.springframework.web.bind.annotation.DeleteMapping; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PathVariable; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.PutMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; import org.springframework.web.multipart.MultipartFile; import javax.servlet.http.HttpServletResponse; @@ -44,15 +51,14 @@ public class QiniuController { } @GetMapping(value = "/config") - public ResponseEntity get() { + public ResponseEntity get(){ return new ResponseEntity<>(qiNiuService.find(), HttpStatus.OK); } @Log("配置七牛云存储") @ApiOperation("配置七牛云存储") @PutMapping(value = "/config") - public ResponseEntity emailConfig(@Validated @RequestBody QiniuConfig qiniuConfig) { - + public ResponseEntity emailConfig(@Validated @RequestBody QiniuConfig qiniuConfig){ qiNiuService.update(qiniuConfig); qiNiuService.update(qiniuConfig.getType()); return new ResponseEntity<>(HttpStatus.OK); @@ -68,27 +74,26 @@ public class QiniuController { @Log("查询文件") @ApiOperation("查询文件") @GetMapping - public ResponseEntity getRoles(QiniuQueryCriteria criteria, Pageable pageable) { - return new ResponseEntity<>(qiNiuService.queryAll(criteria, pageable), HttpStatus.OK); + public ResponseEntity getRoles(QiniuQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(qiNiuService.queryAll(criteria,pageable),HttpStatus.OK); } @Log("上传文件") @ApiOperation("上传文件") @PostMapping - public ResponseEntity upload(@RequestParam MultipartFile file) { - QiniuContent qiniuContent = qiNiuService.upload(file, qiNiuService.find()); - Map map = new HashMap<>(3); - map.put("id", qiniuContent.getId()); - map.put("errno", 0); - map.put("data", new String[]{qiniuContent.getUrl()}); - return new ResponseEntity<>(map, HttpStatus.OK); + public ResponseEntity upload(@RequestParam MultipartFile file){ + QiniuContent qiniuContent = qiNiuService.upload(file,qiNiuService.find()); + Map map = new HashMap<>(3); + map.put("id",qiniuContent.getId()); + map.put("errno",0); + map.put("data",new String[]{qiniuContent.getUrl()}); + return new ResponseEntity<>(map,HttpStatus.OK); } @Log("同步七牛云数据") @ApiOperation("同步七牛云数据") @PostMapping(value = "/synchronize") - public ResponseEntity synchronize() { - + public ResponseEntity synchronize(){ qiNiuService.synchronize(qiNiuService.find()); return new ResponseEntity<>(HttpStatus.OK); } @@ -96,19 +101,17 @@ public class QiniuController { @Log("下载文件") @ApiOperation("下载文件") @GetMapping(value = "/download/{id}") - public ResponseEntity download(@PathVariable Long id) { - - Map map = new HashMap<>(1); - map.put("url", qiNiuService.download(qiNiuService.findByContentId(id), qiNiuService.find())); - return new ResponseEntity<>(map, HttpStatus.OK); + public ResponseEntity download(@PathVariable Long id){ + Map map = new HashMap<>(1); + map.put("url", qiNiuService.download(qiNiuService.findByContentId(id),qiNiuService.find())); + return new ResponseEntity<>(map,HttpStatus.OK); } @Log("删除文件") @ApiOperation("删除文件") @DeleteMapping(value = "/{id}") - public ResponseEntity delete(@PathVariable Long id) { - - qiNiuService.delete(qiNiuService.findByContentId(id), qiNiuService.find()); + public ResponseEntity delete(@PathVariable Long id){ + qiNiuService.delete(qiNiuService.findByContentId(id),qiNiuService.find()); return new ResponseEntity<>(HttpStatus.OK); } @@ -116,7 +119,6 @@ public class QiniuController { @ApiOperation("删除多张图片") @DeleteMapping public ResponseEntity deleteAll(@RequestBody Long[] ids) { - qiNiuService.deleteAll(ids, qiNiuService.find()); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/UploadController.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/UploadController.java index cfe977e2e15a39f411e289c15f67b9d36a8930c6..3252100c01d0846ff3cc0dfe8d2b6917ec0b2f6d 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/UploadController.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/UploadController.java @@ -1,18 +1,25 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.rest; import cn.hutool.core.io.FileUtil; import cn.hutool.core.util.IdUtil; import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; +import co.yixiang.constant.ShopConstants; +import co.yixiang.constant.SystemConfigConstants; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.tools.service.dto.LocalStorageDto; +import co.yixiang.modules.tools.service.LocalStorageService; import co.yixiang.oss.config.OssProperties; import co.yixiang.oss.service.OssTemplate; +import co.yixiang.utils.RedisUtils; import io.swagger.annotations.Api; import io.swagger.annotations.ApiOperation; +import lombok.extern.slf4j.Slf4j; import org.springframework.http.HttpStatus; import org.springframework.http.ResponseEntity; import org.springframework.web.bind.annotation.PostMapping; @@ -31,12 +38,19 @@ import java.util.Map; @Api(tags = "上传统一管理") @RestController @RequestMapping("/api/upload") +@Slf4j @SuppressWarnings("unchecked") public class UploadController { + private final LocalStorageService localStorageService; + private final RedisUtils redisUtils; private final OssProperties ossProperties; private final OssTemplate ossTemplate; - public UploadController(OssProperties ossProperties, OssTemplate ossTemplate) { + + public UploadController(LocalStorageService localStorageService, RedisUtils redisUtils, + OssProperties ossProperties, OssTemplate ossTemplate) { + this.localStorageService = localStorageService; + this.redisUtils = redisUtils; this.ossProperties = ossProperties; this.ossTemplate = ossTemplate; } @@ -44,19 +58,50 @@ public class UploadController { @ApiOperation("上传文件") @PostMapping - public ResponseEntity create(@RequestParam("file") MultipartFile file) { - String [] originalFilename = file.getOriginalFilename().split("\\."); - String fileName = ossProperties.getBucketName()+"/file/"+originalFilename[0] + "-" +IdUtil.simpleUUID() + StrUtil.DOT + FileUtil.extName(file.getOriginalFilename()); - try { - ossTemplate.putObject(ossProperties.getBucketName(), fileName, file.getInputStream()); - } catch (Exception e) { - e.printStackTrace(); + public ResponseEntity create(@RequestParam(defaultValue = "") String name, + @RequestParam(defaultValue = "") String type, + @RequestParam("file") MultipartFile[] files) { + + String localUrl = redisUtils.getY(ShopConstants.ADMIN_API_URL); + if(StrUtil.isBlank(type)){ + localUrl = redisUtils.getY(SystemConfigConstants.API_URL) + "/api"; + } + String mode = redisUtils.getY(SystemConfigConstants.FILE_STORE_MODE); + StringBuilder url = new StringBuilder(); + if (ShopCommonEnum.STORE_MODE_1.getValue().toString().equals(mode)) { //存在走本地 + if(StrUtil.isBlank(localUrl)){ + throw new YshopException("本地上传,请先登陆系统配置后台/移动端API地址"); + } + for (MultipartFile file : files) { + LocalStorageDto localStorageDTO = localStorageService.create(name, file); + if ("".equals(url.toString())) { + url = url.append(localUrl + "/file/" + localStorageDTO.getType() + "/" + localStorageDTO.getRealName()); + } else { + url = url.append(","+localUrl + "/file/" + localStorageDTO.getType() + "/" + localStorageDTO.getRealName()); + } + } + } else { + // 走oss存储 + for (MultipartFile file : files) { + String [] originalFilename = file.getOriginalFilename().split("\\."); + String fileName = ossProperties.getBucketName()+"/file/"+originalFilename[0] + "-" + IdUtil.simpleUUID() + StrUtil.DOT + FileUtil.extName(file.getOriginalFilename()); + try { + ossTemplate.putObject(ossProperties.getBucketName(), fileName, file.getInputStream()); + } catch (Exception e) { + e.printStackTrace(); + } + String fileUrl = String.format(ossProperties.getCustomDomain(), fileName); + if ("".equals(url.toString())) { + url = url.append(fileUrl); + }else{ + url = url.append(","+fileUrl); + } + } } - String fileUrl = String.format(ossProperties.getCustomDomain(), fileName); Map map = new HashMap<>(2); map.put("errno", 0); - map.put("link", fileUrl); + map.put("link", url); return new ResponseEntity(map, HttpStatus.CREATED); } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/VerificationCodeController.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/VerificationCodeController.java index e2558caf784da1e755e682050e245626929b3934..4f13eec0d0e49d49d0b871a206ef011f674f10ba 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/VerificationCodeController.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/rest/VerificationCodeController.java @@ -1,21 +1,25 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.rest; import co.yixiang.modules.tools.domain.VerificationCode; +import co.yixiang.modules.tools.domain.vo.EmailVo; import co.yixiang.modules.tools.service.EmailConfigService; import co.yixiang.modules.tools.service.VerificationCodeService; -import co.yixiang.modules.tools.domain.vo.EmailVo; import co.yixiang.utils.YshopConstant; 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.*; +import org.springframework.web.bind.annotation.GetMapping; +import org.springframework.web.bind.annotation.PostMapping; +import org.springframework.web.bind.annotation.RequestBody; +import org.springframework.web.bind.annotation.RequestMapping; +import org.springframework.web.bind.annotation.RequestParam; +import org.springframework.web.bind.annotation.RestController; /** * @author hupeng @@ -30,7 +34,7 @@ public class VerificationCodeController { private final EmailConfigService emailService; - public VerificationCodeController(VerificationCodeService verificationCodeService, EmailConfigService emailService) { + public VerificationCodeController(VerificationCodeService verificationCodeService, EmailConfigService emailService) { this.verificationCodeService = verificationCodeService; this.emailService = emailService; } @@ -40,7 +44,7 @@ public class VerificationCodeController { public ResponseEntity resetEmail(@RequestBody VerificationCode code) throws Exception { code.setScenes(YshopConstant.RESET_MAIL); EmailVo emailVo = verificationCodeService.sendEmail(code); - emailService.send(emailVo, emailService.find()); + emailService.send(emailVo,emailService.find()); return new ResponseEntity<>(HttpStatus.OK); } @@ -52,13 +56,13 @@ public class VerificationCodeController { code.setValue(email); code.setScenes(YshopConstant.RESET_MAIL); EmailVo emailVo = verificationCodeService.sendEmail(code); - emailService.send(emailVo, emailService.find()); + emailService.send(emailVo,emailService.find()); return new ResponseEntity<>(HttpStatus.OK); } @GetMapping(value = "/validated") @ApiOperation("验证码验证") - public ResponseEntity validated(VerificationCode code) { + public ResponseEntity validated(VerificationCode code){ verificationCodeService.validated(code); return new ResponseEntity<>(HttpStatus.OK); } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/AlipayConfigService.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/AlipayConfigService.java index 56933b24ee70af6d1761bc500d07b16b7a28fb15..996146f7deae242deafdfde44735611c156bd3ad 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/AlipayConfigService.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/AlipayConfigService.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service; @@ -11,10 +10,10 @@ import co.yixiang.modules.tools.domain.AlipayConfig; import co.yixiang.modules.tools.domain.vo.TradeVo; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface AlipayConfigService extends BaseService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface AlipayConfigService extends BaseService{ /** * 处理来自PC的交易请求 diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/EmailConfigService.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/EmailConfigService.java index e9660fb4611474fd8a379fa2201bce6bdb95e3ec..2371d8656da526395aaee7a9c8e005be42331d2b 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/EmailConfigService.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/EmailConfigService.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service; @@ -12,10 +11,10 @@ import co.yixiang.modules.tools.domain.vo.EmailVo; import org.springframework.scheduling.annotation.Async; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface EmailConfigService extends BaseService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface EmailConfigService extends BaseService{ /** * 更新邮件配置 * @param emailConfig 邮件配置 diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/LocalStorageService.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/LocalStorageService.java index 0a9feb36de76585e8e7d2487180a783177dcabf7..bf8333f39df35b6faa003fb40c04039539b1a915 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/LocalStorageService.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/LocalStorageService.java @@ -1,15 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service; import co.yixiang.common.service.BaseService; -import co.yixiang.modules.tools.domain.LocalStorage; import co.yixiang.modules.tools.service.dto.LocalStorageDto; import co.yixiang.modules.tools.service.dto.LocalStorageQueryCriteria; +import co.yixiang.modules.tools.domain.LocalStorage; import org.springframework.data.domain.Pageable; import org.springframework.web.multipart.MultipartFile; @@ -19,10 +18,10 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface LocalStorageService extends BaseService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface LocalStorageService extends BaseService{ /** * 分页查询 diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/PictureService.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/PictureService.java index 1da2f79a1cd1948b727ca51a79aff4b771efd22f..3f1e1ef0a959a246644b4a7eddb235fc681dea5a 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/PictureService.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/PictureService.java @@ -1,15 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service; import co.yixiang.common.service.BaseService; -import co.yixiang.modules.tools.domain.Picture; import co.yixiang.modules.tools.service.dto.PictureDto; import co.yixiang.modules.tools.service.dto.PictureQueryCriteria; +import co.yixiang.modules.tools.domain.Picture; import org.springframework.data.domain.Pageable; import org.springframework.web.multipart.MultipartFile; @@ -19,32 +18,32 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface PictureService extends BaseService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface PictureService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(PictureQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(PictureQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(PictureQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiNiuService.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiNiuService.java index 907f4eaaa4c3b0b0c2022c4838f043bf4635f1b2..9a1203615dfba6fd69813bac418d697786ce8f07 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiNiuService.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiNiuService.java @@ -1,14 +1,13 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service; +import co.yixiang.modules.tools.service.dto.QiniuQueryCriteria; import co.yixiang.modules.tools.domain.QiniuConfig; import co.yixiang.modules.tools.domain.QiniuContent; -import co.yixiang.modules.tools.service.dto.QiniuQueryCriteria; import org.springframework.data.domain.Pageable; import org.springframework.web.multipart.MultipartFile; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiniuConfigService.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiniuConfigService.java index b8ec1aef35ef811a8607ba6ad6b37d3b812bebe2..537da97cf66a5aa4f19dd101c5c2de59526ca313 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiniuConfigService.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiniuConfigService.java @@ -1,15 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service; import co.yixiang.common.service.BaseService; -import co.yixiang.modules.tools.domain.QiniuConfig; import co.yixiang.modules.tools.service.dto.QiniuConfigDto; import co.yixiang.modules.tools.service.dto.QiniuQueryCriteria; +import co.yixiang.modules.tools.domain.QiniuConfig; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,32 +17,32 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface QiniuConfigService extends BaseService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface QiniuConfigService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(QiniuQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(QiniuQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(QiniuQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiniuContentService.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiniuContentService.java index 8739e51bb293e043479a33cc4915faf614ccf616..3a089a2d6e2724a44417c8e2fe0f065007513c0f 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiniuContentService.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/QiniuContentService.java @@ -1,15 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service; import co.yixiang.common.service.BaseService; -import co.yixiang.modules.tools.domain.QiniuContent; import co.yixiang.modules.tools.service.dto.QiniuContentDto; import co.yixiang.modules.tools.service.dto.QiniuQueryCriteria; +import co.yixiang.modules.tools.domain.QiniuContent; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,31 +17,31 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-13 - */ -public interface QiniuContentService extends BaseService { +* @author hupeng +* @date 2020-05-13 +*/ +public interface QiniuContentService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(QiniuQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(QiniuQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(QiniuQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/VerificationCodeService.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/VerificationCodeService.java index e8bfeea9fdc3bb543beedfdd24876c1ce0178f88..1238382097bf29f808023c47d94a3d5664c09380 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/VerificationCodeService.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/VerificationCodeService.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/LocalStorageDto.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/LocalStorageDto.java index c358e81980064098511c709cee5e4a0532ef2e3f..0cc913bcaa3572148f9c69110248eea2d509bc21 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/LocalStorageDto.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/LocalStorageDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.dto; @@ -12,9 +11,9 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class LocalStorageDto implements Serializable { private Long id; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/LocalStorageQueryCriteria.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/LocalStorageQueryCriteria.java index 2e3abea65b34d382ef1cc5944e71f96a3f3aeb92..d5c07f12315daa8e65b5520e329e3fe6359d62be 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/LocalStorageQueryCriteria.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/LocalStorageQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.dto; @@ -13,11 +12,11 @@ import java.sql.Timestamp; import java.util.List; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class LocalStorageQueryCriteria { +public class LocalStorageQueryCriteria{ @Query(blurry = "name,suffix,type,operate,size") private String blurry; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/PictureDto.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/PictureDto.java index 3129cb22e0c7d2e769772deca465efa3127016a2..2afbe2a7a8d205842c25df77573c975461355809 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/PictureDto.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/PictureDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.dto; @@ -12,9 +11,9 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class PictureDto implements Serializable { diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/PictureQueryCriteria.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/PictureQueryCriteria.java index 7126bf524cc91350e4bac85e4f0830bcce2e6d03..2d52c61b4080d50157fc84dcfcb3b40d992daa95 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/PictureQueryCriteria.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/PictureQueryCriteria.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class PictureQueryCriteria { +public class PictureQueryCriteria{ } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuConfigDto.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuConfigDto.java index 6f1b698b4af676930861c1bd2db407662ba6c460..7ee5f4a2efe2a28385869cb1027bd0771977581e 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuConfigDto.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuConfigDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.dto; @@ -11,9 +10,9 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class QiniuConfigDto implements Serializable { diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuConfigQueryCriteria.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuConfigQueryCriteria.java index 8fff3ebfd1ca089120a4cbf59ddc307fd121306b..9259b38dcfed271bbfc05db2f331f2b9f2191614 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuConfigQueryCriteria.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuConfigQueryCriteria.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class QiniuConfigQueryCriteria { +public class QiniuConfigQueryCriteria{ } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuContentDto.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuContentDto.java index 603c9fb41c7c0002171eb10516f2635c1c4668f6..a79394b42d00b47a0e11c8126cd302f18c759acb 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuContentDto.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuContentDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.dto; @@ -12,9 +11,9 @@ import java.io.Serializable; import java.sql.Timestamp; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data public class QiniuContentDto implements Serializable { @@ -41,7 +40,7 @@ public class QiniuContentDto implements Serializable { private String suffix; - public String getKey() { + public String getKey(){ return this.name; } } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuContentQueryCriteria.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuContentQueryCriteria.java index cdfd3229071efe4f10ce83f9192bc01dc70197d4..23defb92211b9e5dc7dcb1f7a4cd3bc6165eaefc 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuContentQueryCriteria.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuContentQueryCriteria.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Data -public class QiniuContentQueryCriteria { +public class QiniuContentQueryCriteria{ } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuQueryCriteria.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuQueryCriteria.java index 08d47a0534bfef040e3c81089bf7ecdd594e6f97..57d95b86019b5b415c8f8985f177de23f8fbf616 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuQueryCriteria.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/dto/QiniuQueryCriteria.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.dto; @@ -17,7 +16,7 @@ import java.util.List; * @date 2019-6-4 09:54:37 */ @Data -public class QiniuQueryCriteria { +public class QiniuQueryCriteria{ @Query(type = Query.Type.INNER_LIKE) private String name; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/AlipayConfigServiceImpl.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/AlipayConfigServiceImpl.java index 6de45099eb3bc8c937f5ae2ab1676488f87087ca..a9823008b5221787e96d215bc8a07b1afefea88f 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/AlipayConfigServiceImpl.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/AlipayConfigServiceImpl.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.impl; @@ -27,9 +26,9 @@ import org.springframework.transaction.annotation.Transactional; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Service @AllArgsConstructor //@CacheConfig(cacheNames = "alipayConfig") @@ -38,7 +37,7 @@ public class AlipayConfigServiceImpl extends BaseServiceImpl= maxMoney) { + if(money <= 0 || money >= maxMoney){ throw new BadRequestException("测试金额过大"); } // 创建API对应的request(手机网页版) @@ -82,14 +81,14 @@ public class AlipayConfigServiceImpl extends BaseServiceImpl"); + account.setFrom(emailConfig.getUser()+"<"+emailConfig.getFromUser()+">"); // ssl方式发送 account.setSslEnable(true); // 使用STARTTLS安全连接 @@ -94,7 +96,7 @@ public class EmailConfigServiceImpl extends BaseServiceImpl queryAll(LocalStorageQueryCriteria criteria) { - return generator.convert(baseMapper.selectList(QueryHelpPlus.getPredicate(LocalStorage.class, criteria)), LocalStorageDto.class); + public List queryAll(LocalStorageQueryCriteria criteria){ + return generator.convert(baseMapper.selectList(QueryHelpPlus.getPredicate(LocalStorage.class, criteria)),LocalStorageDto.class); } @Override public LocalStorageDto findById(Long id) { LocalStorage localStorage = this.getById(id); - return generator.convert(localStorage, LocalStorageDto.class); + return generator.convert(localStorage,LocalStorageDto.class); } @Override @@ -90,8 +88,8 @@ public class LocalStorageServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (LocalStorageDto localStorage : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("文件真实的名称", localStorage.getRealName()); map.put("文件名", localStorage.getName()); map.put("后缀", localStorage.getSuffix()); @@ -145,7 +143,7 @@ public class LocalStorageServiceImpl extends BaseServiceImpl implements PictureService { @@ -83,7 +86,7 @@ public class PictureServiceImpl extends BaseServiceImpl @Override //@Cacheable - public List queryAll(PictureQueryCriteria criteria) { + public List queryAll(PictureQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(Picture.class, criteria)); } @@ -92,7 +95,7 @@ public class PictureServiceImpl extends BaseServiceImpl public void download(List all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (PictureDto picture : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("上传日期", picture.getCreateTime()); map.put("删除的URL", picture.getDeleteUrl()); map.put("图片名称", picture.getFilename()); @@ -112,27 +115,27 @@ public class PictureServiceImpl extends BaseServiceImpl public Picture upload(MultipartFile multipartFile, String username) { File file = FileUtil.toFile(multipartFile); // 验证是否重复上传 - Picture picture = this.getOne(new LambdaQueryWrapper().eq(Picture::getMd5code, FileUtil.getMd5(file))); - if (picture != null) { + Picture picture = this.getOne(new LambdaQueryWrapper().eq(Picture::getMd5code,FileUtil.getMd5(file))); + if(picture != null){ return picture; } HashMap paramMap = new HashMap<>(1); paramMap.put("smfile", file); // 上传文件 - String result = HttpRequest.post(YshopConstant.Url.SM_MS_URL + "/v2/upload") + String result= HttpRequest.post(YshopConstant.Url.SM_MS_URL + "/v2/upload") .header("Authorization", token) .form(paramMap) .timeout(20000) .execute().body(); JSONObject jsonObject = JSONUtil.parseObj(result); - if (!jsonObject.get(CODE).toString().equals(SUCCESS)) { + if(!jsonObject.get(CODE).toString().equals(SUCCESS)){ throw new BadRequestException(TranslatorUtil.translate(jsonObject.get(MSG).toString())); } picture = JSON.parseObject(jsonObject.get("data").toString(), Picture.class); picture.setSize(FileUtil.getSize(Integer.parseInt(picture.getSize()))); picture.setUsername(username); picture.setMd5code(FileUtil.getMd5(file)); - picture.setFilename(FileUtil.getFileNameNoEx(multipartFile.getOriginalFilename()) + "." + FileUtil.getExtensionName(multipartFile.getOriginalFilename())); + picture.setFilename(FileUtil.getFileNameNoEx(multipartFile.getOriginalFilename())+"."+FileUtil.getExtensionName(multipartFile.getOriginalFilename())); this.save(picture); //删除临时文件 FileUtil.del(file); @@ -143,7 +146,7 @@ public class PictureServiceImpl extends BaseServiceImpl @Override public Picture findById(Long id) { Picture picture = this.getById(id); - ValidationUtil.isNull(picture.getId(), "Picture", "id", id); + ValidationUtil.isNull(picture.getId(),"Picture","id",id); return picture; } @@ -154,7 +157,7 @@ public class PictureServiceImpl extends BaseServiceImpl try { HttpUtil.get(picture.getDeleteUrl()); this.removeById(id); - } catch (Exception e) { + } catch(Exception e){ this.removeById(id); } } @@ -171,7 +174,7 @@ public class PictureServiceImpl extends BaseServiceImpl JSONObject jsonObject = JSONUtil.parseObj(result); List pictures = JSON.parseArray(jsonObject.get("data").toString(), Picture.class); for (Picture picture : pictures) { - if (this.getOne(new LambdaQueryWrapper().eq(Picture::getUrl, picture.getUrl())) == null) { + if(this.getOne(new LambdaQueryWrapper().eq(Picture::getUrl,picture.getUrl()))==null){ picture.setSize(FileUtil.getSize(Integer.parseInt(picture.getSize()))); picture.setUsername("System Sync"); picture.setMd5code(null); diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiNiuServiceImpl.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiNiuServiceImpl.java index 56a4bcecd17a2ee0074ac149a919b2bf06c45dba..beee1499caf785ead99fbe027c8c14d0d1402487 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiNiuServiceImpl.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiNiuServiceImpl.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.impl; @@ -66,8 +65,8 @@ public class QiNiuServiceImpl implements QiNiuService { @Override // @Cacheable - public Object queryAll(QiniuQueryCriteria criteria, Pageable pageable) { - return qiniuContentService.queryAll(criteria, pageable); + public Object queryAll(QiniuQueryCriteria criteria, Pageable pageable){ + return qiniuContentService.queryAll(criteria,pageable); } @Override @@ -78,7 +77,7 @@ public class QiNiuServiceImpl implements QiNiuService { @Override // @Cacheable(key = "'1'") public QiniuConfig find() { - QiniuConfig qiniuConfig = qiniuConfigService.getById(1L); + QiniuConfig qiniuConfig = qiniuConfigService.getOne(new LambdaQueryWrapper().orderByAsc(QiniuConfig::getId).last("limit 1")); return qiniuConfig; } @@ -87,7 +86,7 @@ public class QiNiuServiceImpl implements QiNiuService { @Transactional(rollbackFor = Exception.class) public QiniuConfig update(QiniuConfig qiniuConfig) { String http = "http://", https = "https://"; - if (!(qiniuConfig.getHost().toLowerCase().startsWith(http) || qiniuConfig.getHost().toLowerCase().startsWith(https))) { + if (!(qiniuConfig.getHost().toLowerCase().startsWith(http)||qiniuConfig.getHost().toLowerCase().startsWith(https))) { throw new BadRequestException("外链域名必须以http://或者https://开头"); } qiniuConfig.setId(1L); @@ -100,7 +99,7 @@ public class QiNiuServiceImpl implements QiNiuService { @Transactional(rollbackFor = Exception.class) public QiniuContent upload(MultipartFile file, QiniuConfig qiniuConfig) { FileUtil.checkSize(maxSize, file.getSize()); - if (qiniuConfig.getId() == null) { + if(qiniuConfig.getId() == null){ throw new BadRequestException("请先添加相应配置,再操作"); } // 构造一个带指定Zone对象的配置类 @@ -110,7 +109,7 @@ public class QiNiuServiceImpl implements QiNiuService { String upToken = auth.uploadToken(qiniuConfig.getBucket()); try { String key = file.getOriginalFilename(); - if (qiniuContentService.getOne(new LambdaQueryWrapper().eq(QiniuContent::getName, key)) != null) { + if(qiniuContentService.getOne(new LambdaQueryWrapper().eq(QiniuContent::getName,key)) != null) { key = QiNiuUtil.getKey(key); } Response response = uploadManager.put(file.getBytes(), key, upToken); @@ -118,7 +117,7 @@ public class QiNiuServiceImpl implements QiNiuService { DefaultPutRet putRet = JSON.parseObject(response.bodyString(), DefaultPutRet.class); - QiniuContent content = qiniuContentService.getOne(new LambdaQueryWrapper().eq(QiniuContent::getName, FileUtil.getFileNameNoEx(putRet.key))); + QiniuContent content = qiniuContentService.getOne(new LambdaQueryWrapper().eq(QiniuContent::getName,FileUtil.getFileNameNoEx(putRet.key))); if (content == null) { //存入数据库 QiniuContent qiniuContent = new QiniuContent(); @@ -126,14 +125,14 @@ public class QiNiuServiceImpl implements QiNiuService { qiniuContent.setBucket(qiniuConfig.getBucket()); qiniuContent.setType(qiniuConfig.getType()); qiniuContent.setName(FileUtil.getFileNameNoEx(putRet.key)); - qiniuContent.setUrl(qiniuConfig.getHost() + "/" + putRet.key); - qiniuContent.setSize(FileUtil.getSize(Integer.parseInt(file.getSize() + ""))); + qiniuContent.setUrl(qiniuConfig.getHost()+"/"+putRet.key); + qiniuContent.setSize(FileUtil.getSize(Integer.parseInt(file.getSize()+""))); qiniuContentService.save(qiniuContent); return qiniuContent; } return content; } catch (Exception e) { - throw new BadRequestException(e.getMessage()); + throw new BadRequestException(e.getMessage()); } } @@ -146,11 +145,11 @@ public class QiNiuServiceImpl implements QiNiuService { @Override // @Cacheable - public String download(QiniuContent content, QiniuConfig config) { + public String download(QiniuContent content,QiniuConfig config){ String finalUrl; String type = "公开"; - if (type.equals(content.getType())) { - finalUrl = content.getUrl(); + if(type.equals(content.getType())){ + finalUrl = content.getUrl(); } else { Auth auth = Auth.create(config.getAccessKey(), config.getSecretKey()); // 1小时,可以自定义链接过期时间 @@ -180,7 +179,7 @@ public class QiNiuServiceImpl implements QiNiuService { // @CacheEvict(allEntries = true) @Transactional(rollbackFor = Exception.class) public void synchronize(QiniuConfig config) { - if (config.getId() == null) { + if(config.getId() == null){ throw new BadRequestException("请先添加相应配置,再操作"); } //构造一个带指定Zone对象的配置类 @@ -200,15 +199,15 @@ public class QiNiuServiceImpl implements QiNiuService { QiniuContent qiniuContent; FileInfo[] items = fileListIterator.next(); for (FileInfo item : items) { - if (qiniuContentService.getOne(new LambdaQueryWrapper().eq(QiniuContent::getName, FileUtil.getFileNameNoEx(item.key))) - == null) { + if(qiniuContentService.getOne(new LambdaQueryWrapper().eq(QiniuContent::getName,FileUtil.getFileNameNoEx(item.key))) + == null){ qiniuContent = new QiniuContent(); - qiniuContent.setSize(FileUtil.getSize(Integer.parseInt(item.fsize + ""))); + qiniuContent.setSize(FileUtil.getSize(Integer.parseInt(item.fsize+""))); qiniuContent.setSuffix(FileUtil.getExtensionName(item.key)); qiniuContent.setName(FileUtil.getFileNameNoEx(item.key)); qiniuContent.setType(config.getType()); qiniuContent.setBucket(config.getBucket()); - qiniuContent.setUrl(config.getHost() + "/" + item.key); + qiniuContent.setUrl(config.getHost()+"/"+item.key); qiniuContentService.save(qiniuContent); } } @@ -234,7 +233,7 @@ public class QiNiuServiceImpl implements QiNiuService { public void downloadList(List queryAll, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (QiniuContent content : queryAll) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("文件名", content.getName()); map.put("文件类型", content.getSuffix()); map.put("空间名称", content.getBucket()); diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiniuConfigServiceImpl.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiniuConfigServiceImpl.java index a73ef39a464858fc421e7cf20fda076310ba4b08..e0ca9c12f5cfa3bcf3e734fb7bcc27565665cd44 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiniuConfigServiceImpl.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiniuConfigServiceImpl.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; -import co.yixiang.modules.tools.service.QiniuConfigService; import co.yixiang.modules.tools.service.mapper.QiniuConfigMapper; import co.yixiang.modules.tools.domain.QiniuConfig; +import co.yixiang.modules.tools.service.QiniuConfigService; import co.yixiang.modules.tools.service.dto.QiniuConfigDto; import co.yixiang.modules.tools.service.dto.QiniuQueryCriteria; import co.yixiang.utils.FileUtil; @@ -35,9 +34,9 @@ import java.util.Map; //import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Service @AllArgsConstructor //@CacheConfig(cacheNames = "qiniuConfig") @@ -47,7 +46,6 @@ public class QiniuConfigServiceImpl extends BaseServiceImpl queryAll(QiniuQueryCriteria criteria, Pageable pageable) { @@ -62,7 +60,7 @@ public class QiniuConfigServiceImpl extends BaseServiceImpl queryAll(QiniuQueryCriteria criteria) { + public List queryAll(QiniuQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(QiniuConfig.class, criteria)); } @@ -71,7 +69,7 @@ public class QiniuConfigServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (QiniuConfigDto qiniuConfig : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("accessKey", qiniuConfig.getAccessKey()); map.put("Bucket 识别符", qiniuConfig.getBucket()); map.put("外链域名", qiniuConfig.getHost()); diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiniuContentServiceImpl.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiniuContentServiceImpl.java index baf990bccaa05b97004d0997f45be482e89ae854..d98445fd4fa4e1376a44adbf83c9b4e24187acee 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiniuContentServiceImpl.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/QiniuContentServiceImpl.java @@ -1,19 +1,18 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.tools.service.mapper.QiniuContentMapper; import co.yixiang.modules.tools.domain.QiniuContent; import co.yixiang.modules.tools.service.QiniuContentService; import co.yixiang.modules.tools.service.dto.QiniuContentDto; import co.yixiang.modules.tools.service.dto.QiniuQueryCriteria; -import co.yixiang.modules.tools.service.mapper.QiniuContentMapper; import co.yixiang.utils.FileUtil; import com.github.pagehelper.PageInfo; import lombok.AllArgsConstructor; @@ -29,18 +28,14 @@ import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Service @AllArgsConstructor -//@CacheConfig(cacheNames = "qiniuContent") +@SuppressWarnings("unchecked") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class QiniuContentServiceImpl extends BaseServiceImpl implements QiniuContentService { @@ -60,7 +55,7 @@ public class QiniuContentServiceImpl extends BaseServiceImpl queryAll(QiniuQueryCriteria criteria) { + public List queryAll(QiniuQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(QiniuContent.class, criteria)); } @@ -69,14 +64,14 @@ public class QiniuContentServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (QiniuContentDto qiniuContent : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("Bucket 识别符", qiniuContent.getBucket()); map.put("文件名称", qiniuContent.getKey()); map.put("文件大小", qiniuContent.getSize()); map.put("文件类型:私有或公开", qiniuContent.getType()); map.put("上传或同步的时间", qiniuContent.getUpdateTime()); map.put("文件url", qiniuContent.getUrl()); - map.put(" suffix", qiniuContent.getSuffix()); + map.put(" suffix", qiniuContent.getSuffix()); list.add(map); } FileUtil.downloadExcel(list, response); diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/VerificationCodeServiceImpl.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/VerificationCodeServiceImpl.java index a3f10368d2964a16654117fbd1814de9ba6ad9ef..8bd23159c4109a5f93eadcb12a77a79a9f3c4e97 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/VerificationCodeServiceImpl.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/impl/VerificationCodeServiceImpl.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.impl; @@ -36,7 +35,7 @@ import java.util.concurrent.TimeUnit; */ @Service @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) -public class VerificationCodeServiceImpl extends BaseServiceImpl implements VerificationCodeService { +public class VerificationCodeServiceImpl extends BaseServiceImpl implements VerificationCodeService { @Value("${code.expiration}") private Integer expiration; @@ -48,20 +47,20 @@ public class VerificationCodeServiceImpl extends BaseServiceImpl() - .eq(VerificationCode::getScenes, code.getScenes()).eq(VerificationCode::getType, code.getType()).eq(VerificationCode::getValue, code.getValue())); + .eq(VerificationCode::getScenes,code.getScenes()).eq(VerificationCode::getType,code.getType()).eq(VerificationCode::getValue,code.getValue())); // 如果不存在有效的验证码,就创建一个新的 TemplateEngine engine = TemplateUtil.createEngine(new TemplateConfig("template", TemplateConfig.ResourceMode.CLASSPATH)); Template template = engine.getTemplate("email/email.ftl"); - if (verificationCode == null) { - code.setCode(RandomUtil.randomNumbers(6)); - content = template.render(Dict.create().set("code", code.getCode())); - emailVo = new EmailVo(Collections.singletonList(code.getValue()), "yshop后台管理系统", content); + if(verificationCode == null){ + code.setCode(RandomUtil.randomNumbers (6)); + content = template.render(Dict.create().set("code",code.getCode())); + emailVo = new EmailVo(Collections.singletonList(code.getValue()),"yshop后台管理系统",content); this.save(code); timedDestruction(code); - // 存在就再次发送原来的验证码 + // 存在就再次发送原来的验证码 } else { - content = template.render(Dict.create().set("code", verificationCode.getCode())); - emailVo = new EmailVo(Collections.singletonList(verificationCode.getValue()), "yshop后台管理系统", content); + content = template.render(Dict.create().set("code",verificationCode.getCode())); + emailVo = new EmailVo(Collections.singletonList(verificationCode.getValue()),"yshop后台管理系统",content); } return emailVo; } @@ -69,9 +68,9 @@ public class VerificationCodeServiceImpl extends BaseServiceImpl() - .eq(VerificationCode::getScenes, code.getScenes()).eq(VerificationCode::getType, code.getType()).eq(VerificationCode::getValue, code.getValue()) - .eq(VerificationCode::getStatus, true)); - if (verificationCode == null || !verificationCode.getCode().equals(code.getCode())) { + .eq(VerificationCode::getScenes,code.getScenes()).eq(VerificationCode::getType,code.getType()).eq(VerificationCode::getValue,code.getValue()) + .eq(VerificationCode::getStatus,true)); + if(verificationCode == null || !verificationCode.getCode().equals(code.getCode())){ throw new BadRequestException("无效验证码"); } else { verificationCode.setStatus(false); @@ -92,7 +91,7 @@ public class VerificationCodeServiceImpl extends BaseServiceImpl { diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/EmailConfigMapper.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/EmailConfigMapper.java index e7c9691c68a91b222e20552973f2ed6577937180..1bb0b2ffd7c14673d8a83ec42f2ebb38158b9f82 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/EmailConfigMapper.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/EmailConfigMapper.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.mapper; @@ -12,9 +11,9 @@ import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Repository @Mapper public interface EmailConfigMapper extends CoreMapper { diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/LocalStorageMapper.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/LocalStorageMapper.java index 152abde7def092449793453d670cd2c50cf904ac..9ad4c56daa574932a8e24ff664bb735df6c854f8 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/LocalStorageMapper.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/LocalStorageMapper.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.mapper; @@ -12,9 +11,9 @@ import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Repository @Mapper public interface LocalStorageMapper extends CoreMapper { diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/PictureMapper.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/PictureMapper.java index b9e22789f21febb7da18f2456f9feddbdb8719eb..672a3ff3e7de750deab6cc58ff1fd97911767ecf 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/PictureMapper.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/PictureMapper.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.mapper; @@ -12,9 +11,9 @@ import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Repository @Mapper public interface PictureMapper extends CoreMapper { diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/QiniuConfigMapper.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/QiniuConfigMapper.java index 62bb2b051f4a807ed9065618f939d8324c8efb77..e02325b6dd40108554536e4c15bca7c79bc42127 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/QiniuConfigMapper.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/QiniuConfigMapper.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.mapper; @@ -14,14 +13,14 @@ import org.apache.ibatis.annotations.Update; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Repository @Mapper public interface QiniuConfigMapper extends CoreMapper { - @Update("update qiniu_config set type = #{type} ") + @Update("update tools_qiniu_config set type = #{type} ") void updateType(@Param("type") String type); } diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/QiniuContentMapper.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/QiniuContentMapper.java index e15dcbc9b83d2e919cccfdb6bb18339bbd7b3b7c..95f6130ecc8e8fb1fe11746b3b3a0b5333d9385b 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/QiniuContentMapper.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/QiniuContentMapper.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.mapper; @@ -12,9 +11,9 @@ import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-13 - */ +* @author hupeng +* @date 2020-05-13 +*/ @Repository @Mapper public interface QiniuContentMapper extends CoreMapper { diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/VerificationCodeMapper.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/VerificationCodeMapper.java index 88063fdbaae52b06d400c48634e82c3feb783b28..1c2a8c0f1d722a1e2fa25637dd656527711f0dab 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/VerificationCodeMapper.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/service/mapper/VerificationCodeMapper.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.service.mapper; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/AliPayStatusEnum.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/AliPayStatusEnum.java index b15a7c0a0ec71541b5052a82b675aa53a8763d69..5e5754547eb436861d7fe817cf9db2c7ed5651be 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/AliPayStatusEnum.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/AliPayStatusEnum.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.utils; @@ -11,7 +10,7 @@ package co.yixiang.modules.tools.utils; * @author zhengjie * @date 2018/08/01 16:45:43 */ -public enum AliPayStatusEnum { +public enum AliPayStatusEnum { /** 交易成功 */ FINISHED("交易成功", "TRADE_FINISHED"), diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/AlipayUtils.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/AlipayUtils.java index 6b65f71dab8cd93dd0bc3ea727792c1828f0c4eb..170f927422934912a31f5a67193311761ceba4c1 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/AlipayUtils.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/AlipayUtils.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.utils; @@ -31,7 +30,7 @@ public class AlipayUtils { */ public String getOrderCode() { SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); - int a = (int) (Math.random() * 9000.0D) + 1000; + int a = (int)(Math.random() * 9000.0D) + 1000; System.out.println(a); Date date = new Date(); String str = sdf.format(date); @@ -49,10 +48,10 @@ public class AlipayUtils { * @param alipay 阿里云配置 * @return boolean */ - public boolean rsaCheck(HttpServletRequest request, AlipayConfig alipay) { + public boolean rsaCheck(HttpServletRequest request, AlipayConfig alipay){ // 获取支付宝POST过来反馈信息 - Map params = new HashMap<>(1); + Map params = new HashMap<>(1); Map requestParams = request.getParameterMap(); for (Object o : requestParams.keySet()) { String name = (String) o; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/JacksonUtil.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/JacksonUtil.java index 683b14f6749c77f848ee7d04e92188d2c0294c94..511bd57a82526fee71b5c87b01aad5d02e33286e 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/JacksonUtil.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/JacksonUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.utils; diff --git a/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/QiNiuUtil.java b/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/QiNiuUtil.java index d4b8eb14241491896fbc13fbde38e71261096cea..ce349fd93c5b326e6699e01a3f1ab96f27024431 100644 --- a/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/QiNiuUtil.java +++ b/yshop-tools/src/main/java/co/yixiang/modules/tools/utils/QiNiuUtil.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.tools.utils; @@ -32,15 +31,15 @@ public class QiNiuUtil { * @param zone 机房名称 * @return Region */ - public static Region getRegion(String zone) { + public static Region getRegion(String zone){ - if (HUAD.equals(zone)) { + if(HUAD.equals(zone)){ return Region.huadong(); - } else if (HUAB.equals(zone)) { + } else if(HUAB.equals(zone)){ return Region.huabei(); - } else if (HUAN.equals(zone)) { + } else if(HUAN.equals(zone)){ return Region.huanan(); - } else if (BEIM.equals(zone)) { + } else if (BEIM.equals(zone)){ return Region.beimei(); // 否则就是东南亚 } else { @@ -53,7 +52,7 @@ public class QiNiuUtil { * @param file 文件名 * @return String */ - public static String getKey(String file) { + public static String getKey(String file){ SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMddHHmmss"); Date date = new Date(); return FileUtil.getFileNameNoEx(file) + "-" + diff --git a/yshop-weixin/pom.xml b/yshop-weixin/pom.xml index 8785fb440d66c613323219fc83c004dd305e110e..cdfae60a422574458b1849a4e4c65bb8d5081591 100644 --- a/yshop-weixin/pom.xml +++ b/yshop-weixin/pom.xml @@ -5,37 +5,23 @@ yshop co.yixiang - 2.3 + 3.3 4.0.0 yshop-weixin 微信模块 - - 4.4.0 - - - - com.github.binarywang - weixin-java-mp - ${weixin-java.version} - - - com.github.binarywang - weixin-java-pay - ${weixin-java.version} - com.github.binarywang wx-java-miniapp-spring-boot-starter - ${weixin-java.version} + 4.3.0 co.yixiang - yshop-common - 2.3 + yshop-mall + 3.3 diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/AbstractBuilder.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/AbstractBuilder.java index 07b91fe27ce53182d435177e2d261a24295f2d96..e99bf7ee3cb3cf0f90c060b7033e989281494437 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/AbstractBuilder.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/AbstractBuilder.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.builder; diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/ImageBuilder.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/ImageBuilder.java index 3ac263d411316b28396e316dba064399530c8bfd..d129b3fa28b1cae6b7eca4e9bb62ad546f82d3a2 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/ImageBuilder.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/ImageBuilder.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.builder; @@ -21,8 +20,8 @@ public class ImageBuilder extends AbstractBuilder { WxMpService service) { WxMpXmlOutImageMessage m = WxMpXmlOutMessage.IMAGE().mediaId(content) - .fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser()) - .build(); + .fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser()) + .build(); return m; } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/TextBuilder.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/TextBuilder.java index 7cb930ef0d347e3c69bc30764bac826fdf5428d8..0391be76c9464659b3cfae83624296dd1e51a0e4 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/TextBuilder.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/builder/TextBuilder.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.builder; @@ -20,8 +19,8 @@ public class TextBuilder extends AbstractBuilder { public WxMpXmlOutMessage build(String content, WxMpXmlMessage wxMessage, WxMpService service) { WxMpXmlOutTextMessage m = WxMpXmlOutMessage.TEXT().content(content) - .fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser()) - .build(); + .fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser()) + .build(); return m; } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/ShopKeyUtils.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/ShopKeyUtils.java deleted file mode 100644 index 3caa19aee4b8fd4c7d9c96c3cddb6303eb70cc65..0000000000000000000000000000000000000000 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/ShopKeyUtils.java +++ /dev/null @@ -1,170 +0,0 @@ -package co.yixiang.modules.mp.config; - -import co.yixiang.constant.ShopConstants; -import co.yixiang.constant.SystemConfigConstants; - -/** - * 处理缓存key值的统一入口,方面后面扩展, - * 例如:多租户就要在每个key后拼接上租户ID,只要统一修改这里就可以了 - */ -public class ShopKeyUtils { - /** - * 扩展值,默认为空, 把这个值追加到所有key值上 - */ - private static String getExtendValue() { - String extendValue = ""; - return extendValue; - } - - //*********************************begin yx_system_config 通用值 ***************************************************** - - /** - * api_url - */ - public static String getApiUrl() { - String apiUrl = SystemConfigConstants.API_URL; - return apiUrl; - } - - /** - * site_url - */ - public static String getSiteUrl() { - String siteUrl = SystemConfigConstants.SITE_URL; - return siteUrl; - } - - /** - * 腾讯mapkey tengxun_map_key - */ - public static String getTengXunMapKey() { - String tengxunMapKey = SystemConfigConstants.TENGXUN_MAP_KEY; - return tengxunMapKey; - } - - //*********************************begin yx_system_config 业务字段 ***************************************************** - - /** - * store_self_mention - */ - public static String getStoreSelfMention() { - String storeSelfMention = SystemConfigConstants.STORE_SEFL_MENTION; - return storeSelfMention + getExtendValue(); - } - - - //*********************************begin yx_system_config 微信配置相关字段 ***************************************************** - - /** - * 微信公众号service - */ - public static String getYshopWeiXinMpSevice() { - String yshopWeiXinMpSevice = ShopConstants.YSHOP_WEIXIN_MP_SERVICE; - return yshopWeiXinMpSevice + getExtendValue(); - } - - /** - * 微信公众号id - */ - public static String getWechatAppId() { - String wechatAppId = SystemConfigConstants.WECHAT_APPID; - return wechatAppId + getExtendValue(); - } - - /** - * 微信公众号secret - */ - public static String getWechatAppSecret() { - String wechatAppSecret = SystemConfigConstants.WECHAT_APPSECRET; - return wechatAppSecret + getExtendValue(); - } - - /** - * 微信公众号验证token - */ - public static String getWechatToken() { - String wechatToken = SystemConfigConstants.WECHAT_TOKEN; - return wechatToken + getExtendValue(); - } - - /** - * 微信公众号 EncodingAESKey - */ - public static String getWechatEncodingAESKey() { - String wechatEncodingAESKey = SystemConfigConstants.WECHAT_ENCODINGAESKEY; - return wechatEncodingAESKey + getExtendValue(); - } - - /** - * 微信支付service - */ - public static String getYshopWeiXinPayService() { - String yshopWeiXinPayService = ShopConstants.YSHOP_WEIXIN_PAY_SERVICE; - return yshopWeiXinPayService + getExtendValue(); - } - - /** - * 商户号 - */ - public static String getWxPayMchId() { - String wxPayMchId = SystemConfigConstants.WXPAY_MCHID; - return wxPayMchId + getExtendValue(); - } - - /** - * 商户秘钥 - */ - public static String getWxPayMchKey() { - String wxPayMchKey = SystemConfigConstants.WXPAY_MCHKEY; - return wxPayMchKey + getExtendValue(); - } - - /** - * 商户证书路径 - */ - public static String getWxPayKeyPath() { - String wxPayKeyPath = SystemConfigConstants.WXPAY_KEYPATH; - return wxPayKeyPath + getExtendValue(); - } - - /** - * 微信支付小程序service - */ - public static String getYshopWeiXinMiniPayService() { - String yshopWeiXinMiniPayService = ShopConstants.YSHOP_WEIXIN_MINI_PAY_SERVICE; - return yshopWeiXinMiniPayService + getExtendValue(); - } - - /** - * 微信支付app service - */ - public static String getYshopWeiXinAppPayService() { - String yshopWeiXinAppPayService = ShopConstants.YSHOP_WEIXIN_APP_PAY_SERVICE; - return yshopWeiXinAppPayService + getExtendValue(); - } - - /** - * 微信小程序id - */ - public static String getWxAppAppId() { - String wxAppAppId = SystemConfigConstants.WXAPP_APPID; - return wxAppAppId + getExtendValue(); - } - - /** - * 微信小程序秘钥 - */ - public static String getWxAppSecret() { - String wxAppSecret = SystemConfigConstants.WXAPP_SECRET; - return wxAppSecret + getExtendValue(); - } - - /** - * 支付appId - */ - public static String getWxNativeAppAppId() { - String wxNativeAppAppId = SystemConfigConstants.WX_NATIVE_APP_APPID; - return wxNativeAppAppId + getExtendValue(); - } - -} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/WxMaConfiguration.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/WxMaConfiguration.java new file mode 100644 index 0000000000000000000000000000000000000000..0d36bbdc47b256aadcfca363f83d15c7d42e9c92 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/WxMaConfiguration.java @@ -0,0 +1,78 @@ +package co.yixiang.modules.mp.config; + +import cn.binarywang.wx.miniapp.api.WxMaService; +import cn.binarywang.wx.miniapp.api.impl.WxMaServiceImpl; +import cn.binarywang.wx.miniapp.config.impl.WxMaDefaultConfigImpl; +import cn.binarywang.wx.miniapp.message.WxMaMessageHandler; +import cn.binarywang.wx.miniapp.message.WxMaMessageRouter; +import co.yixiang.constant.SystemConfigConstants; +import co.yixiang.utils.RedisUtil; +import co.yixiang.utils.RedisUtils; +import co.yixiang.utils.ShopKeyUtils; +import com.google.common.collect.Maps; +import me.chanjar.weixin.common.api.WxConsts; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.annotation.Configuration; + +import java.util.Map; + +/** + * @author Binary Wang + */ +@Configuration(proxyBeanMethods = false) +public class WxMaConfiguration { + private static Map maServices = Maps.newHashMap(); + private static Map routers = Maps.newHashMap(); + private static RedisUtils redisUtils; + private static WxMaMessageHandler wxMaMessageHandler; + + public static WxMaMessageRouter getRouter(String appid) { + return routers.get(appid); + } + @Autowired + public WxMaConfiguration(RedisUtils redisUtils) { + WxMaConfiguration.redisUtils = redisUtils; + } + + public static WxMaService getWxMaService() { + WxMaService wxMaService = maServices.get(ShopKeyUtils.getYshopWeiXinMaSevice()); + //增加一个redis标识 + if(wxMaService == null || redisUtils.get(ShopKeyUtils.getYshopWeiXinMaSevice()) == null){ + WxMaDefaultConfigImpl config = new WxMaDefaultConfigImpl(); + config.setMsgDataFormat("JSON"); + config.setAppid(RedisUtil.get(ShopKeyUtils.getWxAppAppId())); + config.setSecret(RedisUtil.get(ShopKeyUtils.getWxAppSecret())); + config.setToken(RedisUtil.get(ShopKeyUtils.getWechatMaToken())); + config.setAesKey(RedisUtil.get(ShopKeyUtils.getWechatMaEncodingAESKey())); + wxMaService = new WxMaServiceImpl(); + wxMaService.setWxMaConfig(config); + maServices.put(ShopKeyUtils.getYshopWeiXinMaSevice(), wxMaService); + routers.put(ShopKeyUtils.getYshopWeiXinMaSevice(), newRouter(wxMaService)); + //增加标识 + redisUtils.set(ShopKeyUtils.getYshopWeiXinMaSevice(),"yshop"); + + } + return wxMaService; + } + /** + * 移除WxMpService + */ + public static void removeWxMaService(){ + redisUtils.del(ShopKeyUtils.getYshopWeiXinMaSevice()); + maServices.remove(ShopKeyUtils.getYshopWeiXinMaSevice()); + routers.remove(ShopKeyUtils.getYshopWeiXinMaSevice()); + } + private static WxMaMessageRouter newRouter(WxMaService service) { + final WxMaMessageRouter router = new WxMaMessageRouter(service); + router + .rule().handler(wxMaMessageHandler).next() + .rule().async(false).msgType(WxConsts.XmlMsgType.EVENT).event(SystemConfigConstants.BINDSTATECHANGE).handler(BINDSTATECHANGE_HANDLER).end(); + return router; + } + private static final WxMaMessageHandler BINDSTATECHANGE_HANDLER = (wxMessage, context, service, sessionManager) -> { + wxMessage.getFromUser(); + wxMessage.getContent(); + return null; + }; +} + diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/WxMpConfiguration.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/WxMpConfiguration.java index b971156143def0f4230b13e7dad5f4958ec27ed4..98d608c6331dd59676b259eef5a66d1518cae19a 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/WxMpConfiguration.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/WxMpConfiguration.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.config; @@ -12,12 +11,13 @@ import co.yixiang.modules.mp.handler.LogHandler; import co.yixiang.modules.mp.handler.MenuHandler; import co.yixiang.modules.mp.handler.MsgHandler; import co.yixiang.modules.mp.handler.NullHandler; -import co.yixiang.modules.mp.handler.RedisHandler; import co.yixiang.modules.mp.handler.ScanHandler; import co.yixiang.modules.mp.handler.StoreCheckNotifyHandler; import co.yixiang.modules.mp.handler.SubscribeHandler; import co.yixiang.modules.mp.handler.UnsubscribeHandler; import co.yixiang.utils.RedisUtil; +import co.yixiang.utils.RedisUtils; +import co.yixiang.utils.ShopKeyUtils; import com.google.common.collect.Maps; import me.chanjar.weixin.common.api.WxConsts; import me.chanjar.weixin.mp.api.WxMpMessageRouter; @@ -25,6 +25,7 @@ import me.chanjar.weixin.mp.api.WxMpService; import me.chanjar.weixin.mp.api.impl.WxMpServiceImpl; import me.chanjar.weixin.mp.config.impl.WxMpDefaultConfigImpl; import me.chanjar.weixin.mp.constant.WxMpEventConstants; +import org.springframework.beans.factory.annotation.Autowired; import org.springframework.context.annotation.Configuration; import java.util.Map; @@ -37,7 +38,7 @@ import static me.chanjar.weixin.common.api.WxConsts.XmlMsgType; * @author hupeng * @date 2020/01/20 */ -@Configuration +@Configuration(proxyBeanMethods = false) public class WxMpConfiguration { private static Map mpServices = Maps.newHashMap(); @@ -53,13 +54,14 @@ public class WxMpConfiguration { private static UnsubscribeHandler unsubscribeHandler; private static SubscribeHandler subscribeHandler; private static ScanHandler scanHandler; - private static RedisHandler redisHandler; - - public WxMpConfiguration(LogHandler logHandler, NullHandler nullHandler, KfSessionHandler kfSessionHandler, - StoreCheckNotifyHandler storeCheckNotifyHandler, LocationHandler locationHandler, - MenuHandler menuHandler, MsgHandler msgHandler, UnsubscribeHandler unsubscribeHandler, - SubscribeHandler subscribeHandler, ScanHandler scanHandler, - RedisHandler redisHandler) { + private static RedisUtils redisUtils; + + @Autowired + public WxMpConfiguration(LogHandler logHandler,NullHandler nullHandler,KfSessionHandler kfSessionHandler, + StoreCheckNotifyHandler storeCheckNotifyHandler,LocationHandler locationHandler, + MenuHandler menuHandler,MsgHandler msgHandler,UnsubscribeHandler unsubscribeHandler, + SubscribeHandler subscribeHandler,ScanHandler scanHandler, + RedisUtils redisUtils){ WxMpConfiguration.logHandler = logHandler; WxMpConfiguration.nullHandler = nullHandler; WxMpConfiguration.kfSessionHandler = kfSessionHandler; @@ -70,7 +72,7 @@ public class WxMpConfiguration { WxMpConfiguration.unsubscribeHandler = unsubscribeHandler; WxMpConfiguration.subscribeHandler = subscribeHandler; WxMpConfiguration.scanHandler = scanHandler; - WxMpConfiguration.redisHandler = redisHandler; + WxMpConfiguration.redisUtils = redisUtils; } @@ -82,7 +84,7 @@ public class WxMpConfiguration { WxMpService wxMpService = mpServices.get(ShopKeyUtils.getYshopWeiXinMpSevice()); //增加一个redis标识 - if (wxMpService == null || RedisUtil.get(ShopKeyUtils.getYshopWeiXinMpSevice()) == null) { + if(wxMpService == null || redisUtils.get(ShopKeyUtils.getYshopWeiXinMpSevice()) == null) { WxMpDefaultConfigImpl configStorage = new WxMpDefaultConfigImpl(); configStorage.setAppId(RedisUtil.get(ShopKeyUtils.getWechatAppId())); configStorage.setSecret(RedisUtil.get(ShopKeyUtils.getWechatAppSecret())); @@ -94,7 +96,7 @@ public class WxMpConfiguration { routers.put(ShopKeyUtils.getYshopWeiXinMpSevice(), newRouter(wxMpService)); //增加标识 - RedisUtil.set(ShopKeyUtils.getYshopWeiXinMpSevice(), "yshop"); + redisUtils.set(ShopKeyUtils.getYshopWeiXinMpSevice(),"yshop"); } return wxMpService; } @@ -102,8 +104,8 @@ public class WxMpConfiguration { /** * 移除WxMpService */ - public static void removeWxMpService() { - RedisUtil.del(ShopKeyUtils.getYshopWeiXinMpSevice()); + public static void removeWxMpService(){ + redisUtils.del(ShopKeyUtils.getYshopWeiXinMpSevice()); mpServices.remove(ShopKeyUtils.getYshopWeiXinMpSevice()); routers.remove(ShopKeyUtils.getYshopWeiXinMpSevice()); } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/WxPayConfiguration.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/WxPayConfiguration.java index 8cafdc31ff7df1a58694bc0f6b5cdc438b8b3d83..a3cecfdf887d2fb351eefd28be448b7b915e769b 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/WxPayConfiguration.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/config/WxPayConfiguration.java @@ -1,13 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.config; -import co.yixiang.modules.mp.handler.RedisHandler; +import co.yixiang.enums.PayMethodEnum; import co.yixiang.utils.RedisUtil; +import co.yixiang.utils.RedisUtils; +import co.yixiang.utils.ShopKeyUtils; import com.github.binarywang.wxpay.config.WxPayConfig; import com.github.binarywang.wxpay.service.WxPayService; import com.github.binarywang.wxpay.service.impl.WxPayServiceImpl; @@ -24,98 +25,116 @@ import java.util.Map; * @date 2020/03/01 */ @Slf4j -@Configuration +@Configuration(proxyBeanMethods = false) public class WxPayConfiguration { - private static Map payServices = Maps.newHashMap(); - - private static RedisHandler redisHandler; + private static Map payServices = Maps.newHashMap(); - @Autowired - public WxPayConfiguration(RedisHandler redisHandler) { - WxPayConfiguration.redisHandler = redisHandler; - } + private static RedisUtils redisUtils; - /** - * 获取WxPayService - * @return - */ - public static WxPayService getPayService() { - WxPayService wxPayService = payServices.get(ShopKeyUtils.getYshopWeiXinPayService()); - if (wxPayService == null || RedisUtil.get(ShopKeyUtils.getYshopWeiXinPayService()) == null) { - WxPayConfig payConfig = new WxPayConfig(); - payConfig.setAppId(RedisUtil.get(ShopKeyUtils.getWechatAppId())); - payConfig.setMchId(RedisUtil.get(ShopKeyUtils.getWxPayMchId())); - payConfig.setMchKey(RedisUtil.get(ShopKeyUtils.getWxPayMchKey())); - payConfig.setKeyPath(RedisUtil.get(ShopKeyUtils.getWxPayKeyPath())); - // 可以指定是否使用沙箱环境 - payConfig.setUseSandboxEnv(false); - wxPayService = new WxPayServiceImpl(); - wxPayService.setConfig(payConfig); - payServices.put(ShopKeyUtils.getYshopWeiXinPayService(), wxPayService); + @Autowired + public WxPayConfiguration(RedisUtils redisUtils) { + WxPayConfiguration.redisUtils = redisUtils; + } - //增加标识 - RedisUtil.set(ShopKeyUtils.getYshopWeiXinPayService(), "yshop"); - } - return wxPayService; - } + /** + * 获取WxPayService + * @return + */ + public static WxPayService getPayService(PayMethodEnum payMethodEnum) { + WxPayService wxPayService = payServices.get(ShopKeyUtils.getYshopWeiXinPayService()+payMethodEnum.getValue()); + if(wxPayService == null || redisUtils.get(ShopKeyUtils.getYshopWeiXinPayService()) == null) { + WxPayConfig payConfig = new WxPayConfig(); + switch (payMethodEnum){ + case WECHAT: + payConfig.setAppId(redisUtils.getY(ShopKeyUtils.getWechatAppId())); + break; + case WXAPP: + payConfig.setAppId(RedisUtil.get(ShopKeyUtils.getWxAppAppId())); + break; + case APP: + payConfig.setAppId(RedisUtil.get(ShopKeyUtils.getWxNativeAppAppId())); + break; + default: + } - /** - * 获取小程序WxAppPayService - * @return - */ - public static WxPayService getWxAppPayService() { - WxPayService wxPayService = payServices.get(ShopKeyUtils.getYshopWeiXinMiniPayService()); - if (wxPayService == null || RedisUtil.get(ShopKeyUtils.getYshopWeiXinPayService()) == null) { - WxPayConfig payConfig = new WxPayConfig(); - payConfig.setAppId(RedisUtil.get(ShopKeyUtils.getWxAppAppId())); - payConfig.setMchId(RedisUtil.get(ShopKeyUtils.getWxPayMchId())); - payConfig.setMchKey(RedisUtil.get(ShopKeyUtils.getWxPayMchKey())); - payConfig.setKeyPath(RedisUtil.get(ShopKeyUtils.getWxPayKeyPath())); - // 可以指定是否使用沙箱环境 - payConfig.setUseSandboxEnv(false); - wxPayService = new WxPayServiceImpl(); - wxPayService.setConfig(payConfig); - payServices.put(ShopKeyUtils.getYshopWeiXinMiniPayService(), wxPayService); + payConfig.setMchId(redisUtils.getY(ShopKeyUtils.getWxPayMchId())); + payConfig.setMchKey(redisUtils.getY(ShopKeyUtils.getWxPayMchKey())); + payConfig.setKeyPath(redisUtils.getY(ShopKeyUtils.getWxPayKeyPath())); + // todo 使用v3证书需要的字段 + // payConfig.setMchId(); + // payConfig.setApiV3Key(); + // payConfig.setCertSerialNo(); + // payConfig.setPrivateKeyPath(); + // payConfig.setPrivateCertPath(); + // 可以指定是否使用沙箱环境 + payConfig.setUseSandboxEnv(false); + wxPayService = new WxPayServiceImpl(); + wxPayService.setConfig(payConfig); + payServices.put(ShopKeyUtils.getYshopWeiXinPayService()+payMethodEnum.getValue(), wxPayService); - //增加标识 - RedisUtil.set(ShopKeyUtils.getYshopWeiXinPayService(), "yshop"); - } - return wxPayService; + //增加标识 + redisUtils.set(ShopKeyUtils.getYshopWeiXinPayService(),"yshop"); + } + return wxPayService; } - /** - * 获取APPPayService - * @return - */ - public static WxPayService getAppPayService() { - WxPayService wxPayService = payServices.get(ShopKeyUtils.getYshopWeiXinAppPayService()); - if (wxPayService == null || RedisUtil.get(ShopKeyUtils.getYshopWeiXinPayService()) == null) { - WxPayConfig payConfig = new WxPayConfig(); - payConfig.setAppId(RedisUtil.get(ShopKeyUtils.getWxNativeAppAppId())); - payConfig.setMchId(RedisUtil.get(ShopKeyUtils.getWxPayMchId())); - payConfig.setMchKey(RedisUtil.get(ShopKeyUtils.getWxPayMchKey())); - payConfig.setKeyPath(RedisUtil.get(ShopKeyUtils.getWxPayKeyPath())); - // 可以指定是否使用沙箱环境 - payConfig.setUseSandboxEnv(false); - wxPayService = new WxPayServiceImpl(); - wxPayService.setConfig(payConfig); - payServices.put(ShopKeyUtils.getYshopWeiXinAppPayService(), wxPayService); +// /** +// * 获取小程序WxAppPayService +// * @return +// */ +// public static WxPayService getWxAppPayService() { +// WxPayService wxPayService = payServices.get(ShopKeyUtils.getYshopWeiXinMiniPayService()); +// if(wxPayService == null || RedisUtil.get(ShopKeyUtils.getYshopWeiXinPayService()) == null) { +// WxPayConfig payConfig = new WxPayConfig(); +// payConfig.setAppId(RedisUtil.get(ShopKeyUtils.getWxAppAppId())); +// payConfig.setMchId(RedisUtil.get(ShopKeyUtils.getWxPayMchId())); +// payConfig.setMchKey(RedisUtil.get(ShopKeyUtils.getWxPayMchKey())); +// payConfig.setKeyPath(RedisUtil.get(ShopKeyUtils.getWxPayKeyPath())); +// // 可以指定是否使用沙箱环境 +// payConfig.setUseSandboxEnv(false); +// wxPayService = new WxPayServiceImpl(); +// wxPayService.setConfig(payConfig); +// payServices.put(ShopKeyUtils.getYshopWeiXinMiniPayService(), wxPayService); +// +// //增加标识 +// RedisUtil.set(ShopKeyUtils.getYshopWeiXinPayService(),"yshop"); +// } +// return wxPayService; +// } - //增加标识 - RedisUtil.set(ShopKeyUtils.getYshopWeiXinPayService(), "yshop"); - } - return wxPayService; - } +// /** +// * 获取APPPayService +// * @return +// */ +// public static WxPayService getAppPayService() { +// WxPayService wxPayService = payServices.get(ShopKeyUtils.getYshopWeiXinAppPayService()); +// if(wxPayService == null || RedisUtil.get(ShopKeyUtils.getYshopWeiXinPayService()) == null) { +// WxPayConfig payConfig = new WxPayConfig(); +// payConfig.setAppId(RedisUtil.get(ShopKeyUtils.getWxNativeAppAppId())); +// payConfig.setMchId(RedisUtil.get(ShopKeyUtils.getWxPayMchId())); +// payConfig.setMchKey(RedisUtil.get(ShopKeyUtils.getWxPayMchKey())); +// payConfig.setKeyPath(RedisUtil.get(ShopKeyUtils.getWxPayKeyPath())); +// // 可以指定是否使用沙箱环境 +// payConfig.setUseSandboxEnv(false); +// wxPayService = new WxPayServiceImpl(); +// wxPayService.setConfig(payConfig); +// payServices.put(ShopKeyUtils.getYshopWeiXinAppPayService(), wxPayService); +// +// //增加标识 +// RedisUtil.set(ShopKeyUtils.getYshopWeiXinPayService(),"yshop"); +// } +// return wxPayService; +// } - /** - * 移除WxPayService - */ - public static void removeWxPayService() { - RedisUtil.del(ShopKeyUtils.getYshopWeiXinPayService()); - payServices.remove(ShopKeyUtils.getYshopWeiXinPayService()); - payServices.remove(ShopKeyUtils.getYshopWeiXinMiniPayService()); - payServices.remove(ShopKeyUtils.getYshopWeiXinAppPayService()); - } + /** + * 移除WxPayService + */ + public static void removeWxPayService(){ + redisUtils.del(ShopKeyUtils.getYshopWeiXinPayService()); + payServices.remove(ShopKeyUtils.getYshopWeiXinPayService()); + //payServices.remove(ShopKeyUtils.getYshopWeiXinMiniPayService()); + //payServices.remove(ShopKeyUtils.getYshopWeiXinAppPayService()); + } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxArticle.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxArticle.java index a8766f1ba3ea7b60ed24cf1fa7195e35df21a756..afa1a5ca329bf61b14c84e247d59548f0d8b1244 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxArticle.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxArticle.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.domain; @@ -12,14 +11,16 @@ import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import lombok.EqualsAndHashCode; import javax.validation.constraints.NotBlank; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_article") public class YxArticle extends BaseDomain { @@ -81,7 +82,31 @@ public class YxArticle extends BaseDomain { - public void copy(YxArticle source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + /** 是否隐藏 */ + private Integer hide; + + + /** 管理员id */ + private Integer adminId; + + + /** 商户id */ + private Integer merId; + + + /** 产品关联id */ + private Integer productId; + + + /** 是否热门(小程序) */ + private Integer isHot; + + + /** 是否轮播图(小程序) */ + private Integer isBanner; + + + public void copy(YxArticle source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatLive.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatLive.java new file mode 100644 index 0000000000000000000000000000000000000000..849eef14bcba32860c6fceed3bd0110951b380a5 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatLive.java @@ -0,0 +1,143 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.domain; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import javax.validation.constraints.NotNull; +import java.io.Serializable; +import java.util.Date; + +/** +* @author hupeng +* @date 2020-08-10 +*/ +@Data +@TableName("yx_wechat_live") +public class YxWechatLive implements Serializable { + + /** 直播间id */ + @TableId(type = IdType.INPUT) + private Long roomId; + + + /** 直播间标题 */ + @NotBlank + private String name; + + + /** 背景图 */ + @TableField(exist = false) + private String coverImg; + + + /** 分享图片 */ + @TableField(exist = false) + private String shareImg; + + /** 背景图 */ + @NotBlank + private String coverImge; + + + /** 分享图片 */ + @NotBlank + private String shareImge; + + /** 主播头像 */ + private String anchorImge; + + /** + * 101:直播中,102:未开始,103已结束,104禁播,105:暂停,106:异常,107:已过期 + */ + /** 直播间状态 */ + private Integer liveStatus; + + + /** 开始时间 */ + private Long startTime; + + + /** 预计结束时间 */ + private Long endTime; + + + /** 开始时间 */ + @NotNull + @TableField(exist = false) + private Date startDate; + + + /** 预计结束时间 */ + @NotNull + @TableField(exist = false) + private Date endDate; + /** 主播昵称 */ + @NotBlank + private String anchorName; + + + /** 主播微信号 */ + @NotBlank + private String anchorWechat; + + + /** 主播头像 */ + @TableField(exist = false) + private String anchorImg; + + + /** 直播间类型 1:推流 0:手机直播 */ + @NotNull + private Integer type; + + + /** 横屏、竖屏 【1:横屏,0:竖屏】 */ + @NotNull + private Integer screenType; + + + /** 是否关闭点赞 【0:开启,1:关闭】 */ + @NotNull + private Integer closeLike; + + + /** 是否关闭货架 【0:开启,1:关闭】 */ + @NotNull + private Integer closeGoods; + + /** 是否关闭评论 【0:开启,1:关闭】 */ + @NotNull + private Integer closeComment; + @NotNull + private Integer closeReplay ; // 是否关闭回放 1 关闭 + @NotNull + private Integer closeShare ; // 是否关闭分享 1 关闭 + @NotNull + private Integer closeKf ; // 是否关闭客服,1 关闭 + + private String productId; + + /** + * 购物直播封面图 ,建议尺寸800*800 + */ + @TableField(exist = false) + private String feedsImg; + + public void copy(YxWechatLive source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatLiveGoods.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatLiveGoods.java new file mode 100644 index 0000000000000000000000000000000000000000..ec910f31edb4055d850e6fcd08e7582ec600cd86 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatLiveGoods.java @@ -0,0 +1,85 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.domain; + +import cn.hutool.core.bean.BeanUtil; +import cn.hutool.core.bean.copier.CopyOptions; +import com.baomidou.mybatisplus.annotation.IdType; +import com.baomidou.mybatisplus.annotation.TableField; +import com.baomidou.mybatisplus.annotation.TableId; +import com.baomidou.mybatisplus.annotation.TableName; +import lombok.Data; + +import javax.validation.constraints.NotBlank; +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-08-11 +*/ +@Data +@TableName("yx_wechat_live_goods") +public class YxWechatLiveGoods implements Serializable { + + /** 直播商品id */ + @TableId(type = IdType.INPUT) + private Long goodsId; + + + /** 关联商品id */ + private Long productId; + + + /** 商品图片 */ + @TableField(exist = false) + private String coverImgUrl; + + + /** 商品图片 */ + @NotBlank + private String coverImgeUrl; + + /** 商品小程序路径 */ + @NotBlank + private String url; + + + /** 价格类型 1:一口价(只需要传入price,price2不传) 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传) 3:显示折扣价(price字段为原价,price2字段为现价, price和price2必传) */ + @NotBlank + private String priceType; + + + @NotBlank + private String price; + + + private String price2; + + + /** 商品名称 */ + @NotBlank + private String name; + + + /** 1, 2:表示是为api添加商品,否则是直播控制台添加的商品 */ + private String thirdPartyTag; + + + /** 审核单id */ + private Long auditId; + + + /** 审核状态 0:未审核,1:审核中,2:审核通过,3审核失败 */ + private Integer auditStatus; + + + public void copy(YxWechatLiveGoods source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatMenu.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatMenu.java index afe774b0064ad6943e960d05be3d6406317f3438..21404e27eb56fd9ef492e032bdf989e6eeba4f05 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatMenu.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatMenu.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.domain; @@ -17,9 +16,9 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data @TableName("yx_wechat_menu") public class YxWechatMenu implements Serializable { @@ -33,11 +32,11 @@ public class YxWechatMenu implements Serializable { /** 缓存时间 */ - @TableField(fill = FieldFill.INSERT) + @TableField(fill= FieldFill.INSERT) private Integer addTime; - public void copy(YxWechatMenu source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxWechatMenu source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatReply.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatReply.java index 848d9f2da5a28b0cd1b3e00894d3a52a3873465c..cf3719f95135c1f1c87ea37e7493e317053b24bd 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatReply.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatReply.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.domain; @@ -16,9 +15,9 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data @TableName("yx_wechat_reply") public class YxWechatReply implements Serializable { @@ -49,7 +48,7 @@ public class YxWechatReply implements Serializable { private Integer hide; - public void copy(YxWechatReply source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxWechatReply source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatTemplate.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatTemplate.java index 846b07da55f9c9166b09e8f1e34e46d7ad88f557..70668c00977f2fac676ca8589e738cca4ffe46e5 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatTemplate.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/domain/YxWechatTemplate.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.domain; @@ -12,12 +11,14 @@ import co.yixiang.domain.BaseDomain; import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableName; import lombok.Data; +import lombok.EqualsAndHashCode; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data +@EqualsAndHashCode(callSuper = true) @TableName("yx_wechat_template") public class YxWechatTemplate extends BaseDomain { @@ -42,11 +43,14 @@ public class YxWechatTemplate extends BaseDomain { private String tempid; + /** 状态 */ private Integer status; + /** 类型:template:模板消息 subscribe:订阅消息 */ + private String type; - public void copy(YxWechatTemplate source) { - BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true)); + public void copy(YxWechatTemplate source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/enums/WechatTempateEnum.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/enums/WechatTempateEnum.java new file mode 100644 index 0000000000000000000000000000000000000000..e478e63275302938a194211e91c77b6516f1d82e --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/enums/WechatTempateEnum.java @@ -0,0 +1,28 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.mp.enums; + +import lombok.AllArgsConstructor; +import lombok.Getter; + +/** + * @author hupeng + * 微信公众号模板枚举 + */ +@Getter +@AllArgsConstructor +public enum WechatTempateEnum { + PAY_SUCCESS("pay_success","支付成功通知"), + DELIVERY_SUCCESS("delivery_success","发货成功通知"), + REFUND_SUCCESS("refund_success","退款成功通知"), + RECHARGE_SUCCESS("recharge_success","充值成功通知"); + + private String value; //模板编号 + private String desc; //模板id +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/error/ErrorController.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/error/ErrorController.java index dfee0e50e2530cd796c35ce81c089281d30ab889..df1641512bee69394d81f4dba58ddc5f2ec68e48 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/error/ErrorController.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/error/ErrorController.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.error; @@ -20,14 +19,14 @@ import org.springframework.web.bind.annotation.RequestMapping; @RequestMapping("/error") public class ErrorController { - @GetMapping(value = "/404") - public String error404() { - return "error"; - } + @GetMapping(value = "/404") + public String error404() { + return "error"; + } - @GetMapping(value = "/500") - public String error500() { - return "error"; - } + @GetMapping(value = "/500") + public String error500() { + return "error"; + } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/error/ErrorPageConfiguration.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/error/ErrorPageConfiguration.java index 33b0c9e6d185f35e5abfce5415ba634547a05337..a505751e26a63bdfd36c3c8a9b7e522fdd739934 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/error/ErrorPageConfiguration.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/error/ErrorPageConfiguration.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.error; @@ -19,12 +18,12 @@ import org.springframework.stereotype.Component; */ @Component public class ErrorPageConfiguration implements ErrorPageRegistrar { - @Override - public void registerErrorPages(ErrorPageRegistry errorPageRegistry) { - errorPageRegistry.addErrorPages( - new ErrorPage(HttpStatus.NOT_FOUND, "/error/404"), - new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/error/500") - ); - } + @Override + public void registerErrorPages(ErrorPageRegistry errorPageRegistry) { + errorPageRegistry.addErrorPages( + new ErrorPage(HttpStatus.NOT_FOUND, "/error/404"), + new ErrorPage(HttpStatus.INTERNAL_SERVER_ERROR, "/error/500") + ); + } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/AbstractHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/AbstractHandler.java index d63fb8de68e6750b71ef14c1b1a46b47ef5abef7..2da1f460cb951cab31976bb272fd8489b3799a27 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/AbstractHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/AbstractHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/KfSessionHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/KfSessionHandler.java index 1744a4a48d400c02a1463df3e7144f808a50ef31..53324504ad8045728b7eb2a183d1a7844c04183c 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/KfSessionHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/KfSessionHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/LocationHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/LocationHandler.java index 4a4c1c5d4e3cfde6869a60f6c06c5d02f4682396..a9e5f248af74e64f6e7f614b51bde3e0ee5a47c8 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/LocationHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/LocationHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; @@ -38,7 +37,7 @@ public class LocationHandler extends AbstractHandler { //上报地理位置事件 this.logger.info("上报地理位置,纬度 : {},经度 : {},精度 : {}", - wxMessage.getLatitude(), wxMessage.getLongitude(), String.valueOf(wxMessage.getPrecision())); + wxMessage.getLatitude(), wxMessage.getLongitude(), String.valueOf(wxMessage.getPrecision())); //TODO 可以将用户地理位置信息保存到本地数据库,以便以后使用 diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/LogHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/LogHandler.java index 9453fc02288af9cab942de70daa4e2141eb6482f..52da0072448ae78616bf330200ddd15f6e6171f7 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/LogHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/LogHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/MenuHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/MenuHandler.java index c4b81c5a3c5e82e45ed3bf0583d813de4a9b9055..3bbe8479025c25b9acecc68b22615b01b4c53d40 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/MenuHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/MenuHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; @@ -26,15 +25,15 @@ public class MenuHandler extends AbstractHandler { WxSessionManager sessionManager) { String msg = String.format("type:%s, event:%s, key:%s", - wxMessage.getMsgType(), wxMessage.getEvent(), - wxMessage.getEventKey()); + wxMessage.getMsgType(), wxMessage.getEvent(), + wxMessage.getEventKey()); if (MenuButtonType.VIEW.equals(wxMessage.getEvent())) { return null; } return WxMpXmlOutMessage.TEXT().content(msg) - .fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser()) - .build(); + .fromUser(wxMessage.getToUser()).toUser(wxMessage.getFromUser()) + .build(); } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/MsgHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/MsgHandler.java index 33e5e53a33b350e07b241b8014f93fcf8ac31f32..328a18fa61a01b1bfee0e9e8ae89dd3f79b63afe 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/MsgHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/MsgHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; @@ -34,11 +33,11 @@ public class MsgHandler extends AbstractHandler { //当用户输入关键词如“你好”,“客服”等,并且有客服在线时,把消息转发给在线客服 try { if (StringUtils.startsWithAny(wxMessage.getContent(), "你好", "客服") - && weixinService.getKefuService().kfOnlineList() - .getKfOnlineList().size() > 0) { + && weixinService.getKefuService().kfOnlineList() + .getKfOnlineList().size() > 0) { return WxMpXmlOutMessage.TRANSFER_CUSTOMER_SERVICE() - .fromUser(wxMessage.getToUser()) - .toUser(wxMessage.getFromUser()).build(); + .fromUser(wxMessage.getToUser()) + .toUser(wxMessage.getFromUser()).build(); } } catch (WxErrorException e) { e.printStackTrace(); diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/NullHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/NullHandler.java index dcc97e3836b3955d719b7a7c6613221c20989ec5..f2132fef7d0340aad2d2a6d4bd529c62ea7a2afe 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/NullHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/NullHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/RedisHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/RedisHandler.java index 54e9df886d428cb78dcca01a9515f301236dd4b3..738840d68eac4e474def1716071453f504b117fa 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/RedisHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/RedisHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; @@ -13,7 +12,7 @@ import org.springframework.stereotype.Component; @Component -public class RedisHandler { +public class RedisHandler{ @Autowired RedisTemplate redisTemplate; @@ -23,7 +22,7 @@ public class RedisHandler { try { String value = redisTemplate.opsForValue().get(key).toString(); return value; - } catch (Exception e) { + }catch (Exception e){ return ""; } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/ScanHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/ScanHandler.java index b03b499171139aae81ae7dec2813dcb537e03464..d074c1e8dd822134ae14d95d673a41e594438cca 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/ScanHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/ScanHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/StoreCheckNotifyHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/StoreCheckNotifyHandler.java index aec8dedbf5c8b32863633194212519ccd9bead00..c7f1297fd31772327546c03a4da16fd54a0fdf13 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/StoreCheckNotifyHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/StoreCheckNotifyHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/SubscribeHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/SubscribeHandler.java index c4bab512ce6480620c234bafbaea7ca56f81b24e..370542094e769728498a05cec84b90bfde74014e 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/SubscribeHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/SubscribeHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; @@ -35,12 +34,12 @@ public class SubscribeHandler extends AbstractHandler { String str = "你好,欢迎关注yshop!"; YxWechatReply wechatReply = yxWechatReplyService.isExist("subscribe"); - if (!ObjectUtil.isNull(wechatReply)) { + if(!ObjectUtil.isNull(wechatReply)){ str = JSONObject.parseObject(wechatReply.getData()).getString("content"); } try { - WxMpXmlOutMessage msg = WxMpXmlOutMessage.TEXT() + WxMpXmlOutMessage msg= WxMpXmlOutMessage.TEXT() .content(str) .fromUser(wxMessage.getToUser()) .toUser(wxMessage.getFromUser()) @@ -51,8 +50,10 @@ public class SubscribeHandler extends AbstractHandler { } + return null; } + } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/UnsubscribeHandler.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/UnsubscribeHandler.java index 942033f76b9929b397eaa8f598b3457839b06580..53c2c910b27bf1ce6952f0d80385221f3b208b00 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/UnsubscribeHandler.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/handler/UnsubscribeHandler.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.handler; diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/listener/TemplateListener.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/listener/TemplateListener.java new file mode 100644 index 0000000000000000000000000000000000000000..1edc6570eb312e3075c72496d6f88332e412221f --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/listener/TemplateListener.java @@ -0,0 +1,186 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.mp.listener; + + +import cn.hutool.core.util.NumberUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.constant.ShopConstants; +import co.yixiang.enums.BillDetailEnum; +import co.yixiang.enums.PayTypeEnum; +import co.yixiang.event.TemplateBean; +import co.yixiang.event.TemplateEvent; +import co.yixiang.event.TemplateListenEnum; +import co.yixiang.modules.activity.domain.YxUserExtract; +import co.yixiang.modules.activity.service.YxUserExtractService; +import co.yixiang.modules.customer.domain.YxStoreCustomer; +import co.yixiang.modules.customer.service.YxStoreCustomerService; +import co.yixiang.modules.mp.service.WeiXinSubscribeService; +import co.yixiang.modules.mp.service.WeixinPayService; +import co.yixiang.modules.mp.service.WeixinTemplateService; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.service.YxUserBillService; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.modules.user.service.dto.WechatUserDto; +import com.github.binarywang.wxpay.exception.WxPayException; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.context.ApplicationEvent; +import org.springframework.context.event.SmartApplicationListener; +import org.springframework.scheduling.annotation.Async; +import org.springframework.stereotype.Component; + +import java.math.BigDecimal; +import java.util.Date; +import java.util.List; +import java.util.UUID; + +/** + * @author hupeng + * 异步监听模板通知事件 + */ +@Slf4j +@Component +public class TemplateListener implements SmartApplicationListener { + @Autowired + private YxUserService userService; + @Autowired + private WeixinTemplateService weixinTemplateService; + @Autowired + private WeixinPayService weixinPayService; + @Autowired + private WeiXinSubscribeService weiXinSubscribeService; + @Autowired + private YxUserExtractService yxUserExtractService; + @Autowired + private WeixinPayService payService; + @Autowired + private YxUserBillService billService; + @Autowired + private YxStoreCustomerService yxStoreCustomerService; + //@Autowired + //private MqProducer mqProducer; + + @Override + public boolean supportsEventType(Class aClass) { + return aClass == TemplateEvent.class; + } + + @Async + @Override + public void onApplicationEvent(ApplicationEvent applicationEvent) { + //转换事件类型 + TemplateEvent templateEvent = (TemplateEvent) applicationEvent; + //获取注册用户对象信息 + TemplateBean templateBean = templateEvent.getTemplateBean(); + log.info("模板事件类型:{}", templateBean.getTemplateType()); + switch (TemplateListenEnum.toType(templateBean.getTemplateType())) { + case TYPE_1: + weixinTemplateService.paySuccessNotice(templateBean.getOrderId() + , templateBean.getPrice(), templateBean.getUid()); + weiXinSubscribeService.paySuccessNotice(templateBean.getOrderId() + , templateBean.getPrice(), templateBean.getUid()); + /**************给客服发送消息**************/ + try { + List yxStoreCustomers = yxStoreCustomerService.lambdaQuery().eq(YxStoreCustomer::getIsEnable, ShopConstants.YSHOP_ONE_NUM).list(); + yxStoreCustomers.forEach(msg -> { + if (StrUtil.isNotBlank(msg.getOpenId())) { + weixinTemplateService.paySuccessNoticeToKefu(templateBean.getOrderId() + , templateBean.getPrice(), msg.getOpenId()); + } + }); + } catch (Exception e) { + log.error("消息发送失败:{}", e); + } + break; + case TYPE_2: + //处理退款与消息 + if (PayTypeEnum.WEIXIN.getValue().equals(templateBean.getPayType())) { + BigDecimal bigDecimal = new BigDecimal("100"); + int payPrice = bigDecimal.multiply(new BigDecimal(templateBean.getPrice())).intValue(); + weixinPayService.refundOrder(templateBean.getOrderId(), payPrice); + } + + weixinTemplateService.refundSuccessNotice("您的订单退款申请被通过,钱款将很快还至您的支付账户。",templateBean.getOrderId(), templateBean.getPrice(), + templateBean.getUid(), templateBean.getTime()); + break; + case TYPE_3: + weixinTemplateService.deliverySuccessNotice(templateBean.getOrderId(), templateBean.getDeliveryName(), + templateBean.getDeliveryId(), templateBean.getUid()); + break; + case TYPE_4: + weixinTemplateService.rechargeSuccessNotice(templateBean.getTime(), templateBean.getPrice(), + templateBean.getUid()); + break; + case TYPE_7: + //使用MQ延时消息 + //mqProducer.sendMsg("yshop-topic", templateBean.getOrderId()); + log.info("投递延时订单id: [{}]:", templateBean.getOrderId()); + break; + case TYPE_8: + YxUserExtract resources = yxUserExtractService.getById(templateBean.getExtractId()); + Boolean success = false; + YxUser user = userService.getById(resources.getUid()); + if (user != null) { + WechatUserDto wechatUser = user.getWxProfile(); + if (ObjectUtil.isNotNull(wechatUser) && ObjectUtil.isNotNull(wechatUser.getRoutineOpenid())) { + try { + String nonce_str = UUID.randomUUID().toString().replace("-", ""); + payService.entPay(wechatUser.getRoutineOpenid(), nonce_str, + resources.getRealName(), + resources.getExtractPrice().multiply(new BigDecimal(100)).intValue()); + success = true; + } catch (WxPayException e) { + log.error("退款失败,原因:{}", e.getMessage()); + } + } + } + if (!success) { + //防止无限添加佣金 + if (ObjectUtil.isNull(resources.getFailTime())) { + String mark = "提现失败,退回佣金" + resources.getExtractPrice() + "元"; + double balance = NumberUtil.add(user.getBrokeragePrice(), resources.getExtractPrice()).doubleValue(); + //插入流水 + billService.income(resources.getUid(), "提现失败", BillDetailEnum.CATEGORY_1.getValue(), + BillDetailEnum.TYPE_4.getValue(), resources.getExtractPrice().doubleValue(), balance, + mark, resources.getId().toString()); + //返回提现金额 + userService.incBrokeragePrice(resources.getExtractPrice(), resources.getUid()); + resources.setFailMsg("提现失败"); + resources.setFailTime(new Date()); + } + yxUserExtractService.updateById(resources); + } + + + break; + case TYPE_9: + weixinTemplateService.refundSuccessNotice("您的订单退款申请已提交,等待审核。",templateBean.getOrderId(), templateBean.getPrice(), + templateBean.getUid(), templateBean.getTime()); + /**************给客服发送消息**************/ + try { + List yxStoreCustomers = yxStoreCustomerService.lambdaQuery().eq(YxStoreCustomer::getIsEnable, ShopConstants.YSHOP_ONE_NUM).list(); + yxStoreCustomers.forEach(msg -> { + if (StrUtil.isNotBlank(msg.getOpenId())) { + weixinTemplateService.refundSuccessNoticeToKefu("尊敬的客服,您有新的退款申请待处理!",templateBean.getOrderId() + , templateBean.getPrice(), msg.getOpenId(), templateBean.getTime()); + } + }); + } catch (Exception e) { + log.error("消息发送失败:{}", e); + } + break; + default: + //todo + } + + + } +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WeiXinSubscribeService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WeiXinSubscribeService.java new file mode 100644 index 0000000000000000000000000000000000000000..748db1ad0c8c77dd8bbb483b5387f98b0a8cd17d --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WeiXinSubscribeService.java @@ -0,0 +1,206 @@ +package co.yixiang.modules.mp.service; + +import cn.binarywang.wx.miniapp.api.WxMaService; +import cn.binarywang.wx.miniapp.bean.WxMaSubscribeMessage; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; +import co.yixiang.constant.ShopConstants; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.mp.domain.YxWechatTemplate; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.modules.user.service.dto.WechatUserDto; +import co.yixiang.modules.mp.enums.WechatTempateEnum; +import co.yixiang.modules.mp.config.WxMaConfiguration; +import me.chanjar.weixin.common.error.WxErrorException; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.text.SimpleDateFormat; +import java.util.Date; +import java.util.HashMap; +import java.util.Map; + +/** + * 小程序订阅消息通知 + */ +@Service +public class WeiXinSubscribeService { + + @Autowired + private YxUserService userService; + @Autowired + private YxWechatTemplateService yxWechatTemplateService; + /** + * 充值成功通知 + * @param time 时间 + * @param price 金额 + * @param uid uid + */ + public void rechargeSuccessNotice(String time,String price,Long uid){ + String openid = this.getUserOpenid(uid); + + if(StrUtil.isBlank(openid)) { + return; + } + + Map map = new HashMap<>(); + map.put("first","您的账户金币发生变动,详情如下:"); + map.put("keyword1","充值"); + map.put("keyword2",time); + map.put("keyword3",price); + map.put("remark", ShopConstants.YSHOP_WECHAT_PUSH_REMARK); + String tempId = this.getTempId(WechatTempateEnum.RECHARGE_SUCCESS.getValue()); + if(StrUtil.isNotBlank(tempId)) { + this.sendSubscribeMsg( openid, tempId, "/user/account",map); + } + } + + + /** + * 支付成功通知 + * @param orderId 订单号 + * @param price 金额 + * @param uid uid + */ + public void paySuccessNotice(String orderId,String price,Long uid){ + + String openid = this.getUserOpenid(uid); + if(StrUtil.isBlank(openid)) { + return; + } + SimpleDateFormat simpleDateFormat = new SimpleDateFormat("yyyy年MM月dd日 HH:mm:ss"); + Map map = new HashMap<>(); + map.put("amount1",price); + map.put("date2", simpleDateFormat.format(new Date())); + map.put("character_string3",orderId); + map.put("time4",simpleDateFormat.format(new Date())); + map.put("thing5","yshop购买商品"); + String tempId = this.getTempId(WechatTempateEnum.PAY_SUCCESS.getValue()); + if(StrUtil.isNotBlank(tempId)) { + this.sendSubscribeMsg( openid,tempId, "/order/detail/"+orderId,map); + } + } + + /** + * 退款成功通知 + * @param orderId 订单号 + * @param price 金额 + * @param uid uid + * @param time 时间 + */ + public void refundSuccessNotice(String orderId,String price,Long uid,String time){ + + String openid = this.getUserOpenid(uid); + + if(StrUtil.isBlank(openid)) { + return; + } + + Map map = new HashMap<>(); + map.put("first","您的订单退款申请被通过,钱款将很快还至您的支付账户。"); + //订单号 + map.put("keyword1",orderId); + map.put("keyword2",price); + map.put("keyword3", time); + map.put("remark",ShopConstants.YSHOP_WECHAT_PUSH_REMARK); + String tempId = this.getTempId(WechatTempateEnum.REFUND_SUCCESS.getValue()); + if(StrUtil.isNotBlank(tempId)) { + this.sendSubscribeMsg( openid,tempId, "/order/detail/"+orderId,map); + } + } + + /** + * 发货成功通知 + * @param orderId 单号 + * @param deliveryName 快递公司 + * @param deliveryId 快递单号 + * @param uid uid + */ + public void deliverySuccessNotice(String orderId,String deliveryName, + String deliveryId,Long uid){ + + String openid = this.getUserOpenid(uid); + + if(StrUtil.isEmpty(openid)) { + return; + } + + Map map = new HashMap<>(); + map.put("first","亲,宝贝已经启程了,好想快点来到你身边。"); + map.put("keyword2",deliveryName); + map.put("keyword1",orderId); + map.put("keyword3",deliveryId); + map.put("remark",ShopConstants.YSHOP_WECHAT_PUSH_REMARK); + String tempId = this.getTempId(WechatTempateEnum.DELIVERY_SUCCESS.getValue()); + if(StrUtil.isNotBlank(tempId)) { + this.sendSubscribeMsg( openid,tempId, "/order/detail/"+orderId,map); + } + } + + + /** + * 构建小程序一次性订阅消息 + * @param openId 单号 + * @param templateId 模板id + * @param page 跳转页面 + * @param map map内容 + * @return String + */ + private void sendSubscribeMsg(String openId, String templateId, String page, Map map){ + WxMaSubscribeMessage wxMaSubscribeMessage = WxMaSubscribeMessage.builder() + .toUser(openId) + .templateId(templateId) + .page(page) + .build(); + map.forEach( (k,v)-> { wxMaSubscribeMessage.addData(new WxMaSubscribeMessage.MsgData(k, v));} ); + WxMaService wxMaService = WxMaConfiguration.getWxMaService(); + try { + wxMaService.getMsgService().sendSubscribeMsg(wxMaSubscribeMessage); + } catch (WxErrorException e) { + e.printStackTrace(); + } + } + + /** + * 获取模板消息id + * @param key 模板key + * @return string + */ + private String getTempId(String key){ + YxWechatTemplate yxWechatTemplate = yxWechatTemplateService.lambdaQuery() + .eq(YxWechatTemplate::getType,"subscribe") + .eq(YxWechatTemplate::getTempkey,key) + .one(); + if (yxWechatTemplate == null) { + throw new YshopException("请后台配置key:" + key + "订阅消息id"); + } + if(ShopCommonEnum.IS_STATUS_0.getValue().equals(yxWechatTemplate.getStatus())){ + return ""; + } + return yxWechatTemplate.getTempid(); + } + + + /** + * 获取openid + * @param uid uid + * @return String + */ + private String getUserOpenid(Long uid){ + YxUser yxUser = userService.getById(uid); + if(yxUser == null) { + return ""; + } + + WechatUserDto wechatUserDto = yxUser.getWxProfile(); + if(wechatUserDto == null) { + return ""; + } + if(StrUtil.isBlank(wechatUserDto.getRoutineOpenid())) { + return ""; + } + return wechatUserDto.getRoutineOpenid(); + + } +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WeixinPayService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WeixinPayService.java new file mode 100644 index 0000000000000000000000000000000000000000..3706ec2dbf67878aae6b73676720fb8ff2350b74 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WeixinPayService.java @@ -0,0 +1,276 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.mp.service; + +import cn.hutool.core.lang.UUID; +import cn.hutool.core.util.IdUtil; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.BusinessException; +import co.yixiang.api.YshopException; +import co.yixiang.enums.AppFromEnum; +import co.yixiang.enums.BillDetailEnum; +import co.yixiang.enums.OrderInfoEnum; +import co.yixiang.enums.PayMethodEnum; +import co.yixiang.enums.PayTypeEnum; +import co.yixiang.modules.mp.config.WxPayConfiguration; +import co.yixiang.modules.order.service.YxStoreOrderService; +import co.yixiang.modules.order.vo.YxStoreOrderQueryVo; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.domain.YxUserRecharge; +import co.yixiang.modules.user.service.YxUserRechargeService; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.modules.user.service.dto.WechatUserDto; +import co.yixiang.utils.RedisUtils; +import co.yixiang.utils.RequestHolder; +import co.yixiang.utils.ShopKeyUtils; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.github.binarywang.wxpay.bean.entpay.EntPayRequest; +import com.github.binarywang.wxpay.bean.marketing.transfer.PartnerTransferRequest; +import com.github.binarywang.wxpay.bean.request.WxPayRefundRequest; +import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; +import com.github.binarywang.wxpay.exception.WxPayException; +import com.github.binarywang.wxpay.service.WxPayService; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.math.BigDecimal; +import java.util.ArrayList; +import java.util.List; + +/** + * @ClassName 微信支付WeixinPayService + * @Author hupeng <610796224@qq.com> + * @Date 2020/6/27 + **/ +@Service +@Slf4j +public class WeixinPayService { + + @Autowired + private RedisUtils redisUtils; + + @Autowired + private YxUserService userService; + @Autowired + private YxStoreOrderService storeOrderService; + @Autowired + private YxUserRechargeService userRechargeService; + + + /** + * 统一支付入口 + * @param orderId 单号 + * @param from 来源 + * @param attach 备注 普通支付还是充值 + * @param body 内容 + * @return Object + */ + public Object unifyPay(String orderId, String from, String attach, String body) { + long uid = 0; + int payPrice = 0; + BigDecimal bigDecimal = new BigDecimal(100); + //普通支付 + if(BillDetailEnum.TYPE_3.getValue().equals(attach)){ + YxStoreOrderQueryVo orderInfo = storeOrderService.getOrderInfo(orderId,null); + if(ObjectUtil.isNull(orderInfo)) { + throw new YshopException("订单不存在"); + } + if(orderInfo.getPaid().equals(OrderInfoEnum.PAY_STATUS_1.getValue())) { + throw new YshopException("该订单已支付"); + } + + if(orderInfo.getPayPrice().compareTo(BigDecimal.ZERO) <= 0) { + throw new YshopException("该支付无需支付"); + } + + uid = orderInfo.getUid().intValue(); + //计算分 + payPrice = bigDecimal.multiply(orderInfo.getPayPrice()).intValue(); + }else{ //充值 + YxUserRecharge userRecharge = userRechargeService.getOne(Wrappers.lambdaQuery() + .eq(YxUserRecharge::getOrderId,orderId)); + if(userRecharge == null) { + throw new BusinessException("充值订单不存在"); + } + + if(userRecharge.getPaid().equals(OrderInfoEnum.PAY_STATUS_1.getValue())) { + throw new YshopException("该订单已支付"); + } + uid = userRecharge.getUid(); + payPrice = bigDecimal.multiply(userRecharge.getPrice()).intValue(); + } + + + YxUser yxUser = userService.getById(uid); + if(yxUser == null) { + throw new YshopException("用户错误"); + } + + + WechatUserDto wechatUserDto = yxUser.getWxProfile(); + + WxPayService wxPayService = null; + if(AppFromEnum.ROUNTINE.getValue().equals(from)){ + wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WXAPP); + }else if(AppFromEnum.APP.getValue().equals(from) || AppFromEnum.PC.getValue().equals(from)){ + wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.APP); + }else{ + wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WECHAT); + } + WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest(); + orderRequest.setOutTradeNo(orderId); + orderRequest.setTotalFee(payPrice); + orderRequest.setSpbillCreateIp(RequestHolder.getClientIP()); + orderRequest.setNotifyUrl(this.getApiUrl() + "/api/wechat/notify"); + orderRequest.setBody(body); + orderRequest.setAttach(attach); + + if(AppFromEnum.WEIXIN_H5.getValue().equals(from)){ + orderRequest.setTradeType("MWEB"); + }else if(AppFromEnum.APP.getValue().equals(from)){ + orderRequest.setTradeType("APP"); + }else if(AppFromEnum.PC.getValue().equals(from)){ + orderRequest.setTradeType("NATIVE"); + orderRequest.setProductId( UUID.fastUUID().toString()); + } else{ + orderRequest.setTradeType("JSAPI"); + if(AppFromEnum.ROUNTINE.getValue().equals(from)){ + orderRequest.setOpenid(wechatUserDto.getRoutineOpenid()); + }else { + orderRequest.setOpenid(wechatUserDto.getOpenid()); + } + } + try { + return wxPayService.createOrder(orderRequest); + }catch (WxPayException e) { + log.info("支付错误信息:{}",e.getMessage()); + throw new BusinessException(e.getMessage()); + } + + + } + + + + + /** + * 退款 + * @param orderId orderId + * @param refundFee totalFee 单位分 + */ + public void refundOrder(String orderId, Integer refundFee) { + + YxStoreOrderQueryVo orderInfo = storeOrderService.getOrderInfo(orderId,null); + if(PayTypeEnum.YUE.getValue().equals(orderInfo.getPayType())) { + return; + } + if(orderInfo.getExtendOrderId()!=null){ + orderId=orderInfo.getExtendOrderId(); + } + WxPayService wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WECHAT); + if (StrUtil.isEmpty(wxPayService.getConfig().getAppId())) { + wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WXAPP); + } + WxPayRefundRequest wxPayRefundRequest = new WxPayRefundRequest(); + BigDecimal bigDecimal = new BigDecimal("100"); + int totalFee = bigDecimal.multiply(orderInfo.getPayPrice()).intValue(); + //订单总金额 + wxPayRefundRequest.setTotalFee(totalFee); + wxPayRefundRequest.setOutTradeNo(orderId); + //生成退款单号 + String orderSn = IdUtil.getSnowflake(0,0).nextIdStr(); + wxPayRefundRequest.setOutRefundNo(orderSn); + //退款金额 + wxPayRefundRequest.setRefundFee(refundFee); + wxPayRefundRequest.setNotifyUrl(this.getApiUrl() + "/api/notify/refund"); + try { + wxPayService.refundV2(wxPayRefundRequest); + } catch (WxPayException e) { + log.info("退款错误信息:{}",e.getMessage()); + throw new BusinessException(e.getMessage()); + } + } + + + /** + * 企业打款 + * @param openid 微信openid + * @param no 单号 + * @param userName 用户姓名 + * @param amount 金额 + * @throws WxPayException + */ + public void entPay(String openid,String no,String userName,Integer amount) throws WxPayException { + WxPayService wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WECHAT); + EntPayRequest entPayRequest = new EntPayRequest(); + + entPayRequest.setOpenid(openid); + entPayRequest.setPartnerTradeNo(no); + entPayRequest.setCheckName("FORCE_CHECK"); + entPayRequest.setReUserName(userName); + entPayRequest.setAmount(amount); + entPayRequest.setDescription("提现"); + entPayRequest.setSpbillCreateIp(RequestHolder.getClientIP()); + wxPayService.getEntPayService().entPay(entPayRequest); + + } + + /** + * 企业打款v3 https://pay.weixin.qq.com/wiki/doc/apiv3_partner/Offline/apis/chapter4_3_1.shtml + * todo 需要使用v3证书,需要把WxPayService类里面的getPayService 里面的v3参数赋值到payConfig里面去 + * todo 未测试 自行对接具体的接口测试,去看上面具体的微信文档 + * todo 这个方法只是一个demo,需要自行去对接。因为之前老用户用老的方法提现是可以的,现在微信修改了 + * todo 需要自行对接 + * @param openid 微信openid + * @param no 单号 + * @param userName 用户姓名 + * @param amount 金额 + * @throws WxPayException + */ + public void entPayV3(String subMchid,String openid,String no,String userName,Integer amount) throws WxPayException { + WxPayService wxPayService = WxPayConfiguration.getPayService(PayMethodEnum.WECHAT); + PartnerTransferRequest partnerTransferRequest = new PartnerTransferRequest(); + partnerTransferRequest.setSubMchid(subMchid); + // todo 根据文档自行修改 + partnerTransferRequest.setAuthorizationType("INFORMATION_AUTHORIZATION_TYPE"); + partnerTransferRequest.setOutBatchNo(no); + partnerTransferRequest.setBatchName("提现"); + partnerTransferRequest.setBatchRemark("提现"); + partnerTransferRequest.setTotalAmount(amount); + partnerTransferRequest.setTotalNum(1); + + List transferDetailList = new ArrayList<>(); + PartnerTransferRequest.TransferDetail transferDetail = new PartnerTransferRequest.TransferDetail(); + transferDetail.setOpenid(openid); + transferDetail.setUserName(userName); + transferDetail.setOutDetailNo(no); + transferDetail.setTransferAmount(amount); + transferDetail.setTransferRemark("提现"); + partnerTransferRequest.setTransferDetailList(transferDetailList); + wxPayService.getPartnerTransferService().batchTransfer(partnerTransferRequest); + + } + + + /** + * 返回H5 url + * @return url + */ + private String getApiUrl(){ + String apiUrl = redisUtils.getY(ShopKeyUtils.getApiUrl()); + if(StrUtil.isBlank(apiUrl)){ + throw new YshopException("请配置移动端api地址"); + } + return apiUrl; + } + + +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WeixinTemplateService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WeixinTemplateService.java new file mode 100644 index 0000000000000000000000000000000000000000..59699c96e0765631b2092a890ef7b4e09e0af9d0 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WeixinTemplateService.java @@ -0,0 +1,330 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.mp.service; + +import cn.hutool.core.util.StrUtil; +import co.yixiang.api.YshopException; +import co.yixiang.constant.ShopConstants; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.modules.mp.config.WxMpConfiguration; +import co.yixiang.modules.mp.domain.YxWechatTemplate; +import co.yixiang.modules.user.domain.YxUser; +import co.yixiang.modules.user.service.YxUserService; +import co.yixiang.modules.user.service.dto.WechatUserDto; +import co.yixiang.modules.mp.enums.WechatTempateEnum; +import co.yixiang.utils.RedisUtil; +import co.yixiang.utils.RedisUtils; +import co.yixiang.utils.ShopKeyUtils; +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.template.WxMpTemplateData; +import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.stereotype.Service; + +import java.util.HashMap; +import java.util.Map; + +/** + * @ClassName 微信公众号模板通知 + * @Author hupeng <610796224@qq.com> + * @Date 2020/6/27 + **/ +@Slf4j +@Service +public class WeixinTemplateService { + + @Autowired + private RedisUtils redisUtils; + + @Autowired + private YxUserService userService; + @Autowired + private YxWechatTemplateService yxWechatTemplateService; + + + + + /** + * 充值成功通知 + * @param time 时间 + * @param price 金额 + * @param uid uid + */ + public void rechargeSuccessNotice(String time,String price,Long uid){ + String openid = this.getUserOpenid(uid); + + if(StrUtil.isBlank(openid)) { + return; + } + + Map map = new HashMap<>(); + map.put("first","您的账户金币发生变动,详情如下:"); + map.put("keyword1","充值"); + map.put("keyword2",time); + map.put("keyword3",price); + map.put("remark", ShopConstants.YSHOP_WECHAT_PUSH_REMARK); + String tempId = this.getTempId(WechatTempateEnum.RECHARGE_SUCCESS.getValue()); + if(StrUtil.isNotBlank(tempId)) { + this.sendWxMpTemplateMessage( openid, tempId, this.getSiteUrl()+"/user/account",map); + } + } + + + /** + * 支付成功通知 + * @param orderId 订单号 + * @param price 金额 + * @param uid uid + */ + public void paySuccessNotice(String orderId,String price,Long uid){ + + String openid = this.getUserOpenid(uid); + + if(StrUtil.isBlank(openid)) { + return; + } + + Map map = new HashMap<>(); + map.put("first","您的订单已支付成功,我们会尽快为您发货。"); + //订单号 + map.put("keyword1",orderId); + map.put("keyword2",price); + map.put("remark",ShopConstants.YSHOP_WECHAT_PUSH_REMARK); + String tempId = this.getTempId(WechatTempateEnum.PAY_SUCCESS.getValue()); + if(StrUtil.isNotBlank(tempId)) { + this.sendWxMpTemplateMessage( openid,tempId, this.getSiteUrl()+"/order/detail/"+orderId,map); + } + } + + + /** + * 支付成功通知给客服 + * + * @param orderId + * @param price + * @param openId + */ + public void paySuccessNoticeToKefu(String orderId,String price,String openId) { + Map map = new HashMap<>(); + map.put("first", "尊敬的客服,您有新订单了"); + map.put("keyword1",orderId); + map.put("keyword2",price); + map.put("remark",ShopConstants.YSHOP_WECHAT_PUSH_REMARK); + String tempId = this.getTempId(WechatTempateEnum.PAY_SUCCESS.getValue()); + String appId=RedisUtil.get(ShopKeyUtils.getWxAppAppId()); + if(StrUtil.isNotBlank(tempId)) { + if(StrUtil.isBlank(appId)){ + this.sendWxMpTemplateMessage( openId,tempId, this.getSiteUrl()+"/order/detail/"+orderId,map); + }else{ + WxMpTemplateMessage.MiniProgram miniProgram = new WxMpTemplateMessage.MiniProgram(); + miniProgram.setAppid(RedisUtil.get(ShopKeyUtils.getWxAppAppId())); + miniProgram.setPagePath("pages/orderAdmin/AdminOrder/index?oid=" + orderId); + this.sendWxMpTemplateMessageToWx(openId, tempId, miniProgram, map); + } + } + + + + } + + + /** + * 退款成功通知 + * @param orderId 订单号 + * @param price 金额 + * @param uid uid + * @param time 时间 + */ + public void refundSuccessNotice(String title,String orderId,String price,Long uid,String time){ + + String openid = this.getUserOpenid(uid); + + if(StrUtil.isBlank(openid)) { + return; + } + + Map map = new HashMap<>(); + map.put("first",title); + //订单号 + map.put("keyword1",orderId); + map.put("keyword2",price); + map.put("keyword3", time); + map.put("remark",ShopConstants.YSHOP_WECHAT_PUSH_REMARK); + String tempId = this.getTempId(WechatTempateEnum.REFUND_SUCCESS.getValue()); + if(StrUtil.isNotBlank(tempId)) { + this.sendWxMpTemplateMessage( openid,tempId, this.getSiteUrl()+"/order/detail/"+orderId,map); + } + } + + /** + * 发送退款申请给客服 + * @param orderId 订单号 + * @param price 金额 + * @param openId openId + * @param time 时间 + */ + public void refundSuccessNoticeToKefu(String title,String orderId,String price,String openId,String time){ + + Map map = new HashMap<>(); + map.put("first",title); + //订单号 + map.put("keyword1",orderId); + map.put("keyword2",price); + map.put("keyword3", time); + map.put("remark",ShopConstants.YSHOP_WECHAT_PUSH_REMARK); + String tempId = this.getTempId(WechatTempateEnum.REFUND_SUCCESS.getValue()); + String appId=RedisUtil.get(ShopKeyUtils.getWxAppAppId()); + if(StrUtil.isNotBlank(tempId)) { + if(StrUtil.isBlank(appId)){ + this.sendWxMpTemplateMessage( openId,tempId, this.getSiteUrl()+"/order/detail/"+orderId,map); + }else{ + WxMpTemplateMessage.MiniProgram miniProgram = new WxMpTemplateMessage.MiniProgram(); + miniProgram.setAppid(RedisUtil.get(ShopKeyUtils.getWxAppAppId())); + miniProgram.setPagePath("pages/orderAdmin/AdminOrder/index?oid=" + orderId); + this.sendWxMpTemplateMessageToWx(openId, tempId, miniProgram, map); + } + } + } + + /** + * 发货成功通知 + * @param orderId 单号 + * @param deliveryName 快递公司 + * @param deliveryId 快递单号 + * @param uid uid + */ + public void deliverySuccessNotice(String orderId,String deliveryName, + String deliveryId,Long uid){ + + String openid = this.getUserOpenid(uid); + + if(StrUtil.isEmpty(openid)) { + return; + } + + Map map = new HashMap<>(); + map.put("first","亲,宝贝已经启程了,好想快点来到你身边。"); + map.put("keyword2",deliveryName); + map.put("keyword1",orderId); + map.put("keyword3",deliveryId); + map.put("remark",ShopConstants.YSHOP_WECHAT_PUSH_REMARK); + String tempId = this.getTempId(WechatTempateEnum.DELIVERY_SUCCESS.getValue()); + if(StrUtil.isNotBlank(tempId)) { + this.sendWxMpTemplateMessage( openid,tempId, this.getSiteUrl()+"/order/detail/"+orderId,map); + } + } + + + /** + * 构建微信模板通知 + * @param openId 单号 + * @param templateId 模板id + * @param url 跳转url + * @param map map内容 + * @return String + */ + private String sendWxMpTemplateMessage(String openId, String templateId, String url, Map map){ + WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder() + .toUser(openId) + .templateId(templateId) + .url(url) + .build(); + map.forEach( (k,v)-> { templateMessage.addData(new WxMpTemplateData(k, v, "#000000"));} ); + String msgId = null; + WxMpService wxService = WxMpConfiguration.getWxMpService(); + try { + msgId = wxService.getTemplateMsgService().sendTemplateMsg(templateMessage); + } catch (WxErrorException e) { + e.printStackTrace(); + } + return msgId; + } + + + + + public String sendWxMpTemplateMessageToWx(String openId, String templateId, WxMpTemplateMessage.MiniProgram miniProgram, Map map) { + WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder() + .toUser(openId) + .templateId(templateId) + .miniProgram(miniProgram) + .build(); + map.forEach((k, v) -> { + templateMessage.addData(new WxMpTemplateData(k, v, "#000000")); + }); + String msgId = null; + WxMpService wxService = WxMpConfiguration.getWxMpService(); + try { + msgId = wxService.getTemplateMsgService().sendTemplateMsg(templateMessage); + } catch (WxErrorException e) { + log.error(e.getMessage(), e); + } + return msgId; + } + + + /** + * 获取模板消息id + * @param key 模板key + * @return string + */ + private String getTempId(String key){ + YxWechatTemplate yxWechatTemplate = yxWechatTemplateService.lambdaQuery() + .eq(YxWechatTemplate::getType,"template") + .eq(YxWechatTemplate::getTempkey,key) + .one(); + if (yxWechatTemplate == null) { + throw new YshopException("请后台配置key:" + key + "模板消息id"); + } + + if(ShopCommonEnum.IS_STATUS_0.getValue().equals(yxWechatTemplate.getStatus())){ + return ""; + } + + return yxWechatTemplate.getTempid(); + } + + /** + * 返回H5 url + * @return url + */ + private String getSiteUrl(){ + String apiUrl = redisUtils.getY(ShopKeyUtils.getSiteUrl()); + if(StrUtil.isBlank(apiUrl)){ + return ""; + } + return apiUrl; + } + + /** + * 获取openid + * @param uid uid + * @return String + */ + private String getUserOpenid(Long uid){ + YxUser yxUser = userService.getById(uid); + if(yxUser == null) { + return ""; + } + + WechatUserDto wechatUserDto = yxUser.getWxProfile(); + if(wechatUserDto == null) { + return ""; + } + if(StrUtil.isBlank(wechatUserDto.getOpenid())) { + return ""; + } + return wechatUserDto.getOpenid(); + + } + + +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WxMpTemplateMessageService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WxMpTemplateMessageService.java deleted file mode 100644 index 77d2b42150bcc98186ee2061684ece34dd79c897..0000000000000000000000000000000000000000 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/WxMpTemplateMessageService.java +++ /dev/null @@ -1,14 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.mp.service; - -import java.util.Map; - -public interface WxMpTemplateMessageService { - - String sendWxMpTemplateMessage(String openId, String templateId, String url, Map map); -} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxArticleService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxArticleService.java index 98bfbae888e8407a42a9e5f7bde0cdf5bd551b1f..13227ef2ca5c4868ce8633b02faeebc2a2a9b683 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxArticleService.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxArticleService.java @@ -2,15 +2,17 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.mp.service; import co.yixiang.common.service.BaseService; -import co.yixiang.modules.mp.domain.YxArticle; import co.yixiang.modules.mp.service.dto.YxArticleDto; import co.yixiang.modules.mp.service.dto.YxArticleQueryCriteria; -import me.chanjar.weixin.common.error.WxErrorException; +import co.yixiang.modules.mp.domain.YxArticle; +import co.yixiang.modules.mp.vo.YxArticleQueryVo; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -19,33 +21,50 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxArticleService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxArticleService extends BaseService{ /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map + * 获取文章列表 + * @param page 页码 + * @param limit 条数 + * @return List */ - Map queryAll(YxArticleQueryCriteria criteria, Pageable pageable); + List getList(int page, int limit); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List + * 获取文章详情 + * @param id id + * @return YxArticleQueryVo */ + YxArticleQueryVo getDetail(int id); + + void incVisitNum(int id); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxArticleQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxArticleQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; - void uploadNews(YxArticleDto yxArticleDTO) throws WxErrorException; + } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxMiniPayService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxMiniPayService.java deleted file mode 100644 index d0c79d35436eb1bf358f790247d99cd67f8d9c5b..0000000000000000000000000000000000000000 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxMiniPayService.java +++ /dev/null @@ -1,121 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.mp.service; - -import cn.hutool.core.util.StrUtil; -import co.yixiang.exception.ErrorRequestException; -import co.yixiang.modules.mp.config.ShopKeyUtils; -import co.yixiang.modules.mp.config.WxPayConfiguration; -import co.yixiang.modules.mp.handler.RedisHandler; -import com.github.binarywang.wxpay.bean.entpay.EntPayRequest; -import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult; -import com.github.binarywang.wxpay.bean.request.WxPayRefundRequest; -import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; -import com.github.binarywang.wxpay.exception.WxPayException; -import com.github.binarywang.wxpay.service.WxPayService; -import lombok.AllArgsConstructor; -import org.springframework.stereotype.Service; - -/** - * @ClassName 小程序支付YxPayService - * @Author hupeng <610796224@qq.com> - * @Date 2020/3/12 - **/ -@Service -@AllArgsConstructor -public class YxMiniPayService { - - private final RedisHandler redisHandler; - - /** - * 小程序支付 - * - * @param orderId - * @param openId 小程序openid - * @param body - * @param totalFee - * @return - * @throws WxPayException - */ - public WxPayMpOrderResult wxPay(String orderId, String openId, String body, - Integer totalFee, String attach) throws WxPayException { - - String apiUrl = redisHandler.getVal(ShopKeyUtils.getApiUrl()); - if (StrUtil.isBlank(apiUrl)) { - throw new ErrorRequestException("请配置api地址"); - } - - WxPayService wxPayService = WxPayConfiguration.getWxAppPayService(); - WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest(); - - orderRequest.setTradeType("JSAPI"); - orderRequest.setOpenid(openId); - orderRequest.setBody(body); - orderRequest.setOutTradeNo(orderId); - orderRequest.setTotalFee(totalFee); - orderRequest.setSpbillCreateIp("127.0.0.1"); - orderRequest.setNotifyUrl(apiUrl + "/api/wechat/notify"); - orderRequest.setAttach(attach); - - - WxPayMpOrderResult orderResult = wxPayService.createOrder(orderRequest); - - return orderResult; - - } - - - /** - * 退款 - * @param orderId - * @param totalFee - * @throws WxPayException - */ - public void refundOrder(String orderId, Integer totalFee) throws WxPayException { - String apiUrl = redisHandler.getVal(ShopKeyUtils.getApiUrl()); - if (StrUtil.isBlank(apiUrl)) { - throw new ErrorRequestException("请配置api地址"); - } - - WxPayService wxPayService = WxPayConfiguration.getWxAppPayService(); - WxPayRefundRequest wxPayRefundRequest = new WxPayRefundRequest(); - - wxPayRefundRequest.setTotalFee(totalFee);//订单总金额 - wxPayRefundRequest.setOutTradeNo(orderId); - wxPayRefundRequest.setOutRefundNo(orderId); - wxPayRefundRequest.setRefundFee(totalFee);//退款金额 - wxPayRefundRequest.setNotifyUrl(apiUrl + "/api/notify/refund"); - - wxPayService.refund(wxPayRefundRequest); - } - - - /** - * 企业打款 - * @param openid - * @param no - * @param userName - * @param amount - * @throws WxPayException - */ - public void entPay(String openid, String no, String userName, Integer amount) throws WxPayException { - WxPayService wxPayService = WxPayConfiguration.getWxAppPayService(); - EntPayRequest entPayRequest = new EntPayRequest(); - - entPayRequest.setOpenid(openid); - entPayRequest.setPartnerTradeNo(no); - entPayRequest.setCheckName("FORCE_CHECK"); - entPayRequest.setReUserName(userName); - entPayRequest.setAmount(amount); - entPayRequest.setDescription("提现"); - entPayRequest.setSpbillCreateIp("127.0.0.1"); - wxPayService.getEntPayService().entPay(entPayRequest); - - } - - -} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxPayService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxPayService.java deleted file mode 100644 index 0c46fa0a4ab705fe54671b243e6c74c273567f37..0000000000000000000000000000000000000000 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxPayService.java +++ /dev/null @@ -1,227 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.mp.service; - -import cn.hutool.core.util.StrUtil; -import co.yixiang.exception.ErrorRequestException; -import co.yixiang.modules.mp.config.ShopKeyUtils; -import co.yixiang.modules.mp.config.WxPayConfiguration; -import co.yixiang.modules.mp.handler.RedisHandler; -import com.github.binarywang.wxpay.bean.entpay.EntPayRequest; -import com.github.binarywang.wxpay.bean.order.WxPayAppOrderResult; -import com.github.binarywang.wxpay.bean.order.WxPayMpOrderResult; -import com.github.binarywang.wxpay.bean.order.WxPayMwebOrderResult; -import com.github.binarywang.wxpay.bean.request.WxPayRefundRequest; -import com.github.binarywang.wxpay.bean.request.WxPayUnifiedOrderRequest; -import com.github.binarywang.wxpay.exception.WxPayException; -import com.github.binarywang.wxpay.service.WxPayService; -import lombok.AllArgsConstructor; -import org.springframework.stereotype.Service; - -/** - * @ClassName 公众号支付YxPayService - * @Author hupeng <610796224@qq.com> - * @Date 2020/3/1 - **/ -@Service -@AllArgsConstructor -public class YxPayService { - - private final RedisHandler redisHandler; - - /** - * 微信公众号支付 - * - * @param orderId - * @param openId 公众号openid - * @param body - * @param totalFee - * @return - * @throws WxPayException - */ - public WxPayMpOrderResult wxPay(String orderId, String openId, String body, - Integer totalFee, String attach) throws WxPayException { - - String apiUrl = redisHandler.getVal(ShopKeyUtils.getApiUrl()); - if (StrUtil.isBlank(apiUrl)) { - throw new ErrorRequestException("请配置api地址"); - } - - WxPayService wxPayService = WxPayConfiguration.getPayService(); - WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest(); - - orderRequest.setTradeType("JSAPI"); - orderRequest.setOpenid(openId); - orderRequest.setBody(body); - orderRequest.setOutTradeNo(orderId); - orderRequest.setTotalFee(totalFee); - orderRequest.setSpbillCreateIp("127.0.0.1"); - orderRequest.setNotifyUrl(apiUrl + "/api/wechat/notify"); - orderRequest.setAttach(attach); - - - WxPayMpOrderResult orderResult = wxPayService.createOrder(orderRequest); - - return orderResult; - - } - - - /** - * 微信H5支付 - * - * @param orderId - * @param body - * @param totalFee - * @return - * @throws WxPayException - */ - public WxPayMwebOrderResult wxH5Pay(String orderId, String body, - Integer totalFee, String attach) throws WxPayException { - - String apiUrl = redisHandler.getVal(ShopKeyUtils.getApiUrl()); - if (StrUtil.isBlank(apiUrl)) { - throw new ErrorRequestException("请配置api地址"); - } - - WxPayService wxPayService = WxPayConfiguration.getPayService(); - WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest(); - - orderRequest.setTradeType("MWEB"); - orderRequest.setBody(body); - orderRequest.setOutTradeNo(orderId); - orderRequest.setTotalFee(totalFee); - orderRequest.setSpbillCreateIp("127.0.0.1"); - orderRequest.setNotifyUrl(apiUrl + "/api/wechat/notify"); - orderRequest.setAttach(attach); - - WxPayMwebOrderResult orderResult = wxPayService.createOrder(orderRequest); - - return orderResult; - - } - - - /** - * 微信小程序支付 - * - * @param orderId - * @param body - * @param totalFee - * @return - * @throws WxPayException - */ - public WxPayMpOrderResult routinePay(String orderId, String body, String openId, - Integer totalFee, String attach) throws WxPayException { - - String apiUrl = redisHandler.getVal(ShopKeyUtils.getApiUrl()); - if (StrUtil.isBlank(apiUrl)) { - throw new ErrorRequestException("请配置api地址"); - } - - WxPayService wxPayService = WxPayConfiguration.getWxAppPayService(); - WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest(); - orderRequest.setOpenid(openId); - orderRequest.setTradeType("JSAPI"); - orderRequest.setBody(body); - orderRequest.setOutTradeNo(orderId); - orderRequest.setTotalFee(totalFee); - orderRequest.setSpbillCreateIp("127.0.0.1"); - orderRequest.setNotifyUrl(apiUrl + "/api/wechat/notify"); - orderRequest.setAttach(attach); - - WxPayMpOrderResult orderResult = wxPayService.createOrder(orderRequest); - - return orderResult; - - } - - /** - * 微信app支付 - * - * @param orderId - * @param body - * @param totalFee - * @return - * @throws WxPayException - */ - public WxPayAppOrderResult appPay(String orderId, String body, - Integer totalFee, String attach) throws WxPayException { - - String apiUrl = redisHandler.getVal(ShopKeyUtils.getApiUrl()); - if (StrUtil.isBlank(apiUrl)) { - throw new ErrorRequestException("请配置api地址"); - } - - WxPayService wxPayService = WxPayConfiguration.getAppPayService(); - WxPayUnifiedOrderRequest orderRequest = new WxPayUnifiedOrderRequest(); - - orderRequest.setTradeType("APP"); - orderRequest.setBody(body); - orderRequest.setOutTradeNo(orderId); - orderRequest.setTotalFee(totalFee); - orderRequest.setSpbillCreateIp("127.0.0.1"); - orderRequest.setNotifyUrl(apiUrl + "/api/wechat/notify"); - orderRequest.setAttach(attach); - - WxPayAppOrderResult appOrderResult = wxPayService.createOrder(orderRequest); - - return appOrderResult; - - } - - - /** - * 退款 - * @param orderId - * @param totalFee - * @throws WxPayException - */ - public void refundOrder(String orderId, Integer totalFee) throws WxPayException { - String apiUrl = redisHandler.getVal(ShopKeyUtils.getApiUrl()); - if (StrUtil.isBlank(apiUrl)) { - throw new ErrorRequestException("请配置api地址"); - } - - WxPayService wxPayService = WxPayConfiguration.getPayService(); - WxPayRefundRequest wxPayRefundRequest = new WxPayRefundRequest(); - - wxPayRefundRequest.setTotalFee(totalFee);//订单总金额 - wxPayRefundRequest.setOutTradeNo(orderId); - wxPayRefundRequest.setOutRefundNo(orderId); - wxPayRefundRequest.setRefundFee(totalFee);//退款金额 - wxPayRefundRequest.setNotifyUrl(apiUrl + "/api/notify/refund"); - - wxPayService.refund(wxPayRefundRequest); - } - - - /** - * 企业打款 - * @param openid - * @param no - * @param userName - * @param amount - * @throws WxPayException - */ - public void entPay(String openid, String no, String userName, Integer amount) throws WxPayException { - WxPayService wxPayService = WxPayConfiguration.getPayService(); - EntPayRequest entPayRequest = new EntPayRequest(); - - entPayRequest.setOpenid(openid); - entPayRequest.setPartnerTradeNo(no); - entPayRequest.setCheckName("FORCE_CHECK"); - entPayRequest.setReUserName(userName); - entPayRequest.setAmount(amount); - entPayRequest.setDescription("提现"); - entPayRequest.setSpbillCreateIp("127.0.0.1"); - wxPayService.getEntPayService().entPay(entPayRequest); - - } - - -} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxTemplateService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxTemplateService.java deleted file mode 100644 index c65e5ab57fad3b672bd68d73c069aab5058b7606..0000000000000000000000000000000000000000 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxTemplateService.java +++ /dev/null @@ -1,119 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.mp.service; - -import co.yixiang.modules.mp.config.ShopKeyUtils; -import co.yixiang.modules.mp.domain.YxWechatTemplate; -import co.yixiang.utils.RedisUtil; -import org.springframework.beans.factory.annotation.Autowired; -import org.springframework.stereotype.Service; - -import java.util.HashMap; -import java.util.Map; - -/** - * @ClassName 微信公众号模板通知 - * @Author hupeng <610796224@qq.com> - * @Date 2020/3/2 - **/ -@Service -public class YxTemplateService { - private final String PAY_SUCCESS_KEY = "OPENTM207791277"; //pay - private final String DELIVERY_SUCCESS_KEY = "OPENTM200565259"; //Delivery - private final String REFUND_SUCCESS_KEY = "OPENTM410119152"; //Refund - private final String RECHARGE_SUCCESS_KEY = "OPENTM405847076"; //Recharge - - @Autowired - private YxWechatTemplateService templateService; - @Autowired - private WxMpTemplateMessageService templateMessageService; - - - /** - * 支付成功通知 - * @param time - * @param price - * @param openid - */ - public void rechargeSuccessNotice(String time, String price, String openid) { - String siteUrl = RedisUtil.get(ShopKeyUtils.getSiteUrl()); - YxWechatTemplate WechatTemplate = templateService.findByTempkey(RECHARGE_SUCCESS_KEY); - Map map = new HashMap<>(); - map.put("first", "您的账户金币发生变动,详情如下:"); - map.put("keyword1", "充值"); - map.put("keyword2", time); - map.put("keyword3", price); - map.put("remark", "yshop电商系统为你服务!"); - templateMessageService.sendWxMpTemplateMessage(openid - , WechatTemplate.getTempid(), - siteUrl + "/user/account", map); - } - - - /** - * 支付成功通知 - * @param orderId - * @param price - * @param openid - */ - public void paySuccessNotice(String orderId, String price, String openid) { - String siteUrl = RedisUtil.get(ShopKeyUtils.getSiteUrl()); - YxWechatTemplate WechatTemplate = templateService.findByTempkey(PAY_SUCCESS_KEY); - Map map = new HashMap<>(); - map.put("first", "您的订单已支付成功,我们会尽快为您发货。"); - map.put("keyword1", orderId);//订单号 - map.put("keyword2", price); - map.put("remark", "yshop电商系统为你服务!"); - templateMessageService.sendWxMpTemplateMessage(openid - , WechatTemplate.getTempid(), - siteUrl + "/order/detail/" + orderId, map); - } - - /** - * 退款成功通知 - * @param orderId - * @param price - * @param openid - * @param time - */ - public void refundSuccessNotice(String orderId, String price, String openid, String time) { - String siteUrl = RedisUtil.get(ShopKeyUtils.getSiteUrl()); - YxWechatTemplate WechatTemplate = templateService.findByTempkey(REFUND_SUCCESS_KEY); - Map map = new HashMap<>(); - map.put("first", "您在yshop的订单退款申请被通过,钱款将很快还至您的支付账户。"); - map.put("keyword1", orderId);//订单号 - map.put("keyword2", price); - map.put("keyword3", time); - map.put("remark", "yshop电商系统为你服务!"); - templateMessageService.sendWxMpTemplateMessage(openid - , WechatTemplate.getTempid(), - siteUrl + "/order/detail/" + orderId, map); - } - - /** - * 发货成功通知 - * @param orderId - * @param deliveryName - * @param deliveryId - * @param openid - */ - public void deliverySuccessNotice(String orderId, String deliveryName, String deliveryId, String openid) { - String siteUrl = RedisUtil.get(ShopKeyUtils.getSiteUrl()); - YxWechatTemplate WechatTemplate = templateService.findByTempkey(DELIVERY_SUCCESS_KEY); - Map map = new HashMap<>(); - map.put("first", "亲,宝贝已经启程了,好想快点来到你身边。"); - map.put("keyword1", orderId);//订单号 - map.put("keyword2", deliveryName); - map.put("keyword3", deliveryId); - map.put("remark", "yshop电商系统为你服务!"); - templateMessageService.sendWxMpTemplateMessage(openid - , WechatTemplate.getTempid(), - siteUrl + "/order/detail/" + orderId, map); - } - - -} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatLiveGoodsService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatLiveGoodsService.java new file mode 100644 index 0000000000000000000000000000000000000000..d2a5b9a8e103ad6c953d6e81a1ca6951500a1370 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatLiveGoodsService.java @@ -0,0 +1,76 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.service; + +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.mp.service.dto.YxWechatLiveGoodsDto; +import co.yixiang.modules.mp.service.dto.YxWechatLiveGoodsQueryCriteria; +import co.yixiang.modules.mp.domain.YxWechatLiveGoods; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-08-11 +*/ +public interface YxWechatLiveGoodsService extends BaseService{ + +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxWechatLiveGoodsQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxWechatLiveGoodsQueryCriteria criteria); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + /** + * 保存直播商品信息 + * @param resources + * @return + */ + boolean saveGoods(YxWechatLiveGoods resources); + + /** + * 同步商品更新审核状态 + * @param goodsIds + * @return + */ + boolean synchroWxOlLive(List goodsIds); + + /** + * 根据id删除直播商品信息 + * @param id + */ + void removeGoods(Long id); + + /** + * 更新直播商品信息 + * @param resources + */ + void updateGoods(YxWechatLiveGoods resources); +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatLiveService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatLiveService.java new file mode 100644 index 0000000000000000000000000000000000000000..99a38d7ef2120e2810f323417b58fad858a4b0db --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatLiveService.java @@ -0,0 +1,100 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.service; + +import cn.binarywang.wx.miniapp.bean.live.WxMaLiveResult; +import co.yixiang.common.service.BaseService; +import co.yixiang.modules.mp.service.dto.UpdateGoodsDto; +import co.yixiang.modules.mp.service.dto.WxMaLiveInfo; +import co.yixiang.modules.mp.service.dto.YxWechatLiveDto; +import co.yixiang.modules.mp.service.dto.YxWechatLiveQueryCriteria; +import co.yixiang.modules.mp.vo.WechatLiveVo; +import co.yixiang.modules.mp.domain.YxWechatLive; +import me.chanjar.weixin.common.error.WxErrorException; +import org.springframework.data.domain.Pageable; + +import javax.servlet.http.HttpServletResponse; +import java.io.IOException; +import java.util.List; + +/** +* @author hupeng +* @date 2020-08-10 +*/ +public interface YxWechatLiveService extends BaseService{ + + + + + /** + * 同步直播间 + * @return + */ + boolean synchroWxOlLive(); + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + WechatLiveVo queryAll(YxWechatLiveQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(YxWechatLiveQueryCriteria criteria); + + + boolean saveLive(YxWechatLive resources); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; + + + /** + * 创建直播间 + *
+     * 调用此接口创建直播间,创建成功后将在直播间列表展示,调用额度:10000次/一天
+     * 文档地址:https://developers.weixin.qq.com/miniprogram/dev/framework/liveplayer/studio-api.html#1
+     * http请求方式:POST https://api.weixin.qq.com/wxaapi/broadcast/room/create?access_token=ACCESS_TOKEN
+     * 
+ * + * @param roomInfo 直播间信息 + * @return . + * @throws WxErrorException . + */ + Integer createRoom(WxMaLiveInfo.RoomInfo roomInfo) throws WxErrorException; + + /** + * 获取直播回放 + * @param roomId + * @return + */ + List getLiveReplay(Integer roomId); + + + /** + * 商品列表 + * @param page 页码 + * @param limit 条数 + * @param order ProductEnum + * @return List + */ + List getList(int page, int limit, int order); + + boolean addGoods(UpdateGoodsDto resources); +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatMenuService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatMenuService.java index 57e42c3345ffb37ce9f7047764ff5a4d9129f08c..589895023e36c51d96f9fb7a188630a67bcf4d6d 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatMenuService.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatMenuService.java @@ -1,15 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service; import co.yixiang.common.service.BaseService; -import co.yixiang.modules.mp.domain.YxWechatMenu; import co.yixiang.modules.mp.service.dto.YxWechatMenuDto; import co.yixiang.modules.mp.service.dto.YxWechatMenuQueryCriteria; +import co.yixiang.modules.mp.domain.YxWechatMenu; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,32 +17,32 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxWechatMenuService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxWechatMenuService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxWechatMenuQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxWechatMenuQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxWechatMenuQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; Boolean isExist(String wechat_menus); diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatReplyService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatReplyService.java index c0b1e08ca023e3969acfcdeb18e9247a839d5915..23ac8df4dc78f5bdcf348d0bc02e939b76f3660c 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatReplyService.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatReplyService.java @@ -1,15 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service; import co.yixiang.common.service.BaseService; -import co.yixiang.modules.mp.domain.YxWechatReply; import co.yixiang.modules.mp.service.dto.YxWechatReplyDto; import co.yixiang.modules.mp.service.dto.YxWechatReplyQueryCriteria; +import co.yixiang.modules.mp.domain.YxWechatReply; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,32 +17,32 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxWechatReplyService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxWechatReplyService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxWechatReplyQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxWechatReplyQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxWechatReplyQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; YxWechatReply isExist(String subscribe); diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatTemplateService.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatTemplateService.java index 5af13cb0baec363e26c3bd85250b7f2ccc7da1f2..b69b91ea16adcba3e5331081f28eafebdf911309 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatTemplateService.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/YxWechatTemplateService.java @@ -1,15 +1,14 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service; import co.yixiang.common.service.BaseService; +import co.yixiang.modules.mp.service.dto.YxWechatTemplateQueryCriteria; import co.yixiang.modules.mp.domain.YxWechatTemplate; import co.yixiang.modules.mp.service.dto.YxWechatTemplateDto; -import co.yixiang.modules.mp.service.dto.YxWechatTemplateQueryCriteria; import org.springframework.data.domain.Pageable; import javax.servlet.http.HttpServletResponse; @@ -18,32 +17,32 @@ import java.util.List; import java.util.Map; /** - * @author hupeng - * @date 2020-05-12 - */ -public interface YxWechatTemplateService extends BaseService { +* @author hupeng +* @date 2020-05-12 +*/ +public interface YxWechatTemplateService extends BaseService{ - /** - * 查询数据分页 - * @param criteria 条件 - * @param pageable 分页参数 - * @return Map - */ - Map queryAll(YxWechatTemplateQueryCriteria criteria, Pageable pageable); +/** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(YxWechatTemplateQueryCriteria criteria, Pageable pageable); /** - * 查询所有数据不分页 - * @param criteria 条件参数 - * @return List - */ + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ List queryAll(YxWechatTemplateQueryCriteria criteria); /** - * 导出数据 - * @param all 待导出的数据 - * @param response / - * @throws IOException / - */ + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ void download(List all, HttpServletResponse response) throws IOException; YxWechatTemplate findByTempkey(String recharge_success_key); diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/UpdateGoodsDto.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/UpdateGoodsDto.java new file mode 100644 index 0000000000000000000000000000000000000000..5d645fdeda48648da7208ba9400fb920f57a0d1f --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/UpdateGoodsDto.java @@ -0,0 +1,11 @@ +package co.yixiang.modules.mp.service.dto; + +import lombok.Data; + +@Data +public class UpdateGoodsDto { + + private Integer roomId; + + private String productId; +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/WxMaLiveInfo.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/WxMaLiveInfo.java new file mode 100644 index 0000000000000000000000000000000000000000..941cd515824aa5a7a6823eb8b773a289b4e2e24a --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/WxMaLiveInfo.java @@ -0,0 +1,59 @@ +package co.yixiang.modules.mp.service.dto; + +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +@Data +public class WxMaLiveInfo { + + private static final long serialVersionUID = 7285263767524755887L; + + /** + * 直播列表 + */ + @Data + public static class RoomInfo implements Serializable { + private static final long serialVersionUID = 7745775280267417154L; + private String name; + private Integer roomid; + private String coverImg; + private String shareImg; + private String feedsImg; + private Integer liveStatus; + private Long startTime; + private Long endTime; + private String anchorName; + private String anchorWechat; + private String anchorImg; + private Integer type; + private Integer screenType; + private Integer closeLike; + private Integer closeGoods; + private Integer closeComment; + private Integer closeReplay ; // 是否关闭回放 1 关闭 + private Integer closeShare ; // 是否关闭分享 1 关闭 + private Integer closeKf ; // 是否关闭客服,1 关闭 + private List goods; + } + + /** + * 商品列表 + */ + @Data + public static class Goods implements Serializable { + private static final long serialVersionUID = 5769245932149287574L; + private Integer goodsId; + private String coverImgUrl; + private String url; + private Integer priceType; + private String price; + private String price2; + private String name; + /** + * 1, 2:表示是为api添加商品,否则是在MP添加商品 + */ + private String thirdPartyTag; + } +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/WxMaLiveResult.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/WxMaLiveResult.java new file mode 100644 index 0000000000000000000000000000000000000000..c4d6b713bd8b37d9643b7360b84ef80e5d7a4afe --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/WxMaLiveResult.java @@ -0,0 +1,131 @@ +package co.yixiang.modules.mp.service.dto; + +import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder; +import com.google.gson.annotations.SerializedName; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** + *
+ * 直播间操作返回结果
+ * Created by lipengjun on 2020/6/29.
+ * 
+ * + * @author lipengjun (939961241@qq.com) + */ +@Data +public class WxMaLiveResult implements Serializable { + private static final long serialVersionUID = 1L; + private Integer errcode; + private String errmsg; + private Integer total; + private Integer auditId; + private Integer goodsId; + private List goods; + + /** + * 直播间列表 + */ + @SerializedName("room_info") + private List roomInfos; + + /** + * 获取回放源视频列表 + */ + @SerializedName("live_replay") + private List liveReplay; + + public static cn.binarywang.wx.miniapp.bean.live.WxMaLiveResult fromJson(String json) { + return WxMaGsonBuilder.create().fromJson(json, cn.binarywang.wx.miniapp.bean.live.WxMaLiveResult.class); + } + + /** + * 商品列表 + */ + @Data + public static class Goods implements Serializable { + private static final long serialVersionUID = 5769245932149287574L; + @SerializedName("goods_id") + private Integer goodsId; + /** + * 获取商品列表返回的商品图片 + */ + @SerializedName("cover_img_url") + private String coverImgUrl; + /** + * 获取直播间列表返回的商品图片 + */ + @SerializedName("cover_img") + private String coverImg; + private String name; + private String url; + @SerializedName("price_type") + private Integer priceType; + /** + * 0:未审核,1:审核中,2:审核通过,3审核失败 + */ + @SerializedName("audit_status") + private Integer auditStatus; + private String price; + private String price2; + /** + * 1, 2:表示是为api添加商品,否则是在MP添加商品 + */ + @SerializedName("third_party_tag") + private String thirdPartyTag; + } + + /** + * 直播列表 + */ + @Data + public static class RoomInfo implements Serializable { + private static final long serialVersionUID = 7745775280267417154L; + private String name; + @SerializedName("roomid") + private Integer roomId; + @SerializedName("cover_img") + private String coverImg; + @SerializedName("share_img") + private String shareImg; + @SerializedName("live_status") + private Integer liveStatus; + @SerializedName("start_time") + private Long startTime; + @SerializedName("end_time") + private Long endTime; + @SerializedName("anchor_name") + private String anchorName; + @SerializedName("anchor_wechat") + private String anchorWechat; + @SerializedName("anchor_img") + private String anchorImg; + private Integer type; + @SerializedName("screen_type") + private Integer screenType; + @SerializedName("close_like") + private Integer closeLike; + @SerializedName("closeGoods") + private Integer closeGoods; + @SerializedName("close_comment") + private Integer closeComment; + private List goods; + } + + /** + * 回放数据列表 + */ + @Data + public static class LiveReplay implements Serializable { + private static final long serialVersionUID = 7683927205627536320L; + @SerializedName("expire_time") + private String expireTime; + @SerializedName("create_time") + private String createTime; + @SerializedName("media_url") + private String mediaUrl; + } +} + diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxArticleDto.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxArticleDto.java index 445632d1a53803be7e43163d90e4f0dd0b4a3b02..adb00a80be6d71bb124ba5f16292f1c1d210f0e3 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxArticleDto.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxArticleDto.java @@ -1,19 +1,20 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.dto; +import com.fasterxml.jackson.annotation.JsonFormat; import lombok.Data; import java.io.Serializable; +import java.util.Date; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxArticleDto implements Serializable { @@ -56,7 +57,8 @@ public class YxArticleDto implements Serializable { private Integer status; /** 添加时间 */ - private String addTime; + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + private Date createTime; /** 是否隐藏 */ private Integer hide; diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxArticleQueryCriteria.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxArticleQueryCriteria.java index 1842c200b6c74b4a5469ffbe78843c486ccebc9c..79abd820f70ae8cfeaac1c6fc5674eb14b6c5201 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxArticleQueryCriteria.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxArticleQueryCriteria.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxArticleQueryCriteria { +public class YxArticleQueryCriteria{ } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveDto.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveDto.java new file mode 100644 index 0000000000000000000000000000000000000000..5ac1e20c126569b6ac5ecdf0f9e900c9c06efe43 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveDto.java @@ -0,0 +1,105 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.service.dto; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; +import java.util.List; + +/** +* @author hupeng +* @date 2020-08-10 +*/ +@Data +public class YxWechatLiveDto implements Serializable { + + + + /** 直播间id */ + /** 防止精度丢失 */ + @JsonSerialize(using= ToStringSerializer.class) + @ApiModelProperty(value = "直播间id") + private Long roomId; + + private Long id; + + /** 直播间标题 */ + @ApiModelProperty(value = "直播间标题") + private String name; + + /** 背景图 */ + @ApiModelProperty(value = "背景图") + private String coverImge; + + /** 分享图片 */ + @ApiModelProperty(value = "分享图片") + private String shareImge; + + /** 直播间状态 */ + @ApiModelProperty(value = "直播间状态 101:直播中,102:未开始,103 已结束,104 禁播,105:暂停,106:异常,107:已过期") + private Integer liveStatus; + + /** 开始时间 */ + @ApiModelProperty(value = "开始时间") + private Long startTime; + + /** 预计结束时间 */ + @ApiModelProperty(value = "预计结束时间") + private Long endTime; + + /** 主播昵称 */ + @ApiModelProperty(value = "主播昵称") + private String anchorName; + + /** 主播微信号 */ + @ApiModelProperty(value = "主播微信号") + private String anchorWechat; + + /** 主播头像 */ + @ApiModelProperty(value = "主播头像") + private String anchorImge; + + /** 直播间类型 1:推流 0:手机直播 */ + @ApiModelProperty(value = "直播间类型 1:推流 0:手机直播") + private Integer type; + + /** 横屏、竖屏 【1:横屏,0:竖屏】 */ + @ApiModelProperty(value = "横屏、竖屏 【1:横屏,0:竖屏】") + private Integer screenType; + + /** 是否关闭点赞 【0:开启,1:关闭】 */ + @ApiModelProperty(value = "是否关闭点赞 【0:开启,1:关闭】") + private Integer closeLike; + + /** 是否关闭评论 【0:开启,1:关闭】 */ + @ApiModelProperty(value = "是否关闭评论 【0:开启,1:关闭】") + private Integer closeComment; + + /** 是否关闭货架 【0:开启,1:关闭】 */ + @ApiModelProperty(value = "是否关闭货架 【0:开启,1:关闭】") + private Integer closeGoods; + + private Integer closeReplay ; // 是否关闭回放 1 关闭 + + private Integer closeShare ; // 是否关闭分享 1 关闭 + + private Integer closeKf ; // 是否关闭客服,1 关闭 + /** + * 关联商品id多个,隔开 + */ + + private String productId; + + @ApiModelProperty(value = "商品信息") + private List product; +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveGoodsDto.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveGoodsDto.java new file mode 100644 index 0000000000000000000000000000000000000000..4995568269864df901b8b3858f53de642d04f76f --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveGoodsDto.java @@ -0,0 +1,59 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.service.dto; + +import com.fasterxml.jackson.databind.annotation.JsonSerialize; +import com.fasterxml.jackson.databind.ser.std.ToStringSerializer; +import lombok.Data; + +import java.io.Serializable; + +/** +* @author hupeng +* @date 2020-08-11 +*/ +@Data +public class YxWechatLiveGoodsDto implements Serializable { + + + private Long id; + + /** 直播商品id */ + /** 防止精度丢失 */ + @JsonSerialize(using= ToStringSerializer.class) + private Long goodsId; + + /** 关联商品id */ + private Long productId; + + /** 商品图片 */ + private String coverImgeUrl; + + /** 商品小程序路径 */ + private String url; + + /** 价格类型 1:一口价(只需要传入price,price2不传) 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传) 3:显示折扣价(price字段为原价,price2字段为现价, price和price2必传) */ + private String priceType; + + private String price; + + private String price2; + + /** 商品名称 */ + private String name; + + /** 1, 2:表示是为api添加商品,否则是直播控制台添加的商品 */ + private String thirdPartyTag; + + /** 审核单id */ + private Long auditId; + + /** 审核状态 0:未审核,1:审核中,2:审核通过,3审核失败 */ + private Integer auditStatus; +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveGoodsQueryCriteria.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveGoodsQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..03569901a983b2851d43ecba2e9b4c982e26f931 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveGoodsQueryCriteria.java @@ -0,0 +1,24 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.service.dto; + +import co.yixiang.annotation.Query; +import lombok.Data; + +/** +* @author hupeng +* @date 2020-08-11 +*/ +@Data +public class YxWechatLiveGoodsQueryCriteria{ + + /** 模糊 */ + @Query(type = Query.Type.INNER_LIKE) + private String name; +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveQueryCriteria.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveQueryCriteria.java new file mode 100644 index 0000000000000000000000000000000000000000..06dec0176a5ababcf955bed25d6be93b14ee02d6 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatLiveQueryCriteria.java @@ -0,0 +1,24 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.service.dto; + +import co.yixiang.annotation.Query; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +/** +* @author hupeng +* @date 2020-08-10 +*/ +@Data +public class YxWechatLiveQueryCriteria{ + @ApiModelProperty(value = "直播间状态 101:直播中,102:未开始,103 已结束,104 禁播,105:暂停,106:异常,107:已过期") + @Query + private Integer liveStatus; +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatMenuDto.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatMenuDto.java index 92237c2ce7a00a2f0931e72263d5a0562a39bcf1..49fb24ec9dea2d38a57d566da0a75c1538986289 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatMenuDto.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatMenuDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.dto; @@ -11,9 +10,9 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxWechatMenuDto implements Serializable { diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatMenuQueryCriteria.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatMenuQueryCriteria.java index b4fad49aa6b64bdd9f18568b8201ed53ccd1dc3c..cde34691e6bc9206552a4428cb53e3011c0c4062 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatMenuQueryCriteria.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatMenuQueryCriteria.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxWechatMenuQueryCriteria { +public class YxWechatMenuQueryCriteria{ } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatReplyDto.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatReplyDto.java index bcb6a25cde240f44f4f98f82a4c62162d9360348..f02752bf12112763946d459a9cced1e7425b3f4a 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatReplyDto.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatReplyDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.dto; @@ -11,9 +10,9 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxWechatReplyDto implements Serializable { diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatReplyQueryCriteria.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatReplyQueryCriteria.java index d25a702b3b54e16dca2a8851a4edaf4baebad78b..ff6c8dfbdeed19002f53f79bdc2b9fd70c3b9949 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatReplyQueryCriteria.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatReplyQueryCriteria.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxWechatReplyQueryCriteria { +public class YxWechatReplyQueryCriteria{ } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatTemplateDto.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatTemplateDto.java index 3134bb10c7644e3ffb4b5c2c31c2d57a7b91a01c..c427b20e802c5502fc79318542806d28fff77174 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatTemplateDto.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatTemplateDto.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.dto; @@ -11,9 +10,9 @@ import lombok.Data; import java.io.Serializable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data public class YxWechatTemplateDto implements Serializable { @@ -37,4 +36,6 @@ public class YxWechatTemplateDto implements Serializable { /** 状态 */ private Integer status; + /** 类型:template:模板消息 subscribe:订阅消息 */ + private String type; } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatTemplateQueryCriteria.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatTemplateQueryCriteria.java index e5547c7111fb733e0ba01fc41963eb53eba62df3..8bc400754295dd7467c09f82ae889047cdfee199 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatTemplateQueryCriteria.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/dto/YxWechatTemplateQueryCriteria.java @@ -1,17 +1,16 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.dto; import lombok.Data; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Data -public class YxWechatTemplateQueryCriteria { +public class YxWechatTemplateQueryCriteria{ } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/WxMpTemplateMessageServiceImpl.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/WxMpTemplateMessageServiceImpl.java deleted file mode 100644 index 4e4865effc7388db1acd0e8160b1fedcda6b7c22..0000000000000000000000000000000000000000 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/WxMpTemplateMessageServiceImpl.java +++ /dev/null @@ -1,41 +0,0 @@ -/** - * Copyright (C) 2018-2022 - * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 - */ -package co.yixiang.modules.mp.service.impl; - -import co.yixiang.modules.mp.config.WxMpConfiguration; -import co.yixiang.modules.mp.service.WxMpTemplateMessageService; -import me.chanjar.weixin.common.error.WxErrorException; -import me.chanjar.weixin.mp.api.WxMpService; -import me.chanjar.weixin.mp.bean.template.WxMpTemplateData; -import me.chanjar.weixin.mp.bean.template.WxMpTemplateMessage; -import org.springframework.stereotype.Component; - -import java.util.Map; - -@Component -public class WxMpTemplateMessageServiceImpl implements WxMpTemplateMessageService { - - @Override - public String sendWxMpTemplateMessage(String openId, String templateId, String url, Map map) { - WxMpTemplateMessage templateMessage = WxMpTemplateMessage.builder() - .toUser(openId) - .templateId(templateId) - .url(url) - .build(); - map.forEach((k, v) -> { - templateMessage.addData(new WxMpTemplateData(k, v, "#000000")); - }); - String msgId = null; - WxMpService wxService = WxMpConfiguration.getWxMpService(); - try { - msgId = wxService.getTemplateMsgService().sendTemplateMsg(templateMessage); - } catch (WxErrorException e) { - e.printStackTrace(); - } - return msgId; - } -} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxArticleServiceImpl.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxArticleServiceImpl.java index eaf39b2b5800ac220ba71806076f6fb4d469324a..63bec17507e9bea0c4767b51d825b61262a13fa1 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxArticleServiceImpl.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxArticleServiceImpl.java @@ -2,34 +2,27 @@ * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co * 注意: - * 本软件为www.yixiang.co开发研制 + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 */ package co.yixiang.modules.mp.service.impl; -import cn.hutool.core.util.ReUtil; -import cn.hutool.http.HttpUtil; -import cn.hutool.json.JSONUtil; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; -import co.yixiang.exception.ErrorRequestException; -import co.yixiang.modules.mp.config.WxMpConfiguration; -import co.yixiang.modules.mp.domain.YxArticle; import co.yixiang.modules.mp.service.mapper.ArticleMapper; +import co.yixiang.modules.mp.domain.YxArticle; import co.yixiang.modules.mp.service.YxArticleService; import co.yixiang.modules.mp.service.dto.YxArticleDto; import co.yixiang.modules.mp.service.dto.YxArticleQueryCriteria; -import co.yixiang.modules.mp.utils.URLUtils; +import co.yixiang.modules.mp.vo.YxArticleQueryVo; import co.yixiang.utils.FileUtil; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.core.toolkit.Wrappers; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; import com.github.pagehelper.PageInfo; import lombok.extern.slf4j.Slf4j; -import me.chanjar.weixin.common.api.WxConsts; -import me.chanjar.weixin.common.error.WxErrorException; -import me.chanjar.weixin.mp.api.WxMpService; -import me.chanjar.weixin.mp.bean.WxMpMassTagMessage; -import me.chanjar.weixin.mp.bean.material.*; -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.Pageable; import org.springframework.stereotype.Service; @@ -37,34 +30,63 @@ import org.springframework.transaction.annotation.Propagation; import org.springframework.transaction.annotation.Transactional; import javax.servlet.http.HttpServletResponse; -import java.io.File; import java.io.IOException; import java.util.ArrayList; import java.util.LinkedHashMap; import java.util.List; import java.util.Map; -// 默认不使用缓存 -//import org.springframework.cache.annotation.CacheConfig; -//import org.springframework.cache.annotation.CacheEvict; -//import org.springframework.cache.annotation.Cacheable; + /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Slf4j @Service -//@CacheConfig(cacheNames = "yxArticle") @Transactional(propagation = Propagation.SUPPORTS, readOnly = true, rollbackFor = Exception.class) public class YxArticleServiceImpl extends BaseServiceImpl implements YxArticleService { private final IGenerator generator; + private final ArticleMapper articleMapper; @Value("${file.path}") private String uploadDirStr; - public YxArticleServiceImpl(IGenerator generator) { + public YxArticleServiceImpl(IGenerator generator,ArticleMapper articleMapper) { this.generator = generator; + this.articleMapper = articleMapper; + } + + /** + * 获取文章列表 + * @param page 页码 + * @param limit 条数 + * @return List + */ + @Override + public List getList(int page, int limit){ + Page pageModel = new Page<>(page, limit); + + IPage pageList = articleMapper.selectPage(pageModel, Wrappers.lambdaQuery() + .orderByDesc(YxArticle::getId)); + + return generator.convert(pageList.getRecords(),YxArticleQueryVo.class); + } + + /** + * 获取文章详情 + * @param id id + * @return YxArticleQueryVo + */ + @Override + public YxArticleQueryVo getDetail(int id){ + return generator.convert(this.getById(id),YxArticleQueryVo.class); + } + + + @Override + public void incVisitNum(int id) { + articleMapper.incVisitNum(id); } @Override @@ -81,7 +103,7 @@ public class YxArticleServiceImpl extends BaseServiceImpl queryAll(YxArticleQueryCriteria criteria) { + public List queryAll(YxArticleQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxArticle.class, criteria)); } @@ -90,20 +112,19 @@ public class YxArticleServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxArticleDto yxArticle : all) { - Map map = new LinkedHashMap<>(); + 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(" 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()); @@ -115,95 +136,7 @@ public class YxArticleServiceImpl extends BaseServiceImpl]*>"; - List imgList = ReUtil.findAllGroup1(imgReg, content); - for (int j = 0; j < imgList.size(); j++) { - String imgSrc = imgList.get(j); - String filepath = URLUtils.getParam(imgSrc, "filepath"); - - if (StringUtils.isBlank(filepath)) {//网络图片URL,需下载到本地 - String filename = String.valueOf(System.currentTimeMillis()) + ".png"; - String downloadPath = uploadDirStr + filename; - long size = HttpUtil.downloadFile(imgSrc, cn.hutool.core.io.FileUtil.file(downloadPath)); - filepath = downloadPath; - } - WxMediaImgUploadResult wxMediaImgUploadResult = wxMpService.getMaterialService().mediaImgUpload(new File(filepath)); - content = StringUtils.replace(content, imgList.get(j), wxMediaImgUploadResult.getUrl()); - } - return content; - } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatLiveGoodsServiceImpl.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatLiveGoodsServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..5b00439a858bbda7da531035db79955b18ee45a5 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatLiveGoodsServiceImpl.java @@ -0,0 +1,226 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.service.impl; + +import cn.binarywang.wx.miniapp.api.WxMaService; +import cn.binarywang.wx.miniapp.bean.live.WxMaLiveGoodInfo; +import cn.binarywang.wx.miniapp.bean.live.WxMaLiveResult; +import cn.hutool.core.util.ObjectUtil; +import cn.hutool.http.HttpUtil; +import cn.hutool.json.JSONUtil; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.LiveGoodsEnum; +import co.yixiang.exception.BadRequestException; +import co.yixiang.modules.mp.service.dto.WxMaLiveInfo; +import co.yixiang.modules.mp.service.mapper.YxWechatLiveGoodsMapper; +import co.yixiang.modules.mp.domain.YxWechatLiveGoods; +import co.yixiang.modules.mp.service.YxWechatLiveGoodsService; +import co.yixiang.modules.mp.service.dto.YxWechatLiveGoodsDto; +import co.yixiang.modules.mp.service.dto.YxWechatLiveGoodsQueryCriteria; +import co.yixiang.modules.mp.config.WxMaConfiguration; +import co.yixiang.utils.FileUtil; +import com.github.pagehelper.PageInfo; +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.api.WxConsts; +import me.chanjar.weixin.common.bean.result.WxMediaUploadResult; +import me.chanjar.weixin.common.error.WxErrorException; +import org.springframework.beans.factory.annotation.Value; +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.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +/** +* @author hupeng +* @date 2020-08-11 +*/ +@Slf4j +@Service +//@CacheConfig(cacheNames = "yxWechatLiveGoods") +@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = Exception.class) +public class YxWechatLiveGoodsServiceImpl extends BaseServiceImpl implements YxWechatLiveGoodsService { + + private final IGenerator generator; + @Value("${file.path}") + private String uploadDirStr; + public YxWechatLiveGoodsServiceImpl(IGenerator generator) { + this.generator = generator; + } + + + /** + * 同步商品更新审核状态 + * @return + */ + //@Cacheable + @Override + public boolean synchroWxOlLive(List goodsIds) { + try { + WxMaService wxMaService = WxMaConfiguration.getWxMaService(); + WxMaLiveResult liveInfos = wxMaService.getLiveGoodsService().getGoodsWareHouse(goodsIds); + List convert = generator.convert(liveInfos.getGoods(), YxWechatLiveGoods.class); + this.saveOrUpdateBatch(convert); + } catch (WxErrorException e) { + e.printStackTrace(); + } + return true; + } + + @Override + public void removeGoods(Long id) { + this.removeById(id); + try { + WxMaService wxMaService = WxMaConfiguration.getWxMaService(); + wxMaService.getLiveGoodsService().deleteGoods(id.intValue()); + } catch (WxErrorException e) { + e.printStackTrace(); + } + } + + + /** + * 更新直播商品信息 + * @param resources + */ + @Override + public void updateGoods(YxWechatLiveGoods resources) { + YxWechatLiveGoods wechatLiveGoods = this.getById(resources.getGoodsId()); + try { + WxMaService wxMaService = WxMaConfiguration.getWxMaService(); + WxMaLiveGoodInfo goods = generator.convert(resources, WxMaLiveGoodInfo.class); + if(ObjectUtil.isNotEmpty(wechatLiveGoods)){ + /** 审核状态 0:未审核,1:审核中,2:审核通过,3审核失败 */ + if(LiveGoodsEnum.IS_Audit_2.getValue().equals(wechatLiveGoods.getAuditStatus())){ + }else if(LiveGoodsEnum.IS_Audit_0.getValue().equals(wechatLiveGoods.getAuditStatus())){ + resources.setCoverImgUrl(uploadPhotoToWx(wxMaService,resources.getCoverImgeUrl()).getMediaId()); + }else if(LiveGoodsEnum.IS_Audit_1.getValue().equals(wechatLiveGoods.getAuditStatus())){ + throw new BadRequestException("商品审核中不允许修改"); + }else if(LiveGoodsEnum.IS_Audit_3.getValue().equals(wechatLiveGoods.getAuditStatus())){ + resources.setCoverImgUrl(uploadPhotoToWx(wxMaService,resources.getCoverImgeUrl()).getMediaId()); + wxMaService.getLiveGoodsService().updateGoods(goods); + wxMaService.getLiveGoodsService().auditGoods(goods.getGoodsId()); + return; + } + } + + boolean wxMaLiveResult = wxMaService.getLiveGoodsService().updateGoods(goods); + this.saveOrUpdate(resources); + } catch (WxErrorException e) { + throw new BadRequestException(e.toString()); + } + } + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + @Override + //@Cacheable + public Map queryAll(YxWechatLiveGoodsQueryCriteria criteria, Pageable pageable) { + getPage(pageable); + PageInfo page = new PageInfo<>(queryAll(criteria)); + Map map = new LinkedHashMap<>(2); + List goodsDtos = generator.convert(page.getList(), YxWechatLiveGoodsDto.class); + goodsDtos.forEach(i ->{ + i.setId(i.getGoodsId()); + }); + map.put("content",goodsDtos); + map.put("totalElements", page.getTotal()); + return map; + } + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + @Override + //@Cacheable + public List queryAll(YxWechatLiveGoodsQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxWechatLiveGoods.class, criteria)); + } + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxWechatLiveGoodsDto yxWechatLiveGoods : all) { + Map map = new LinkedHashMap<>(); + map.put("关联商品id", yxWechatLiveGoods.getProductId()); + map.put("商品图片", yxWechatLiveGoods.getCoverImgeUrl()); + map.put("商品小程序路径", yxWechatLiveGoods.getUrl()); + map.put("价格类型 1:一口价(只需要传入price,price2不传) 2:价格区间(price字段为左边界,price2字段为右边界,price和price2必传) 3:显示折扣价(price字段为原价,price2字段为现价, price和price2必传)", yxWechatLiveGoods.getPriceType()); + map.put(" price", yxWechatLiveGoods.getPrice()); + map.put(" price2", yxWechatLiveGoods.getPrice2()); + map.put("商品名称", yxWechatLiveGoods.getName()); + map.put("1, 2:表示是为api添加商品,否则是直播控制台添加的商品", yxWechatLiveGoods.getThirdPartyTag()); + map.put("审核单id", yxWechatLiveGoods.getAuditId()); + map.put("审核状态 0:未审核,1:审核中,2:审核通过,3审核失败", yxWechatLiveGoods.getAuditStatus()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + /** + * 保存直播商品信息 + * @param resources + * @return + */ + @Override + public boolean saveGoods(YxWechatLiveGoods resources) { + WxMaService wxMaService = WxMaConfiguration.getWxMaService(); + try { + resources.setCoverImgUrl(uploadPhotoToWx(wxMaService,resources.getCoverImgeUrl()).getMediaId()); + WxMaLiveGoodInfo goods = generator.convert(resources, WxMaLiveGoodInfo.class); + WxMaLiveResult wxMaLiveResult = wxMaService.getLiveGoodsService().addGoods(goods); + resources.setGoodsId(Long.valueOf(wxMaLiveResult.getGoodsId())); + resources.setAuditId(Long.valueOf(wxMaLiveResult.getAuditId())); + this.save(resources); + } catch (WxErrorException e) { + throw new BadRequestException(e.toString()); + } + return true; + } + + /** + * 上传临时素材 + * @param wxMaService WxMaService + * @param picPath 图片路径 + * @return WxMpMaterialUploadResult + * @throws WxErrorException + */ + private WxMediaUploadResult uploadPhotoToWx(WxMaService wxMaService, String picPath) throws WxErrorException { + String filename = (int) System.currentTimeMillis() + ".png"; + String downloadPath = uploadDirStr + filename; + long size = HttpUtil.downloadFile(picPath, cn.hutool.core.io.FileUtil.file(downloadPath)); + picPath = downloadPath; + File picFile = new File( picPath ); + log.info( "picFile name : {}", picFile.getName() ); + WxMediaUploadResult wxMediaUploadResult = wxMaService.getMediaService().uploadMedia( WxConsts.MediaFileType.IMAGE, picFile ); + log.info( "wxMpMaterialUploadResult : {}", JSONUtil.toJsonStr( wxMediaUploadResult ) ); + return wxMediaUploadResult; + } +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatLiveServiceImpl.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatLiveServiceImpl.java new file mode 100644 index 0000000000000000000000000000000000000000..5dc3a608d3b106c28b8deeb059a1d38d9e6c366b --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatLiveServiceImpl.java @@ -0,0 +1,285 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.service.impl; + +import cn.binarywang.wx.miniapp.api.WxMaService; +import cn.binarywang.wx.miniapp.bean.live.WxMaLiveResult; +import cn.binarywang.wx.miniapp.json.WxMaGsonBuilder; +import cn.hutool.http.HttpUtil; +import cn.hutool.json.JSONUtil; +import co.yixiang.common.service.impl.BaseServiceImpl; +import co.yixiang.common.utils.QueryHelpPlus; +import co.yixiang.dozer.service.IGenerator; +import co.yixiang.enums.ShopCommonEnum; +import co.yixiang.exception.BadRequestException; +import co.yixiang.modules.mp.domain.YxWechatLiveGoods; +import co.yixiang.modules.mp.service.YxWechatLiveGoodsService; +import co.yixiang.modules.mp.service.YxWechatLiveService; +import co.yixiang.modules.mp.service.dto.*; +import co.yixiang.modules.mp.service.mapper.YxWechatLiveMapper; +import co.yixiang.modules.mp.vo.WechatLiveVo; +import co.yixiang.modules.mp.domain.YxWechatLive; +import co.yixiang.modules.mp.config.WxMaConfiguration; +import co.yixiang.modules.product.domain.YxStoreProduct; +import co.yixiang.modules.product.vo.YxStoreProductQueryVo; +import co.yixiang.utils.FileUtil; +import co.yixiang.utils.OrderUtil; +import co.yixiang.utils.StringUtils; +import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; +import com.baomidou.mybatisplus.core.metadata.IPage; +import com.baomidou.mybatisplus.extension.plugins.pagination.Page; +import com.github.pagehelper.PageHelper; +import com.github.pagehelper.PageInfo; +import com.google.gson.JsonObject; +import lombok.extern.slf4j.Slf4j; +import me.chanjar.weixin.common.api.WxConsts; +import me.chanjar.weixin.common.bean.result.WxMediaUploadResult; +import me.chanjar.weixin.common.enums.WxType; +import me.chanjar.weixin.common.error.WxError; +import me.chanjar.weixin.common.error.WxErrorException; +import me.chanjar.weixin.common.util.json.GsonParser; +import org.springframework.beans.factory.annotation.Value; +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.File; +import java.io.IOException; +import java.util.ArrayList; +import java.util.LinkedHashMap; +import java.util.List; +import java.util.Map; + +import static cn.binarywang.wx.miniapp.constant.WxMaApiUrlConstants.Broadcast.Room.CREATE_ROOM; + + +/** +* @author hupeng +* @date 2020-08-10 +*/ +@Service +//@CacheConfig(cacheNames = "yxWechatLive") +@Slf4j +@Transactional(propagation = Propagation.REQUIRED, readOnly = false, rollbackFor = Exception.class) +public class YxWechatLiveServiceImpl extends BaseServiceImpl implements YxWechatLiveService { + + private final IGenerator generator; + @Value("${file.path}") + private String uploadDirStr; + private final YxWechatLiveGoodsService wechatLiveGoodsService; + + private final YxWechatLiveMapper wechatLiveMapper; + + public YxWechatLiveServiceImpl(IGenerator generator, YxWechatLiveGoodsService wechatLiveGoodsService, YxWechatLiveMapper wechatLiveMapper) { + this.generator = generator; + this.wechatLiveGoodsService = wechatLiveGoodsService; + this.wechatLiveMapper = wechatLiveMapper; + } + + /** + * 同步直播间 + * @return + */ + //@Cacheable + @Override + public boolean synchroWxOlLive() { + try { + WxMaService wxMaService = WxMaConfiguration.getWxMaService(); + List liveInfos = wxMaService.getLiveService().getLiveInfos(); + List convert = generator.convert(liveInfos, YxWechatLive.class); + this.saveOrUpdateBatch(convert); + } catch (WxErrorException e) { + e.printStackTrace(); + } + return true; + } + @Override + //@Cacheable + public WechatLiveVo queryAll(YxWechatLiveQueryCriteria criteria, Pageable pageable) { + String order=null; + if(pageable.getSort()!=null){ + order= pageable.getSort().toString(); + order=order.replace(":",""); + if("UNSORTED".equals(order)){ + order="start_time desc"; + } + } + PageHelper.startPage(pageable.getPageNumber()+1, pageable.getPageSize(),order); + PageInfo page = new PageInfo<>(queryAll(criteria)); + WechatLiveVo wechatLiveVo = new WechatLiveVo(); +// List liveInfos = wxMaLiveService.getLiveInfos(); + List liveDtos = generator.convert(page.getList(), YxWechatLiveDto.class); + //获取所有商品 + liveDtos.forEach(i ->{ + if(StringUtils.isNotBlank(i.getProductId())){ + List wechatLiveGoodsDtos = generator.convert( + wechatLiveGoodsService.list(new LambdaQueryWrapper().in(YxWechatLiveGoods::getGoodsId,i.getProductId().split(","))) + ,YxWechatLiveGoodsDto.class); + i.setProduct(wechatLiveGoodsDtos); + } + i.setId(i.getRoomId()); + }); + wechatLiveVo.setContent(liveDtos); + wechatLiveVo.setTotalElements(page.getTotal()); + wechatLiveVo.setPageNumber(page.getPageNum()); + wechatLiveVo.setLastPage(page.getPages()); + return wechatLiveVo; + } + + @Override + public boolean addGoods(UpdateGoodsDto resources) { + YxWechatLive wechatLive = new YxWechatLive(); + + WxMaService wxMaService = WxMaConfiguration.getWxMaService(); + if(StringUtils.isNotBlank(resources.getProductId())){ + wechatLive.setRoomId(Long.valueOf(resources.getRoomId())); + wechatLive.setProductId(resources.getProductId()); + String[] productIds = resources.getProductId().split(","); + List pids = new ArrayList<>(); + for (String productId : productIds) { + pids.add(Integer.valueOf(productId)); + } + //添加商品 + try { + wxMaService.getLiveService().addGoodsToRoom(resources.getRoomId().intValue(), pids); + this.saveOrUpdate(wechatLive); + } catch (WxErrorException e) { + e.printStackTrace(); + } + } + return true; + } + @Override + public boolean saveLive(YxWechatLive resources){ + WxMaService wxMaService = WxMaConfiguration.getWxMaService(); + try { + resources.setFeedsImg(uploadPhotoToWx(wxMaService,resources.getFeedsImg()).getMediaId()); + resources.setStartTime(Long.valueOf(OrderUtil.dateToTimestamp(resources.getStartDate()))); + resources.setEndTime(Long.valueOf(OrderUtil.dateToTimestamp(resources.getEndDate()))); + resources.setAnchorImg(uploadPhotoToWx(wxMaService,resources.getAnchorImge()).getMediaId()); + resources.setCoverImg(uploadPhotoToWx(wxMaService,resources.getCoverImge()).getMediaId()); + resources.setShareImg(uploadPhotoToWx(wxMaService,resources.getShareImge()).getMediaId()); + WxMaLiveInfo.RoomInfo roomInfo = generator.convert(resources, WxMaLiveInfo.RoomInfo.class); + Integer status = this.createRoom(roomInfo); + resources.setRoomId(Long.valueOf(status)); + if(StringUtils.isNotBlank(resources.getProductId())){ + String[] productIds = resources.getProductId().split(","); + List pids = new ArrayList<>(); + for (String productId : productIds) { + pids.add(Integer.valueOf(productId)); + } + //添加商品 + wxMaService.getLiveService().addGoodsToRoom(status, pids); + } + this.save(resources); + } catch (WxErrorException e) { + e.printStackTrace(); + throw new BadRequestException(e.toString()); + } + return false; + } + + @Override + //@Cacheable + public List queryAll(YxWechatLiveQueryCriteria criteria){ + return baseMapper.selectList(QueryHelpPlus.getPredicate(YxWechatLive.class, criteria)); + } + + @Override + //@Cacheable + public List getLiveReplay(Integer roomId){ + WxMaService wxMaService = WxMaConfiguration.getWxMaService(); + WxMaLiveResult get_replay = new WxMaLiveResult(); + try { + get_replay = wxMaService.getLiveService().getLiveReplay("get_replay", roomId, 0, 100); + } catch (WxErrorException e) { + e.printStackTrace(); + } + return get_replay.getLiveReplay(); + } + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (YxWechatLiveDto yxWechatLive : all) { + Map map = new LinkedHashMap<>(); + map.put("直播间标题", yxWechatLive.getName()); + map.put("背景图", yxWechatLive.getCoverImge()); + map.put("分享图片", yxWechatLive.getShareImge()); + map.put("直播间状态", yxWechatLive.getLiveStatus()); + map.put("开始时间", yxWechatLive.getStartTime()); + map.put("预计结束时间", yxWechatLive.getEndTime()); + map.put("主播昵称", yxWechatLive.getAnchorName()); + map.put("主播微信号", yxWechatLive.getAnchorWechat()); + map.put("主播头像", yxWechatLive.getAnchorImge()); + map.put("直播间类型 1:推流 0:手机直播", yxWechatLive.getType()); + map.put("横屏、竖屏 【1:横屏,0:竖屏】", yxWechatLive.getScreenType()); + map.put("是否关闭货架 【0:开启,1:关闭】", yxWechatLive.getCloseLike()); + map.put("是否关闭评论 【0:开启,1:关闭】", yxWechatLive.getCloseComment()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } + + + @Override + public Integer createRoom(WxMaLiveInfo.RoomInfo roomInfo) throws WxErrorException { + WxMaService wxMaService = WxMaConfiguration.getWxMaService(); + String responseContent = wxMaService.post(CREATE_ROOM, WxMaGsonBuilder.create().toJson(roomInfo)); + JsonObject jsonObject = GsonParser.parse(responseContent); + if (jsonObject.get("errcode").getAsInt() != 0) { + throw new WxErrorException(WxError.fromJson(responseContent, WxType.MiniApp)); + } + return jsonObject.get("roomId").getAsInt(); + } + /** + * 上传临时素材 + * @param wxMaService WxMaService + * @param picPath 图片路径 + * @return WxMpMaterialUploadResult + * @throws WxErrorException + */ + private WxMediaUploadResult uploadPhotoToWx(WxMaService wxMaService, String picPath) throws WxErrorException { + String filename = (int) System.currentTimeMillis() + ".png"; + String downloadPath = uploadDirStr + filename; + long size = HttpUtil.downloadFile(picPath, cn.hutool.core.io.FileUtil.file(downloadPath)); + picPath = downloadPath; + File picFile = new File( picPath ); + log.info( "picFile name : {}", picFile.getName() ); + WxMediaUploadResult wxMediaUploadResult = wxMaService.getMediaService().uploadMedia( WxConsts.MediaFileType.IMAGE, picFile ); + log.info( "wxMpMaterialUploadResult : {}", JSONUtil.toJsonStr( wxMediaUploadResult ) ); + return wxMediaUploadResult; + } + + + /** + * 直播间列表 + * @param page 页码 + * @param limit 条数 + * @param order ProductEnum + * @return List + */ + @Override + public List getList(int page, int limit, int order) { + //todo 添加状态判断 + LambdaQueryWrapper wrapper = new LambdaQueryWrapper<>(); + wrapper.orderByDesc(YxWechatLive::getStartTime); + + + Page pageModel = new Page<>(page, limit); + + IPage pageList = wechatLiveMapper.selectPage(pageModel,wrapper); + + + return generator.convert(pageList.getRecords(),YxWechatLiveDto.class); + } + + +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatMenuServiceImpl.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatMenuServiceImpl.java index 37e166fe806fdfe226b675a39da694091cfbb5ae..bf8ce1a3adffc5e26d5aa4b51470569313810add 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatMenuServiceImpl.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatMenuServiceImpl.java @@ -1,19 +1,18 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.impl; import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; +import co.yixiang.modules.mp.service.mapper.WechatMenuMapper; import co.yixiang.modules.mp.domain.YxWechatMenu; import co.yixiang.modules.mp.service.YxWechatMenuService; import co.yixiang.modules.mp.service.dto.YxWechatMenuDto; import co.yixiang.modules.mp.service.dto.YxWechatMenuQueryCriteria; -import co.yixiang.modules.mp.service.mapper.WechatMenuMapper; import co.yixiang.utils.FileUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.github.pagehelper.PageInfo; @@ -36,9 +35,9 @@ import java.util.Map; //import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service @AllArgsConstructor //@CacheConfig(cacheNames = "yxWechatMenu") @@ -61,7 +60,7 @@ public class YxWechatMenuServiceImpl extends BaseServiceImpl queryAll(YxWechatMenuQueryCriteria criteria) { + public List queryAll(YxWechatMenuQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxWechatMenu.class, criteria)); } @@ -70,7 +69,7 @@ public class YxWechatMenuServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxWechatMenuDto yxWechatMenu : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("缓存数据", yxWechatMenu.getResult()); map.put("缓存时间", yxWechatMenu.getAddTime()); list.add(map); @@ -80,8 +79,9 @@ public class YxWechatMenuServiceImpl extends BaseServiceImpl().eq(YxWechatMenu::getKey, wechat_menus)); - if (yxWechatMenu == null) { + YxWechatMenu yxWechatMenu = this.getOne(new LambdaQueryWrapper() + .eq(YxWechatMenu::getKey,wechat_menus)); + if(yxWechatMenu == null){ return false; } return true; diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatReplyServiceImpl.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatReplyServiceImpl.java index e5211ba1f9493e5d2e1436517177fca6af86d81d..0b407d1fca5a02f5d1bf566acd9a172fb7849232 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatReplyServiceImpl.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/impl/YxWechatReplyServiceImpl.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.impl; @@ -10,11 +9,11 @@ import co.yixiang.common.service.impl.BaseServiceImpl; import co.yixiang.common.utils.QueryHelpPlus; import co.yixiang.dozer.service.IGenerator; import co.yixiang.exception.EntityExistException; +import co.yixiang.modules.mp.service.mapper.WechatReplyMapper; import co.yixiang.modules.mp.domain.YxWechatReply; import co.yixiang.modules.mp.service.YxWechatReplyService; import co.yixiang.modules.mp.service.dto.YxWechatReplyDto; import co.yixiang.modules.mp.service.dto.YxWechatReplyQueryCriteria; -import co.yixiang.modules.mp.service.mapper.WechatReplyMapper; import co.yixiang.utils.FileUtil; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.github.pagehelper.PageInfo; @@ -37,9 +36,9 @@ import java.util.Map; //import org.springframework.cache.annotation.Cacheable; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Service @AllArgsConstructor //@CacheConfig(cacheNames = "yxWechatReply") @@ -62,7 +61,7 @@ public class YxWechatReplyServiceImpl extends BaseServiceImpl queryAll(YxWechatReplyQueryCriteria criteria) { + public List queryAll(YxWechatReplyQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxWechatReply.class, criteria)); } @@ -71,7 +70,7 @@ public class YxWechatReplyServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxWechatReplyDto yxWechatReply : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("关键字", yxWechatReply.getKey()); map.put("回复类型", yxWechatReply.getType()); map.put("回复数据", yxWechatReply.getData()); @@ -84,14 +83,15 @@ public class YxWechatReplyServiceImpl extends BaseServiceImpl().eq(YxWechatReply::getKey, key)); + YxWechatReply yxWechatReply = this.getOne(new LambdaQueryWrapper() + .eq(YxWechatReply::getKey,key)); return yxWechatReply; } @Override public void create(YxWechatReply yxWechatReply) { - if (this.isExist(yxWechatReply.getKey()) != null) { - throw new EntityExistException(YxWechatReply.class, "key", yxWechatReply.getKey()); + if(this.isExist(yxWechatReply.getKey()) != null){ + throw new EntityExistException(YxWechatReply.class,"key",yxWechatReply.getKey()); } this.save(yxWechatReply); } @@ -99,10 +99,10 @@ public class YxWechatReplyServiceImpl extends BaseServiceImpl queryAll(YxWechatTemplateQueryCriteria criteria) { + public List queryAll(YxWechatTemplateQueryCriteria criteria){ return baseMapper.selectList(QueryHelpPlus.getPredicate(YxWechatTemplate.class, criteria)); } @@ -70,7 +69,7 @@ public class YxWechatTemplateServiceImpl extends BaseServiceImpl all, HttpServletResponse response) throws IOException { List> list = new ArrayList<>(); for (YxWechatTemplateDto yxWechatTemplate : all) { - Map map = new LinkedHashMap<>(); + Map map = new LinkedHashMap<>(); map.put("模板编号", yxWechatTemplate.getTempkey()); map.put("模板名", yxWechatTemplate.getName()); map.put("回复内容", yxWechatTemplate.getContent()); @@ -84,6 +83,7 @@ public class YxWechatTemplateServiceImpl extends BaseServiceImpl().eq(YxWechatTemplate::getTempkey, recharge_success_key)); + return this.getOne(new LambdaQueryWrapper() + .eq(YxWechatTemplate::getTempkey,recharge_success_key)); } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/ArticleMapper.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/ArticleMapper.java index bfca6fba4cc61cdfb4760c50a6bcd03605c3d947..2e74acaaaa6e1968c2796bafda6c74e37364df90 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/ArticleMapper.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/ArticleMapper.java @@ -1,22 +1,24 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.mapper; import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.mp.domain.YxArticle; -import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; +import org.apache.ibatis.annotations.Update; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface ArticleMapper extends CoreMapper { + @Update("update yx_article set visit=visit+1 " + + "where id=#{id}") + int incVisitNum(@Param("id") int id); } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatMenuMapper.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatMenuMapper.java index c991b4810f1d8d1dc43edfd2e7a46dc7feed2cd3..c10f665e98536cb30a2a53dc501185902ba728bd 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatMenuMapper.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatMenuMapper.java @@ -1,22 +1,19 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.mapper; import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.mp.domain.YxWechatMenu; -import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface WechatMenuMapper extends CoreMapper { } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatReplyMapper.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatReplyMapper.java index 1226554af34fa9404866545cf12978e06735dba8..fe840482013ed43c6147d4e17b4379be65ef6c15 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatReplyMapper.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatReplyMapper.java @@ -1,22 +1,19 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.mapper; import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.mp.domain.YxWechatReply; -import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface WechatReplyMapper extends CoreMapper { } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatTemplateMapper.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatTemplateMapper.java index 1f6c404c27fd26a60ff314c78ed1f564621dad9b..e9ac00794bd1afa32f89dc79e98e003d20672a1e 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatTemplateMapper.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/WechatTemplateMapper.java @@ -1,22 +1,19 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.service.mapper; import co.yixiang.common.mapper.CoreMapper; import co.yixiang.modules.mp.domain.YxWechatTemplate; -import org.apache.ibatis.annotations.Mapper; import org.springframework.stereotype.Repository; /** - * @author hupeng - * @date 2020-05-12 - */ +* @author hupeng +* @date 2020-05-12 +*/ @Repository -@Mapper public interface WechatTemplateMapper extends CoreMapper { } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/YxWechatLiveGoodsMapper.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/YxWechatLiveGoodsMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..398c471773c018838558bf78b4f44094c238cb9a --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/YxWechatLiveGoodsMapper.java @@ -0,0 +1,22 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.mp.domain.YxWechatLiveGoods; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-08-11 +*/ +@Repository +public interface YxWechatLiveGoodsMapper extends CoreMapper { + +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/YxWechatLiveMapper.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/YxWechatLiveMapper.java new file mode 100644 index 0000000000000000000000000000000000000000..3726e1c7cfc72bb8b2528a0caedcc6cf3a495ba6 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/service/mapper/YxWechatLiveMapper.java @@ -0,0 +1,22 @@ +/** +* Copyright (C) 2018-2022 +* All rights reserved, Designed By www.yixiang.co +* 注意: +* 本软件为www.yixiang.co开发研制,未经购买不得使用 +* 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) +* 一经发现盗用、分享等行为,将追究法律责任,后果自负 +*/ +package co.yixiang.modules.mp.service.mapper; + +import co.yixiang.common.mapper.CoreMapper; +import co.yixiang.modules.mp.domain.YxWechatLive; +import org.springframework.stereotype.Repository; + +/** +* @author hupeng +* @date 2020-08-10 +*/ +@Repository +public interface YxWechatLiveMapper extends CoreMapper { + +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/utils/JsonUtils.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/utils/JsonUtils.java index 1aa3604996942c661c4135a77d10c0d13f0cee28..09d1670df6f4370549f489153db197c29f2b7fbc 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/utils/JsonUtils.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/utils/JsonUtils.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.utils; @@ -15,8 +14,8 @@ import com.google.gson.GsonBuilder; public class JsonUtils { public static String toJson(Object obj) { Gson gson = new GsonBuilder() - .setPrettyPrinting() - .create(); + .setPrettyPrinting() + .create(); return gson.toJson(obj); } } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/utils/URLUtils.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/utils/URLUtils.java index 90dfcee0415b396c7c9696a50ea744526cad9769..57a387fe272da376cb5a6f471c014d34182ddcec 100644 --- a/yshop-weixin/src/main/java/co/yixiang/modules/mp/utils/URLUtils.java +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/utils/URLUtils.java @@ -1,8 +1,7 @@ /** * Copyright (C) 2018-2022 * All rights reserved, Designed By www.yixiang.co - * 注意: - * 本软件为www.yixiang.co开发研制 + */ package co.yixiang.modules.mp.utils; @@ -23,7 +22,7 @@ public class URLUtils { * @return */ public static String getParam(String url, String name) { - return urlSplit(url).get(name); + return urlSplit(url).get( name ); } /** @@ -31,14 +30,14 @@ public class URLUtils { * @param strURL url地址 * @return url请求参数部分 */ - private static String truncateUrlPage(String strURL) { - String strAllParam = null; - String[] arrSplit = null; - strURL = strURL.trim().toLowerCase(); - arrSplit = strURL.split("[?]"); - if (strURL.length() > 1) { - if (arrSplit.length > 1) { - for (int i = 1; i < arrSplit.length; i++) { + private static String truncateUrlPage(String strURL){ + String strAllParam=null; + String[] arrSplit=null; + strURL=strURL.trim().toLowerCase(); + arrSplit=strURL.split("[?]"); + if(strURL.length()>1){ + if(arrSplit.length>1){ + for (int i=1;i urlSplit(String URL) { + public static Map urlSplit(String URL){ Map mapRequest = new HashMap(); - String[] arrSplit = null; - String strUrlParam = truncateUrlPage(URL); - if (strUrlParam == null) { + String[] arrSplit=null; + String strUrlParam= truncateUrlPage(URL); + if(strUrlParam==null){ return mapRequest; } - arrSplit = strUrlParam.split("[&]"); - for (String strSplit : arrSplit) { - String[] arrSplitEqual = null; - arrSplitEqual = strSplit.split("[=]"); + arrSplit=strUrlParam.split("[&]"); + for(String strSplit:arrSplit){ + String[] arrSplitEqual=null; + arrSplitEqual= strSplit.split("[=]"); //解析出键值 - if (arrSplitEqual.length > 1) { + if(arrSplitEqual.length>1){ //正确解析 mapRequest.put(arrSplitEqual[0], arrSplitEqual[1]); - } else { - if (arrSplitEqual[0] != "") { + }else{ + if(arrSplitEqual[0]!=""){ //只有参数没有值,不加入 mapRequest.put(arrSplitEqual[0], ""); } diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/utils/YshopUtils.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/utils/YshopUtils.java new file mode 100644 index 0000000000000000000000000000000000000000..d2b081866c1ae28dc87db9e7d3070c3d6379e4af --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/utils/YshopUtils.java @@ -0,0 +1,24 @@ +/** + * Copyright (C) 2018-2022 + * All rights reserved, Designed By www.yixiang.co + * 注意: + * 本软件为www.yixiang.co开发研制,未经购买不得使用 + * 购买后可获得全部源代码(禁止转卖、分享、上传到码云、github等开源平台) + * 一经发现盗用、分享等行为,将追究法律责任,后果自负 + */ +package co.yixiang.modules.mp.utils; + + +import co.yixiang.modules.user.service.dto.WechatUserDto; +import com.alibaba.fastjson.JSONObject; + +/** + * @ClassName YshopUtils + * @Author hupeng <610796224@qq.com> + * @Date 2020/6/27 + **/ +public class YshopUtils { + public static WechatUserDto getWechtUser(String str) { + return JSONObject.parseObject(str,WechatUserDto.class); + } +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/vo/WechatLiveVo.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/vo/WechatLiveVo.java new file mode 100644 index 0000000000000000000000000000000000000000..a06901e0f8b6e99e7297fe440444a29228a8e05f --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/vo/WechatLiveVo.java @@ -0,0 +1,20 @@ +package co.yixiang.modules.mp.vo; + +import co.yixiang.modules.mp.service.dto.YxWechatLiveDto; +import lombok.Data; + +import java.util.List; + +@Data +public class WechatLiveVo { + + private List content; + + private Long totalElements; + + private Integer pageNumber; + + private Integer lastPage; + + +} diff --git a/yshop-weixin/src/main/java/co/yixiang/modules/mp/vo/YxArticleQueryVo.java b/yshop-weixin/src/main/java/co/yixiang/modules/mp/vo/YxArticleQueryVo.java new file mode 100644 index 0000000000000000000000000000000000000000..1d45962139df8c99a13a3de5697bee9664521fc1 --- /dev/null +++ b/yshop-weixin/src/main/java/co/yixiang/modules/mp/vo/YxArticleQueryVo.java @@ -0,0 +1,65 @@ +package co.yixiang.modules.mp.vo; + +import com.fasterxml.jackson.annotation.JsonFormat; +import com.fasterxml.jackson.annotation.JsonProperty; +import io.swagger.annotations.ApiModel; +import io.swagger.annotations.ApiModelProperty; +import lombok.Data; + +import java.io.Serializable; + +/** + *

+ * 文章管理表 查询结果对象 + *

+ * + * @author hupeng + * @date 2019-10-02 + */ +@Data +@ApiModel(value = "YxArticleQueryVo对象", description = "文章管理表查询参数") +public class YxArticleQueryVo implements Serializable { + private static final long serialVersionUID = 1L; + + @ApiModelProperty(value = "文章管理ID") + private Integer id; + + @ApiModelProperty(value = "文章标题") + private String title; + + @ApiModelProperty(value = "文章作者") + private String author; + + @ApiModelProperty(value = "文章图片") + private String imageInput; + + @ApiModelProperty(value = "文章简介") + private String synopsis; + + @ApiModelProperty(value = "文章分享标题") + private String shareTitle; + + @ApiModelProperty(value = "文章分享简介") + private String shareSynopsis; + + @ApiModelProperty(value = "浏览次数") + private String visit; + + @ApiModelProperty(value = "排序") + private Integer sort; + + @ApiModelProperty(value = "原文链接") + private String url; + + @ApiModelProperty(value = "状态") + private Boolean status; + + @ApiModelProperty(value = "添加时间") + @JsonFormat(pattern = "yyyy-MM-dd HH:mm:ss",timezone="GMT+8") + @JsonProperty(value = "addTime") + private String createTime; + + @ApiModelProperty(value = "文章内容") + private String content; + +} diff --git a/yshop-weixin/src/main/resources/META-INF/spring.factories b/yshop-weixin/src/main/resources/META-INF/spring.factories new file mode 100644 index 0000000000000000000000000000000000000000..9128c34c92990a777001839a25d1cf56605e99c4 --- /dev/null +++ b/yshop-weixin/src/main/resources/META-INF/spring.factories @@ -0,0 +1,2 @@ +org.springframework.boot.autoconfigure.EnableAutoConfiguration=\ + com.binarywang.spring.starter.wxjava.miniapp.config.WxMaAutoConfiguration