|
@@ -31,6 +31,7 @@ public class OrderCommonService {
|
|
|
private String domain;
|
|
|
@Resource
|
|
|
private OrderCommonMapper orderCommonMapper;
|
|
|
+
|
|
|
/**
|
|
|
* 设置订单状态
|
|
|
*/
|
|
@@ -58,7 +59,7 @@ public class OrderCommonService {
|
|
|
*/
|
|
|
public void getShopOrderData(OrderVo order) {
|
|
|
// 子订单
|
|
|
- if (StringUtils.isEmpty(order.getShopOrderIds())){
|
|
|
+ if (StringUtils.isEmpty(order.getShopOrderIds())) {
|
|
|
return;
|
|
|
}
|
|
|
String[] shopOrderIdArr = order.getShopOrderIds().split(",");
|
|
@@ -96,13 +97,16 @@ public class OrderCommonService {
|
|
|
if (null != orderProduct.getSvipPriceFlag() && 1 == orderProduct.getSvipPriceFlag()) {
|
|
|
if (1 == orderProduct.getSvipPriceType()) {
|
|
|
orderProduct.setSvipPriceTag(MathUtil.div(orderProduct.getSvipDiscount(), 10, 1) + "折");
|
|
|
- } else if (2 == orderProduct.getSvipPriceType()){
|
|
|
+ } else if (2 == orderProduct.getSvipPriceType()) {
|
|
|
orderProduct.setSvipPriceTag("¥" + orderProduct.getDiscountPrice());
|
|
|
}
|
|
|
}
|
|
|
});
|
|
|
shopOrder.setOrderProductList(orderProductList);
|
|
|
shopOrder.setShopLogo(ImageUtil.getImageUrl("shopLogo", shopOrder.getShopLogo(), domain));
|
|
|
+ if (0 == order.getOnlinePayFlag()) {
|
|
|
+ shopOrder.setObligation(MathUtil.sub(shopOrder.getRealPay(), shopOrder.getReceiptAmount()).doubleValue());
|
|
|
+ }
|
|
|
});
|
|
|
// 过滤运费商品
|
|
|
shopOrderList.removeIf(shopOrder -> shopOrder.getShopId() == 998);
|
|
@@ -112,6 +116,7 @@ public class OrderCommonService {
|
|
|
|
|
|
/**
|
|
|
* 设置付款金额
|
|
|
+ *
|
|
|
* @param order OrderVo
|
|
|
*/
|
|
|
public List<DiscernReceiptVo> getDiscernReceiptAndSetOrder(OrderVo order) {
|
|
@@ -174,7 +179,8 @@ public class OrderCommonService {
|
|
|
|
|
|
/**
|
|
|
* 设置搜索关键词历史记录
|
|
|
- * @param userId 用户Id
|
|
|
+ *
|
|
|
+ * @param userId 用户Id
|
|
|
* @param searchWord 搜索关键词
|
|
|
*/
|
|
|
public void setHistoryRecord(Integer userId, String searchWord) {
|
|
@@ -187,7 +193,7 @@ public class OrderCommonService {
|
|
|
// 查询搜索关键词历史记录是否存在
|
|
|
Integer recordId = orderCommonMapper.getSearchHistoryIdByWord(searchWord);
|
|
|
// 保存搜索关键词历史记录
|
|
|
- if (null != recordId && recordId >0) {
|
|
|
+ if (null != recordId && recordId > 0) {
|
|
|
historyRecord.setId(recordId);
|
|
|
orderCommonMapper.updateSearchHistory(historyRecord);
|
|
|
} else {
|