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

This commit is contained in:
From-wh 2023-03-24 11:03:10 +08:00
commit 23706836bc
4 changed files with 9 additions and 5 deletions

View File

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

View File

@ -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);

View File

@ -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);
}

View File

@ -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);