Skip to content

Commit f9e49be

Browse files
committed
MySQL:更新表;Demo:APIJSONFinal 解决远程函数 verifyAccess 判断角色的方式错误
1 parent ad48d42 commit f9e49be

18 files changed

+63
-112
lines changed

APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoFunctionParser.java

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,6 +28,7 @@
2828
import apijson.RequestMethod;
2929
import apijson.StringUtil;
3030
import apijson.framework.APIJSONFunctionParser;
31+
import apijson.orm.AbstractVerifier;
3132
import apijson.orm.JSONRequest;
3233

3334

@@ -212,7 +213,7 @@ public JSONArray getIdList(@NotNull JSONObject current) {
212213
public Object verifyAccess(@NotNull JSONObject current) throws Exception {
213214
long userId = current.getLongValue(JSONRequest.KEY_USER_ID);
214215
String role = current.getString(JSONRequest.KEY_ROLE);
215-
if (role == apijson.orm.AbstractVerifier.OWNER && userId != DemoVerifier.getVisitorId(getSession())) {
216+
if (AbstractVerifier.OWNER.equals(role) && userId != DemoVerifier.getVisitorId(getSession())) {
216217
throw new IllegalAccessException("登录用户与角色OWNER不匹配!");
217218
}
218219
return null;

MySQL/single/sys_Access.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -61,4 +61,4 @@ UNLOCK TABLES;
6161
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
6262
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6363

64-
-- Dump completed on 2021-10-20 4:58:02
64+
-- Dump completed on 2021-10-23 23:52:28

MySQL/single/sys_Comment.sql

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

MySQL/single/sys_Document.sql

Lines changed: 4 additions & 3 deletions
Large diffs are not rendered by default.

MySQL/single/sys_Function.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -58,4 +58,4 @@ UNLOCK TABLES;
5858
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
5959
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6060

61-
-- Dump completed on 2021-10-20 4:57:16
61+
-- Dump completed on 2021-10-23 23:51:50

MySQL/single/sys_Login.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ UNLOCK TABLES;
5050
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
5151
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
5252

53-
-- Dump completed on 2021-10-20 4:58:00
53+
-- Dump completed on 2021-10-23 23:52:32

MySQL/single/sys_Method.sql

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

MySQL/single/sys_Moment.sql

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

MySQL/single/sys_Praise.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -50,4 +50,4 @@ UNLOCK TABLES;
5050
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
5151
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
5252

53-
-- Dump completed on 2021-10-20 4:57:55
53+
-- Dump completed on 2021-10-23 23:52:29

MySQL/single/sys_Random.sql

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

MySQL/single/sys_Request.sql

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

MySQL/single/sys_TestRecord.sql

Lines changed: 4 additions & 4 deletions
Large diffs are not rendered by default.

MySQL/single/sys_Verify.sql

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

MySQL/single/sys__Visit.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,4 @@ UNLOCK TABLES;
4848
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
4949
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
5050

51-
-- Dump completed on 2021-10-20 4:57:53
51+
-- Dump completed on 2021-10-23 23:52:25

MySQL/single/sys_apijson_privacy.sql

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

MySQL/single/sys_apijson_user.sql

Lines changed: 3 additions & 3 deletions
Large diffs are not rendered by default.

MySQL/single/sys_routines.sql

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -65,4 +65,4 @@ SET character_set_client = @saved_cs_client;
6565
/*!40101 SET COLLATION_CONNECTION=@OLD_COLLATION_CONNECTION */;
6666
/*!40111 SET SQL_NOTES=@OLD_SQL_NOTES */;
6767

68-
-- Dump completed on 2021-10-20 4:58:05
68+
-- Dump completed on 2021-10-23 23:52:38

MySQL/sys.sql

Lines changed: 23 additions & 74 deletions
Large diffs are not rendered by default.

0 commit comments

Comments
 (0)