@@ -257,6 +257,7 @@ public String openHead(@PathVariable String request, HttpSession session) {
257257 public static final String VERIFY = "verify" ;
258258
259259 public static final String TYPE = "type" ;
260+ public static final String VALUE = "value" ;
260261
261262
262263
@@ -268,7 +269,10 @@ public String openHead(@PathVariable String request, HttpSession session) {
268269 {
269270 "type": "ALL", //重载对象,ALL, FUNCTION, REQUEST, ACCESS,非必须
270271 "phone": "13000082001",
271- "verify": "1234567" //验证码,对应类型为 Verify.TYPE_RELOAD
272+ "verify": "1234567", //验证码,对应类型为 Verify.TYPE_RELOAD
273+ "value": { // 自定义增量更新条件
274+ "id": 1 // 过滤条件,符合 APIJSON 查询功能符即可
275+ }
272276 }
273277 * </pre>
274278 */
@@ -277,11 +281,13 @@ public String openHead(@PathVariable String request, HttpSession session) {
277281 public JSONObject reload (@ RequestBody String request ) {
278282 JSONObject requestObject = null ;
279283 String type ;
284+ JSONObject value ;
280285 String phone ;
281286 String verify ;
282287 try {
283288 requestObject = DemoParser .parseRequest (request );
284289 type = requestObject .getString (TYPE );
290+ value = requestObject .getJSONObject (VALUE );
285291 phone = requestObject .getString (PHONE );
286292 verify = requestObject .getString (VERIFY );
287293 } catch (Exception e ) {
@@ -300,7 +306,7 @@ public JSONObject reload(@RequestBody String request) {
300306
301307 if (reloadAll || "ACCESS" .equals (type )) {
302308 try {
303- result .put (ACCESS_ , DemoVerifier .initAccess ());
309+ result .put (ACCESS_ , DemoVerifier .initAccess (false , null , value ));
304310 } catch (ServerException e ) {
305311 e .printStackTrace ();
306312 result .put (ACCESS_ , DemoParser .newErrorResult (e ));
@@ -309,7 +315,7 @@ public JSONObject reload(@RequestBody String request) {
309315
310316 if (reloadAll || "FUNCTION" .equals (type )) {
311317 try {
312- result .put (FUNCTION_ , DemoFunctionParser .init ());
318+ result .put (FUNCTION_ , DemoFunctionParser .init (false , null , value ));
313319 } catch (ServerException e ) {
314320 e .printStackTrace ();
315321 result .put (FUNCTION_ , DemoParser .newErrorResult (e ));
@@ -318,7 +324,7 @@ public JSONObject reload(@RequestBody String request) {
318324
319325 if (reloadAll || "REQUEST" .equals (type )) {
320326 try {
321- result .put (REQUEST_ , DemoVerifier .initRequest ());
327+ result .put (REQUEST_ , DemoVerifier .initRequest (false , null , value ));
322328 } catch (ServerException e ) {
323329 e .printStackTrace ();
324330 result .put (REQUEST_ , DemoParser .newErrorResult (e ));
0 commit comments