Authored by mali

Merge branch 'master' into dev

... ... @@ -52,8 +52,8 @@ public abstract class AbsOrderDetailService implements IOrderDetailService{
abstract SellerOrderGoods getSellerOrderGoods(int skup);
abstract void assembleSoldPrdCompute(OrderDetailInfo orderDetailInfo, int uid, int skup);
abstract SoldPrdComputeBo getSoldPrdCompute(int uid, int skup);
/**
* 获取订单详情
... ... @@ -111,11 +111,6 @@ public abstract class AbsOrderDetailService implements IOrderDetailService{
&& StringUtils.isNotBlank(buyerOrderMeta.getMetaValue())){
userAddress = JSONObject.parseObject(buyerOrderMeta.getMetaValue(), AddressInfo.class);
}
SoldPrdComputeBo soldPrdComputeBo = null;
if (actor.equals(TabType.SELL)) {
soldPrdComputeBo = getSoldPrdCompute(uid, sellerOrderGoods.getId());
}
// 需要查询 时间点 and 物流定位
ExpressInfoDetail lastEID = null;
... ... @@ -132,7 +127,7 @@ public abstract class AbsOrderDetailService implements IOrderDetailService{
}
BuildNode buildNode = BuildNode.builder().buyerOrder(buyerOrder).orderStatus(orderStatus)
.buyerOrderGoods(buyerOrderGoods).sellerOrderGoods(sellerOrderGoods).userAddress(userAddress)
.lastEID(lastEID).soldPrdComputeResult(soldPrdComputeBo).build();
.lastEID(lastEID).build();
OrderDetailInfo orderDetailInfo = buildOrderDetail(buildNode, actor);
... ... @@ -191,17 +186,8 @@ public abstract class AbsOrderDetailService implements IOrderDetailService{
// 需要查询 时间点 and 物流定位
orderDetailInfo.setLastExpressInfo(buildNode.lastEID);
//
SoldPrdComputeBo computeBo = buildNode.soldPrdComputeResult;
if(Objects.nonNull(computeBo)){
orderDetailInfo.setEarnestMoneyStr(computeBo.getEarnestMoneyStr());
orderDetailInfo.setEarnestMoney(computeBo.getEarnestMoney());
orderDetailInfo.setBankTransferFee(computeBo.getBankTransferFee());
orderDetailInfo.setPlatformFee(computeBo.getPlatformFee());
orderDetailInfo.setIncome(computeBo.getIncome());
}
//只有卖家在查看买家的订单时才有
assembleSoldPrdCompute(orderDetailInfo, buyerOrder.getSellerUid(), buyerOrderGoods.getSkup());
return orderDetailInfo;
}
... ... @@ -236,7 +222,6 @@ public abstract class AbsOrderDetailService implements IOrderDetailService{
.detailDesc(orderStatus.getDetailDesc(tabType))
.build();
// 待付款时,剩余时间
if (orderStatus.getCode() == OrderStatus.WAITING_PAY.getCode()){
int leftTime = calLeftTime(buyerOrder.getCreateTime());
... ...
package com.yohoufo.order.service.impl;
import com.yohobuy.ufo.model.order.bo.SoldPrdComputeBo;
import com.yohoufo.dal.order.BuyerOrderGoodsMapper;
import com.yohoufo.dal.order.BuyerOrderMapper;
import com.yohoufo.dal.order.BuyerOrderMetaMapper;
... ... @@ -9,6 +8,7 @@ import com.yohoufo.dal.order.model.BuyerOrder;
import com.yohoufo.dal.order.model.BuyerOrderGoods;
import com.yohoufo.dal.order.model.BuyerOrderMeta;
import com.yohoufo.dal.order.model.SellerOrderGoods;
import com.yohoufo.order.model.response.OrderDetailInfo;
import com.yohoufo.order.service.IOrderDetailService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
... ... @@ -60,7 +60,9 @@ public class BuyerOrderDetailService extends AbsOrderDetailService implements IO
}
@Override
SoldPrdComputeBo getSoldPrdCompute(int uid, int skup) {
return null;
void assembleSoldPrdCompute(OrderDetailInfo orderDetailInfo, int uid, int skup) {
}
}
... ...
... ... @@ -707,6 +707,7 @@ public class PaymentServiceImpl implements IPaymentService {
record.setPayType(payType);// 1:支付宝; 2:微信
record.setTradeType(2);//1:保证金;2:货款;3:补偿款
record.setIncomeOutcome(2);// 1:用户收入; 2:用户支出
record.setAmount(amount);
try {
JSONObject metavalue = JSON.parseObject(meta.getMetaValue());
BigDecimal rate = metavalue.getJSONObject("serviceFeeRate").getBigDecimal("payChannelRate");
... ... @@ -715,7 +716,7 @@ public class PaymentServiceImpl implements IPaymentService {
logger.error("PayRecordErr计费信息不完整, uid is {}, skup is {}, err is {}", uid, skup, e.getMessage());
return;
}
record.setAmount(amount);
record.setSystemAmount(amount);// 有货收入
record.setTradeStatus(100);
record.setCreateTime((int) (System.currentTimeMillis() / 1000));
... ...
... ... @@ -5,12 +5,12 @@ import com.yoho.error.ServiceError;
import com.yoho.error.exception.ServiceException;
import com.yohobuy.ufo.model.order.bo.SoldPrdComputeBo;
import com.yohoufo.common.utils.DateUtil;
import com.yohoufo.common.utils.PriceFormater;
import com.yohoufo.dal.order.*;
import com.yohoufo.dal.order.model.*;
import com.yohoufo.order.common.*;
import com.yohoufo.order.common.OrderCodeType;
import com.yohoufo.order.common.Payment;
import com.yohoufo.order.common.SkupStatus;
import com.yohoufo.order.constants.MetaKey;
import com.yohoufo.order.constants.OrderConstant;
import com.yohoufo.order.convert.SellerOrderConvertor;
import com.yohoufo.order.model.AddressInfo;
import com.yohoufo.order.model.dto.SellerOrderComputeResult;
... ... @@ -58,6 +58,9 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
@Autowired
private SellerOrderMetaMapper somMapper;
private static List<SkupStatus> noNeedShowOrderCode = Arrays.asList(SkupStatus.CAN_NOT_SELL,SkupStatus.CAN_SELL,
SkupStatus.SELF_CANCEL_PAY, SkupStatus.TIMEOUT_CANCEL,
SkupStatus.SELLER_CANCEL_SELL, SkupStatus.YOHO_CANCEL_SELL);
@Override
... ... @@ -88,19 +91,18 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
Integer skupStatusCode = sellerOrderGoods.getStatus();
SkupStatus skupStatus = SkupStatus.getSkupStatus(skupStatusCode);
SoldPrdComputeBo computeBo = getSoldPrdCompute(uid, skup);
SellerOrderMeta addressMeta = somMapper.selectByMetaKey(uid, skup, MetaKey.BACK_2_SELLER_DELIVERY_ADDRESS);
AddressInfo addressInfo = JSONObject.parseObject(addressMeta.getMetaValue(), AddressInfo.class);
return buildOrderDetail(sellerOrder, skupStatus, sellerOrderGoods, computeBo, addressInfo);
return buildOrderDetail(sellerOrder, skupStatus, sellerOrderGoods, addressInfo);
}
return super.getOrderDetail(orderRequest);
}
SoldPrdComputeBo getSoldPrdCompute(int uid, int skup){
@Override
void assembleSoldPrdCompute(OrderDetailInfo orderDetailInfo, int uid, int skup){
SellerOrderMeta feeMeta = somMapper.selectByMetaKey(uid, skup, MetaKey.SELLER_FEE);
boolean metaIsPresent = Objects.nonNull(feeMeta);
SoldPrdComputeBo computeBo = null;
... ... @@ -108,7 +110,13 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
SellerOrderComputeResult computeResult = JSONObject.parseObject(feeMeta.getMetaValue(), SellerOrderComputeResult.class);
computeBo = SellerOrderConvertor.computeResult2SoldPrdComputeBo(computeResult);
}
return computeBo;
if(Objects.nonNull(computeBo)){
orderDetailInfo.setEarnestMoneyStr(computeBo.getEarnestMoneyStr());
orderDetailInfo.setEarnestMoney(computeBo.getEarnestMoney());
orderDetailInfo.setBankTransferFee(computeBo.getBankTransferFee());
orderDetailInfo.setPlatformFee(computeBo.getPlatformFee());
orderDetailInfo.setIncome(computeBo.getIncome());
}
}
/**
... ... @@ -165,6 +173,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
*/
private GoodsInfo getGoodsInfo(SellerOrderGoods sellerOrderGoods) {
GoodsInfo goodsInfo = new GoodsInfo();
goodsInfo.setSkup(sellerOrderGoods.getId());
goodsInfo.setProductName(sellerOrderGoods.getProductName());
goodsInfo.setColorName(sellerOrderGoods.getColorName());
goodsInfo.setSizeName(sellerOrderGoods.getSizeName());
... ... @@ -199,9 +208,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
return statusDetail;
}
private static List<SkupStatus> noNeedShowOrderCode = Arrays.asList(SkupStatus.CAN_NOT_SELL,SkupStatus.CAN_SELL,
SkupStatus.SELF_CANCEL_PAY, SkupStatus.TIMEOUT_CANCEL,
SkupStatus.SELLER_CANCEL_SELL, SkupStatus.YOHO_CANCEL_SELL);
private Long getOrderCode(SkupStatus skupStatus, SellerOrder order){
Long orderCode;
... ... @@ -214,8 +221,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
}
private OrderDetailInfo buildOrderDetail(SellerOrder order, SkupStatus skupStatus,
SellerOrderGoods sellerOrderGoods, SoldPrdComputeBo computeBo
, AddressInfo addressInfo
SellerOrderGoods sellerOrderGoods, AddressInfo addressInfo
) {
OrderDetailInfo orderDetailInfo = new OrderDetailInfo();
orderDetailInfo.setUid(order.getUid());
... ... @@ -224,13 +230,7 @@ public class SellerOrderDetailService extends AbsOrderDetailService implements I
orderDetailInfo.setSubmitOrderTimeStr(DateUtil.formatDate(order.getCreateTime(), DateUtil.yyyy_MM_dd_HH_mm_SS));
orderDetailInfo.setUserAddress(addressInfo);
//卖家
orderDetailInfo.setIncome(order.getIncome().toPlainString());
if(Objects.nonNull(computeBo)){
orderDetailInfo.setEarnestMoneyStr(computeBo.getEarnestMoneyStr());
orderDetailInfo.setEarnestMoney(computeBo.getEarnestMoney());
orderDetailInfo.setBankTransferFee(computeBo.getBankTransferFee());
orderDetailInfo.setPlatformFee(computeBo.getPlatformFee());
}
assembleSoldPrdCompute(orderDetailInfo, order.getUid(), sellerOrderGoods.getId());
OrderDetailInfo.StatusDetail statusDetail = getStatusDetail(order, skupStatus);
orderDetailInfo.setStatusDetail(statusDetail);
... ...
... ... @@ -95,6 +95,7 @@ public class TradeBillsService {
record.setPayType(payType);// 1:支付宝; 2:微信
record.setTradeType(2);//1:保证金;2:货款;3:补偿款
record.setIncomeOutcome(1);// 1:用户收入; 2:用户支出
record.setAmount(amount);
try {
JSONObject metavalue = JSON.parseObject(meta.getMetaValue());
BigDecimal rate = metavalue.getJSONObject("serviceFeeRate").getBigDecimal("payChannelRate");
... ... @@ -103,7 +104,6 @@ public class TradeBillsService {
logger.error("PayRecordErr计费信息不完整, uid is {}, skup is {}, err is {}", uid, skup, e.getMessage());
return;
}
record.setAmount(amount);
record.setSystemAmount(amount);// 有货收入
record.setTradeStatus(tradeStatus);//0:订单未完结;1:订单完结
record.setCreateTime((int) (System.currentTimeMillis() / 1000));
... ...
... ... @@ -39,8 +39,7 @@
<url-pattern>/html/h5Share/css/font/sf-pro-text-medium.svg</url-pattern>
<url-pattern>/html/h5Share/css/font/sf-pro-text-medium.ttf</url-pattern>
<url-pattern>/html/h5Share/css/font/sf-pro-text-medium.woff</url-pattern>
<url-pattern>/html/content.html</url-pattern>
<url-pattern>/html/index.html</url-pattern>
<url-pattern>/html/ios_ufo_shortcut.html</url-pattern>
</servlet-mapping>
<servlet>
<servlet-name>dispatcher</servlet-name>
... ...
<!DOCTYPE html>
<html>
<head>
<meta name="apple-mobile-web-app-capable" content="yes">
<meta name="apple-mobile-web-app-status-bar-style" content="default">
<meta content="text/html charset=UTF-8" http-equiv="Content-Type" />
<meta name="viewport" content="width=device-width,initial-scale=1.0,user-scalable=no" />
<link rel="apple-touch-icon" href="YHIconImageData">
<link rel="apple-touch-startup-image" href="YHLaunchImageData">
<title>YHAppTitle</title>
</head>
<body>
<a href="YHAppScheme" id="qbt" style="display:none"></a>
<div style="margin-left: 15px; margin-top: 150px"> <span id="msg"></span></div>
</body>
<script>
if (window.navigator.standalone == true)
{
var lnk = document.getElementById("qbt").click();
}
else
{
document.getElementById("msg").innerHTML='<div style="font-size:14px color=#292f33">点击页面下方的 '+
'<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAAB4AAAAeCAYAAAA7MK6iAAAAAXNSR0IArs4c6QAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAABxpRE9UAAAAAgAAAAAAAAAPAAAAKAAAAA8AAAAPAAAAfhfbgPsAAABKSURBVEgNYmCY/J+BTHwYqA+EydNPtsbJ//8D9YLwqMXEhQDZQTUa1KQmstGgJiEERvMxcfkXlghJCFp0g4duUINqGJjr6UUfBgAAAP//MQoR /gAAAEJJREFUY2CY/P8wEP+nMz7CALSQXAxzLHn6Ry0mIQRGg5q0REZC0KIbPBrU6CGCnz8a1CSEwMhLXKBa7QgJIYSS2AAC/fdCABZhBAAAAABJRU5ErkJggg==" width="15" height="15"/> 或 ' +
'<img src="data:image/png;base64,iVBORw0KGgoAAAANSUhEUgAAABgAAAAgCAYAAAAIXrg4AAAAAXNSR0IArs4c6QAAAAlwSFlzAAAWJQAAFiUBSVIk8AAAABxpRE9UAAAAAgAAAAAAAAAQAAAAKAAAABAAAAAQAAABC261E1IAAADXSURBVEgN3JIxCgIxFERzAWsbK2+hh9HOWntvsb3eSVBYC8F7iHGeJhC/YZN1wcJi2J9kZl4C61zjXQ9t5UX1mR7mtbw+aFOdqzSu5LuHciDM7JVfUmFahsKDvtcgZiALqRtSNDT+Jk8rjSWKEfNZ4mww4KKSSSiKAErZ42wwYJqUpACK07M8KAnnDe83tIBy5heAmSAnKf7j9pveMvcC649rOueEjx3lmL8FkG0J8z+z2EkjKS20c+4F1kPHXqLzWfYayuUU1QDwAfkA2Jvk1rUAsn8CeAAAAP//E744IQAAAHFJREFUY2CY/P8/FDMAaUL4ElANCBNSB5KHmAtnEKdp6FtATNDA1JAVRDDNxNCjFhBMqqNBNAiDiJfIMoaYPCAAL4KAjH9QzlwgDZIgxgB8akBmzIOa+Q+k8BqUA0lWsFKQOvQ1kAVWQHydBpaAzLQCAG7Afaa31ddjAAAAAElFTkSuQmCC" width="12" height="16">' +
' 按钮,在弹出的菜单中选择[添加至主屏幕],即可将选定的功能添加到主屏幕作为快捷方式。</div>';
}
</script>
</html>
<!DOCTYPE html>
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
<meta http-equiv="refresh" content="YHDataURISchemeContent">
<title>YHAppTitle</title>
</head>
<body>
IndexHtml
</body>
</html>
This diff could not be displayed because it is too large.