diff --git a/crmeb/app/model/system/store/SystemStore.php b/crmeb/app/model/system/store/SystemStore.php index 649adf618..9fc53ab34 100644 --- a/crmeb/app/model/system/store/SystemStore.php +++ b/crmeb/app/model/system/store/SystemStore.php @@ -78,6 +78,4 @@ class SystemStore extends BaseModel $query->where('id|name|introduction|phone', 'LIKE', "%$value%"); } } - - } diff --git a/crmeb/app/services/order/StoreCartServices.php b/crmeb/app/services/order/StoreCartServices.php index ededd6887..d4efe3568 100644 --- a/crmeb/app/services/order/StoreCartServices.php +++ b/crmeb/app/services/order/StoreCartServices.php @@ -432,8 +432,10 @@ class StoreCartServices extends BaseServices */ public function setCartNum($uid, $productId, $num, $unique, $type) { - //检查限购 - $this->checkLimit($uid, $productId, $num, 0); + if ($type == 1) { + //检查限购 + $this->checkLimit($uid, $productId, $num, 0); + } /** @var StoreProductAttrValueServices $attrValueServices */ $attrValueServices = app()->make(StoreProductAttrValueServices::class); diff --git a/crmeb/app/services/order/StoreOrderInvoiceServices.php b/crmeb/app/services/order/StoreOrderInvoiceServices.php index 0ea780c78..3e76fc10a 100644 --- a/crmeb/app/services/order/StoreOrderInvoiceServices.php +++ b/crmeb/app/services/order/StoreOrderInvoiceServices.php @@ -155,7 +155,9 @@ class StoreOrderInvoiceServices extends BaseServices if (!$orderInvoice) { throw new ApiException(100026); } - $data['invoice_time'] = time(); + if ($data['is_invoice'] == 1) { + $data['invoice_time'] = time(); + } if (!$this->dao->update($id, $data, 'id')) { throw new ApiException(100015); } diff --git a/crmeb/app/services/wechat/WechatQrcodeCateServices.php b/crmeb/app/services/wechat/WechatQrcodeCateServices.php index ef46dabaa..306e7d47b 100644 --- a/crmeb/app/services/wechat/WechatQrcodeCateServices.php +++ b/crmeb/app/services/wechat/WechatQrcodeCateServices.php @@ -69,6 +69,8 @@ class WechatQrcodeCateServices extends BaseServices */ public function delCate($id = 0) { + $count = app()->make(WechatQrcodeServices::class)->count(['cate_id' => $id]); + if ($count) throw new AdminException(400454); if (!$id) throw new AdminException(100100); $res = $this->dao->update($id, ['is_del' => 1]); if (!$res) throw new AdminException(100008);