大佬们 求助! 有没有 orm 写的很 6 的大佬!!!
救救萌新!
现有一条原生 sql。
select
a.date,sum(a.tag_count) as tag_count,a.tag_id,a.tag_name,b.user_id,b.user_name from (
(
select z.netflow_alias,count(1) as tag_count,
z.date,z.product_id,x.tag_id,x.tag_name from
(
SELECT netflow_alias,left(create_time,10) as date,product_id FROM weidian_operator.t_tj_order_detail_qingshe
where left(create_time,10)=DATE_SUB(curdate(),INTERVAL 1 DAY)
) z
left join
(
select q.tag_id,q.product_id,w.tag_name from
(SELECT tag_id,product_id FROM weidian_operator.t_product_tag ) q
left join
(select id,tag_name from weidian_operator.t_tag) w
on q.tag_id=
w.id ) x
on z.product_id=x.product_id
group by x.tag_id
) a
left join
(select netflow_alias,user_name,user_id from weidian_operator.t_tj_team_relation where user_id is not null) b
on a.netflow_alias=b.netflow_alias
)
where user_id is not null
group by
a.date,b.user_id;
那么请问 orm 怎么写。 哪位大佬肯帮帮我。呜呜呜
这是一个专为移动设备优化的页面(即为了让你能够在 Google 搜索结果里秒开这个页面),如果你希望参与 V2EX 社区的讨论,你可以继续到 V2EX 上打开本讨论主题的完整版本。
https://www.v2ex.com/t/583005
V2EX 是创意工作者们的社区,是一个分享自己正在做的有趣事物、交流想法,可以遇见新朋友甚至新机会的地方。
V2EX is a community of developers, designers and creative people.