|
|
@@ -640,15 +640,16 @@ public class CmsOrderController {
|
|
|
condition += String.format("gt.account_id not in (select account_id from work_order where sku_id = %s and account_id is not null)", skuId);
|
|
|
}
|
|
|
if (StrUtil.isNotEmpty(condition)) {
|
|
|
- Integer maxNum = sku.getNum();
|
|
|
- Integer extraNum = 5;
|
|
|
- //GPT 4人月付
|
|
|
- if (sku.getId() == 178l) {
|
|
|
- extraNum = 2;
|
|
|
- }
|
|
|
- maxNum += extraNum;
|
|
|
- condition += String.format(" and (available_parking_num = 0 or available_parking_num > (select count(*) from groups_relation gr where gr.groups_id = groups_trips.id and gr.user_id != 0 and gr.num < %s))", maxNum);
|
|
|
+ condition += " and ";
|
|
|
+ }
|
|
|
+ Integer maxNum = sku.getNum();
|
|
|
+ Integer extraNum = 5;
|
|
|
+ //GPT 4人月付
|
|
|
+ if (sku.getId() == 178l) {
|
|
|
+ extraNum = 2;
|
|
|
}
|
|
|
+ maxNum += extraNum;
|
|
|
+ condition += String.format("(available_parking_num = 0 or available_parking_num > (select count(*) from groups_relation gr where gr.groups_id = gt.id and gr.user_id != 0 and gr.num < %s))", maxNum);
|
|
|
if (StrUtil.isNotEmpty(condition)) {
|
|
|
builder.put("condition", condition);
|
|
|
}
|