并充计算订单耗电量

This commit is contained in:
Guoqs
2024-11-07 15:44:43 +08:00
parent 23ae7ecab3
commit 53a07aae78
2 changed files with 20 additions and 0 deletions

View File

@@ -16,4 +16,7 @@ public interface PileMsgRecordMapper {
* @return
*/
List<PileMsgRecord> getPileFeedList(@Param("pileSn") String pileSn);
List<PileMsgRecord> getPileFeedListV2(@Param("pileSn") String pileSn, @Param("frameType") String frameType,
@Param("startTime") String startTime, @Param("endTime") String endTime);
}

View File

@@ -128,4 +128,21 @@
where pile_sn = #{pileSn,jdbcType=VARCHAR}
order by create_time desc
</select>
<select id="getPileFeedListV2" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from pile_msg_record
where pile_sn = #{pileSn,jdbcType=VARCHAR}
<if test="frameType != null and frameType != ''">
and frame_type = #{frameType,jdbcType=VARCHAR}
</if>
<if test="startTime != null and startTime != ''">
and create_time &gt;= #{startTime,jdbcType=TIMESTAMP}
</if>
<if test="endTime != null and endTime != ''">
and create_time &lt;= #{endTime,jdbcType=TIMESTAMP}
</if>
order by create_time desc
</select>
</mapper>