|  |  |  | 
|---|
|  |  |  | <result property="companyId" column="company_id" /> | 
|---|
|  |  |  | <result property="plates" column="plates" /> | 
|---|
|  |  |  | <result property="shopAble" column="shop_able" /> | 
|---|
|  |  |  | <result property="customer" column="customer" /> | 
|---|
|  |  |  | </resultMap> | 
|---|
|  |  |  |  | 
|---|
|  |  |  |  | 
|---|
|  |  |  | 
|---|
|  |  |  | company_id, | 
|---|
|  |  |  | plates, | 
|---|
|  |  |  | is_default, | 
|---|
|  |  |  | customer, | 
|---|
|  |  |  | shop_able | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | VALUES ( | 
|---|
|  |  |  | 
|---|
|  |  |  | #{companyId}, | 
|---|
|  |  |  | #{plates}, | 
|---|
|  |  |  | #{isDefault}, | 
|---|
|  |  |  | #{customer}, | 
|---|
|  |  |  | #{shopAble} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | </insert> | 
|---|
|  |  |  | 
|---|
|  |  |  | company_id, | 
|---|
|  |  |  | plates, | 
|---|
|  |  |  | is_default, | 
|---|
|  |  |  | customer, | 
|---|
|  |  |  | shop_able | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | VALUES | 
|---|
|  |  |  | 
|---|
|  |  |  | #{item.companyId}, | 
|---|
|  |  |  | #{item.plates}, | 
|---|
|  |  |  | #{item.isDefault}, | 
|---|
|  |  |  | #{item.customer}, | 
|---|
|  |  |  | #{item.shopAble} | 
|---|
|  |  |  | ) | 
|---|
|  |  |  | </foreach> | 
|---|
|  |  |  | 
|---|
|  |  |  | <if test="_parameter.containsKey('shopAble')"> | 
|---|
|  |  |  | shop_able = #{shopAble}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="_parameter.containsKey('customer')"> | 
|---|
|  |  |  | customer = #{customer}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </set> | 
|---|
|  |  |  | WHERE role_id=#{roleId} | 
|---|
|  |  |  | </update> | 
|---|
|  |  |  | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="(shopAble!=null and shopAble!='') or (shopAble!='' and shopAble==0)"> | 
|---|
|  |  |  | shop_able = #{shopAble}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | <if test="(customer!=null and customer!='') or (customer!='' and customer==0)"> | 
|---|
|  |  |  | customer = #{customer}, | 
|---|
|  |  |  | </if> | 
|---|
|  |  |  | </set> | 
|---|
|  |  |  | WHERE role_id=#{roleId} | 
|---|
|  |  |  | 
|---|
|  |  |  | company_id, | 
|---|
|  |  |  | plates, | 
|---|
|  |  |  | is_default, | 
|---|
|  |  |  | customer, | 
|---|
|  |  |  | shop_able | 
|---|
|  |  |  | from sys_role | 
|---|
|  |  |  | <where> | 
|---|
|  |  |  | 
|---|
|  |  |  | company_id, | 
|---|
|  |  |  | plates, | 
|---|
|  |  |  | is_default, | 
|---|
|  |  |  | customer, | 
|---|
|  |  |  | shop_able | 
|---|
|  |  |  | from sys_role | 
|---|
|  |  |  | where role_id=#{roleId} | 
|---|
|  |  |  | 
|---|
|  |  |  | company_id, | 
|---|
|  |  |  | plates, | 
|---|
|  |  |  | is_default, | 
|---|
|  |  |  | customer, | 
|---|
|  |  |  | shop_able | 
|---|
|  |  |  | from sys_role | 
|---|
|  |  |  | <where> | 
|---|