修改联表查询表名
This commit is contained in:
parent
7f81ee073b
commit
ffd2916411
@ -99,7 +99,7 @@ class GoodsCommentLogic extends Logic
|
|||||||
|
|
||||||
$lists = GoodsComment::alias('gc')
|
$lists = GoodsComment::alias('gc')
|
||||||
->field('gc.id,gc.goods_comment,gc.create_time,gc.comment,u.avatar,u.nickname,g.name as goods_name,reply,spec_value_str')
|
->field('gc.id,gc.goods_comment,gc.create_time,gc.comment,u.avatar,u.nickname,g.name as goods_name,reply,spec_value_str')
|
||||||
->leftJoin('procurement u', 'u.id=gc.user_id')
|
->leftJoin('user u', 'u.id=gc.user_id')
|
||||||
->leftJoin('goods g', 'g.id=gc.goods_id')
|
->leftJoin('goods g', 'g.id=gc.goods_id')
|
||||||
->leftJoin('goods_item gi', 'gi.id=gc.item_id')
|
->leftJoin('goods_item gi', 'gi.id=gc.item_id')
|
||||||
->where($where)
|
->where($where)
|
||||||
@ -109,7 +109,7 @@ class GoodsCommentLogic extends Logic
|
|||||||
->toArray();
|
->toArray();
|
||||||
$count = GoodsComment::alias('gc')
|
$count = GoodsComment::alias('gc')
|
||||||
->field('gc.goods_comment,gc.create_time,gc.comment,u.avatar,u.nickname,g.name as goods_name')
|
->field('gc.goods_comment,gc.create_time,gc.comment,u.avatar,u.nickname,g.name as goods_name')
|
||||||
->leftJoin('procurement u', 'u.id=gc.user_id')
|
->leftJoin('user u', 'u.id=gc.user_id')
|
||||||
->leftJoin('goods g', 'g.id=gc.goods_id')
|
->leftJoin('goods g', 'g.id=gc.goods_id')
|
||||||
->where($where)
|
->where($where)
|
||||||
->count();
|
->count();
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user