Skip to content
切换导航条
切换导航条
当前项目
正在载入...
登录
sibu-v-mall
/
sibu-v-mall-third-api
转到一个项目
切换导航栏
切换导航栏固定状态
项目
群组
代码片段
帮助
项目
活动
版本库
流水线
图表
问题
0
合并请求
0
维基
网络
创建新的问题
构建
提交
问题看板
文件
提交
网络
比较
分支
标签
e63fbe2f
由
刘嘉
编写于
2018-05-16 13:44:56 +0800
浏览文件
选项
浏览文件
标签
下载
电子邮件补丁
差异文件
菠萝派接口- 订单下载接口数据格式化
1 个父辈
7e1707c7
隐藏空白字符变更
内嵌
并排
正在显示
1 个修改的文件
包含
40 行增加
和
9 行删除
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/pineapple/impl/GetOrderBizServiceImpl.java
com.sibu.orderHelper.service/src/main/java/com/sibu/orderHelper/integral/service/pineapple/impl/GetOrderBizServiceImpl.java
查看文件 @
e63fbe2
...
...
@@ -34,7 +34,9 @@ import org.springframework.stereotype.Service;
import
javax.annotation.Resource
;
import
javax.xml.bind.ValidationException
;
import
java.math.BigDecimal
;
import
java.text.MessageFormat
;
import
java.text.SimpleDateFormat
;
import
java.util.ArrayList
;
import
java.util.HashMap
;
import
java.util.List
;
...
...
@@ -79,7 +81,7 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest>
List
<
Orders
>
ordersList
=
pineappleDao
.
getOrdersList
(
params
);
GetOrderResponse
response
=
new
GetOrderResponse
();
response
.
setNumTotalOrder
(
ordersList
.
size
());
response
.
setOrders
(
null
);
response
.
setOrders
(
findOrders
(
ordersList
)
);
response
.
setCode
(
PineAppleConst
.
SUCCESS_CODE
);
return
response
;
}
...
...
@@ -121,9 +123,8 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest>
orderResponse
.
setTradeStatus
(
orderStatusEnum
.
getCode
());
orderResponse
.
setTradeStatusDescription
(
orderStatusEnum
.
getMsg
());
orderResponse
.
setPlatOrderNo
(
orders
.
getOrderSn
());
orderResponse
.
setTradeStatus
(
orders
.
getOrderState
().
toString
());
orderResponse
.
setTradeStatusDescription
(
orders
.
getRemark
());
orderResponse
.
setTradeTime
(
orders
.
getCreateTime
(
));
orderResponse
.
setTradeTime
(
this
.
buildDefaultSimpleDateFormat
().
format
(
orders
.
getCreateTime
()
));
orderResponse
.
setCountry
(
"中国"
);
orderResponse
.
setProvince
(
orders
.
getRegionName1
());
orderResponse
.
setCity
(
orders
.
getRegionName2
());
...
...
@@ -131,11 +132,28 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest>
orderResponse
.
setAddress
(
orders
.
getAddressInfo
());
orderResponse
.
setPhone
(
orders
.
getMobile
());
orderResponse
.
setMobile
(
orders
.
getMobile
());
orderResponse
.
setPostFee
(
orders
.
getMoneyLogistics
().
toString
(
));
orderResponse
.
setGoodsFee
(
orders
.
getMoneyProduct
().
toString
(
));
orderResponse
.
setTotalMoney
(
orders
.
getMoneyOrder
().
toString
(
));
orderResponse
.
setPayTime
(
orders
.
getPayTime
(
));
orderResponse
.
setPostFee
(
this
.
convertAndCheckFreight
(
orders
.
getMoneyLogistics
()
));
orderResponse
.
setGoodsFee
(
this
.
convertAndCheckFreight
(
orders
.
getMoneyProduct
()
));
orderResponse
.
setTotalMoney
(
this
.
convertAndCheckFreight
(
orders
.
getMoneyOrder
()
));
orderResponse
.
setPayTime
(
this
.
buildDefaultSimpleDateFormat
().
format
(
orders
.
getPayTime
()
));
orderResponse
.
setShouldPayType
(
"银行收款"
);
orderResponse
.
setTown
(
""
);
orderResponse
.
setTaxAmount
(
""
);
orderResponse
.
setCommissionValue
(
""
);
orderResponse
.
setTariffAmount
(
""
);
orderResponse
.
setAddedValueAmount
(
""
);
orderResponse
.
setConsumptionDutyAmount
(
""
);
orderResponse
.
setSendStyle
(
""
);
orderResponse
.
setQq
(
""
);
orderResponse
.
setEmail
(
""
);
orderResponse
.
setInvoiceTitle
(
""
);
orderResponse
.
setTaxPayerIdent
(
""
);
orderResponse
.
setCodServiceFee
(
""
);
orderResponse
.
setCurrencyCode
(
""
);
orderResponse
.
setIdCard
(
""
);
orderResponse
.
setIdCardTrueName
(
""
);
orderResponse
.
setWhseCode
(
""
);
orderResponse
.
setIsHwgFlag
(
""
);
return
orderResponse
;
}
...
...
@@ -152,8 +170,12 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest>
orderGoodResponse
.
setTradeGoodsName
(
ordersProduct
.
getProductName
());
orderGoodResponse
.
setTradeGoodsSpec
(
ordersProduct
.
getSpecInfo
());
orderGoodResponse
.
setGoodsCount
(
String
.
valueOf
(
ordersProduct
.
getNumber
()));
orderGoodResponse
.
setPrice
(
String
.
valueOf
(
ordersProduct
.
getMoneyPrice
()));
orderGoodResponse
.
setDiscountMoney
(
String
.
valueOf
(
ordersProduct
.
getMoneyActSingle
()));
orderGoodResponse
.
setPrice
(
this
.
convertAndCheckFreight
(
ordersProduct
.
getMoneyPrice
()));
orderGoodResponse
.
setDiscountMoney
(
this
.
convertAndCheckFreight
(
ordersProduct
.
getMoneyActSingle
()));
orderGoodResponse
.
setTaxAmount
(
""
);
orderGoodResponse
.
setRefundStatus
(
""
);
orderGoodResponse
.
setStatus
(
""
);
orderGoodResponse
.
setRemark
(
""
);
return
null
;
}
...
...
@@ -166,6 +188,15 @@ public class GetOrderBizServiceImpl extends AbstractBizService<GetOrderRequest>
return
orderStatusEnum
;
}
private
SimpleDateFormat
buildDefaultSimpleDateFormat
()
{
SimpleDateFormat
sdf
=
new
SimpleDateFormat
(
"yyyy-MM-dd HH:mm:ss"
);
return
sdf
;
}
private
String
convertAndCheckFreight
(
BigDecimal
money
)
{
return
money
.
setScale
(
2
,
BigDecimal
.
ROUND_HALF_UP
).
toPlainString
();
}
@Override
public
String
getHandleMethodName
()
{
return
"Differ.JH.Business.GetOrder"
;
...
...
请
注册
或
登录
后发表评论