记录,防止遗忘!sql如下:
SELECT IFNULL((SELECT sum(EO_using_value) FROM cq_energy_other as eo WHERE eo.EO_type = #{energyType} and DATE_FORMAT(EO_alt,'%Y-%m-%d') = curdate()),0) as vals;
记录,防止遗忘!sql如下:
SELECT IFNULL((SELECT sum(EO_using_value) FROM cq_energy_other as eo WHERE eo.EO_type = #{energyType} and DATE_FORMAT(EO_alt,'%Y-%m-%d') = curdate()),0) as vals;