mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-06-16 13:19:57 +08:00
新增 查询停车优免信息列表接口
This commit is contained in:
@@ -15,6 +15,24 @@
|
||||
<result property="delFlag" column="del_flag" />
|
||||
</resultMap>
|
||||
|
||||
<resultMap type="com.jsowell.pile.vo.web.ParkingCouponRecordVO" id="ParkingCouponRecordVOResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="orderCode" column="order_code" />
|
||||
<result property="stationId" column="station_id" />
|
||||
<result property="stationName" column="station_name" />
|
||||
<result property="plateNumber" column="plate_number" />
|
||||
<result property="returnCode" column="return_code" />
|
||||
<result property="returnMsg" column="return_msg" />
|
||||
<result property="parkingPlatformId" column="parking_platform_id" />
|
||||
<result property="conditionType" column="condition_type" />
|
||||
<result property="conditionValue" column="condition_value" />
|
||||
<result property="discountType" column="discount_type" />
|
||||
<result property="discountValue" column="discount_value" />
|
||||
<result property="startTime" column="start_time" />
|
||||
<result property="endTime" column="end_time" />
|
||||
<result property="createTime" column="create_time" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectCarCouponRecordVo">
|
||||
select id, order_code, station_id, plate_number, return_code, return_msg, create_time, del_flag from car_coupon_record
|
||||
</sql>
|
||||
@@ -107,4 +125,50 @@
|
||||
t1.del_flag = '0'
|
||||
AND t2.member_id = #{memberId,jdbcType=VARCHAR}
|
||||
</select>
|
||||
|
||||
<!-- 分页查询停车优免记录(联表查询站点名称和优免信息) -->
|
||||
<select id="selectParkingCouponRecordList" parameterType="com.jsowell.pile.dto.ParkingCouponRecordQueryDTO" resultMap="ParkingCouponRecordVOResult">
|
||||
SELECT
|
||||
ccr.id,
|
||||
ccr.order_code,
|
||||
ccr.station_id,
|
||||
psi.station_name,
|
||||
ccr.plate_number,
|
||||
ccr.return_code,
|
||||
ccr.return_msg,
|
||||
cpd.parking_platform_id,
|
||||
cpd.condition_type,
|
||||
cpd.condition_value,
|
||||
cpd.discount_type,
|
||||
cpd.discount_value,
|
||||
cpd.start_time,
|
||||
cpd.end_time,
|
||||
DATE_FORMAT(ccr.create_time, '%Y-%m-%d %H:%i:%s') AS create_time
|
||||
FROM
|
||||
car_coupon_record ccr
|
||||
INNER JOIN pile_station_info psi ON ccr.station_id = psi.id
|
||||
LEFT JOIN charge_parking_discount cpd ON ccr.station_id = cpd.station_id AND cpd.del_flag = '0'
|
||||
<where>
|
||||
ccr.del_flag = '0'
|
||||
<if test="stationId != null">
|
||||
AND ccr.station_id = #{stationId}
|
||||
</if>
|
||||
<if test="stationIds != null and stationIds.size() > 0">
|
||||
AND ccr.station_id IN
|
||||
<foreach collection="stationIds" item="stationId" open="(" separator="," close=")">
|
||||
#{stationId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="plateNumber != null and plateNumber != ''">
|
||||
AND ccr.plate_number LIKE CONCAT('%', #{plateNumber}, '%')
|
||||
</if>
|
||||
<if test="orderCode != null and orderCode != ''">
|
||||
AND ccr.order_code = #{orderCode}
|
||||
</if>
|
||||
<if test="merchantId != null and merchantId != ''">
|
||||
AND psi.merchant_id = #{merchantId}
|
||||
</if>
|
||||
</where>
|
||||
ORDER BY ccr.create_time DESC
|
||||
</select>
|
||||
</mapper>
|
||||
Reference in New Issue
Block a user