添加区域码和设备编码字段
This commit is contained in:
@ -42,6 +42,12 @@
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectNgIrrigationControllersBySerialNumber" parameterType="String" resultMap="NgIrrigationControllersResult">
|
||||
<include refid="selectNgIrrigationControllersVo"/>
|
||||
where serial_number = #{serialNumber}
|
||||
</select>
|
||||
|
||||
<insert id="insertNgIrrigationControllers" parameterType="NgIrrigationControllers" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into ng_irrigation_controllers
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
|
@ -22,10 +22,13 @@
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="deviceNumber" column="device_number" />
|
||||
<result property="projectId" column="project_id" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectNgUserRechargeRecordsVo">
|
||||
select id, user_id, user_name, card_number, area_code, type, amount, balance, recharge_time, recharge_code, status, serial_number, remark, create_time, update_time, create_by, update_by from ng_user_recharge_records
|
||||
select id, user_id, user_name, card_number, area_code, type, amount, balance, recharge_time, recharge_code, status, serial_number, remark, create_time, update_time, create_by, update_by, device_number, project_id, dept_id from ng_user_recharge_records
|
||||
</sql>
|
||||
|
||||
<select id="selectNgUserRechargeRecordsList" parameterType="NgUserRechargeRecords" resultMap="NgUserRechargeRecordsResult">
|
||||
@ -42,6 +45,9 @@
|
||||
<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>
|
||||
|
||||
@ -69,6 +75,9 @@
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="deviceNumber != null">device_number,</if>
|
||||
<if test="projectId != null">project_id,</if>
|
||||
<if test="deptId != null">dept_id,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
@ -87,6 +96,9 @@
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="deviceNumber != null">#{deviceNumber},</if>
|
||||
<if test="projectId != null">#{projectId},</if>
|
||||
<if test="deptId != null">#{deptId},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -109,6 +121,9 @@
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="deviceNumber != null">device_number = #{deviceNumber},</if>
|
||||
<if test="projectId != null">project_id = #{projectId},</if>
|
||||
<if test="deptId != null">dept_id = #{deptId},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -32,10 +32,11 @@
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="createBy" column="create_by" />
|
||||
<result property="updateBy" column="update_by" />
|
||||
<result property="areaCode" column="area_code" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectUserConsumptionDetailsVo">
|
||||
select id, user_id, device_number, card_number, project_id, dept_id, billing_type, pump_time, unit_price, total_price, discount, tax_amount, amount_due, billing_period_unit, billing_period_duration, billing_date, start_time, end_time, payment_status, payment_method, payment_time, status, remark, create_time, update_time, create_by, update_by from user_consumption_details
|
||||
select id, user_id, device_number, card_number, project_id, dept_id, billing_type, pump_time, unit_price, total_price, discount, tax_amount, amount_due, billing_period_unit, billing_period_duration, billing_date, start_time, end_time, payment_status, payment_method, payment_time, status, remark, create_time, update_time, create_by, update_by, area_code from user_consumption_details
|
||||
</sql>
|
||||
|
||||
<select id="selectUserConsumptionDetailsList" parameterType="UserConsumptionDetails" resultMap="UserConsumptionDetailsResult">
|
||||
@ -62,7 +63,7 @@
|
||||
<if test="paymentMethod != null "> and payment_method = #{paymentMethod}</if>
|
||||
<if test="paymentTime != null "> and payment_time = #{paymentTime}</if>
|
||||
<if test="status != null "> and status = #{status}</if>
|
||||
<if test="remark != null and remark != ''"> and remark = #{remark}</if>
|
||||
<if test="areaCode != null and areaCode != ''"> and area_code = #{areaCode}</if>
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@ -73,9 +74,7 @@
|
||||
|
||||
<select id="selectUserConsumptionDetailsListById" parameterType="String" resultMap="UserConsumptionDetailsResult">
|
||||
<include refid="selectUserConsumptionDetailsVo"/>
|
||||
<where>
|
||||
card_number=#{cardNumber}
|
||||
</where>
|
||||
where card_number = #{cardNumber}
|
||||
</select>
|
||||
|
||||
<insert id="insertUserConsumptionDetails" parameterType="UserConsumptionDetails" useGeneratedKeys="true" keyProperty="id">
|
||||
@ -107,6 +106,7 @@
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="createBy != null">create_by,</if>
|
||||
<if test="updateBy != null">update_by,</if>
|
||||
<if test="areaCode != null">area_code,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
@ -135,6 +135,7 @@
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="createBy != null">#{createBy},</if>
|
||||
<if test="updateBy != null">#{updateBy},</if>
|
||||
<if test="areaCode != null">#{areaCode},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@ -167,6 +168,7 @@
|
||||
<if test="updateTime != null">update_time = #{updateTime},</if>
|
||||
<if test="createBy != null">create_by = #{createBy},</if>
|
||||
<if test="updateBy != null">update_by = #{updateBy},</if>
|
||||
<if test="areaCode != null">area_code = #{areaCode},</if>
|
||||
</trim>
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
@ -58,6 +58,10 @@
|
||||
<include refid="selectUserRechargeCardsVo"/>
|
||||
where card_number= #{cardnumber}
|
||||
</select>
|
||||
<select id="selectUserRechargeCardsByCardNumber" parameterType="String" resultMap="UserRechargeCardsResult">
|
||||
<include refid="selectUserRechargeCardsVo"/>
|
||||
where cardNumber = #{cardNumber}
|
||||
</select>
|
||||
|
||||
<insert id="insertUserRechargeCards" parameterType="UserRechargeCards" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into user_recharge_cards
|
||||
@ -129,7 +133,7 @@
|
||||
</update>
|
||||
|
||||
<delete id="deleteUserRechargeCardsById" parameterType="Long">
|
||||
delete from user_recharge_cards where user_id = #{id}
|
||||
delete from user_recharge_cards where id = #{id}
|
||||
</delete>
|
||||
|
||||
<delete id="deleteUserRechargeCardsByIds" parameterType="String">
|
||||
|
Reference in New Issue
Block a user