入驻申请备注功能优化完成

This commit is contained in:
liuxiaoquan 2023-03-14 10:01:02 +08:00
parent 9cb5a052b9
commit 71498e3845
2 changed files with 9 additions and 2 deletions

View File

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

View File

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