|
@@ -7,24 +7,24 @@
|
|
|
|
|
|
<!-- ================================== 查询相关 ================================== -->
|
|
|
<!-- select id, name, legal_person, id_card, contact, business_license, bank_no, bank_name, bank_account, duty_paragraph, address_ids, address, judge_status, judge_content, judge_time, register_time, person_id, create_time, create_by, create_name, update_time, update_by, update_name, delete_status from tb_purchaser -->
|
|
|
-
|
|
|
+
|
|
|
<!-- 通用映射:自动模式 -->
|
|
|
<resultMap id="model" autoMapping="true" type="com.pj.tb_purchaser.TbPurchaser"></resultMap>
|
|
|
-
|
|
|
+
|
|
|
<!-- 公共查询sql片段 -->
|
|
|
<sql id="select_sql">
|
|
|
- select *
|
|
|
- from tb_purchaser
|
|
|
+ select *
|
|
|
+ from tb_purchaser
|
|
|
</sql>
|
|
|
|
|
|
-
|
|
|
+
|
|
|
<!-- 查集合 - 根据条件(参数为空时代表忽略指定条件) [G] -->
|
|
|
<select id="getList" resultMap="model">
|
|
|
<include refid="select_sql"></include>
|
|
|
<where>
|
|
|
<if test=' this.has("id") '> and id = #{id} </if>
|
|
|
- <if test=' this.has("name") '> and name = #{name} </if>
|
|
|
- <if test=' this.has("legalPerson") '> and legal_person = #{legalPerson} </if>
|
|
|
+ <if test=' this.has("name") '> and name like concat('%', #{name}, '%') </if>
|
|
|
+ <if test=' this.has("legalPerson") '> and legal_person like concat('%', #{legalPerson}, '%') </if>
|
|
|
<if test=' this.has("idCard") '> and id_card = #{idCard} </if>
|
|
|
<if test=' this.has("contact") '> and contact = #{contact} </if>
|
|
|
<if test=' this.has("bankNo") '> and bank_no = #{bankNo} </if>
|
|
@@ -43,6 +43,9 @@
|
|
|
<if test=' this.has("updateBy") '> and update_by = #{updateBy} </if>
|
|
|
<if test=' this.has("updateName") '> and update_name = #{updateName} </if>
|
|
|
<if test=' this.has("deleteStatus") '> and delete_status = #{deleteStatus} </if>
|
|
|
+ <if test=' this.has("type") '> and type = #{type} </if>
|
|
|
+ <if test=' this.has("businessName") '> and business_name like concat('%', #{businessName}, '%') </if>
|
|
|
+ <if test=' this.has("email") '> and email = #{email} </if>
|
|
|
</where>
|
|
|
order by
|
|
|
<choose>
|
|
@@ -72,14 +75,14 @@
|
|
|
<otherwise> id desc </otherwise>
|
|
|
</choose>
|
|
|
</select>
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
-
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
|
|
|
</mapper>
|