insert into storehouse(sh_desc, sh_id, sh_name, store_id, is_show, purchase_switch, purchase_raf_id,
use_switch, use_raf_id, allocation_switch, allocation_raf_id, community_id,
allow_purchase, allow_use)
values (#{shDesc}, #{shId}, #{shName}, #{storeId}, #{isShow}
, #{purchaseSwitch}, #{purchaseRafId}, #{useSwitch}, #{useRafId}, #{allocationSwitch},
#{allocationRafId},
#{communityId}, #{allowPurchase}, #{allowUse})
update storehouse t set t.status_cd = #{statusCd}
,t.b_id = #{newBId}
, t.sh_desc= #{shDesc}
, t.purchase_switch= #{purchaseSwitch}
, t.purchase_raf_id= #{purchaseRafId}
, t.use_switch= #{useSwitch}
, t.use_raf_id= #{useRafId}
, t.allocation_switch= #{allocationSwitch}
, t.allocation_raf_id= #{allocationRafId}
, t.sh_name= #{shName}
, t.is_show= #{isShow}
, t.allow_purchase= #{allowPurchase}
, t.allow_use= #{allowUse}
where 1=1
and t.sh_id= #{shId}
and t.community_id= #{communityId}
and t.store_id= #{storeId}