渠道码分类下有渠道码,无法删除

This commit is contained in:
evoxwht 2023-03-24 10:58:12 +08:00
parent 1dd4da9a78
commit abb3b17a51

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