cancel-owner-create-order-limit

This commit is contained in:
lccsw
2023-01-29 10:33:04 +08:00
parent 961b57090d
commit 1544e239bc
+20 -20
View File
@@ -115,14 +115,14 @@ class CusorderV2 extends Wxapp
throw new Exception('参数错误', ERR_PARAMS_ERROR);
}
//同个品牌一个身份证只能下一单
$where = [
'brand_id' => $series_row['brand_id'],
"JSON_EXTRACT(info_json,'$.c_owner_cardid')='{$owner_cardid}'" => null,
'status in (0,1)' => null
];
if ($this->orders_model->count($where)) {
throw new Exception('一个客户只能享受一次国补,请联系管理员', ERR_PARAMS_ERROR);
}
// $where = [
// 'brand_id' => $series_row['brand_id'],
// "JSON_EXTRACT(info_json,'$.c_owner_cardid')='{$owner_cardid}'" => null,
// 'status in (0,1)' => null
// ];
// if ($this->orders_model->count($where)) {
// throw new Exception('一个客户只能享受一次国补,请联系管理员', ERR_PARAMS_ERROR);
// }
}
if ($deposit < 1000) {
throw new Exception('定金不得少于1000', ERR_PARAMS_ERROR);
@@ -405,18 +405,18 @@ class CusorderV2 extends Wxapp
}
}
if (!$main_type) {//个人
//同个品牌一个身份证只能下一单
$where = [
'brand_id' => $series_row['brand_id'],
"JSON_EXTRACT(info_json,'$.c_owner_cardid')='{$info_json['c_owner_cardid']}'" => null,
'status in (0,1)' => null,
'id!=' => $id,
];
if ($this->orders_model->count($where)) {
throw new Exception('一个客户只能享受一次国补,请联系管理员', ERR_PARAMS_ERROR);
}
}
// if (!$main_type) {//个人
// //同个品牌一个身份证只能下一单
// $where = [
// 'brand_id' => $series_row['brand_id'],
// "JSON_EXTRACT(info_json,'$.c_owner_cardid')='{$info_json['c_owner_cardid']}'" => null,
// 'status in (0,1)' => null,
// 'id!=' => $id,
// ];
// if ($this->orders_model->count($where)) {
// throw new Exception('一个客户只能享受一次国补,请联系管理员', ERR_PARAMS_ERROR);
// }
// }
//东风品牌,门店类型=品牌店or合伙店,交车时长-10
//if($series_row['brand_id']==1 && $business_row['delivery_day']>10 && in_array($biz['type'],[1,2])){
// $business_row['delivery_day'] -= 10;