Skip to content

Commit 17de0bc

Browse files
committed
1 parent 1ebbc0a commit 17de0bc

57 files changed

Lines changed: 1497 additions & 1451 deletions

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

pom.xml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -3,9 +3,9 @@
33
xsi:schemaLocation="http://maven.apache.org/POM/4.0.0 http://maven.apache.org/xsd/maven-4.0.0.xsd">
44
<modelVersion>4.0.0</modelVersion>
55

6-
<groupId>zuo.biao.apijson.server</groupId>
6+
<groupId>apijson.server</groupId>
77
<artifactId>apijson-orm</artifactId>
8-
<version>3.9.0</version>
8+
<version>4.0.0</version>
99
<packaging>jar</packaging>
1010

1111
<name>APIJSONORM</name>
Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
package zuo.biao.apijson;
15+
package apijson;
1616

1717
import com.alibaba.fastjson.JSONArray;
1818
import com.alibaba.fastjson.JSONObject;

src/main/java/zuo/biao/apijson/JSONObject.java renamed to src/main/java/apijson/JSONObject.java

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
package zuo.biao.apijson;
15+
package apijson;
1616

1717
import java.util.ArrayList;
1818
import java.util.List;
@@ -332,7 +332,7 @@ public JSONObject setOrder(String keys) {
332332
public JSONObject setJSON(String keys) {
333333
return puts(KEY_JSON, keys);
334334
}
335-
335+
336336

337337
//JSONObject内关键词 key >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
338338

@@ -433,7 +433,7 @@ public JSONObject puts(Object value) {
433433
}
434434
/**put and return this
435435
* @param key
436-
* @param value
436+
* @param value
437437
* @return this
438438
* @see {@link #put(String, Object)}
439439
*/

src/main/java/zuo/biao/apijson/JSONRequest.java renamed to src/main/java/apijson/JSONRequest.java

Lines changed: 8 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
package zuo.biao.apijson;
15+
package apijson;
1616

1717
import java.util.ArrayList;
1818
import java.util.List;
@@ -69,7 +69,7 @@ public JSONRequest setTag(String tag) {
6969
* @param version
7070
* @return
7171
*/
72-
public JSONRequest setVersion(String version) {
72+
public JSONRequest setVersion(Integer version) {
7373
return puts(KEY_VERSION, version);
7474
}
7575
/**set "format":format in outermost layer
@@ -87,14 +87,14 @@ public JSONRequest setFormat(Boolean format) {
8787
public static final int QUERY_TABLE = 0;
8888
public static final int QUERY_TOTAL = 1;
8989
public static final int QUERY_ALL = 2;
90-
90+
9191
public static final String QUERY_TABLE_STRING = "TABLE";
9292
public static final String QUERY_TOTAL_STRING = "TOTAL";
9393
public static final String QUERY_ALL_STRING = "ALL";
9494

9595
public static final String SUBQUERY_RANGE_ALL = "ALL";
9696
public static final String SUBQUERY_RANGE_ANY = "ANY";
97-
97+
9898
public static final String KEY_QUERY = "query";
9999
public static final String KEY_COUNT = "count";
100100
public static final String KEY_PAGE = "page";
@@ -137,15 +137,15 @@ public JSONRequest setCount(int count) {
137137
public JSONRequest setPage(int page) {
138138
return puts(KEY_PAGE, page);
139139
}
140-
140+
141141
/**set joins of Main Table and it's Vice Tables in Array layer
142142
* @param joins "@/User/id@", "&/User/id@,>/Comment/momentId@" ...
143143
* @return
144144
*/
145145
public JSONRequest setJoin(String... joins) {
146146
return puts(KEY_JOIN, StringUtil.getString(joins));
147147
}
148-
148+
149149
/**set range for Subquery
150150
* @param range
151151
* @return
@@ -155,15 +155,15 @@ public JSONRequest setJoin(String... joins) {
155155
public JSONRequest setSubqueryRange(String range) {
156156
return puts(KEY_SUBQUERY_RANGE, range);
157157
}
158-
158+
159159
/**set from for Subquery
160160
* @param range
161161
* @return
162162
*/
163163
public JSONRequest setSubqueryFrom(String from) {
164164
return puts(KEY_SUBQUERY_FROM, from);
165165
}
166-
166+
167167
//array object >>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>>
168168

169169

src/main/java/zuo/biao/apijson/JSONResponse.java renamed to src/main/java/apijson/JSONResponse.java

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
package zuo.biao.apijson;
15+
package apijson;
1616

1717
import java.util.List;
1818
import java.util.Set;
@@ -28,7 +28,7 @@
2828
* <br> User user = response.getObject(User.class);//not a must
2929
* <br> List<Comment> commenntList = response.getList("Comment[]", Comment.class);//not a must
3030
*/
31-
public class JSONResponse extends zuo.biao.apijson.JSONObject {
31+
public class JSONResponse extends apijson.JSONObject {
3232
private static final long serialVersionUID = 1L;
3333

3434
private static final String TAG = "JSONResponse";
Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,15 +12,15 @@
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
package zuo.biao.apijson;
15+
package apijson;
1616

1717
/**测试用Log
1818
* @modifier Lemon
1919
*/
2020
public class Log {
2121

2222
public static boolean DEBUG = true;
23-
23+
2424
/**
2525
* @param TAG
2626
* @param msg

src/main/java/zuo/biao/apijson/MethodAccess.java renamed to src/main/java/apijson/MethodAccess.java

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -12,21 +12,21 @@
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
package zuo.biao.apijson;
15+
package apijson;
1616

1717
import java.lang.annotation.Documented;
1818
import java.lang.annotation.Inherited;
1919
import java.lang.annotation.Retention;
2020
import java.lang.annotation.Target;
2121

22+
import static apijson.RequestRole.ADMIN;
23+
import static apijson.RequestRole.CIRCLE;
24+
import static apijson.RequestRole.CONTACT;
25+
import static apijson.RequestRole.LOGIN;
26+
import static apijson.RequestRole.OWNER;
27+
import static apijson.RequestRole.UNKNOWN;
2228
import static java.lang.annotation.ElementType.TYPE;
2329
import static java.lang.annotation.RetentionPolicy.RUNTIME;
24-
import static zuo.biao.apijson.RequestRole.ADMIN;
25-
import static zuo.biao.apijson.RequestRole.CIRCLE;
26-
import static zuo.biao.apijson.RequestRole.CONTACT;
27-
import static zuo.biao.apijson.RequestRole.LOGIN;
28-
import static zuo.biao.apijson.RequestRole.OWNER;
29-
import static zuo.biao.apijson.RequestRole.UNKNOWN;
3030

3131
/**请求方法权限,只允许某些角色通过对应方法访问
3232
* @author Lemon

src/main/java/zuo/biao/apijson/NotNull.java renamed to src/main/java/apijson/NotNull.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
package zuo.biao.apijson;
15+
package apijson;
1616

1717
import java.lang.annotation.Documented;
1818
import java.lang.annotation.Retention;

src/main/java/zuo/biao/apijson/RequestMethod.java renamed to src/main/java/apijson/RequestMethod.java

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
package zuo.biao.apijson;
15+
package apijson;
1616

1717
/**请求方法,对应org.springframework.web.bind.annotation.RequestMethod,多出GETS,HEADS方法
1818
* @author Lemon
@@ -23,38 +23,38 @@ public enum RequestMethod {
2323
* 常规获取数据方式
2424
*/
2525
GET,
26-
26+
2727
/**
2828
* 检查,默认是非空检查,返回数据总数
2929
*/
3030
HEAD,
31-
31+
3232
/**Safe, Single, Simple
3333
* <br > 限制性GET,通过POST来GET数据,不显示请求内容和返回结果,并且校验请求,一般用于对安全要求比较高的请求
3434
*/
3535
GETS,
36-
36+
3737
/**Safe, Single, Simple
3838
* <br > 限制性HEAD,通过POST来HEAD数据,不显示请求内容和返回结果,并且校验请求,一般用于对安全要求比较高的请求
3939
*/
4040
HEADS,
41-
41+
4242
/**
4343
* 新增(或者说插入)数据
4444
*/
4545
POST,
46-
46+
4747
/**
4848
* 修改数据,只修改传入字段对应的值
4949
*/
5050
PUT,
51-
51+
5252
/**
5353
* 删除数据
5454
*/
5555
DELETE;
56-
57-
56+
57+
5858
/**是否为GET请求方法
5959
* @param method
6060
* @param containPrivate 包含私密(非明文)获取方法GETS
@@ -64,7 +64,7 @@ public static boolean isGetMethod(RequestMethod method, boolean containPrivate)
6464
boolean is = method == null || method == GET;
6565
return containPrivate == false ? is : is || method == GETS;
6666
}
67-
67+
6868
/**是否为HEAD请求方法
6969
* @param method
7070
* @param containPrivate 包含私密(非明文)获取方法HEADS
@@ -74,15 +74,15 @@ public static boolean isHeadMethod(RequestMethod method, boolean containPrivate)
7474
boolean is = method == HEAD;
7575
return containPrivate == false ? is : is || method == HEADS;
7676
}
77-
77+
7878
/**是否为查询的请求方法
7979
* @param method
8080
* @return 读操作(GET型或HEAD型) - true, 写操作(POST,PUT,DELETE) - false
8181
*/
8282
public static boolean isQueryMethod(RequestMethod method) {
8383
return isGetMethod(method, true) || isHeadMethod(method, true);
8484
}
85-
85+
8686
/**是否为开放(不限制请求的结构或内容;明文,浏览器能直接访问及查看)的请求方法
8787
* @param method
8888
* @return
@@ -94,5 +94,5 @@ public static boolean isPublicMethod(RequestMethod method) {
9494
public static String getName(RequestMethod method) {
9595
return method == null ? GET.name() : method.name();
9696
}
97-
97+
9898
}

src/main/java/zuo/biao/apijson/RequestRole.java renamed to src/main/java/apijson/RequestRole.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@
1212
See the License for the specific language governing permissions and
1313
limitations under the License.*/
1414

15-
package zuo.biao.apijson;
15+
package apijson;
1616

1717
/**来访的用户角色
1818
* @author Lemon

0 commit comments

Comments
 (0)