insert into business_account( amount,operate,acct_type,obj_id,acct_id,acct_name,b_id,obj_type ) values ( #{amount},#{operate},#{acctType},#{objId},#{acctId},#{acctName},#{bId},#{objType} ) insert into account( amount,acct_type,obj_id,acct_id,status_cd,acct_name,b_id,obj_type ) select t.amount,t.acct_type,t.obj_id,t.acct_id,'0',t.acct_name,t.b_id,t.obj_type from business_account t where 1=1 and t.amount= #{amount} and t.operate= 'ADD' and t.acct_type= #{acctType} and t.obj_id= #{objId} and t.acct_id= #{acctId} and t.acct_name= #{acctName} and t.b_id= #{bId} and t.obj_type= #{objType} update account t set t.status_cd = #{statusCd} ,t.b_id = #{newBId} , t.amount= #{amount} , t.acct_type= #{acctType} , t.obj_id= #{objId} , t.acct_name= #{acctName} , t.obj_type= #{objType} where 1=1 and t.acct_id= #{acctId} and t.b_id= #{bId}