insert into buiness_small_wechat (operate,appId,name,appSecret,wechat_id,b_id,store_Id,pay_password,remarks,obj_id,obj_type,mch_id,wechat_type) values (#{operate},#{appId},#{name},#{appSecret},#{weChatId},#{bId},#{storeId},#{payPassword},#{remarks},#{objId},#{objType},#{mchId},#{weChatType}) insert into small_wechat (create_time,appId,name,appSecret,status_cd,wechat_id,b_id,store_Id,pay_password,remarks,obj_id,obj_type,mch_id,wechat_type) 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,t.obj_id,t.obj_type,t.mch_id,t.wechat_type 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.wechat_type= #{weChatType} 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} , t.obj_id= #{objId} , t.obj_type= #{objType} , t.mch_id= #{mchId} where 1=1 and t.wechat_id= #{weChatId} and t.b_id= #{bId}