Browse Source

Merge branch 'v4.7.0dev' of https://gitee.com/ZhongBangKeJi/CRMEB into v4.7.0dev

From-wh 2 năm trước cách đây
mục cha
commit
23706836bc

+ 0 - 2
crmeb/app/model/system/store/SystemStore.php

@@ -78,6 +78,4 @@ class SystemStore extends BaseModel
             $query->where('id|name|introduction|phone', 'LIKE', "%$value%");
         }
     }
-
-
 }

+ 4 - 2
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);

+ 3 - 1
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);
         }

+ 2 - 0
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);