<?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="io.renren.modules.app.dao.ZhxxtempDao">

    <!-- 可根据自己的需求，是否要使用 -->
    <resultMap type="io.renren.modules.app.entity.ZhxxtempEntity" id="zhxxtempMap">
                    <result property="id" column="id"/>
                    <result property="dhbm" column="dhbm"/>
                    <result property="zje" column="zje"/>
                    <result property="zmj" column="zmj"/>
                    <result property="epassid" column="epassid"/>
                    <result property="djlx" column="djlx"/>
                    <result property="jkbz" column="jkbz"/>
                    <result property="jsbz" column="jsbz"/>
                    <result property="jkje" column="jkje"/>
                    <result property="fwbm" column="fwbm"/>
                    <result property="ywfx" column="ywfx"/>
            </resultMap>

    <select id="queryByPage" parameterType="io.renren.modules.app.entity.ZhxxtempEntity"
            resultType="io.renren.modules.app.entity.ZhxxtempEntity">

        select * from zhxxtemp where 1=1

                    <if test=" id!=null and id!='' ">
                and id like CONCAT(#{id},"%")
            </if>
                    <if test=" dhbm!=null and dhbm!='' ">
                and dhbm like CONCAT(#{dhbm},"%")
            </if>
                    <if test=" zje!=null and zje!='' ">
                and zje like CONCAT(#{zje},"%")
            </if>
                    <if test=" zmj!=null and zmj!='' ">
                and zmj like CONCAT(#{zmj},"%")
            </if>
                    <if test=" epassid!=null and epassid!='' ">
                and epassid like CONCAT(#{epassid},"%")
            </if>
                    <if test=" djlx!=null and djlx!='' ">
                and djlx like CONCAT(#{djlx},"%")
            </if>
                    <if test=" jkbz!=null and jkbz!='' ">
                and jkbz like CONCAT(#{jkbz},"%")
            </if>
                    <if test=" jsbz!=null and jsbz!='' ">
                and jsbz like CONCAT(#{jsbz},"%")
            </if>
                    <if test=" jkje!=null and jkje!='' ">
                and jkje like CONCAT(#{jkje},"%")
            </if>
                    <if test=" fwbm!=null and fwbm!='' ">
                and fwbm like CONCAT(#{fwbm},"%")
            </if>
                    <if test=" ywfx!=null and ywfx!='' ">
                and ywfx like CONCAT(#{ywfx},"%")
            </if>
        
    </select>
    <select id="querymx" parameterType="io.renren.modules.app.entity.SqwxzqEntity"
            resultType="io.renren.modules.app.entity.FwxxEntity">

       SELECT * FROM "WXJJ"."ZHXXTEMP" z LEFT JOIN FWXX f ON z.FWBM = f.FWBM where 1=1
       
                    <if test=" dhbm!=null and dhbm!='' ">
                and z.dhbm like CONCAT(#{dhbm},"%")
            </if>
        
    </select>
    <select id="queryqb" parameterType="io.renren.modules.app.entity.SqwxzqEntity"
            resultType="io.renren.modules.app.entity.FwxxEntity">

       SELECT * FROM "WXJJ"."FWXX"  where 1=1
       
        
    </select>
    
    <delete id="queryftsc" parameterType="io.renren.modules.app.entity.SqwxzqEntity">
    DELETE FROM  zhxxtemp   WHERE 1=1
		 <if test=" dhbm!=null and dhbm!='' ">
                and z.dhbm like CONCAT(#{dhbm},"%")
            </if> 
</delete>
 <insert id="queryftbc" parameterType="io.renren.modules.app.entity.SqwxzqEntity">
    INSERT INTO  zhxxtemp(
		
		dhbm, 
		zje, 
		zmj, 
		epassid, 
		djlx, 
		jkbz,
		jsbz,
		jkje, 
		fwbm,
		ywfx   ) 
	  VALUES (#{dhbm},#{sqje},#{mj},#{epassid},'21',#{jkbz},#{jsbz},#{jkje},#{fwbm},#{ywfx})
</insert>


</mapper>