记得上下班打卡 | git大法好,push需谨慎

Commit 6b8ae879 authored by 胡佳晨's avatar 胡佳晨

修改 sku价格接口 订单详情

parent 5693bca5
...@@ -39,6 +39,8 @@ public class GoblinStoreOrderListVo implements Cloneable { ...@@ -39,6 +39,8 @@ public class GoblinStoreOrderListVo implements Cloneable {
private String payTime; private String payTime;
@ApiModelProperty(value = " 物流公司姓名") @ApiModelProperty(value = " 物流公司姓名")
private String logisticsCompany; private String logisticsCompany;
@ApiModelProperty(value = " 活动名称")
private String marketName;
@ApiModelProperty(value = " 物流相关") @ApiModelProperty(value = " 物流相关")
private List<GoblinMailVo> goblinMailVoList; private List<GoblinMailVo> goblinMailVoList;
//todo hujiachen 缺发货时间 //todo hujiachen 缺发货时间
......
...@@ -127,6 +127,13 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -127,6 +127,13 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
vo.setStatus(orderVo.getStatus()); vo.setStatus(orderVo.getStatus());
vo.setPayTime(orderVo.getPayTime()); vo.setPayTime(orderVo.getPayTime());
vo.setPriceExpress(orderVo.getPriceExpress()); vo.setPriceExpress(orderVo.getPriceExpress());
if (orderVo.getMarketId() == null || orderVo.getMarketId().equals("")) {
vo.setMarketName("");
} else {
GoblinSelfMarketingVo marketingVo = redisUtils.getSelfMarket(orderVo.getMarketId());
vo.setMarketName(marketingVo.getName());
}
vo.setGoblinMailVoList(redisUtils.getGoblinMail(orderId)); vo.setGoblinMailVoList(redisUtils.getGoblinMail(orderId));
List<GoblinStoreOrderListSkuVo> orderListSkuVos = ObjectUtil.getGoblinStoreOrderListSkuVoArrayList(); List<GoblinStoreOrderListSkuVo> orderListSkuVos = ObjectUtil.getGoblinStoreOrderListSkuVoArrayList();
for (String skuId : orderVo.getOrderSkuVoIds()) { for (String skuId : orderVo.getOrderSkuVoIds()) {
...@@ -323,7 +330,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService { ...@@ -323,7 +330,7 @@ public class GoblinStoreOrderServiceImpl implements IGoblinStoreOrderService {
return ResponseDto.failure("不存在"); return ResponseDto.failure("不存在");
} }
BigDecimal voucherPrice = orderSkuVo.getSkuPriceActual().subtract(price); BigDecimal voucherPrice = orderSkuVo.getSkuPriceActual().subtract(price);
orderSkuVo.setPriceModify(orderSkuVo.getPriceModify().add(price)); orderSkuVo.setPriceModify(orderSkuVo.getPriceModify() == null ? price : orderSkuVo.getPriceModify().add(price));
// orderSkuVo.setPriceVoucher(orderSkuVo.getPriceVoucher().add(voucherPrice)); // orderSkuVo.setPriceVoucher(orderSkuVo.getPriceVoucher().add(voucherPrice));
orderSkuVo.setSkuPriceActual(orderSkuVo.getSkuPriceActual().subtract(voucherPrice)); orderSkuVo.setSkuPriceActual(orderSkuVo.getSkuPriceActual().subtract(voucherPrice));
orderVo.setPriceTotal(orderVo.getPriceTotal().subtract(voucherPrice)); orderVo.setPriceTotal(orderVo.getPriceTotal().subtract(voucherPrice));
......
...@@ -398,6 +398,7 @@ public class GoblinMongoUtils { ...@@ -398,6 +398,7 @@ public class GoblinMongoUtils {
List<GoblinGoodsInfoVo> goblinGoodsInfoVos = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName()); List<GoblinGoodsInfoVo> goblinGoodsInfoVos = mongoTemplate.find(query, GoblinGoodsInfoVo.class, GoblinGoodsInfoVo.class.getSimpleName());
return CollectionUtils.isEmpty(goblinGoodsInfoVos) ? CollectionUtil.arrayListString() : goblinGoodsInfoVos.stream().map(GoblinGoodsInfoVo::getSpuNo).distinct().collect(Collectors.toList()); return CollectionUtils.isEmpty(goblinGoodsInfoVos) ? CollectionUtil.arrayListString() : goblinGoodsInfoVos.stream().map(GoblinGoodsInfoVo::getSpuNo).distinct().collect(Collectors.toList());
} }
public List<String> getMgtSpuIdsForMarketBySpuNos(List<String> spuNos, Object... shelvesStatus) { public List<String> getMgtSpuIdsForMarketBySpuNos(List<String> spuNos, Object... shelvesStatus) {
Query query = Query.query(Criteria.where("spuNo").in(spuNos.toArray()) Query query = Query.query(Criteria.where("spuNo").in(spuNos.toArray())
.and("marketId").exists(true).and("delFlg").is("0").and("shelvesStatus").in(shelvesStatus)); .and("marketId").exists(true).and("delFlg").is("0").and("shelvesStatus").in(shelvesStatus));
...@@ -927,6 +928,7 @@ public class GoblinMongoUtils { ...@@ -927,6 +928,7 @@ public class GoblinMongoUtils {
criteria = criteria.and("orderAttrVo.expressContacts").is(expressContacts); criteria = criteria.and("orderAttrVo.expressContacts").is(expressContacts);
} }
Query query = Query.query(criteria); Query query = Query.query(criteria);
query.with(Sort.by(Sort.Order.desc("createdAt")));
query.skip(skipCount).limit(size); query.skip(skipCount).limit(size);
query.fields().include("orderCode").include("createdAt").include("payType").include("status").include("orderSkuVoIds").include("orderId").include("priceActual").include("priceExpress") query.fields().include("orderCode").include("createdAt").include("payType").include("status").include("orderSkuVoIds").include("orderId").include("priceActual").include("priceExpress")
.include("orderAttrVo.expressContacts").include("orderAttrVo.expressAddressDetail").include("orderAttrVo.expressAddress").include("orderAttrVo.expressPhone"); .include("orderAttrVo.expressContacts").include("orderAttrVo.expressAddressDetail").include("orderAttrVo.expressAddress").include("orderAttrVo.expressPhone");
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment