mybatis-plus求和sum

	//总收益
	Order order =new Order();
    QueryWrapper queryWrapper = new QueryWrapper();
    queryWrapper.select("ifnull(sum(amount_total),0) as sumAll");     
    Order ord= orderService.getOne(queryWrapper);
    //取值
    ord.getSumAll()

你可能感兴趣的:(MyBatis/Plus)