|
First, there must be an organizational structure management, such as
01 Head Office
0101 Department 1
010101 User A
010102 User B
0102 Department 2
010201 User C
...
When sending a message, each Msg corresponds to an organization structure number, such as 0101, which means that department 1 can be read by everyone, if the number is 010102, it means that only user B can read.
After a user logs in, he can determine all the notifications he can see through the LIKE statement according to his node number. For example, for user B, the SQL query statement is:
SELECT * FROM Message WHERE
msgNo LIKE '010102%' OR msgNo = '0101' OR msgNo = '01 '
ORDER BY msgDate
Understand! ! |
|