From 889fb72345f2343878e9cf4fefcbbb50170ca79a Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 13 Feb 2020 23:05:22 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=97=A0=E6=B3=95=E6=9B=B4?= =?UTF-8?q?=E6=96=B0=E7=89=88=E6=9C=AC=E5=BA=93?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 3 ++- .../20200213150113_modify_vnc_evalute_for_shixuns.rb | 10 ++++++++++ 2 files changed, 12 insertions(+), 1 deletion(-) create mode 100644 db/migrate/20200213150113_modify_vnc_evalute_for_shixuns.rb diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 43349a6e8..2ced89dc2 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -265,7 +265,8 @@ class MyshixunsController < ApplicationController uid_logger_dubug("-- game build: file update #{@sec_key}, record id is #{record.id}, time is **** #{Time.now.strftime("%Y-%m-%d %H:%M:%S.%L")}") end # 隐藏代码文件 和 VNC的都不需要走版本库 - unless @hide_code || (@myshixun.shixun&.vnc_evaluate && params[:evaluate].present?) + vnc = @myshixun.shixun&.vnc && @myshixun.shixun&.vnc_evaluate + unless @hide_code || (vnc && params[:evaluate].present?) # 远程版本库文件内容 last_content = GitService.file_content(repo_path: @repo_path, path: path)["content"] diff --git a/db/migrate/20200213150113_modify_vnc_evalute_for_shixuns.rb b/db/migrate/20200213150113_modify_vnc_evalute_for_shixuns.rb new file mode 100644 index 000000000..d9ca128ed --- /dev/null +++ b/db/migrate/20200213150113_modify_vnc_evalute_for_shixuns.rb @@ -0,0 +1,10 @@ +class ModifyVncEvaluteForShixuns < ActiveRecord::Migration[5.2] + def change + Shixun.find_each do |shixun| + if !shixun.vnc && shixun.vnc_evaluate + puts "####shixun_id: #{shixun.id}" + shixun.update_column(vnc_evaluate: false) + end + end + end +end