2018-05-14 23:54

如果按照汇总表的方式体现,那么controller的查询方式就有问题;如果你只是想表示某个区间值,那么汇总表就没有意义;所以你到底是要按年月查还是按照日期区间查?

2018-05-04 23:33

getPara('year') getPara('month') 传参给controller不就可以了么

2018-05-04 23:22

另一个解决方法: select concat(year(date),'年',month(date),'日') as date_scope ,city,sum(money) from mxb where year(date)='2018' and month(date)='03' group by city;

2018-05-04 19:25

select year(date) as 'year',month(date) as 'month',city,sum(money) from mxb where year(date)='2018' and month(date)='03' group by city;