Commit 5ae42940 authored by zhuwei's avatar zhuwei

跟新时间

parent ff0b390f
......@@ -37,12 +37,7 @@ class UserLookShop extends Basic
}
$s_user_look_shop = new UserLookShopService();
$res = $s_user_look_shop->addUserLookShop($params['wx_union_id'],$params['house_id']);
if($res){
return $this->response("200", "request success", $res);
}else{
return $this->response("101", '失败');
}
return $this->response("200", "request success", $res);
}
......
......@@ -68,6 +68,8 @@ class UserLookShopService
$result = $tModel->getList($params, "a.id", 1, 1);
if (count($result) > 0) {
$time = date("Y-m-d H:i:s", time());
$tModel->updateLookShopLastTime($result[0]['id'],['update_time'=>$time]);
return false;
}
$arr = array(
......
......@@ -130,7 +130,6 @@ class LookShop extends Basic
$list["list"] = $result;
$list["total"] = $total;
return $this->response("200", "success", $list);
}
......
......@@ -127,4 +127,19 @@ class TLookShopUser extends Model
->where($condition)
->count();
}
/**
* 跟新时间
* @param $id
* @param $params
* @return int|string
*/
public function updateLookShopLastTime($id,$params)
{
$result = $this->db_
->where('id', $id)
->update($params);
return $result;
}
}
\ No newline at end of file
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