3232import java .lang .reflect .Method ;
3333import java .lang .reflect .Parameter ;
3434import java .nio .charset .StandardCharsets ;
35+ import java .time .Duration ;
3536import java .util .*;
3637
3738/**
@@ -497,7 +498,7 @@ private String getRedisCacheKey( List<Object> params ) {
497498
498499 if ( key .startsWith ("#params" ) ) {
499500
500- int index = Integer .parseInt (key .substring (7 , 8 ));
501+ int index = Integer .parseInt (key .substring (8 , 9 ));
501502
502503 if ( index + 1 > params .size () ) {
503504
@@ -506,12 +507,12 @@ private String getRedisCacheKey( List<Object> params ) {
506507 }
507508
508509 Object obj = params .get (index );
509- String value = null ;
510+ String value = ( String ) obj ;
510511 JSONObject json1 = new JSONObject ().putOpt ("data" , obj );
511512
512513 if ( key .contains ("]." ) ) {
513514
514- String [] args = key .split ("." );
515+ String [] args = key .split ("\\ ." );
515516
516517 for ( int i = 1 ; i < args .length ; ++i ) {
517518
@@ -532,10 +533,10 @@ private String getRedisCacheKey( List<Object> params ) {
532533
533534 }
534535
535- key = value ;
536-
537536 }
538537
538+ key = value ;
539+
539540 }
540541
541542 // if ( key.startsWith("#data") ) {
@@ -583,7 +584,7 @@ private String getRedisCacheKey( List<Object> params ) {
583584
584585 }
585586
586- return key ;
587+ return tRedisCache . type () + "_" + key ;
587588
588589 }
589590
@@ -615,7 +616,7 @@ public void processRedisCache(List<Object> params, Object data) {
615616
616617 if ( tRedisCache .expireTime () > 0 ) {
617618
618- vo .set (key , cacheValue , tRedisCache .expireTime ());
619+ vo .set (key , cacheValue , Duration . ofSeconds ( tRedisCache .expireTime () ));
619620
620621 } else {
621622
0 commit comments