正在显示
1 个修改的文件
包含
3 行增加
和
1 行删除
@@ -141,7 +141,9 @@ class CardController extends RestBaseController | @@ -141,7 +141,9 @@ class CardController extends RestBaseController | ||
141 | ->join('user u','c.user_id=u.id') | 141 | ->join('user u','c.user_id=u.id') |
142 | ->where(['c.id' => $data['id']]) | 142 | ->where(['c.id' => $data['id']]) |
143 | ->field('c.id,c.user_id,c.name,c.position,c.tel,c.home_tel,c.email,c.wechat,c.company,u.avatar,c.address,c.description,c.pics,c.browse_num,c.like_num') | 143 | ->field('c.id,c.user_id,c.name,c.position,c.tel,c.home_tel,c.email,c.wechat,c.company,u.avatar,c.address,c.description,c.pics,c.browse_num,c.like_num') |
144 | + ->fetchSql() | ||
144 | ->find(); | 145 | ->find(); |
146 | + $this->success('获取成功',$result); | ||
145 | //校验该用户是否 已对此名片点赞 | 147 | //校验该用户是否 已对此名片点赞 |
146 | $check = Db::name('like_log')->where(['user_id' => $this->userId,'topic_id' => $data['id']])->field('id')->find(); | 148 | $check = Db::name('like_log')->where(['user_id' => $this->userId,'topic_id' => $data['id']])->field('id')->find(); |
147 | if ($check) { | 149 | if ($check) { |
@@ -149,7 +151,7 @@ class CardController extends RestBaseController | @@ -149,7 +151,7 @@ class CardController extends RestBaseController | ||
149 | } else { | 151 | } else { |
150 | $result['is_like'] = 0; | 152 | $result['is_like'] = 0; |
151 | } | 153 | } |
152 | - $this->success('获取成功',$result); | 154 | + |
153 | //添加该名片的被浏览记录 名片入口 | 155 | //添加该名片的被浏览记录 名片入口 |
154 | Db::startTrans(); | 156 | Db::startTrans(); |
155 | $is_exist = Db::name('browse_log') | 157 | $is_exist = Db::name('browse_log') |
-
请 注册 或 登录 后发表评论