| 123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179180181182183184185186187188189190191192193194195196197198199200201202203204205206207208209210211212213214215216217218219220221222223224 |
- <?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.ruoyi.basicData.mapper.TCorpsMapper">
- <resultMap type="TCorps" id="TCorpsResult">
- <result property="fId" column="f_id"/>
- <result property="fTypeid" column="f_typeid"/>
- <result property="fNo" column="f_no"/>
- <result property="fName" column="f_name"/>
- <result property="fCname" column="f_cname"/>
- <result property="fEname" column="f_ename"/>
- <result property="fTel" column="f_tel"/>
- <result property="fFax" column="f_fax"/>
- <result property="fEmail" column="f_email"/>
- <result property="fManage" column="f_manage"/>
- <result property="fAddr" column="f_addr"/>
- <result property="fEaddr" column="f_eaddr"/>
- <result property="fScale" column="f_scale"/>
- <result property="fProvince" column="f_province"/>
- <result property="fCity" column="f_city"/>
- <result property="fStltypeid" column="f_stltypeid"/>
- <result property="fStldays" column="f_stldays"/>
- <result property="fContractno" column="f_contractno"/>
- <result property="fContractb" column="f_contractb"/>
- <result property="fContracte" column="f_contracte"/>
- <result property="fTax" column="f_tax"/>
- <result property="fInvtel" column="f_invtel"/>
- <result property="fInvaddr" column="f_invaddr"/>
- <result property="fBankno" column="f_bankno"/>
- <result property="fBankname" column="f_bankname"/>
- <result property="fUbankno" column="f_ubankno"/>
- <result property="fUbankname" column="f_ubankname"/>
- <result property="fStatus" column="f_status"/>
- <result property="delFlag" column="del_flag"/>
- <result property="createBy" column="create_by"/>
- <result property="createTime" column="create_time"/>
- <result property="updateBy" column="update_by"/>
- <result property="updateTime" column="update_time"/>
- <result property="remark" column="remark"/>
- </resultMap>
- <sql id="selectTCorpsVo">
- select f_id, f_typeid, f_no, f_name, f_cname, f_ename, f_tel, f_fax, f_email, f_manage, f_addr, f_eaddr, f_scale, f_province, f_city, f_stltypeid, f_stldays, f_contractno, f_contractb, f_contracte, f_tax, f_invtel, f_invaddr, f_bankno, f_bankname, f_ubankno, f_ubankname, f_status, del_flag, create_by, create_time, update_by, update_time, remark from t_corps
- </sql>
- <select id="selectTCorpsList" parameterType="TCorps" resultMap="TCorpsResult">
- <include refid="selectTCorpsVo"/>
- <where>
- <if test="fTypeid != null and fTypeid != ''">and f_typeid = #{fTypeid}</if>
- <if test="fNo != null and fNo != ''">and f_no like concat('%', #{fNo}, '%')</if>
- <if test="fName != null and fName != ''">and f_name like concat('%', #{fName}, '%')</if>
- <if test="fCname != null and fCname != ''">and f_cname like concat('%', #{fCname}, '%')</if>
- <if test="fEname != null and fEname != ''">and f_ename like concat('%', #{fEname}, '%')</if>
- <if test="fTel != null and fTel != ''">and f_tel like concat('%', #{fTel}, '%')</if>
- <if test="fFax != null and fFax != ''">and f_fax = #{fFax}</if>
- <if test="fEmail != null and fEmail != ''">and f_email = #{fEmail}</if>
- <if test="fManage != null and fManage != ''">and f_manage = #{fManage}</if>
- <if test="fAddr != null and fAddr != ''">and f_addr = #{fAddr}</if>
- <if test="fEaddr != null and fEaddr != ''">and f_eaddr = #{fEaddr}</if>
- <if test="fScale != null and fScale != ''">and f_scale = #{fScale}</if>
- <if test="fProvince != null and fProvince != ''">and f_province = #{fProvince}</if>
- <if test="fCity != null and fCity != ''">and f_city = #{fCity}</if>
- <if test="fStltypeid != null ">and f_stltypeid = #{fStltypeid}</if>
- <if test="fStldays != null ">and f_stldays = #{fStldays}</if>
- <if test="fContractno != null and fContractno != ''">and f_contractno = #{fContractno}</if>
- <if test="fContractb != null ">and f_contractb = #{fContractb}</if>
- <if test="fContracte != null ">and f_contracte = #{fContracte}</if>
- <if test="fTax != null and fTax != ''">and f_tax = #{fTax}</if>
- <if test="fInvtel != null and fInvtel != ''">and f_invtel = #{fInvtel}</if>
- <if test="fInvaddr != null and fInvaddr != ''">and f_invaddr = #{fInvaddr}</if>
- <if test="fBankno != null and fBankno != ''">and f_bankno = #{fBankno}</if>
- <if test="fBankname != null and fBankname != ''">and f_bankname like concat('%', #{fBankname}, '%')</if>
- <if test="fUbankno != null and fUbankno != ''">and f_ubankno = #{fUbankno}</if>
- <if test="fUbankname != null and fUbankname != ''">and f_ubankname like concat('%', #{fUbankname}, '%')
- </if>
- <if test="fStatus != null and fStatus != ''">and f_status = #{fStatus}</if>
- </where>
- </select>
- <select id="selectTCorpsById" parameterType="Long" resultMap="TCorpsResult">
- <include refid="selectTCorpsVo"/>
- where f_id = #{fId}
- </select>
- <insert id="insertTCorps" parameterType="TCorps" useGeneratedKeys="true" keyProperty="fId">
- insert into t_corps
- <trim prefix="(" suffix=")" suffixOverrides=",">
- <if test="fTypeid != null">f_typeid,</if>
- <if test="fNo != null and fNo != ''">f_no,</if>
- <if test="fName != null and fName != ''">f_name,</if>
- <if test="fCname != null">f_cname,</if>
- <if test="fEname != null">f_ename,</if>
- <if test="fTel != null">f_tel,</if>
- <if test="fFax != null">f_fax,</if>
- <if test="fEmail != null">f_email,</if>
- <if test="fManage != null">f_manage,</if>
- <if test="fAddr != null">f_addr,</if>
- <if test="fEaddr != null">f_eaddr,</if>
- <if test="fScale != null">f_scale,</if>
- <if test="fProvince != null">f_province,</if>
- <if test="fCity != null">f_city,</if>
- <if test="fStltypeid != null">f_stltypeid,</if>
- <if test="fStldays != null">f_stldays,</if>
- <if test="fContractno != null">f_contractno,</if>
- <if test="fContractb != null">f_contractb,</if>
- <if test="fContracte != null">f_contracte,</if>
- <if test="fTax != null">f_tax,</if>
- <if test="fInvtel != null">f_invtel,</if>
- <if test="fInvaddr != null">f_invaddr,</if>
- <if test="fBankno != null">f_bankno,</if>
- <if test="fBankname != null">f_bankname,</if>
- <if test="fUbankno != null">f_ubankno,</if>
- <if test="fUbankname != null">f_ubankname,</if>
- <if test="fStatus != null and fStatus != ''">f_status,</if>
- <if test="delFlag != null">del_flag,</if>
- <if test="createBy != null">create_by,</if>
- <if test="createTime != null">create_time,</if>
- <if test="updateBy != null">update_by,</if>
- <if test="updateTime != null">update_time,</if>
- <if test="remark != null">remark,</if>
- </trim>
- <trim prefix="values (" suffix=")" suffixOverrides=",">
- <if test="fTypeid != null">#{fTypeid},</if>
- <if test="fNo != null and fNo != ''">#{fNo},</if>
- <if test="fName != null and fName != ''">#{fName},</if>
- <if test="fCname != null">#{fCname},</if>
- <if test="fEname != null">#{fEname},</if>
- <if test="fTel != null">#{fTel},</if>
- <if test="fFax != null">#{fFax},</if>
- <if test="fEmail != null">#{fEmail},</if>
- <if test="fManage != null">#{fManage},</if>
- <if test="fAddr != null">#{fAddr},</if>
- <if test="fEaddr != null">#{fEaddr},</if>
- <if test="fScale != null">#{fScale},</if>
- <if test="fProvince != null">#{fProvince},</if>
- <if test="fCity != null">#{fCity},</if>
- <if test="fStltypeid != null">#{fStltypeid},</if>
- <if test="fStldays != null">#{fStldays},</if>
- <if test="fContractno != null">#{fContractno},</if>
- <if test="fContractb != null">#{fContractb},</if>
- <if test="fContracte != null">#{fContracte},</if>
- <if test="fTax != null">#{fTax},</if>
- <if test="fInvtel != null">#{fInvtel},</if>
- <if test="fInvaddr != null">#{fInvaddr},</if>
- <if test="fBankno != null">#{fBankno},</if>
- <if test="fBankname != null">#{fBankname},</if>
- <if test="fUbankno != null">#{fUbankno},</if>
- <if test="fUbankname != null">#{fUbankname},</if>
- <if test="fStatus != null and fStatus != ''">#{fStatus},</if>
- <if test="delFlag != null">#{delFlag},</if>
- <if test="createBy != null">#{createBy},</if>
- <if test="createTime != null">#{createTime},</if>
- <if test="updateBy != null">#{updateBy},</if>
- <if test="updateTime != null">#{updateTime},</if>
- <if test="remark != null">#{remark},</if>
- </trim>
- </insert>
- <update id="updateTCorps" parameterType="TCorps">
- update t_corps
- <trim prefix="SET" suffixOverrides=",">
- <if test="fTypeid != null">f_typeid = #{fTypeid},</if>
- <if test="fNo != null and fNo != ''">f_no = #{fNo},</if>
- <if test="fName != null and fName != ''">f_name = #{fName},</if>
- <if test="fCname != null">f_cname = #{fCname},</if>
- <if test="fEname != null">f_ename = #{fEname},</if>
- <if test="fTel != null">f_tel = #{fTel},</if>
- <if test="fFax != null">f_fax = #{fFax},</if>
- <if test="fEmail != null">f_email = #{fEmail},</if>
- <if test="fManage != null">f_manage = #{fManage},</if>
- <if test="fAddr != null">f_addr = #{fAddr},</if>
- <if test="fEaddr != null">f_eaddr = #{fEaddr},</if>
- <if test="fScale != null">f_scale = #{fScale},</if>
- <if test="fProvince != null">f_province = #{fProvince},</if>
- <if test="fCity != null">f_city = #{fCity},</if>
- <if test="fStltypeid != null">f_stltypeid = #{fStltypeid},</if>
- <if test="fStldays != null">f_stldays = #{fStldays},</if>
- <if test="fContractno != null">f_contractno = #{fContractno},</if>
- <if test="fContractb != null">f_contractb = #{fContractb},</if>
- <if test="fContracte != null">f_contracte = #{fContracte},</if>
- <if test="fTax != null">f_tax = #{fTax},</if>
- <if test="fInvtel != null">f_invtel = #{fInvtel},</if>
- <if test="fInvaddr != null">f_invaddr = #{fInvaddr},</if>
- <if test="fBankno != null">f_bankno = #{fBankno},</if>
- <if test="fBankname != null">f_bankname = #{fBankname},</if>
- <if test="fUbankno != null">f_ubankno = #{fUbankno},</if>
- <if test="fUbankname != null">f_ubankname = #{fUbankname},</if>
- <if test="fStatus != null and fStatus != ''">f_status = #{fStatus},</if>
- <if test="delFlag != null">del_flag = #{delFlag},</if>
- <if test="createBy != null">create_by = #{createBy},</if>
- <if test="createTime != null">create_time = #{createTime},</if>
- <if test="updateBy != null">update_by = #{updateBy},</if>
- <if test="updateTime != null">update_time = #{updateTime},</if>
- <if test="remark != null">remark = #{remark},</if>
- </trim>
- where f_id = #{fId}
- </update>
- <delete id="deleteTCorpsById" parameterType="Long">
- delete from t_corps where f_id = #{fId}
- </delete>
- <delete id="deleteTCorpsByIds" parameterType="String">
- delete from t_corps where f_id in
- <foreach item="fId" collection="array" open="(" separator="," close=")">
- #{fId}
- </foreach>
- </delete>
- <select id="checkFNoUnique" parameterType="String" resultMap="TCorpsResult">
- select f_id,f_no from t_corps where f_no = #{fNo} limit 1
- </select>
- <select id="checkUFNnameUnique" parameterType="String" resultMap="TCorpsResult">
- select f_id,f_name from t_corps where f_name = #{fAame} limit 1
- </select>
- <select id="checkUFCnameUnique" parameterType="String" resultMap="TCorpsResult">
- select f_id,f_addr from t_corps where f_cname = #{fCname} limit 1
- </select>
- </mapper>
|