String hql = "select new net.shopnc.b2b2c.vo.goods.GoodsVo(gc, sum(g.goodsStorage)) from GoodsCommon gc, Goods g where gc.goodsId = g.id";
sql语句中把查询到的对象封装到另一个对象中
最新推荐文章于 2022-01-12 16:51:39 发布
String hql = "select new net.shopnc.b2b2c.vo.goods.GoodsVo(gc, sum(g.goodsStorage)) from GoodsCommon gc, Goods g where gc.goodsId = g.id";