...
|
...
|
@@ -16,14 +16,13 @@ import com.yohoufo.common.cache.CacheClient; |
|
|
import com.yohoufo.common.exception.GatewayException;
|
|
|
import com.yohoufo.common.helper.ImageUrlAssist;
|
|
|
import com.yohoufo.common.utils.MobileHelper;
|
|
|
import com.yohoufo.dal.order.BuyerOrderGoodsMapper;
|
|
|
import com.yohoufo.dal.order.BuyerOrderMapper;
|
|
|
import com.yohoufo.dal.order.QiniuLiveRecordMapper;
|
|
|
import com.yohoufo.dal.order.SellerOrderGoodsMapper;
|
|
|
|
|
|
import com.yohoufo.dal.order.*;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrder;
|
|
|
import com.yohoufo.dal.order.model.BuyerOrderGoods;
|
|
|
import com.yohoufo.dal.order.model.QiniuLiveRecord;
|
|
|
import com.yohoufo.dal.order.model.SellerOrderGoods;
|
|
|
import com.yohoufo.dal.order.model.OrdersPay;
|
|
|
import com.yohoufo.dal.product.IdentifyRecordsMapper;
|
|
|
import com.yohoufo.dal.product.IdentifyRelationMapper;
|
|
|
import com.yohoufo.dal.product.ProductChainMapper;
|
...
|
...
|
@@ -42,7 +41,7 @@ import org.springframework.stereotype.Service; |
|
|
|
|
|
import java.text.SimpleDateFormat;
|
|
|
import java.util.*;
|
|
|
import java.util.stream.Collectors;
|
|
|
|
|
|
|
|
|
@Service
|
|
|
public class ProductIdentifyServiceImpl implements ProductIdentifyService{
|
...
|
...
|
@@ -71,6 +70,9 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ |
|
|
private ProductChainMapper productChainMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private OrdersPayMapper ordersPayMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private ServiceCaller serviceCaller;
|
|
|
|
|
|
@Autowired
|
...
|
...
|
@@ -150,9 +152,8 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ |
|
|
result.setTrackList(trackRespList);
|
|
|
//1)鉴定结果
|
|
|
IdentifyTrackResp identifyTrack = new IdentifyTrackResp();
|
|
|
timeStr = formatDate(authTime, "yyyy.MM.dd HH:mm:ss");
|
|
|
identifyTrack.setTime(authTime);
|
|
|
identifyTrack.setTimeStr(timeStr);
|
|
|
identifyTrack.setTimeStr(formatDate(authTime, "yyyy.MM.dd HH:mm:ss"));
|
|
|
identifyTrack.setContent( authGroup + "鉴定结果为\"真\"");
|
|
|
//鉴定中心,默认的展示头像
|
|
|
String auth_inco = configReader.getString("ufo.product.defaultAuthHeadIcon", "http://head.static.yhbimg.com/yhb-head/2018/12/24/10/01187dd372e153ea9c062cd0604cd169b2.jpg?imageView2/{mode}/w/{width}/h/{height}");
|
...
|
...
|
@@ -160,6 +161,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ |
|
|
trackRespList.add(identifyTrack);
|
|
|
|
|
|
//订单轨迹
|
|
|
//购买者的基本信息
|
|
|
UserInfoRspBO buyerInfo = userInfoRspBOAsyncFuture.get();
|
|
|
UicResponse uicResponse = uicResponseAsyncFuture.get();
|
|
|
JSONObject jsonObject = (JSONObject) uicResponse.getData();
|
...
|
...
|
@@ -168,8 +170,8 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ |
|
|
if(StringUtils.isBlank(mobile)){//不存在手机号码 --则用昵称取代
|
|
|
mobileMask = buyerInfo.getNickName();
|
|
|
}
|
|
|
String headIcon = buyerInfo.getHeadIco();//头像
|
|
|
//订单更新时间
|
|
|
String headIcon = buyerInfo.getHeadIco();
|
|
|
//2)订单完成
|
|
|
if(orderStatus != null && orderStatus.intValue() == 5){//订单已完成
|
|
|
IdentifyTrackResp updateOrderTrack = new IdentifyTrackResp();
|
|
|
timeStr = formatDate(buyerOrder.getUpdateTime(), "yyyy.MM.dd HH:mm:ss");
|
...
|
...
|
@@ -180,13 +182,15 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ |
|
|
updateOrderTrack.setMobile(mobileMask);
|
|
|
trackRespList.add(updateOrderTrack);
|
|
|
}
|
|
|
//创建订单的时间
|
|
|
//3)下单购买
|
|
|
IdentifyTrackResp createOrderTrack = new IdentifyTrackResp();
|
|
|
createOrderTrack.setUid(buyerUid);
|
|
|
createOrderTrack.setHeadIcon(headIcon);
|
|
|
createOrderTrack.setContent("用户"+ mobileMask + "在UFO平台下单购买");
|
|
|
createOrderTrack.setTime(buyerOrder.getCreateTime());
|
|
|
timeStr = formatDate(buyerOrder.getCreateTime(),"yyyy.MM.dd HH:mm:ss");
|
|
|
//展示的是 用户支付的时间
|
|
|
OrdersPay ordersPay = ordersPayMapper.selectOrdersPay(orderCode, buyerUid);
|
|
|
createOrderTrack.setTime(ordersPay.getCreateTime());
|
|
|
timeStr = formatDate(ordersPay.getCreateTime(),"yyyy.MM.dd HH:mm:ss");
|
|
|
createOrderTrack.setTimeStr(timeStr);
|
|
|
createOrderTrack.setMobile(mobileMask);
|
|
|
trackRespList.add(createOrderTrack);
|
...
|
...
|
@@ -356,7 +360,7 @@ public class ProductIdentifyServiceImpl implements ProductIdentifyService{ |
|
|
|
|
|
private String formatDate(Integer time, String pattern) {
|
|
|
if(null == time ){
|
|
|
return null;
|
|
|
return "";
|
|
|
}
|
|
|
SimpleDateFormat dateFormat = new SimpleDateFormat(pattern);
|
|
|
return dateFormat.format(new Date((long) time * 1000));
|
...
|
...
|
|