1.mysql累计: SET @csum := 0; SELECT 日期, 净利润, (@csum := @csum + 净利润) AS 累计利润 FROM daily_pnl_view; 2.mybatis xml中累加: