From 71498e3845faedee1834a490ab8c83d8d4158f9d Mon Sep 17 00:00:00 2001 From: liuxiaoquan Date: Tue, 14 Mar 2023 10:01:02 +0800 Subject: [PATCH] =?UTF-8?q?=E5=85=A5=E9=A9=BB=E7=94=B3=E8=AF=B7=E5=A4=87?= =?UTF-8?q?=E6=B3=A8=E5=8A=9F=E8=83=BD=E4=BC=98=E5=8C=96=E5=AE=8C=E6=88=90?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../merchant/system/merchant/MerchantIntention.php | 5 ++++- .../model/merchant/system/merchant/MerchantIntention.php | 6 +++++- 2 files changed, 9 insertions(+), 2 deletions(-) diff --git a/app/admin/controller/merchant/system/merchant/MerchantIntention.php b/app/admin/controller/merchant/system/merchant/MerchantIntention.php index ff98ef1..32991e5 100644 --- a/app/admin/controller/merchant/system/merchant/MerchantIntention.php +++ b/app/admin/controller/merchant/system/merchant/MerchantIntention.php @@ -106,8 +106,11 @@ class MerchantIntention extends BaseController public function MarkForm() { $id = get_params('id'); - View::assign('id', $id); + if (!$this->intention->getWhereCount(['mer_intention_id' => $id, 'is_del' => 0])) + return to_assign(1, '数据不存在'); + + View::assign('id', $id); return View($this->path['mark']); } diff --git a/app/common/model/merchant/system/merchant/MerchantIntention.php b/app/common/model/merchant/system/merchant/MerchantIntention.php index 2660259..dca6c65 100644 --- a/app/common/model/merchant/system/merchant/MerchantIntention.php +++ b/app/common/model/merchant/system/merchant/MerchantIntention.php @@ -23,6 +23,7 @@ class MerchantIntention extends Model { protected $connection = 'shop'; protected $table = 'eb_merchant_intention'; + protected $pk = 'mer_intention_id'; protected function merchantCategory() { @@ -100,9 +101,12 @@ class MerchantIntention extends Model + /** + * 更新申请表数据 + */ public function Edit($id, $data) { - $rows = self::where('mer_intention_id',$id)->update($data); + $rows = self::where($this->getPk(), $id)->update($data); return $rows; }