<?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.QyzxEntInfoMMapper">

    <resultMap id="BaseResultMap" type="cn.timer.api.bean.qyzx.QyzxEntInfoM" >
                <id column="id" property="id" />
                <result column="name" property="name" />
                <result column="intro" property="intro" />
                <result column="oper_name" property="operName" />
                <result column="size" property="size" />
                <result column="phone" property="phone" />
                <result column="work_address" property="workAddress" />
                <result column="codes" property="codes" />
                <result column="logo_url" property="logoUrl" />
                <result column="industry_type" property="industryType" />
                <result column="open_channel" property="openChannel" />
                <result column="link_man" property="linkMan" />
                <result column="link_man_phone" property="linkManPhone" />
                <result column="credit_code" property="creditCode" />
                <result column="is_on_stock" property="isOnStock" />
                <result column="level" property="level" />
                <result column="register_time" property="registerTime" />
    </resultMap>

    <sql id="Base_Column_List">
                id,
                name,
                intro,
                oper_name,
                size,
                phone,
                work_address,
                codes,
                logo_url,
                industry_type,
                open_channel,
                link_man,
                link_man_phone,
                credit_code,
                is_on_stock,
                level,
                register_time
    </sql>

	<!-- 

    <insert id="insert" useGeneratedKeys="true" keyColumn="id" parameterType="cn.timer.api.bean.qyzx.QyzxEntInfoM">
        INSERT INTO qyzx_ent_info_m
        <trim prefix="(" suffix=")" suffixOverrides=",">
                        <if test ='null != name'>
                        name,
                        </if>
                        <if test ='null != intro'>
                        intro,
                        </if>
                        <if test ='null != operName'>
                        oper_name,
                        </if>
                        <if test ='null != size'>
                        size,
                        </if>
                        <if test ='null != phone'>
                        phone,
                        </if>
                        <if test ='null != workAddress'>
                        work_address,
                        </if>
                        <if test ='null != codes'>
                        codes,
                        </if>
                        <if test ='null != logoUrl'>
                        logo_url,
                        </if>
                        <if test ='null != industryType'>
                        industry_type,
                        </if>
                        <if test ='null != openChannel'>
                        open_channel,
                        </if>
                        <if test ='null != linkMan'>
                        link_man,
                        </if>
                        <if test ='null != linkManPhone'>
                        link_man_phone,
                        </if>
                        <if test ='null != creditCode'>
                        credit_code,
                        </if>
                        <if test ='null != isOnStock'>
                        is_on_stock,
                        </if>
                        <if test ='null != registerTime'>
                        register_time
                        </if>
        </trim>
        <trim prefix="values (" suffix=")" suffixOverrides=",">
                        <if test ='null != name'>
                        #{name},
                        </if>
                        <if test ='null != intro'>
                        #{intro},
                        </if>
                        <if test ='null != operName'>
                        #{operName},
                        </if>
                        <if test ='null != size'>
                        #{size},
                        </if>
                        <if test ='null != phone'>
                        #{phone},
                        </if>
                        <if test ='null != workAddress'>
                        #{workAddress},
                        </if>
                        <if test ='null != codes'>
                        #{codes},
                        </if>
                        <if test ='null != logoUrl'>
                        #{logoUrl},
                        </if>
                        <if test ='null != industryType'>
                        #{industryType},
                        </if>
                        <if test ='null != openChannel'>
                        #{openChannel},
                        </if>
                        <if test ='null != linkMan'>
                        #{linkMan},
                        </if>
                        <if test ='null != linkManPhone'>
                        #{linkManPhone},
                        </if>
                        <if test ='null != creditCode'>
                        #{creditCode},
                        </if>
                        <if test ='null != isOnStock'>
                        #{isOnStock},
                        </if>
                        <if test ='null != registerTime'>
                        #{registerTime}
                        </if>
        </trim>
    </insert>

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

    <update id="update" parameterType="cn.timer.api.bean.qyzx.QyzxEntInfoM">
        UPDATE qyzx_ent_info_m
        <set>
                    <if test ='null != name'>name = #{name},</if>
                    <if test ='null != intro'>intro = #{intro},</if>
                    <if test ='null != operName'>oper_name = #{operName},</if>
                    <if test ='null != size'>size = #{size},</if>
                    <if test ='null != phone'>phone = #{phone},</if>
                    <if test ='null != workAddress'>work_address = #{workAddress},</if>
                    <if test ='null != codes'>codes = #{codes},</if>
                    <if test ='null != logoUrl'>logo_url = #{logoUrl},</if>
                    <if test ='null != industryType'>industry_type = #{industryType},</if>
                    <if test ='null != openChannel'>open_channel = #{openChannel},</if>
                    <if test ='null != linkMan'>link_man = #{linkMan},</if>
                    <if test ='null != linkManPhone'>link_man_phone = #{linkManPhone},</if>
                    <if test ='null != creditCode'>credit_code = #{creditCode},</if>
                    <if test ='null != isOnStock'>is_on_stock = #{isOnStock},</if>
                    <if test ='null != registerTime'>register_time = #{registerTime}</if>
        </set>
        WHERE id = #{id}
    </update>


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

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

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

	 -->

</mapper>