Explorar el Código

配置四川三方支付

qin hace 1 año
padre
commit
eb10f7f4bf
Se han modificado 1 ficheros con 3 adiciones y 3 borrados
  1. 3 3
      src/main/java/com/poteviohealth/ym/ipos/utils/YmUtil.java

+ 3 - 3
src/main/java/com/poteviohealth/ym/ipos/utils/YmUtil.java

@@ -19,7 +19,6 @@ import java.util.Map;
 @Log4j2
 public class YmUtil {
 
-    private static final  String SECRETKEY = Basic.getSystemParameter(TokenContext.cureOperatorId()).getSecretkey();
     public static final String SUCCESS =  "0000";
     public static final String FAIL =  "9998";
     public static final String ERROR =  "9990";
@@ -44,13 +43,14 @@ public class YmUtil {
     }
 
     private static <T> String generateSign(T obj){
-        StringBuilder sb = new StringBuilder(SECRETKEY);
+        String secretKey = Basic.getSystemParameter(TokenContext.cureOperatorId()).getSecretkey();
+        StringBuilder sb = new StringBuilder(secretKey);
         try {
             Map<String,Object> maps =  YmUtil.findObjectFields(obj,true);
             for (String s : maps.keySet()) {
                 sb.append(s).append(maps.get(s));
             }
-            sb.append(SECRETKEY);
+            sb.append(secretKey);
         } catch (IllegalAccessException e) {
             e.printStackTrace();
         }