<?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.easyproject.service.mapper.operate.OperateWebsiteSetMapper">
    
    <resultMap type="OperateWebsiteSet" id="OperateWebsiteSetResult">
        <result property="id"    column="id"    />
        <result property="competentUnit"    column="competent_unit"    />
        <result property="organizer"    column="organizer"    />
        <result property="icpRecord"    column="icp_record"    />
        <result property="websiteIdentifier"    column="website_identifier"    />
        <result property="securityRecord"    column="security_record"    />
        <result property="officeHours"    column="office_hours"    />
        <result property="officeAddress"    column="office_address"    />
        <result property="dutyPhone"    column="duty_phone"    />
        <result property="fax"    column="fax"    />
        <result property="reportPhone"    column="report_phone"    />
        <result property="reportMail"    column="report_mail"    />
        <result property="serviceHotline"    column="service_hotline"    />
        <result property="miniAppQrcodeUrl" column="mini_app_qrcode_url" />
        <result property="miniAppLink" column="mini_app_link" />
        <result property="policyFileUrl" column="policy_file_url" />
        <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="selectOperateWebsiteSetVo">
        select id, competent_unit, organizer, icp_record, website_identifier, security_record, office_hours, office_address, duty_phone, fax, report_phone, report_mail,
               service_hotline, mini_app_qrcode_url, mini_app_link,policy_file_url,
               create_by, create_time, update_by, update_time, remark from operate_website_set
    </sql>
    
    <select id="selectOperateWebsiteSetById" parameterType="Long" resultMap="OperateWebsiteSetResult">
        <include refid="selectOperateWebsiteSetVo"/>
        where id = #{id}
    </select>

    <update id="updateOperateWebsiteSet" parameterType="OperateWebsiteSet">
        update operate_website_set
        <trim prefix="SET" suffixOverrides=",">
            <if test="competentUnit != null and competentUnit != ''">competent_unit = #{competentUnit},</if>
            <if test="organizer != null and organizer != ''">organizer = #{organizer},</if>
            <if test="icpRecord != null and icpRecord != ''">icp_record = #{icpRecord},</if>
            <if test="websiteIdentifier != null and websiteIdentifier != ''">website_identifier = #{websiteIdentifier},</if>
            <if test="securityRecord != null and securityRecord != ''">security_record = #{securityRecord},</if>
            <if test="officeHours != null and officeHours != ''">office_hours = #{officeHours},</if>
            <if test="officeAddress != null and officeAddress != ''">office_address = #{officeAddress},</if>
            <if test="dutyPhone != null and dutyPhone != ''">duty_phone = #{dutyPhone},</if>
            <if test="fax != null and fax != ''">fax = #{fax},</if>
            <if test="reportPhone != null and reportPhone != ''">report_phone = #{reportPhone},</if>
            <if test="reportMail != null and reportMail != ''">report_mail = #{reportMail},</if>
            <if test="serviceHotline != null and serviceHotline != ''">service_hotline = #{serviceHotline},</if>
            <if test="miniAppQrcodeUrl != null and miniAppQrcodeUrl != ''">mini_app_qrcode_url = #{miniAppQrcodeUrl},</if>
            <if test="miniAppLink != null and miniAppLink != ''">mini_app_link = #{miniAppLink},</if>
            <if test="policyFileUrl != null and policyFileUrl != ''">policy_file_url = #{policyFileUrl},</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 id = 1
    </update>

</mapper>