From 5231100b94e034e930e851eeec01122ffe02f137 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 13 Feb 2020 22:51:08 +0800 Subject: [PATCH 1/5] =?UTF-8?q?=E7=89=88=E6=9C=AC=E5=BA=93=E5=A2=9E?= =?UTF-8?q?=E5=8A=A0=E6=97=A5=E5=BF=97?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 7fd3547b9..369c5099b 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -265,8 +265,10 @@ 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的都不需要走版本库 - uid_logger_dubug("#######enter_#{@myshixun.identifier}: #{@hide_code}") + uid_logger_dubug("#######enter_#{@myshixun.identifier}: #{@hide_code}; #{@myshixun.shixun&.vnc_evaluate && params[:evaluate].present?}") unless @hide_code || (@myshixun.shixun&.vnc_evaluate && params[:evaluate].present?) + uid_logger_dubug("#######enter_#{@myshixun.identifier}: ---------------- ") + # 远程版本库文件内容 last_content = GitService.file_content(repo_path: @repo_path, path: path)["content"] From 5b4349d6da98f049bf09d97dbf1792918548e343 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 13 Feb 2020 22:59:46 +0800 Subject: [PATCH 2/5] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/myshixuns_controller.rb | 2 -- app/controllers/shixuns_controller.rb | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 369c5099b..43349a6e8 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -265,9 +265,7 @@ 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的都不需要走版本库 - uid_logger_dubug("#######enter_#{@myshixun.identifier}: #{@hide_code}; #{@myshixun.shixun&.vnc_evaluate && params[:evaluate].present?}") unless @hide_code || (@myshixun.shixun&.vnc_evaluate && params[:evaluate].present?) - uid_logger_dubug("#######enter_#{@myshixun.identifier}: ---------------- ") # 远程版本库文件内容 last_content = GitService.file_content(repo_path: @repo_path, path: path)["content"] diff --git a/app/controllers/shixuns_controller.rb b/app/controllers/shixuns_controller.rb index d197b6f9d..d3744fb6e 100644 --- a/app/controllers/shixuns_controller.rb +++ b/app/controllers/shixuns_controller.rb @@ -474,7 +474,7 @@ class ShixunsController < ApplicationController if params[:shixun][:vnc] shixun_params.merge(vnc_evaluate: 1) else - shixun_params + shixun_params.merge(vnc_evaluate: 0) end @shixun.update_attributes!(update_params) end 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 3/5] =?UTF-8?q?=E5=AE=9E=E8=AE=AD=E6=97=A0=E6=B3=95?= =?UTF-8?q?=E6=9B=B4=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 From 96aa79498dfe49122d9683ce93a988c0ce284066 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 13 Feb 2020 23:06:40 +0800 Subject: [PATCH 4/5] vnc --- app/controllers/myshixuns_controller.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/controllers/myshixuns_controller.rb b/app/controllers/myshixuns_controller.rb index 2ced89dc2..f4c73a6a4 100644 --- a/app/controllers/myshixuns_controller.rb +++ b/app/controllers/myshixuns_controller.rb @@ -265,7 +265,7 @@ 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的都不需要走版本库 - vnc = @myshixun.shixun&.vnc && @myshixun.shixun&.vnc_evaluate + vnc = @myshixun.shixun&.vnc unless @hide_code || (vnc && params[:evaluate].present?) # 远程版本库文件内容 From ac22213209c35aa3610e57e222409a7b9f94c6f5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 13 Feb 2020 23:07:41 +0800 Subject: [PATCH 5/5] =?UTF-8?q?=E8=BF=81=E7=A7=BB=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- db/migrate/20200213150113_modify_vnc_evalute_for_shixuns.rb | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/db/migrate/20200213150113_modify_vnc_evalute_for_shixuns.rb b/db/migrate/20200213150113_modify_vnc_evalute_for_shixuns.rb index d9ca128ed..682e8ad60 100644 --- a/db/migrate/20200213150113_modify_vnc_evalute_for_shixuns.rb +++ b/db/migrate/20200213150113_modify_vnc_evalute_for_shixuns.rb @@ -3,7 +3,7 @@ class ModifyVncEvaluteForShixuns < ActiveRecord::Migration[5.2] Shixun.find_each do |shixun| if !shixun.vnc && shixun.vnc_evaluate puts "####shixun_id: #{shixun.id}" - shixun.update_column(vnc_evaluate: false) + shixun.update_column(:vnc_evaluate, false) end end end