Compare commits

..

5 Commits

Author SHA1 Message Date
yovinchen cafb099c40 测试完成回归正常 2024-01-25 14:52:32 +08:00
yovinchen f33d9340b3 Merge remote-tracking branch 'origin/update' into update
# Conflicts:
#	README.md
2024-01-25 14:43:56 +08:00
yovinchen cbc0eea5e7 Reapply "撤销提交重新推送"
This reverts commit 64b65acefff9607d2b9a670db18677ece0111eec.
2024-01-25 14:41:59 +08:00
yovinchen 5f66891b8b 学习 git 提交回滚 2024-01-25 14:39:09 +08:00
yovinchen b160edca01 修改角色管理中权限分配 新增登录日志表
修改 @Create 标识为 @since
2024-01-24 17:03:32 +08:00
285 changed files with 1147 additions and 1303 deletions

View File

@ -1,16 +0,0 @@
<?xml version="1.0" encoding="UTF-8"?>
<project version="4">
<component name="GrepConsole">
<option name="tailHistory">
<TailHistory>
<option name="items">
<set>
<TailItem>
<option name="path" value="$PROJECT_DIR$/README.md" />
</TailItem>
</set>
</option>
</TailHistory>
</option>
</component>
</project>

View File

@ -26,11 +26,6 @@
<option name="name" value="Nexus aliyun" />
<option name="url" value="https://maven.aliyun.com/repository/public" />
</remote-repository>
<remote-repository>
<option name="id" value="alimaven" />
<option name="name" value="aliyun maven" />
<option name="url" value="http://maven.aliyun.com/nexus/content/groups/public/" />
</remote-repository>
<remote-repository>
<option name="id" value="spring" />
<option name="name" value="spring" />

View File

@ -3,9 +3,9 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-acl" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceAclApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Acl -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Acl -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>

View File

@ -3,9 +3,9 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-activity" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceActivityApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Activity -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Activity -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>

View File

@ -3,9 +3,9 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-cart" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceCartApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Cart -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Cart -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>

View File

@ -2,9 +2,9 @@
<configuration default="false" name="ServiceGatewayApplication" type="SpringBootApplicationConfigurationType" factoryName="Spring Boot" nameIsGenerated="true">
<module name="service-gateway" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceGatewayApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Gateway -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Gateway -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>

View File

@ -3,9 +3,9 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-home" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceHomeApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Home -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Home -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>

View File

@ -3,9 +3,9 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-order" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceOrderApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Order -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Order -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>

View File

@ -3,9 +3,9 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-payment" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServicePaymentApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Payment -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Payment -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>

View File

@ -3,9 +3,9 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-product" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceProductApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Product -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Product -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>

View File

@ -3,9 +3,9 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-search" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceSearchApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Search -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Search -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>

View File

@ -3,9 +3,9 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-sys" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceSysApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=Sys -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-Sys -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>

View File

@ -3,9 +3,9 @@
<option name="FRAME_DEACTIVATION_UPDATE_POLICY" value="UpdateClassesAndResources" />
<module name="service-user" />
<option name="SPRING_BOOT_MAIN_CLASS" value="com.yovinchen.xlcs.ServiceUserApplication" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=User -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<option name="VM_PARAMETERS" value="-javaagent:$PROJECT_DIR$/../skywalking-agent/skywalking-agent.jar -Dskywalking.agent.service_name=ms::xlcs-parent-service-User -Dskywalking.collector.backend_service=10.211.55.50:11800" />
<method v="2">
<option name="Make" enabled="true" />
</method>
</configuration>
</component>
</component>

168
README.md
View File

