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