相关操作解析.sql 1.2 KB

12345678910111213141516171819202122232425262728293031323334
  1. /*
  2. jy_platfrom 平台表 ,jy_user 用户表
  3. 删除平台需执行三条sql
  4. 1.修改平台表逻辑删除字段值
  5. 2.修改用户角色为普通警员
  6. 3.修改用户表平台关联关系,设置为江门普通警员
  7. ? 为占位符,填入需要删除平台的id
  8. */
  9. update jy_platfrom set rec_status = ? where id = ?;
  10. update sys_user set role_id = 47 where id in (select sys_user_id from jy_user where platform_id = ?);
  11. update jy_user set platform_id = 1,is_jm =1 where platform_id = ?;
  12. /**
  13. 禁用平台,与删除平台同理
  14. status 0 正常,1禁用
  15. ? 为占位符,填入需要禁用平台的id
  16. */
  17. update jy_platfrom set status = 1 where id = ?;
  18. update sys_user set role_id = 47 where id in (select sys_user_id from jy_user where platform_id = ?);
  19. update jy_user set platform_id = 1,is_jm =1 where platform_id = ?;
  20. /*
  21. t_scene_plus 场景表
  22. 1.修改场景表逻辑删除字段值
  23. ? 为占位符,填入需要删除场景的场景码
  24. */
  25. update t_scene_plus set rec_status = 'I' where num = ?;
  26. /*
  27. sys_user 用户登录表
  28. 1.修改登录密码
  29. ? 为占位符,第一个填入明文密码,第二个填入需要修改用户的ryNo即登录账号
  30. */
  31. update sys_user set password = MD5('?') WHERE user_name = ?;