权限过滤,mysql常用函数

1、

find_in_set(#{userId}, researcher)  //查询userId在researcher字段中是否存在,存在函数返回值大于0,researcher存的是以逗号分隔的id字符串

2、

INTE_ARRAY( #{userIds},p.researcher)  //userIds和p.researcher都是逗号分隔的字符串,求交集,有交集则函数返回值大于0

猜你喜欢

转载自blog.csdn.net/LeonShenZhi/article/details/83182354
今日推荐