Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
O
order-group
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
order-group-application
order-group
Commits
e94ae3ba
Commit
e94ae3ba
authored
Sep 06, 2021
by
ping.wu
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
orderbean 位置调整
parent
1875ae3f
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
1032 additions
and
1028 deletions
+1032
-1028
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
+1
-1
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/response/order/GetStatisticStoreOrderReportResponse.java
+2
-2
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ActivityAdapter.java
+10
-6
shopping-cart-application-service/src/main/java/cn/freemud/amp/body/OrderBody.java
+521
-521
shopping-cart-application-service/src/main/java/cn/freemud/amp/config/PushOrderConfig.java
+60
-61
shopping-cart-application-service/src/main/java/cn/freemud/amp/service/OrderMQService.java
+36
-36
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/CreateOrderResponseDto.java
+2
-2
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/QueryOrderByIdResponseDto.java
+2
-2
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/QueryOrdersResponseDto.java
+396
-395
shopping-cart-application-service/src/test/java/cn.freemud/client/MqTest.java
+2
-2
No files found.
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/adapter/OrderSdkAdapter.java
View file @
e94ae3ba
...
...
@@ -2149,7 +2149,7 @@ public class OrderSdkAdapter {
if
(
result
.
getResult
()
==
null
)
{
return
response
;
}
GetStatisticStoreOrderReportResponse
.
OrderBean
data
=
new
GetStatisticStoreOrderReportResponse
.
OrderBean
();
GetStatisticStoreOrderReportResponse
.
StatisticStoreOrderReport
data
=
new
GetStatisticStoreOrderReportResponse
.
StatisticStoreOrderReport
();
data
.
setOrderCount
(
result
.
getResult
().
getOrderCount
()
==
null
?
null
:
result
.
getResult
().
getOrderCount
().
longValue
());
data
.
setTotalAmount
(
result
.
getResult
().
getTotalAmount
()
==
null
?
null
:
result
.
getResult
().
getTotalAmount
().
longValue
());
response
.
setData
(
data
);
...
...
assortment-ordercenter-sdk/src/main/java/com/freemud/sdk/api/assortment/order/response/order/GetStatisticStoreOrderReportResponse.java
View file @
e94ae3ba
...
...
@@ -26,11 +26,11 @@ public class GetStatisticStoreOrderReportResponse {
private
Integer
errcode
;
private
String
errmsg
;
private
OrderBean
data
;
private
StatisticStoreOrderReport
data
;
@NoArgsConstructor
@Data
public
static
class
OrderBean
{
public
static
class
StatisticStoreOrderReport
{
/**
* orderCount : 23
* totalAmount : 72052
...
...
shopping-cart-application-service/src/main/java/cn/freemud/adapter/ActivityAdapter.java
View file @
e94ae3ba
...
...
@@ -24,6 +24,10 @@ import cn.freemud.entities.vo.coupon.CartProduct;
import
cn.freemud.entities.vo.coupon.CouponAvailableCartInfo
;
import
cn.freemud.enums.*
;
import
cn.freemud.utils.PropertyConvertUtil
;
import
com.freemud.application.sdk.api.ordercenter.entities.v1.AccountBeanV1
;
import
com.freemud.application.sdk.api.ordercenter.entities.v1.OrderBeanV1
;
import
com.freemud.application.sdk.api.ordercenter.entities.v1.ProductBeanV1
;
import
com.freemud.application.sdk.api.ordercenter.entities.v1.ProductDiscountV1
;
import
org.apache.commons.collections4.CollectionUtils
;
import
org.apache.commons.lang.StringUtils
;
import
org.springframework.data.util.Pair
;
...
...
@@ -214,7 +218,7 @@ public class ActivityAdapter {
return
activityUpdateStockRequestDto
;
}
public
ActivityCancelStockRequestDto
convert2ActivityCancelStockRequestDto
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
orderBean
,
List
<
Integer
>
transType
)
{
public
ActivityCancelStockRequestDto
convert2ActivityCancelStockRequestDto
(
OrderBeanV1
orderBean
,
List
<
Integer
>
transType
)
{
ActivityCancelStockRequestDto
activityCancelStockRequestDto
=
new
ActivityCancelStockRequestDto
();
activityCancelStockRequestDto
.
setVer
(
Version
.
VERSION_1
);
activityCancelStockRequestDto
.
setPartnerCode
(
orderBean
.
getCompanyId
());
...
...
@@ -233,19 +237,19 @@ public class ActivityAdapter {
}
activityCancelStockRequestDto
.
setProducts
(
orderProducts
);
//优惠券冲正
List
<
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
AccountBean
>
accountList
=
orderBean
.
getAccountList
();
List
<
AccountBeanV1
>
accountList
=
orderBean
.
getAccountList
();
if
(!
CollectionUtils
.
isEmpty
(
accountList
)
&&
!
CollectionUtils
.
isEmpty
(
orderBean
.
getProductList
()))
{
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
AccountBean
accountBean
:
accountList
)
{
for
(
AccountBeanV1
accountBean
:
accountList
)
{
List
<
CouponCodeVerificationProductDto
>
products
=
new
ArrayList
<>();
//订单中存储的6代表商品券
if
(
Objects
.
equals
(
accountBean
.
getType
(),
OrderAccountType
.
PRODUCT_COUPON
.
getCode
()))
{
for
(
int
i
=
0
;
i
<
orderBean
.
getProductList
().
size
();
i
++)
{
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
productBean
=
orderBean
.
getProductList
().
get
(
i
);
ProductBeanV1
productBean
=
orderBean
.
getProductList
().
get
(
i
);
String
pid
=
StringUtils
.
isNotBlank
(
productBean
.
getSpecification
())
?
productBean
.
getSpecification
()
:
productBean
.
getProductId
();
if
(!
org
.
springframework
.
util
.
CollectionUtils
.
isEmpty
(
orderBean
.
getProductList
().
get
(
i
).
getDiscountList
()))
{
List
<
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
.
ProductDiscount
>
discounts
=
orderBean
.
getProductList
().
get
(
i
).
getDiscountList
().
stream
().
List
<
ProductDiscountV1
>
discounts
=
orderBean
.
getProductList
().
get
(
i
).
getDiscountList
().
stream
().
filter
(
productDiscount
->
productDiscount
.
getDiscountId
().
equals
(
accountBean
.
getAccountId
())).
collect
(
Collectors
.
toList
());
for
(
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
ProductBean
.
ProductDiscount
productDiscount
:
discounts
)
{
for
(
ProductDiscountV1
productDiscount
:
discounts
)
{
CouponCodeVerificationProductDto
couponCodeVerificationProductDto
=
new
CouponCodeVerificationProductDto
();
couponCodeVerificationProductDto
.
setPID
(
pid
);
couponCodeVerificationProductDto
.
setConsume_num
(
productDiscount
.
getDiscountQty
());
...
...
shopping-cart-application-service/src/main/java/cn/freemud/amp/body/OrderBody.java
View file @
e94ae3ba
package
cn
.
freemud
.
amp
.
body
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
java.util.List
;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @version V1.0
* @Title: ${FILE_NAME}
* @Package com.freemud.mail.core
* @Description: ${TODO}(用一句话描述该文件做什么)
* @author: aiqi.gong
* @date: 2019/3/18 17:12
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
public
class
OrderBody
{
private
String
appId
;
private
OrderBean
orderBean
;
/**
* 微信上送信息集
*/
private
SyncStatusInfo
syncStatusInfo
;
public
SyncStatusInfo
getSyncStatusInfo
()
{
return
syncStatusInfo
;
}
public
void
seSyncStatusInfo
(
SyncStatusInfo
syncStatusInfo
)
{
this
.
syncStatusInfo
=
syncStatusInfo
;
}
public
OrderBean
getOrderBean
()
{
return
orderBean
;
}
public
void
setOrderBean
(
OrderBean
orderBean
)
{
this
.
orderBean
=
orderBean
;
}
public
String
getAppId
()
{
return
appId
;
}
public
void
setAppId
(
String
appId
)
{
this
.
appId
=
appId
;
}
@Data
public
static
class
OrderBean
{
/**
* 门店地址
*/
private
String
shopAddress
;
/**
* 收货地址
*/
private
String
address
;
/**
* 门店电话
*/
private
String
shopPhone
;
/**
* 总金额
*/
private
Integer
amount
;
/**
* 实际支付金额
*/
private
Integer
paidTotalAmount
;
/**
* 优惠金额
*/
private
Integer
discountTotalAmount
;
private
Integer
barCounter
;
/**
* 取消原因
*/
private
String
cancelReason
;
/**
* 商户ID
*/
private
String
companyId
;
private
String
courierName
;
private
String
courierPhone
;
private
String
createUser
;
private
String
customerOrder
;
private
int
evaluateStatus
;
private
Object
gmtAccept
;
/**
* 自定义描述字段
*/
private
String
extInfo
;
/**
* 创建时间 时间戳
*/
private
Long
gmtCreate
;
/**
* 期望送达时间
*/
private
Long
gmtExpect
;
/**
* 更新时间 时间戳
*/
private
Long
gmtModified
;
private
Long
gmtPay
;
/**
* 是否有退款记录
*/
private
Boolean
hasRefund
;
/**
* 维度
*/
private
Double
latitude
;
/**
* 经度
*/
private
Double
longitude
;
/**
* 订单ID
*/
private
String
oid
;
private
Integer
orderType
;
/**
* 取餐码
*/
private
String
otherCode
;
private
String
partition
;
private
String
payChannel
;
private
String
payChannelName
;
/**
* 订单支付状态 1 未支付 2 已支付 3 已退款 4 已经部分退款 5 完成
*/
private
Integer
payStatus
;
/**
* 订单支付类型 1 线上支付 2 货到付款
*/
private
Integer
payType
;
/**
* 支付凭证 非码流水ID
*/
private
String
payVoucher
;
/**
* 手机号
*/
private
String
phone
;
private
String
posId
;
private
String
remark
;
/**
* 日订单序号
*/
private
Integer
daySeq
;
private
String
shopId
;
private
String
shopName
;
private
String
source
;
private
String
sourceName
;
/**
* 订单状态 1 下单 2 待支付 3已接单 4 配送中 5 已完成 6 已取消 7 已拒单 31 制作完成
*/
private
Integer
status
;
/**
* 取餐地址
*/
private
String
takeAddress
;
/**
* 外卖备注
*/
private
String
takeoutRemark
;
/**
* 取餐排队号 订单详情使用 默认为空
*/
private
String
queueIndex
;
/**
* 订单状态 1 外卖 2 预订单 3 商城 4 门店自提 5 堂食
*/
private
Integer
type
;
/**
* 用户ID
*/
private
String
userId
;
/**
* 用户名称
*/
private
String
userName
;
private
String
userType
;
private
List
<
AccountBean
>
accountList
;
private
List
<
ProductBean
>
productList
;
private
List
<
RefundBean
>
refundList
;
private
AddDeliveryInfo
addInfo
;
private
InvoiceInfo
invoiceInfo
;
/**
* 订单操作状态(从订单操作历史表中获取)
*/
private
String
operateTakeOrderTime
;
private
String
operateWaitPayTime
;
private
String
operateReceiptTime
;
private
String
operateDistributionTime
;
private
String
operateCompleteTime
;
private
String
operateCalcelTime
;
private
String
operatePefuseTime
;
private
String
operateCompleteMakeTime
;
/**
* 运单状态
*/
private
Integer
deliverStatus
;
/**
* 骑手姓名
*/
private
String
riderName
;
/**
* 骑手文案 商家自配送文案
*/
private
String
riderText
;
/**
* 骑手头像 如果是自配送,显示门店首图
*/
private
String
riderPhoto
;
/**
* 门店首图 扩展字段
*/
private
String
shopImageUrl
;
/**
* 骑手电话
*/
private
String
riderPhone
;
/**
* 系统接单时间
*/
private
String
receiveTime
;
/**
* 骑手分配时间
*/
private
String
depatchTime
;
/**
* 到店时间
*/
private
String
arriveShopTime
;
/**
* 送出时间
*/
private
String
sendTime
;
/**
* 完成时间
*/
private
String
completeTime
;
/**
* 包装费
*/
private
Integer
takeoutPackagingFee
;
@NoArgsConstructor
@Data
public
static
class
AddDeliveryInfo
{
/**
* 外卖中台运单号
*/
private
String
deliveryId
;
/**
* 配送公司
*/
private
String
express
;
/**
* 配送公司编号
*/
private
String
expressNo
;
/**
* 配送费
*/
private
Long
deliveryAmount
;
}
@NoArgsConstructor
@Data
public
static
class
ProductBean
{
/**
* customerCode :
* number : 1
* opid : 0
* orderId : 109457845547698183
* parentProduct :
* picture :
* price : 1100
* productId : product1
* productName : 奶茶
* sequence : 10
* specification : 中杯+常温
* specificationName :
* unit :
*/
private
String
customerCode
;
/**
* 商品数量
*/
private
int
number
;
private
String
opid
;
/**
* 订单ID
*/
private
String
orderId
;
/**
* 商品ID
*/
private
String
productId
;
/**
* 父类商品ID
*/
private
String
parentProduct
;
/**
* 商品图片
*/
private
String
picture
;
/**
* 商品价格
*/
private
Long
price
;
/**
* 商品实际销售价格 扣除优惠价格后计算salePrice V1.5.2增加
*/
private
Long
salePrice
;
/**
* 商品名称
*/
private
String
productName
;
/**
* 商品排序
*/
private
int
sequence
;
/**
* 商品描述
*/
private
String
specification
;
private
String
specificationName
;
private
String
unit
;
/**
* 商品扩展字段 保存为
*/
private
String
addInfo
;
/**
* 当前商品的实际优惠信息
*/
public
List
<
ProductDiscount
>
discountList
;
@NoArgsConstructor
@Data
public
static
class
ProductDiscount
{
/**
* 存放活动ID ,couponCode
*/
private
String
discountId
;
/**
* 存放活动名称,券名称
*/
private
String
discountDesc
;
/**
* 存放活动类型 OrderAccountType 枚举
*/
private
Integer
discountType
;
/**
* 特价
*/
private
Long
discountPrice
;
/**
* 享受特价数量
*/
private
Integer
discountQty
;
/**
* 优惠金额 正数
*/
private
Long
discountAmount
;
/**
* 活动子code
*/
private
String
customerCode
;
/**
* 活动自定义信息
*/
private
String
addInfo
;
private
String
productId
;
}
}
@NoArgsConstructor
@Data
public
static
class
RefundBean
{
/**
* 订单ID
*/
private
String
orderId
;
/**
* 退款价格
*/
private
Long
price
;
/**
* 原因
*/
private
String
reason
;
/**
* 退款订单
*/
private
String
rid
;
/**
* 退款状态 1 申请退款 2 同意退款 3 已退货 4 退款完成 5 拒绝退款
*/
private
Integer
status
;
}
@Data
public
static
class
AccountBean
{
/**
* accountId : 121347407098150912
* name : 满减折扣
* number : 1
* oaid :
* orderId : 119108155383846159
* price : -700
* sequence : 0
* type : 2
*/
private
String
accountId
;
private
String
name
;
private
Integer
number
;
private
String
oaid
;
/**
* 订单编号
*/
private
String
orderId
;
/**
* 优惠金额
*/
private
Long
price
;
private
Integer
sequence
;
/**
* 结算对象类型 1 运费 2折扣 3包装费 4积分 5 优惠券 6线下支付 7 微信 8 支付宝 9 商户金额
*/
private
Integer
type
;
/**
* 自定义对象
*/
private
String
addInfo
;
}
@Data
public
static
class
InvoiceInfo
{
/**
* 发票编号
*/
private
String
taxNo
;
/**
* 发票抬头
*/
private
String
invoiceTitle
;
}
}
/**
* 微信上送数据集
*/
@NoArgsConstructor
@Data
public
static
class
SyncStatusInfo
{
/**
* 微信支付商户号
*/
private
String
mchId
;
/**
* 用户小程序Appid
*/
private
String
wxAppid
;
/**
* 微信用户开放ID
*/
private
String
openId
;
/**
* 微信sessionKey
*/
private
String
sessionKey
;
/**
* 微信支付订单号(status 为 PAY_SUCCESS时必填)
*/
private
String
transactionId
;
/**
* 服务商支付单号(fmId)
*/
private
String
outTradeNo
;
/**
* 渠道方流水号 (比如扫呗,易宝等)
*/
private
String
endTransId
;
/**
* 扫呗终端号
*/
private
String
terminalId
;
}
}
//
package cn.freemud.amp.body;
//
//
import lombok.Data;
//
import lombok.NoArgsConstructor;
//
//
import java.util.List;
//
/
//
**
//
* All rights Reserved, Designed By www.freemud.cn
//
*
//
* @version V1.0
//
* @Title: ${FILE_NAME}
//
* @Package com.freemud.mail.core
//
* @Description: ${TODO}(用一句话描述该文件做什么)
//
* @author: aiqi.gong
//
* @date: 2019/3/18 17:12
//
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
//
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
//
*/
//
public class OrderBody {
//
//
//
//
private String appId;
//
private OrderBean orderBean;
//
/**
//
* 微信上送信息集
//
*/
//
private SyncStatusInfo syncStatusInfo;
//
//
public SyncStatusInfo getSyncStatusInfo() {
//
return syncStatusInfo;
//
}
//
//
public void seSyncStatusInfo(SyncStatusInfo syncStatusInfo) {
//
//
this.syncStatusInfo = syncStatusInfo;
//
}
//
//
public OrderBean getOrderBean() {
//
return orderBean;
//
}
//
//
public void setOrderBean(OrderBean orderBean) {
//
this.orderBean = orderBean;
//
}
//
public String getAppId() {
//
return appId;
//
}
//
//
public void setAppId(String appId) {
//
this.appId = appId;
//
}
//
//
@Data
//
public static class OrderBean {
//
//
/**
//
* 门店地址
//
*/
//
private String shopAddress;
//
/**
//
* 收货地址
//
*/
//
private String address;
//
/**
//
* 门店电话
//
*/
//
private String shopPhone;
//
//
/**
//
* 总金额
//
*/
//
private Integer amount;
//
/**
//
* 实际支付金额
//
*/
//
private Integer paidTotalAmount;
//
/**
//
* 优惠金额
//
*/
//
private Integer discountTotalAmount;
//
private Integer barCounter;
//
/**
//
* 取消原因
//
*/
//
private String cancelReason;
//
/**
//
* 商户ID
//
*/
//
private String companyId;
//
private String courierName;
//
private String courierPhone;
//
private String createUser;
//
private String customerOrder;
//
private int evaluateStatus;
//
private Object gmtAccept;
//
/**
//
* 自定义描述字段
//
*/
//
private String extInfo;
//
/**
//
* 创建时间 时间戳
//
*/
//
private Long gmtCreate;
//
/**
//
* 期望送达时间
//
*/
//
private Long gmtExpect;
//
/**
//
* 更新时间 时间戳
//
*/
//
private Long gmtModified;
//
private Long gmtPay;
//
/**
//
* 是否有退款记录
//
*/
//
private Boolean hasRefund;
//
/**
//
* 维度
//
*/
//
private Double latitude;
//
/**
//
* 经度
//
*/
//
private Double longitude;
//
/**
//
* 订单ID
//
*/
//
private String oid;
//
private Integer orderType;
//
/**
//
* 取餐码
//
*/
//
private String otherCode;
//
private String partition;
//
private String payChannel;
//
private String payChannelName;
//
/**
//
* 订单支付状态 1 未支付 2 已支付 3 已退款 4 已经部分退款 5 完成
//
*/
//
private Integer payStatus;
//
/**
//
* 订单支付类型 1 线上支付 2 货到付款
//
*/
//
private Integer payType;
//
/**
//
* 支付凭证 非码流水ID
//
*/
//
private String payVoucher;
//
/**
//
* 手机号
//
*/
//
private String phone;
//
private String posId;
//
private String remark;
//
/**
//
* 日订单序号
//
*/
//
private Integer daySeq;
//
private String shopId;
//
private String shopName;
//
private String source;
//
private String sourceName;
//
/**
//
* 订单状态 1 下单 2 待支付 3已接单 4 配送中 5 已完成 6 已取消 7 已拒单 31 制作完成
//
*/
//
private Integer status;
//
/**
//
* 取餐地址
//
*/
//
private String takeAddress;
//
/**
//
* 外卖备注
//
*/
//
private String takeoutRemark;
//
/**
//
* 取餐排队号 订单详情使用 默认为空
//
*/
//
private String queueIndex;
//
/**
//
* 订单状态 1 外卖 2 预订单 3 商城 4 门店自提 5 堂食
//
*/
//
private Integer type;
//
/**
//
* 用户ID
//
*/
//
private String userId;
//
/**
//
* 用户名称
//
*/
//
private String userName;
//
private String userType;
//
private List<AccountBean> accountList;
//
private List<ProductBean> productList;
//
private List<RefundBean> refundList;
//
//
private AddDeliveryInfo addInfo;
//
private InvoiceInfo invoiceInfo;
//
//
/**
//
* 订单操作状态(从订单操作历史表中获取)
//
*/
//
private String operateTakeOrderTime;
//
private String operateWaitPayTime;
//
private String operateReceiptTime;
//
private String operateDistributionTime;
//
private String operateCompleteTime;
//
private String operateCalcelTime;
//
private String operatePefuseTime;
//
private String operateCompleteMakeTime;
//
//
/**
//
* 运单状态
//
*/
//
private Integer deliverStatus;
//
//
/**
//
* 骑手姓名
//
*/
//
private String riderName;
//
/**
//
* 骑手文案 商家自配送文案
//
*/
//
private String riderText;
//
/**
//
* 骑手头像 如果是自配送,显示门店首图
//
*/
//
private String riderPhoto;
//
/**
//
* 门店首图 扩展字段
//
*/
//
private String shopImageUrl;
//
/**
//
* 骑手电话
//
*/
//
private String riderPhone;
//
/**
//
* 系统接单时间
//
*/
//
private String receiveTime;
//
/**
//
* 骑手分配时间
//
*/
//
private String depatchTime;
//
/**
//
* 到店时间
//
*/
//
private String arriveShopTime;
//
/**
//
* 送出时间
//
*/
//
private String sendTime;
//
/**
//
* 完成时间
//
*/
//
private String completeTime;
//
/**
//
* 包装费
//
*/
//
private Integer takeoutPackagingFee;
//
//
@NoArgsConstructor
//
@Data
//
public static class AddDeliveryInfo {
//
/**
//
* 外卖中台运单号
//
*/
//
private String deliveryId;
//
/**
//
* 配送公司
//
*/
//
private String express;
//
/**
//
* 配送公司编号
//
*/
//
private String expressNo;
//
/**
//
* 配送费
//
*/
//
private Long deliveryAmount;
//
}
//
//
@NoArgsConstructor
//
@Data
//
public static class ProductBean {
//
/**
//
* customerCode :
//
* number : 1
//
* opid : 0
//
* orderId : 109457845547698183
//
* parentProduct :
//
* picture :
//
* price : 1100
//
* productId : product1
//
* productName : 奶茶
//
* sequence : 10
//
* specification : 中杯+常温
//
* specificationName :
//
* unit :
//
*/
//
//
private String customerCode;
//
/**
//
* 商品数量
//
*/
//
private int number;
//
private String opid;
//
/**
//
* 订单ID
//
*/
//
private String orderId;
//
/**
//
* 商品ID
//
*/
//
private String productId;
//
/**
//
* 父类商品ID
//
*/
//
private String parentProduct;
//
/**
//
* 商品图片
//
*/
//
private String picture;
//
/**
//
* 商品价格
//
*/
//
private Long price;
//
/**
//
* 商品实际销售价格 扣除优惠价格后计算salePrice V1.5.2增加
//
*/
//
private Long salePrice;
//
/**
//
* 商品名称
//
*/
//
private String productName;
//
/**
//
* 商品排序
//
*/
//
private int sequence;
//
/**
//
* 商品描述
//
*/
//
private String specification;
//
private String specificationName;
//
private String unit;
//
/**
//
* 商品扩展字段 保存为
//
*/
//
private String addInfo;
//
//
/**
//
* 当前商品的实际优惠信息
//
*/
//
public List<ProductDiscount> discountList;
//
//
//
@NoArgsConstructor
//
@Data
//
public static class ProductDiscount {
//
/**
//
* 存放活动ID ,couponCode
//
*/
//
private String discountId;
//
/**
//
* 存放活动名称,券名称
//
*/
//
private String discountDesc;
//
/**
//
* 存放活动类型 OrderAccountType 枚举
//
*/
//
private Integer discountType;
//
/**
//
* 特价
//
*/
//
private Long discountPrice;
//
/**
//
* 享受特价数量
//
*/
//
private Integer discountQty;
//
/**
//
* 优惠金额 正数
//
*/
//
private Long discountAmount;
//
/**
//
* 活动子code
//
*/
//
private String customerCode;
//
/**
//
* 活动自定义信息
//
*/
//
private String addInfo;
//
//
private String productId;
//
}
//
//
}
//
//
@NoArgsConstructor
//
@Data
//
public static class RefundBean {
//
//
/**
//
* 订单ID
//
*/
//
private String orderId;
//
//
/**
//
* 退款价格
//
*/
//
private Long price;
//
//
/**
//
* 原因
//
*/
//
private String reason;
//
//
/**
//
* 退款订单
//
*/
//
private String rid;
//
//
/**
//
* 退款状态 1 申请退款 2 同意退款 3 已退货 4 退款完成 5 拒绝退款
//
*/
//
private Integer status;
//
//
}
//
//
@Data
//
public static class AccountBean {
//
/**
//
* accountId : 121347407098150912
//
* name : 满减折扣
//
* number : 1
//
* oaid :
//
* orderId : 119108155383846159
//
* price : -700
//
* sequence : 0
//
* type : 2
//
*/
//
private String accountId;
//
private String name;
//
private Integer number;
//
private String oaid;
//
/**
//
* 订单编号
//
*/
//
private String orderId;
//
/**
//
* 优惠金额
//
*/
//
private Long price;
//
private Integer sequence;
//
/**
//
* 结算对象类型 1 运费 2折扣 3包装费 4积分 5 优惠券 6线下支付 7 微信 8 支付宝 9 商户金额
//
*/
//
private Integer type;
//
/**
//
* 自定义对象
//
*/
//
private String addInfo;
//
}
//
//
@Data
//
public static class InvoiceInfo {
//
/**
//
* 发票编号
//
*/
//
private String taxNo;
//
/**
//
* 发票抬头
//
*/
//
private String invoiceTitle;
//
}
//
}
//
//
/**
//
* 微信上送数据集
//
*/
//
@NoArgsConstructor
//
@Data
//
public static class SyncStatusInfo {
//
/**
//
* 微信支付商户号
//
*/
//
private String mchId;
//
/**
//
* 用户小程序Appid
//
*/
//
private String wxAppid;
//
/**
//
* 微信用户开放ID
//
*/
//
private String openId;
//
/**
//
* 微信sessionKey
//
*/
//
private String sessionKey;
//
//
/**
//
* 微信支付订单号(status 为 PAY_SUCCESS时必填)
//
*/
//
private String transactionId;
//
//
/**
//
* 服务商支付单号(fmId)
//
*/
//
private String outTradeNo;
//
//
/**
//
* 渠道方流水号 (比如扫呗,易宝等)
//
*/
//
private String endTransId;
//
//
/**
//
* 扫呗终端号
//
*/
//
private String terminalId;
//
}
//
}
shopping-cart-application-service/src/main/java/cn/freemud/amp/config/PushOrderConfig.java
View file @
e94ae3ba
package
cn
.
freemud
.
amp
.
config
;
import
cn.freemud.amp.service.OrderMQService
;
import
org.springframework.amqp.core.*
;
import
org.springframework.context.annotation.Bean
;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @version V1.0
* @Title: ${FILE_NAME}
* @Package com.freemud.mail.core
* @Description: ${TODO}(用一句话描述该文件做什么)
* @author: aiqi.gong
* @date: 2019/3/11 18:26
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
public
class
PushOrderConfig
{
public
static
final
String
EXCHANGE_NAME
=
"topic-Exchange"
;
public
static
final
String
PUSH_ORDER_QUEUE
=
"push-order-queue"
;
public
static
final
String
PUSH_ORDER_QUEUE_ROUTING_KEY
=
"push-order-queue-routing-key"
;
/**
* 定义基于Fanout 的Exchange。
* 基于这个代码,也可以非常方便的定义其他的Exchange类型。
*
* @return Fanout Exchange
*/
@Bean
public
Exchange
topicExchange
()
{
return
ExchangeBuilder
.
topicExchange
(
EXCHANGE_NAME
).
durable
(
true
).
build
();
}
/**
* 写入RabbitMQ使用的默认队列
*
* @return
*/
@Bean
public
Queue
pushOrderQueue
()
{
return
QueueBuilder
.
durable
(
PUSH_ORDER_QUEUE
).
build
();
}
/**
* 绑定消息队列
*
* @param pushOrderQueue 消息队列
* @param topicExchange RabbitMQ Fanout Exchange
* @return 消息队列绑定
*/
@Bean
Binding
bindingMail
(
Queue
pushOrderQueue
,
Exchange
topicExchange
)
{
return
BindingBuilder
.
bind
(
pushOrderQueue
).
to
(
topicExchange
).
with
(
PUSH_ORDER_QUEUE_ROUTING_KEY
).
noargs
();
}
@Bean
public
OrderMQService
orderMQService
()
{
return
new
OrderMQService
();
}
}
//package cn.freemud.amp.config;
//
//import org.springframework.amqp.core.*;
//import org.springframework.context.annotation.Bean;
//
///**
// * All rights Reserved, Designed By www.freemud.cn
// *
// * @version V1.0
// * @Title: ${FILE_NAME}
// * @Package com.freemud.mail.core
// * @Description: ${TODO}(用一句话描述该文件做什么)
// * @author: aiqi.gong
// * @date: 2019/3/11 18:26
// * @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
// * 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
// */
//public class PushOrderConfig {
// public static final String EXCHANGE_NAME = "topic-Exchange";
// public static final String PUSH_ORDER_QUEUE = "push-order-queue";
// public static final String PUSH_ORDER_QUEUE_ROUTING_KEY = "push-order-queue-routing-key";
//
// /**
// * 定义基于Fanout 的Exchange。
// * 基于这个代码,也可以非常方便的定义其他的Exchange类型。
// *
// * @return Fanout Exchange
// */
// @Bean
// public Exchange topicExchange() {
// return ExchangeBuilder.topicExchange(EXCHANGE_NAME).durable(true).build();
// }
//
// /**
// * 写入RabbitMQ使用的默认队列
// *
// * @return
// */
// @Bean
// public Queue pushOrderQueue() {
// return QueueBuilder.durable(PUSH_ORDER_QUEUE).build();
// }
//
// /**
// * 绑定消息队列
// *
// * @param pushOrderQueue 消息队列
// * @param topicExchange RabbitMQ Fanout Exchange
// * @return 消息队列绑定
// */
// @Bean
// Binding bindingMail(Queue pushOrderQueue, Exchange topicExchange) {
// return BindingBuilder.bind(pushOrderQueue).to(topicExchange).with(PUSH_ORDER_QUEUE_ROUTING_KEY).noargs();
// }
//
// @Bean
// public OrderMQService orderMQService() {
// return new OrderMQService();
// }
//}
shopping-cart-application-service/src/main/java/cn/freemud/amp/service/OrderMQService.java
View file @
e94ae3ba
package
cn
.
freemud
.
amp
.
service
;
import
cn.freemud.amp.body.OrderBody
;
import
cn.freemud.amp.config.PushOrderConfig
;
import
cn.freemud.amqp.Header
;
import
cn.freemud.amqp.MQMessage
;
import
cn.freemud.amqp.MQService
;
import
org.springframework.beans.factory.annotation.Autowired
;
/**
* All rights Reserved, Designed By www.freemud.cn
*
* @version V1.0
* @Title: ${FILE_NAME}
* @Package com.freemud.mail.core
* @Description: ${TODO}(用一句话描述该文件做什么)
* @author: aiqi.gong
* @date: 2019/3/19 20:00
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
*/
public
class
OrderMQService
{
@Autowired
private
MQService
mqService
;
private
static
final
String
TEST
=
"test"
;
public
void
sendOrderMQ
(
OrderBody
orderBody
)
{
MQMessage
<
OrderBody
>
orderBodyMQMessage
=
new
MQMessage
<>();
Header
header
=
new
Header
();
orderBodyMQMessage
.
setHeader
(
header
);
orderBodyMQMessage
.
setBody
(
orderBody
);
mqService
.
convertAndSend
(
PushOrderConfig
.
EXCHANGE_NAME
,
PushOrderConfig
.
PUSH_ORDER_QUEUE_ROUTING_KEY
,
orderBodyMQMessage
);
}
}
//
package cn.freemud.amp.service;
//
//
import cn.freemud.amp.body.OrderBody;
//
import cn.freemud.amp.config.PushOrderConfig;
//
import cn.freemud.amqp.Header;
//
import cn.freemud.amqp.MQMessage;
//
import cn.freemud.amqp.MQService;
//
import org.springframework.beans.factory.annotation.Autowired;
//
/
//
**
//
* All rights Reserved, Designed By www.freemud.cn
//
*
//
* @version V1.0
//
* @Title: ${FILE_NAME}
//
* @Package com.freemud.mail.core
//
* @Description: ${TODO}(用一句话描述该文件做什么)
//
* @author: aiqi.gong
//
* @date: 2019/3/19 20:00
//
* @Copyright: 2018 www.freemud.cn Inc. All rights reserved.
//
* 注意:本内容仅限于上海非码科技内部传阅,禁止外泄以及用于其他的商业目
//
*/
//
public class OrderMQService {
//
@Autowired
//
private MQService mqService;
//
//
private static final String TEST = "test";
//
//
//
public void sendOrderMQ(OrderBody orderBody) {
//
MQMessage<OrderBody> orderBodyMQMessage = new MQMessage<>();
//
Header header = new Header();
//
orderBodyMQMessage.setHeader(header);
//
orderBodyMQMessage.setBody(orderBody);
//
mqService.convertAndSend(PushOrderConfig.EXCHANGE_NAME, PushOrderConfig.PUSH_ORDER_QUEUE_ROUTING_KEY, orderBodyMQMessage);
//
}
//
}
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/CreateOrderResponseDto.java
View file @
e94ae3ba
package
cn
.
freemud
.
entities
.
dto
;
import
c
n.freemud.entities.dto.QueryOrdersResponseDto.DataBean.OrderBean
;
import
c
om.freemud.application.sdk.api.ordercenter.entities.v1.OrderBeanV1
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
...
...
@@ -17,7 +17,7 @@ public class CreateOrderResponseDto {
*/
private
Integer
errcode
;
private
OrderBean
data
;
private
OrderBean
V1
data
;
private
String
errmsg
;
}
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/QueryOrderByIdResponseDto.java
View file @
e94ae3ba
...
...
@@ -12,7 +12,7 @@
*/
package
cn
.
freemud
.
entities
.
dto
;
import
c
n.freemud.entities.dto.QueryOrdersResponseDto.DataBean.OrderBean
;
import
c
om.freemud.application.sdk.api.ordercenter.entities.v1.OrderBeanV1
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
lombok.ToString
;
...
...
@@ -27,7 +27,7 @@ public class QueryOrderByIdResponseDto {
* errmsg : 根据订单ID查询订单详细信息成功
*/
private
OrderBean
data
;
private
OrderBean
V1
data
;
private
Integer
errcode
;
private
String
errmsg
;
...
...
shopping-cart-application-service/src/main/java/cn/freemud/entities/dto/QueryOrdersResponseDto.java
View file @
e94ae3ba
...
...
@@ -12,6 +12,7 @@
*/
package
cn
.
freemud
.
entities
.
dto
;
import
com.freemud.application.sdk.api.ordercenter.entities.v1.OrderBeanV1
;
import
lombok.Data
;
import
lombok.NoArgsConstructor
;
import
org.apache.commons.lang.builder.ToStringBuilder
;
...
...
@@ -43,402 +44,402 @@ public class QueryOrdersResponseDto {
public
static
class
DataBean
{
private
int
count
;
private
List
<
OrderBean
>
orders
;
private
List
<
OrderBean
V1
>
orders
;
@NoArgsConstructor
@Data
public
static
class
OrderBean
{
/**
* 门店地址
*/
private
String
shopAddress
;
/**
* 收货地址
*/
private
String
address
;
/**
* 门店电话
*/
private
String
shopPhone
;
/**
* 总金额
*/
private
Long
amount
;
/**
* 吧台桌号
*/
private
String
barCounter
;
/**
* 取消原因
*/
private
String
cancelReason
;
/**
* 商户ID
*/
private
String
companyId
;
private
String
courierName
;
private
String
courierPhone
;
private
String
createUser
;
private
String
customerOrder
;
private
int
evaluateStatus
;
private
Object
gmtAccept
;
/**
* 自定义描述字段
*/
private
String
extInfo
;
/**
* 创建时间 时间戳
*/
private
Long
gmtCreate
;
/**
* 期望送达时间
*/
private
Long
gmtExpect
;
/**
* 更新时间 时间戳
*/
private
Long
gmtModified
;
private
Long
gmtPay
;
/**
* 是否有退款记录
*/
private
Boolean
hasRefund
;
private
String
invoiceInfo
;
/**
* 维度
*/
private
Double
latitude
;
/**
* 经度
*/
private
Double
longitude
;
/**
* 订单ID
*/
private
String
oid
;
private
Integer
orderType
;
/**
* 取餐码
*/
private
String
otherCode
;
private
String
partition
;
private
String
payChannel
;
private
String
payChannelName
;
/**
* 订单支付状态 1 未支付 2 已支付 3 已退款 4 已经部分退款 5 完成
*/
private
Integer
payStatus
;
/**
* 订单支付类型 1 线上支付 2 货到付款
*/
private
Integer
payType
;
/**
* 支付凭证 非码流水ID
*/
private
String
payVoucher
;
/**
* 手机号
*/
private
String
phone
;
private
String
posId
;
private
String
remark
;
/**
* 日订单序号
*/
private
Integer
daySeq
;
private
String
shopId
;
private
String
shopName
;
private
String
source
;
private
String
sourceName
;
/**
* 订单状态 1 下单 2 待支付 3已接单 4 配送中 5 已完成 6 已取消 7 已拒单 31 制作完成
*/
private
Integer
status
;
/**
* 取餐地址
*/
private
String
takeAddress
;
/**
* 取餐排队号 订单详情使用 默认为空
*/
private
String
queueIndex
;
/**
* 订单类型 1 外卖 2 预订单 3 商城 4 打包带走 5 店内就餐
*/
private
Integer
type
;
/**
* 用户ID
*/
private
String
userId
;
/**
* 用户名称
*/
private
String
userName
;
private
String
userType
;
private
List
<
AccountBean
>
accountList
;
private
List
<
ProductBean
>
productList
;
private
List
<
RefundBean
>
refundList
;
private
AddDeliveryInfo
addInfo
;
/**
* 订单操作状态(从订单操作历史表中获取)
*/
private
String
operateTakeOrderTime
;
private
String
operateWaitPayTime
;
private
String
operateReceiptTime
;
private
String
operateDistributionTime
;
private
String
operateCompleteTime
;
private
String
operateCalcelTime
;
private
String
operatePefuseTime
;
private
String
operateCompleteMakeTime
;
/**
* 运单状态
*/
private
Integer
deliverStatus
;
/**
* 骑手姓名
*/
private
String
riderName
;
/**
* 骑手文案 商家自配送文案
*/
private
String
riderText
;
/**
* 骑手头像 如果是自配送,显示门店首图
*/
private
String
riderPhoto
;
/**
* 门店首图 扩展字段
*/
private
String
shopImageUrl
;
/**
* 骑手电话
*/
private
String
riderPhone
;
/**
* 系统接单时间
*/
private
String
receiveTime
;
/**
* 骑手分配时间
*/
private
String
depatchTime
;
/**
* 到店时间
*/
private
String
arriveShopTime
;
/**
* 送出时间
*/
private
String
sendTime
;
/**
* 完成时间
*/
private
String
completeTime
;
@NoArgsConstructor
@Data
public
static
class
AddDeliveryInfo
{
/**
* 外卖中台运单号
*/
private
String
deliveryId
;
/**
* 配送公司
*/
private
String
express
;
/**
* 配送公司编号
*/
private
String
expressNo
;
}
@NoArgsConstructor
@Data
public
static
class
ProductBean
{
/**
* customerCode :
* number : 1
* opid : 0
* orderId : 109457845547698183
* parentProduct :
* picture :
* price : 1100
* productId : product1
* productName : 奶茶
* sequence : 10
* specification : 中杯+常温
* specificationName :
* unit :
*/
private
String
customerCode
;
/**
* 商品数量
*/
private
int
number
;
private
String
opid
;
/**
* 订单ID
*/
private
String
orderId
;
/**
* 商品ID
*/
private
String
productId
;
/**
* 父类商品ID
*/
private
String
parentProduct
;
/**
* 商品图片
*/
private
String
picture
;
/**
* 商品价格
*/
private
Long
price
;
/**
* 商品实际销售价格 扣除优惠价格后计算salePrice V1.5.2增加
*/
private
Long
salePrice
;
/**
* 商品名称
*/
private
String
productName
;
/**
* 商品排序
*/
private
int
sequence
;
/**
* 商品描述
*/
private
String
specification
;
private
String
specificationName
;
private
String
unit
;
/**
* 商品扩展字段 保存为
*/
private
String
addInfo
;
/**
* 当前商品的实际优惠信息
*/
public
List
<
ProductDiscount
>
discountList
;
@NoArgsConstructor
@Data
public
static
class
ProductDiscount
{
/**
* 存放活动ID ,couponCode
*/
private
String
discountId
;
/**
* 存放活动名称,券名称
*/
private
String
discountDesc
;
/**
* 存放活动类型 OrderAccountType 枚举
*/
private
Integer
discountType
;
/**
* 特价
*/
private
Long
discountPrice
;
/**
* 享受特价数量
*/
private
Integer
discountQty
;
/**
* 优惠金额 正数
*/
private
Long
discountAmount
;
/**
* 活动子code
*/
private
String
customerCode
;
/**
* 活动自定义信息
*/
private
String
addInfo
;
private
String
productId
;
}
}
@NoArgsConstructor
@Data
public
static
class
RefundBean
{
/**
* 订单ID
*/
private
String
orderId
;
/**
* 退款价格
*/
private
Long
price
;
/**
* 原因
*/
private
String
reason
;
/**
* 退款订单
*/
private
String
rid
;
/**
* 退款状态 1 申请退款 2 同意退款 3 已退货 4 退款完成 5 拒绝退款
*/
private
Integer
status
;
}
@NoArgsConstructor
@Data
public
static
class
AccountBean
{
/**
* accountId : 121347407098150912
* name : 满减折扣
* number : 1
* oaid :
* orderId : 119108155383846159
* price : -700
* sequence : 0
* type : 2
*/
private
String
accountId
;
private
String
name
;
private
Integer
number
;
private
String
oaid
;
/**
* 订单编号
*/
private
String
orderId
;
/**
* 优惠金额
*/
private
Long
price
;
private
Integer
sequence
;
/**
* 结算对象类型 1 运费 2折扣 3包装费 4积分 5 优惠券 6线下支付 7 微信 8 支付宝 9 商户金额
*/
private
Integer
type
;
/**
* 自定义对象
*/
private
String
addInfo
;
}
}
//
@NoArgsConstructor
//
@Data
//
public static class OrderBean {
//
//
/**
//
* 门店地址
//
*/
//
private String shopAddress;
//
/**
//
* 收货地址
//
*/
//
private String address;
//
/**
//
* 门店电话
//
*/
//
private String shopPhone;
//
//
/**
//
* 总金额
//
*/
//
private Long amount;
//
/**
//
* 吧台桌号
//
*/
//
private String barCounter;
//
/**
//
* 取消原因
//
*/
//
private String cancelReason;
//
/**
//
* 商户ID
//
*/
//
private String companyId;
//
private String courierName;
//
private String courierPhone;
//
private String createUser;
//
private String customerOrder;
//
private int evaluateStatus;
//
private Object gmtAccept;
//
/**
//
* 自定义描述字段
//
*/
//
private String extInfo;
//
/**
//
* 创建时间 时间戳
//
*/
//
private Long gmtCreate;
//
/**
//
* 期望送达时间
//
*/
//
private Long gmtExpect;
//
/**
//
* 更新时间 时间戳
//
*/
//
private Long gmtModified;
//
private Long gmtPay;
//
/**
//
* 是否有退款记录
//
*/
//
private Boolean hasRefund;
//
private String invoiceInfo;
//
/**
//
* 维度
//
*/
//
private Double latitude;
//
/**
//
* 经度
//
*/
//
private Double longitude;
//
/**
//
* 订单ID
//
*/
//
private String oid;
//
private Integer orderType;
//
/**
//
* 取餐码
//
*/
//
private String otherCode;
//
private String partition;
//
private String payChannel;
//
private String payChannelName;
//
/**
//
* 订单支付状态 1 未支付 2 已支付 3 已退款 4 已经部分退款 5 完成
//
*/
//
private Integer payStatus;
//
/**
//
* 订单支付类型 1 线上支付 2 货到付款
//
*/
//
private Integer payType;
//
/**
//
* 支付凭证 非码流水ID
//
*/
//
private String payVoucher;
//
/**
//
* 手机号
//
*/
//
private String phone;
//
private String posId;
//
private String remark;
//
/**
//
* 日订单序号
//
*/
//
private Integer daySeq;
//
private String shopId;
//
private String shopName;
//
private String source;
//
private String sourceName;
//
/**
//
* 订单状态 1 下单 2 待支付 3已接单 4 配送中 5 已完成 6 已取消 7 已拒单 31 制作完成
//
*/
//
private Integer status;
//
/**
//
* 取餐地址
//
*/
//
private String takeAddress;
//
/**
//
* 取餐排队号 订单详情使用 默认为空
//
*/
//
private String queueIndex;
//
/**
//
* 订单类型 1 外卖 2 预订单 3 商城 4 打包带走 5 店内就餐
//
*/
//
private Integer type;
//
/**
//
* 用户ID
//
*/
//
private String userId;
//
/**
//
* 用户名称
//
*/
//
private String userName;
//
private String userType;
//
private List<AccountBean> accountList;
//
private List<ProductBean> productList;
//
private List<RefundBean> refundList;
//
//
private AddDeliveryInfo addInfo;
//
//
/**
//
* 订单操作状态(从订单操作历史表中获取)
//
*/
//
private String operateTakeOrderTime;
//
private String operateWaitPayTime;
//
private String operateReceiptTime;
//
private String operateDistributionTime;
//
private String operateCompleteTime;
//
private String operateCalcelTime;
//
private String operatePefuseTime;
//
private String operateCompleteMakeTime;
//
//
/**
//
* 运单状态
//
*/
//
private Integer deliverStatus;
//
//
/**
//
* 骑手姓名
//
*/
//
private String riderName;
//
/**
//
* 骑手文案 商家自配送文案
//
*/
//
private String riderText;
//
/**
//
* 骑手头像 如果是自配送,显示门店首图
//
*/
//
private String riderPhoto;
//
/**
//
* 门店首图 扩展字段
//
*/
//
private String shopImageUrl;
//
/**
//
* 骑手电话
//
*/
//
private String riderPhone;
//
/**
//
* 系统接单时间
//
*/
//
private String receiveTime;
//
/**
//
* 骑手分配时间
//
*/
//
private String depatchTime;
//
/**
//
* 到店时间
//
*/
//
private String arriveShopTime;
//
/**
//
* 送出时间
//
*/
//
private String sendTime;
//
/**
//
* 完成时间
//
*/
//
private String completeTime;
//
//
@NoArgsConstructor
//
@Data
//
public static class AddDeliveryInfo {
//
/**
//
* 外卖中台运单号
//
*/
//
private String deliveryId;
//
/**
//
* 配送公司
//
*/
//
private String express;
//
/**
//
* 配送公司编号
//
*/
//
private String expressNo;
//
}
//
@NoArgsConstructor
//
@Data
//
public static class ProductBean {
//
/**
//
* customerCode :
//
* number : 1
//
* opid : 0
//
* orderId : 109457845547698183
//
* parentProduct :
//
* picture :
//
* price : 1100
//
* productId : product1
//
* productName : 奶茶
//
* sequence : 10
//
* specification : 中杯+常温
//
* specificationName :
//
* unit :
//
*/
//
//
private String customerCode;
//
/**
//
* 商品数量
//
*/
//
private int number;
//
private String opid;
//
/**
//
* 订单ID
//
*/
//
private String orderId;
//
/**
//
* 商品ID
//
*/
//
private String productId;
//
/**
//
* 父类商品ID
//
*/
//
private String parentProduct;
//
/**
//
* 商品图片
//
*/
//
private String picture;
//
/**
//
* 商品价格
//
*/
//
private Long price;
//
/**
//
* 商品实际销售价格 扣除优惠价格后计算salePrice V1.5.2增加
//
*/
//
private Long salePrice;
//
/**
//
* 商品名称
//
*/
//
private String productName;
//
/**
//
* 商品排序
//
*/
//
private int sequence;
//
/**
//
* 商品描述
//
*/
//
private String specification;
//
private String specificationName;
//
private String unit;
//
/**
//
* 商品扩展字段 保存为
//
*/
//
private String addInfo;
//
//
/**
//
* 当前商品的实际优惠信息
//
*/
//
public List<ProductDiscount> discountList;
//
//
//
@NoArgsConstructor
//
@Data
//
public static class ProductDiscount {
//
/**
//
* 存放活动ID ,couponCode
//
*/
//
private String discountId;
//
/**
//
* 存放活动名称,券名称
//
*/
//
private String discountDesc;
//
/**
//
* 存放活动类型 OrderAccountType 枚举
//
*/
//
private Integer discountType;
//
/**
//
* 特价
//
*/
//
private Long discountPrice;
//
/**
//
* 享受特价数量
//
*/
//
private Integer discountQty;
//
/**
//
* 优惠金额 正数
//
*/
//
private Long discountAmount;
//
/**
//
* 活动子code
//
*/
//
private String customerCode;
//
/**
//
* 活动自定义信息
//
*/
//
private String addInfo;
//
//
private String productId;
//
}
//
//
}
//
//
@NoArgsConstructor
//
@Data
//
public static class RefundBean {
//
//
/**
//
* 订单ID
//
*/
//
private String orderId;
//
//
/**
//
* 退款价格
//
*/
//
private Long price;
//
//
/**
//
* 原因
//
*/
//
private String reason;
//
//
/**
//
* 退款订单
//
*/
//
private String rid;
//
//
/**
//
* 退款状态 1 申请退款 2 同意退款 3 已退货 4 退款完成 5 拒绝退款
//
*/
//
private Integer status;
//
//
}
//
//
@NoArgsConstructor
//
@Data
//
public static class AccountBean {
//
/**
//
* accountId : 121347407098150912
//
* name : 满减折扣
//
* number : 1
//
* oaid :
//
* orderId : 119108155383846159
//
* price : -700
//
* sequence : 0
//
* type : 2
//
*/
//
private String accountId;
//
private String name;
//
private Integer number;
//
private String oaid;
//
/**
//
* 订单编号
//
*/
//
private String orderId;
//
/**
//
* 优惠金额
//
*/
//
private Long price;
//
private Integer sequence;
//
/**
//
* 结算对象类型 1 运费 2折扣 3包装费 4积分 5 优惠券 6线下支付 7 微信 8 支付宝 9 商户金额
//
*/
//
private Integer type;
//
/**
//
* 自定义对象
//
*/
//
private String addInfo;
//
}
//
}
}
}
shopping-cart-application-service/src/test/java/cn.freemud/client/MqTest.java
View file @
e94ae3ba
...
...
@@ -6,10 +6,10 @@ import cn.freemud.amqp.MQAction;
import
cn.freemud.amqp.MQMessage
;
import
cn.freemud.amqp.MQService
;
import
cn.freemud.entities.dto.ActivityCancelStockRequestDto
;
import
cn.freemud.entities.dto.QueryOrdersResponseDto
;
import
cn.freemud.utils.FileUtil
;
import
com.alibaba.fastjson.JSON
;
import
com.freemud.application.sdk.api.log.ErrorLog
;
import
com.freemud.application.sdk.api.ordercenter.entities.v1.OrderBeanV1
;
import
org.junit.Test
;
import
org.junit.runner.RunWith
;
import
org.springframework.beans.factory.annotation.Autowired
;
...
...
@@ -39,7 +39,7 @@ public class MqTest {
@Test
public
void
mqTest
()
{
String
fileName
=
"test"
;
QueryOrdersResponseDto
.
DataBean
.
OrderBean
orderBean
=
FileUtil
.
getObjectFromFile
(
fileName
,
QueryOrdersResponseDto
.
DataBean
.
OrderBean
.
class
);
OrderBeanV1
orderBean
=
FileUtil
.
getObjectFromFile
(
fileName
,
OrderBeanV1
.
class
);
// 删除订单 通知活动添加商品库存
ActivityCancelStockRequestDto
activityCancelStockRequestDto
=
activityAdapter
.
convert2ActivityCancelStockRequestDto
(
orderBean
,
Arrays
.
asList
(
1
,
2
,
3
));
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment