@@ -66,37 +66,37 @@ public class Controller {
6666
6767 //通用接口,非事务型操作 和 简单事务型操作 都可通过这些接口自动化实现<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<<
6868
69- /**获取
70- * @param request 只用String,避免encode后未decode
71- * @param session
72- * @return
73- * @see {@link RequestMethod#GET}
74- */
75- @ RequestMapping ("get/{request}" )
76- public String open_get (@ PathVariable String request , HttpSession session ) {
77- try {
78- request = URLDecoder .decode (request , StringUtil .UTF_8 );
79- } catch (Exception e ) {
80- // Parser会报错
81- }
82- return get (request , session );
83- }
84-
85- /**计数
86- * @param request 只用String,避免encode后未decode
87- * @param session
88- * @return
89- * @see {@link RequestMethod#HEAD}
90- */
91- @ RequestMapping ("head/{request}" )
92- public String open_head (@ PathVariable String request , HttpSession session ) {
93- try {
94- request = URLDecoder .decode (request , StringUtil .UTF_8 );
95- } catch (Exception e ) {
96- // Parser会报错
97- }
98- return head (request , session );
69+ /**获取
70+ * @param request 只用String,避免encode后未decode
71+ * @param session
72+ * @return
73+ * @see {@link RequestMethod#GET}
74+ */
75+ @ RequestMapping ("get/{request}" )
76+ public String open_get (@ PathVariable String request , HttpSession session ) {
77+ try {
78+ request = URLDecoder .decode (request , StringUtil .UTF_8 );
79+ } catch (Exception e ) {
80+ // Parser会报错
81+ }
82+ return get (request , session );
83+ }
84+
85+ /**计数
86+ * @param request 只用String,避免encode后未decode
87+ * @param session
88+ * @return
89+ * @see {@link RequestMethod#HEAD}
90+ */
91+ @ RequestMapping ("head/{request}" )
92+ public String open_head (@ PathVariable String request , HttpSession session ) {
93+ try {
94+ request = URLDecoder .decode (request , StringUtil .UTF_8 );
95+ } catch (Exception e ) {
96+ // Parser会报错
9997 }
98+ return head (request , session );
99+ }
100100
101101 /**获取
102102 * @param request 只用String,避免encode后未decode
@@ -526,7 +526,7 @@ public JSONObject logout(HttpSession session) {
526526 public JSONObject register (@ RequestBody String request ) {
527527 JSONObject requestObject = null ;
528528 String verify ;
529-
529+
530530 JSONObject privacyObj ;
531531 String phone ;
532532 String password ;
@@ -538,13 +538,13 @@ public JSONObject register(@RequestBody String request) {
538538
539539 verify = requestObject .getString (VERIFY );
540540 requestObject .remove (VERIFY );
541-
541+
542542 privacyObj = requestObject .getJSONObject (PRIVACY_ );
543543 if (privacyObj == null ) {
544544 throw new NullPointerException ("请设置 " + PRIVACY_ );
545545 }
546546 requestObject .remove (PRIVACY_ );
547-
547+
548548 phone = privacyObj .getString (PHONE );
549549 password = privacyObj .getString (_PASSWORD );
550550
@@ -553,8 +553,8 @@ public JSONObject register(@RequestBody String request) {
553553 throw new NullPointerException ("请设置 " + USER_ );
554554 }
555555 name = userObj .getString (NAME );
556-
557-
556+
557+
558558 if (StringUtil .isVerify (verify ) == false ) {
559559 throw new IllegalArgumentException (VERIFY + ":value 中value不合法!" );
560560 }
@@ -595,7 +595,7 @@ public JSONObject register(@RequestBody String request) {
595595
596596 //生成User
597597 response = new JSONResponse (new Parser (POST , true ).parseResponse (requestObject ));
598-
598+
599599 JSONResponse userRes = response .getJSONResponse (USER_ );
600600 long userId = userRes == null ? 0 : userRes .getId ();
601601 if (userId <= 0 ) {
0 commit comments