修改 用户充值记录、刷卡记录、灌溉记录接口

This commit is contained in:
ALEI_ALEI
2024-12-20 17:23:44 +08:00
parent c925f0ea99
commit 27e86b32fa
15 changed files with 267 additions and 31 deletions

View File

@ -51,9 +51,49 @@
</where>
</select>
<select id="selectNgUserRechargeRecordsById" parameterType="Long" resultMap="NgUserRechargeRecordsResult">
<!--<select id="selectNgUserRechargeRecordsByCardNumber" parameterType="String" resultMap="NgUserRechargeRecordsResult">
<include refid="selectNgUserRechargeRecordsVo"/>
where user_id = #{userId}
where card_number = #{cardNumber}
</select>-->
<select id="selectNgUserRechargeRecordsByCardNumber" parameterType="String" resultMap="NgUserRechargeRecordsResult">
<include refid="selectNgUserRechargeRecordsVo"/>
<where>
<if test="cardNumber != null and cardNumber != ''"> card_number = #{cardNumber}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="type != null "> and type = #{type}</if>
<if test="amount != null "> and amount = #{amount}</if>
<if test="balance != null "> and balance = #{balance}</if>
<if test="rechargeTime != null "> and recharge_time = #{rechargeTime}</if>
<if test="rechargeCode != null and rechargeCode != ''"> and recharge_code = #{rechargeCode}</if>
<if test="status != null "> and status = #{status}</if>
<if test="serialNumber != null and serialNumber != ''"> and serial_number = #{serialNumber}</if>
<if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
<if test="projectId != null "> and project_id = #{projectId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
</where>
</select>
<select id="selectNgUserRechargeRecordsBySerialNumber" parameterType="NgUserRechargeRecords" resultMap="NgUserRechargeRecordsResult">
<include refid="selectNgUserRechargeRecordsVo"/>
<where>
<if test="serialNumber != null and serialNumber != ''"> serial_number = #{serialNumber}</if>
<if test="userId != null "> and user_id = #{userId}</if>
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
<if test="cardNumber != null and cardNumber != ''"> and card_number = #{cardNumber}</if>
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
<if test="type != null "> and type = #{type}</if>
<if test="amount != null "> and amount = #{amount}</if>
<if test="balance != null "> and balance = #{balance}</if>
<if test="rechargeTime != null "> and recharge_time = #{rechargeTime}</if>
<if test="rechargeCode != null and rechargeCode != ''"> and recharge_code = #{rechargeCode}</if>
<if test="status != null "> and status = #{status}</if>
<if test="deviceNumber != null and deviceNumber != ''"> and device_number = #{deviceNumber}</if>
<if test="projectId != null "> and project_id = #{projectId}</if>
<if test="deptId != null "> and dept_id = #{deptId}</if>
</where>
</select>
<insert id="insertNgUserRechargeRecords" parameterType="NgUserRechargeRecords" useGeneratedKeys="true" keyProperty="id">

View File

@ -74,7 +74,15 @@
<select id="selectUserConsumptionDetailsListById" parameterType="String" resultMap="UserConsumptionDetailsResult">
<include refid="selectUserConsumptionDetailsVo"/>
where card_number = #{cardNumber}
where
card_number = #{cardNumber}
</select>
<select id="selectUserConsumptionDetailsSwipListByCardNumber" parameterType="String" resultMap="UserConsumptionDetailsResult">
<include refid="selectUserConsumptionDetailsVo"/>
where
card_number = #{cardNumber}
and billing_type=1
</select>
<insert id="insertUserConsumptionDetails" parameterType="UserConsumptionDetails" useGeneratedKeys="true" keyProperty="id">

View File

@ -58,6 +58,24 @@
<include refid="selectUserIrrigationRecordVo"/>
<where>
<if test="cardNumber != null and cardNumber != ''"> card_number = #{cardNumber}</if>
</where>
</select>
<select id="selectUserIrrigationRecordShowListBycardNumber" parameterType="UserIrrigationRecord" resultMap="UserIrrigationRecordResult">
<include refid="selectUserIrrigationRecordVo"/>
<where>
<if test="cardNumber != null and cardNumber != ''"> card_number = #{cardNumber}</if>
</where>
</select>
<select id="selectUserIrrigationRecordListByDeviceNumber" parameterType="String" resultMap="UserIrrigationRecordResult">
<include refid="selectUserIrrigationRecordVo"/>
<where>
<if test="deviceNumber != null and deviceNumber != ''"> device_number = #{deviceNumber}</if>
</where>
</select>