mirror of
https://gitee.com/youlaitech/youlai-mall.git
synced 2024-12-23 05:00:25 +08:00
feat:订单列表查询
This commit is contained in:
parent
15cfdb0e43
commit
b631b22010
@ -1,5 +1,6 @@
|
|||||||
package com.youlai.mall.oms.enums;
|
package com.youlai.mall.oms.enums;
|
||||||
|
|
||||||
|
import com.youlai.common.base.BaseCodeEnum;
|
||||||
import lombok.AllArgsConstructor;
|
import lombok.AllArgsConstructor;
|
||||||
import lombok.ToString;
|
import lombok.ToString;
|
||||||
|
|
||||||
@ -11,7 +12,7 @@ import lombok.ToString;
|
|||||||
*/
|
*/
|
||||||
@ToString
|
@ToString
|
||||||
@AllArgsConstructor
|
@AllArgsConstructor
|
||||||
public enum OrderStatusEnum {
|
public enum OrderStatusEnum implements BaseCodeEnum {
|
||||||
|
|
||||||
NEED_PAY(101, "待支付"),
|
NEED_PAY(101, "待支付"),
|
||||||
USER_CANCEL(102, "用户取消"),
|
USER_CANCEL(102, "用户取消"),
|
||||||
@ -30,4 +31,8 @@ public enum OrderStatusEnum {
|
|||||||
public final String desc;
|
public final String desc;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public Integer getCode() {
|
||||||
|
return code;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
@ -0,0 +1,64 @@
|
|||||||
|
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;
|
||||||
|
|
||||||
|
|
||||||
|
}
|
||||||
|
}
|
@ -15,6 +15,7 @@ public class PmsSpec {
|
|||||||
private Long id;
|
private Long id;
|
||||||
private Long categoryId;
|
private Long categoryId;
|
||||||
private String name;
|
private String name;
|
||||||
|
private boolean selected;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<PmsSpuSpecValue> values = new ArrayList<>();
|
private List<PmsSpuSpecValue> values = new ArrayList<>();
|
||||||
|
@ -0,0 +1,11 @@
|
|||||||
|
package com.youlai.common.base;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author huawei
|
||||||
|
* @desc 枚举类顶级父接口
|
||||||
|
* @email huawei_code@163.com
|
||||||
|
* @date 2021/2/13
|
||||||
|
*/
|
||||||
|
public interface BaseCodeEnum {
|
||||||
|
Integer getCode();
|
||||||
|
}
|
@ -0,0 +1,21 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
@ -39,6 +39,7 @@ public class AuthorizationManager implements ReactiveAuthorizationManager<Author
|
|||||||
|
|
||||||
ServerHttpRequest request = authorizationContext.getExchange().getRequest();
|
ServerHttpRequest request = authorizationContext.getExchange().getRequest();
|
||||||
String path = request.getMethodValue() + "_" + request.getURI().getPath();
|
String path = request.getMethodValue() + "_" + request.getURI().getPath();
|
||||||
|
log.info("请求,path={}", path);
|
||||||
PathMatcher pathMatcher = new AntPathMatcher();
|
PathMatcher pathMatcher = new AntPathMatcher();
|
||||||
// 对应跨域的预检请求直接放行
|
// 对应跨域的预检请求直接放行
|
||||||
if (request.getMethod() == HttpMethod.OPTIONS) {
|
if (request.getMethod() == HttpMethod.OPTIONS) {
|
||||||
@ -47,6 +48,7 @@ public class AuthorizationManager implements ReactiveAuthorizationManager<Author
|
|||||||
|
|
||||||
// 非管理端路径无需鉴权直接放行
|
// 非管理端路径无需鉴权直接放行
|
||||||
if (!pathMatcher.match(AuthConstants.ADMIN_URL_PATTERN, path)) {
|
if (!pathMatcher.match(AuthConstants.ADMIN_URL_PATTERN, path)) {
|
||||||
|
log.info("请求无需鉴权,path={}", path);
|
||||||
return Mono.just(new AuthorizationDecision(true));
|
return Mono.just(new AuthorizationDecision(true));
|
||||||
}
|
}
|
||||||
|
|
||||||
@ -54,6 +56,7 @@ public class AuthorizationManager implements ReactiveAuthorizationManager<Author
|
|||||||
// token为空拒绝访问
|
// token为空拒绝访问
|
||||||
String token = request.getHeaders().getFirst(AuthConstants.JWT_TOKEN_HEADER);
|
String token = request.getHeaders().getFirst(AuthConstants.JWT_TOKEN_HEADER);
|
||||||
if (StrUtil.isBlank(token)) {
|
if (StrUtil.isBlank(token)) {
|
||||||
|
log.info("请求token为空拒绝访问,path={}", path);
|
||||||
return Mono.just(new AuthorizationDecision(false));
|
return Mono.just(new AuthorizationDecision(false));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user