新增 后管根据汇付会员id查询分账汇总数据 接口

This commit is contained in:
Lemon
2025-04-15 09:53:36 +08:00
parent cba009bcf2
commit dfb46e0fe0
6 changed files with 136 additions and 4 deletions

View File

@@ -836,4 +836,26 @@
station_id = #{dto.stationId,jdbcType=VARCHAR}
AND trade_date BETWEEN #{dto.startTime,jdbcType=VARCHAR} AND #{dto.endTime,jdbcType=VARCHAR}
</select>
<select id="getSplitListByAdapyMemberId" resultType="com.jsowell.pile.vo.web.SplitAggregateDataVO">
SELECT
t1.station_id AS stationId,
t2.station_name AS stationName,
count(t1.id) as orderCount,
sum(t1.electricity_split_amount) AS totalElectricitySplitAmount,
sum(t1.service_split_amount) AS totalServiceSplitAmount,
sum(t1.fee_amount) AS totalFeeAmount
FROM
order_split_record t1
JOIN pile_station_info t2 ON t1.station_id = t2.id
AND t1.del_flag = '0'
WHERE
t1.trade_date BETWEEN #{dto.startTime,jdbcType=VARCHAR}
AND #{dto.endTime,jdbcType=VARCHAR}
AND t1.adapay_member_id = #{dto.adapayMemberId,jdbcType=VARCHAR}
<if test="dto.stationId != null and dto.stationId != ''" >
and t1.station_id = #{dto.stationId,jdbcType=VARCHAR}
</if>
group by t1.station_id
</select>
</mapper>