Merge branch 'dev_aliyun' of http://bdgit.educoder.net/Hjqreturn/educoder into dev_aliyun

Adjustreact
cxt 5 years ago
commit 73658397d2

@ -23,23 +23,23 @@ class ApplicationController < ActionController::Base
# 所有请求必须合法签名
def check_sign
# if !Rails.env.development?
# Rails.logger.info("66666 #{params}")
# # suffix = request.url.split(".").last.split("?").first
# # suffix_arr = ["xls", "xlsx", "pdf", "zip"] # excel文件先注释
# # unless suffix_arr.include?(suffix)
# if params[:client_key].present?
# randomcode = params[:randomcode]
# # tip_exception(501, "请求不合理") unless (Time.now.to_i - randomcode.to_i).between?(0,5)
#
# sign = Digest::MD5.hexdigest("#{OPENKEY}#{randomcode}")
# Rails.logger.info("2222 #{sign}")
# tip_exception(501, "请求不合理") if sign != params[:client_key]
# else
# tip_exception(501, "请求不合理")
# end
# # end
# end
if !Rails.env.development?
Rails.logger.info("66666 #{params}")
# suffix = request.url.split(".").last.split("?").first
# suffix_arr = ["xls", "xlsx", "pdf", "zip"] # excel文件先注释
# unless suffix_arr.include?(suffix)
if params[:client_key].present?
randomcode = params[:randomcode]
# tip_exception(501, "请求不合理") unless (Time.now.to_i - randomcode.to_i).between?(0,5)
sign = Digest::MD5.hexdigest("#{OPENKEY}#{randomcode}")
Rails.logger.info("2222 #{sign}")
tip_exception(501, "请求不合理") if sign != params[:client_key]
else
tip_exception(501, "请求不合理")
end
# end
end
end
# 全局配置参数

@ -9,8 +9,8 @@ namespace :subjects do
buffer_size = 0
column_value = "subject_id, study_count, course_study_count, initiative_study, passed_count, course_used_count, " +
"school_used_count, created_at, updated_at"
subjects.find_in_batches(batch_size: 50) do |s, index|
Parallel.each_with_index(s, in_processes: 4) do |subject|
subjects.find_in_batches(batch_size: 50) do |s|
Parallel.each(s, in_processes: 4) do |subject|
puts("---------------------data_statistic: #{subject.id}")
Rails.logger.info("---------------------data_statistic: #{subject.id}")
data = Subjects::DataStatisticService.new(subject)
@ -23,7 +23,8 @@ namespace :subjects do
"#{data.passed_count}, #{data.course_used_count}, #{data.school_used_count}, " +
"'#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}', '#{Time.now.strftime('%Y-%m-%d %H:%M:%S')}')")
buffer_size += 1
if buffer_size == 1000 || subjects.count == (index+1)
puts "buffer_size: #{buffer_size}; subject: #{subject == s.last}; index:#{index+1}"
if buffer_size == 1000 || subject == s.last
sql = "REPLACE INTO subject_records(#{column_value}) VALUES #{str}"
puts sql
ActiveRecord::Base.connection.execute sql

Binary file not shown.

Before

Width:  |  Height:  |  Size: 8.8 KiB

After

Width:  |  Height:  |  Size: 66 KiB

@ -120,7 +120,7 @@ const options = [{
value: '广东',
label: '广东',
children: [{
value: "广州",
value: "广州",
label: '广州'
},{
value: '深圳',
@ -493,6 +493,9 @@ const options = [{
children: [{
value: "兰州",
label: '兰州'
},{
value: "嘉峪关",
label: '嘉峪关'
},{
value: '白银',
label: '白银'
@ -537,7 +540,7 @@ const options = [{
value: '广西',
label: '广西',
children: [{
value: "南宁",
value: "南宁",
label: '南宁'
},{
value: '百色',

@ -247,7 +247,7 @@ const App = (props) => {
<section className="static_section_header">
<div className="header_title">
<span className="title-p">学习统计</span>
<span className="title-sub">Android综合实训之物联网移动应用</span>
<span className="title-sub"></span>
</div>
<div className="header-number header-flex">
<StaticNumberAndTxt

@ -30,13 +30,13 @@
font-weight: bold;
&::before{
position: absolute;
content: '';
border-left: 1px solid rgba(192,196,204,1);
right: -10px;
top: 2px;
bottom: 0px;
margin-left: 10px;
//position: absolute;
//content: '';
//border-left: 1px solid rgba(192,196,204,1);
//right: -10px;
//top: 2px;
//bottom: 0px;
//margin-left: 10px;
}
}
.title-sub{
@ -105,7 +105,7 @@
.ant-table-thead{
th{
background: rgba(241,248,255,1);
}
.ant-table-column-title{
color: #303133;
@ -152,5 +152,5 @@
}
.tool-clazz{
max-width: 200px !important;
max-width: 200px !important;
}

Loading…
Cancel
Save