GV

GeezerVison

The World Wide Web, restored to 800 pixels of glory.

Home|About|Gaming cabinet|Archives|How it works|Starter sites

On this site

  • Sign in
  • ActionsCI/CD and automation
  • CodespacesCloud development environments
  • All Features
  • Documentation
  • Training
  • Certifications
  • Build with Copilot
  • Customize Copilot
  • Integrations
  • Trending repos
  • GitHub Sponsors
  • Developer articles
  • Enterprises

This view

  • Original page
  • New address

GeezerVison is showing github.com — Java:APIJSONFinal 升级 APIJSON, apijson-framework, apijson-column 的 jar… · HarryLiIsMe/APIJSON-Demo@2d28ea7

File tree

Expand file treeCollapse file tree
Open diff view settings
Filter options
  • APIJSON-Java-Server/APIJSONFinal
    • libs
      • apijson-framework-4.7.2.jar
      • apijson-framework-4.8.0.jar
      • apijson-orm-4.7.2.jar
      • apijson-orm-4.8.0.jar
    • pom.xml
    • src/main/java/apijson
      • demo
        • DemoFunctionParser.java
        • DemoSQLConfig.java
        • model
          • Privacy.java
          • User.java
          • Verify.java
      • jfinal
        • DemoController.java
Expand file treeCollapse file tree
Open diff view settings
Collapse file

‎APIJSON-Java-Server/APIJSONFinal/libs/apijson-framework-4.7.2.jar‎

Copy file name to clipboard
-38.9 KB
Binary file not shown.
Collapse file

‎APIJSON-Java-Server/APIJSONFinal/libs/apijson-framework-4.8.0.jar‎

Copy file name to clipboard
66.1 KB
Binary file not shown.
Collapse file

‎APIJSON-Java-Server/APIJSONFinal/libs/apijson-orm-4.7.2.jar‎

Copy file name to clipboard
-162 KB
Binary file not shown.
Collapse file

‎APIJSON-Java-Server/APIJSONFinal/libs/apijson-orm-4.8.0.jar‎

Copy file name to clipboard
309 KB
Binary file not shown.
Collapse file

‎APIJSON-Java-Server/APIJSONFinal/pom.xml‎

Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONFinal/pom.xml
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -23,7 +23,7 @@
2323
</dependency>
2424

2525
<!-- 可使用 libs 目录的 apijson-orm.jar 和 apijson-framework.jar 来替代,两种方式二选一 <<<<<<<<<< -->
26-
<dependency>
26+
<!-- <dependency>
2727
<groupId>com.github.Tencent</groupId>
2828
<artifactId>APIJSON</artifactId>
2929
<version>4.7.2</version>
@@ -32,7 +32,7 @@
3232
<groupId>com.github.APIJSON</groupId>
3333
<artifactId>apijson-framework</artifactId>
3434
<version>4.7.2</version>
35-
</dependency>
35+
</dependency> -->
3636
<!-- 可使用 libs 目录的 apijson-orm.jar 和 apijson-framework.jar 来替代,两种方式二选一 >>>>>>>>>> -->
3737

3838
<!-- 需要用的数据库 JDBC 驱动 -->
Collapse file

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

Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoFunctionParser.java
+5-6Lines changed: 5 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,19 +14,18 @@
1414

1515
package apijson.demo;
1616

17-
import com.alibaba.fastjson.JSONArray;
18-
import com.alibaba.fastjson.JSONObject;
19-
2017
import java.util.ArrayList;
2118
import java.util.Arrays;
2219
import java.util.Collection;
2320

2421
import javax.servlet.http.HttpSession;
2522

