|
@@ -94,8 +94,9 @@ public class JmgaServiceImpl implements IJmgaService {
|
|
|
|
|
|
@Override
|
|
@Override
|
|
public boolean isBizAuth(String num) {
|
|
public boolean isBizAuth(String num) {
|
|
- long count = jySceneAuthService.count(new LambdaQueryWrapper<JySceneAuth>().eq(JySceneAuth::getNum, num).eq(JySceneAuth::getAuthType, 0));
|
|
|
|
- return count > 0 ? true : false;
|
|
|
|
|
|
+ //如果场景没有指定为公开模式
|
|
|
|
+ long count = jySceneAuthService.count(new LambdaQueryWrapper<JySceneAuth>().eq(JySceneAuth::getNum, num).eq(JySceneAuth::getAuthType, 1));
|
|
|
|
+ return count > 0 ? false : true;
|
|
}
|
|
}
|
|
|
|
|
|
public static void main(String[] args) throws NoSuchPaddingException, NoSuchAlgorithmException, BadPaddingException, IllegalBlockSizeException, InvalidKeyException {
|
|
public static void main(String[] args) throws NoSuchPaddingException, NoSuchAlgorithmException, BadPaddingException, IllegalBlockSizeException, InvalidKeyException {
|
|
@@ -104,6 +105,8 @@ public class JmgaServiceImpl implements IJmgaService {
|
|
String ENCRYPT_KEY = "3d8904474ebbdbbd81c5952524dad646";
|
|
String ENCRYPT_KEY = "3d8904474ebbdbbd81c5952524dad646";
|
|
byte[] raw = ENCRYPT_KEY.getBytes(StandardCharsets.UTF_8);
|
|
byte[] raw = ENCRYPT_KEY.getBytes(StandardCharsets.UTF_8);
|
|
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
|
Cipher cipher = Cipher.getInstance("AES/ECB/PKCS5Padding");
|
|
|
|
+ 134679.
|
|
|
|
+
|
|
SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
|
|
SecretKeySpec skeySpec = new SecretKeySpec(raw, "AES");
|
|
cipher.init(Cipher.DECRYPT_MODE, skeySpec);
|
|
cipher.init(Cipher.DECRYPT_MODE, skeySpec);
|
|
byte[] encrypted1 = Base64.getDecoder().decode(sign);
|
|
byte[] encrypted1 = Base64.getDecoder().decode(sign);
|