main
黄海 2 years ago
parent 06f103e989
commit a66d3baa44

@ -6,7 +6,7 @@ from faker import Faker
import datetime import datetime
from MySQLHelper import MySQLHelper from MySQLHelper import MySQLHelper
maxN = 100000 maxN = 1000000
# 黄海定义的输出信息的办法,带当前时间 # 黄海定义的输出信息的办法,带当前时间
@ -51,8 +51,8 @@ db.execute(sql)
sql = "insert into t_zy_score(zy_id,person_id,score)values(%s,%s,%s)" sql = "insert into t_zy_score(zy_id,person_id,score)values(%s,%s,%s)"
data = [] data = []
for x in range(1, 301): # 作业 for x in range(1, 1001): # 作业
for y in range(1, 301): # 人员 for y in range(1, 1001): # 人员
obj = [x, y, random.randint(1, 100)] obj = [x, y, random.randint(1, 100)]
data.append(obj) data.append(obj)
db.executemany(sql, data) db.executemany(sql, data)

@ -1,15 +1,15 @@
{ {
"t_zy_score": [ "t_zy_score": [
{ {
"sql": "update t_zy_score as t1 left join t_base_person as t2 on t1.person_id=t2.person_id set t1.check_flag=-1 where t2.person_id is null", "sql": "update t_zy_score as t1 left join t_base_person as t2 on t1.person_id=t2.person_id set t1.check_flag=-1 where t1.check_flag=0 and t2.person_id is null",
"memo": "检查人员ID不存在的情况" "memo": "检查人员ID不存在的情况"
}, },
{ {
"sql": "update t_zy_score as t1 left join t_zy_main as t2 on t1.zy_id=t2.zy_id set t1.zy_name=t2.zy_name where t1.zy_name is null", "sql": "update t_zy_score as t1 left join t_zy_main as t2 on t1.zy_id=t2.zy_id set t1.zy_name=t2.zy_name where t1.check_flag=0 and t1.zy_name is null",
"memo": "扩展作业名称字段内容" "memo": "扩展作业名称字段内容"
}, },
{ {
"sql": "update t_zy_score as t1 set t1.check_flag=-1 where t1.zy_name is null", "sql": "update t_zy_score as t1 set t1.check_flag=-1 where t1.check_flag=0 and t1.zy_name is null",
"memo": "没补上名称的就是坏人" "memo": "没补上名称的就是坏人"
}, },
{ {

Loading…
Cancel
Save