insert into bm_contract(contract_code, contract_name, status, create_time, owner_id, owner_com) values(#{contractCode}, #{contractName}, #{status}, now(), #{ownerId}, #{ownerCom}) update bm_contract set contract_name = #{contractName}, status = #{status}, owner_id = #{ownerId}, owner_com = #{ownerCom}, update_time = now() where id = #{id} update bm_contract set status = #{status} where id = #{id} update bm_contract set status = 0 where owner_com = #{ownerCom} and id != #{id} delete from bm_contract where id = #{id}