|
@@ -6,19 +6,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
|
|
|
<resultMap type="TUserInfo" id="TUserInfoResult">
|
|
|
<result property="id" column="id" />
|
|
|
- <result property="cardNo" column="card_no" />
|
|
|
<result property="userNo" column="user_no" />
|
|
|
+ <result property="cardNo" column="card_no" />
|
|
|
+ <result property="ammeterNo" column="ammeter_no" />
|
|
|
<result property="name" column="name" />
|
|
|
<result property="phone" column="phone" />
|
|
|
<result property="province" column="province" />
|
|
|
<result property="city" column="city" />
|
|
|
<result property="country" column="country" />
|
|
|
+ <result property="pumpingStationAddress" column="pumping_station_address" />
|
|
|
+ <result property="area" column="area" />
|
|
|
<result property="street" column="street" />
|
|
|
- <result property="address" column="address" />
|
|
|
+ <result property="neighbourhoodName" column="neighbourhood_name" />
|
|
|
<result property="buildingNo" column="building_no" />
|
|
|
<result property="doorNo" column="door_no" />
|
|
|
- <result property="ammeterNo" column="ammeter_no" />
|
|
|
- <result property="pumpingStation" column="pumping_station" />
|
|
|
+ <result property="statisticsTime" column="statistics_time" />
|
|
|
+ <result property="unpaidFees" column="unpaid_fees" />
|
|
|
+ <result property="balanceFees" column="balance_fees" />
|
|
|
+ <result property="waterFees" column="water_fees" />
|
|
|
<result property="meterReader" column="meter_reader" />
|
|
|
<result property="meterReaderPhone" column="meter_reader_phone" />
|
|
|
<result property="delFlag" column="del_flag" />
|
|
@@ -31,26 +36,31 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTUserInfoVo">
|
|
|
- select id, card_no, user_no, name, phone, province, city, country, street, address, building_no, door_no, ammeter_no, pumping_station, meter_reader, meter_reader_phone, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_user_info
|
|
|
+ select id, user_no, card_no, ammeter_no, name, phone, province, city, country, pumping_station_address, area, street, neighbourhood_name, building_no, door_no, statistics_time, unpaid_fees, balance_fees, water_fees, meter_reader, meter_reader_phone, del_flag, revision, create_by, create_time, update_by, update_time, remark from t_user_info
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectTUserInfoList" parameterType="TUserInfo" resultMap="TUserInfoResult">
|
|
|
<include refid="selectTUserInfoVo"/>
|
|
|
<where>
|
|
|
1 = 1
|
|
|
- <if test="cardNo != null and cardNo != ''"> and card_no = #{cardNo}</if>
|
|
|
<if test="userNo != null and userNo != ''"> and user_no = #{userNo}</if>
|
|
|
+ <if test="cardNo != null and cardNo != ''"> and card_no = #{cardNo}</if>
|
|
|
+ <if test="ammeterNo != null and ammeterNo != ''"> and ammeter_no = #{ammeterNo}</if>
|
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
|
<if test="phone != null and phone != ''"> and phone = #{phone}</if>
|
|
|
<if test="province != null and province != ''"> and province = #{province}</if>
|
|
|
<if test="city != null and city != ''"> and city = #{city}</if>
|
|
|
<if test="country != null and country != ''"> and country = #{country}</if>
|
|
|
+ <if test="pumpingStationAddress != null and pumpingStationAddress != ''"> and pumping_station_address = #{pumpingStationAddress}</if>
|
|
|
+ <if test="area != null and area != ''"> and area = #{area}</if>
|
|
|
<if test="street != null and street != ''"> and street = #{street}</if>
|
|
|
- <if test="address != null and address != ''"> and address = #{address}</if>
|
|
|
+ <if test="neighbourhoodName != null and neighbourhoodName != ''"> and neighbourhood_name like concat('%', #{neighbourhoodName}, '%')</if>
|
|
|
<if test="buildingNo != null and buildingNo != ''"> and building_no = #{buildingNo}</if>
|
|
|
<if test="doorNo != null and doorNo != ''"> and door_no = #{doorNo}</if>
|
|
|
- <if test="ammeterNo != null and ammeterNo != ''"> and ammeter_no = #{ammeterNo}</if>
|
|
|
- <if test="pumpingStation != null and pumpingStation != ''"> and pumping_station = #{pumpingStation}</if>
|
|
|
+ <if test="statisticsTime != null "> and statistics_time = #{statisticsTime}</if>
|
|
|
+ <if test="unpaidFees != null "> and unpaid_fees = #{unpaidFees}</if>
|
|
|
+ <if test="balanceFees != null "> and balance_fees = #{balanceFees}</if>
|
|
|
+ <if test="waterFees != null "> and water_fees = #{waterFees}</if>
|
|
|
<if test="meterReader != null and meterReader != ''"> and meter_reader = #{meterReader}</if>
|
|
|
<if test="meterReaderPhone != null and meterReaderPhone != ''"> and meter_reader_phone = #{meterReaderPhone}</if>
|
|
|
<if test="revision != null "> and revision = #{revision}</if>
|
|
@@ -66,19 +76,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<insert id="insertTUserInfo" parameterType="TUserInfo" useGeneratedKeys="true" keyProperty="id">
|
|
|
insert into t_user_info
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
- <if test="cardNo != null">card_no,</if>
|
|
|
<if test="userNo != null">user_no,</if>
|
|
|
+ <if test="cardNo != null">card_no,</if>
|
|
|
+ <if test="ammeterNo != null">ammeter_no,</if>
|
|
|
<if test="name != null">name,</if>
|
|
|
<if test="phone != null">phone,</if>
|
|
|
<if test="province != null">province,</if>
|
|
|
<if test="city != null">city,</if>
|
|
|
<if test="country != null">country,</if>
|
|
|
+ <if test="pumpingStationAddress != null">pumping_station_address,</if>
|
|
|
+ <if test="area != null">area,</if>
|
|
|
<if test="street != null">street,</if>
|
|
|
- <if test="address != null">address,</if>
|
|
|
+ <if test="neighbourhoodName != null">neighbourhood_name,</if>
|
|
|
<if test="buildingNo != null">building_no,</if>
|
|
|
<if test="doorNo != null">door_no,</if>
|
|
|
- <if test="ammeterNo != null">ammeter_no,</if>
|
|
|
- <if test="pumpingStation != null">pumping_station,</if>
|
|
|
+ <if test="statisticsTime != null">statistics_time,</if>
|
|
|
+ <if test="unpaidFees != null">unpaid_fees,</if>
|
|
|
+ <if test="balanceFees != null">balance_fees,</if>
|
|
|
+ <if test="waterFees != null">water_fees,</if>
|
|
|
<if test="meterReader != null">meter_reader,</if>
|
|
|
<if test="meterReaderPhone != null">meter_reader_phone,</if>
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
@@ -90,19 +105,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<if test="remark != null">remark,</if>
|
|
|
</trim>
|
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
|
- <if test="cardNo != null">#{cardNo},</if>
|
|
|
<if test="userNo != null">#{userNo},</if>
|
|
|
+ <if test="cardNo != null">#{cardNo},</if>
|
|
|
+ <if test="ammeterNo != null">#{ammeterNo},</if>
|
|
|
<if test="name != null">#{name},</if>
|
|
|
<if test="phone != null">#{phone},</if>
|
|
|
<if test="province != null">#{province},</if>
|
|
|
<if test="city != null">#{city},</if>
|
|
|
<if test="country != null">#{country},</if>
|
|
|
+ <if test="pumpingStationAddress != null">#{pumpingStationAddress},</if>
|
|
|
+ <if test="area != null">#{area},</if>
|
|
|
<if test="street != null">#{street},</if>
|
|
|
- <if test="address != null">#{address},</if>
|
|
|
+ <if test="neighbourhoodName != null">#{neighbourhoodName},</if>
|
|
|
<if test="buildingNo != null">#{buildingNo},</if>
|
|
|
<if test="doorNo != null">#{doorNo},</if>
|
|
|
- <if test="ammeterNo != null">#{ammeterNo},</if>
|
|
|
- <if test="pumpingStation != null">#{pumpingStation},</if>
|
|
|
+ <if test="statisticsTime != null">#{statisticsTime},</if>
|
|
|
+ <if test="unpaidFees != null">#{unpaidFees},</if>
|
|
|
+ <if test="balanceFees != null">#{balanceFees},</if>
|
|
|
+ <if test="waterFees != null">#{waterFees},</if>
|
|
|
<if test="meterReader != null">#{meterReader},</if>
|
|
|
<if test="meterReaderPhone != null">#{meterReaderPhone},</if>
|
|
|
<if test="delFlag != null">#{delFlag},</if>
|
|
@@ -118,19 +138,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<update id="updateTUserInfo" parameterType="TUserInfo">
|
|
|
update t_user_info
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
- <if test="cardNo != null">card_no = #{cardNo},</if>
|
|
|
<if test="userNo != null">user_no = #{userNo},</if>
|
|
|
+ <if test="cardNo != null">card_no = #{cardNo},</if>
|
|
|
+ <if test="ammeterNo != null">ammeter_no = #{ammeterNo},</if>
|
|
|
<if test="name != null">name = #{name},</if>
|
|
|
<if test="phone != null">phone = #{phone},</if>
|
|
|
<if test="province != null">province = #{province},</if>
|
|
|
<if test="city != null">city = #{city},</if>
|
|
|
<if test="country != null">country = #{country},</if>
|
|
|
+ <if test="pumpingStationAddress != null">pumping_station_address = #{pumpingStationAddress},</if>
|
|
|
+ <if test="area != null">area = #{area},</if>
|
|
|
<if test="street != null">street = #{street},</if>
|
|
|
- <if test="address != null">address = #{address},</if>
|
|
|
+ <if test="neighbourhoodName != null">neighbourhood_name = #{neighbourhoodName},</if>
|
|
|
<if test="buildingNo != null">building_no = #{buildingNo},</if>
|
|
|
<if test="doorNo != null">door_no = #{doorNo},</if>
|
|
|
- <if test="ammeterNo != null">ammeter_no = #{ammeterNo},</if>
|
|
|
- <if test="pumpingStation != null">pumping_station = #{pumpingStation},</if>
|
|
|
+ <if test="statisticsTime != null">statistics_time = #{statisticsTime},</if>
|
|
|
+ <if test="unpaidFees != null">unpaid_fees = #{unpaidFees},</if>
|
|
|
+ <if test="balanceFees != null">balance_fees = #{balanceFees},</if>
|
|
|
+ <if test="waterFees != null">water_fees = #{waterFees},</if>
|
|
|
<if test="meterReader != null">meter_reader = #{meterReader},</if>
|
|
|
<if test="meterReaderPhone != null">meter_reader_phone = #{meterReaderPhone},</if>
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|