@ -1,91 +1,6 @@
# 小鹿超市项目
## 配置信息
### 服务器硬件配置
| 硬件 | 配置 | 数量 | 参考单价 |
|-----|----------------------------|----|------------|
| CPU | E5 2673v3 | 2 | 56 |
| 主板 | 华南金牌 x99-8D3 双路 | 1 | 580 |
| 内存 | 三星 32G DDR3 ECC 4R*4 1866L | 2 | 88 |
| 机箱 | 金河田 凌霜Pro 黑色 | 1 | 148 |
| 电源 | 鑫谷 GN650 650W 金牌 | 1 | 299 |
| 风扇 | A500 风扇 | 2 | 40 |
| 显卡 | 亮机卡 | 1 | 20 |
| 硬盘 | 三星 970EVO 512G | 1 | 600笔记本拆机 |
| 硬盘 | 希捷 紫盘 4T | 1 | 439 |
| | | 总价 | 2454 |
### 内网穿透服务器(测试服务器)
| 厂商 | 配置 | IP | 时间 | 地区 |
|-----|---------|----|---------|------|
| 腾讯云 | 2c2g3m | | 2024-06 | 北京 |
| 腾讯云 | 4c4g8m | | 2024-06 | 北京 |
| 华为云 | 2c4g1m | | 2024-02 | 北京 |
| 阿里云 | 2c2g2m | | 2024-06 | 乌兰察布 |
| 雨云 | 8c8g80m | | 2024-03 | 洛杉矶 |
| | | | | |
### 服务器参数
| 指标 | 参数 |
|-----------|------|
| 核心 | 24 |
| 线程 | 48 |
| 内存 | 64 |
| 固态硬盘 | 512G |
| 机械硬盘(未购买) | |
| | |
### 环境配置需求
| | |
|-------|-----------------|
| 底层虚拟化 | Debian12 PVE |
| 集群系统 | CentOS 8 Stream |
| | |
### 集群分配设置
| 模块 | 简称 | 核心 | 内存 | 硬盘 | 数量 | IP | 端口 |
|-------|----------|----|----|-----|----|----|----|
| 权限模块 | acl | 1 | 1 | 10 | 2 | | |
| 区域模块 | Sys | 1 | 1 | 10 | 2 | | |
| 订单模块 | order | 2 | 2 | 10 | 2 | | |
| 支付模块 | payment | 1 | 2 | 10 | 2 | | |
| 搜索模块 | search | 2 | 2 | 10 | 2 | | |
| 用户模块 | user | 1 | 1 | 10 | 2 | | |
| 商品模块 | product | 1 | 2 | 10 | 2 | | |
| 区域模块 | sys | 1 | 1 | 10 | 2 | | |
| 购物车模块 | cart | 2 | 1 | 10 | 2 | | |
| 优惠券模块 | activity | 1 | 1 | 10 | 2 | | |
| 网关 | gateway | 1 | 2 | 10 | 3 | | |
| 后台 | admin | 1 | 2 | 5 | 2 | | |
| 小程序 | user | | | | | | |
| 总数 | | 25 | 33 | 110 | 23 | | |
### 环境配置
| 模块 | 版本 | 核心 | 内存 | 硬盘 | 数量 | IP | |
|---------------|------------------------------|----|----|----|----|----|------|
| MySQL | 8.0.30 | | | | | | |
| Redis | 7.2.4 | | | | | | |
| Minio | RELEASE.2023-08-16T20-17-30Z | | | | | | |
| RabbitMQ | 3.12.12 | | | | | | |
| Elasticsearch | 7.17.7 | | | | | | |
| Kinbana | 7.17.7 | | | | | | |
| Nacos | 2.2.3 | | | | | | |
| | | | | | | | |
| SkyWalking | 9.7.0 | | | | | | |
| DevOps | | | | | | | |
| Gitea | 1.21.3 | | | | | | |
| Nexus3 | 2023-12-27T07:29 | | | | | | |
## 技术栈
### 后端技术栈
## 后端技术栈
| 核心技术 |
| :----------------------------------------------------------- |
@ -109,7 +24,7 @@
| |
| |
### 前端技术栈
## 前端技术栈
| 核心技术 |
| ------------------ |
@ -123,7 +38,9 @@
| |
| |
### 开发工具
## 开发工具
| 开发工具 | 版本 |
| ----------------------------- | -------------- |
@ -138,22 +55,16 @@
| Termius | 8.4.0 |
| 微信开发者工具 | 1.06.2306020 |
### 操作系统
## 操作系统
| 开发工具 | 版本 |
|---------------------|--------|
| 开发工具 | 版本 |
| ------------------- | ------ |
| Mac OS Ventura | 13.6.3 |
| Linux CentOS | 7.9 |
| Linux CentOS Stream | 8 |
| Linux CentOS Stream | 9 |
| Linux CentOS | 7.9 |
## 项目环境部署
### portainer docker 可视化
```shell
docker run -d -p 8000:8000 -p 9000:9000 --name=portainer --restart=always -v /var/run/docker.sock:/var/run/docker.sock -v portainer_data:/data portainer/portainer-ce
```
### Mysql 数据库
```shell
@ -193,33 +104,15 @@ nacos/nacos-server:v2.2.3
docker run -p 9200:9200 -p 9300:9300 --name elasticsearch \
-e "discovery.type=single-node" \
-e ES_JAVA_OPTS="-Xms512m -Xmx512m" \
-d elasticsearch:7.17.7
-d elasticsearch:7.8.0
docker exec -it elasticsearch /bin/bash
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.17.7/elasticsearch-analysis-ik-7.17.7.zip
./bin/elasticsearch-plugin install https://github.com/medcl/elasticsearch-analysis-ik/releases/download/v7.17.5/elasticsearch-analysis-ik-7.17.5.zip
docker restart elasticsearch
docker run -d --name kibana --link elasticsearch:elasticsearch -p 5601:5601 kibana:7.17.7
```
其中服务器可能因为网络原因下载不下来 ik 分词器,我们下载后本地导入安装
```shell
# ik 分词器在服务器中的位置 /root/elasticsearch-analysis-ik-7.17.7.zip
# 导入 docker 中
docker cp /root/elasticsearch-analysis-ik-7.17.7.zip elasticsearch:/tmp/elasticsearch-analysis-ik-7.17.7.zip
# 进入容器
docker exec -it elasticsearch /bin/bash
# 安装
./bin/elasticsearch-plugin install file:///tmp/elasticsearch-analysis-ik-7.17.7.zip
# 退出后继续按照上述内容重启 安装 kibana
exit
docker run -d --name kibana --link elasticsearch:elasticsearch -p 5601:5601 kibana:7.8.0
```
### GrayLog 日志框架 (已弃用,日志服务整合到 SkyWalking)
@ -301,7 +194,7 @@ services:
environment:
SW_HEALTH_CHECKER: default
SW_STORAGE: elasticsearch
SW_STORAGE_ES_CLUSTER_NODES: 192.168.31.50:9200
SW_STORAGE_ES_CLUSTER_NODES: 124.70.87.134:9200
JAVA_OPTS: "-Xms2048m -Xmx2048m"
TZ: Asia/Shanghai
SW_TELEMETRY: prometheus
@ -326,7 +219,7 @@ services:
ports:
- "8080:8080"
environment:
SW_OAP_ADDRESS: http://192.168.31.50:12800
SW_OAP_ADDRESS: http://124.70.87.134:12800
SW_HEALTH_CHECKER: default
TZ: Asia/Shanghai
healthcheck:
@ -337,10 +230,31 @@ services:
start_period: 60s #⾸次检测延迟时间
```
## 开发需求
## 学习 git 提交回滚
| | | |
|------|------|------|
| | | |
| | | |
| | | |
```shell
撤销提交重新推送
重新提交推送
再次尝试提交推送
```
总结:自己的远程分支版本回退的方法
```shell
#首先找到需要会退版本ID
git reflog
#如果你的错误提交已经推送到自己的远程分支了,那么就需要回滚远程分支了。
#首先要回退本地分支
git reflogç
git reset --hard Obfafd
#紧接着强制推送到远程分支
git push -f
```
最后强制推送效果(可视化中没有找到强制推送,先使用命令行强制推送吧)
![image-20240125145054441](https://lsky.hhdxw.top/imghub/2024/01/image-202401251706165455.png)

View File

@ -3,4 +3,4 @@ ENV = 'development'
# base api
# VUE_APP_BASE_API = '/dev-api'
VUE_APP_BASE_API = 'http://192.168.31.67:8200'
VUE_APP_BASE_API = 'http://localhost:8200'

View File

@ -3,5 +3,5 @@ ENV = 'production'
# base api
#VUE_APP_BASE_API = '/prod-api'
VUE_APP_BASE_API = 'http://192.168.31.67:8200'
VUE_APP_BASE_API = 'http://localhost:8200'

View File

@ -1,11 +0,0 @@
FROM nginx:latest
EXPOSE 80
WORKDIR /app
# 替换nginx配置
COPY nginx.conf /etc/nginx/conf.d/default.conf
# 将第一阶段的静态文件复制到nginx中
RUN rm -rf /usr/share/nginx/html
RUN mkdir /usr/share/nginx/html
COPY ./dist /usr/share/nginx/html
CMD ["nginx", "-g", "daemon off;"]

View File

@ -1,21 +0,0 @@
server {
listen 80;
listen [::]:80;
server_name localhost;
access_log /var/log/nginx/host.access.log main;
location / {
root /usr/share/nginx/html;
index index.html index.htm;
# 新增下面这句其他是默认nginx配置
# 解决部分前端框架的路由问题在浏览器刷新报错404
try_files $uri $uri/ /index.html;
}
error_page 500 502 503 504 /50x.html;
location = /50x.html {
root /usr/share/nginx/html;
}
}

View File

@ -1,10 +1,11 @@
import Vue from 'vue'
import Router from 'vue-router'
/* Layout */
import Layout from '@/layout'
Vue.use(Router)
/* Layout */
import Layout from '@/layout'
/**
* Note: sub-menu only appear when route children.length >= 1
* Detail see: https://panjiachen.github.io/vue-element-admin-site/guide/essentials/router-and-nav.html
@ -314,20 +315,20 @@ export const constantRoutes = [
component: Layout,
redirect: '/user/leader/list',
name: 'Leader',
meta: {title: '配送员管理', icon: 'table'},
meta: { title: '团长管理', icon: 'table' },
alwaysShow: true,
children: [
{
path: 'leader/checkList',
name: 'LeaderCheck',
component: () => import('@/views/user/leader/checkList'),
meta: {title: '配送员待审核'}
meta: { title: '团长待审核' }
},
{
path: 'leader/list',
name: 'leader',
component: () => import('@/views/user/leader/list'),
meta: {title: '配送员已审核'}
meta: { title: '团长已审核' }
}
]
},

View File

@ -3,41 +3,41 @@
<!-- 工具条 -->
<div class="tools-div">
<el-button icon="el-icon-plus" size="mini" type="success" @click="add()"> </el-button>
<el-button type="success" icon="el-icon-plus" size="mini" @click="add()"> </el-button>
</div>
<el-table
:data="sysMenuList"
style="width: 100%;margin-bottom: 20px;margin-top: 10px;"
row-key="id"
border
:default-expand-all="false"
:tree-props="{children: 'children'}"
border
row-key="id"
style="width: 100%;margin-bottom: 20px;margin-top: 10px;"
>
<el-table-column label="菜单名称" prop="name" width="200"/>
<el-table-column prop="name" label="菜单名称" width="200" />
<el-table-column label="权限标识" prop="code" width="180"/>
<el-table-column prop="code" label="权限标识" width="180" />
<el-table-column label="创建时间" prop="createTime" width="200"/>
<el-table-column prop="createTime" label="创建时间" width="200" />
<el-table-column label="修改时间" prop="updateTime" width="200"/>
<el-table-column align="center" label="操作">
<el-table-column prop="updateTime" label="修改时间" width="200" />
<el-table-column label="操作" align="center">
<template slot-scope="scope">
<el-button
v-if="scope.row.type !== 2"
type="success"
icon="el-icon-plus"
size="mini"
title="添加下级节点"
type="success"
@click="add(scope.row)"
/>
<el-button icon="el-icon-edit" size="mini" title="修改" type="primary" @click="edit(scope.row)"/>
<el-button type="primary" icon="el-icon-edit" size="mini" title="修改" @click="edit(scope.row)" />
<el-button
:disabled="scope.row.children.length > 0"
type="danger"
icon="el-icon-delete"
size="mini"
title="删除"
type="danger"
:disabled="scope.row.children.length > 0"
@click="removeDataById(scope.row.id)"
/>
</template>
@ -47,36 +47,36 @@
<el-dialog :title="dialogTitle" :visible.sync="dialogVisible" width="40%">
<el-form ref="dataForm" :model="sysMenu" label-width="150px" size="small" style="padding-right: 40px;">
<el-form-item v-if="sysMenu.id === ''" label="上级部门">
<el-input v-model="sysMenu.parentName" disabled="true"/>
<el-input v-model="sysMenu.parentName" disabled="true" />
</el-form-item>
<el-form-item label="菜单类型" prop="type">
<el-radio-group v-model="sysMenu.type" :disabled="typeDisabled">
<el-radio :disabled="type0Disabled" :label="0">目录</el-radio>
<el-radio :disabled="type1Disabled" :label="1">菜单</el-radio>
<el-radio :disabled="type2Disabled" :label="2">按钮</el-radio>
<el-radio :label="0" :disabled="type0Disabled">目录</el-radio>
<el-radio :label="1" :disabled="type1Disabled">菜单</el-radio>
<el-radio :label="2" :disabled="type2Disabled">按钮</el-radio>
</el-radio-group>
</el-form-item>
<el-form-item label="菜单名称" prop="name">
<el-input v-model="sysMenu.name"/>
<el-input v-model="sysMenu.name" />
</el-form-item>
<el-form-item v-if="sysMenu.type !== 0" prop="to_code">
<span slot="label">
<el-tooltip content="访问的组件路径,如:`system/user/index`,默认在`views`目录下" placement="top">
<i class="el-icon-question"/>
<i class="el-icon-question" />
</el-tooltip>
组件路径
</span>
<el-input v-model="sysMenu.to_code" placeholder="请输入组件路径"/>
<el-input v-model="sysMenu.to_code" placeholder="请输入组件路径" />
</el-form-item>
<el-form-item v-if="sysMenu.type === 2">
<el-input v-model="sysMenu.code" maxlength="100" placeholder="请输入权限标识"/>
<el-input v-model="sysMenu.code" placeholder="请输入权限标识" maxlength="100" />
<span slot="label">
<el-tooltip
content="控制器中定义的权限字符,如:@PreAuthorize(hasAuthority('bnt.sysRole.list'))"
placement="top"
>
<i class="el-icon-question"/>
<i class="el-icon-question" />
</el-tooltip>
权限字符
</span>
@ -84,8 +84,8 @@
</el-form>
<span slot="footer" class="dialog-footer">
<el-button icon="el-icon-refresh-right" size="small" @click="dialogVisible = false"> </el-button>
<el-button icon="el-icon-check" size="small" type="primary" @click="saveOrUpdate()"> </el-button>
<el-button size="small" icon="el-icon-refresh-right" @click="dialogVisible = false"> </el-button>
<el-button type="primary" icon="el-icon-check" size="small" @click="saveOrUpdate()"> </el-button>
</span>
</el-dialog>
</div>

View File

@ -3,12 +3,12 @@
<el-card class="operate-container" shadow="never">
<div style="margin-top: 15px">
<el-form :inline="true" label-width="140px" size="small">
<el-form :inline="true" size="small" label-width="140px">
<el-form-item label="输入搜索:">
<el-input v-model="tempSearchObj.roleName" placeholder="角色名称" style="width: 203px"/>
<el-input v-model="tempSearchObj.roleName" style="width: 203px" placeholder="角色名称" />
</el-form-item>
<el-button icon="el-icon-search" type="primary" @click="search()">查询</el-button>
<el-button type="primary" icon="el-icon-search" @click="search()">查询</el-button>
<el-button type="default" @click="resetSearch()">清空</el-button>
</el-form>
</div>
@ -16,14 +16,14 @@
<!-- 工具条 -->
<el-card class="operate-container" shadow="never">
<i class="el-icon-tickets" style="margin-top: 5px"/>
<i class="el-icon-tickets" style="margin-top: 5px" />
<span style="margin-top: 5px">数据列表</span>
<el-button class="btn-add" size="mini" @click="addRole">添加</el-button>
<el-button
:disabled="selectedRoles.length === 0"
class="btn-add"
size="mini"
:disabled="selectedRoles.length === 0"
style="margin: 0 10px;"
@click="removeRoles()"
>批量删除
@ -32,9 +32,9 @@
<el-table
v-loading="listLoading"
:data="roles"
border
stripe
:data="roles"
@selection-change="handleSelectionChange"
>
@ -44,20 +44,20 @@
/>
<el-table-column
align="center"
label="序号"
type="index"
label="序号"
width="100"
align="center"
/>
<el-table-column align="center" label="角色名称" width="500">
<el-table-column label="角色名称" width="500" align="center">
<template slot-scope="{row}">
<template v-if="row.edit">
<el-input v-model="row.roleName" class="edit-input" size="small"/>
<el-input v-model="row.roleName" class="edit-input" size="small" />
<el-button
class="cancel-btn"
icon="el-icon-refresh"
size="small"
icon="el-icon-refresh"
type="warning"
@click="cancelEdit(row)"
>
@ -68,37 +68,37 @@
</template>
</el-table-column>
<el-table-column align="center" label="操作">
<el-table-column label="操作" align="center">
<template slot-scope="{row}">
<HintButton
icon="el-icon-info"
size="mini"
title="分配权限"
type="info"
icon="el-icon-info"
title="分配权限"
@click="$router.push(`/acl/role/auth/${row.id}?roleName=${row.roleName}`)"
/>
<HintButton
v-if="row.edit"
icon="el-icon-check"
size="mini"
title="确定"
type="primary"
icon="el-icon-check"
title="确定"
@click="updateRole(row)"
/>
<HintButton
v-if="!row.edit"
icon="el-icon-edit"
size="mini"
title="修改角色"
type="primary"
icon="el-icon-edit"
title="修改角色"
@click="row.edit= true"
/>
<HintButton
icon="el-icon-delete"
size="mini"
title="删除角色"
type="danger"
icon="el-icon-delete"
title="删除角色"
@click="removeRole(row)"
/>
</template>
@ -108,11 +108,11 @@
<!-- 分页组件 -->
<el-pagination
:current-page="page"
:total="total"
:page-size="limit"
:page-sizes="[5, 10, 20]"
:total="total"
layout="prev, pager, next, jumper, ->, sizes, total"
style="padding: 10px;"
layout="prev, pager, next, jumper, ->, sizes, total"
@current-change="getRoles"
@size-change="handleSizeChange"
/>
@ -161,7 +161,7 @@ export default {
更新角色
*/
updateRole(role) {
this.$API.role.updateById({id: role.id, roleName: role.roleName})
this.$API.role.updateById({ id: role.id, roleName: role.roleName })
.then(result => {
this.$message.success(result.message || '更新角色成功!')
this.getRoles(this.page)
@ -184,8 +184,8 @@ export default {
this.$prompt('请输入新名称', '添加角色', {
confirmButtonText: '确定',
cancelButtonText: '取消'
}).then(({value}) => {
this.$API.role.save({roleName: value}).then(result => {
}).then(({ value }) => {
this.$API.role.save({ roleName: value }).then(result => {
this.$message.success(result.message || '添加角色成功')
this.getRoles()
})
@ -200,10 +200,10 @@ export default {
getRoles(page = 1) {
this.page = page
this.listLoading = true
const {limit, searchObj} = this
const { limit, searchObj } = this
this.$API.role.getPageList(page, limit, searchObj).then(
result => {
const {records, total} = result.data
const { records, total } = result.data
this.roles = records.map(item => {
item.edit = false //
item.originRoleName = item.roleName // ,
@ -220,7 +220,7 @@ export default {
根据搜索条件进行搜索
*/
search() {
this.searchObj = {...this.tempSearchObj}
this.searchObj = { ...this.tempSearchObj }
this.getRoles()
},
@ -240,10 +240,10 @@ export default {
/*
删除指定的角色
*/
removeRole({id, roleName}) {
removeRole({ id, roleName }) {
this.$confirm(`确定删除 '${roleName}' 吗?`, '提示', {
type: 'warning'
}).then(async () => {
}).then(async() => {
const result = await this.$API.role.removeById(id)
this.getRoles(this.roles.length === 1 ? this.page - 1 : this.page)
this.$message.success(result.message || '删除成功!')
@ -265,7 +265,7 @@ export default {
removeRoles() {
this.$confirm('此操作将永久删除该记录, 是否继续?', '提示', {
type: 'warning'
}).then(async () => {
}).then(async() => {
const ids = this.selectedRoles.map(role => role.id)
const result = await this.$API.role.removeRoles(ids)
this.getRoles()

View File

@ -10,7 +10,7 @@
>
<div class="title-container">
<h3 class="title">小鹿超市管理端</h3>
<h3 class="title">购物商城管理端</h3>
</div>
<el-form-item prop="username">

View File

@ -52,9 +52,9 @@
align="center"
/>
<el-table-column label="配送员" prop="leaderName" width="90"/>
<el-table-column label="配送员电话" prop="leaderPhone" width="100"/>
<el-table-column label="配送点" prop="takeName" width="130"/>
<el-table-column prop="leaderName" label="团长" width="90" />
<el-table-column prop="leaderPhone" label="团长电话" width="100" />
<el-table-column prop="takeName" label="提货点" width="130" />
<el-table-column prop="skuNum" label="商品数量" width="80" />
<el-table-column prop="driverName" label="司机" width="90" />
<el-table-column prop="driverPhone" label="司机电话" width="100" />

View File

@ -4,7 +4,7 @@
<el-card class="operate-container" shadow="never">
<el-form inline>
<el-form-item label="订单号">
<el-input v-model="searchObj.orderNo" clearable placeholder="订单号" type="text" width="100"/>
<el-input v-model="searchObj.outTradeNo" type="text" width="100" placeholder="订单号" clearable />
</el-form-item>
<el-form-item label="订单状态">
@ -89,10 +89,10 @@
<p>电话{{ scope.row.receiverPhone }}</p>
</template>
</el-table-column>
<el-table-column label="配送员信息">
<el-table-column label="团长信息">
<template slot-scope="scope">
<p>姓名{{ scope.row.leaderName }}</p>
<p>配送{{ scope.row.takeName }}</p>
<p>提货{{ scope.row.takeName }}</p>
</template>
</el-table-column>
<el-table-column label="操作时间" width="200px">
@ -127,6 +127,7 @@
<script>
import api from '@/api/order/orderInfo'
import leaderApi from '@/api/user/leader'
import wareApi from '@/api/sys/ware'
export default {

View File

@ -34,9 +34,9 @@
<td width="35%">{{ orderInfo.receiverPhone }}</td>
</tr>
<tr>
<th>配送员名称</th>
<th>团长名称</th>
<td>{{ orderInfo.leaderName }}</td>
<th>配送</th>
<th>提货</th>
<td>{{ orderInfo.takeName }}</td>
</tr>
<tr>

View File

@ -35,7 +35,7 @@
<el-table-column prop="name" label="姓名" width="100px" />
<el-table-column prop="phone" label="手机号码" width="100px" />
<el-table-column label="配送点名称" prop="takeName"/>
<el-table-column prop="takeName" label="提货点名称" />
<el-table-column prop="param.provinceName" label="省" width="70px" />
<el-table-column prop="param.cityName" label="城市" width="70px" />
<el-table-column prop="param.districtName" label="区/县" width="70px" />
@ -68,7 +68,7 @@
<el-dialog title="添加/修改" :visible.sync="dialogVisible" width="60%">
<el-form ref="flashPromotionForm" label-width="150px" size="small" style="padding-right: 40px;">
<el-form-item label="配送员名称">
<el-form-item label="团长名称">
<el-input v-model="leader.name" />
</el-form-item>
<el-form-item label="手机号码">
@ -77,7 +77,7 @@
<el-form-item label="身份证">
<el-input v-model="leader.idNo" />
</el-form-item>
<el-form-item label="配送点名称">
<el-form-item label="提货点名称">
<el-input v-model="leader.takeName" />
</el-form-item>
<el-form-item label="选择地址">

View File

@ -5,7 +5,7 @@
<el-card class="operate-container" shadow="never">
<el-form :inline="true">
<el-form-item label="输入搜索:">
<el-input v-model="searchObj.keyword" placeholder="关键字" style="width: 203px"/>
<el-input v-model="searchObj.keyword" style="width: 203px" placeholder="关键字" />
</el-form-item>
<el-button type="primary" icon="el-icon-search" @click="fetchData()">查询</el-button>
@ -32,17 +32,17 @@
</template>
</el-table-column>
<el-table-column label="姓名" prop="name" width="100px"/>
<el-table-column label="手机号码" prop="phone" width="120px"/>
<el-table-column label="配送点名称" prop="takeName"/>
<el-table-column label="所属区域" prop="param.regionName" width="80px"/>
<el-table-column prop="name" label="姓名" width="100px" />
<el-table-column prop="phone" label="手机号码" width="120px" />
<el-table-column prop="takeName" label="提货点名称" />
<el-table-column prop="param.regionName" label="所属区域" width="80px" />
<el-table-column label="状态" width="100">
<template slot-scope="scope">
<p>{{ scope.row.checkStatus === 0 ? '待审核' : scope.row.checkStatus === 1 ? '通过' : '未通过' }}</p>
</template>
</el-table-column>
<el-table-column label="审核时间" prop="checkTime" width="150px"/>
<el-table-column label="申请时间" prop="createTime" width="150px"/>
<el-table-column prop="checkTime" label="审核时间" width="150px" />
<el-table-column prop="createTime" label="申请时间" width="150px" />
<el-table-column label="操作" width="200" align="center">
<template slot-scope="scope">

38
xlcs-parent/.gitignore vendored Normal file
View File

@ -0,0 +1,38 @@
target/
!.mvn/wrapper/maven-wrapper.jar
!**/src/main/**/target/
!**/src/test/**/target/
### IntelliJ IDEA ###
.idea/modules.xml
.idea/jarRepositories.xml
.idea/compiler.xml
.idea/libraries/
*.iws
*.iml
*.ipr
### Eclipse ###
.apt_generated
.classpath
.factorypath
.project
.settings
.springBeans
.sts4-cache
### NetBeans ###
/nbproject/private/
/nbbuild/
/dist/
/nbdist/
/.nb-gradle/
build/
!**/src/main/**/build/
!**/src/test/**/build/
### VS Code ###
.vscode/
### Mac OS ###
.DS_Store

View File

@ -25,7 +25,7 @@ public class CodeGet {
// 2全局配置
// 全局配置
GlobalConfig gc = new GlobalConfig();
gc.setOutputDir("xlcs-parent/service/service-user" + "/src/main/java");
gc.setOutputDir("xlcs-parent/service/service-acl" + "/src/main/java");
gc.setServiceName("%sService"); //去掉Service接口的首字母I
gc.setAuthor("yovinchen");
@ -34,17 +34,17 @@ public class CodeGet {
// 3数据源配置
DataSourceConfig dsc = new DataSourceConfig();
dsc.setUrl("jdbc:mysql://82.157.68.223:3306/shequ-user?serverTimezone=GMT%2B8&useSSL=false");
dsc.setUrl("jdbc:mysql://82.157.68.223:3306/shequ-acl?serverTimezone=GMT%2B8&useSSL=false");
dsc.setDriverName("com.mysql.cj.jdbc.Driver");
dsc.setUsername("shequ-user");
dsc.setPassword("shequ-user");
dsc.setUsername("shequ-acl");
dsc.setPassword("shequ-acl");
dsc.setDbType(DbType.MYSQL);
mpg.setDataSource(dsc);
// 4包配置
PackageConfig pc = new PackageConfig();
pc.setParent("com.yovinchen.xlcs");
pc.setModuleName("user"); //模块名
pc.setModuleName("acl"); //模块名
pc.setController("controller");
pc.setService("service");
pc.setMapper("mapper");
@ -53,7 +53,7 @@ public class CodeGet {
// 5策略配置
StrategyConfig strategy = new StrategyConfig();
strategy.setInclude("driver", "leader", "leader_account", "leader_bank", "leader_bill", "leader_user", "region", "user_delivery", "user_login_log");
strategy.setInclude("role_permission", "admin_login_log");
strategy.setNaming(NamingStrategy.underline_to_camel);//数据库表映射到实体的命名策略

View File

@ -158,36 +158,5 @@
<enabled>true</enabled>
</snapshots>
</repository>
<repository>
<id>central</id>
<url>https://repo.maven.apache.org/maven2</url>
</repository>
</repositories>
<!-- <repositories>-->
<!-- <repository>-->
<!-- <id>spring</id>-->
<!-- <url>https://maven.aliyun.com/repository/spring</url>-->
<!-- <releases>-->
<!-- <enabled>true</enabled>-->
<!-- </releases>-->
<!-- <snapshots>-->
<!-- <enabled>true</enabled>-->
<!-- </snapshots>-->
<!-- </repository>-->
<!-- </repositories>-->
<!-- <pluginRepositories>-->
<!-- <pluginRepository>-->
<!-- <id>alimaven</id>-->
<!-- <name>aliyun maven</name>-->
<!-- <url>http://maven.aliyun.com/nexus/content/groups/public/</url>-->
<!-- <releases>-->
<!-- <enabled>true</enabled>-->
<!-- </releases>-->
<!-- <snapshots>-->
<!-- <enabled>false</enabled>-->
<!-- </snapshots>-->
<!-- </pluginRepository>-->
<!-- </pluginRepositories>-->
</project>

View File

@ -16,7 +16,7 @@ import org.springframework.web.bind.annotation.PathVariable;
public interface UserFeignClient {
/**
* 配送点地址信息
* 提货点地址信息
*
* @param userId
* @return

View File

@ -8,7 +8,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-armeria-* \
/skywalking/agent/plugins/apm-cxf-* \

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -24,6 +24,7 @@ import java.util.Map;
@RestController
@RequestMapping("/admin/acl/permission")
@Api(tags = "菜单服务")
public class PermissionController {
@Autowired

View File

@ -10,6 +10,7 @@ import com.yovinchen.xlcs.vo.acl.RoleQueryVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.*;
@ -26,6 +27,8 @@ import java.util.List;
@RestController
@RequestMapping("/admin/acl/role")
@Api(tags = "角色管理")
@Slf4j
public class RoleController {
@Autowired

View File

@ -1,22 +0,0 @@
package com.yovinchen.xlcs.acl.controller;
import io.swagger.annotations.Api;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 角色权限 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
@RestController
@RequestMapping("/admin/acl/rolePermission")
@Api(tags = "用户权限")
public class RolePermissionController {
}

View File

@ -1,17 +0,0 @@
package com.yovinchen.xlcs.acl.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yovinchen.xlcs.model.acl.AdminLoginLog;
/**
* <p>
* 后台用户登录日志表 Mapper 接口
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
public interface AdminLoginLogMapper extends BaseMapper<AdminLoginLog> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.acl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.acl.AdminLoginLog;
/**
* <p>
* 后台用户登录日志表 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
public interface AdminLoginLogService extends IService<AdminLoginLog> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.acl.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.acl.RolePermission;
/**
* <p>
* 角色权限 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
public interface RolePermissionService extends IService<RolePermission> {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.acl.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.acl.mapper.AdminLoginLogMapper;
import com.yovinchen.xlcs.acl.service.AdminLoginLogService;
import com.yovinchen.xlcs.model.acl.AdminLoginLog;
import org.springframework.stereotype.Service;
/**
* <p>
* 后台用户登录日志表 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
@Service
public class AdminLoginLogServiceImpl extends ServiceImpl<AdminLoginLogMapper, AdminLoginLog> implements AdminLoginLogService {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.acl.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.acl.mapper.RolePermissionMapper;
import com.yovinchen.xlcs.acl.service.RolePermissionService;
import com.yovinchen.xlcs.model.acl.RolePermission;
import org.springframework.stereotype.Service;
/**
* <p>
* 角色权限 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-24
*/
@Service
public class RolePermissionServiceImpl extends ServiceImpl<RolePermissionMapper, RolePermission> implements RolePermissionService {
}

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -1,59 +0,0 @@
package com.yovinchen.xlcs.order.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yovinchen.xlcs.common.result.Result;
import com.yovinchen.xlcs.model.order.OrderInfo;
import com.yovinchen.xlcs.order.service.OrderInfoService;
import com.yovinchen.xlcs.vo.order.OrderQueryVo;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* ClassName: OrderInfoAdminController
* Package: com.yovinchen.xlcs.order.controller
*
* @author yovinchen
* @since 2024/1/30 10:47
*/
@Api(value = "订单管理", tags = "订单管理")
@RestController
@RequestMapping("/admin/order/orderInfo")
public class OrderInfoAdminController {
@Autowired
private OrderInfoService orderInfoService;
@ApiOperation(value = "获取订单分页列表")
@GetMapping("{page}/{limit}")
public Result<IPage<OrderInfo>> index(@ApiParam(name = "page", value = "当前页码", required = true) @PathVariable Long page,
@ApiParam(name = "limit", value = "每页记录数", required = true)
@PathVariable Long limit,
@ApiParam(name = "OrderQueryVo", value = "查询对象", required = false) OrderQueryVo orderQueryVo) {
try {
Page<OrderInfo> pageParam = new Page<>(page, limit);
IPage<OrderInfo> pageModel = orderInfoService.selectPage(pageParam, orderQueryVo);
return Result.ok(pageModel);
} catch (Exception e) {
throw new RuntimeException("获取sku分页列表异常", e);
}
}
@ApiOperation("获取订单详情信息")
@GetMapping("get/{orderId}")
public Result<OrderInfo> show(@ApiParam(name = "orderNo", value = "订单id", readOnly = true) @PathVariable Long orderId) {
try {
OrderInfo orderInfo = orderInfoService.getOrderInfoById(orderId);
return Result.ok(orderInfo);
} catch (Exception e) {
throw new RuntimeException("获取订单详情信息异常", e);
}
}
}

View File

@ -1,13 +1,12 @@
package com.yovinchen.xlcs.order.service;
import com.yovinchen.xlcs.model.order.OrderInfo;
import com.yovinchen.xlcs.vo.order.OrderConfirmVo;
import com.yovinchen.xlcs.vo.order.OrderSubmitVo;
import com.yovinchen.xlcs.vo.order.OrderUserQueryVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.order.OrderInfo;
import com.yovinchen.xlcs.vo.order.OrderConfirmVo;
import com.yovinchen.xlcs.vo.order.OrderQueryVo;
import com.yovinchen.xlcs.vo.order.OrderSubmitVo;
import com.yovinchen.xlcs.vo.order.OrderUserQueryVo;
/**
* <p>
@ -58,20 +57,11 @@ public interface OrderInfoService extends IService<OrderInfo> {
void orderPay(String orderNo);
/**
* 订单用户查询
* 订单查询
*
* @param pageParam
* @param orderUserQueryVo
* @return
*/
IPage<OrderInfo> getOrderInfoByUserIdPage(Page<OrderInfo> pageParam, OrderUserQueryVo orderUserQueryVo);
/**
* 订单后台查询
*
* @param pageParam
* @param orderQueryVo
* @return
*/
IPage<OrderInfo> selectPage(Page<OrderInfo> pageParam, OrderQueryVo orderQueryVo);
}

View File

@ -1,9 +1,5 @@
package com.yovinchen.xlcs.order.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.client.activity.ActivityFeignClient;
import com.yovinchen.xlcs.client.cart.CartFeignClient;
import com.yovinchen.xlcs.client.product.ProductFeignClient;
@ -19,15 +15,23 @@ import com.yovinchen.xlcs.model.activity.CouponInfo;
import com.yovinchen.xlcs.model.order.CartInfo;
import com.yovinchen.xlcs.model.order.OrderInfo;
import com.yovinchen.xlcs.model.order.OrderItem;
import com.yovinchen.xlcs.enums.*;
import com.yovinchen.xlcs.mq.constant.MqConst;
import com.yovinchen.xlcs.mq.service.RabbitService;
import com.yovinchen.xlcs.order.mapper.OrderInfoMapper;
import com.yovinchen.xlcs.order.mapper.OrderItemMapper;
import com.yovinchen.xlcs.order.service.OrderInfoService;
import com.yovinchen.xlcs.order.service.OrderItemService;
import com.yovinchen.xlcs.vo.order.*;
import com.yovinchen.xlcs.vo.order.CartInfoVo;
import com.yovinchen.xlcs.vo.order.OrderConfirmVo;
import com.yovinchen.xlcs.vo.order.OrderSubmitVo;
import com.yovinchen.xlcs.vo.order.OrderUserQueryVo;
import com.yovinchen.xlcs.vo.product.SkuStockLockVo;
import com.yovinchen.xlcs.vo.user.LeaderAddressVo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.BoundHashOperations;
import org.springframework.data.redis.core.RedisTemplate;
@ -94,8 +98,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
//唯一标识订单
String orderNo = System.currentTimeMillis() + "";
redisTemplate.opsForValue()
.set(RedisConst.ORDER_REPEAT + orderNo, orderNo, 24, TimeUnit.HOURS);
redisTemplate.opsForValue().set(RedisConst.ORDER_REPEAT + orderNo, orderNo, 24, TimeUnit.HOURS);
//获取购物车满足条件活动和优惠卷信息
OrderConfirmVo orderConfirmVo = activityFeignClient.findCartActivityAndCoupon(cartInfoList, userId);
@ -144,21 +147,17 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
List<CartInfo> cartInfoList = cartFeignClient.getCartCheckedList(userId);
//2购物车有很多商品商品不同类型重点处理普通类型商品
List<CartInfo> commonSkuList = cartInfoList.stream()
.filter(cartInfo -> Objects.equals(cartInfo.getSkuType(), SkuType.COMMON.getCode()))
.collect(Collectors.toList());
List<CartInfo> commonSkuList = cartInfoList.stream().filter(cartInfo -> Objects.equals(cartInfo.getSkuType(), SkuType.COMMON.getCode())).collect(Collectors.toList());
//3把获取购物车里面普通类型商品list集合
// List<CartInfo>转换List<SkuStockLockVo>
if (!CollectionUtils.isEmpty(commonSkuList)) {
List<SkuStockLockVo> commonStockLockVoList = commonSkuList.stream()
.map(item -> {
SkuStockLockVo skuStockLockVo = new SkuStockLockVo();
skuStockLockVo.setSkuId(item.getSkuId());
skuStockLockVo.setSkuNum(item.getSkuNum());
return skuStockLockVo;
})
.collect(Collectors.toList());
List<SkuStockLockVo> commonStockLockVoList = commonSkuList.stream().map(item -> {
SkuStockLockVo skuStockLockVo = new SkuStockLockVo();
skuStockLockVo.setSkuId(item.getSkuId());
skuStockLockVo.setSkuNum(item.getSkuNum());
return skuStockLockVo;
}).collect(Collectors.toList());
//4远程调用service-product模块实现锁定商品
//// 验证库存并锁定库存保证具备原子性
@ -188,7 +187,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
if (CollectionUtils.isEmpty(cartInfoList)) {
throw new xlcsException(ResultCodeEnum.DATA_ERROR);
}
//查询用户配送点和配送员信息
//查询用户提货点和配送员信息
Long userId = AuthContextHolder.getUserId();
LeaderAddressVo leaderAddressVo = userFeignClient.getUserAddressByUserId(userId);
if (leaderAddressVo == null) {
@ -232,11 +231,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
orderItem.setSplitCouponAmount(couponAmount);
//总金额
BigDecimal skuTotalAmount = orderItem.getSkuPrice()
.multiply(new BigDecimal(orderItem.getSkuNum()));
BigDecimal skuTotalAmount = orderItem.getSkuPrice().multiply(new BigDecimal(orderItem.getSkuNum()));
//优惠之后金额
BigDecimal splitTotalAmount = skuTotalAmount.subtract(activityAmount)
.subtract(couponAmount);
BigDecimal splitTotalAmount = skuTotalAmount.subtract(activityAmount).subtract(couponAmount);
orderItem.setSplitTotalAmount(splitTotalAmount);
orderItemList.add(orderItem);
}
@ -250,14 +247,14 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
orderInfo.setLeaderName(leaderAddressVo.getLeaderName());//配送员名称
orderInfo.setLeaderPhone(leaderAddressVo.getLeaderPhone());
orderInfo.setTakeName(leaderAddressVo.getTakeName());
orderInfo.setReceiverName(orderParamVo.getReceiverName());
orderInfo.setReceiverPhone(orderParamVo.getReceiverPhone());
orderInfo.setReceiverProvince(leaderAddressVo.getProvince());
orderInfo.setReceiverCity(leaderAddressVo.getCity());
orderInfo.setReceiverDistrict(leaderAddressVo.getDistrict());
orderInfo.setReceiverAddress(leaderAddressVo.getDetailAddress());
orderInfo.setWareId(cartInfoList.get(0)
.getWareId());
orderInfo.setWareId(cartInfoList.get(0).getWareId());
orderInfo.setProcessStatus(ProcessStatus.UNPAID);
//计算订单金额
@ -268,8 +265,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
BigDecimal couponAmount = couponInfoSplitAmount.get("coupon:total");
if (null == couponAmount) couponAmount = new BigDecimal(0);
BigDecimal totalAmount = originalTotalAmount.subtract(activityAmount)
.subtract(couponAmount);
BigDecimal totalAmount = originalTotalAmount.subtract(activityAmount).subtract(couponAmount);
//计算订单金额
orderInfo.setOriginalTotalAmount(originalTotalAmount);
orderInfo.setActivityAmount(activityAmount);
@ -278,8 +274,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
//计算配送员佣金
BigDecimal profitRate = new BigDecimal(0);//orderSetService.getProfitRate();
BigDecimal commissionAmount = orderInfo.getTotalAmount()
.multiply(profitRate);
BigDecimal commissionAmount = orderInfo.getTotalAmount().multiply(profitRate);
orderInfo.setCommissionAmount(commissionAmount);
//添加数据到订单基本信息表
@ -300,12 +295,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
String orderSkuKey = RedisConst.ORDER_SKU_MAP + orderParamVo.getUserId();
BoundHashOperations<String, String, Integer> hashOperations = redisTemplate.boundHashOps(orderSkuKey);
cartInfoList.forEach(cartInfo -> {
if (Boolean.TRUE.equals(hashOperations.hasKey(cartInfo.getSkuId()
.toString()))) {
Integer orderSkuNum = hashOperations.get(cartInfo.getSkuId()
.toString()) + cartInfo.getSkuNum();
hashOperations.put(cartInfo.getSkuId()
.toString(), orderSkuNum);
if (Boolean.TRUE.equals(hashOperations.hasKey(cartInfo.getSkuId().toString()))) {
Integer orderSkuNum = hashOperations.get(cartInfo.getSkuId().toString()) + cartInfo.getSkuNum();
hashOperations.put(cartInfo.getSkuId().toString(), orderSkuNum);
}
});
redisTemplate.expire(orderSkuKey, DateUtil.getCurrentExpireTimes(), TimeUnit.SECONDS);
@ -363,7 +355,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
}
/**
* 订单用户查询
* 订单查询
*
* @param pageParam
* @param orderUserQueryVo
@ -384,57 +376,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
//把订单项集合封装到每个订单里面
orderInfo.setOrderItemList(orderItemList);
//封装订单状态名称
orderInfo.getParam()
.put("orderStatusName", orderInfo.getOrderStatus()
.getComment());
}
return pageModel;
}
/**
* 订单后台查询
*
* @param pageParam
* @param orderQueryVo
* @return
*/
@Override
public IPage<OrderInfo> selectPage(Page<OrderInfo> pageParam, OrderQueryVo orderQueryVo) {
LambdaQueryWrapper<OrderInfo> wrapper = new LambdaQueryWrapper<>();
//获取查询信息
String receiver = orderQueryVo.getReceiver();
String orderNo = orderQueryVo.getOrderNo();
OrderStatus orderStatus = orderQueryVo.getOrderStatus();
Long leaderId = orderQueryVo.getLeaderId();
Long wareId = orderQueryVo.getWareId();
String createTimeBegin = orderQueryVo.getCreateTimeBegin();
String createTimeEnd = orderQueryVo.getCreateTimeEnd();
//拼接查询信息
wrapper.like(!StringUtils.isEmpty(receiver), OrderInfo::getReceiverName, receiver)
.or()
.like(!StringUtils.isEmpty(receiver), OrderInfo::getReceiverPhone, receiver)
.eq(!StringUtils.isEmpty(orderNo), OrderInfo::getOrderNo, orderNo)
.eq(!StringUtils.isEmpty(orderStatus), OrderInfo::getOrderStatus, orderStatus)
.eq(!StringUtils.isEmpty(leaderId), OrderInfo::getLeaderId, leaderId)
.eq(!StringUtils.isEmpty(wareId), OrderInfo::getWareId, wareId)
.ge(!StringUtils.isEmpty(createTimeBegin), OrderInfo::getCreateTime, createTimeBegin)
.le(!StringUtils.isEmpty(createTimeEnd), OrderInfo::getCreateTime, createTimeEnd);
IPage<OrderInfo> pageModel = baseMapper.selectPage(pageParam, wrapper);
//获取每个订单把每个订单里面订单项查询封装
List<OrderInfo> orderInfoList = pageModel.getRecords();
for (OrderInfo orderInfo : orderInfoList) {
//根据订单id查询里面所有订单项列表
List<OrderItem> orderItemList = orderItemMapper.selectList(new LambdaQueryWrapper<OrderItem>()
.eq(OrderItem::getOrderId, orderInfo.getId()));
//把订单项集合封装到每个订单里面
orderInfo.setOrderItemList(orderItemList);
//封装订单状态名称
orderInfo.getParam()
.put("orderStatusName", orderInfo.getOrderStatus()
.getComment());
orderInfo.getParam().put("orderStatusName", orderInfo.getOrderStatus().getComment());
}
return pageModel;
}
@ -451,8 +393,7 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
private BigDecimal computeTotalAmount(List<CartInfo> cartInfoList) {
BigDecimal total = new BigDecimal(0);
for (CartInfo cartInfo : cartInfoList) {
BigDecimal itemTotal = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal itemTotal = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
total = total.add(itemTotal);
}
return total;
@ -483,14 +424,12 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
BigDecimal reduceAmount = activityRule.getReduceAmount();
activityReduceAmount = activityReduceAmount.add(reduceAmount);
if (cartInfoList.size() == 1) {
activitySplitAmountMap.put("activity:" + cartInfoList.get(0)
.getSkuId(), reduceAmount);
activitySplitAmountMap.put("activity:" + cartInfoList.get(0).getSkuId(), reduceAmount);
} else {
//总金额
BigDecimal originalTotalAmount = new BigDecimal(0);
for (CartInfo cartInfo : cartInfoList) {
BigDecimal skuTotalAmount = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal skuTotalAmount = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
originalTotalAmount = originalTotalAmount.add(skuTotalAmount);
}
//记录除最后一项是所有分摊金额 最后一项=总的 - skuPartReduceAmount
@ -499,11 +438,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
for (int i = 0, len = cartInfoList.size(); i < len; i++) {
CartInfo cartInfo = cartInfoList.get(i);
if (i < len - 1) {
BigDecimal skuTotalAmount = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal skuTotalAmount = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
//sku分摊金额
BigDecimal skuReduceAmount = skuTotalAmount.divide(originalTotalAmount, 2, RoundingMode.HALF_UP)
.multiply(reduceAmount);
BigDecimal skuReduceAmount = skuTotalAmount.divide(originalTotalAmount, 2, RoundingMode.HALF_UP).multiply(reduceAmount);
activitySplitAmountMap.put("activity:" + cartInfo.getSkuId(), skuReduceAmount);
skuPartReduceAmount = skuPartReduceAmount.add(skuReduceAmount);
@ -516,12 +453,10 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
for (int i = 0, len = cartInfoList.size(); i < len; i++) {
CartInfo cartInfo = cartInfoList.get(i);
if (i < len - 1) {
BigDecimal skuTotalAmount = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal skuTotalAmount = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
//sku分摊金额
BigDecimal skuDiscountTotalAmount = skuTotalAmount.multiply(activityRule.getBenefitDiscount()
.divide(new BigDecimal("10")));
BigDecimal skuDiscountTotalAmount = skuTotalAmount.multiply(activityRule.getBenefitDiscount().divide(new BigDecimal("10")));
BigDecimal skuReduceAmount = skuTotalAmount.subtract(skuDiscountTotalAmount);
activitySplitAmountMap.put("activity:" + cartInfo.getSkuId(), skuReduceAmount);
@ -562,15 +497,13 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
BigDecimal reduceAmount = couponInfo.getAmount();
if (skuIdList.size() == 1) {
//sku的优化金额
couponInfoSplitAmountMap.put("coupon:" + skuIdToCartInfoMap.get(skuIdList.get(0))
.getSkuId(), reduceAmount);
couponInfoSplitAmountMap.put("coupon:" + skuIdToCartInfoMap.get(skuIdList.get(0)).getSkuId(), reduceAmount);
} else {
//总金额
BigDecimal originalTotalAmount = new BigDecimal(0);
for (Long skuId : skuIdList) {
CartInfo cartInfo = skuIdToCartInfoMap.get(skuId);
BigDecimal skuTotalAmount = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal skuTotalAmount = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
originalTotalAmount = originalTotalAmount.add(skuTotalAmount);
}
//记录除最后一项是所有分摊金额 最后一项=总的 - skuPartReduceAmount
@ -579,11 +512,9 @@ public class OrderInfoServiceImpl extends ServiceImpl<OrderInfoMapper, OrderInfo
for (int i = 0, len = skuIdList.size(); i < len; i++) {
CartInfo cartInfo = skuIdToCartInfoMap.get(skuIdList.get(i));
if (i < len - 1) {
BigDecimal skuTotalAmount = cartInfo.getCartPrice()
.multiply(new BigDecimal(cartInfo.getSkuNum()));
BigDecimal skuTotalAmount = cartInfo.getCartPrice().multiply(new BigDecimal(cartInfo.getSkuNum()));
//sku分摊金额
BigDecimal skuReduceAmount = skuTotalAmount.divide(originalTotalAmount, 2, RoundingMode.HALF_UP)
.multiply(reduceAmount);
BigDecimal skuReduceAmount = skuTotalAmount.divide(originalTotalAmount, 2, RoundingMode.HALF_UP).multiply(reduceAmount);
couponInfoSplitAmountMap.put("coupon:" + cartInfo.getSkuId(), skuReduceAmount);
skuPartReduceAmount = skuPartReduceAmount.add(skuReduceAmount);

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -1,13 +1,13 @@
package com.yovinchen.xlcs.product.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yovinchen.xlcs.common.result.Result;
import com.yovinchen.xlcs.model.product.SkuInfo;
import com.yovinchen.xlcs.product.service.SkuInfoService;
import com.yovinchen.xlcs.vo.product.SkuInfoQueryVo;
import com.yovinchen.xlcs.vo.product.SkuInfoVo;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
@ -26,6 +26,7 @@ import java.util.List;
*/
@Api(value = "SkuInfo管理", tags = "商品Sku管理")
@RestController
@RequestMapping(value = "/admin/product/skuInfo")
public class SkuInfoController {

View File

@ -1,9 +1,5 @@
package com.yovinchen.xlcs.product.service.impl;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.common.constant.RedisConst;
import com.yovinchen.xlcs.common.exception.xlcsException;
import com.yovinchen.xlcs.common.result.ResultCodeEnum;
@ -21,6 +17,10 @@ import com.yovinchen.xlcs.product.service.SkuPosterService;
import com.yovinchen.xlcs.vo.product.SkuInfoQueryVo;
import com.yovinchen.xlcs.vo.product.SkuInfoVo;
import com.yovinchen.xlcs.vo.product.SkuStockLockVo;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.redisson.api.RLock;
import org.redisson.api.RedissonClient;
import org.springframework.beans.BeanUtils;
@ -74,11 +74,15 @@ public class SkuInfoServiceImpl extends ServiceImpl<SkuInfoMapper, SkuInfo> impl
Long categoryId = skuInfoQueryVo.getCategoryId();
//封装条件
LambdaQueryWrapper<SkuInfo> wrapper = new LambdaQueryWrapper<>();
// 动态添加条件
wrapper.like(!StringUtils.isEmpty(keyword), SkuInfo::getSkuName, keyword)
.eq(!StringUtils.isEmpty(skuType), SkuInfo::getSkuType, skuType)
.eq(!StringUtils.isEmpty(categoryId), SkuInfo::getCategoryId, categoryId);
if (!StringUtils.isEmpty(keyword)) {
wrapper.like(SkuInfo::getSkuName, keyword);
}
if (!StringUtils.isEmpty(skuType)) {
wrapper.eq(SkuInfo::getSkuType, skuType);
}
if (!StringUtils.isEmpty(categoryId)) {
wrapper.eq(SkuInfo::getCategoryId, categoryId);
}
//调用方法查询
return baseMapper.selectPage(pageParam, wrapper);
}

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -7,7 +7,7 @@ ARG WORK_PATH="/skywalking"
ENV JAR_FILE=${JAR_FILE}
ENV SW_AGENT_NAME=${APP_NAME}
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="192.168.31.50:11800"
ENV SW_AGENT_COLLECTOR_BACKEND_SERVICES="10.211.55.50:11800"
RUN rm /skywalking/agent/plugins/apm-cxf-* \
/skywalking/agent/plugins/apm-dubbo-* \

View File

@ -26,7 +26,7 @@ public class LeaderAddressController {
@Resource
private UserService userService;
@ApiOperation("配送点地址信息")
@ApiOperation("提货点地址信息")
@GetMapping("inner/getUserAddressByUserId/{userId}")
public LeaderAddressVo getUserAddressByUserId(@PathVariable("userId") Long userId) {
return userService.getLeaderAddressByUserId(userId);

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 仓库表 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/driver")
public class DriverController {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 团长账户 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/leader-account")
public class LeaderAccountController {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 团长银行卡表 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/leader-bank")
public class LeaderBankController {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 交易账单表 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/leader-bill")
public class LeaderBillController {
}

View File

@ -1,51 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.yovinchen.xlcs.common.result.Result;
import com.yovinchen.xlcs.user.service.LeaderService;
import com.yovinchen.xlcs.vo.user.LeaderQueryVo;
import com.yovinchen.xlcs.vo.user.LeaderVo;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.PathVariable;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 团长表 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("admin/user/leader")
public class LeaderController {
@Autowired
private LeaderService leaderService;
// admin/user/leader/checkList/${page}/${limit}
// getPageCheckList
@ApiOperation(value = "获取页面列表")
@GetMapping("getPageCheckList/{page}/{limit}")
public Result<IPage<LeaderVo>> getPageCheckList(@ApiParam(name = "page", value = "当前页码", required = true) @PathVariable Long page,
@ApiParam(name = "limit", value = "每页记录数", required = true) @PathVariable Long limit,
@ApiParam(name = "LeaderQueryVo", value = "查询对象", required = false) LeaderQueryVo leaderQueryVo) {
try {
Page<LeaderVo> pageParam = new Page<>(page, limit);
IPage<LeaderVo> pageModel = leaderService.selectPage(pageParam, leaderQueryVo);
return Result.ok(pageModel);
} catch (Exception e) {
throw new RuntimeException("获取sku分页列表异常", e);
}
}
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 团长会员关系表 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/leader-user")
public class LeaderUserController {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 地区表 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/region")
public class RegionController {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 会员提货记录表 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/user-delivery")
public class UserDeliveryController {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.controller;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;
/**
* <p>
* 用户登陆记录表 前端控制器
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@RestController
@RequestMapping("/user/user-login-log")
public class UserLoginLogController {
}

View File

@ -1,18 +0,0 @@
package com.yovinchen.xlcs.user.mapper;
//import com.yovinchen.xlcs.model.user.Driver;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yovinchen.xlcs.model.user.Driver;
/**
* <p>
* 仓库表 Mapper 接口
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface DriverMapper extends BaseMapper<Driver> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yovinchen.xlcs.model.user.LeaderAccount;
/**
* <p>
* 团长账户 Mapper 接口
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface LeaderAccountMapper extends BaseMapper<LeaderAccount> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yovinchen.xlcs.model.user.LeaderBank;
/**
* <p>
* 团长银行卡表 Mapper 接口
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface LeaderBankMapper extends BaseMapper<LeaderBank> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yovinchen.xlcs.model.user.LeaderBill;
/**
* <p>
* 交易账单表 Mapper 接口
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface LeaderBillMapper extends BaseMapper<LeaderBill> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yovinchen.xlcs.model.user.LeaderUser;
/**
* <p>
* 团长会员关系表 Mapper 接口
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface LeaderUserMapper extends BaseMapper<LeaderUser> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yovinchen.xlcs.model.sys.Region;
/**
* <p>
* 地区表 Mapper 接口
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface RegionMapper extends BaseMapper<Region> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.mapper;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.yovinchen.xlcs.model.user.UserLoginLog;
/**
* <p>
* 用户登陆记录表 Mapper 接口
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface UserLoginLogMapper extends BaseMapper<UserLoginLog> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.user.Driver;
/**
* <p>
* 仓库表 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface DriverService extends IService<Driver> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.user.LeaderAccount;
/**
* <p>
* 团长账户 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface LeaderAccountService extends IService<LeaderAccount> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.user.LeaderBank;
/**
* <p>
* 团长银行卡表 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface LeaderBankService extends IService<LeaderBank> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.user.LeaderBill;
/**
* <p>
* 交易账单表 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface LeaderBillService extends IService<LeaderBill> {
}

View File

@ -1,21 +0,0 @@
package com.yovinchen.xlcs.user.service;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.user.Leader;
import com.yovinchen.xlcs.vo.user.LeaderQueryVo;
import com.yovinchen.xlcs.vo.user.LeaderVo;
/**
* <p>
* 团长表 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface LeaderService extends IService<Leader> {
IPage<LeaderVo> selectPage(Page<LeaderVo> pageParam, LeaderQueryVo leaderQueryVo);
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.user.LeaderUser;
/**
* <p>
* 团长会员关系表 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface LeaderUserService extends IService<LeaderUser> {
}

View File

@ -77,8 +77,8 @@ public class LoginWxService {
userService.save(user);
}
//5 根据userId查询配送点和配送员信息
////配送 user表 user_delivery表
//5 根据userId查询提货点和配送员信息
////提货 user表 user_delivery表
////配送员 leader表
LeaderAddressVo leaderAddressVo = userService.getLeaderAddressByUserId(user.getId());

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.sys.Region;
/**
* <p>
* 地区表 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface RegionService extends IService<Region> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.user.UserDelivery;
/**
* <p>
* 会员提货记录表 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface UserDeliveryService extends IService<UserDelivery> {
}

View File

@ -1,16 +0,0 @@
package com.yovinchen.xlcs.user.service;
import com.baomidou.mybatisplus.extension.service.IService;
import com.yovinchen.xlcs.model.user.UserLoginLog;
/**
* <p>
* 用户登陆记录表 服务类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
public interface UserLoginLogService extends IService<UserLoginLog> {
}

View File

@ -22,7 +22,7 @@ public interface UserService extends IService<User> {
User getUserByOpenId(String openid);
/**
* 根据userId查询配送点和配送员信息
* 根据userId查询提货点和配送员信息
*
* @param id
* @return

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.model.user.Driver;
import com.yovinchen.xlcs.user.mapper.DriverMapper;
import com.yovinchen.xlcs.user.service.DriverService;
import org.springframework.stereotype.Service;
/**
* <p>
* 仓库表 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@Service
public class DriverServiceImpl extends ServiceImpl<DriverMapper, Driver> implements DriverService {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.model.user.LeaderAccount;
import com.yovinchen.xlcs.user.mapper.LeaderAccountMapper;
import com.yovinchen.xlcs.user.service.LeaderAccountService;
import org.springframework.stereotype.Service;
/**
* <p>
* 团长账户 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@Service
public class LeaderAccountServiceImpl extends ServiceImpl<LeaderAccountMapper, LeaderAccount> implements LeaderAccountService {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.model.user.LeaderBank;
import com.yovinchen.xlcs.user.mapper.LeaderBankMapper;
import com.yovinchen.xlcs.user.service.LeaderBankService;
import org.springframework.stereotype.Service;
/**
* <p>
* 团长银行卡表 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@Service
public class LeaderBankServiceImpl extends ServiceImpl<LeaderBankMapper, LeaderBank> implements LeaderBankService {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.model.user.LeaderBill;
import com.yovinchen.xlcs.user.mapper.LeaderBillMapper;
import com.yovinchen.xlcs.user.service.LeaderBillService;
import org.springframework.stereotype.Service;
/**
* <p>
* 交易账单表 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@Service
public class LeaderBillServiceImpl extends ServiceImpl<LeaderBillMapper, LeaderBill> implements LeaderBillService {
}

View File

@ -1,28 +0,0 @@
package com.yovinchen.xlcs.user.service.impl;
import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.model.user.Leader;
import com.yovinchen.xlcs.user.mapper.LeaderMapper;
import com.yovinchen.xlcs.user.service.LeaderService;
import com.yovinchen.xlcs.vo.user.LeaderQueryVo;
import com.yovinchen.xlcs.vo.user.LeaderVo;
import org.springframework.stereotype.Service;
/**
* <p>
* 团长表 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@Service
public class LeaderServiceImpl extends ServiceImpl<LeaderMapper, Leader> implements LeaderService {
@Override
public IPage<LeaderVo> selectPage(Page<LeaderVo> pageParam, LeaderQueryVo leaderQueryVo) {
return null;
}
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.model.user.LeaderUser;
import com.yovinchen.xlcs.user.mapper.LeaderUserMapper;
import com.yovinchen.xlcs.user.service.LeaderUserService;
import org.springframework.stereotype.Service;
/**
* <p>
* 团长会员关系表 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@Service
public class LeaderUserServiceImpl extends ServiceImpl<LeaderUserMapper, LeaderUser> implements LeaderUserService {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.model.sys.Region;
import com.yovinchen.xlcs.user.mapper.RegionMapper;
import com.yovinchen.xlcs.user.service.RegionService;
import org.springframework.stereotype.Service;
/**
* <p>
* 地区表 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@Service
public class RegionServiceImpl extends ServiceImpl<RegionMapper, Region> implements RegionService {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.model.user.UserDelivery;
import com.yovinchen.xlcs.user.mapper.UserDeliveryMapper;
import com.yovinchen.xlcs.user.service.UserDeliveryService;
import org.springframework.stereotype.Service;
/**
* <p>
* 会员提货记录表 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@Service
public class UserDeliveryServiceImpl extends ServiceImpl<UserDeliveryMapper, UserDelivery> implements UserDeliveryService {
}

View File

@ -1,20 +0,0 @@
package com.yovinchen.xlcs.user.service.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yovinchen.xlcs.model.user.UserLoginLog;
import com.yovinchen.xlcs.user.mapper.UserLoginLogMapper;
import com.yovinchen.xlcs.user.service.UserLoginLogService;
import org.springframework.stereotype.Service;
/**
* <p>
* 用户登陆记录表 服务实现类
* </p>
*
* @author yovinchen
* @since 2024-01-30
*/
@Service
public class UserLoginLogServiceImpl extends ServiceImpl<UserLoginLogMapper, UserLoginLog> implements UserLoginLogService {
}

View File

@ -0,0 +1,233 @@
Apache License
Version 2.0, January 2004
http://www.apache.org/licenses/
TERMS AND CONDITIONS FOR USE, REPRODUCTION, AND DISTRIBUTION
1. Definitions.
"License" shall mean the terms and conditions for use, reproduction,
and distribution as defined by Sections 1 through 9 of this document.
"Licensor" shall mean the copyright owner or entity authorized by
the copyright owner that is granting the License.
"Legal Entity" shall mean the union of the acting entity and all
other entities that control, are controlled by, or are under common
control with that entity. For the purposes of this definition,
"control" means (i) the power, direct or indirect, to cause the
direction or management of such entity, whether by contract or
otherwise, or (ii) ownership of fifty percent (50%) or more of the
outstanding shares, or (iii) beneficial ownership of such entity.
"You" (or "Your") shall mean an individual or Legal Entity
exercising permissions granted by this License.
"Source" form shall mean the preferred form for making modifications,
including but not limited to software source code, documentation
source, and configuration files.
"Object" form shall mean any form resulting from mechanical
transformation or translation of a Source form, including but
not limited to compiled object code, generated documentation,
and conversions to other media types.
"Work" shall mean the work of authorship, whether in Source or
Object form, made available under the License, as indicated by a
copyright notice that is included in or attached to the work
(an example is provided in the Appendix below).
"Derivative Works" shall mean any work, whether in Source or Object
form, that is based on (or derived from) the Work and for which the
editorial revisions, annotations, elaborations, or other modifications
represent, as a whole, an original work of authorship. For the purposes
of this License, Derivative Works shall not include works that remain
separable from, or merely link (or bind by name) to the interfaces of,
the Work and Derivative Works thereof.
"Contribution" shall mean any work of authorship, including
the original version of the Work and any modifications or additions
to that Work or Derivative Works thereof, that is intentionally
submitted to Licensor for inclusion in the Work by the copyright owner
or by an individual or Legal Entity authorized to submit on behalf of
the copyright owner. For the purposes of this definition, "submitted"
means any form of electronic, verbal, or written communication sent
to the Licensor or its representatives, including but not limited to
communication on electronic mailing lists, source code control systems,
and issue tracking systems that are managed by, or on behalf of, the
Licensor for the purpose of discussing and improving the Work, but
excluding communication that is conspicuously marked or otherwise
designated in writing by the copyright owner as "Not a Contribution."
"Contributor" shall mean Licensor and any individual or Legal Entity
on behalf of whom a Contribution has been received by Licensor and
subsequently incorporated within the Work.
2. Grant of Copyright License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
copyright license to reproduce, prepare Derivative Works of,
publicly display, publicly perform, sublicense, and distribute the
Work and such Derivative Works in Source or Object form.
3. Grant of Patent License. Subject to the terms and conditions of
this License, each Contributor hereby grants to You a perpetual,
worldwide, non-exclusive, no-charge, royalty-free, irrevocable
(except as stated in this section) patent license to make, have made,
use, offer to sell, sell, import, and otherwise transfer the Work,
where such license applies only to those patent claims licensable
by such Contributor that are necessarily infringed by their
Contribution(s) alone or by combination of their Contribution(s)
with the Work to which such Contribution(s) was submitted. If You
institute patent litigation against any entity (including a
cross-claim or counterclaim in a lawsuit) alleging that the Work
or a Contribution incorporated within the Work constitutes direct
or contributory patent infringement, then any patent licenses
granted to You under this License for that Work shall terminate
as of the date such litigation is filed.
4. Redistribution. You may reproduce and distribute copies of the
Work or Derivative Works thereof in any medium, with or without
modifications, and in Source or Object form, provided that You
meet the following conditions:
(a) You must give any other recipients of the Work or
Derivative Works a copy of this License; and
(b) You must cause any modified files to carry prominent notices
stating that You changed the files; and
(c) You must retain, in the Source form of any Derivative Works
that You distribute, all copyright, patent, trademark, and
attribution notices from the Source form of the Work,
excluding those notices that do not pertain to any part of
the Derivative Works; and
(d) If the Work includes a "NOTICE" text file as part of its
distribution, then any Derivative Works that You distribute must
include a readable copy of the attribution notices contained
within such NOTICE file, excluding those notices that do not
pertain to any part of the Derivative Works, in at least one
of the following places: within a NOTICE text file distributed
as part of the Derivative Works; within the Source form or
documentation, if provided along with the Derivative Works; or,
within a display generated by the Derivative Works, if and
wherever such third-party notices normally appear. The contents
of the NOTICE file are for informational purposes only and
do not modify the License. You may add Your own attribution
notices within Derivative Works that You distribute, alongside
or as an addendum to the NOTICE text from the Work, provided
that such additional attribution notices cannot be construed
as modifying the License.
You may add Your own copyright statement to Your modifications and
may provide additional or different license terms and conditions
for use, reproduction, or distribution of Your modifications, or
for any such Derivative Works as a whole, provided Your use,
reproduction, and distribution of the Work otherwise complies with
the conditions stated in this License.
5. Submission of Contributions. Unless You explicitly state otherwise,
any Contribution intentionally submitted for inclusion in the Work
by You to the Licensor shall be under the terms and conditions of
this License, without any additional terms or conditions.
Notwithstanding the above, nothing herein shall supersede or modify
the terms of any separate license agreement you may have executed
with Licensor regarding such Contributions.
6. Trademarks. This License does not grant permission to use the trade
names, trademarks, service marks, or product names of the Licensor,
except as required for reasonable and customary use in describing the
origin of the Work and reproducing the content of the NOTICE file.
7. Disclaimer of Warranty. Unless required by applicable law or
agreed to in writing, Licensor provides the Work (and each
Contributor provides its Contributions) on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or
implied, including, without limitation, any warranties or conditions
of TITLE, NON-INFRINGEMENT, MERCHANTABILITY, or FITNESS FOR A
PARTICULAR PURPOSE. You are solely responsible for determining the
appropriateness of using or redistributing the Work and assume any
risks associated with Your exercise of permissions under this License.
8. Limitation of Liability. In no event and under no legal theory,
whether in tort (including negligence), contract, or otherwise,
unless required by applicable law (such as deliberate and grossly
negligent acts) or agreed to in writing, shall any Contributor be
liable to You for damages, including any direct, indirect, special,
incidental, or consequential damages of any character arising as a
result of this License or out of the use or inability to use the
Work (including but not limited to damages for loss of goodwill,
work stoppage, computer failure or malfunction, or any and all
other commercial damages or losses), even if such Contributor
has been advised of the possibility of such damages.
9. Accepting Warranty or Additional Liability. While redistributing
the Work or Derivative Works thereof, You may choose to offer,
and charge a fee for, acceptance of support, warranty, indemnity,
or other liability obligations and/or rights consistent with this
License. However, in accepting such obligations, You may act only
on Your own behalf and on Your sole responsibility, not on behalf
of any other Contributor, and only if You agree to indemnify,
defend, and hold each Contributor harmless for any liability
incurred by, or claims asserted against, such Contributor by reason
of your accepting any such warranty or additional liability.
END OF TERMS AND CONDITIONS
APPENDIX: How to apply the Apache License to your work.
To apply the Apache License to your work, attach the following
boilerplate notice, with the fields enclosed by brackets "{}"
replaced with your own identifying information. (Don't include
the brackets!) The text should be enclosed in the appropriate
comment syntax for the file format. We also recommend that a
file or class name and description of purpose be included on the
same "printed page" as the copyright notice for easier
identification within third-party archives.
Copyright {yyyy} {name of copyright owner}
Licensed under the Apache License, Version 2.0 (the "License");
you may not use this file except in compliance with the License.
You may obtain a copy of the License at
http://www.apache.org/licenses/LICENSE-2.0
Unless required by applicable law or agreed to in writing, software
distributed under the License is distributed on an "AS IS" BASIS,
WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
See the License for the specific language governing permissions and
limitations under the License.
=======================================================================
Apache SkyWalking Subcomponents:
The Apache SkyWalking project contains subcomponents with separate copyright
notices and license terms. Your use of the source code for the these
subcomponents is subject to the terms and conditions of the following
licenses.
========================================================================
Apache 2.0 licenses
========================================================================
The following components are provided under the Apache License. See project link for details.
The text of each license is the standard Apache 2.0 license.
raphw (byte-buddy) 1.14.9: http://bytebuddy.net/ , Apache 2.0
Google: grpc-java 1.53.0: https://github.com/grpc/grpc-java, Apache 2.0
Google: gson 2.8.9: https://github.com/google/gson , Apache 2.0
Google: proto-google-common-protos 2.0.1: https://github.com/googleapis/googleapis , Apache 2.0
Google: jsr305 3.0.2: http://central.maven.org/maven2/com/google/code/findbugs/jsr305/3.0.0/jsr305-3.0.0.pom , Apache 2.0
Google: guava 32.0.1: https://github.com/google/guava , Apache 2.0
netty 4.1.100: https://github.com/netty/netty/blob/4.1/LICENSE.txt, Apache 2.0
========================================================================
BSD licenses
========================================================================
The following components are provided under a BSD license. See project link for details.
The text of each license is also included at licenses/LICENSE-[project].txt.
asm 9.2:https://gitlab.ow2.org , BSD-3-Clause

View File

@ -0,0 +1,299 @@
Apache SkyWalking
Copyright 2017-2023 The Apache Software Foundation
This product includes software developed at
The Apache Software Foundation (http://www.apache.org/).
========================================================================
grpc-java NOTICE
========================================================================
Copyright 2014, gRPC Authors All rights reserved.
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.
-----------------------------------------------------------------------
This product contains a modified portion of 'OkHttp', an open source
HTTP & SPDY client for Android and Java applications, which can be obtained
at:
* LICENSE:
* okhttp/third_party/okhttp/LICENSE (Apache License 2.0)
* HOMEPAGE:
* https://github.com/square/okhttp
* LOCATION_IN_GRPC:
* okhttp/third_party/okhttp
This product contains a modified portion of 'Netty', an open source
networking library, which can be obtained at:
* LICENSE:
* netty/third_party/netty/LICENSE.txt (Apache License 2.0)
* HOMEPAGE:
* https://netty.io
* LOCATION_IN_GRPC:
* netty/third_party/netty
========================================================================
grpc NOTICE
========================================================================
Copyright 2014 gRPC authors.
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.
========================================================================
netty NOTICE
========================================================================
The Netty Project
=================
Please visit the Netty web site for more information:
* http://netty.io/
Copyright 2014 The Netty Project
The Netty Project licenses this file to you 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.
Also, please refer to each LICENSE.<component>.txt file, which is located in
the 'license' directory of the distribution file, for the license terms of the
components that this product depends on.
-------------------------------------------------------------------------------
This product contains the extensions to Java Collections Framework which has
been derived from the works by JSR-166 EG, Doug Lea, and Jason T. Greene:
* LICENSE:
* license/LICENSE.jsr166y.txt (Public Domain)
* HOMEPAGE:
* http://gee.cs.oswego.edu/cgi-bin/viewcvs.cgi/jsr166/
* http://viewvc.jboss.org/cgi-bin/viewvc.cgi/jbosscache/experimental/jsr166/
This product contains a modified version of Robert Harder's Public Domain
Base64 Encoder and Decoder, which can be obtained at:
* LICENSE:
* license/LICENSE.base64.txt (Public Domain)
* HOMEPAGE:
* http://iharder.sourceforge.net/current/java/base64/
This product contains a modified portion of 'Webbit', an event based
WebSocket and HTTP server, which can be obtained at:
* LICENSE:
* license/LICENSE.webbit.txt (BSD License)
* HOMEPAGE:
* https://github.com/joewalnes/webbit
This product contains a modified portion of 'SLF4J', a simple logging
facade for Java, which can be obtained at:
* LICENSE:
* license/LICENSE.slf4j.txt (MIT License)
* HOMEPAGE:
* http://www.slf4j.org/
This product contains a modified portion of 'Apache Harmony', an open source
Java SE, which can be obtained at:
* NOTICE:
* license/NOTICE.harmony.txt
* LICENSE:
* license/LICENSE.harmony.txt (Apache License 2.0)
* HOMEPAGE:
* http://archive.apache.org/dist/harmony/
This product contains a modified portion of 'jbzip2', a Java bzip2 compression
and decompression library written by Matthew J. Francis. It can be obtained at:
* LICENSE:
* license/LICENSE.jbzip2.txt (MIT License)
* HOMEPAGE:
* https://code.google.com/p/jbzip2/
This product contains a modified portion of 'libdivsufsort', a C API library to construct
the suffix array and the Burrows-Wheeler transformed string for any input string of
a constant-size alphabet written by Yuta Mori. It can be obtained at:
* LICENSE:
* license/LICENSE.libdivsufsort.txt (MIT License)
* HOMEPAGE:
* https://github.com/y-256/libdivsufsort
This product contains a modified portion of Nitsan Wakart's 'JCTools', Java Concurrency Tools for the JVM,
which can be obtained at:
* LICENSE:
* license/LICENSE.jctools.txt (ASL2 License)
* HOMEPAGE:
* https://github.com/JCTools/JCTools
This product optionally depends on 'JZlib', a re-implementation of zlib in
pure Java, which can be obtained at:
* LICENSE:
* license/LICENSE.jzlib.txt (BSD style License)
* HOMEPAGE:
* http://www.jcraft.com/jzlib/
This product optionally depends on 'Compress-LZF', a Java library for encoding and
decoding data in LZF format, written by Tatu Saloranta. It can be obtained at:
* LICENSE:
* license/LICENSE.compress-lzf.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/ning/compress
This product optionally depends on 'lz4', a LZ4 Java compression
and decompression library written by Adrien Grand. It can be obtained at:
* LICENSE:
* license/LICENSE.lz4.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/jpountz/lz4-java
This product optionally depends on 'lzma-java', a LZMA Java compression
and decompression library, which can be obtained at:
* LICENSE:
* license/LICENSE.lzma-java.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/jponge/lzma-java
This product contains a modified portion of 'jfastlz', a Java port of FastLZ compression
and decompression library written by William Kinney. It can be obtained at:
* LICENSE:
* license/LICENSE.jfastlz.txt (MIT License)
* HOMEPAGE:
* https://code.google.com/p/jfastlz/
This product contains a modified portion of and optionally depends on 'Protocol Buffers', Google's data
interchange format, which can be obtained at:
* LICENSE:
* license/LICENSE.protobuf.txt (New BSD License)
* HOMEPAGE:
* https://github.com/google/protobuf
This product optionally depends on 'Bouncy Castle Crypto APIs' to generate
a temporary self-signed X.509 certificate when the JVM does not provide the
equivalent functionality. It can be obtained at:
* LICENSE:
* license/LICENSE.bouncycastle.txt (MIT License)
* HOMEPAGE:
* http://www.bouncycastle.org/
This product optionally depends on 'Snappy', a compression library produced
by Google Inc, which can be obtained at:
* LICENSE:
* license/LICENSE.snappy.txt (New BSD License)
* HOMEPAGE:
* https://github.com/google/snappy
This product optionally depends on 'JBoss Marshalling', an alternative Java
serialization API, which can be obtained at:
* LICENSE:
* license/LICENSE.jboss-marshalling.txt (GNU LGPL 2.1)
* HOMEPAGE:
* http://www.jboss.org/jbossmarshalling
This product optionally depends on 'Caliper', Google's micro-
benchmarking framework, which can be obtained at:
* LICENSE:
* license/LICENSE.caliper.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/google/caliper
This product optionally depends on 'Apache Commons Logging', a logging
framework, which can be obtained at:
* LICENSE:
* license/LICENSE.commons-logging.txt (Apache License 2.0)
* HOMEPAGE:
* http://commons.apache.org/logging/
This product optionally depends on 'Apache Log4J', a logging framework, which
can be obtained at:
* LICENSE:
* license/LICENSE.log4j.txt (Apache License 2.0)
* HOMEPAGE:
* http://logging.apache.org/log4j/
This product optionally depends on 'Aalto XML', an ultra-high performance
non-blocking XML processor, which can be obtained at:
* LICENSE:
* license/LICENSE.aalto-xml.txt (Apache License 2.0)
* HOMEPAGE:
* http://wiki.fasterxml.com/AaltoHome
This product contains a modified version of 'HPACK', a Java implementation of
the HTTP/2 HPACK algorithm written by Twitter. It can be obtained at:
* LICENSE:
* license/LICENSE.hpack.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/twitter/hpack
This product contains a modified portion of 'Apache Commons Lang', a Java library
provides utilities for the java.lang API, which can be obtained at:
* LICENSE:
* license/LICENSE.commons-lang.txt (Apache License 2.0)
* HOMEPAGE:
* https://commons.apache.org/proper/commons-lang/
This product contains the Maven wrapper scripts from 'Maven Wrapper', that provides an easy way to ensure a user has everything necessary to run the Maven build.
* LICENSE:
* license/LICENSE.mvn-wrapper.txt (Apache License 2.0)
* HOMEPAGE:
* https://github.com/takari/maven-wrapper

Some files were not shown because too many files have changed in this diff Show More