1.部门管理(对部门curd)
sys_depart:树形结构
1. SELECT 2. id, 3. parent_id, 4. depart_name, 5. depart_name_en, 6. depart_name_abbr, 7. depart_order, 8. description, 9. org_type, 10. org_code, 11. mobile, 12. fax, 13. address, 14. memo, 15. STATUS, 16. del_flag, 17. create_by, 18. create_time, 19. update_by, 20. update_time 21. FROM 22. sys_depart 23. WHERE 24. parent_id = ? 25. ORDER BY 26. org_code DESC
2.消息
sys_announcement:系统消息表
sys_announcement_send:已读的系统消息表
1. select 2. sas.id, 3. sas.annt_id, 4. sas.user_id, 5. sas.read_flag, 6. sa.titile as titile, 7. sa.msg_content as msg_content, 8. sa.sender as sender, 9. sa.priority as priority, 10. sa.msg_category, 11. sa.send_time as send_time 12. from sys_announcement_send sas 13. left join sys_announcement sa ON sas.annt_id = sa.id 14. where sa.send_status = '1' 15. and sa.del_flag = '0' 16. and sas.user_id = ? 17. order by sa.send_time desc
3.我的部门
通过部门查询该部门下的人
1. SELECT 2. * 3. FROM 4. sys_user 5. WHERE 6. del_flag = '0' 7. AND id IN ( 8. SELECT 9. user_id 10. FROM 11. sys_user_depart 12. WHERE 13. dep_id =? 14. ) 15. LIMIT ?,?
4.分类字典
sys_category 为树形结构
1. SELECT 2. id, 3. pid, 4. NAME, 5. CODE, 6. create_by, 7. create_time, 8. update_by, 9. update_time, 10. sys_org_code, 11. has_child 12. FROM 13. sys_category 14. WHERE 15. pid = ? 16. ORDER BY 17. create_time DESC
5.数据字典
sys_dict 数据字典的键
1. SELECT 2. id, 3. type, 4. dict_name, 5. dict_code, 6. description, 7. del_flag, 8. create_by, 9. create_time, 10. update_by, 11. update_time 12. FROM 13. sys_dict 14. WHERE 15. del_flag = 0 16. ORDER BY 17. create_time DESC 18. LIMIT ?,?
sys_dict_item:数据字典的值
1. SELECT 2. id, 3. dict_id, 4. item_text, 5. item_value, 6. description, 7. sort_order, 8. STATUS, 9. create_by, 10. create_time, 11. update_by, 12. update_time 13. FROM 14. sys_dict_item 15. WHERE 16. dict_id = ? 17. ORDER BY 18. sort_order ASC 19. LIMIT ?,?
6.系统通告
sys_announcement:系统通告表
sys_announcement_send:当发送的为个人时 以上两个表都有数据
1. SQL = SELECT 2. id, 3. titile, 4. msg_content, 5. start_time, 6. end_time, 7. sender, 8. priority, 9. msg_category, 10. msg_type, 11. send_status, 12. send_time, 13. cancel_time, 14. del_flag, 15. create_by, 16. create_time, 17. update_by, 18. update_time, 19. user_ids 20. FROM 21. sys_announcement 22. WHERE 23. del_flag =?