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>
    

      

  • 相关阅读:
    用OLEDB读取EXCEL时,单元格内容长度超过255被截断
    jquery对属性和特性的操作
    yum报[Errno 256] No more mirrors to try
    c语言:计算数组长度
    递归之100.相同的树
    1160.Find Words That Can Be Formed By Characters
    892.surface area of 3D shapes
    递归之24&206(链表)
    C++ private
    Dell 7559 安装黑苹果 Mojave14.15.6
  • 原文地址:https://www.cnblogs.com/feifeicui/p/9811062.html
Copyright © 2011-2022 走看看