From 1b77b2a10f1a2996bf6290a073685cb22b3719b5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 20 Feb 2020 21:23:47 +0800 Subject: [PATCH 1/9] 1 --- db/migrate/20200218060757_create_salesman_channels.rb | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/db/migrate/20200218060757_create_salesman_channels.rb b/db/migrate/20200218060757_create_salesman_channels.rb index e43fd0a51..48946aba2 100644 --- a/db/migrate/20200218060757_create_salesman_channels.rb +++ b/db/migrate/20200218060757_create_salesman_channels.rb @@ -1,9 +1,9 @@ class CreateSalesmanChannels < ActiveRecord::Migration[5.2] def change - create_table :salesman_channels do |t| - t.references :salesman - t.references :school - t.timestamps - end + # create_table :salesman_channels do |t| + # t.references :salesman + # t.references :school + # t.timestamps + # end end end From 0eb75d14546130f8508a769a606da3e8ece4de6c Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 20 Feb 2020 21:24:32 +0800 Subject: [PATCH 2/9] 1 --- .../20200218060807_create_salesman_customers.rb | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/db/migrate/20200218060807_create_salesman_customers.rb b/db/migrate/20200218060807_create_salesman_customers.rb index a27f8ca95..7b9c99753 100644 --- a/db/migrate/20200218060807_create_salesman_customers.rb +++ b/db/migrate/20200218060807_create_salesman_customers.rb @@ -1,10 +1,10 @@ class CreateSalesmanCustomers < ActiveRecord::Migration[5.2] def change - create_table :salesman_customers do |t| - t.references :salesman - t.references :user - t.references :school - t.timestamps - end + # create_table :salesman_customers do |t| + # t.references :salesman + # t.references :user + # t.references :school + # t.timestamps + # end end end From 012553f52a000a5c60550f8b23761fcf37b02e47 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 20 Feb 2020 21:25:31 +0800 Subject: [PATCH 3/9] =?UTF-8?q?=E5=9B=9E=E5=A4=8D=E8=BF=81=E7=A7=BB?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../20200218060757_create_salesman_channels.rb | 10 +++++----- .../20200218060807_create_salesman_customers.rb | 12 ++++++------ 2 files changed, 11 insertions(+), 11 deletions(-) diff --git a/db/migrate/20200218060757_create_salesman_channels.rb b/db/migrate/20200218060757_create_salesman_channels.rb index 48946aba2..e43fd0a51 100644 --- a/db/migrate/20200218060757_create_salesman_channels.rb +++ b/db/migrate/20200218060757_create_salesman_channels.rb @@ -1,9 +1,9 @@ class CreateSalesmanChannels < ActiveRecord::Migration[5.2] def change - # create_table :salesman_channels do |t| - # t.references :salesman - # t.references :school - # t.timestamps - # end + create_table :salesman_channels do |t| + t.references :salesman + t.references :school + t.timestamps + end end end diff --git a/db/migrate/20200218060807_create_salesman_customers.rb b/db/migrate/20200218060807_create_salesman_customers.rb index 7b9c99753..a27f8ca95 100644 --- a/db/migrate/20200218060807_create_salesman_customers.rb +++ b/db/migrate/20200218060807_create_salesman_customers.rb @@ -1,10 +1,10 @@ class CreateSalesmanCustomers < ActiveRecord::Migration[5.2] def change - # create_table :salesman_customers do |t| - # t.references :salesman - # t.references :user - # t.references :school - # t.timestamps - # end + create_table :salesman_customers do |t| + t.references :salesman + t.references :user + t.references :school + t.timestamps + end end end From 4a96d7c38bfa4869f5bfadad105b93521e612212 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 20 Feb 2020 21:42:22 +0800 Subject: [PATCH 4/9] =?UTF-8?q?=E7=94=B3=E8=AF=B7=E5=8F=91=E5=B8=83?= =?UTF-8?q?=E6=8F=90=E7=A4=BA=E4=BF=AE=E6=94=B9?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/subjects/publish.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/subjects/publish.json.jbuilder b/app/views/subjects/publish.json.jbuilder index fdb4b43da..c6cc8fef9 100644 --- a/app/views/subjects/publish.json.jbuilder +++ b/app/views/subjects/publish.json.jbuilder @@ -1,2 +1,2 @@ json.status 0 -json.message "发布成功" \ No newline at end of file +json.message "课程需经过平台审核方可公开使用,公开的课程将对平台所有人公开可见。若仅本人教学使用则无需申请公开" \ No newline at end of file From f2b9c94c1bbc49d5c89916ecc4496c72c598f181 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 20 Feb 2020 21:43:22 +0800 Subject: [PATCH 5/9] 1 --- app/views/subjects/publish.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/subjects/publish.json.jbuilder b/app/views/subjects/publish.json.jbuilder index c6cc8fef9..6b34ba2ef 100644 --- a/app/views/subjects/publish.json.jbuilder +++ b/app/views/subjects/publish.json.jbuilder @@ -1,2 +1,2 @@ json.status 0 -json.message "课程需经过平台审核方可公开使用,公开的课程将对平台所有人公开可见。若仅本人教学使用则无需申请公开" \ No newline at end of file +json.message "课程需经过平台审核方可公开使用,公开的课程将对平台所有人公开可见。若仅本人教学使用则无需申请公开, 直接发送到课堂即可" \ No newline at end of file From 1c14311aa05df774b45eedec115c036558a39109 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Thu, 20 Feb 2020 23:01:38 +0800 Subject: [PATCH 6/9] =?UTF-8?q?=E6=8F=90=E7=A4=BA=E5=8E=BB=E9=99=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/views/subjects/publish.json.jbuilder | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/views/subjects/publish.json.jbuilder b/app/views/subjects/publish.json.jbuilder index 6b34ba2ef..fdb4b43da 100644 --- a/app/views/subjects/publish.json.jbuilder +++ b/app/views/subjects/publish.json.jbuilder @@ -1,2 +1,2 @@ json.status 0 -json.message "课程需经过平台审核方可公开使用,公开的课程将对平台所有人公开可见。若仅本人教学使用则无需申请公开, 直接发送到课堂即可" \ No newline at end of file +json.message "发布成功" \ No newline at end of file From bb5e8ee0b0df678a5c3d359e403ea099de801d23 Mon Sep 17 00:00:00 2001 From: cxt <853663049@qq.com> Date: Fri, 21 Feb 2020 10:04:52 +0800 Subject: [PATCH 7/9] =?UTF-8?q?=E8=AF=95=E5=8D=B7=E7=9A=84=E5=88=97?= =?UTF-8?q?=E8=A1=A8=E5=88=86=E7=8F=AD=E7=AD=9B=E9=80=89=E6=8A=A5=E9=94=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/controllers/concerns/controller_rescue_handler.rb | 4 ++++ app/controllers/exercises_controller.rb | 2 +- 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/app/controllers/concerns/controller_rescue_handler.rb b/app/controllers/concerns/controller_rescue_handler.rb index 60ac09d64..a3e603bd9 100644 --- a/app/controllers/concerns/controller_rescue_handler.rb +++ b/app/controllers/concerns/controller_rescue_handler.rb @@ -10,6 +10,10 @@ module ControllerRescueHandler Util.logger_error e render json: {status: -1, message: "接口数据异常"} end + rescue_from NoMethodError do |e| + Util.logger_error e + render json: {status: -1, message: "接口方法异常"} + end # rescue_from ActionView::MissingTemplate, with: :object_not_found # rescue_from ActiveRecord::RecordNotFound, with: :object_not_found rescue_from Educoder::TipException, with: :tip_show diff --git a/app/controllers/exercises_controller.rb b/app/controllers/exercises_controller.rb index 60a437fdc..15f5c67d9 100644 --- a/app/controllers/exercises_controller.rb +++ b/app/controllers/exercises_controller.rb @@ -1168,7 +1168,7 @@ class ExercisesController < ApplicationController #班级的选择 if params[:exercise_group_id].present? group_id = params[:exercise_group_id] - exercise_students = @course_all_members.course_find("course_group_id", group_id) #试卷所分班的全部人数 + exercise_students = @course_all_members.course_find_by_ids("course_group_id", group_id) #试卷所分班的全部人数 user_ids = exercise_students.pluck(:user_id).reject(&:blank?) @exercise_users_list = @exercise_users_list.exercise_commit_users(user_ids) end From 84d0218e482847b35f2fb0780df194c1085bc977 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 21 Feb 2020 10:09:29 +0800 Subject: [PATCH 8/9] 1 --- db/migrate/20200218060227_create_salesmans.rb | 14 +++++++------- .../20200218060757_create_salesman_channels.rb | 10 +++++----- .../20200218060807_create_salesman_customers.rb | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/db/migrate/20200218060227_create_salesmans.rb b/db/migrate/20200218060227_create_salesmans.rb index 74c78da07..8b9e6f367 100644 --- a/db/migrate/20200218060227_create_salesmans.rb +++ b/db/migrate/20200218060227_create_salesmans.rb @@ -1,11 +1,11 @@ class CreateSalesmans < ActiveRecord::Migration[5.2] def change - create_table :salesmans do |t| - t.references :user - t.string :name - t.integer :salesman_channels_count - t.integer :salesman_customers_count - t.timestamps - end + # create_table :salesmans do |t| + # t.references :user + # t.string :name + # t.integer :salesman_channels_count + # t.integer :salesman_customers_count + # t.timestamps + # end end end diff --git a/db/migrate/20200218060757_create_salesman_channels.rb b/db/migrate/20200218060757_create_salesman_channels.rb index e43fd0a51..48946aba2 100644 --- a/db/migrate/20200218060757_create_salesman_channels.rb +++ b/db/migrate/20200218060757_create_salesman_channels.rb @@ -1,9 +1,9 @@ class CreateSalesmanChannels < ActiveRecord::Migration[5.2] def change - create_table :salesman_channels do |t| - t.references :salesman - t.references :school - t.timestamps - end + # create_table :salesman_channels do |t| + # t.references :salesman + # t.references :school + # t.timestamps + # end end end diff --git a/db/migrate/20200218060807_create_salesman_customers.rb b/db/migrate/20200218060807_create_salesman_customers.rb index a27f8ca95..7b9c99753 100644 --- a/db/migrate/20200218060807_create_salesman_customers.rb +++ b/db/migrate/20200218060807_create_salesman_customers.rb @@ -1,10 +1,10 @@ class CreateSalesmanCustomers < ActiveRecord::Migration[5.2] def change - create_table :salesman_customers do |t| - t.references :salesman - t.references :user - t.references :school - t.timestamps - end + # create_table :salesman_customers do |t| + # t.references :salesman + # t.references :user + # t.references :school + # t.timestamps + # end end end From b8fc11828c139269848f2388ac248a15793897e5 Mon Sep 17 00:00:00 2001 From: daiao <358551898@qq.com> Date: Fri, 21 Feb 2020 10:10:15 +0800 Subject: [PATCH 9/9] 1 --- db/migrate/20200218060227_create_salesmans.rb | 14 +++++++------- .../20200218060757_create_salesman_channels.rb | 10 +++++----- .../20200218060807_create_salesman_customers.rb | 12 ++++++------ 3 files changed, 18 insertions(+), 18 deletions(-) diff --git a/db/migrate/20200218060227_create_salesmans.rb b/db/migrate/20200218060227_create_salesmans.rb index 8b9e6f367..74c78da07 100644 --- a/db/migrate/20200218060227_create_salesmans.rb +++ b/db/migrate/20200218060227_create_salesmans.rb @@ -1,11 +1,11 @@ class CreateSalesmans < ActiveRecord::Migration[5.2] def change - # create_table :salesmans do |t| - # t.references :user - # t.string :name - # t.integer :salesman_channels_count - # t.integer :salesman_customers_count - # t.timestamps - # end + create_table :salesmans do |t| + t.references :user + t.string :name + t.integer :salesman_channels_count + t.integer :salesman_customers_count + t.timestamps + end end end diff --git a/db/migrate/20200218060757_create_salesman_channels.rb b/db/migrate/20200218060757_create_salesman_channels.rb index 48946aba2..e43fd0a51 100644 --- a/db/migrate/20200218060757_create_salesman_channels.rb +++ b/db/migrate/20200218060757_create_salesman_channels.rb @@ -1,9 +1,9 @@ class CreateSalesmanChannels < ActiveRecord::Migration[5.2] def change - # create_table :salesman_channels do |t| - # t.references :salesman - # t.references :school - # t.timestamps - # end + create_table :salesman_channels do |t| + t.references :salesman + t.references :school + t.timestamps + end end end diff --git a/db/migrate/20200218060807_create_salesman_customers.rb b/db/migrate/20200218060807_create_salesman_customers.rb index 7b9c99753..a27f8ca95 100644 --- a/db/migrate/20200218060807_create_salesman_customers.rb +++ b/db/migrate/20200218060807_create_salesman_customers.rb @@ -1,10 +1,10 @@ class CreateSalesmanCustomers < ActiveRecord::Migration[5.2] def change - # create_table :salesman_customers do |t| - # t.references :salesman - # t.references :user - # t.references :school - # t.timestamps - # end + create_table :salesman_customers do |t| + t.references :salesman + t.references :user + t.references :school + t.timestamps + end end end