
3363 changed files with 506201 additions and 1 deletions
@ -0,0 +1,29 @@ |
|||||
|
1.在后台用户表 商品表 订单表添加 添加供应商编号,达到后台商户入驻,商户只可以查询自己的商品和订单 |
||||
|
2.修复mall-front-vue登录和注册 搜索 登录已修复 |
||||
|
3.小程序添加记录formid接口,下单成功添加消息推送功能 |
||||
|
|
||||
|
-- 具体介绍 |
||||
|
https://github.com/shenzhuan/mallplus/wikis/pages |
||||
|
二。后端代码 分支supp |
||||
|
https://github.com/shenzhuan/mallplus |
||||
|
三.下载项目下最新的sql |
||||
|
123 |
||||
|
|
||||
|
|
||||
|
|
||||
|
1、图片管理不防重名; |
||||
|
2、手机号登录无法支付;【这个应该接手机支付】 |
||||
|
3、从redis缓存区数据交易,导致支付失败;【这个没懂 怎么个流程】 |
||||
|
4、1、订单的状态问题:所有订单,进行支付,如微信支付时未付款,返回后再去支付,提示订单已支付, |
||||
|
不再进行支付。就像刚才的视频一样;【我一直余额测试的好像没有这个问题】 |
||||
|
2、订单生成问题:在“我的”-“待付款”里,一个未付款订单,生成了几个相同订单;【加一行代码就行,只是前端重复展示】 |
||||
|
3、订单生成问题-2:创建订单页,不点击创建订单,返回到商品页面,再点击直接购买,创建订单的数量会依次加一, |
||||
|
次数会影响问题2的多余订单数量;【这个已经修复,商品详情购买当时是直接先加入购物车,如果不下单,购物车数据旧没有删除】 |
||||
|
4、取消未支付订单,所有重复订单也消失,但是刷新又回来了。点击“取消”, 【加一行代码就行,只是前端重复展示】 |
||||
|
提示已支付,不可取消。点支付,进去后到最后支付界面提示“订单已关闭,请不要重复操作“。 【】 |
||||
|
5、订单状态显示不一致问题:已关闭订单,在”全部“中显示正确,但是在”待付款“中显示还是待付款,【没有发现】 |
||||
|
6、”申请售后“点击后,无法提交。【你把页面优化一下,应该是你没有勾选售后哪个商品】 |
||||
|
7、商铺名称显示问题:创建订单页面,商铺名称常常抓错,显示测试的”mallplus多租户商城“【已修改】 |
||||
|
8、购物车商品名字下方有个Null,看下是什么参数,不重要的删掉就好。【这个应该解决了,是规格】 |
||||
|
9、支付完成后,提示下方显示Undfined字样,有用则留着,无关就删掉。【这个好像没有发现】 |
||||
|
11、管理界面:”订单列表“不显示既有订单。【是后台管理吗? 你登录的是对应的那个商户吗】 |
@ -0,0 +1,158 @@ |
|||||
|
|
||||
|
user mallplus; |
||||
|
worker_processes 1; |
||||
|
|
||||
|
#error_log logs/error.log; |
||||
|
#error_log logs/error.log notice; |
||||
|
#error_log logs/error.log info; |
||||
|
|
||||
|
#pid logs/nginx.pid; |
||||
|
events { |
||||
|
worker_connections 1024; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
http { |
||||
|
include mime.types; |
||||
|
default_type application/octet-stream; |
||||
|
sendfile on; |
||||
|
#tcp_nopush on; |
||||
|
|
||||
|
#keepalive_timeout 0; |
||||
|
keepalive_timeout 165; |
||||
|
client_header_timeout 45; |
||||
|
|
||||
|
client_body_timeout 45; |
||||
|
|
||||
|
send_timeout 45; |
||||
|
|
||||
|
#gzip on; |
||||
|
|
||||
|
server { |
||||
|
listen 8090; |
||||
|
server_name localhost; |
||||
|
client_max_body_size 10M; |
||||
|
#charset koi8-r; |
||||
|
|
||||
|
#access_log logs/host.access.log main; |
||||
|
location / { |
||||
|
root /app/amllplus/dist; |
||||
|
index index.html; |
||||
|
} |
||||
|
|
||||
|
error_page 500 502 503 504 /50x.html; |
||||
|
location = /50x.html { |
||||
|
root html; |
||||
|
} |
||||
|
} |
||||
|
server { |
||||
|
listen 8016; |
||||
|
server_name localhost; |
||||
|
|
||||
|
location / { |
||||
|
root /app/amllplus/ruoyi; |
||||
|
try_files $uri $uri/ /index.html; |
||||
|
index index.html index.htm; |
||||
|
proxy_pass http://localhost:8085/; |
||||
|
} |
||||
|
|
||||
|
error_page 500 502 503 504 /50x.html; |
||||
|
location = /50x.html { |
||||
|
root html; |
||||
|
} |
||||
|
} |
||||
|
server { |
||||
|
listen 80; |
||||
|
server_name 182.92.124.53; |
||||
|
|
||||
|
error_page 500 502 503 504 /50x.html; |
||||
|
location = /50x.html { |
||||
|
root html; |
||||
|
} |
||||
|
|
||||
|
location / { |
||||
|
alias /app/amllplus/h5/; |
||||
|
index index.html; |
||||
|
} |
||||
|
|
||||
|
location /h5 { |
||||
|
alias /app/amllplus/mall/; |
||||
|
try_files $uri $uri/ @router; |
||||
|
index index.html; |
||||
|
} |
||||
|
location /api { |
||||
|
rewrite ^/api/(.*)$ /$1 break; |
||||
|
include uwsgi_params; |
||||
|
proxy_pass http://47.244.191.12:8081 ; |
||||
|
} |
||||
|
location @router { |
||||
|
rewrite ^.*$ /index.html last; |
||||
|
} |
||||
|
} |
||||
|
server { |
||||
|
listen 8082; |
||||
|
server_name _; |
||||
|
root /app/amllplus/h5; |
||||
|
index index.html; |
||||
|
} |
||||
|
|
||||
|
server { |
||||
|
listen 8084; |
||||
|
server_name _; |
||||
|
root /app/amllplus/cms; |
||||
|
index index.html; |
||||
|
try_files $uri $uri/ /index.html; |
||||
|
} |
||||
|
|
||||
|
|
||||
|
server { |
||||
|
listen 8088; |
||||
|
server_name _; |
||||
|
root /app/amllplus/pc; |
||||
|
index index.html; |
||||
|
try_files $uri $uri/ /index.html; |
||||
|
} |
||||
|
server { |
||||
|
listen 8086; |
||||
|
server_name _; |
||||
|
root /app/amllplus/ecshop; |
||||
|
index index.html; |
||||
|
try_files $uri $uri/ /index.html; |
||||
|
} |
||||
|
server { |
||||
|
listen 8000; |
||||
|
server_name _; |
||||
|
root /app/amllplus/h5bak1; |
||||
|
index index.html; |
||||
|
try_files $uri $uri/ /index.html; |
||||
|
} |
||||
|
server { |
||||
|
listen 8010; |
||||
|
server_name _; |
||||
|
root /app/amllplus/pcbak; |
||||
|
index index.html; |
||||
|
try_files $uri $uri/ /index.html; |
||||
|
} |
||||
|
server { |
||||
|
listen 8018; |
||||
|
server_name _; |
||||
|
root /app/amllplus/pcbak1; |
||||
|
index index.html; |
||||
|
try_files $uri $uri/ /index.html; |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
||||
|
|
||||
|
nohup java -Xms128m -Xmx256m -jar /app/amllplus/meizhuang-admin-0.0.1-SNAPSHOT.jar >meizhuang.log 2>&1 & |
||||
|
|
||||
|
nohup java -Xms128m -Xmx256m -jar /app/amllplus/mallplus-portal-0.0.1-SNAPSHOT.jar >web.log 2>&1 & |
||||
|
|
||||
|
nohup java -Xms128m -Xmx256m -jar /app/amllplus/mallplus-admin-0.0.1-SNAPSHOT.jar >admin.log 2>&1 & |
||||
|
|
||||
|
nohup java -Xms128m -Xmx256m -jar /app/amllplus/RuoYi.jar >rrr.log 2>&1 & |
||||
|
|
||||
|
|
||||
|
java -cp druid-1.1.10.jar com.alibaba.druid.filter.config.ConfigTools shen123 |
||||
|
|
File diff suppressed because it is too large
File diff suppressed because one or more lines are too long
@ -0,0 +1,191 @@ |
|||||
|
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 2019 zhuan |
||||
|
|
||||
|
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. |
@ -0,0 +1,379 @@ |
|||||
|
# mall |
||||
|
|
||||
|
## 技术选型 |
||||
|
|
||||
|
### 后端技术 |
||||
|
|
||||
|
技术 | 名称 |
||||
|
----|---- |
||||
|
Spring Boot | 容器+MVC框架 |
||||
|
Spring Security | 认证和授权框架 |
||||
|
MyBatis | ORM框架 |
||||
|
MyBatisGenerator | 数据层代码生成 |
||||
|
PageHelper | MyBatis物理分页插件 |
||||
|
Swagger-UI | 文档生产工具 |
||||
|
Hibernator-Validator | 验证框架 |
||||
|
Elasticsearch | 搜索引擎 |
||||
|
RabbitMq | 消息队列 |
||||
|
Redis | 分布式缓存 |
||||
|
MongoDb | NoSql数据库 |
||||
|
Docker | 应用容器引擎 |
||||
|
Druid | 数据库连接池 |
||||
|
|
||||
|
### 前端技术 |
||||
|
|
||||
|
技术 | 名称 |
||||
|
----|---- |
||||
|
Vue | 前端框架 |
||||
|
Vue-router | 路由框架 |
||||
|
Vuex | 全局状态管理框架 |
||||
|
Element | 前端UI框架 |
||||
|
Axios | 前端HTTP框架 |
||||
|
Js-cookie | cookie管理工具 |
||||
|
|
||||
|
### 框架搭建 |
||||
|
|
||||
|
功能 | 完成 |
||||
|
----|---- |
||||
|
集成MyBatis | ✔ |
||||
|
集成MyBatisGenerator | ✔ |
||||
|
集成SpringSecurity | ✔ |
||||
|
集成Swagger-UI | ✔ |
||||
|
集成Hibernator-Validator | ✔ |
||||
|
集成日志功能 | ✔ |
||||
|
集成监控功能 | ✔ |
||||
|
crud操作demo | ✔ |
||||
|
合理规划包结构 | ✔ |
||||
|
SpringAOP通用日志处理 | ✔ |
||||
|
SpringAOP通用验证失败结果返回 | ✔ |
||||
|
CommonResult对通用返回结果进行封装 | ✔ |
||||
|
SpringSecurity登录改为Restful形式 | ✔ |
||||
|
JWT登录、注册、获取token | ✔ |
||||
|
JTA事务处理 | ✔ |
||||
|
集成单元测试 | ✔ |
||||
|
OSS上传功能 | ✔ |
||||
|
Elasticsearch搜索功能 | ✔ |
||||
|
HTTPS支持 | ✔ |
||||
|
Redis数字型ID生成 | ✔ |
||||
|
SpringTask定时任务支持 | ✔ |
||||
|
docker容器化部署 | ✔ |
||||
|
配置区分生产和测试环境 | ✔ |
||||
|
ELK日志收集功能 | ✔ |
||||
|
RabbitMq异步通信 | ✔ |
||||
|
RestTemplate服务间调用 | ✔ |
||||
|
SpringSecurity权限管理功能 | ✔ |
||||
|
集成SpringCloud | |
||||
|
|
||||
|
### 使用工具 |
||||
|
|
||||
|
工具 | 下载地址 |
||||
|
----|---- |
||||
|
开发工具idea | https://www.jetbrains.com/idea/download |
||||
|
redis客户端连接工具 | https://redisdesktop.com/download |
||||
|
mongo客户端连接工具 | https://robomongo.org/download |
||||
|
本地host管理 | https://oldj.github.io/SwitchHosts/ |
||||
|
Linux远程连接工具 | http://www.netsarang.com/download/software.html |
||||
|
数据库连接工具 | http://www.formysql.com/xiazai.html |
||||
|
数据库设计工具 | http://powerdesigner.de/ |
||||
|
原型设计工具 | https://www.axure.com/ |
||||
|
思维导图设计工具 | http://www.edrawsoft.cn/mindmaster |
||||
|
gif录制工具 | https://www.screentogif.com/ |
||||
|
|
||||
|
### 后台功能 |
||||
|
|
||||
|
#### 后台登录功能 ✔ |
||||
|
|
||||
|
- 后台用户注册功能 |
||||
|
- 后台用户登录后获取token |
||||
|
- 刷新token功能 |
||||
|
|
||||
|
#### 商品管理 ✔ |
||||
|
|
||||
|
> **商品分类管理** |
||||
|
|
||||
|
- 按父分类编号分页查看分类列表 |
||||
|
- 添加、编辑、删除分类 |
||||
|
- 转移分类商品 |
||||
|
|
||||
|
> **商品品牌管理** |
||||
|
|
||||
|
- 按品牌名称搜索分页查看品牌列表 |
||||
|
- 添加、编辑、删除品牌 |
||||
|
- 查看当前品牌的所有产品 |
||||
|
|
||||
|
> **商品属性分类管理** |
||||
|
|
||||
|
- 添加商品属性分类(名称) |
||||
|
- 分页查询全部商品属性分类 |
||||
|
- 删除单个商品属性分类 |
||||
|
- 修改单个属性分类名称 |
||||
|
- 查询单个属性分类信息 |
||||
|
|
||||
|
> **商品属性管理** |
||||
|
|
||||
|
- 根据分类查询属性列表或参数列表(分页,支持类型) |
||||
|
- 添加商品属性 |
||||
|
- 查询单个商品属性 |
||||
|
- 编辑商品属性 |
||||
|
- 批量删除商品属性 |
||||
|
- 分页查询全部商品属性 |
||||
|
|
||||
|
> **添加商品** |
||||
|
|
||||
|
- 选择商品分类:根据商品分类id查找分类 |
||||
|
- 选择品牌:查询全部品牌 |
||||
|
- 选择运费模版:查询全部运费模版 |
||||
|
- 设置会员价格:查询所有会员等级,传入List<PmsMemberPrice> |
||||
|
- 添加阶梯价格: 参数传入List<PmsProductLadder> |
||||
|
- 设置满减价格: 参数传入List<PmsProductFullReduction> |
||||
|
- 选择商品属性类别:获取所有商品属性分类,根据商品属性分类的id获取规格和参数(type=0->规格;type=1->参数) |
||||
|
- 选择规格并生成库存信息:前端实现 |
||||
|
- 添加sku库存信息:参数传入List<PmsSkuStock> |
||||
|
- 设置属性图片:设置到pic和album_pics字段中去 |
||||
|
- 添加商品参数:参数传入List<PmsProductAttributeValue> |
||||
|
- 添加自定义商品规格:参数传入List<PmsProductAttributeValue> |
||||
|
- 关联专题:参数传入List<CmsSubjectProductRelation>关系 |
||||
|
- 关联优选:参数传入List<CmsPrefrenceAreaProductRelation>关系 |
||||
|
|
||||
|
> **修改商品** |
||||
|
|
||||
|
- 根据商品id查询商品信息 |
||||
|
- 查询商品基本信息:商品分类名称、品牌名称、运费模版名称 |
||||
|
- 查询商品促销信息:商品的会员价格、阶梯价格、满减价格 |
||||
|
- 查询商品属性信息:商品属性类别名称、sku库存信息、属性分类对应规格和参数值 |
||||
|
- 查询商品关联信息:商品关联专题和关联优选 |
||||
|
- 修改商品信息:商品属性分类及规格不可修改,只支持单个sku的修改、删除、新增;商品属性分类及规格可以修改:修改后同时显示原sku库存及属性分类 |
||||
|
|
||||
|
> **商品分页查询** |
||||
|
|
||||
|
- 商品的状态:全部商品、已上架、未上架、待审核、未通过 (publishStatus verifyStatus) |
||||
|
- 商品名称(%name%) |
||||
|
- 商品货号(productSn) |
||||
|
- 商品分类id(productCategoryId) |
||||
|
- 商品品牌id(brandId) |
||||
|
- 批量操作:上下架、推荐、新品、转移分类、放入回收站、审核 |
||||
|
- 查看记录:审核记录,操作日志 |
||||
|
- sku:根据产品及sku编号获取sku信息,批量修改sku信息 |
||||
|
|
||||
|
> **商品回收管理** |
||||
|
|
||||
|
- 分页展示回收商品列表 |
||||
|
- 回收商品还原功能 |
||||
|
|
||||
|
#### 促销管理 |
||||
|
|
||||
|
> **秒杀活动管理** |
||||
|
|
||||
|
- 活动列表展示 |
||||
|
- 活动上下线 |
||||
|
- 设置活动商品 |
||||
|
- 添加、编辑、删除活动 |
||||
|
|
||||
|
> **优惠券管理** |
||||
|
|
||||
|
- 优惠券列表展示 |
||||
|
- 添加、编辑、删除优惠券 |
||||
|
- 查看优惠券领取记录 |
||||
|
|
||||
|
> **活动管理** |
||||
|
|
||||
|
- 活动列表展示 |
||||
|
- 添加、编辑、删除活动 |
||||
|
- 活动上下线 |
||||
|
- 发布到广告 |
||||
|
|
||||
|
> **首页推荐** |
||||
|
|
||||
|
- 品牌推荐:列表展示、是否推荐、排序、删除、多选加入品牌 |
||||
|
- 新鲜好物:商品列表展示、是否推荐、排序、删除、多选加入商品 |
||||
|
- 人气推荐:商品列表展示、是否推荐、排序、删除、多选加入商品 |
||||
|
- 专题精选:专题列表展示、是否推荐、排序、删除、多选加入专题 |
||||
|
- 广告管理:广告列表展示、是否上线、排序、删除、添加编辑广告 |
||||
|
|
||||
|
#### 内容管理 |
||||
|
|
||||
|
> **专题管理** |
||||
|
|
||||
|
- 专题列表:查看、删除、推荐专题 |
||||
|
- 添加、编辑专题:选择专题分类、添加、删除关联商品 |
||||
|
- 专题分类管理:控制显示、排序、编辑删除分类 |
||||
|
|
||||
|
> **优选主题** |
||||
|
|
||||
|
- 优选列表:控制显示、排序、删除 |
||||
|
- 添加、编辑优选:关联和删除商品 |
||||
|
|
||||
|
> **话题管理** |
||||
|
|
||||
|
- 专题列表:查看、删除、热门话题 |
||||
|
- 话题分类管理:控制显示、排序、编辑删除分类 |
||||
|
|
||||
|
> **帮助管理** |
||||
|
|
||||
|
- 帮助列表:查看、删除、控制显示 |
||||
|
- 添加、编辑帮助:选择帮助分类 |
||||
|
- 帮助分类管理:控制显示、排序、编辑删除分类 |
||||
|
|
||||
|
#### 用户管理 |
||||
|
|
||||
|
> **用户管理** |
||||
|
|
||||
|
- 用户列表:帐号启用、删除、群发短信 |
||||
|
- 批量操作:群发短信、站内信、推送、设置标签、赠送优惠券 |
||||
|
- 查看、编辑用户信息:用户详情(统计信息、收货地址、订单记录)、编辑资料、登录日志 |
||||
|
- 购买力筛选:最近消费、消费次数、消费金额、订单均价、商品分类、会员等级、用户标签 |
||||
|
- 用户标签管理:标签列表、添加、编辑、删除 |
||||
|
- 会员等级设置:列表、添加、编辑、设置默认会员等级 |
||||
|
|
||||
|
> **成才值及积分** |
||||
|
|
||||
|
- 成长值及积分查询:列表展示、积分明细、成长值明细、修改数值 |
||||
|
- 任务奖励设置:新手任务、日常任务 |
||||
|
- 更多规则设置:成长值规则、积分规则、积分消费设置 |
||||
|
|
||||
|
#### 订单管理 |
||||
|
|
||||
|
> **订单列表** |
||||
|
|
||||
|
- 订单搜索:订单编号、收货人姓名/号码、订单状态、订单分类、订单来源、提交时间 |
||||
|
- 订单操作:查看订单、关闭订单、订单发货、订单跟踪、删除订单 |
||||
|
- 批量操作:批量发货、关闭订单、删除订单 |
||||
|
|
||||
|
> **查看订单** |
||||
|
|
||||
|
- 订单状态:提交订单、支付订单、平台发货、确认收货、完成评价 |
||||
|
- 订单详情操作:修改发票信息、修改收货人信息、修改商品信息、修改费用信息、发送站内信、关闭订单、备注订单、取消订单、订单跟踪、删除订单 |
||||
|
- 订单基本信息:订单信息、优惠信息、用户信息 |
||||
|
- 发票信息:类型、抬头、内容、收票人信息 |
||||
|
- 收货人信息:收货人、手机号、邮政编码、收货地址 |
||||
|
- 商品信息:包含商品基本信息 |
||||
|
- 费用信息:合计及优惠信息 |
||||
|
- 操作信息:订单状态改变记录 |
||||
|
|
||||
|
> **订单设置** |
||||
|
|
||||
|
- 秒杀订单超时时间 |
||||
|
- 正常订单超时时间 |
||||
|
- 订单自动完成时间 |
||||
|
- 自动结束交易时间 |
||||
|
- 自动好评时间 |
||||
|
|
||||
|
> **退货申请处理** |
||||
|
|
||||
|
- 退货申请搜索:服务单号、收货人姓名/号码、处理状态、申请时间、操作人员、处理时间 |
||||
|
- 批量操作:删除 |
||||
|
- 查看详情:退货商品、服务单信息、确认退货、拒绝退货、确认收货 |
||||
|
|
||||
|
> **退货原因设置** |
||||
|
|
||||
|
- 原因列表:类型、排序、是否启用、添加时间 |
||||
|
- 添加、编辑原因:同上 |
||||
|
- 批量操作:删除 |
||||
|
|
||||
|
#### 权限管理 ✔ |
||||
|
|
||||
|
> **权限管理** |
||||
|
|
||||
|
- 权限管理:添加权限、删除权限、修改权限、以树形结构返回权限 |
||||
|
- 角色管理:添加角色、删除角色、更新角色、角色列表、获取相应角色权限、修改相应角色权限 |
||||
|
- 成员管理:添加、编辑、删除成员、成员列表、为成员分配角色、获取成员角色、分配+-权限、获取权限列表 |
||||
|
|
||||
|
角色 | 菜单 |
||||
|
----|---- |
||||
|
管理员 | 所有菜单权限 |
||||
|
运营 | 首页、用户、促销、运营、内容 |
||||
|
财务 | 首页、统计、财务 |
||||
|
美工 | 首页、商品 |
||||
|
客服 | 首页、商品、订单 |
||||
|
|
||||
|
### 前台功能 |
||||
|
|
||||
|
#### 商品搜索 ✔ |
||||
|
|
||||
|
> **综合搜索功能** |
||||
|
|
||||
|
- 搜索:根据商品标题、副标题、关键字进行搜索; |
||||
|
- 筛选:未选择分类时聚合搜索结果,选择出现次数最多的分类,选择分类以后可以根据选择分类的筛选字段进行筛选; |
||||
|
- 排序:按新品、销量、价格进行排序 |
||||
|
- 搜索返回结果:商品ID、商品图片、名称、副标题、价格、商品销量、新品、商品的参数、品牌名称、分类名称 |
||||
|
- 接口:从数据库中查询相关数据并导入es,插入(修改)数据接口,删除数据接口 |
||||
|
- 品牌分类筛选:根据搜索结果聚合返回品牌、分类及属性 |
||||
|
|
||||
|
> **商品推荐功能** |
||||
|
|
||||
|
- 推荐某商品的相关商品、根据该商品的品牌(10)、分类(6)、名称(8)、关键字(2)、副标题(2) |
||||
|
- 根据用户一周浏览记录推荐商品,根据用户搜索记录推荐商品 |
||||
|
|
||||
|
> **商品热搜功能** |
||||
|
|
||||
|
- 根据用户搜索记录聚合生成热搜词 |
||||
|
|
||||
|
> **商品搜索联想功能** |
||||
|
|
||||
|
- 根据用户搜索记录聚合生成热搜词 |
||||
|
|
||||
|
#### 购物流程 ✔ |
||||
|
|
||||
|
> **购物车** |
||||
|
|
||||
|
- 添加商品到购物车 |
||||
|
- 购物车商品列表(商品主图、商品名称、商品数量、商品规格) |
||||
|
- 修改购物车中商品数量 |
||||
|
- 购物车中商品重选规格 |
||||
|
- 购物车中商品删除功能 |
||||
|
|
||||
|
> **生成确认单** |
||||
|
|
||||
|
- 生成确认单信息:收货信息、商品信息、价格信息、发票信息、支付方式 |
||||
|
- 选择收货地址:默认收货地址 |
||||
|
- 选择优惠券及积分抵扣:展示可用优惠券和不可以优惠券 |
||||
|
- 计算商品价格:商品合计、运费、优惠券抵扣、积分抵扣、活动优惠 |
||||
|
- 选择支付方式:在线支付及货到付款 |
||||
|
- 计算应付金额:合计+运费-优惠券抵扣-积分抵扣-活动优惠 |
||||
|
|
||||
|
> **提交订单** |
||||
|
|
||||
|
- 将确认单信息转化为订单 |
||||
|
- 删除购物车中相关商品 |
||||
|
- 添加订单到数据库并锁定库存 |
||||
|
- 在线支付选择支付方式:支付宝、微信、银联、ApplePay |
||||
|
|
||||
|
> **支付订单** |
||||
|
|
||||
|
- 支付完成后修改订单状态为已支付、扣除库存 |
||||
|
|
||||
|
> **取消订单(未支付情况下)** |
||||
|
|
||||
|
- 订单超时后自动取消订单,解除商品库存锁定,返还优惠券,积分 |
||||
|
|
||||
|
#### 会员模块(我的)✔ |
||||
|
|
||||
|
> **我的关注** |
||||
|
|
||||
|
- 关注品牌列表:品牌logo、名称、地址、关注数量 |
||||
|
- 取消关注功能 |
||||
|
- 关注列表展示 |
||||
|
|
||||
|
> **我的收藏** |
||||
|
|
||||
|
- 收藏的商品:商品主图、名称、卖点、价格、找相似 |
||||
|
- 收藏的专题:专题主图、标题、副标题、收藏数、浏览数、评论数 |
||||
|
- 收藏的话题:话题主图、标题、副标题、收藏数、浏览数、评论数 |
||||
|
|
||||
|
> **我的足迹** |
||||
|
|
||||
|
- 浏览过的商品:商品主图、名称、卖点、价格、找相似 |
||||
|
- 删除记录功能 |
||||
|
- 浏览列表展示 |
||||
|
|
||||
|
> **会员登录注册** |
||||
|
|
||||
|
- 登录功能:https登录 |
||||
|
- 注册功能:用户名、密码、手机号、手机验证码 |
||||
|
- 获取验证码:后台生成验证码,验证码绑定手机号 |
||||
|
- 忘记密码:手机号、短信验证码、新密码 |
||||
|
- 登出功能 |
||||
|
|
||||
|
39.106.212.32:3306/mallplus |
||||
|
root |
||||
|
shen@123 |
@ -1,2 +1,242 @@ |
|||||
# mallplus |
# mall |
||||
|
|
||||
|
## 说明 |
||||
|
|
||||
|
> 基于SpringBoot+MyBatis-plus的电商系统,包括前台商城系统及后台管理系统。 |
||||
|
|
||||
|
> 如果该项目对您有帮助,您可以点右上角 "Star" 支持一下 谢谢! |
||||
|
|
||||
|
> 或者您可以 "follow" 一下,该项目将持续更新,不断完善功能。 |
||||
|
|
||||
|
> 项目交流人QQ群:[195405248] |
||||
|
|
||||
|
> 如有问题或者好的建议可以在 Issues 中提。 |
||||
|
|
||||
|
|
||||
|
## 前言 |
||||
|
|
||||
|
`mallplus`项目致力于打造一个完整的电商系统,采用现阶段流行技术实现。 |
||||
|
|
||||
|
## 项目介绍 |
||||
|
|
||||
|
`mallplus`项目是一套电商系统,包括前台商城系统及后台管理系统,小程序,h5,基于SpringBoot+MyBatis实现。 |
||||
|
前台商城系统包含首页门户、商品推荐、商品搜索、商品展示、购物车、订单流程、会员中心、客户服务、帮助中心等模块。 |
||||
|
后台管理系统包含商品管理、订单管理、会员管理、促销管理、运营管理、内容管理、统计报表、财务管理、权限管理、代码生成设置等模块。 |
||||
|
|
||||
|
### 项目演示 |
||||
|
|
||||
|
> 后台管理系统 |
||||
|
|
||||
|
小程序下载 地址 https://gitee.com/catshen/mall-applet |
||||
|
后台管理下载地址 https://github.com/shenzhuan/mallplus |
||||
|
项目演示地址: [http://39.98.190.128/index.html](http://39.98.190.128/index.html) |
||||
|
|
||||
|
 |
||||
|
|
||||
|
|
||||
|
|
||||
|
### 组织结构 |
||||
|
|
||||
|
``` lua |
||||
|
mall |
||||
|
├── mallplus-mbg -- MyBatisGenerator生成的数据库操作代码 |
||||
|
├── mallplus-admin -- 后台商城管理系统接口 |
||||
|
├── mall-search -- 基于Elasticsearch的商品搜索系统 |
||||
|
├── mallplus-portal -- 前台商城系统接口 |
||||
|
└── mall-demo -- 框架搭建时的测试代码 |
||||
|
├── 前端项目`mallplus-admin-web` 地址 请加群下载 |
||||
|
├── h5前端项目`vue-js-master`地址 请加群下载 |
||||
|
├── pc前端项目`Mall-Vue-master`地址 请加群下载 |
||||
|
├── 小前端项目`wechatapp`地址 请加群下载 |
||||
|
``` |
||||
|
|
||||
|
## 目前h5项目已实现功能 |
||||
|
1. 首页数据的展示 |
||||
|
2. 分类页数据的展示 |
||||
|
3. 购物车 |
||||
|
4. 我的 |
||||
|
5. 注册 |
||||
|
6. 登录 |
||||
|
7. 商品详情页 |
||||
|
8. 商品搜索 |
||||
|
##h5项目效果图 |
||||
|
|
||||
|
|
||||
|
 |
||||
|
|
||||
|
 |
||||
|
|
||||
|
 |
||||
|
|
||||
|
 |
||||
|
|
||||
|
 |
||||
|
|
||||
|
 |
||||
|
|
||||
|
 |
||||
|
|
||||
|
|
||||
|
## 目前小程序项目已实现功能 |
||||
|
1. 首页数据的展示 |
||||
|
2. 分类页数据的展示 |
||||
|
3. 购物车 |
||||
|
4. 我的 |
||||
|
5. 注册 |
||||
|
6. 登录 |
||||
|
7. 商品详情页 |
||||
|
8. 商品搜索 |
||||
|
9.下单 |
||||
|
10.用户详情 |
||||
|
|
||||
|
|
||||
|
## 目前pc项目已实现功能 |
||||
|
1. 首页数据的展示 |
||||
|
2. 分类页数据的展示 |
||||
|
3. 购物车 |
||||
|
4. 我的 |
||||
|
5. 注册 |
||||
|
6. 登录 |
||||
|
7. 商品详情页 |
||||
|
8. 商品搜索 |
||||
|
9.下单 |
||||
|
10.用户详情 |
||||
|
### 技术选型 |
||||
|
|
||||
|
#### 后端技术 |
||||
|
|
||||
|
技术 | 说明 | 官网 |
||||
|
----|----|---- |
||||
|
Spring Boot | 容器+MVC框架 | [https://spring.io/projects/spring-boot](https://spring.io/projects/spring-boot) |
||||
|
Spring Security | 认证和授权框架 | [https://spring.io/projects/spring-security](https://spring.io/projects/spring-security) |
||||
|
MyBatis | ORM框架 | [http://www.mybatis.org/mybatis-3/zh/index.html](http://www.mybatis.org/mybatis-3/zh/index.html) |
||||
|
MyBatisGenerator | 数据层代码生成 | [http://www.mybatis.org/generator/index.html](http://www.mybatis.org/generator/index.html) |
||||
|
PageHelper | MyBatis物理分页插件 | [http://git.oschina.net/free/Mybatis_PageHelper](http://git.oschina.net/free/Mybatis_PageHelper) |
||||
|
Swagger-UI | 文档生产工具 | [https://github.com/swagger-api/swagger-ui](https://github.com/swagger-api/swagger-ui) |
||||
|
Hibernator-Validator | 验证框架 | [http://hibernate.org/validator/](http://hibernate.org/validator/) |
||||
|
Elasticsearch | 搜索引擎 | [https://github.com/elastic/elasticsearch](https://github.com/elastic/elasticsearch) |
||||
|
RabbitMq | 消息队列 | [https://www.rabbitmq.com/](https://www.rabbitmq.com/) |
||||
|
Redis | 分布式缓存 | [https://redis.io/](https://redis.io/) |
||||
|
MongoDb | NoSql数据库 | [https://www.mongodb.com/](https://www.mongodb.com/) |
||||
|
Docker | 应用容器引擎 | [https://www.docker.com/](https://www.docker.com/) |
||||
|
Druid | 数据库连接池 | [https://github.com/alibaba/druid](https://github.com/alibaba/druid) |
||||
|
OSS | 对象存储 | [https://github.com/aliyun/aliyun-oss-java-sdk](https://github.com/aliyun/aliyun-oss-java-sdk) |
||||
|
JWT | JWT登录支持 | [https://github.com/jwtk/jjwt](https://github.com/jwtk/jjwt) |
||||
|
LogStash | 日志收集 | [https://github.com/logstash/logstash-logback-encoder](https://github.com/logstash/logstash-logback-encoder) |
||||
|
Lombok | 简化对象封装工具 | [https://github.com/rzwitserloot/lombok](https://github.com/rzwitserloot/lombok) |
||||
|
|
||||
|
#### 前端技术 |
||||
|
|
||||
|
技术 | 说明 | 官网 |
||||
|
----|----|---- |
||||
|
Vue | 前端框架 | [https://vuejs.org/](https://vuejs.org/) |
||||
|
Vue-router | 路由框架 | [https://router.vuejs.org/](https://router.vuejs.org/) |
||||
|
Vuex | 全局状态管理框架 | [https://vuex.vuejs.org/](https://vuex.vuejs.org/) |
||||
|
Element | 前端UI框架 | [https://element.eleme.io/](https://element.eleme.io/) |
||||
|
Axios | 前端HTTP框架 | [https://github.com/axios/axios](https://github.com/axios/axios) |
||||
|
v-charts | 基于Echarts的图表框架 | [https://v-charts.js.org/](https://v-charts.js.org/) |
||||
|
Js-cookie | cookie管理工具 | [https://github.com/js-cookie/js-cookie](https://github.com/js-cookie/js-cookie) |
||||
|
nprogress | 进度条控件 | [https://github.com/rstacruz/nprogress](https://github.com/rstacruz/nprogress) |
||||
|
|
||||
|
#### 架构图 |
||||
|
|
||||
|
##### 系统架构图 |
||||
|
|
||||
|
 |
||||
|
|
||||
|
##### 业务架构图 |
||||
|
|
||||
|
 |
||||
|
|
||||
|
#### 模块介绍 |
||||
|
|
||||
|
##### 后台管理系统 `mallplus-admin` |
||||
|
|
||||
|
- 商品管理:[功能结构图-商品.jpg](document/resource/mind_product.jpg) |
||||
|
- 订单管理:[功能结构图-订单.jpg](document/resource/mind_order.jpg) |
||||
|
- 促销管理:[功能结构图-促销.jpg](document/resource/mind_sale.jpg) |
||||
|
- 内容管理:[功能结构图-内容.jpg](document/resource/mind_content.jpg) |
||||
|
- 用户管理:[功能结构图-用户.jpg](document/resource/mind_member.jpg) |
||||
|
|
||||
|
##### 前台商城系统 `mallplus-portal` |
||||
|
|
||||
|
[功能结构图-前台.jpg](document/resource/mind_portal.jpg) |
||||
|
|
||||
|
#### 开发进度 |
||||
|
|
||||
|
 |
||||
|
|
||||
|
## 环境搭建 |
||||
|
|
||||
|
### 开发工具 |
||||
|
|
||||
|
工具 | 说明 | 官网 |
||||
|
----|----|---- |
||||
|
IDEA | 开发IDE | https://www.jetbrains.com/idea/download |
||||
|
RedisDesktop | redis客户端连接工具 | https://redisdesktop.com/download |
||||
|
Robomongo | mongo客户端连接工具 | https://robomongo.org/download |
||||
|
SwitchHosts| 本地host管理 | https://oldj.github.io/SwitchHosts/ |
||||
|
X-shell | Linux远程连接工具 | http://www.netsarang.com/download/software.html |
||||
|
Navicat | 数据库连接工具 | http://www.formysql.com/xiazai.html |
||||
|
PowerDesigner | 数据库设计工具 | http://powerdesigner.de/ |
||||
|
Axure | 原型设计工具 | https://www.axure.com/ |
||||
|
MindMaster | 思维导图设计工具 | http://www.edrawsoft.cn/mindmaster |
||||
|
ScreenToGif | gif录制工具 | https://www.screentogif.com/ |
||||
|
ProcessOn | 流程图绘制工具 | https://www.processon.com/ |
||||
|
PicPick | 屏幕取色工具 | https://picpick.app/zh/ |
||||
|
|
||||
|
### 开发环境 |
||||
|
|
||||
|
工具 | 版本号 | 下载 |
||||
|
----|----|---- |
||||
|
JDK | 1.8 | https://www.oracle.com/technetwork/java/javase/downloads/jdk8-downloads-2133151.html |
||||
|
Mysql | 5.7 | https://www.mysql.com/ |
||||
|
Redis | 3.2 | https://redis.io/download |
||||
|
Elasticsearch | 2.4.6 | https://www.elastic.co/downloads |
||||
|
MongoDb | 3.2 | https://www.mongodb.com/download-center |
||||
|
RabbitMq | 5.25 | http://www.rabbitmq.com/download.html |
||||
|
nginx | 1.10 | http://nginx.org/en/download.html |
||||
|
|
||||
|
### 搭建步骤 |
||||
|
|
||||
|
> 本地环境搭建 |
||||
|
|
||||
|
- 本地安装开发环境中的所有工具并启动,具体参考 |
||||
|
- 安装最新的数据库mallplus.sql,解压 前端vue mallplsu-admin-web.zip |
||||
|
- 克隆源代码到本地,使用IDEA或Eclipse打开,并完成编译; |
||||
|
- 在mysql中新建mall数据库,导入document/sql下的mall.sql文件; |
||||
|
- 启动mallplus-admin项目:直接运行com.zscat.mallplus.MallAdminApplication的main方法即可, |
||||
|
接口文档地址:http://localhost:8085/swagger-ui.html; |
||||
|
- 启动mall-search项目:直接运行com.zscat.mallplus.search.MallSearchApplication的main方法即可, |
||||
|
接口文档地址:http://localhost:8083/swagger-ui.html; |
||||
|
- 启动mallplus-portal项目:直接运行com.zscat.mallplus.portal.MallPortalApplication的main方法即可, |
||||
|
接口文档地址:http://localhost:8085/swagger-ui.html; |
||||
|
|
||||
|
|
||||
|
|
||||
|
## 项目相关文档 |
||||
|
|
||||
|
|
||||
|
|
||||
|
## 参考资料 |
||||
|
|
||||
|
- [Spring实战(第4版)](https://book.douban.com/subject/26767354/) |
||||
|
- [Spring Boot实战](https://book.douban.com/subject/26857423/) |
||||
|
- [Spring Cloud微服务实战](https://book.douban.com/subject/27025912/) |
||||
|
- [Spring Cloud与Docker微服务架构实战](https://book.douban.com/subject/27028228/) |
||||
|
- [Spring Data实战](https://book.douban.com/subject/25975186/) |
||||
|
- [MyBatis从入门到精通](https://book.douban.com/subject/27074809/) |
||||
|
- [深入浅出MySQL](https://book.douban.com/subject/25817684/) |
||||
|
- [循序渐进Linux(第2版)](https://book.douban.com/subject/26758194/) |
||||
|
- [Elasticsearch 技术解析与实战](https://book.douban.com/subject/26967826/) |
||||
|
- [MongoDB实战(第二版)](https://book.douban.com/subject/27061123/) |
||||
|
- [Kubernetes权威指南](https://book.douban.com/subject/26902153/) |
||||
|
- [mall商城](https://github.com/shenzhuan/mallplus) |
||||
|
- [mybatis-plus](https://gitee.com/baomidou/mybatis-plus) |
||||
|
|
||||
|
|
||||
|
## 许可证 |
||||
|
|
||||
|
[MIT](https://github.com/zscatzheng/mall/blob/master/LICENSE) |
||||
|
|
||||
|
Copyright (c) 2018-2019 zscatzheng |
@ -0,0 +1,107 @@ |
|||||
|
|
||||
|
alter table fenxiao_records add goodsId bigint not Null; |
||||
|
alter table fenxiao_records add type int not Null; |
||||
|
|
||||
|
alter table sms_coupon_history add min_point decimal not Null; |
||||
|
|
||||
|
alter table pms_product add is_fenxiao int ; |
||||
|
alter table oms_cart_item add is_fenxiao int ; |
||||
|
|
||||
|
CREATE TABLE `mallplus_keyword` ( |
||||
|
`id` int(11) NOT NULL AUTO_INCREMENT, |
||||
|
`keyword` varchar(127) NOT NULL DEFAULT '' COMMENT '关键字', |
||||
|
`url` varchar(255) NOT NULL DEFAULT '' COMMENT '关键字的跳转链接', |
||||
|
`is_hot` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否是热门关键字', |
||||
|
`is_default` tinyint(1) NOT NULL DEFAULT '0' COMMENT '是否是默认关键字', |
||||
|
`sort_order` int(11) NOT NULL DEFAULT '100' COMMENT '排序', |
||||
|
`add_time` datetime DEFAULT NULL COMMENT '创建时间', |
||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间', |
||||
|
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除', |
||||
|
PRIMARY KEY (`id`) |
||||
|
) ENGINE=InnoDB AUTO_INCREMENT=8 DEFAULT CHARSET=utf8mb4 COMMENT='关键字表'; |
||||
|
|
||||
|
CREATE TABLE `mallplus_search_history` ( |
||||
|
`id` int(11) NOT NULL AUTO_INCREMENT, |
||||
|
`user_id` int(11) NOT NULL COMMENT '用户表的用户ID', |
||||
|
`keyword` varchar(63) NOT NULL COMMENT '搜索关键字', |
||||
|
`from` varchar(63) NOT NULL DEFAULT '' COMMENT '搜索来源,如pc、wx、app', |
||||
|
`add_time` datetime DEFAULT NULL COMMENT '创建时间', |
||||
|
`update_time` datetime DEFAULT NULL COMMENT '更新时间', |
||||
|
`deleted` tinyint(1) DEFAULT '0' COMMENT '逻辑删除', |
||||
|
PRIMARY KEY (`id`) |
||||
|
) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='搜索历史表' |
||||
|
|
||||
|
alter table pms_product alter column is_fenxiao set default 0; |
||||
|
|
||||
|
alter table pms_product_attribute_category add column style set default 0; |
||||
|
|
||||
|
alter table pms_product_attribute_category add style int ; |
||||
|
alter table pms_product_attribute_category add show_index int ; |
||||
|
|
||||
|
|
||||
|
-- 20200318 会员等级计算 会员升级 会员购买 |
||||
|
alter table pms_product add is_vip int not null default 0; # 是否会员商品 |
||||
|
|
||||
|
alter table oms_order add vip_amount DECIMAL not null default 0; # 会员优惠价格 |
||||
|
|
||||
|
-- 20200321 商品分拥 |
||||
|
alter table oms_order_item add is_fenxiao int not null default 0; # 是否分拥 |
||||
|
|
||||
|
alter table oms_order_item add invite_memberId int not null default 0; # 分佣商品 链接带过来的会员编号 |
||||
|
|
||||
|
|
||||
|
-- 20200330 余额 |
||||
|
alter table ums_member_blance_log add status int not null default 0; # 审核状态 |
||||
|
alter table ums_member_blance_log add with_draw_type int not null default 0; # 提现类型 1 银行卡 2 微信 3支付宝 |
||||
|
alter table ums_member_blance_log add obj_id int not null default 0; # 关联提现类型的编号 |
||||
|
alter table ums_member_blance_log add objname varchar(127) ; # 关联提现类型的编号 |
||||
|
|
||||
|
alter table ums_member_receive_address add area_id varchar(12) ; |
||||
|
|
||||
|
alter table pms_product_attribute_value add sort int default 0; # |
||||
|
|
||||
|
|
||||
|
-- 门店 |
||||
|
CREATE TABLE `sys_shop` ( |
||||
|
`id` bigint(11) unsigned NOT NULL AUTO_INCREMENT COMMENT 'id', |
||||
|
`store_name` varchar(125) DEFAULT NULL COMMENT '门店名称', |
||||
|
`mobile` varchar(13) DEFAULT NULL COMMENT '门店电话/手机号', |
||||
|
`linkman` varchar(32) DEFAULT NULL COMMENT '门店联系人', |
||||
|
`logo` char(32) DEFAULT NULL COMMENT '门店logo', |
||||
|
`area_id` int(10) unsigned DEFAULT NULL COMMENT '门店地区id', |
||||
|
`address` varchar(200) DEFAULT NULL COMMENT '门店详细地址', |
||||
|
`coordinate` varchar(50) DEFAULT NULL, |
||||
|
`latitude` varchar(40) DEFAULT NULL COMMENT '纬度', |
||||
|
`longitude` varchar(40) DEFAULT NULL COMMENT '经度', |
||||
|
`ctime` datetime DEFAULT NULL COMMENT '创建时间', |
||||
|
`utime` datetime DEFAULT NULL COMMENT '更新时间', |
||||
|
`store_id` int(11) DEFAULT NULL, |
||||
|
PRIMARY KEY (`id`) USING BTREE |
||||
|
) ENGINE=InnoDB AUTO_INCREMENT=3 DEFAULT CHARSET=utf8mb4; |
||||
|
|
||||
|
alter table sys_permission add component varchar(42) ; |
||||
|
|
||||
|
update sys_permission set component ='Layout' where pid=0; |
||||
|
|
||||
|
update sys_permission set component = concat('pms','/',uri,'/index') where type=1 and pid=1; |
||||
|
|
||||
|
update sys_permission set component = concat('sys','/',uri,'/index') where type=1 and pid=19; |
||||
|
|
||||
|
update sys_permission set component = concat('oms','/',uri,'/index') where type=1 and pid=23; |
||||
|
|
||||
|
update sys_permission set component = concat('sms','/',uri,'/index') where type=1 and pid=31; |
||||
|
|
||||
|
update sys_permission set component = concat('marking','/',uri,'/index') where type=1 and pid=350; |
||||
|
|
||||
|
|
||||
|
update sys_permission set component = concat('cms','/',uri,'/index') where type=1 and pid=47; |
||||
|
update sys_permission set component = concat('build','/',uri,'/index') where type=1 and pid=230; |
||||
|
update sys_permission set component = concat('fenxiao','/',uri,'/index') where type=1 and pid=314; |
||||
|
update sys_permission set component = concat('jifen','/',uri,'/index') where type=1 and pid=313; |
||||
|
|
||||
|
update sys_permission set component = concat('setting','/',uri,'/index') where type=1 and pid=500; |
||||
|
|
||||
|
update sys_permission set component = concat('tool','/',uri,'/index') where type=1 and pid=351; |
||||
|
|
||||
|
update sys_permission set component = concat('ums','/',uri,'/index') where type=1 and pid=43; |
||||
|
|
@ -0,0 +1,106 @@ |
|||||
|
--0426 |
||||
|
1.商品表 delete_status 1->未删除;0->已删除 |
||||
|
2.订单列表和商品列表分别添加tab(快速刷选不同状态的数据) |
||||
|
3.如果演示有的菜单 你没有,需要对比最新的 sys_permission 表 |
||||
|
4.小程序编译和登录优化 |
||||
|
|
||||
|
|
||||
|
--0425 |
||||
|
数据库密码加密(druid) |
||||
|
商城设置下添加 标签管理 |
||||
|
店铺管理 添加 店内分类和商户评价 |
||||
|
添加商品中增加店内分类和标签选择 |
||||
|
|
||||
|
uniapp 店铺 评价和收藏 标签页面和标签下的商品 |
||||
|
alter table ums_member_tag add pic varchar(127) ; |
||||
|
alter table ums_member_tag add status BIGINT not null default 0; |
||||
|
alter table pms_product add tags varchar(127) ; |
||||
|
alter table pms_product add store_class_id bigint ; |
||||
|
|
||||
|
-- 0423 拼团优化 文档https://gitee.com/zscat/mallplus/wikis/pages/preview?sort_id=1699565&doc_id=326093 |
||||
|
alter table sms_group_member add group_id BIGINT not null default 0; |
||||
|
alter table sms_group_record add handle_status int not null default 1; |
||||
|
SELECT * from sys_store_class ; -- 店铺分类 |
||||
|
SELECT * from sys_store_comment ; -- 店铺评论 |
||||
|
|
||||
|
CREATE TABLE `sys_store_class` ( |
||||
|
`id` bigint NOT NULL AUTO_INCREMENT, |
||||
|
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称', |
||||
|
`create_time` datetime NOT NULL COMMENT '创建时间', |
||||
|
`pic` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '图片', |
||||
|
`sort` int DEFAULT NULL COMMENT '排序', |
||||
|
`memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注', |
||||
|
`store_id` int DEFAULT NULL, |
||||
|
PRIMARY KEY (`id`) USING BTREE, |
||||
|
UNIQUE KEY `name` (`name`) USING BTREE |
||||
|
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; |
||||
|
|
||||
|
CREATE TABLE `sys_store_comment` ( |
||||
|
`id` bigint NOT NULL AUTO_INCREMENT, |
||||
|
`name` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci NOT NULL COMMENT '名称', |
||||
|
`create_time` datetime NOT NULL COMMENT '创建时间', |
||||
|
`pic` varchar(200) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '图片', |
||||
|
`sort` int DEFAULT NULL COMMENT '排序', |
||||
|
`memo` varchar(255) CHARACTER SET utf8 COLLATE utf8_general_ci DEFAULT NULL COMMENT '备注', |
||||
|
`store_id` int DEFAULT NULL, |
||||
|
`member_id` int DEFAULT NULL, |
||||
|
`star` int DEFAULT NULL COMMENT '等级', |
||||
|
PRIMARY KEY (`id`) USING BTREE, |
||||
|
UNIQUE KEY `name` (`name`) USING BTREE |
||||
|
) ENGINE=InnoDB AUTO_INCREMENT=10 DEFAULT CHARSET=utf8; |
||||
|
|
||||
|
-- 0425 退款定时任务 |
||||
|
alter table oms_order_return_apply add refund_status int not null default 0; |
||||
|
|
||||
|
-- 0421 首页推荐优化 |
||||
|
alter table sms_home_recommend_subject add pic varchar(127) ; |
||||
|
alter table sms_home_recommend_subject add read_count int ; |
||||
|
alter table sms_home_recommend_subject add description varchar(127) ; |
||||
|
|
||||
|
alter table sms_home_brand add logo varchar(127) ; |
||||
|
|
||||
|
--0419 |
||||
|
alter table sms_home_new_product add price decimal ; |
||||
|
alter table sms_home_new_product add pic varchar(127) ; |
||||
|
|
||||
|
alter table sms_home_recommend_product add price decimal ; |
||||
|
alter table sms_home_recommend_product add pic varchar(127) ; |
||||
|
|
||||
|
alter table oms_payments add store_id int not null default 0; |
||||
|
1.uniapp 首页添加人气推荐和新品推荐 添加版本信息页面 订单列表重复问题 。 |
||||
|
2。后台管理 支付列表出不来(更新) |
||||
|
3.分销问题(二级分销获取用户信息错误) |
||||
|
4.拼团结构调整 |
||||
|
|
||||
|
|
||||
|
--0316 |
||||
|
后台商户系统 |
||||
|
1.运营管理 添加门店维护 |
||||
|
2.优化 设置管理下面的 小程序设置 积分设置和支付设置 |
||||
|
3.登录添加租户判断,审核通过的才能登录 |
||||
|
|
||||
|
uniapp用户端 |
||||
|
1.优化登录相关错误 |
||||
|
2.会员折扣展示和购买 |
||||
|
3.接入商户端数据统计(会员 订单和商品) |
||||
|
4.区域商品展示 |
||||
|
5.分类页面优化 |
||||
|
|
||||
|
admin6918 898158 |
||||
|
shop7586 985819 |
||||
|
|
||||
|
-- 预存款 |
||||
|
update oms_order set create_time=now(); |
||||
|
update pms_product set create_time=now(); |
||||
|
|
||||
|
update sys_store set pay_amount=0,amount=0; |
||||
|
delete FROM sys_store_deposit_log ; |
||||
|
delete FROM sys_store_cash ; |
||||
|
delete FROM admin_day_statics ; |
||||
|
|
||||
|
|
||||
|
商户等级 商户列表 商户充值 提现和提现审核 |
||||
|
|
||||
|
数据库密码 加密 |
||||
|
https://blog.csdn.net/huijiangu4621/article/details/90403130 |
||||
|
多租户版本 ums_member 用户名和store_id需要添加唯一索引 |
@ -0,0 +1,17 @@ |
|||||
|
支付宝回调 |
||||
|
{ |
||||
|
"alipay_trade_app_pay_response": { |
||||
|
"code": "10000", |
||||
|
"msg": "Success", |
||||
|
"app_id": "20204939183847", |
||||
|
"auth_app_id": "20204939183847", |
||||
|
"charset": "UTF-8", |
||||
|
"timestamp": "2020-04-21 15:04:58", |
||||
|
"out_trade_no": "2871031303901184", |
||||
|
"total_amount": "0.01", |
||||
|
"trade_no": "2020042122001458671441351997", |
||||
|
"seller_id": "20204939183847" |
||||
|
}, |
||||
|
"sign": "YlpKPoPWuIpLKjbvfshhdhsbhcds&cds+taQE97xvT3C1r6a0tWekeTRCAQHZAg6QIBGWP2/OhrVQiEb4+NJil89l84UMMDKSH86sGDlDko8yKeG2BnXVtAv4eEBUtwG3jivivCnezZK/XgZmb/DHrW75MCKjdsjKldskv8cdshkIhncjdsj^tsaHHDdTXnMtVxTOifPw4etlkaKD8xKduIm132K+aJeYXpxq0y/lUAp2OSIjbvdfk(bjcGSHBKkd$3cshoffA==", |
||||
|
"sign_type": "RSA2" |
||||
|
} |
Binary file not shown.
@ -0,0 +1,256 @@ |
|||||
|
<project xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns="http://maven.apache.org/POM/4.0.0" |
||||
|
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/maven-v4_0_0.xsd"> |
||||
|
<modelVersion>4.0.0</modelVersion> |
||||
|
|
||||
|
|
||||
|
<groupId>com.zscat.mallplus</groupId> |
||||
|
<artifactId>mallplus-admin</artifactId> |
||||
|
<version>0.0.1-SNAPSHOT</version> |
||||
|
<packaging>jar</packaging> |
||||
|
|
||||
|
<name>mallplus-admin</name> |
||||
|
<description>mallplus-admin project for mall</description> |
||||
|
<parent> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-parent</artifactId> |
||||
|
<!--<version>2.1.3.RELEASE</version>--> |
||||
|
<version>2.1.3.RELEASE</version> |
||||
|
<relativePath/> <!-- lookup parent from repository --> |
||||
|
</parent> |
||||
|
|
||||
|
<repositories> |
||||
|
<repository> |
||||
|
<id>aliyun</id> |
||||
|
<url>http://maven.aliyun.com/nexus/content/groups/public/</url> |
||||
|
</repository> |
||||
|
<repository> |
||||
|
<id>aliyun_thirdparty</id> |
||||
|
<url>http://maven.aliyun.com/nexus/content/repositories/thirdparty/</url> |
||||
|
</repository> |
||||
|
<repository> |
||||
|
<id>spring-snapshots</id> |
||||
|
<url>http://repo.spring.io/libs-snapshot</url> |
||||
|
</repository> |
||||
|
</repositories> |
||||
|
<pluginRepositories> |
||||
|
<pluginRepository> |
||||
|
<id>aliyun</id> |
||||
|
<url>http://maven.aliyun.com/nexus/content/groups/public/</url> |
||||
|
</pluginRepository> |
||||
|
<pluginRepository> |
||||
|
<id>spring-snapshots</id> |
||||
|
<url>http://repo.spring.io/libs-snapshot</url> |
||||
|
</pluginRepository> |
||||
|
</pluginRepositories> |
||||
|
<properties> |
||||
|
<project.build.sourceEncoding>UTF-8</project.build.sourceEncoding> |
||||
|
<project.reporting.outputEncoding>UTF-8</project.reporting.outputEncoding> |
||||
|
<java.version>1.8</java.version> |
||||
|
<j2cache.version>2.7.2-release</j2cache.version> |
||||
|
<skipTests>true</skipTests> |
||||
|
</properties> |
||||
|
|
||||
|
<dependencies> |
||||
|
<!-- https://mvnrepository.com/artifact/org.jsoup/jsoup --> |
||||
|
<dependency> |
||||
|
<groupId>org.jsoup</groupId> |
||||
|
<artifactId>jsoup</artifactId> |
||||
|
<version>1.12.1</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.geccocrawler</groupId> |
||||
|
<artifactId>gecco</artifactId> |
||||
|
<version>1.0.8</version> |
||||
|
</dependency> |
||||
|
<!-- https://mvnrepository.com/artifact/com.alibaba/fastjson --> |
||||
|
<dependency> |
||||
|
<groupId>com.alibaba</groupId> |
||||
|
<artifactId>fastjson</artifactId> |
||||
|
<version>1.2.59</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>commons-io</groupId> |
||||
|
<artifactId>commons-io</artifactId> |
||||
|
<version>2.5</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>commons-configuration</groupId> |
||||
|
<artifactId>commons-configuration</artifactId> |
||||
|
<version>1.10</version> |
||||
|
</dependency> |
||||
|
|
||||
|
<!--模板引擎--> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-freemarker</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<!-- 定时任务 --> |
||||
|
<dependency> |
||||
|
<groupId>org.quartz-scheduler</groupId> |
||||
|
<artifactId>quartz</artifactId> |
||||
|
<exclusions> |
||||
|
<exclusion> |
||||
|
<groupId>com.mchange</groupId> |
||||
|
<artifactId>c3p0</artifactId> |
||||
|
</exclusion> |
||||
|
</exclusions> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>com.zscat.mallplus</groupId> |
||||
|
<artifactId>mallplus-mbg</artifactId> |
||||
|
<version>1.0-SNAPSHOT</version> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-web</artifactId> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-security</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-actuator</artifactId> |
||||
|
</dependency> |
||||
|
<!--redis依赖配置--> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-cache</artifactId> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-redis</artifactId> |
||||
|
<version>1.3.8.RELEASE</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-test</artifactId> |
||||
|
<scope>test</scope> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-aop</artifactId> |
||||
|
</dependency> |
||||
|
|
||||
|
<!--Swagger-UI API文档生产工具--> |
||||
|
<dependency> |
||||
|
<groupId>io.springfox</groupId> |
||||
|
<artifactId>springfox-swagger2</artifactId> |
||||
|
<version>2.7.0</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>io.springfox</groupId> |
||||
|
<artifactId>springfox-swagger-ui</artifactId> |
||||
|
<version>2.7.0</version> |
||||
|
</dependency> |
||||
|
<!--JWT(Json Web Token)登录支持--> |
||||
|
<dependency> |
||||
|
<groupId>io.jsonwebtoken</groupId> |
||||
|
<artifactId>jjwt</artifactId> |
||||
|
<version>0.9.0</version> |
||||
|
</dependency> |
||||
|
<!-- 阿里云OSS --> |
||||
|
<dependency> |
||||
|
<groupId>com.aliyun.oss</groupId> |
||||
|
<artifactId>aliyun-sdk-oss</artifactId> |
||||
|
<version>2.5.0</version> |
||||
|
</dependency> |
||||
|
<!--集成logstash--> |
||||
|
<dependency> |
||||
|
<groupId>net.logstash.logback</groupId> |
||||
|
<artifactId>logstash-logback-encoder</artifactId> |
||||
|
<version>4.8</version> |
||||
|
</dependency> |
||||
|
<!--redis依赖配置--> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-cache</artifactId> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-starter-redis</artifactId> |
||||
|
<version>1.3.8.RELEASE</version> |
||||
|
</dependency> |
||||
|
<!--lombok依赖--> |
||||
|
<dependency> |
||||
|
<groupId>org.projectlombok</groupId> |
||||
|
<artifactId>lombok</artifactId> |
||||
|
<optional>true</optional> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>cn.afterturn</groupId> |
||||
|
<artifactId>easypoi-base</artifactId> |
||||
|
<version>3.2.0</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>cn.afterturn</groupId> |
||||
|
<artifactId>easypoi-web</artifactId> |
||||
|
<version>3.2.0</version> |
||||
|
</dependency> |
||||
|
<dependency> |
||||
|
<groupId>cn.afterturn</groupId> |
||||
|
<artifactId>easypoi-annotation</artifactId> |
||||
|
<version>3.2.0</version> |
||||
|
</dependency> |
||||
|
</dependencies> |
||||
|
|
||||
|
|
||||
|
<build> |
||||
|
<resources> |
||||
|
<resource> |
||||
|
<directory>src/main/java</directory> |
||||
|
<includes> |
||||
|
<include>**/*.xml</include> |
||||
|
<include>**/*.ftl</include> |
||||
|
<include>**/*.properties</include> |
||||
|
</includes> |
||||
|
<filtering>false</filtering> |
||||
|
</resource> |
||||
|
<resource> |
||||
|
<directory>src/main/resources</directory> |
||||
|
<includes> |
||||
|
<include>**/*.xml</include> |
||||
|
<include>**/*.ftl</include> |
||||
|
<include>**/*.properties</include> |
||||
|
</includes> |
||||
|
<filtering>false</filtering> |
||||
|
</resource> |
||||
|
</resources> |
||||
|
<plugins> |
||||
|
<plugin> |
||||
|
<groupId>org.springframework.boot</groupId> |
||||
|
<artifactId>spring-boot-maven-plugin</artifactId> |
||||
|
</plugin> |
||||
|
<!--<plugin>--> |
||||
|
<!--<groupId>com.spotify</groupId>--> |
||||
|
<!--<artifactId>docker-maven-plugin</artifactId>--> |
||||
|
<!--<version>1.1.0</version>--> |
||||
|
<!--<executions>--> |
||||
|
<!--<execution>--> |
||||
|
<!--<id>build-image</id>--> |
||||
|
<!--<phase>package</phase>--> |
||||
|
<!--<goals>--> |
||||
|
<!--<goal>build</goal>--> |
||||
|
<!--</goals>--> |
||||
|
<!--</execution>--> |
||||
|
<!--</executions>--> |
||||
|
<!--<configuration>--> |
||||
|
<!--<imageName>mall/${project.artifactId}:${project.version}</imageName>--> |
||||
|
<!--<dockerHost>http://39.98.190.128:2375</dockerHost>--> |
||||
|
<!--<baseImage>java:8</baseImage>--> |
||||
|
<!--<entryPoint>["java", "-jar", "-Dspring.profiles.active=prod","/${project.build.finalName}.jar"]</entryPoint>--> |
||||
|
<!--<resources>--> |
||||
|
<!--<resource>--> |
||||
|
<!--<targetPath>/</targetPath>--> |
||||
|
<!--<directory>${project.build.directory}</directory>--> |
||||
|
<!--<include>${project.build.finalName}.jar</include>--> |
||||
|
<!--</resource>--> |
||||
|
<!--</resources>--> |
||||
|
<!--</configuration>--> |
||||
|
<!--</plugin>--> |
||||
|
</plugins> |
||||
|
</build> |
||||
|
</project> |
@ -0,0 +1,36 @@ |
|||||
|
package com.zscat.mallplus; |
||||
|
|
||||
|
import com.zscat.mallplus.sys.mapper.GeneratorMapper; |
||||
|
import org.springframework.beans.factory.annotation.Autowired; |
||||
|
import org.springframework.boot.CommandLineRunner; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
|
||||
|
/** |
||||
|
* @author lnj |
||||
|
* createTime 2018-11-07 22:25 |
||||
|
**/ |
||||
|
@Component |
||||
|
public class CommandLineRunnerImpl implements CommandLineRunner { |
||||
|
@Autowired |
||||
|
GeneratorMapper generatorMapper; |
||||
|
|
||||
|
public static void main(String[] args) { |
||||
|
System.out.println("http://localhost:8083/cms/CmsSubjectCategory/list".replace("//", "a").indexOf("/") + 1); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public void run(String... args) throws Exception { |
||||
|
|
||||
|
/*List<Map<String, Object>> tables = generatorMapper.list(); |
||||
|
for (Map<String, Object> map : tables) { |
||||
|
List<Map<String, String>> colus = generatorMapper.listColumns(map.get("tableName").toString()); |
||||
|
for (Map<String, String> mapc : colus) { |
||||
|
if (mapc.get("columnName").equals("store_id")) { |
||||
|
Constant.Tables.put(map.get("tableName").toString(), "1"); |
||||
|
|
||||
|
} |
||||
|
} |
||||
|
}*/ |
||||
|
|
||||
|
} |
||||
|
} |
@ -0,0 +1,27 @@ |
|||||
|
package com.zscat.mallplus; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public class ExportGoods { |
||||
|
@Excel(name = "去", width = 10) |
||||
|
private String username; |
||||
|
@Excel(name = "去去", width = 10) |
||||
|
private String img; |
||||
|
@Excel(name = "去去去", width = 10) |
||||
|
private String detail; |
||||
|
@Excel(name = "去去去去", width = 10) |
||||
|
private String price; |
||||
|
@Excel(name = "去去去去去", width = 10) |
||||
|
private String originprice; |
||||
|
@Excel(name = "去去去去去去", width = 10) |
||||
|
private String detail1; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,21 @@ |
|||||
|
package com.zscat.mallplus; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public class ExportSubject { |
||||
|
@Excel(name = "去", width = 10) |
||||
|
private String title; |
||||
|
@Excel(name = "去去", width = 10) |
||||
|
private String pic; |
||||
|
@Excel(name = "去去去", width = 10) |
||||
|
private String content; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,22 @@ |
|||||
|
package com.zscat.mallplus; |
||||
|
|
||||
|
import cn.afterturn.easypoi.excel.annotation.Excel; |
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
import java.util.Date; |
||||
|
|
||||
|
@Data |
||||
|
@NoArgsConstructor |
||||
|
@AllArgsConstructor |
||||
|
public class ExportUser { |
||||
|
@Excel(name = "用户名", width = 10) |
||||
|
private String username; |
||||
|
|
||||
|
@Excel(name = "创建时间", format = "yyyy-MM-dd", width = 15) |
||||
|
private Date createTime; |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus; |
||||
|
|
||||
|
import org.mybatis.spring.annotation.MapperScan; |
||||
|
import org.springframework.boot.SpringApplication; |
||||
|
import org.springframework.boot.autoconfigure.SpringBootApplication; |
||||
|
import org.springframework.boot.autoconfigure.jdbc.DataSourceAutoConfiguration; |
||||
|
import org.springframework.transaction.annotation.EnableTransactionManagement; |
||||
|
|
||||
|
/** |
||||
|
* 应用启动入口 |
||||
|
* https://github.com/shenzhuan/mallplus on 2018/4/26.
|
||||
|
*/ |
||||
|
@SpringBootApplication(exclude = {DataSourceAutoConfiguration.class}) |
||||
|
@MapperScan({"com.zscat.mallplus.mapper", "com.zscat.mallplus.ums.mapper", "com.zscat.mallplus.sms.mapper", "com.zscat.mallplus.cms.mapper", "com.zscat.mallplus.sys.mapper", "com.zscat.mallplus.oms.mapper", "com.zscat.mallplus.pms.mapper"}) |
||||
|
@EnableTransactionManagement |
||||
|
public class MallAdminApplication { |
||||
|
public static void main(String[] args) { |
||||
|
SpringApplication.run(MallAdminApplication.class, args); |
||||
|
} |
||||
|
} |
@ -0,0 +1,52 @@ |
|||||
|
package com.zscat.mallplus.bill.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.bill.entity.BillAftersales; |
||||
|
import com.zscat.mallplus.bill.service.IBillAftersalesService; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
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.RestController; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 退货单表 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/bill/billAftersales") |
||||
|
public class BillAftersalesController { |
||||
|
|
||||
|
@Resource |
||||
|
private IBillAftersalesService billAftersalesService; |
||||
|
|
||||
|
@SysLog(MODULE = "bill", REMARK = "根据条件查询所有退货单表") |
||||
|
@ApiOperation("根据条件查询所有退货单表") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Object getCmsHelpByPage(BillAftersales entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(billAftersalesService.page(new Page<BillAftersales>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有帮助表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,51 @@ |
|||||
|
package com.zscat.mallplus.bill.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.bill.entity.BillDelivery; |
||||
|
import com.zscat.mallplus.bill.service.IBillDeliveryService; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
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.RestController; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 发货单表 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/bill/billDelivery") |
||||
|
public class BillDeliveryController { |
||||
|
|
||||
|
@Resource |
||||
|
private IBillDeliveryService billAftersalesService; |
||||
|
|
||||
|
@SysLog(MODULE = "bill", REMARK = "根据条件查询所有发货单表") |
||||
|
@ApiOperation("根据条件查询所有发货单表") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Object getCmsHelpByPage(BillDelivery entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(billAftersalesService.page(new Page<BillDelivery>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有帮助表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,50 @@ |
|||||
|
package com.zscat.mallplus.bill.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.bill.entity.BillLading; |
||||
|
import com.zscat.mallplus.bill.service.IBillLadingService; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
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.RestController; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 提货单表 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/bill/billLading") |
||||
|
public class BillLadingController { |
||||
|
|
||||
|
@Resource |
||||
|
private IBillLadingService billAftersalesService; |
||||
|
|
||||
|
@SysLog(MODULE = "bill", REMARK = "根据条件查询所有提货单表") |
||||
|
@ApiOperation("根据条件查询提货单表") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Object getCmsHelpByPage(BillLading entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(billAftersalesService.page(new Page<BillLading>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有帮助表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,50 @@ |
|||||
|
package com.zscat.mallplus.bill.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.bill.entity.BillPayments; |
||||
|
import com.zscat.mallplus.bill.service.IBillPaymentsService; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
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.RestController; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 支付单表 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/bill/billPayments") |
||||
|
public class BillPaymentsController { |
||||
|
|
||||
|
@Resource |
||||
|
private IBillPaymentsService billAftersalesService; |
||||
|
|
||||
|
@SysLog(MODULE = "bill", REMARK = "根据条件查询所有支付单表") |
||||
|
@ApiOperation("根据条件查询所有支付单表") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Object getCmsHelpByPage(BillPayments entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(billAftersalesService.page(new Page<BillPayments>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有帮助表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,50 @@ |
|||||
|
package com.zscat.mallplus.bill.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.bill.entity.BillRefund; |
||||
|
import com.zscat.mallplus.bill.service.IBillRefundService; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
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.RestController; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 退款单表 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/bill/billRefund") |
||||
|
public class BillRefundController { |
||||
|
|
||||
|
@Resource |
||||
|
private IBillRefundService billAftersalesService; |
||||
|
|
||||
|
@SysLog(MODULE = "bill", REMARK = "根据条件查询所有退款单表") |
||||
|
@ApiOperation("根据条件查询所有退款单表") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Object getCmsHelpByPage(BillRefund entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(billAftersalesService.page(new Page<BillRefund>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有帮助表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,50 @@ |
|||||
|
package com.zscat.mallplus.bill.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.bill.entity.BillReship; |
||||
|
import com.zscat.mallplus.bill.service.IBillReshipService; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
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.RestController; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 退货单表 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/bill/billReship") |
||||
|
public class BillReshipController { |
||||
|
|
||||
|
@Resource |
||||
|
private IBillReshipService billAftersalesService; |
||||
|
|
||||
|
@SysLog(MODULE = "bill", REMARK = "根据条件查询所有退货单表表") |
||||
|
@ApiOperation("根据条件查询所有退货单表") |
||||
|
@GetMapping(value = "/list") |
||||
|
public Object getCmsHelpByPage(BillReship entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(billAftersalesService.page(new Page<BillReship>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有退货单表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BakCategory; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 类目表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-17 |
||||
|
*/ |
||||
|
public interface IBakCategoryService extends IService<BakCategory> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BakGoods; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 商品基本信息表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-17 |
||||
|
*/ |
||||
|
public interface IBakGoodsService extends IService<BakGoods> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BillAftersalesItems; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 售后单明细表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
public interface IBillAftersalesItemsService extends IService<BillAftersalesItems> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BillAftersales; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 退货单表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
public interface IBillAftersalesService extends IService<BillAftersales> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BillDeliveryItems; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 发货单详情表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
public interface IBillDeliveryItemsService extends IService<BillDeliveryItems> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BillDelivery; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 发货单表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
public interface IBillDeliveryService extends IService<BillDelivery> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BillLading; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 提货单表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
public interface IBillLadingService extends IService<BillLading> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BillPaymentsRel; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 支付单明细表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
public interface IBillPaymentsRelService extends IService<BillPaymentsRel> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BillPayments; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 支付单表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
public interface IBillPaymentsService extends IService<BillPayments> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BillRefund; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 退款单表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
public interface IBillRefundService extends IService<BillRefund> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BillReshipItems; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 退货单明细表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
public interface IBillReshipItemsService extends IService<BillReshipItems> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.bill.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.bill.entity.BillReship; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 退货单表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
public interface IBillReshipService extends IService<BillReship> { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BakCategory; |
||||
|
import com.zscat.mallplus.bill.mapper.BakCategoryMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBakCategoryService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 类目表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-17 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BakCategoryServiceImpl extends ServiceImpl<BakCategoryMapper, BakCategory> implements IBakCategoryService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BakGoods; |
||||
|
import com.zscat.mallplus.bill.mapper.BakGoodsMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBakGoodsService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 商品基本信息表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-17 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BakGoodsServiceImpl extends ServiceImpl<BakGoodsMapper, BakGoods> implements IBakGoodsService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BillAftersalesItems; |
||||
|
import com.zscat.mallplus.bill.mapper.BillAftersalesItemsMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBillAftersalesItemsService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 售后单明细表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BillAftersalesItemsServiceImpl extends ServiceImpl<BillAftersalesItemsMapper, BillAftersalesItems> implements IBillAftersalesItemsService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BillAftersales; |
||||
|
import com.zscat.mallplus.bill.mapper.BillAftersalesMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBillAftersalesService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 退货单表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BillAftersalesServiceImpl extends ServiceImpl<BillAftersalesMapper, BillAftersales> implements IBillAftersalesService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BillDeliveryItems; |
||||
|
import com.zscat.mallplus.bill.mapper.BillDeliveryItemsMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBillDeliveryItemsService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 发货单详情表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BillDeliveryItemsServiceImpl extends ServiceImpl<BillDeliveryItemsMapper, BillDeliveryItems> implements IBillDeliveryItemsService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BillDelivery; |
||||
|
import com.zscat.mallplus.bill.mapper.BillDeliveryMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBillDeliveryService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 发货单表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BillDeliveryServiceImpl extends ServiceImpl<BillDeliveryMapper, BillDelivery> implements IBillDeliveryService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BillLading; |
||||
|
import com.zscat.mallplus.bill.mapper.BillLadingMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBillLadingService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 提货单表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BillLadingServiceImpl extends ServiceImpl<BillLadingMapper, BillLading> implements IBillLadingService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BillPaymentsRel; |
||||
|
import com.zscat.mallplus.bill.mapper.BillPaymentsRelMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBillPaymentsRelService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 支付单明细表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BillPaymentsRelServiceImpl extends ServiceImpl<BillPaymentsRelMapper, BillPaymentsRel> implements IBillPaymentsRelService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BillPayments; |
||||
|
import com.zscat.mallplus.bill.mapper.BillPaymentsMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBillPaymentsService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 支付单表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BillPaymentsServiceImpl extends ServiceImpl<BillPaymentsMapper, BillPayments> implements IBillPaymentsService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BillRefund; |
||||
|
import com.zscat.mallplus.bill.mapper.BillRefundMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBillRefundService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 退款单表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BillRefundServiceImpl extends ServiceImpl<BillRefundMapper, BillRefund> implements IBillRefundService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BillReshipItems; |
||||
|
import com.zscat.mallplus.bill.mapper.BillReshipItemsMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBillReshipItemsService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 退货单明细表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BillReshipItemsServiceImpl extends ServiceImpl<BillReshipItemsMapper, BillReshipItems> implements IBillReshipItemsService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.bill.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.bill.entity.BillReship; |
||||
|
import com.zscat.mallplus.bill.mapper.BillReshipMapper; |
||||
|
import com.zscat.mallplus.bill.service.IBillReshipService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 退货单表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-09-16 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BillReshipServiceImpl extends ServiceImpl<BillReshipMapper, BillReship> implements IBillReshipService { |
||||
|
|
||||
|
} |
@ -0,0 +1,72 @@ |
|||||
|
package com.zscat.mallplus.bo; |
||||
|
|
||||
|
import com.zscat.mallplus.sys.entity.SysPermission; |
||||
|
import com.zscat.mallplus.sys.entity.SysUser; |
||||
|
import org.springframework.security.core.GrantedAuthority; |
||||
|
import org.springframework.security.core.authority.SimpleGrantedAuthority; |
||||
|
import org.springframework.security.core.userdetails.UserDetails; |
||||
|
|
||||
|
import java.util.Collection; |
||||
|
import java.util.List; |
||||
|
import java.util.stream.Collectors; |
||||
|
|
||||
|
/** |
||||
|
* SpringSecurity需要的用户详情 |
||||
|
* https://github.com/shenzhuan/mallplus on 2018/4/28.
|
||||
|
*/ |
||||
|
public class AdminUserDetails implements UserDetails { |
||||
|
private SysUser umsAdmin; |
||||
|
private List<SysPermission> permissionList; |
||||
|
|
||||
|
public AdminUserDetails(SysUser umsAdmin, List<SysPermission> permissionList) { |
||||
|
this.umsAdmin = umsAdmin; |
||||
|
this.permissionList = permissionList; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public Collection<? extends GrantedAuthority> getAuthorities() { |
||||
|
//返回当前用户的权限
|
||||
|
return permissionList.stream() |
||||
|
.filter(permission -> permission.getValue() != null) |
||||
|
.map(permission -> new SimpleGrantedAuthority(permission.getValue())) |
||||
|
.collect(Collectors.toList()); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getPassword() { |
||||
|
return umsAdmin.getPassword(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String getUsername() { |
||||
|
return umsAdmin.getUsername(); |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public boolean isAccountNonExpired() { |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public boolean isAccountNonLocked() { |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public boolean isCredentialsNonExpired() { |
||||
|
return true; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public boolean isEnabled() { |
||||
|
return umsAdmin.getStatus().equals(1); |
||||
|
} |
||||
|
|
||||
|
public SysUser getUmsAdmin() { |
||||
|
return umsAdmin; |
||||
|
} |
||||
|
|
||||
|
public void setUmsAdmin(SysUser umsAdmin) { |
||||
|
this.umsAdmin = umsAdmin; |
||||
|
} |
||||
|
} |
@ -0,0 +1,91 @@ |
|||||
|
package com.zscat.mallplus.bo; |
||||
|
|
||||
|
/** |
||||
|
* 列的属性 |
||||
|
*/ |
||||
|
public class ColumnDO { |
||||
|
// 列名
|
||||
|
private String columnName; |
||||
|
// 列名类型
|
||||
|
private String dataType; |
||||
|
// 列名备注
|
||||
|
private String comments; |
||||
|
|
||||
|
// 属性名称(第一个字母大写),如:user_name => UserName
|
||||
|
private String attrName; |
||||
|
// 属性名称(第一个字母小写),如:user_name => userName
|
||||
|
private String attrname; |
||||
|
// 属性类型
|
||||
|
private String attrType; |
||||
|
// auto_increment
|
||||
|
private String extra; |
||||
|
|
||||
|
public String getColumnName() { |
||||
|
return columnName; |
||||
|
} |
||||
|
|
||||
|
public void setColumnName(String columnName) { |
||||
|
this.columnName = columnName; |
||||
|
} |
||||
|
|
||||
|
public String getDataType() { |
||||
|
return dataType; |
||||
|
} |
||||
|
|
||||
|
public void setDataType(String dataType) { |
||||
|
this.dataType = dataType; |
||||
|
} |
||||
|
|
||||
|
public String getComments() { |
||||
|
return comments; |
||||
|
} |
||||
|
|
||||
|
public void setComments(String comments) { |
||||
|
this.comments = comments; |
||||
|
} |
||||
|
|
||||
|
public String getAttrname() { |
||||
|
return attrname; |
||||
|
} |
||||
|
|
||||
|
public void setAttrname(String attrname) { |
||||
|
this.attrname = attrname; |
||||
|
} |
||||
|
|
||||
|
public String getAttrName() { |
||||
|
return attrName; |
||||
|
} |
||||
|
|
||||
|
public void setAttrName(String attrName) { |
||||
|
this.attrName = attrName; |
||||
|
} |
||||
|
|
||||
|
public String getAttrType() { |
||||
|
return attrType; |
||||
|
} |
||||
|
|
||||
|
public void setAttrType(String attrType) { |
||||
|
this.attrType = attrType; |
||||
|
} |
||||
|
|
||||
|
public String getExtra() { |
||||
|
return extra; |
||||
|
} |
||||
|
|
||||
|
public void setExtra(String extra) { |
||||
|
this.extra = extra; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return "ColumnDO{" + |
||||
|
"columnName='" + columnName + '\'' + |
||||
|
", dataType='" + dataType + '\'' + |
||||
|
", comments='" + comments + '\'' + |
||||
|
", attrName='" + attrName + '\'' + |
||||
|
", attrname='" + attrname + '\'' + |
||||
|
", attrType='" + attrType + '\'' + |
||||
|
", extra='" + extra + '\'' + |
||||
|
'}'; |
||||
|
} |
||||
|
} |
@ -0,0 +1,41 @@ |
|||||
|
package com.zscat.mallplus.bo; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
/** |
||||
|
* 列的数据信息 |
||||
|
* |
||||
|
* @author mallplus |
||||
|
* @date 2019-01-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public class ColumnInfo { |
||||
|
|
||||
|
// 数据库字段名称
|
||||
|
private Object columnName; |
||||
|
|
||||
|
// 允许空值
|
||||
|
private Object isNullable; |
||||
|
|
||||
|
// 数据库字段类型
|
||||
|
private Object columnType; |
||||
|
|
||||
|
// 数据库字段注释
|
||||
|
private Object columnComment; |
||||
|
|
||||
|
// 数据库字段键类型
|
||||
|
private Object columnKey; |
||||
|
|
||||
|
// 额外的参数
|
||||
|
private Object extra; |
||||
|
|
||||
|
// 查询 1:模糊 2:精确
|
||||
|
private String columnQuery; |
||||
|
|
||||
|
// 是否在列表显示
|
||||
|
private String columnShow; |
||||
|
} |
@ -0,0 +1,40 @@ |
|||||
|
package com.zscat.mallplus.bo; |
||||
|
|
||||
|
import com.zscat.mallplus.oms.vo.OrderStstic; |
||||
|
import com.zscat.mallplus.vo.OrderStatusCount; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* @Auther: shenzhuan |
||||
|
* @Date: 2019/2/23 13:12 |
||||
|
* @Description: |
||||
|
*/ |
||||
|
@Data |
||||
|
public class HomeOrderData implements Serializable { |
||||
|
int nowOrderCount = 0; // 今日订单
|
||||
|
BigDecimal nowOrderPay = new BigDecimal(0); //今日销售总额
|
||||
|
int yesOrderCount = 0; // 昨日订单
|
||||
|
BigDecimal yesOrderPay = new BigDecimal(0); //日销售总额
|
||||
|
int qiOrderCount = 0; // 7日订单
|
||||
|
BigDecimal qiOrderPay = new BigDecimal(0); //7日销售总额
|
||||
|
int monthOrderCount = 0; // 本月订单
|
||||
|
BigDecimal monthOrderPay = new BigDecimal(0); //本月销售总额
|
||||
|
int weekOrderCount = 0; // 本月订单
|
||||
|
BigDecimal weekOrderPay = new BigDecimal(0); //本月销售总额
|
||||
|
int yesToatlOrderCount = 0; // 昨日订单
|
||||
|
BigDecimal yesTotalOrderPay = new BigDecimal(0); //日销售总额
|
||||
|
int nowTotalOrderCount = 0; // 今日订单
|
||||
|
BigDecimal nowToatlOrderPay = new BigDecimal(0); //今日销售总额
|
||||
|
private OrderStatusCount orderStatusCount; |
||||
|
int lastWeekOrderCount = 0; // 上周订单
|
||||
|
BigDecimal lastWeekOrderPay = new BigDecimal(0); //上周销售总额
|
||||
|
|
||||
|
int lastMonthOrderCount = 0; // 上月订单
|
||||
|
BigDecimal lastMonthOrderPay = new BigDecimal(0); //上月销售总额
|
||||
|
|
||||
|
List<OrderStstic> orderStsticList; |
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.zscat.mallplus.bo; |
||||
|
|
||||
|
import com.zscat.mallplus.pms.entity.PmsProduct; |
||||
|
import lombok.Data; |
||||
|
|
||||
|
import java.io.Serializable; |
||||
|
import java.math.BigDecimal; |
||||
|
|
||||
|
@Data |
||||
|
public class SmsFlashPromotionProducts implements Serializable { |
||||
|
private Long id; |
||||
|
private BigDecimal flashPromotionPrice; |
||||
|
private Integer flashPromotionCount; |
||||
|
private Integer flashPromotionLimit; |
||||
|
private Integer sort; |
||||
|
private PmsProduct product; |
||||
|
} |
@ -0,0 +1,155 @@ |
|||||
|
package com.zscat.mallplus.bo; |
||||
|
|
||||
|
|
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.sys.entity.SysAdminLog; |
||||
|
import com.zscat.mallplus.sys.entity.SysUser; |
||||
|
import com.zscat.mallplus.sys.service.ISysAdminLogService; |
||||
|
import com.zscat.mallplus.sys.service.ISysUserService; |
||||
|
import com.zscat.mallplus.util.IpAddressUtil; |
||||
|
import com.zscat.mallplus.util.UserUtils; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import org.apache.commons.lang.StringUtils; |
||||
|
import org.aspectj.lang.JoinPoint; |
||||
|
import org.aspectj.lang.annotation.Aspect; |
||||
|
import org.aspectj.lang.annotation.Before; |
||||
|
import org.aspectj.lang.annotation.Pointcut; |
||||
|
import org.aspectj.lang.reflect.MethodSignature; |
||||
|
import org.slf4j.Logger; |
||||
|
import org.slf4j.LoggerFactory; |
||||
|
import org.springframework.stereotype.Component; |
||||
|
import org.springframework.web.context.request.RequestContextHolder; |
||||
|
import org.springframework.web.context.request.ServletRequestAttributes; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletRequest; |
||||
|
import java.lang.reflect.Field; |
||||
|
import java.lang.reflect.Method; |
||||
|
import java.sql.Timestamp; |
||||
|
import java.text.SimpleDateFormat; |
||||
|
import java.util.Date; |
||||
|
import java.util.Objects; |
||||
|
|
||||
|
|
||||
|
/** |
||||
|
* 系统日志,切面处理类 |
||||
|
*/ |
||||
|
@Aspect |
||||
|
@Component |
||||
|
public class SysLogAspect { |
||||
|
@Resource |
||||
|
public ISysAdminLogService fopSystemOperationLogService; |
||||
|
@Resource |
||||
|
public ISysUserService adminService; |
||||
|
private Logger logger = LoggerFactory.getLogger(SysLogAspect.class); |
||||
|
|
||||
|
public static String getString(Object o) { |
||||
|
SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); |
||||
|
StringBuffer sb = new StringBuffer(); |
||||
|
sb.append("entity["); |
||||
|
Field[] farr = o.getClass().getDeclaredFields(); |
||||
|
for (Field field : farr) { |
||||
|
try { |
||||
|
field.setAccessible(true); |
||||
|
if (!ValidatorUtils.empty(field.get(o))) { |
||||
|
sb.append(field.getName()); |
||||
|
sb.append("="); |
||||
|
if (field.get(o) instanceof Date) { |
||||
|
// 日期的处理
|
||||
|
sb.append(sdf.format(field.get(o))); |
||||
|
} else { |
||||
|
sb.append(field.get(o)); |
||||
|
} |
||||
|
sb.append("|"); |
||||
|
} |
||||
|
|
||||
|
} catch (Exception e) { |
||||
|
e.printStackTrace(); |
||||
|
} |
||||
|
} |
||||
|
sb.append("]"); |
||||
|
return sb.toString(); |
||||
|
} |
||||
|
|
||||
|
@Pointcut("@annotation(com.zscat.mallplus.annotation.SysLog)") |
||||
|
public void logPointCut() { |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@Before("logPointCut()") |
||||
|
public void saveSysLog(JoinPoint joinPoint) { |
||||
|
try { |
||||
|
|
||||
|
MethodSignature signature = (MethodSignature) joinPoint.getSignature(); |
||||
|
Method method = signature.getMethod(); |
||||
|
|
||||
|
SysAdminLog sysLog = new SysAdminLog(); |
||||
|
SysLog syslog1 = method.getAnnotation(SysLog.class); |
||||
|
if (syslog1 != null) { |
||||
|
//注解上的描述
|
||||
|
sysLog.setServiceName(syslog1.MODULE()); |
||||
|
sysLog.setOperationDesc(syslog1.REMARK()); |
||||
|
} |
||||
|
|
||||
|
//请求的方法名
|
||||
|
String clazzName = joinPoint.getTarget().getClass().getName(); |
||||
|
Class<?> clazz = Class.forName(clazzName); |
||||
|
String clazzSimpleName = clazz.getSimpleName(); |
||||
|
String methodName = signature.getName(); |
||||
|
sysLog.setMethod(clazzSimpleName + "." + methodName); |
||||
|
|
||||
|
//请求的参数
|
||||
|
String[] parameterNames = ((MethodSignature) joinPoint.getSignature()).getParameterNames(); |
||||
|
StringBuilder sb = null; |
||||
|
if (Objects.nonNull(parameterNames)) { |
||||
|
sb = new StringBuilder(); |
||||
|
for (int i = 0; i < parameterNames.length; i++) { |
||||
|
Object param = joinPoint.getArgs()[i] != null ? joinPoint.getArgs()[i] : ""; |
||||
|
if (StringUtils.isNotEmpty(param.toString()) && !"request".equals(parameterNames[i]) && !"response".equals(parameterNames[i]) |
||||
|
&& !"modelMap".equals(parameterNames[i])) { |
||||
|
if (param instanceof Integer) { |
||||
|
sb.append(parameterNames[i] + ":" + param + "; "); |
||||
|
} else if (param instanceof String) { |
||||
|
sb.append(parameterNames[i] + ":" + param + "; "); |
||||
|
} else if (param instanceof Double) { |
||||
|
sb.append(parameterNames[i] + ":" + param + "; "); |
||||
|
} else if (param instanceof Float) { |
||||
|
sb.append(parameterNames[i] + ":" + param + "; "); |
||||
|
} else if (param instanceof Long) { |
||||
|
sb.append(parameterNames[i] + ":" + param + "; "); |
||||
|
} else if (param instanceof Boolean) { |
||||
|
sb.append(parameterNames[i] + ":" + param + "; "); |
||||
|
} else if (param instanceof Date) { |
||||
|
sb.append(parameterNames[i] + ":" + param + "; "); |
||||
|
} else if (param instanceof Timestamp) { |
||||
|
sb.append(parameterNames[i] + ":" + param + "; "); |
||||
|
} else { |
||||
|
sb.append(parameterNames[i] + ":" + getString(param) + "; "); |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
} |
||||
|
sb = sb == null ? new StringBuilder() : sb; |
||||
|
sysLog.setParams(sb.toString()); |
||||
|
//设置IP地址
|
||||
|
HttpServletRequest request = ((ServletRequestAttributes) RequestContextHolder.getRequestAttributes()).getRequest(); |
||||
|
|
||||
|
sysLog.setIp(IpAddressUtil.getIpAddr(request)); |
||||
|
//用户名
|
||||
|
SysUser sysUserEntity = UserUtils.getCurrentMember(); |
||||
|
if (null != sysUserEntity && sysUserEntity.getId() != null) { |
||||
|
sysLog.setUserId(sysUserEntity.getId()); |
||||
|
sysLog.setUserName(sysUserEntity.getUsername()); |
||||
|
} |
||||
|
sysLog.setCreateTime(new Date()); |
||||
|
logger.info(getString(sysLog)); |
||||
|
|
||||
|
//保存系统日志
|
||||
|
// fopSystemOperationLogService.save(sysLog);
|
||||
|
} catch (Exception ex) { |
||||
|
logger.error("保存系统日志失败" + ex.getMessage()); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,86 @@ |
|||||
|
package com.zscat.mallplus.bo; |
||||
|
|
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* 表数据 |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @email sunlightcs@gmail.com |
||||
|
* @date 2016年12月20日 上午12:02:55 |
||||
|
*/ |
||||
|
public class TableDO { |
||||
|
//表的名称
|
||||
|
private String tableName; |
||||
|
//表的备注
|
||||
|
private String comments; |
||||
|
//表的主键
|
||||
|
private ColumnDO pk; |
||||
|
//表的列名(不包含主键)
|
||||
|
private List<ColumnDO> columns; |
||||
|
|
||||
|
//类名(第一个字母大写),如:sys_user => SysUser
|
||||
|
private String className; |
||||
|
//类名(第一个字母小写),如:sys_user => sysUser
|
||||
|
private String classname; |
||||
|
|
||||
|
public String getTableName() { |
||||
|
return tableName; |
||||
|
} |
||||
|
|
||||
|
public void setTableName(String tableName) { |
||||
|
this.tableName = tableName; |
||||
|
} |
||||
|
|
||||
|
public String getComments() { |
||||
|
return comments; |
||||
|
} |
||||
|
|
||||
|
public void setComments(String comments) { |
||||
|
this.comments = comments; |
||||
|
} |
||||
|
|
||||
|
public ColumnDO getPk() { |
||||
|
return pk; |
||||
|
} |
||||
|
|
||||
|
public void setPk(ColumnDO pk) { |
||||
|
this.pk = pk; |
||||
|
} |
||||
|
|
||||
|
public List<ColumnDO> getColumns() { |
||||
|
return columns; |
||||
|
} |
||||
|
|
||||
|
public void setColumns(List<ColumnDO> columns) { |
||||
|
this.columns = columns; |
||||
|
} |
||||
|
|
||||
|
public String getClassName() { |
||||
|
return className; |
||||
|
} |
||||
|
|
||||
|
public void setClassName(String className) { |
||||
|
this.className = className; |
||||
|
} |
||||
|
|
||||
|
public String getClassname() { |
||||
|
return classname; |
||||
|
} |
||||
|
|
||||
|
public void setClassname(String classname) { |
||||
|
this.classname = classname; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
return "TableDO{" + |
||||
|
"tableName='" + tableName + '\'' + |
||||
|
", comments='" + comments + '\'' + |
||||
|
", pk=" + pk + |
||||
|
", columns=" + columns + |
||||
|
", className='" + className + '\'' + |
||||
|
", classname='" + classname + '\'' + |
||||
|
'}'; |
||||
|
} |
||||
|
} |
@ -0,0 +1,34 @@ |
|||||
|
package com.zscat.mallplus.bo; |
||||
|
|
||||
|
import lombok.AllArgsConstructor; |
||||
|
import lombok.Data; |
||||
|
import lombok.NoArgsConstructor; |
||||
|
|
||||
|
/** |
||||
|
* 表的数据信息 |
||||
|
* |
||||
|
* @author mallplus |
||||
|
* @date 2019-01-02 |
||||
|
*/ |
||||
|
@Data |
||||
|
@AllArgsConstructor |
||||
|
@NoArgsConstructor |
||||
|
public class TableInfo { |
||||
|
|
||||
|
// 表名称
|
||||
|
private Object tableName; |
||||
|
|
||||
|
// 创建日期
|
||||
|
private Object createTime; |
||||
|
|
||||
|
// 数据库引擎
|
||||
|
private Object engine; |
||||
|
|
||||
|
// 编码集
|
||||
|
private Object coding; |
||||
|
|
||||
|
// 备注
|
||||
|
private Object remark; |
||||
|
|
||||
|
|
||||
|
} |
@ -0,0 +1,180 @@ |
|||||
|
package com.zscat.mallplus.bo; |
||||
|
|
||||
|
import com.alibaba.fastjson.JSON; |
||||
|
|
||||
|
import java.util.ArrayList; |
||||
|
import java.util.List; |
||||
|
import java.util.Map; |
||||
|
|
||||
|
/** |
||||
|
* tree TODO <br> |
||||
|
* |
||||
|
* @author kangxu2 2017-1-7 |
||||
|
*/ |
||||
|
public class Tree<T> { |
||||
|
/** |
||||
|
* 节点ID |
||||
|
*/ |
||||
|
private String id; |
||||
|
/** |
||||
|
* 显示节点文本 |
||||
|
*/ |
||||
|
private String title; |
||||
|
/** |
||||
|
* 节点状态,open closed |
||||
|
*/ |
||||
|
private Map<String, Object> state; |
||||
|
/** |
||||
|
* 节点是否被选中 true false |
||||
|
*/ |
||||
|
private boolean checked = false; |
||||
|
/** |
||||
|
* 节点属性 |
||||
|
*/ |
||||
|
private Map<String, Object> meta; |
||||
|
|
||||
|
/** |
||||
|
* 节点的子节点 |
||||
|
*/ |
||||
|
private List<Tree<T>> children = new ArrayList<Tree<T>>(); |
||||
|
|
||||
|
private String component; |
||||
|
|
||||
|
/** |
||||
|
* 父ID |
||||
|
*/ |
||||
|
private String parentId; |
||||
|
|
||||
|
private String path; |
||||
|
|
||||
|
private String name; |
||||
|
/** |
||||
|
* 是否有父节点 |
||||
|
*/ |
||||
|
private boolean hasParent = false; |
||||
|
/** |
||||
|
* 是否有子节点 |
||||
|
*/ |
||||
|
private boolean hasChildren = false; |
||||
|
|
||||
|
public Tree(String id, String text, Map<String, Object> state, boolean checked, Map<String, Object> attributes, |
||||
|
List<Tree<T>> children, boolean isParent, boolean isChildren, String parentID) { |
||||
|
super(); |
||||
|
this.id = id; |
||||
|
this.title = text; |
||||
|
this.state = state; |
||||
|
this.checked = checked; |
||||
|
this.meta = attributes; |
||||
|
this.children = children; |
||||
|
this.hasParent = isParent; |
||||
|
this.hasChildren = isChildren; |
||||
|
this.parentId = parentID; |
||||
|
} |
||||
|
|
||||
|
public Tree() { |
||||
|
super(); |
||||
|
} |
||||
|
|
||||
|
public String getName() { |
||||
|
return name; |
||||
|
} |
||||
|
|
||||
|
public void setName(String name) { |
||||
|
this.name = name; |
||||
|
} |
||||
|
|
||||
|
public String getComponent() { |
||||
|
return component; |
||||
|
} |
||||
|
|
||||
|
public void setComponent(String component) { |
||||
|
this.component = component; |
||||
|
} |
||||
|
|
||||
|
public String getPath() { |
||||
|
return path; |
||||
|
} |
||||
|
|
||||
|
public void setPath(String path) { |
||||
|
this.path = path; |
||||
|
} |
||||
|
|
||||
|
public String getId() { |
||||
|
return id; |
||||
|
} |
||||
|
|
||||
|
public void setId(String id) { |
||||
|
this.id = id; |
||||
|
} |
||||
|
|
||||
|
public String getTitle() { |
||||
|
return title; |
||||
|
} |
||||
|
|
||||
|
public void setTitle(String title) { |
||||
|
this.title = title; |
||||
|
} |
||||
|
|
||||
|
public Map<String, Object> getState() { |
||||
|
return state; |
||||
|
} |
||||
|
|
||||
|
public void setState(Map<String, Object> state) { |
||||
|
this.state = state; |
||||
|
} |
||||
|
|
||||
|
public boolean isChecked() { |
||||
|
return checked; |
||||
|
} |
||||
|
|
||||
|
public void setChecked(boolean checked) { |
||||
|
this.checked = checked; |
||||
|
} |
||||
|
|
||||
|
public Map<String, Object> getMeta() { |
||||
|
return meta; |
||||
|
} |
||||
|
|
||||
|
public void setMeta(Map<String, Object> meta) { |
||||
|
this.meta = meta; |
||||
|
} |
||||
|
|
||||
|
public List<Tree<T>> getChildren() { |
||||
|
return children; |
||||
|
} |
||||
|
|
||||
|
public void setChildren(boolean isChildren) { |
||||
|
this.hasChildren = isChildren; |
||||
|
} |
||||
|
|
||||
|
public void setChildren(List<Tree<T>> children) { |
||||
|
this.children = children; |
||||
|
} |
||||
|
|
||||
|
public boolean isHasParent() { |
||||
|
return hasParent; |
||||
|
} |
||||
|
|
||||
|
public void setHasParent(boolean isParent) { |
||||
|
this.hasParent = isParent; |
||||
|
} |
||||
|
|
||||
|
public boolean isHasChildren() { |
||||
|
return hasChildren; |
||||
|
} |
||||
|
|
||||
|
public String getParentId() { |
||||
|
return parentId; |
||||
|
} |
||||
|
|
||||
|
public void setParentId(String parentId) { |
||||
|
this.parentId = parentId; |
||||
|
} |
||||
|
|
||||
|
@Override |
||||
|
public String toString() { |
||||
|
|
||||
|
return JSON.toJSONString(this); |
||||
|
} |
||||
|
|
||||
|
} |
@ -0,0 +1,144 @@ |
|||||
|
package com.zscat.mallplus.bo; |
||||
|
|
||||
|
/** |
||||
|
* Controller层的日志封装类 |
||||
|
* https://github.com/shenzhuan/mallplus on 2018/4/28.
|
||||
|
*/ |
||||
|
public class WebLog { |
||||
|
/** |
||||
|
* 操作描述 |
||||
|
*/ |
||||
|
private String description; |
||||
|
|
||||
|
/** |
||||
|
* 操作用户 |
||||
|
*/ |
||||
|
private String username; |
||||
|
|
||||
|
/** |
||||
|
* 操作时间 |
||||
|
*/ |
||||
|
private Long startTime; |
||||
|
|
||||
|
/** |
||||
|
* 消耗时间 |
||||
|
*/ |
||||
|
private Integer spendTime; |
||||
|
|
||||
|
/** |
||||
|
* 根路径 |
||||
|
*/ |
||||
|
private String basePath; |
||||
|
|
||||
|
/** |
||||
|
* URI |
||||
|
*/ |
||||
|
private String uri; |
||||
|
|
||||
|
/** |
||||
|
* URL |
||||
|
*/ |
||||
|
private String url; |
||||
|
|
||||
|
/** |
||||
|
* 请求类型 |
||||
|
*/ |
||||
|
private String method; |
||||
|
|
||||
|
/** |
||||
|
* IP地址 |
||||
|
*/ |
||||
|
private String ip; |
||||
|
|
||||
|
private Object parameter; |
||||
|
|
||||
|
private Object result; |
||||
|
|
||||
|
public String getDescription() { |
||||
|
return description; |
||||
|
} |
||||
|
|
||||
|
public void setDescription(String description) { |
||||
|
this.description = description; |
||||
|
} |
||||
|
|
||||
|
public String getUsername() { |
||||
|
return username; |
||||
|
} |
||||
|
|
||||
|
public void setUsername(String username) { |
||||
|
this.username = username; |
||||
|
} |
||||
|
|
||||
|
public Long getStartTime() { |
||||
|
return startTime; |
||||
|
} |
||||
|
|
||||
|
public void setStartTime(Long startTime) { |
||||
|
this.startTime = startTime; |
||||
|
} |
||||
|
|
||||
|
public Integer getSpendTime() { |
||||
|
return spendTime; |
||||
|
} |
||||
|
|
||||
|
public void setSpendTime(Integer spendTime) { |
||||
|
this.spendTime = spendTime; |
||||
|
} |
||||
|
|
||||
|
public String getBasePath() { |
||||
|
return basePath; |
||||
|
} |
||||
|
|
||||
|
public void setBasePath(String basePath) { |
||||
|
this.basePath = basePath; |
||||
|
} |
||||
|
|
||||
|
public String getUri() { |
||||
|
return uri; |
||||
|
} |
||||
|
|
||||
|
public void setUri(String uri) { |
||||
|
this.uri = uri; |
||||
|
} |
||||
|
|
||||
|
public String getUrl() { |
||||
|
return url; |
||||
|
} |
||||
|
|
||||
|
public void setUrl(String url) { |
||||
|
this.url = url; |
||||
|
} |
||||
|
|
||||
|
public String getMethod() { |
||||
|
return method; |
||||
|
} |
||||
|
|
||||
|
public void setMethod(String method) { |
||||
|
this.method = method; |
||||
|
} |
||||
|
|
||||
|
public String getIp() { |
||||
|
return ip; |
||||
|
} |
||||
|
|
||||
|
public void setIp(String ip) { |
||||
|
this.ip = ip; |
||||
|
} |
||||
|
|
||||
|
public Object getParameter() { |
||||
|
return parameter; |
||||
|
} |
||||
|
|
||||
|
public void setParameter(Object parameter) { |
||||
|
this.parameter = parameter; |
||||
|
} |
||||
|
|
||||
|
public Object getResult() { |
||||
|
return result; |
||||
|
} |
||||
|
|
||||
|
public void setResult(Object result) { |
||||
|
this.result = result; |
||||
|
} |
||||
|
} |
@ -0,0 +1,169 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildAdv; |
||||
|
import com.zscat.mallplus.build.service.IBuildAdvService; |
||||
|
import com.zscat.mallplus.enums.StatusEnum; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 首页轮播广告表 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/build/adv") |
||||
|
public class BuildAdvController { |
||||
|
|
||||
|
@Resource |
||||
|
private IBuildAdvService IBuildAdvService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有轮播广告列表") |
||||
|
@ApiOperation("根据条件查询所有轮播广告列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('build:adv:read')") |
||||
|
public Object getBuildAdvByPage(BuildAdv entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildAdvService.page(new Page<BuildAdv>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有轮播广告列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存轮播广告") |
||||
|
@ApiOperation("保存轮播广告") |
||||
|
@PostMapping(value = "/create") |
||||
|
@PreAuthorize("hasAuthority('build:adv:create')") |
||||
|
public Object saveBuildAdv(@RequestBody BuildAdv entity) { |
||||
|
try { |
||||
|
entity.setStatus(StatusEnum.AuditType.INIT.code()); |
||||
|
if (IBuildAdvService.save(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存轮播广告:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新轮播广告") |
||||
|
@ApiOperation("更新轮播广告") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:adv:update')") |
||||
|
public Object updateBuildAdv(@RequestBody BuildAdv entity) { |
||||
|
try { |
||||
|
if (IBuildAdvService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新轮播广告:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除轮播广告") |
||||
|
@ApiOperation("删除轮播广告") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:adv:delete')") |
||||
|
public Object deleteBuildAdv(@ApiParam("轮播广告id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("轮播广告id"); |
||||
|
} |
||||
|
if (IBuildAdvService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除轮播广告:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给轮播广告分配轮播广告") |
||||
|
@ApiOperation("查询轮播广告明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:adv:read')") |
||||
|
public Object getBuildAdvById(@ApiParam("轮播广告id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("轮播广告id"); |
||||
|
} |
||||
|
BuildAdv coupon = IBuildAdvService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询轮播广告明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除轮播广告") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除轮播广告") |
||||
|
@PreAuthorize("hasAuthority('build:adv:delete')") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildAdvService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "修改上下线状态") |
||||
|
@ApiOperation("修改上下线状态") |
||||
|
@RequestMapping(value = "/update/status/{id}", method = RequestMethod.POST) |
||||
|
@ResponseBody |
||||
|
public Object updateStatus(@PathVariable Long id, Integer status) { |
||||
|
BuildAdv record = new BuildAdv(); |
||||
|
record.setId(id); |
||||
|
record.setStatus(status); |
||||
|
return IBuildAdvService.updateById(record); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "导出社区数据") |
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildAdv entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildAdv> personList = IBuildAdvService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", BuildAdv.class, "导出社区数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "导入社区数据") |
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildAdv> personList = EasyPoiUtils.importExcel(file, BuildAdv.class); |
||||
|
IBuildAdvService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import org.springframework.stereotype.Controller; |
||||
|
import org.springframework.web.bind.annotation.RequestMapping; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Controller |
||||
|
@RequestMapping("/build/buildApplyRoom") |
||||
|
public class BuildApplyRoomController { |
||||
|
|
||||
|
} |
||||
|
|
@ -0,0 +1,153 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildGroup; |
||||
|
import com.zscat.mallplus.enums.StatusEnum; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/build/group") |
||||
|
public class BuildGroupController { |
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildGroupService IBuildGroupService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有拼团列表") |
||||
|
@ApiOperation("根据条件查询所有拼团列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('build:group:read')") |
||||
|
public Object getBuildGroupByPage(BuildGroup entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildGroupService.page(new Page<BuildGroup>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有拼团列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存拼团") |
||||
|
@ApiOperation("保存拼团") |
||||
|
@PostMapping(value = "/create") |
||||
|
@PreAuthorize("hasAuthority('build:group:create')") |
||||
|
public Object saveBuildGroup(@RequestBody BuildGroup entity) { |
||||
|
try { |
||||
|
entity.setStatus(StatusEnum.AuditType.INIT.code()); |
||||
|
if (IBuildGroupService.save(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存拼团:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新拼团") |
||||
|
@ApiOperation("更新拼团") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:group:update')") |
||||
|
public Object updateBuildGroup(@RequestBody BuildGroup entity) { |
||||
|
try { |
||||
|
if (IBuildGroupService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新拼团:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除拼团") |
||||
|
@ApiOperation("删除拼团") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:group:delete')") |
||||
|
public Object deleteBuildGroup(@ApiParam("拼团id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("拼团id"); |
||||
|
} |
||||
|
if (IBuildGroupService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除拼团:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给拼团分配拼团") |
||||
|
@ApiOperation("查询拼团明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:group:read')") |
||||
|
public Object getBuildGroupById(@ApiParam("拼团id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("拼团id"); |
||||
|
} |
||||
|
BuildGroup coupon = IBuildGroupService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询拼团明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除拼团") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除拼团") |
||||
|
@PreAuthorize("hasAuthority('build:group:delete')") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildGroupService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildGroup entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildGroup> personList = IBuildGroupService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", BuildGroup.class, "导出社区数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildGroup> personList = EasyPoiUtils.importExcel(file, BuildGroup.class); |
||||
|
IBuildGroupService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,154 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildGroupMember; |
||||
|
import com.zscat.mallplus.enums.StatusEnum; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/build/groupMember") |
||||
|
public class BuildGroupMemberController { |
||||
|
|
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildGroupMemberService IBuildGroupMemberService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有拼团列表") |
||||
|
@ApiOperation("根据条件查询所有拼团列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('build:groupMember:read')") |
||||
|
public Object getBuildGroupMemberByPage(BuildGroupMember entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildGroupMemberService.page(new Page<BuildGroupMember>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有拼团列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存拼团") |
||||
|
@ApiOperation("保存拼团") |
||||
|
@PostMapping(value = "/create") |
||||
|
@PreAuthorize("hasAuthority('build:groupMember:create')") |
||||
|
public Object saveBuildGroupMember(@RequestBody BuildGroupMember entity) { |
||||
|
try { |
||||
|
entity.setStatus(StatusEnum.AuditType.INIT.code()); |
||||
|
if (IBuildGroupMemberService.save(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存拼团:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新拼团") |
||||
|
@ApiOperation("更新拼团") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:groupMember:update')") |
||||
|
public Object updateBuildGroupMember(@RequestBody BuildGroupMember entity) { |
||||
|
try { |
||||
|
if (IBuildGroupMemberService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新拼团:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除拼团") |
||||
|
@ApiOperation("删除拼团") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:groupMember:delete')") |
||||
|
public Object deleteBuildGroupMember(@ApiParam("拼团id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("拼团id"); |
||||
|
} |
||||
|
if (IBuildGroupMemberService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除拼团:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给拼团分配拼团") |
||||
|
@ApiOperation("查询拼团明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:groupMember:read')") |
||||
|
public Object getBuildGroupMemberById(@ApiParam("拼团id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("拼团id"); |
||||
|
} |
||||
|
BuildGroupMember coupon = IBuildGroupMemberService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询拼团明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除拼团") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除拼团") |
||||
|
@PreAuthorize("hasAuthority('build:groupMember:delete')") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildGroupMemberService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildGroupMember entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildGroupMember> personList = IBuildGroupMemberService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", BuildGroupMember.class, "导出社区数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildGroupMember> personList = EasyPoiUtils.importExcel(file, BuildGroupMember.class); |
||||
|
IBuildGroupMemberService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,154 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildNotice; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 公告表 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/build/notice") |
||||
|
public class BuildNoticeController { |
||||
|
|
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildNoticeService IBuildNoticeService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有公告表列表") |
||||
|
@ApiOperation("根据条件查询所有公告表列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('build:notice:read')") |
||||
|
public Object getBuildNoticeByPage(BuildNotice entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildNoticeService.page(new Page<BuildNotice>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有公告表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存公告表") |
||||
|
@ApiOperation("保存公告表") |
||||
|
@PostMapping(value = "/create") |
||||
|
@PreAuthorize("hasAuthority('build:notice:create')") |
||||
|
public Object saveBuildNotice(@RequestBody BuildNotice entity) { |
||||
|
try { |
||||
|
entity.setCreateTime(new Date()); |
||||
|
if (IBuildNoticeService.save(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存公告表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新公告表") |
||||
|
@ApiOperation("更新公告表") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:notice:update')") |
||||
|
public Object updateBuildNotice(@RequestBody BuildNotice entity) { |
||||
|
try { |
||||
|
if (IBuildNoticeService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新公告表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除公告表") |
||||
|
@ApiOperation("删除公告表") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:notice:delete')") |
||||
|
public Object deleteBuildNotice(@ApiParam("公告表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("公告表id"); |
||||
|
} |
||||
|
if (IBuildNoticeService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除公告表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给公告表分配公告表") |
||||
|
@ApiOperation("查询公告表明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:notice:read')") |
||||
|
public Object getBuildNoticeById(@ApiParam("公告表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("公告表id"); |
||||
|
} |
||||
|
BuildNotice coupon = IBuildNoticeService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询公告表明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除公告表") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除公告表") |
||||
|
@PreAuthorize("hasAuthority('build:notice:delete')") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildNoticeService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildNotice entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildNotice> personList = IBuildNoticeService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", BuildNotice.class, "导出社区数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildNotice> personList = EasyPoiUtils.importExcel(file, BuildNotice.class); |
||||
|
IBuildNoticeService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,152 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildRepair; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/build/repair") |
||||
|
public class BuildRepairController { |
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildRepairService IBuildRepairService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有报修表列表") |
||||
|
@ApiOperation("根据条件查询所有报修表列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('build:repair:read')") |
||||
|
public Object getBuildRepairByPage(BuildRepair entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildRepairService.page(new Page<BuildRepair>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有报修表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存报修表") |
||||
|
@ApiOperation("保存报修表") |
||||
|
@PostMapping(value = "/create") |
||||
|
@PreAuthorize("hasAuthority('build:repair:create')") |
||||
|
public Object saveBuildRepair(@RequestBody BuildRepair entity) { |
||||
|
try { |
||||
|
if (IBuildRepairService.save(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存报修表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新报修表") |
||||
|
@ApiOperation("更新报修表") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:repair:update')") |
||||
|
public Object updateBuildRepair(@RequestBody BuildRepair entity) { |
||||
|
try { |
||||
|
if (IBuildRepairService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新报修表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除报修表") |
||||
|
@ApiOperation("删除报修表") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:repair:delete')") |
||||
|
public Object deleteBuildRepair(@ApiParam("报修表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("报修表id"); |
||||
|
} |
||||
|
if (IBuildRepairService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除报修表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给报修表分配报修表") |
||||
|
@ApiOperation("查询报修表明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:repair:read')") |
||||
|
public Object getBuildRepairById(@ApiParam("报修表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("报修表id"); |
||||
|
} |
||||
|
BuildRepair coupon = IBuildRepairService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询报修表明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除报修表") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除报修表") |
||||
|
@PreAuthorize("hasAuthority('build:repair:delete')") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildRepairService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildRepair entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildRepair> personList = IBuildRepairService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", BuildRepair.class, "导出社区数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildRepair> personList = EasyPoiUtils.importExcel(file, BuildRepair.class); |
||||
|
IBuildRepairService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,155 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildTypePrice; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/build/typePrice") |
||||
|
public class BuildTypePriceController { |
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildTypePriceService IBuildTypePriceService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有价格类型表列表") |
||||
|
@ApiOperation("根据条件查询所有价格类型表列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('build:typePrice:read')") |
||||
|
public Object getBuildTypePriceByPage(BuildTypePrice entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildTypePriceService.page(new Page<BuildTypePrice>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有价格类型表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存价格类型表") |
||||
|
@ApiOperation("保存价格类型表") |
||||
|
@PostMapping(value = "/create") |
||||
|
@PreAuthorize("hasAuthority('build:typePrice:create')") |
||||
|
public Object saveBuildTypePrice(@RequestBody BuildTypePrice entity) { |
||||
|
try { |
||||
|
entity.setCreateTime(new Date()); |
||||
|
if (IBuildTypePriceService.save(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存价格类型表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新价格类型表") |
||||
|
@ApiOperation("更新价格类型表") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:typePrice:update')") |
||||
|
public Object updateBuildTypePrice(@RequestBody BuildTypePrice entity) { |
||||
|
try { |
||||
|
if (IBuildTypePriceService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新价格类型表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除价格类型表") |
||||
|
@ApiOperation("删除价格类型表") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:typePrice:delete')") |
||||
|
public Object deleteBuildTypePrice(@ApiParam("价格类型表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("价格类型表id"); |
||||
|
} |
||||
|
if (IBuildTypePriceService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除价格类型表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给价格类型表分配价格类型表") |
||||
|
@ApiOperation("查询价格类型表明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:typePrice:read')") |
||||
|
public Object getBuildTypePriceById(@ApiParam("价格类型表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("价格类型表id"); |
||||
|
} |
||||
|
BuildTypePrice coupon = IBuildTypePriceService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询价格类型表明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除价格类型表") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除价格类型表") |
||||
|
@PreAuthorize("hasAuthority('build:typePrice:delete')") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildTypePriceService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildTypePrice entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildTypePrice> personList = IBuildTypePriceService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", BuildTypePrice.class, "导出社区数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildTypePrice> personList = EasyPoiUtils.importExcel(file, BuildTypePrice.class); |
||||
|
IBuildTypePriceService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,154 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildWuyeCompany; |
||||
|
import com.zscat.mallplus.enums.StatusEnum; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/build/wuyeCompany") |
||||
|
public class BuildWuyeCompanyController { |
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildWuyeCompanyService IBuildWuyeCompanyService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有物业公司表列表") |
||||
|
@ApiOperation("根据条件查询所有物业公司表列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('build:wuyeCompany:read')") |
||||
|
public Object getBuildWuyeCompanyByPage(BuildWuyeCompany entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildWuyeCompanyService.page(new Page<BuildWuyeCompany>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有物业公司表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存物业公司表") |
||||
|
@ApiOperation("保存物业公司表") |
||||
|
@PostMapping(value = "/create") |
||||
|
@PreAuthorize("hasAuthority('build:wuyeCompany:create')") |
||||
|
public Object saveBuildWuyeCompany(@RequestBody BuildWuyeCompany entity) { |
||||
|
try { |
||||
|
entity.setStatus(StatusEnum.AuditType.SUCESS.code()); |
||||
|
if (IBuildWuyeCompanyService.saveCompany(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存物业公司表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新物业公司表") |
||||
|
@ApiOperation("更新物业公司表") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:wuyeCompany:update')") |
||||
|
public Object updateBuildWuyeCompany(@RequestBody BuildWuyeCompany entity) { |
||||
|
try { |
||||
|
if (IBuildWuyeCompanyService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新物业公司表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除物业公司表") |
||||
|
@ApiOperation("删除物业公司表") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:wuyeCompany:delete')") |
||||
|
public Object deleteBuildWuyeCompany(@ApiParam("物业公司表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("物业公司表id"); |
||||
|
} |
||||
|
if (IBuildWuyeCompanyService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除物业公司表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给物业公司表分配物业公司表") |
||||
|
@ApiOperation("查询物业公司表明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:wuyeCompany:read')") |
||||
|
public Object getBuildWuyeCompanyById(@ApiParam("物业公司表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("物业公司表id"); |
||||
|
} |
||||
|
BuildWuyeCompany coupon = IBuildWuyeCompanyService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询物业公司表明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除物业公司表") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除物业公司表") |
||||
|
@PreAuthorize("hasAuthority('build:wuyeCompany:delete')") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildWuyeCompanyService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildWuyeCompany entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildWuyeCompany> personList = IBuildWuyeCompanyService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", BuildWuyeCompany.class, "导出社区数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildWuyeCompany> personList = EasyPoiUtils.importExcel(file, BuildWuyeCompany.class); |
||||
|
IBuildWuyeCompanyService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,164 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildWuyePrice; |
||||
|
import com.zscat.mallplus.build.entity.BuildingRoom; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/build/wuyePrice") |
||||
|
public class BuildWuyePriceController { |
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildWuyePriceService IBuildWuyePriceService; |
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildingRoomService IBuildingRoomService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有费用表列表") |
||||
|
@ApiOperation("根据条件查询所有费用表列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('build:wuyePrice:read')") |
||||
|
public Object getBuildWuyePriceByPage(BuildWuyePrice entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildWuyePriceService.page(new Page<BuildWuyePrice>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有费用表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存费用表") |
||||
|
@ApiOperation("保存费用表") |
||||
|
@PostMapping(value = "/create") |
||||
|
@PreAuthorize("hasAuthority('build:wuyePrice:create')") |
||||
|
public Object saveBuildWuyePrice(@RequestBody BuildWuyePrice entity) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(entity.getAmount()) || ValidatorUtils.empty(entity.getPrice())) { |
||||
|
return new CommonResult().failed("请输入价格"); |
||||
|
} |
||||
|
BuildingRoom room = IBuildingRoomService.getById(entity.getRoomId()); |
||||
|
if (room != null && room.getRoomDesc() != null) { |
||||
|
entity.setRoomDesc(room.getRoomDesc()); |
||||
|
} |
||||
|
entity.setCreateDate(new Date()); |
||||
|
entity.setMoneys(entity.getAmount().multiply(entity.getPrice())); |
||||
|
if (IBuildWuyePriceService.save(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存费用表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新费用表") |
||||
|
@ApiOperation("更新费用表") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:wuyePrice:update')") |
||||
|
public Object updateBuildWuyePrice(@RequestBody BuildWuyePrice entity) { |
||||
|
try { |
||||
|
if (IBuildWuyePriceService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新费用表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(e.getMessage()); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除费用表") |
||||
|
@ApiOperation("删除费用表") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:wuyePrice:delete')") |
||||
|
public Object deleteBuildWuyePrice(@ApiParam("费用表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("费用表id"); |
||||
|
} |
||||
|
if (IBuildWuyePriceService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除费用表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给费用表分配费用表") |
||||
|
@ApiOperation("查询费用表明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
@PreAuthorize("hasAuthority('build:wuyePrice:read')") |
||||
|
public Object getBuildWuyePriceById(@ApiParam("费用表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("费用表id"); |
||||
|
} |
||||
|
BuildWuyePrice coupon = IBuildWuyePriceService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询费用表明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除费用表") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除费用表") |
||||
|
@PreAuthorize("hasAuthority('build:wuyePrice:delete')") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildWuyePriceService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildWuyePrice entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildWuyePrice> personList = IBuildWuyePriceService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", BuildWuyePrice.class, "导出社区数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildWuyePrice> personList = EasyPoiUtils.importExcel(file, BuildWuyePrice.class); |
||||
|
IBuildWuyePriceService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
@ -0,0 +1,162 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildingCommunity; |
||||
|
import com.zscat.mallplus.enums.StatusEnum; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 小区 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/building/community") |
||||
|
public class BuildingCommunityController { |
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildingCommunityService IBuildingCommunityService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有小区表列表") |
||||
|
@ApiOperation("根据条件查询所有小区表列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('building:community:read')") |
||||
|
public Object getBuildingCommunityByPage(BuildingCommunity entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildingCommunityService.page(new Page<BuildingCommunity>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有小区表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存小区表") |
||||
|
@ApiOperation("保存小区表") |
||||
|
@PostMapping(value = "/create") |
||||
|
|
||||
|
public Object saveBuildingCommunity(@RequestBody BuildingCommunity entity) { |
||||
|
try { |
||||
|
entity.setCreateTime(new Date()); |
||||
|
entity.setStatus(StatusEnum.AuditType.SUCESS.code()); |
||||
|
if (ValidatorUtils.empty(entity.getCompanyId())) { |
||||
|
// entity.setCompanyId(UserUtils.getCurrentMember().getStoreId());
|
||||
|
} |
||||
|
if (ValidatorUtils.empty(entity.getCompanyId())) { |
||||
|
return new CommonResult().failed("请选择物业攻啊"); |
||||
|
} |
||||
|
if (IBuildingCommunityService.saveCommunity(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存小区表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新小区表") |
||||
|
@ApiOperation("更新小区表") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
|
||||
|
public Object updateBuildingCommunity(@RequestBody BuildingCommunity entity) { |
||||
|
try { |
||||
|
if (IBuildingCommunityService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新小区表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除小区表") |
||||
|
@ApiOperation("删除小区表") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
|
||||
|
public Object deleteBuildingCommunity(@ApiParam("小区表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("小区表id"); |
||||
|
} |
||||
|
if (IBuildingCommunityService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除小区表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给小区表分配小区表") |
||||
|
@ApiOperation("查询小区表明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
|
||||
|
public Object getBuildingCommunityById(@ApiParam("小区表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("小区表id"); |
||||
|
} |
||||
|
BuildingCommunity coupon = IBuildingCommunityService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询小区表明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除小区表") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@ResponseBody |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除小区表") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildingCommunityService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildingCommunity entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildingCommunity> personList = IBuildingCommunityService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出社区数据", "社区数据", BuildingCommunity.class, "导出社区数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildingCommunity> personList = EasyPoiUtils.importExcel(file, BuildingCommunity.class); |
||||
|
IBuildingCommunityService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
@ -0,0 +1,159 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildingCommunity; |
||||
|
import com.zscat.mallplus.build.entity.BuildingFloor; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/building/floor") |
||||
|
public class BuildingFloorController { |
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildingFloorService IBuildingFloorService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有楼房表列表") |
||||
|
@ApiOperation("根据条件查询所有楼房表列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('building:floor:read')") |
||||
|
public Object getBuildingFloorByPage(BuildingFloor entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildingFloorService.page(new Page<BuildingFloor>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有楼房表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存楼房表") |
||||
|
@ApiOperation("保存楼房表") |
||||
|
@PostMapping(value = "/create") |
||||
|
|
||||
|
public Object saveBuildingFloor(@RequestBody BuildingFloor entity) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(entity.getCommunityId())) { |
||||
|
return new CommonResult().failed("请选择小区"); |
||||
|
} |
||||
|
entity.setCreateTime(new Date()); |
||||
|
if (IBuildingFloorService.save(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存楼房表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新楼房表") |
||||
|
@ApiOperation("更新楼房表") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
|
||||
|
public Object updateBuildingFloor(@RequestBody BuildingFloor entity) { |
||||
|
try { |
||||
|
if (IBuildingFloorService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新楼房表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除楼房表") |
||||
|
@ApiOperation("删除楼房表") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
|
||||
|
public Object deleteBuildingFloor(@ApiParam("楼房表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("楼房表id"); |
||||
|
} |
||||
|
if (IBuildingFloorService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除楼房表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给楼房表分配楼房表") |
||||
|
@ApiOperation("查询楼房表明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
|
||||
|
public Object getBuildingFloorById(@ApiParam("楼房表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("楼房表id"); |
||||
|
} |
||||
|
BuildingFloor coupon = IBuildingFloorService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询楼房表明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除楼房表") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@ResponseBody |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除楼房表") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildingFloorService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildingFloor entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildingFloor> personList = IBuildingFloorService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出楼房数据", "楼房数据", BuildingCommunity.class, "导出楼房数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildingFloor> personList = EasyPoiUtils.importExcel(file, BuildingFloor.class); |
||||
|
IBuildingFloorService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,167 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildingCommunity; |
||||
|
import com.zscat.mallplus.build.entity.BuildingOwner; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 业主成员表 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/building/owner") |
||||
|
public class BuildingOwnerController { |
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildingOwnerService IBuildingOwnerService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有业主表列表") |
||||
|
@ApiOperation("根据条件查询所有业主表列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('building:owner:read')") |
||||
|
public Object getBuildingOwnerByPage(BuildingOwner entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildingOwnerService.page(new Page<BuildingOwner>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有业主表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存业主表") |
||||
|
@ApiOperation("保存业主表") |
||||
|
@PostMapping(value = "/create") |
||||
|
|
||||
|
public Object saveBuildingOwner(@RequestBody BuildingOwner entity) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(entity.getRoomId())) { |
||||
|
return new CommonResult().failed("请选择房屋"); |
||||
|
} |
||||
|
entity.setCreateTime(new Date()); |
||||
|
if (entity.getType() == 2 || entity.getType() == 3) { |
||||
|
List<BuildingOwner> list = IBuildingOwnerService.list(new QueryWrapper<BuildingOwner>().eq("room_id", entity.getRoomId()).eq("type", 1).orderByAsc("id")); |
||||
|
if (list != null && list.size() > 0) { |
||||
|
entity.setOwnerId(list.get(0).getId()); |
||||
|
} else { |
||||
|
return new CommonResult().failed("请先添加一个业主"); |
||||
|
} |
||||
|
} |
||||
|
if (IBuildingOwnerService.save(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存业主表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新业主表") |
||||
|
@ApiOperation("更新业主表") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
|
||||
|
public Object updateBuildingOwner(@RequestBody BuildingOwner entity) { |
||||
|
try { |
||||
|
if (IBuildingOwnerService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新业主表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除业主表") |
||||
|
@ApiOperation("删除业主表") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
|
||||
|
public Object deleteBuildingOwner(@ApiParam("业主表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("业主表id"); |
||||
|
} |
||||
|
if (IBuildingOwnerService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除业主表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给业主表分配业主表") |
||||
|
@ApiOperation("查询业主表明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
|
||||
|
public Object getBuildingOwnerById(@ApiParam("业主表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("业主表id"); |
||||
|
} |
||||
|
BuildingOwner coupon = IBuildingOwnerService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询业主表明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除业主表") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@ResponseBody |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除业主表") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildingOwnerService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildingOwner entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildingOwner> personList = IBuildingOwnerService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出业主数据", "业主数据", BuildingCommunity.class, "导出业主数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildingOwner> personList = EasyPoiUtils.importExcel(file, BuildingOwner.class); |
||||
|
IBuildingOwnerService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,197 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildingCommunity; |
||||
|
import com.zscat.mallplus.build.entity.BuildingFloor; |
||||
|
import com.zscat.mallplus.build.entity.BuildingRoom; |
||||
|
import com.zscat.mallplus.build.entity.BuildingUnit; |
||||
|
import com.zscat.mallplus.build.service.IBuildingCommunityService; |
||||
|
import com.zscat.mallplus.build.service.IBuildingFloorService; |
||||
|
import com.zscat.mallplus.build.service.IBuildingUnitService; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.IdWorker; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 小区 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/building/room") |
||||
|
public class BuildingRoomController { |
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildingRoomService IBuildingRoomService; |
||||
|
|
||||
|
@Resource |
||||
|
private IBuildingUnitService unitService; |
||||
|
@Resource |
||||
|
private IBuildingFloorService floorService; |
||||
|
@Resource |
||||
|
private IBuildingCommunityService communityService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有房间表列表") |
||||
|
@ApiOperation("根据条件查询所有房间表列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('building:room:read')") |
||||
|
public Object getBuildingRoomByPage(BuildingRoom entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildingRoomService.page(new Page<BuildingRoom>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有房间表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询楼层和房间") |
||||
|
@ApiOperation("根据条件查询所有房间表列表") |
||||
|
@GetMapping(value = "/withChilds") |
||||
|
public Object withChilds(BuildingFloor entity) { |
||||
|
try { |
||||
|
List<BuildingFloor> floors = floorService.list(new QueryWrapper<>(entity)); |
||||
|
for (BuildingFloor floor : floors) { |
||||
|
List<BuildingRoom> list = IBuildingRoomService.list(new QueryWrapper<BuildingRoom>().eq("floor_id", floor.getId())); |
||||
|
floor.setChildren(list); |
||||
|
} |
||||
|
return new CommonResult().success(floors); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有房间表列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存房间表") |
||||
|
@ApiOperation("保存房间表") |
||||
|
@PostMapping(value = "/create") |
||||
|
|
||||
|
public Object saveBuildingRoom(@RequestBody BuildingRoom entity) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(entity.getUnitId())) { |
||||
|
return new CommonResult().failed("请选择单元"); |
||||
|
} |
||||
|
entity.setCreateTime(new Date()); |
||||
|
BuildingUnit unit = unitService.getById(entity.getUnitId()); |
||||
|
BuildingFloor floor = floorService.getById(unit.getFloorId()); |
||||
|
entity.setFloorId(floor.getId()); |
||||
|
entity.setCommunityId(floor.getCommunityId()); |
||||
|
BuildingCommunity community = communityService.getById(floor.getCommunityId()); |
||||
|
entity.setRoomDesc(community.getName() + "-" + floor.getName() + "-" + unit.getUnitNum() + "-" + entity.getRoomNum()); |
||||
|
entity.setLayer(floor.getLayerCount()); |
||||
|
entity.setId(IdWorker.getId()); |
||||
|
if (IBuildingRoomService.save(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存房间表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新房间表") |
||||
|
@ApiOperation("更新房间表") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
|
||||
|
public Object updateBuildingRoom(@RequestBody BuildingRoom entity) { |
||||
|
try { |
||||
|
if (IBuildingRoomService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新房间表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除房间表") |
||||
|
@ApiOperation("删除房间表") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
|
||||
|
public Object deleteBuildingRoom(@ApiParam("房间表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("房间表id"); |
||||
|
} |
||||
|
if (IBuildingRoomService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除房间表:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给房间表分配房间表") |
||||
|
@ApiOperation("查询房间表明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
|
||||
|
public Object getBuildingRoomById(@ApiParam("房间表id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("房间表id"); |
||||
|
} |
||||
|
BuildingRoom coupon = IBuildingRoomService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询房间表明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除房间表") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@ResponseBody |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除房间表") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildingRoomService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildingRoom entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildingRoom> personList = IBuildingRoomService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出房屋数据", "房屋数据", BuildingRoom.class, "导出房屋数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildingRoom> personList = EasyPoiUtils.importExcel(file, BuildingRoom.class); |
||||
|
IBuildingRoomService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,159 @@ |
|||||
|
package com.zscat.mallplus.build.controller; |
||||
|
|
||||
|
|
||||
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper; |
||||
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page; |
||||
|
import com.zscat.mallplus.annotation.SysLog; |
||||
|
import com.zscat.mallplus.build.entity.BuildingCommunity; |
||||
|
import com.zscat.mallplus.build.entity.BuildingUnit; |
||||
|
import com.zscat.mallplus.util.EasyPoiUtils; |
||||
|
import com.zscat.mallplus.utils.CommonResult; |
||||
|
import com.zscat.mallplus.utils.ValidatorUtils; |
||||
|
import io.swagger.annotations.ApiOperation; |
||||
|
import io.swagger.annotations.ApiParam; |
||||
|
import lombok.extern.slf4j.Slf4j; |
||||
|
import org.springframework.security.access.prepost.PreAuthorize; |
||||
|
import org.springframework.web.bind.annotation.*; |
||||
|
import org.springframework.web.multipart.MultipartFile; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import javax.servlet.http.HttpServletResponse; |
||||
|
import java.util.Date; |
||||
|
import java.util.List; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 前端控制器 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
@Slf4j |
||||
|
@RestController |
||||
|
@RequestMapping("/building/unit") |
||||
|
public class BuildingUnitController { |
||||
|
|
||||
|
@Resource |
||||
|
private com.zscat.mallplus.build.service.IBuildingUnitService IBuildingUnitService; |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "根据条件查询所有房屋单元列表") |
||||
|
@ApiOperation("根据条件查询所有房屋单元列表") |
||||
|
@GetMapping(value = "/list") |
||||
|
@PreAuthorize("hasAuthority('building:unit:read')") |
||||
|
public Object getBuildingUnitByPage(BuildingUnit entity, |
||||
|
@RequestParam(value = "pageNum", defaultValue = "1") Integer pageNum, |
||||
|
@RequestParam(value = "pageSize", defaultValue = "10") Integer pageSize |
||||
|
) { |
||||
|
try { |
||||
|
return new CommonResult().success(IBuildingUnitService.page(new Page<BuildingUnit>(pageNum, pageSize), new QueryWrapper<>(entity))); |
||||
|
} catch (Exception e) { |
||||
|
log.error("根据条件查询所有房屋单元列表:%s", e.getMessage(), e); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "保存房屋单元") |
||||
|
@ApiOperation("保存房屋单元") |
||||
|
@PostMapping(value = "/create") |
||||
|
|
||||
|
public Object saveBuildingUnit(@RequestBody BuildingUnit entity) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(entity.getFloorId())) { |
||||
|
return new CommonResult().failed("请选择楼"); |
||||
|
} |
||||
|
entity.setCreateTime(new Date()); |
||||
|
if (IBuildingUnitService.save(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("保存房屋单元:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "更新房屋单元") |
||||
|
@ApiOperation("更新房屋单元") |
||||
|
@PostMapping(value = "/update/{id}") |
||||
|
|
||||
|
public Object updateBuildingUnit(@RequestBody BuildingUnit entity) { |
||||
|
try { |
||||
|
if (IBuildingUnitService.updateById(entity)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("更新房屋单元:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "删除房屋单元") |
||||
|
@ApiOperation("删除房屋单元") |
||||
|
@GetMapping(value = "/delete/{id}") |
||||
|
|
||||
|
public Object deleteBuildingUnit(@ApiParam("房屋单元id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("房屋单元id"); |
||||
|
} |
||||
|
if (IBuildingUnitService.removeById(id)) { |
||||
|
return new CommonResult().success(); |
||||
|
} |
||||
|
} catch (Exception e) { |
||||
|
log.error("删除房屋单元:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
@SysLog(MODULE = "build", REMARK = "给房屋单元分配房屋单元") |
||||
|
@ApiOperation("查询房屋单元明细") |
||||
|
@GetMapping(value = "/{id}") |
||||
|
|
||||
|
public Object getBuildingUnitById(@ApiParam("房屋单元id") @PathVariable Long id) { |
||||
|
try { |
||||
|
if (ValidatorUtils.empty(id)) { |
||||
|
return new CommonResult().paramFailed("房屋单元id"); |
||||
|
} |
||||
|
BuildingUnit coupon = IBuildingUnitService.getById(id); |
||||
|
return new CommonResult().success(coupon); |
||||
|
} catch (Exception e) { |
||||
|
log.error("查询房屋单元明细:%s", e.getMessage(), e); |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@ApiOperation(value = "批量删除房屋单元") |
||||
|
@RequestMapping(value = "/delete/batch", method = RequestMethod.GET) |
||||
|
@ResponseBody |
||||
|
@SysLog(MODULE = "build", REMARK = "批量删除房屋单元") |
||||
|
public Object deleteBatch(@RequestParam("ids") List<Long> ids) { |
||||
|
boolean count = IBuildingUnitService.removeByIds(ids); |
||||
|
if (count) { |
||||
|
return new CommonResult().success(count); |
||||
|
} else { |
||||
|
return new CommonResult().failed(); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
@GetMapping("/exportExcel") |
||||
|
public void export(HttpServletResponse response, BuildingUnit entity) { |
||||
|
// 模拟从数据库获取需要导出的数据
|
||||
|
List<BuildingUnit> personList = IBuildingUnitService.list(new QueryWrapper<>(entity)); |
||||
|
// 导出操作
|
||||
|
EasyPoiUtils.exportExcel(personList, "导出单元数据", "单元数据", BuildingCommunity.class, "导出单元数据.xls", response); |
||||
|
|
||||
|
} |
||||
|
|
||||
|
@PostMapping("/importExcel") |
||||
|
public void importUsers(@RequestParam MultipartFile file) { |
||||
|
List<BuildingUnit> personList = EasyPoiUtils.importExcel(file, BuildingUnit.class); |
||||
|
IBuildingUnitService.saveBatch(personList); |
||||
|
} |
||||
|
} |
||||
|
|
||||
|
|
||||
|
|
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildAdv; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 首页轮播广告表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
public interface IBuildAdvService extends IService<BuildAdv> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildApplyRoom; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
public interface IBuildApplyRoomService extends IService<BuildApplyRoom> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildGroupMember; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
public interface IBuildGroupMemberService extends IService<BuildGroupMember> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildGroup; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
public interface IBuildGroupService extends IService<BuildGroup> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildNotice; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 公告表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
public interface IBuildNoticeService extends IService<BuildNotice> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildRepair; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
public interface IBuildRepairService extends IService<BuildRepair> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildTypePrice; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
public interface IBuildTypePriceService extends IService<BuildTypePrice> { |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildWuyeCompany; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
public interface IBuildWuyeCompanyService extends IService<BuildWuyeCompany> { |
||||
|
|
||||
|
boolean saveCompany(BuildWuyeCompany entity); |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildWuyePrice; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
public interface IBuildWuyePriceService extends IService<BuildWuyePrice> { |
||||
|
|
||||
|
} |
@ -0,0 +1,17 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildingCommunity; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 小区 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
public interface IBuildingCommunityService extends IService<BuildingCommunity> { |
||||
|
|
||||
|
boolean saveCommunity(BuildingCommunity entity); |
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildingFloor; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
public interface IBuildingFloorService extends IService<BuildingFloor> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildingOwner; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 业主成员表 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
public interface IBuildingOwnerService extends IService<BuildingOwner> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildingRoom; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 小区 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
public interface IBuildingRoomService extends IService<BuildingRoom> { |
||||
|
|
||||
|
} |
@ -0,0 +1,16 @@ |
|||||
|
package com.zscat.mallplus.build.service; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.IService; |
||||
|
import com.zscat.mallplus.build.entity.BuildingUnit; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
public interface IBuildingUnitService extends IService<BuildingUnit> { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildAdv; |
||||
|
import com.zscat.mallplus.build.mapper.BuildAdvMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildAdvService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 首页轮播广告表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildAdvServiceImpl extends ServiceImpl<BuildAdvMapper, BuildAdv> implements IBuildAdvService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildApplyRoom; |
||||
|
import com.zscat.mallplus.build.mapper.BuildApplyRoomMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildApplyRoomService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildApplyRoomServiceImpl extends ServiceImpl<BuildApplyRoomMapper, BuildApplyRoom> implements IBuildApplyRoomService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildGroupMember; |
||||
|
import com.zscat.mallplus.build.mapper.BuildGroupMemberMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildGroupMemberService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildGroupMemberServiceImpl extends ServiceImpl<BuildGroupMemberMapper, BuildGroupMember> implements IBuildGroupMemberService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildGroup; |
||||
|
import com.zscat.mallplus.build.mapper.BuildGroupMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildGroupService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildGroupServiceImpl extends ServiceImpl<BuildGroupMapper, BuildGroup> implements IBuildGroupService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildNotice; |
||||
|
import com.zscat.mallplus.build.mapper.BuildNoticeMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildNoticeService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 公告表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildNoticeServiceImpl extends ServiceImpl<BuildNoticeMapper, BuildNotice> implements IBuildNoticeService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildRepair; |
||||
|
import com.zscat.mallplus.build.mapper.BuildRepairMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildRepairService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildRepairServiceImpl extends ServiceImpl<BuildRepairMapper, BuildRepair> implements IBuildRepairService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildTypePrice; |
||||
|
import com.zscat.mallplus.build.mapper.BuildTypePriceMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildTypePriceService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildTypePriceServiceImpl extends ServiceImpl<BuildTypePriceMapper, BuildTypePrice> implements IBuildTypePriceService { |
||||
|
|
||||
|
} |
@ -0,0 +1,70 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildWuyeCompany; |
||||
|
import com.zscat.mallplus.build.mapper.BuildWuyeCompanyMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildWuyeCompanyService; |
||||
|
import com.zscat.mallplus.exception.ApiMallPlusException; |
||||
|
import com.zscat.mallplus.sys.entity.SysUser; |
||||
|
import com.zscat.mallplus.sys.entity.SysUserRole; |
||||
|
import com.zscat.mallplus.sys.mapper.SysUserMapper; |
||||
|
import com.zscat.mallplus.sys.mapper.SysUserRoleMapper; |
||||
|
import org.springframework.security.crypto.password.PasswordEncoder; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
import org.springframework.transaction.annotation.Transactional; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildWuyeCompanyServiceImpl extends ServiceImpl<BuildWuyeCompanyMapper, BuildWuyeCompany> implements IBuildWuyeCompanyService { |
||||
|
|
||||
|
@Resource |
||||
|
private BuildWuyeCompanyMapper wuyeCompanyMapper; |
||||
|
@Resource |
||||
|
private SysUserMapper userMapper; |
||||
|
@Resource |
||||
|
private PasswordEncoder passwordEncoder; |
||||
|
@Resource |
||||
|
private SysUserRoleMapper userRoleMapper; |
||||
|
|
||||
|
@Transactional |
||||
|
@Override |
||||
|
public boolean saveCompany(BuildWuyeCompany entity) { |
||||
|
//1 创建物业公司
|
||||
|
entity.setCreateTime(new Date()); |
||||
|
wuyeCompanyMapper.insert(entity); |
||||
|
// 2 创建物业公司账号
|
||||
|
SysUser user = new SysUser(); |
||||
|
user.setUsername(entity.getName()); |
||||
|
SysUser umsAdminList = userMapper.selectByUserName(entity.getName()); |
||||
|
if (umsAdminList != null) { |
||||
|
throw new ApiMallPlusException("此物业公司已存在"); |
||||
|
} |
||||
|
user.setStatus(1); |
||||
|
// user.setStoreId(entity.getId());
|
||||
|
user.setSupplyId(0L); |
||||
|
user.setPassword(passwordEncoder.encode("123456")); |
||||
|
user.setCreateTime(new Date()); |
||||
|
user.setSupplyId(0L); |
||||
|
user.setNote("物业公司账户:物业公司ID=" + entity.getName() + "," + entity.getId()); |
||||
|
user.setIcon(entity.getPic()); |
||||
|
user.setNickName(entity.getName()); |
||||
|
userMapper.insert(user); |
||||
|
|
||||
|
// 3 分配物业公司角色
|
||||
|
SysUserRole userRole = new SysUserRole(); |
||||
|
userRole.setAdminId(user.getId()); |
||||
|
userRole.setRoleId(5L); |
||||
|
userRoleMapper.insert(userRole); |
||||
|
return true; |
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildWuyePrice; |
||||
|
import com.zscat.mallplus.build.mapper.BuildWuyePriceMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildWuyePriceService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-12-02 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildWuyePriceServiceImpl extends ServiceImpl<BuildWuyePriceMapper, BuildWuyePrice> implements IBuildWuyePriceService { |
||||
|
|
||||
|
} |
@ -0,0 +1,66 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildingCommunity; |
||||
|
import com.zscat.mallplus.build.mapper.BuildingCommunityMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildingCommunityService; |
||||
|
import com.zscat.mallplus.exception.ApiMallPlusException; |
||||
|
import com.zscat.mallplus.sys.entity.SysUser; |
||||
|
import com.zscat.mallplus.sys.entity.SysUserRole; |
||||
|
import com.zscat.mallplus.sys.mapper.SysUserMapper; |
||||
|
import com.zscat.mallplus.sys.mapper.SysUserRoleMapper; |
||||
|
import org.springframework.security.crypto.password.PasswordEncoder; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
import javax.annotation.Resource; |
||||
|
import java.util.Date; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 小区 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildingCommunityServiceImpl extends ServiceImpl<BuildingCommunityMapper, BuildingCommunity> implements IBuildingCommunityService { |
||||
|
|
||||
|
@Resource |
||||
|
private BuildingCommunityMapper communityMapper; |
||||
|
@Resource |
||||
|
private SysUserMapper userMapper; |
||||
|
@Resource |
||||
|
private PasswordEncoder passwordEncoder; |
||||
|
@Resource |
||||
|
private SysUserRoleMapper userRoleMapper; |
||||
|
|
||||
|
@Override |
||||
|
public boolean saveCommunity(BuildingCommunity entity) { |
||||
|
//1 创建小区
|
||||
|
entity.setCreateTime(new Date()); |
||||
|
communityMapper.insert(entity); |
||||
|
// 2 创建物业公司账号
|
||||
|
SysUser user = new SysUser(); |
||||
|
user.setUsername(entity.getName()); |
||||
|
SysUser umsAdminList = userMapper.selectByUserName(entity.getName()); |
||||
|
if (umsAdminList != null) { |
||||
|
throw new ApiMallPlusException("此小区已存在"); |
||||
|
} |
||||
|
user.setStatus(1); |
||||
|
// user.setStoreId(entity.getId());
|
||||
|
user.setPassword(passwordEncoder.encode("123456")); |
||||
|
user.setCreateTime(new Date()); |
||||
|
user.setSupplyId(0L); |
||||
|
user.setNote("小区账户:小区ID=" + entity.getName() + "," + entity.getId()); |
||||
|
user.setNickName(entity.getName()); |
||||
|
userMapper.insert(user); |
||||
|
|
||||
|
// 3 分配物业公司角色
|
||||
|
SysUserRole userRole = new SysUserRole(); |
||||
|
userRole.setAdminId(user.getId()); |
||||
|
userRole.setRoleId(5L); |
||||
|
userRoleMapper.insert(userRole); |
||||
|
return true; |
||||
|
} |
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildingFloor; |
||||
|
import com.zscat.mallplus.build.mapper.BuildingFloorMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildingFloorService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildingFloorServiceImpl extends ServiceImpl<BuildingFloorMapper, BuildingFloor> implements IBuildingFloorService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildingOwner; |
||||
|
import com.zscat.mallplus.build.mapper.BuildingOwnerMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildingOwnerService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 业主成员表 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildingOwnerServiceImpl extends ServiceImpl<BuildingOwnerMapper, BuildingOwner> implements IBuildingOwnerService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildingRoom; |
||||
|
import com.zscat.mallplus.build.mapper.BuildingRoomMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildingRoomService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 小区 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildingRoomServiceImpl extends ServiceImpl<BuildingRoomMapper, BuildingRoom> implements IBuildingRoomService { |
||||
|
|
||||
|
} |
@ -0,0 +1,20 @@ |
|||||
|
package com.zscat.mallplus.build.service.impl; |
||||
|
|
||||
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; |
||||
|
import com.zscat.mallplus.build.entity.BuildingUnit; |
||||
|
import com.zscat.mallplus.build.mapper.BuildingUnitMapper; |
||||
|
import com.zscat.mallplus.build.service.IBuildingUnitService; |
||||
|
import org.springframework.stereotype.Service; |
||||
|
|
||||
|
/** |
||||
|
* <p> |
||||
|
* 服务实现类 |
||||
|
* </p> |
||||
|
* |
||||
|
* @author zscat |
||||
|
* @since 2019-11-27 |
||||
|
*/ |
||||
|
@Service |
||||
|
public class BuildingUnitServiceImpl extends ServiceImpl<BuildingUnitMapper, BuildingUnit> implements IBuildingUnitService { |
||||
|
|
||||
|
} |
Some files were not shown because too many files changed in this diff
Loading…
Reference in new issue