23+
import com.alibaba.fastjson.JSONArray;
24+
import com.alibaba.fastjson.JSONObject;
25+
2626
import apijson.JSONResponse;
2727
import apijson.NotNull;
2828
import apijson.RequestMethod;
29-
import apijson.RequestRole;
3029
import apijson.StringUtil;
3130
import apijson.framework.APIJSONFunctionParser;
3231
import apijson.orm.JSONRequest;
@@ -212,8 +211,8 @@ public JSONArray getIdList(@NotNull JSONObject current) {
212211
*/
213212
public Object verifyAccess(@NotNull JSONObject current) throws Exception {
214213
long userId = current.getLongValue(JSONRequest.KEY_USER_ID);
215-
RequestRole role = RequestRole.get(current.getString(JSONRequest.KEY_ROLE));
216-
if (role == RequestRole.OWNER && userId != DemoVerifier.getVisitorId(getSession())) {
214+
String role = current.getString(JSONRequest.KEY_ROLE);
215+
if (role == apijson.orm.AbstractVerifier.OWNER && userId != DemoVerifier.getVisitorId(getSession())) {
217216
throw new IllegalAccessException("登录用户与角色OWNER不匹配!");
218217
}
219218
return null;
Collapse file

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

Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/DemoSQLConfig.java
+1-1Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -70,7 +70,7 @@ public AbstractSQLConfig getSQLConfig(RequestMethod method, String database, Str
7070
// }
7171

7272
@Override
73-
public String getUserIdKey(String database, String schema, String table) {
73+
public String getUserIdKey(String database, String schema, String datasource, String table) {
7474
return USER_.equals(table) || PRIVACY_.equals(table) ? ID : USER_ID; // id / userId
7575
}
7676

Collapse file

‎APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Privacy.java‎

Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Privacy.java
+3-3Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -14,9 +14,9 @@
1414

1515
package apijson.demo.model;
1616

17-
import static apijson.RequestRole.ADMIN;
18-
import static apijson.RequestRole.OWNER;
19-
import static apijson.RequestRole.UNKNOWN;
17+
import static apijson.orm.AbstractVerifier.ADMIN;
18+
import static apijson.orm.AbstractVerifier.OWNER;
19+
import static apijson.orm.AbstractVerifier.UNKNOWN;
2020

2121
import com.alibaba.fastjson.annotation.JSONField;
2222

Collapse file

‎APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/User.java‎

Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/User.java
+2-2Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,8 +14,8 @@
1414

1515
package apijson.demo.model;
1616

17-
import static apijson.RequestRole.ADMIN;
18-
import static apijson.RequestRole.UNKNOWN;
17+
import static apijson.orm.AbstractVerifier.ADMIN;
18+
import static apijson.orm.AbstractVerifier.UNKNOWN;
1919

2020
import java.util.List;
2121

Collapse file

‎APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Verify.java‎

Copy file name to clipboardExpand all lines: APIJSON-Java-Server/APIJSONFinal/src/main/java/apijson/demo/model/Verify.java
+6-6Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -14,12 +14,12 @@
1414

1515
package apijson.demo.model;
1616

17-
import static apijson.RequestRole.ADMIN;
18-
import static apijson.RequestRole.CIRCLE;
19-
import static apijson.RequestRole.CONTACT;
20-
import static apijson.RequestRole.LOGIN;
21-
import static apijson.RequestRole.OWNER;
22-
import static apijson.RequestRole.UNKNOWN;
17+
import static apijson.orm.AbstractVerifier.ADMIN;
18+
import static apijson.orm.AbstractVerifier.CIRCLE;
19+
import static apijson.orm.AbstractVerifier.CONTACT;
20+
import static apijson.orm.AbstractVerifier.LOGIN;
21+
import static apijson.orm.AbstractVerifier.OWNER;
22+
import static apijson.orm.AbstractVerifier.UNKNOWN;
2323

2424
import apijson.MethodAccess;
2525
import apijson.framework.BaseModel;

0 commit comments

Comments
0 (0)
You are visitor 01402520 — GeezerVison does not store the pages you look up.
Best viewed with Netscape Navigator 4.7 or Internet Explorer 6 at 800×600. No cookies required.