|
|
@@ -102,8 +102,9 @@ public class UserInvoiceFrontController {
|
|
|
.in(UpgradeOrderDon::getUserId, userIdList)
|
|
|
.notIn(UpgradeOrderDon::getStatus, Constant.noOrderAllStatus));
|
|
|
if (upgradeOrders > 0) {
|
|
|
+ List<Long> goodsIds = upgradeOrderDonMapper.selectUpgradeDistinctGoodsId(userIdList);
|
|
|
//增值订单
|
|
|
- String upgrade_order_sql = "(select id,goods_id,sku_id,order_no,money,user_id,pay_time,shop_id,created_time,2 as type from upgrade_order_don where goods_id = 26 and money > 0 and status not in ('close','noPayment','refund') and type = 'ALI_PAY')";
|
|
|
+ String upgrade_order_sql = String.format("(select id,goods_id,sku_id,order_no,money,user_id,pay_time,shop_id,created_time,2 as type from upgrade_order_don where goods_id in (%s) and money > 0 and status not in ('close','noPayment','refund') and type = 'ALI_PAY')", goodsIds.stream().map(v -> v.toString()).collect(Collectors.joining(",")));
|
|
|
List<UserInvoiceChoseOrderViews> upgradeOrderList = beanSearcher.searchAll(UserInvoiceChoseOrderViews.class, builder.put("order", upgrade_order_sql).build());
|
|
|
if (CollUtil.isNotEmpty(upgradeOrderList)) {
|
|
|
list.addAll(upgradeOrderList);
|