Commit 8c5da4dcfed3daa1649af2aab421f259d91d2f00

Authored by 刘岱鹏
1 parent ece9e2d1

修复错误数据

Showing 1 changed file with 23 additions and 1 deletions
database/sql_log.sql
... ... @@ -3172,4 +3172,26 @@ update zygj_solution_class,class set zygj_solution_class.class_target=class.type
3172 3172  
3173 3173 -- ----------------------------
3174 3174 -- 2017-09-21 刘岱鹏 脚本版本 201709211426 END
3175   --- ----------------------------
3176 3175 \ No newline at end of file
  3176 +-- ----------------------------
  3177 +
  3178 +-- ----------------------------
  3179 +-- 2017-09-21
  3180 +-- 刘岱鹏
  3181 +-- 脚本版本 201709211726
  3182 +-- 涉及功能 更新错误数据
  3183 +-- START
  3184 +-- ----------------------------
  3185 +
  3186 +insert into zygj_solution_class (
  3187 +zygj_solution_id,class_id,class_property,class_way,term,created_at,updated_at,delete_flag,credit_score,study_hour,user_id,class_type,practice_hour,theory_hour,class_target,category_id,type,class_status,class_alias) select zygj_solution_id,class_id,class_property,class_way,term,created_at,updated_at,delete_flag,
  3188 +credit_score,study_hour,user_id,class_type,99,theory_hour,class_target,category_id,0,0,class_alias from zygj_solution_class where type=1;
  3189 +
  3190 +
  3191 +update zygj_solution_class t1,(select IFNULL(c.root_class,zc.class_id) root_class,zc.class_id from zygj_solution_class zc join class c on zc.class_id=c.class_id where zc.delete_flag=1 and c.delete_flag=1 group by zc.class_id
  3192 +)t2 set t1.class_id=t2.root_class where t1.class_id=t2.class_id and t1.delete_flag=1 and t1.practice_hour=99 ;
  3193 +
  3194 +
  3195 +update zygj_solution_class set practice_hour=0 where practice_hour=99;
  3196 +-- ----------------------------
  3197 +-- 2017-09-21 刘岱鹏 脚本版本 201709211726 END
  3198 +-- ----------------------------
... ...