dao.func2 计算总和 没有匹配的数据返回null ,怎么写可以返回0???
自定义语句可以这么写 COALESCE(SUM(shopprice),0)
dao.func2("b_book", "SUM", "shopprice", Cnd.wrap("storename = '"+ storename +"' AND status = 0"))
dao.func2 计算总和 没有匹配的数据返回null ,怎么写可以返回0???
自定义语句可以这么写 COALESCE(SUM(shopprice),0)
dao.func2("b_book", "SUM", "shopprice", Cnd.wrap("storename = '"+ storename +"' AND status = 0"))