@@ -18,4 +18,11 @@ public interface IndicatorDataMapper extends BaseMapper<IndicatorData> {
@Select("select LAST(address)address,LAST(gateway_id)gatewayId,LAST(data_type)dataType,LAST(equipment_index_name)equipmentIndexName,LAST(`value_f`)valueF,LAST(equipment_number)equipmentNumber,LAST(created_time)createdTime from iot_data.indicator_data where equipment_index_name =#{equipmentIndexName} and gateway_id =#{gatewayId} and ts >=#{startTime} and ts <=#{endTime} group by address ")
@Select("select created_time createdTime, `value_f` as valueF from iot_data.indicator_data where equipment_index_name =#{equipmentIndexName} and ts >= #{startTime} and ts <= #{endTime} and gateway_id =#{gatewayId}")
@Select("select sum(valueFs) valueF,xtime from (select SUBSTR(`created_time`, 11,6) xtime, `value_f` as valueFs from iot_data.indicator_data where equipment_index_name =#{equipmentIndexName} and ts >= #{startTime} and ts <= #{endTime} and gateway_id in (#{gatewayId})) group by xtime order by xtime ")