| | |
| | | </where> |
| | | </select> |
| | | <select id="salesRanking" resultType="com.ruoyi.system.vo.SalesRankingVO"> |
| | | SELECT typeName,SUM(goodsSalePrice*goodsCount) AS salesVolume |
| | | from t_order_meal_goods |
| | | SELECT tomg.typeName,SUM(tomg.goodsSalePrice*goodsCount) AS salesVolume |
| | | from t_order_meal_goods tomg |
| | | left join t_order_meal tom on tomg.orderId=tom.id |
| | | <where> |
| | | <if test="ids != null and ids.size()>0"> |
| | | AND orderId IN |
| | | AND tomg.orderId IN |
| | | <foreach collection="ids" item="id" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | </if> |
| | | AND tom.isCover = 1 |
| | | </where> |
| | | GROUP BY typeName |
| | | GROUP BY tomg.typeName |
| | | </select> |
| | | |
| | | </mapper> |