企业🤖AI智能体构建引擎,智能编排和调试,一键部署,支持私有化部署方案 广告
- * null 数据不会拼接 - group\_concat(ifNull([s.name](http://s.name/), '')) --- ~~~ modelDB4, err := dao2.BoardStock.As("a").Ctx(ctx). Fields("a.SecuCode"). Fields("GROUP_CONCAT(b.`Name` order by (case b.`Category` when 3 then 3 when 1 then 2 when 2 then 1 end) desc, b.BeginDate desc, b.InnerCode) as name"). Fields("GROUP_CONCAT(b.`Code` order by (case b.`Category` when 3 then 3 when 1 then 2 when 2 then 1 end) desc, b.BeginDate desc, b.Code) as inner_code"). InnerJoin("board_main b on a.InnerCode=b.InnerCode"). Where("a.State=1 and b.EndDate is NULL"). Group("SecuCode").All() ~~~