作者 jiawen
1 个管道 的构建 通过 耗费 0 秒

名片详情测试2

... ... @@ -141,7 +141,9 @@ class CardController extends RestBaseController
->join('user u','c.user_id=u.id')
->where(['c.id' => $data['id']])
->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')
->fetchSql()
->find();
$this->success('获取成功',$result);
//校验该用户是否 已对此名片点赞
$check = Db::name('like_log')->where(['user_id' => $this->userId,'topic_id' => $data['id']])->field('id')->find();
if ($check) {
... ... @@ -149,7 +151,7 @@ class CardController extends RestBaseController
} else {
$result['is_like'] = 0;
}
$this->success('获取成功',$result);
//添加该名片的被浏览记录 名片入口
Db::startTrans();
$is_exist = Db::name('browse_log')
... ...