|
@@ -0,0 +1,93 @@
|
|
|
+<?xml version="1.0" encoding="UTF-8"?>
|
|
|
+<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
+<mapper namespace="com.pj.tb_people_tax_account.TbPeopleTaxAccountMapper">
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ <!-- ================================== 查询相关 ================================== -->
|
|
|
+ <!-- select id, people_id, business_name, duty_paragraph, name, address, form, contacts, phone, business_address, business_scope, business_status, id_card, bank_name, bank_code, invoice_business, invoice_people, payee, checker, create_time, create_by, create_name, update_time, update_by, update_name from tb_people_tax_account -->
|
|
|
+
|
|
|
+ <!-- 通用映射:自动模式 -->
|
|
|
+ <resultMap id="model" autoMapping="true" type="com.pj.tb_people_tax_account.TbPeopleTaxAccount"></resultMap>
|
|
|
+
|
|
|
+ <!-- 公共查询sql片段 -->
|
|
|
+ <sql id="select_sql">
|
|
|
+ select *
|
|
|
+ from tb_people_tax_account
|
|
|
+ </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("peopleId") '> and people_id = #{peopleId} </if>
|
|
|
+ <if test=' this.has("businessName") '> and business_name = #{businessName} </if>
|
|
|
+ <if test=' this.has("dutyParagraph") '> and duty_paragraph = #{dutyParagraph} </if>
|
|
|
+ <if test=' this.has("name") '> and name = #{name} </if>
|
|
|
+ <if test=' this.has("address") '> and address = #{address} </if>
|
|
|
+ <if test=' this.has("form") '> and form = #{form} </if>
|
|
|
+ <if test=' this.has("contacts") '> and contacts = #{contacts} </if>
|
|
|
+ <if test=' this.has("phone") '> and phone = #{phone} </if>
|
|
|
+ <if test=' this.has("businessAddress") '> and business_address = #{businessAddress} </if>
|
|
|
+ <if test=' this.has("businessScope") '> and business_scope = #{businessScope} </if>
|
|
|
+ <if test=' this.has("businessStatus") '> and business_status = #{businessStatus} </if>
|
|
|
+ <if test=' this.has("idCard") '> and id_card = #{idCard} </if>
|
|
|
+ <if test=' this.has("bankName") '> and bank_name = #{bankName} </if>
|
|
|
+ <if test=' this.has("bankCode") '> and bank_code = #{bankCode} </if>
|
|
|
+ <if test=' this.has("invoiceBusiness") '> and invoice_business = #{invoiceBusiness} </if>
|
|
|
+ <if test=' this.has("invoicePeople") '> and invoice_people = #{invoicePeople} </if>
|
|
|
+ <if test=' this.has("payee") '> and payee = #{payee} </if>
|
|
|
+ <if test=' this.has("checker") '> and checker = #{checker} </if>
|
|
|
+ <if test=' this.has("createTime") '> and create_time = #{createTime} </if>
|
|
|
+ <if test=' this.has("createBy") '> and create_by = #{createBy} </if>
|
|
|
+ <if test=' this.has("createName") '> and create_name = #{createName} </if>
|
|
|
+ <if test=' this.has("updateTime") '> and update_time = #{updateTime} </if>
|
|
|
+ <if test=' this.has("updateBy") '> and update_by = #{updateBy} </if>
|
|
|
+ <if test=' this.has("updateName") '> and update_name = #{updateName} </if>
|
|
|
+ <if test=' this.has("tradeAreaId") '> and trade_area_id = #{tradeAreaId} </if>
|
|
|
+ <if test=' this.has("tradeAreaName") '> and trade_area_name = #{tradeAreaName} </if>
|
|
|
+ </where>
|
|
|
+ order by
|
|
|
+ <choose>
|
|
|
+ <when test='sortType == 1'> id desc </when>
|
|
|
+ <when test='sortType == 2'> people_id desc </when>
|
|
|
+ <when test='sortType == 3'> business_name desc </when>
|
|
|
+ <when test='sortType == 4'> duty_paragraph desc </when>
|
|
|
+ <when test='sortType == 5'> name desc </when>
|
|
|
+ <when test='sortType == 6'> address desc </when>
|
|
|
+ <when test='sortType == 7'> form desc </when>
|
|
|
+ <when test='sortType == 8'> contacts desc </when>
|
|
|
+ <when test='sortType == 9'> phone desc </when>
|
|
|
+ <when test='sortType == 10'> business_address desc </when>
|
|
|
+ <when test='sortType == 11'> business_scope desc </when>
|
|
|
+ <when test='sortType == 12'> business_status desc </when>
|
|
|
+ <when test='sortType == 13'> id_card desc </when>
|
|
|
+ <when test='sortType == 14'> bank_name desc </when>
|
|
|
+ <when test='sortType == 15'> bank_code desc </when>
|
|
|
+ <when test='sortType == 16'> invoice_business desc </when>
|
|
|
+ <when test='sortType == 17'> invoice_people desc </when>
|
|
|
+ <when test='sortType == 18'> payee desc </when>
|
|
|
+ <when test='sortType == 19'> checker desc </when>
|
|
|
+ <when test='sortType == 20'> create_time desc </when>
|
|
|
+ <when test='sortType == 21'> create_by desc </when>
|
|
|
+ <when test='sortType == 22'> create_name desc </when>
|
|
|
+ <when test='sortType == 23'> update_time desc </when>
|
|
|
+ <when test='sortType == 24'> update_by desc </when>
|
|
|
+ <when test='sortType == 25'> update_name desc </when>
|
|
|
+ <otherwise> id desc </otherwise>
|
|
|
+ </choose>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+</mapper>
|