...
|
...
|
@@ -14,6 +14,8 @@ import java.util.stream.Collectors; |
|
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
import com.yoho.order.dal.*;
|
|
|
import com.yoho.order.model.*;
|
|
|
import com.yoho.core.dal.datasource.annotation.Database;
|
|
|
import org.apache.commons.collections.CollectionUtils;
|
|
|
import org.apache.commons.lang3.StringUtils;
|
...
|
...
|
@@ -38,41 +40,6 @@ import com.yoho.core.redis.cluster.operations.nosync.YHValueOperations; |
|
|
import com.yoho.core.redis.cluster.operations.serializer.RedisKeyBuilder;
|
|
|
import com.yoho.core.rest.client.ServiceCaller;
|
|
|
import com.yoho.error.exception.ServiceException;
|
|
|
import com.yoho.order.dal.AppraiseAddressMapper;
|
|
|
import com.yoho.order.dal.AreaMapper;
|
|
|
import com.yoho.order.dal.BuyerOrderGoodsMapper;
|
|
|
import com.yoho.order.dal.BuyerOrderMapper;
|
|
|
import com.yoho.order.dal.BuyerOrderMetaMapper;
|
|
|
import com.yoho.order.dal.ExpressCompanyMapper;
|
|
|
import com.yoho.order.dal.ExpressInfoMapper;
|
|
|
import com.yoho.order.dal.ExpressRecordMapper;
|
|
|
import com.yoho.order.dal.OrderOperateRecordMapper;
|
|
|
import com.yoho.order.dal.OrdersPayMapper;
|
|
|
import com.yoho.order.dal.QiniuLiveRecordMapper;
|
|
|
import com.yoho.order.dal.QualityCheckMapper;
|
|
|
import com.yoho.order.dal.SellerOrderGoodsMapper;
|
|
|
import com.yoho.order.dal.SellerOrderMapper;
|
|
|
import com.yoho.order.dal.SellerOrderMetaMapper;
|
|
|
import com.yoho.order.dal.SignForPackageMapper;
|
|
|
import com.yoho.order.model.AppraiseAddress;
|
|
|
import com.yoho.order.model.Area;
|
|
|
import com.yoho.order.model.BuyerOrder;
|
|
|
import com.yoho.order.model.BuyerOrderFeedback;
|
|
|
import com.yoho.order.model.BuyerOrderGoods;
|
|
|
import com.yoho.order.model.BuyerOrderMeta;
|
|
|
import com.yoho.order.model.BuyerOrderReq;
|
|
|
import com.yoho.order.model.ExpressCompany;
|
|
|
import com.yoho.order.model.ExpressInfo;
|
|
|
import com.yoho.order.model.ExpressRecord;
|
|
|
import com.yoho.order.model.OrderOperateRecord;
|
|
|
import com.yoho.order.model.OrdersPay;
|
|
|
import com.yoho.order.model.QiniuLiveRecord;
|
|
|
import com.yoho.order.model.QualityCheck;
|
|
|
import com.yoho.order.model.QualityCheckResp;
|
|
|
import com.yoho.order.model.SellerOrder;
|
|
|
import com.yoho.order.model.SellerOrderGoods;
|
|
|
import com.yoho.order.model.SellerOrderMeta;
|
|
|
import com.yoho.order.model.SignForPackage;
|
|
|
import com.yoho.service.model.order.request.OrderRequest;
|
|
|
import com.yoho.ufo.constants.PlatformConstant;
|
|
|
import com.yoho.ufo.constants.RedisKeyConstants;
|
...
|
...
|
@@ -165,6 +132,9 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
@Autowired
|
|
|
private QualityCheckMapper qualityCheckMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private StoredSellerMapper storedSellerMapper;
|
|
|
|
|
|
@Autowired
|
|
|
private BuyerOrderFeedbackService buyerOrderFeedbackService;
|
|
|
|
...
|
...
|
@@ -411,7 +381,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
|
|
|
public PageResponseBO<BuyerOrderResp> queryOrderList(BuyerOrderReq req) {
|
|
|
buildParam(req);
|
|
|
|
|
|
|
|
|
int total = buyerOrderMapper.selectTotalByCondition(req);
|
|
|
if(total == 0) {
|
|
|
return null;
|
...
|
...
|
@@ -1506,7 +1476,6 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
resp.setStatusStr(Constant.convertOrderStatusStr(buyerOrder.getStatus()));
|
|
|
resp.setPayStatus("未支付");//支付状态
|
|
|
resp.setChannel(Objects.equals(buyerOrder.getAttributes(), 2) ? 2 : 1); //1,线上订单; 2,门店订单
|
|
|
|
|
|
resp.setCreateTimeStr(DateUtil.int2DateStr(buyerOrder.getCreateTime(), "yyyy-MM-dd HH:mm:ss"));
|
|
|
resp.setBuyerUid(buyerOrder.getUid());
|
|
|
|
...
|
...
|
@@ -1586,7 +1555,17 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
resp.setShipFee(String.format("%.2f", buyerOrder.getShipFee().doubleValue()));
|
|
|
resp.setAmount(String.format("%.2f", buyerOrder.getAmount().doubleValue()));
|
|
|
resp.setCouponCutAmount(goods.getCouponCutAmount().compareTo(BigDecimal.valueOf(0))==0 ? "-" : goods.getCouponCutAmount().toString());
|
|
|
|
|
|
resp.setStorageId(sellerGoods.getStorageId());
|
|
|
resp.setProductId(sellerGoods.getProductId());
|
|
|
|
|
|
//查询商品的货号
|
|
|
Product product = productMapper.selectByPrimaryKey(sellerGoods.getProductId());
|
|
|
resp.setProductCode((null != product && StringUtils.isNotEmpty(product.getProductCode()))? product.getProductCode() : "");
|
|
|
|
|
|
//查询卖家身份,超级入驻,普通入驻,普通卖家
|
|
|
StoredSeller storedSeller = storedSellerMapper.selectUid(sellerGoods.getUid());
|
|
|
resp.setStoreSellerEntryType((null != storedSeller && null != storedSeller.getEntryType())? storedSeller.getEntryType() : 0);
|
|
|
|
|
|
resp.setPlatformReceiveGoodsAddress(appraiseAddressMapper.selectAddressByType(sellerGoods.getDepotNo()));
|
|
|
|
|
|
//买家收货时间
|
...
|
...
|
@@ -2354,6 +2333,7 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
case 4: return "android";
|
|
|
case 5: return "ipad";
|
|
|
case 6: return "h5";
|
|
|
case 7: return "miniapp";
|
|
|
default: return "";
|
|
|
}
|
|
|
}
|
...
|
...
|
@@ -2561,6 +2541,10 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
}
|
|
|
}
|
|
|
|
|
|
if(null != req.getAttributes() && 0 != req.getAttributes()){
|
|
|
req.setAttributesList(Arrays.asList(req.getAttributes()));
|
|
|
}
|
|
|
|
|
|
if(StringUtils.isNotEmpty(req.getMobile())) {
|
|
|
Integer uid = getUidByMobile(req.getMobile());
|
|
|
if(null != uid) {
|
...
|
...
|
@@ -2583,6 +2567,18 @@ public class BuyerOrderServiceImpl implements IBuyerOrderService { |
|
|
req.setSellerUid(uid);
|
|
|
}
|
|
|
}
|
|
|
|
|
|
if(null != req.getBuyerStartTime() && "NaN".equals(req.getBuyerStartTime())){
|
|
|
req.setBuyerStartTime(null);
|
|
|
}else if(StringUtils.isNotEmpty(req.getBuyerStartTime())){
|
|
|
req.setBuyerStartTime(req.getBuyerStartTime().substring(0, 10));
|
|
|
}
|
|
|
|
|
|
if(null != req.getBuyerEndTime() && "NaN".equals(req.getBuyerEndTime())){
|
|
|
req.setBuyerEndTime(null);
|
|
|
}else if(StringUtils.isNotEmpty(req.getBuyerEndTime())){
|
|
|
req.setBuyerEndTime(req.getBuyerEndTime().substring(0, 10));
|
|
|
}
|
|
|
|
|
|
}
|
|
|
|
...
|
...
|
|