实时95值计算功能、优化服务器收益功能

This commit is contained in:
gaoyutao
2025-10-29 18:35:44 +08:00
parent 8c439013e1
commit 15ecd5caaf
22 changed files with 1606 additions and 71 deletions
@@ -248,4 +248,30 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<update id="updateMachineTraffic" parameterType="EpsInitialTrafficData">
update ${tableName} set machine_flow=#{machineFlow} where client_id=#{clientId} and create_time=#{createTime}
</update>
<select id="getTrafficListByClientIds" resultType="EpsInitialTrafficData">
SELECT
sum(ifnull(out_speed,0)) AS outSpeed,
create_time AS createTime
FROM ${tableName}
<where>
<if test="businessId != '' and businessId != null">
and business_id = #{businessId}
</if>
<if test="startTime != null">
and create_time &gt;= #{startTime}
</if>
<if test="endTime != null">
and create_time &lt;= #{endTime}
</if>
<if test="clientIds != '' and clientIds != null">
and client_id in
<foreach collection="clientIds.split(',')" item="clientId" open="(" separator="," close=")">
#{clientId}
</foreach>
</if>
</where>
group by create_time
ORDER BY out_speed desc
</select>
</mapper>