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