|
|
@@ -61,6 +61,7 @@ public class GoodsDonController {
|
|
|
.orderBy(GoodsDon::getId).asc()
|
|
|
.build()
|
|
|
);
|
|
|
+ Integer virtual = 2000;
|
|
|
search.getDataList().forEach(goods->{
|
|
|
GoodsDonSku goodsDonSku = goodsDonSkuMapper.selectOne(Wrappers.lambdaQuery(GoodsDonSku.class).eq(GoodsDonSku::getGoodsId, goods.getId())
|
|
|
.eq(GoodsDonSku::getStatus, true)
|
|
|
@@ -68,6 +69,11 @@ public class GoodsDonController {
|
|
|
.last("limit 1")
|
|
|
.select(GoodsDonSku::getPrice));
|
|
|
goods.setPrice(goodsDonSku.getPrice());
|
|
|
+ if (goods.getType() != 3) {
|
|
|
+ goods.setSoldNum(virtual + orderDonMapper.selectCount(Wrappers.lambdaQuery(OrderDon.class)
|
|
|
+ .eq(OrderDon::getGoodsId, goods.getId())
|
|
|
+ .notIn(OrderDon::getStatus, Constant.noOrderStatus)));
|
|
|
+ }
|
|
|
});
|
|
|
return GatewayResponse.SUCCESS.newBuilder().toResult(search);
|
|
|
}
|