|
@@ -5,8 +5,8 @@
|
|
<!-- 增 [G] -->
|
|
<!-- 增 [G] -->
|
|
<insert id="add">
|
|
<insert id="add">
|
|
insert into
|
|
insert into
|
|
- tb_pass_record (id, business_id, customer_id, customer_name, card_no, status, in_time, out_time, update_time)
|
|
|
|
- values (#{id}, #{businessId}, #{customerId}, #{customerName}, #{cardNo}, #{status}, #{inTime}, #{outTime}, #{updateTime})
|
|
|
|
|
|
+ tb_pass_record (id, business_id, customer_id, customer_name, card_no, car_country_name, status, in_time, out_time, update_time)
|
|
|
|
+ values (#{id}, #{businessId}, #{customerId}, #{customerName}, #{cardNo}, #{carCountryName}, #{status}, #{inTime}, #{outTime}, #{updateTime})
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
<!-- 删 -->
|
|
<!-- 删 -->
|
|
@@ -15,6 +15,12 @@
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</delete>
|
|
</delete>
|
|
|
|
|
|
|
|
+ <!-- 删 -->
|
|
|
|
+ <delete id="deleteByBusinessId">
|
|
|
|
+ delete from tb_pass_record
|
|
|
|
+ where business_id = #{businessId}
|
|
|
|
+ </delete>
|
|
|
|
+
|
|
<!-- 改 [G] -->
|
|
<!-- 改 [G] -->
|
|
<update id="update">
|
|
<update id="update">
|
|
update tb_pass_record set
|
|
update tb_pass_record set
|
|
@@ -22,7 +28,8 @@
|
|
business_id = #{businessId},
|
|
business_id = #{businessId},
|
|
customer_id = #{customerId},
|
|
customer_id = #{customerId},
|
|
customer_name = #{customerName},
|
|
customer_name = #{customerName},
|
|
- card_no = #{cardNo},
|
|
|
|
|
|
+ card_no = #{cardNo},
|
|
|
|
+ car_country_name = #{carCountryName},
|
|
status = #{status},
|
|
status = #{status},
|
|
in_time = #{inTime},
|
|
in_time = #{inTime},
|
|
out_time = #{outTime},
|
|
out_time = #{outTime},
|
|
@@ -41,6 +48,7 @@
|
|
<result property="customerId" column="customer_id" />
|
|
<result property="customerId" column="customer_id" />
|
|
<result property="customerName" column="customer_name" />
|
|
<result property="customerName" column="customer_name" />
|
|
<result property="cardNo" column="card_no" />
|
|
<result property="cardNo" column="card_no" />
|
|
|
|
+ <result property="carCountryName" column="car_country_name" />
|
|
<result property="status" column="status" />
|
|
<result property="status" column="status" />
|
|
<result property="inTime" column="in_time" />
|
|
<result property="inTime" column="in_time" />
|
|
<result property="outTime" column="out_time" />
|
|
<result property="outTime" column="out_time" />
|
|
@@ -64,6 +72,12 @@
|
|
<include refid="select_sql"></include>
|
|
<include refid="select_sql"></include>
|
|
where business_id = #{businessId}
|
|
where business_id = #{businessId}
|
|
</select>
|
|
</select>
|
|
|
|
+
|
|
|
|
+ <!-- 查 - 根据businessId和CountryName -->
|
|
|
|
+ <select id="getByBusinessIdAndCountryName" resultMap="model">
|
|
|
|
+ <include refid="select_sql"></include>
|
|
|
|
+ where business_id = #{businessId} and car_country_name = #{carCountryName}
|
|
|
|
+ </select>
|
|
|
|
|
|
<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
|
|
<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
|
|
<select id="getList" resultMap="model">
|
|
<select id="getList" resultMap="model">
|
|
@@ -75,6 +89,7 @@
|
|
<if test=' this.has("customerId") '> and customer_id = #{customerId} </if>
|
|
<if test=' this.has("customerId") '> and customer_id = #{customerId} </if>
|
|
<if test=' this.has("customerName") '> and customer_name like concat('%',#{customerName},'%') </if>
|
|
<if test=' this.has("customerName") '> and customer_name like concat('%',#{customerName},'%') </if>
|
|
<if test=' this.has("cardNo") '> and card_no like concat('%',#{cardNo},'%') </if>
|
|
<if test=' this.has("cardNo") '> and card_no like concat('%',#{cardNo},'%') </if>
|
|
|
|
+ <if test=' this.has("carCountryName") '> and car_country_name = #{carCountryName} </if>
|
|
<if test=' this.has("status") '> and status = #{status} </if>
|
|
<if test=' this.has("status") '> and status = #{status} </if>
|
|
<if test=' this.has("inTime") '> and in_time = #{inTime} </if>
|
|
<if test=' this.has("inTime") '> and in_time = #{inTime} </if>
|
|
<if test=' this.has("outTime") '> and out_time = #{outTime} </if>
|
|
<if test=' this.has("outTime") '> and out_time = #{outTime} </if>
|