insert into buiness_small_wechat (operate,appId,name,appSecret,weChat_id,b_id,store_Id,pay_password,remarks) values (#{operate},#{appId},#{name},#{appSecret},#{weChatId},#{bId},#{storeId},#{payPassword},#{remarks}) insert into small_wechat (create_time,appId,name,appSecret,status_cd,weChat_id,b_id,store_Id,pay_password,remarks) select t.create_time,t.appId,t.name,t.appSecret,'0', t.weChat_id,t.b_id,t.store_Id,t.pay_password,t.remarks from buiness_small_wechat t where 1=1 and t.operate= 'ADD' and t.create_time= #{createTime} and t.appId= #{appId} and t.name= #{name} and t.appSecret= #{appSecret} and t.weChat_id= #{weChatId} and t.b_id= #{bId} and t.store_Id= #{storeId} and t.pay_password= #{payPassword} and t.remarks= #{remarks} update small_wechat t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.create_time= #{createTime} , t.appId= #{appId} , t.name= #{name} , t.appSecret= #{appSecret} , t.store_Id= #{storeId} , t.pay_password= #{payPassword} , t.remarks= #{remarks} where 1=1 and t.weChat_id= #{weChatId} and t.b_id= #{bId}