Commit a9ac219e by levphon

指定授权bug修复

1 parent b89adf76
......@@ -193,7 +193,7 @@ public class DataOnlySharedInterceptor implements Interceptor {
private void handleWhereCriterial(Long userId, PlainSelect plain, String mainTableName, String permitTable, boolean addTableAlias) throws JSQLParserException {
Expression where = plain.getWhere();
String dataAuthSql = permitTable + ".receiver_id = " + userId;
String dataAuthSql = permitTable + ".receiver_id = " + userId + " and " + permitTable + ".del_flag = 0 ";
if (where == null) {
plain.setWhere(CCJSqlParserUtil.parseCondExpression(dataAuthSql));
} else {
......
......@@ -247,6 +247,7 @@ public class DataPermitLinkInterceptor implements Interceptor {
Expression where = plain.getWhere();
String dataAuthSql = permitTable + ".receiver_id in (" + StringUtils.join(userIds, ',') + ") ";
dataAuthSql += (" and " + permitTable + ".del_flag = 0 ");
if (where == null) {
plain.setWhere(CCJSqlParserUtil.parseCondExpression(dataAuthSql));
} else {
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!