he2802 2 lat temu
rodzic
commit
0317a84d8f

+ 8 - 2
zhongzheng-admin/src/main/java/com/zhongzheng/controller/common/CommonController.java

@@ -747,10 +747,16 @@ public class CommonController extends BaseController {
     @Log(title = "测试获取山东题库", businessType = BusinessType.INSERT)
     @GetMapping("/common/free/getShanDongExam")
     public AjaxResult getShanDongExam(GoodsQueryBo bo) {
-        iQuestionOtherService.queryById(3L);
+        System.out.println(dataSign(bo.getBuyNote(), "ca7c349b-52f2-4751-81ea-c86036e2b4e9"));
         return AjaxResult.success();
     }
-
+    public String dataSign(String SourceMsg, String PKey) {
+        String TempPKey;
+        TempPKey = ToolsUtils.EncoderByMd5(PKey);
+        TempPKey = SourceMsg + TempPKey;
+        TempPKey = ToolsUtils.EncoderByMd5(TempPKey);
+        return TempPKey;
+    }
 
     @ApiOperation("旧系统post请求")
     @PostMapping("/common/free/clientPost")

+ 19 - 0
zhongzheng-common/src/main/java/com/zhongzheng/common/utils/ToolsUtils.java

@@ -368,6 +368,25 @@ public class ToolsUtils {
         return result;
     }
 
+    public static String EncoderByMd5New(String str) {
+        StringBuffer sb = new StringBuffer(32);
+        try
+        {
+            MessageDigest md = MessageDigest.getInstance("MD5");
+            byte[] array = md.digest(str.getBytes("gb2312"));
+
+            for (int i = 0; i < array.length; i++)
+            {
+                sb.append(Integer.toHexString((array[i] & 0xFF) | 0x100)
+                        .toUpperCase().substring(1, 3));
+            }
+        } catch (Exception e)
+        {
+            return null;
+        }
+        return sb.toString().toLowerCase();
+    }
+
     public static String EncoderByMd5(String str) {
         String result = "";
         MessageDigest md5 = null;

+ 1 - 1
zhongzheng-framework/src/main/java/com/zhongzheng/framework/config/MybatisPlusConfig.java

@@ -26,7 +26,7 @@ public class MybatisPlusConfig {
 	public MybatisPlusInterceptor mybatisPlusInterceptor() {
 		MybatisPlusInterceptor interceptor = new MybatisPlusInterceptor();
 		// 多租户插件(注意:这个一定要放在最上面)
-		interceptor.addInnerInterceptor(new CustomTenantLineInnerInterceptor(customTenantLineHandler));
+		interceptor.addInnerInterceptor(new TenantLineInnerInterceptor(customTenantLineHandler));
 		// 分页插件
 		interceptor.addInnerInterceptor(paginationInnerInterceptor());
 		// 乐观锁插件