Commit b48f8344 authored by clone's avatar clone

找铺

parent 0812d4d4
...@@ -24,10 +24,13 @@ class FindShop extends Basic ...@@ -24,10 +24,13 @@ class FindShop extends Basic
parent::__construct($request); parent::__construct($request);
} }
/** /**
* 新增取消修改找铺需求 * 新增取消修改找铺需求
* @return \think\Response * @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/ */
public function updateFindShop() public function updateFindShop()
{ {
...@@ -77,6 +80,11 @@ class FindShop extends Basic ...@@ -77,6 +80,11 @@ class FindShop extends Basic
$where_["id"] = $params["id"]; $where_["id"] = $params["id"];
$id = $findShopModel->updateFindShop($where_, $updateParams); $id = $findShopModel->updateFindShop($where_, $updateParams);
} else {//新增数据 } else {//新增数据
$user_id = $params["user_id"];
$result = $findShopModel->getFindShopList("id", ["user_id" => $user_id], 1, 1);
if(count($result) > 0){
return $this->response("101", "已存在找铺记录!");
}
$updateParams["create_time"] = date("Y-m-d H:i:s", time()); $updateParams["create_time"] = date("Y-m-d H:i:s", time());
$id = $findShopModel->addFindShop($updateParams); $id = $findShopModel->addFindShop($updateParams);
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment