QyzxEntAuthMapper.xml 7.4 KB
Newer Older
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181
<?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="cn.timer.api.dao.qyzx.QyzxEntAuthMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.qyzx.QyzxEntAuth" >
        	<id column="id" property="id" />
                <id column="id" property="id" />
                <result column="org_code" property="orgCode" />
                <result column="certificate_type" property="certificateType" />
                <result column="business_license_url" property="businessLicenseUrl" />
                <result column="uscc" property="uscc" />
                <result column="name" property="name" />
                <result column="legal_person" property="legalPerson" />
                <result column="legal_person_idcard" property="legalPersonIdcard" />
                <result column="city" property="city" />
                <result column="detailed_address" property="detailedAddress" />
                <result column="auth_certificate_url" property="authCertificateUrl" />
                <result column="auth_type" property="authType" />
                <result column="auth_time" property="authTime" />
    </resultMap>

    <sql id="Base_Column_List">
                id,
                org_code,
                certificate_type,
                business_license_url,
                uscc,
                name,
                legal_person,
                legal_person_idcard,
                city,
                detailed_address,
                auth_certificate_url,
                auth_type,
                auth_time
    </sql>
    
    <sql id="Base_Column_List_Alias">
                id QyzxEntAuth_id,
                org_code QyzxEntAuth_org_code,
                certificate_type QyzxEntAuth_certificate_type,
                business_license_url QyzxEntAuth_business_license_url,
                uscc QyzxEntAuth_uscc,
                name QyzxEntAuth_name,
                legal_person QyzxEntAuth_legal_person,
                legal_person_idcard QyzxEntAuth_legal_person_idcard,
                city QyzxEntAuth_city,
                detailed_address QyzxEntAuth_detailed_address,
                auth_certificate_url QyzxEntAuth_auth_certificate_url,
                auth_type QyzxEntAuth_auth_type,
                auth_time QyzxEntAuth_auth_time
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.qyzx.QyzxEntAuth">
        INSERT INTO qyzx_ent_auth
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != orgCode'>
                        org_code,
                        </if>
                        <if test ='null != certificateType'>
                        certificate_type,
                        </if>
                        <if test ='null != businessLicenseUrl'>
                        business_license_url,
                        </if>
                        <if test ='null != uscc'>
                        uscc,
                        </if>
                        <if test ='null != name'>
                        name,
                        </if>
                        <if test ='null != legalPerson'>
                        legal_person,
                        </if>
                        <if test ='null != legalPersonIdcard'>
                        legal_person_idcard,
                        </if>
                        <if test ='null != city'>
                        city,
                        </if>
                        <if test ='null != detailedAddress'>
                        detailed_address,
                        </if>
                        <if test ='null != authCertificateUrl'>
                        auth_certificate_url,
                        </if>
                        <if test ='null != authType'>
                        auth_type,
                        </if>
                        <if test ='null != authTime'>
                        auth_time
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != orgCode'>
                        #{orgCode},
                        </if>
                        <if test ='null != certificateType'>
                        #{certificateType},
                        </if>
                        <if test ='null != businessLicenseUrl'>
                        #{businessLicenseUrl},
                        </if>
                        <if test ='null != uscc'>
                        #{uscc},
                        </if>
                        <if test ='null != name'>
                        #{name},
                        </if>
                        <if test ='null != legalPerson'>
                        #{legalPerson},
                        </if>
                        <if test ='null != legalPersonIdcard'>
                        #{legalPersonIdcard},
                        </if>
                        <if test ='null != city'>
                        #{city},
                        </if>
                        <if test ='null != detailedAddress'>
                        #{detailedAddress},
                        </if>
                        <if test ='null != authCertificateUrl'>
                        #{authCertificateUrl},
                        </if>
                        <if test ='null != authType'>
                        #{authType},
                        </if>
                        <if test ='null != authTime'>
                        #{authTime}
                        </if>
        </trim>
    </insert>

    <delete id="delete" >
        DELETE FROM qyzx_ent_auth
        WHERE id = #{id}
    </delete>

    <update id="update" parameterType="cn.timer.api.bean.qyzx.QyzxEntAuth">
        UPDATE qyzx_ent_auth
        <set>
                    <if test ='null != orgCode'>org_code = #{orgCode},</if>
                    <if test ='null != certificateType'>certificate_type = #{certificateType},</if>
                    <if test ='null != businessLicenseUrl'>business_license_url = #{businessLicenseUrl},</if>
                    <if test ='null != uscc'>uscc = #{uscc},</if>
                    <if test ='null != name'>name = #{name},</if>
                    <if test ='null != legalPerson'>legal_person = #{legalPerson},</if>
                    <if test ='null != legalPersonIdcard'>legal_person_idcard = #{legalPersonIdcard},</if>
                    <if test ='null != city'>city = #{city},</if>
                    <if test ='null != detailedAddress'>detailed_address = #{detailedAddress},</if>
                    <if test ='null != authCertificateUrl'>auth_certificate_url = #{authCertificateUrl},</if>
                    <if test ='null != authType'>auth_type = #{authType},</if>
                    <if test ='null != authTime'>auth_time = #{authTime}</if>
        </set>
        WHERE id = #{id}
    </update>


    <select id="load" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" />
        FROM qyzx_ent_auth
        WHERE id = #{id}
    </select>

    <select id="pageList" resultMap="BaseResultMap">
        SELECT <include refid="Base_Column_List" />
        FROM qyzx_ent_auth
        LIMIT #{offset}, #{pageSize}
    </select>

    <select id="pageListCount" resultType="java.lang.Integer">
        SELECT count(1)
        FROM qyzx_ent_auth
    </select>

	 -->

</mapper>