zoukankan      html  css  js  c++  java
  • update语句

        <update id="updateOrgEntity">
            UPDATE t_base_org t
            <trim prefix="set" suffixOverrides=",">
                <if test="orgCode!=null">t.org_code=#{orgCode},</if>
                <if test="orgName!=null">t.org_name=#{orgName},</if>
                <if test="companyCode!=null">t.company_code=#{companyCode},</if>
                <if test="companyName!=null">t.company_name=#{companyName},</if>
                <if test="province!=null">t.province=#{province},</if>
                <if test="city!=null">t.city=#{city},</if>
                <if test="county!=null">t.county=#{county},</if>
                <if test="street!=null">t.street=#{street},</if>
                <if test="provinceName!=null">t.province_name=#{provinceName},</if>
                <if test="cityName!=null">t.city_name=#{cityName},</if>
                <if test="countyName!=null">t.county_name=#{countyName},</if>
                <if test="streetName!=null">t.street_name=#{streetName},</if>
                <if test="orgAddress!=null">t.org_address=#{orgAddress},</if>
                <if test="orgActive!=null">t.org_active=#{orgActive},</if>
                <if test="orgKind!=null">t.org_kind=#{orgKind},</if>
                <if test="orgPerson!=null">t.org_person=#{orgPerson},</if>
                <if test="orgPersonMobile!=null">t.org_person_mobile=#{orgPersonMobile},</if>
                <if test="modifyTime!=null">t.modify_time=#{modifyTime},</if>
                <if test="modifyUserCode!=null">t.modify_user_code=#{modifyUserCode},</if>
                <if test="modifyUserName!=null">t.modify_user_name=#{modifyUserName},</if>
                <if test="orgType!=null">t.org_type=#{orgType},</if>
                <if test="orgPhone!=null">t.org_phone=#{orgPhone},</if>
                <if test="jingwei!=null">t.jingwei=#{jingwei},</if>
                <if test="parentCode!=null">t.parent_code=#{parentCode},</if>
            </trim>
            <choose>
                <when test="id !=null">
                    where id=#{id}
                </when>
                <otherwise>
                    WHERE t.org_code=#{orgCode} AND  t.company_code=#{companyCode}
                </otherwise>
            </choose>
        </update>
    

      

  • 相关阅读:
    yocto添加源码并编译进文件系统
    yocto编译加速及单独编译内核与uboot
    mysql 创建索引
    redis初使用
    mysql修改时区
    linux修改时间
    服务器环境配置安装(mysql+redis+nodejs+nginx)
    由于找不到MSVCP20.dll,无法继续执行代码
    sequelize初使用
    css flex
  • 原文地址:https://www.cnblogs.com/feifeicui/p/9811062.html
Copyright © 2011-2022 走看看