Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
有来技术
youlai-mall
提交
7dedb519
Y
youlai-mall
项目概览
有来技术
/
youlai-mall
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
Y
youlai-mall
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
7dedb519
编写于
2月 19, 2021
作者:
H
hxrui
浏览文件
操作
浏览文件
下载
差异文件
Merge branch 'master' of
https://gitee.com/youlaitech/youlai-mall
上级
8b04cc5a
b631b220
变更
6
隐藏空白更改
内联
并排
Showing
6 changed file
with
106 addition
and
1 deletion
+106
-1
mall-oms/oms-api/src/main/java/com/youlai/mall/oms/enums/OrderStatusEnum.java
.../main/java/com/youlai/mall/oms/enums/OrderStatusEnum.java
+6
-1
mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderListVO.java
...rc/main/java/com/youlai/mall/oms/pojo/vo/OrderListVO.java
+64
-0
mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpec.java
...s-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpec.java
+1
-0
youlai-common/common-core/src/main/java/com/youlai/common/base/BaseCodeEnum.java
...re/src/main/java/com/youlai/common/base/BaseCodeEnum.java
+11
-0
youlai-common/common-core/src/main/java/com/youlai/common/utils/EnumUtils.java
...core/src/main/java/com/youlai/common/utils/EnumUtils.java
+21
-0
youlai-gateway/src/main/java/com/youlai/gateway/security/AuthorizationManager.java
...ava/com/youlai/gateway/security/AuthorizationManager.java
+3
-0
未找到文件。
mall-oms/oms-api/src/main/java/com/youlai/mall/oms/enums/OrderStatusEnum.java
浏览文件 @
7dedb519
package
com.youlai.mall.oms.enums
;
import
com.youlai.common.base.BaseCodeEnum
;
import
lombok.AllArgsConstructor
;
import
lombok.ToString
;
...
...
@@ -11,7 +12,7 @@ import lombok.ToString;
*/
@ToString
@AllArgsConstructor
public
enum
OrderStatusEnum
{
public
enum
OrderStatusEnum
implements
BaseCodeEnum
{
NEED_PAY
(
101
,
"待支付"
),
USER_CANCEL
(
102
,
"用户取消"
),
...
...
@@ -30,4 +31,8 @@ public enum OrderStatusEnum {
public
final
String
desc
;
@Override
public
Integer
getCode
()
{
return
code
;
}
}
mall-oms/oms-api/src/main/java/com/youlai/mall/oms/pojo/vo/OrderListVO.java
0 → 100644
浏览文件 @
7dedb519
package
com.youlai.mall.oms.pojo.vo
;
import
com.youlai.common.base.BaseVO
;
import
lombok.AllArgsConstructor
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.Date
;
import
java.util.List
;
/**
* @author huawei
* @desc
* @email huawei_code@163.com
* @date 2021/2/13
*/
@Data
@NoArgsConstructor
@AllArgsConstructor
public
class
OrderListVO
extends
BaseVO
{
/**
* time : 2019-04-06 11:37
* state : 9
* goodsList : [{"title":"古黛妃 短袖t恤女 春夏装2019新款韩版宽松","price":179.5,"image":"https://img13.360buyimg.com/n8/jfs/t1/30343/20/1029/481370/5c449438Ecb46a15b/2b2adccb6dc742fd.jpg","number":1,"attr":"珊瑚粉 M"}]
*/
private
Long
id
;
private
String
orderSn
;
private
Long
totalAmount
;
private
Long
payAmount
;
private
Date
gmtCreate
;
private
Integer
totalQuantity
;
private
String
time
;
private
Integer
status
;
private
String
statusDesc
;
private
List
<
GoodsListBean
>
goodsList
;
@Data
public
static
class
GoodsListBean
extends
BaseVO
{
/**
* title : 古黛妃 短袖t恤女 春夏装2019新款韩版宽松
* price : 179.5
* image : https://img13.360buyimg.com/n8/jfs/t1/30343/20/1029/481370/5c449438Ecb46a15b/2b2adccb6dc742fd.jpg
* number : 1
* attr : 珊瑚粉 M
*/
private
Long
id
;
private
Long
orderId
;
private
String
skuId
;
private
String
skuPic
;
private
Integer
skuQuantity
;
private
Long
skuTotalPrice
;
private
String
skuName
;
private
Long
price
;
private
String
image
;
private
Integer
number
;
private
String
attr
;
}
}
mall-pms/pms-api/src/main/java/com/youlai/mall/pms/pojo/PmsSpec.java
浏览文件 @
7dedb519
...
...
@@ -15,6 +15,7 @@ public class PmsSpec {
private
Long
id
;
private
Long
categoryId
;
private
String
name
;
private
boolean
selected
;
@TableField
(
exist
=
false
)
private
List
<
PmsSpuSpecValue
>
values
=
new
ArrayList
<>();
...
...
youlai-common/common-core/src/main/java/com/youlai/common/base/BaseCodeEnum.java
0 → 100644
浏览文件 @
7dedb519
package
com.youlai.common.base
;
/**
* @author huawei
* @desc 枚举类顶级父接口
* @email huawei_code@163.com
* @date 2021/2/13
*/
public
interface
BaseCodeEnum
{
Integer
getCode
();
}
youlai-common/common-core/src/main/java/com/youlai/common/utils/EnumUtils.java
0 → 100644
浏览文件 @
7dedb519
package
com.youlai.common.utils
;
import
com.youlai.common.base.BaseCodeEnum
;
/**
* @author huawei
* @desc 枚举类工具类
* @email huawei_code@163.com
* @date 2021/2/13
*/
public
class
EnumUtils
{
public
static
<
T
extends
BaseCodeEnum
>
T
getByCode
(
Integer
code
,
Class
<
T
>
enumClass
)
{
for
(
T
each:
enumClass
.
getEnumConstants
())
{
if
(
code
.
equals
(
each
.
getCode
()))
{
return
each
;
}
}
return
null
;
}
}
youlai-gateway/src/main/java/com/youlai/gateway/security/AuthorizationManager.java
浏览文件 @
7dedb519
...
...
@@ -39,6 +39,7 @@ public class AuthorizationManager implements ReactiveAuthorizationManager<Author
ServerHttpRequest
request
=
authorizationContext
.
getExchange
().
getRequest
();
String
path
=
request
.
getMethodValue
()
+
"_"
+
request
.
getURI
().
getPath
();
log
.
info
(
"请求,path={}"
,
path
);
PathMatcher
pathMatcher
=
new
AntPathMatcher
();
// 对应跨域的预检请求直接放行
if
(
request
.
getMethod
()
==
HttpMethod
.
OPTIONS
)
{
...
...
@@ -47,6 +48,7 @@ public class AuthorizationManager implements ReactiveAuthorizationManager<Author
// 非管理端路径无需鉴权直接放行
if
(!
pathMatcher
.
match
(
AuthConstants
.
ADMIN_URL_PATTERN
,
path
))
{
log
.
info
(
"请求无需鉴权,path={}"
,
path
);
return
Mono
.
just
(
new
AuthorizationDecision
(
true
));
}
...
...
@@ -54,6 +56,7 @@ public class AuthorizationManager implements ReactiveAuthorizationManager<Author
// token为空拒绝访问
String
token
=
request
.
getHeaders
().
getFirst
(
AuthConstants
.
JWT_TOKEN_HEADER
);
if
(
StrUtil
.
isBlank
(
token
))
{
log
.
info
(
"请求token为空拒绝访问,path={}"
,
path
);
return
Mono
.
just
(
new
AuthorizationDecision
(
false
));
}
...
...
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录