Forráskód Böngészése

Merge remote-tracking branch 'origin/dev' into dev

zhu 2 éve
szülő
commit
2cb018c37f

+ 7 - 9
zhongzheng-admin/src/main/java/com/zhongzheng/controller/common/CommonController.java

@@ -98,6 +98,9 @@ import org.springframework.web.multipart.MultipartFile;
 
 import javax.servlet.http.HttpServletRequest;
 import javax.servlet.http.HttpServletResponse;
+import java.io.UnsupportedEncodingException;
+import java.math.BigDecimal;
+import java.net.URLEncoder;
 import java.util.ArrayList;
 import java.util.HashMap;
 import java.util.List;
@@ -746,17 +749,12 @@ public class CommonController extends BaseController {
     @PreAuthorize("@ss.hasPermi('system:withdrawal:add')")
     @Log(title = "测试获取山东题库", businessType = BusinessType.INSERT)
     @GetMapping("/common/free/getShanDongExam")
-    public AjaxResult getShanDongExam(GoodsQueryBo bo) {
-        System.out.println(dataSign(bo.getBuyNote(), "ca7c349b-52f2-4751-81ea-c86036e2b4e9"));
+    public AjaxResult getShanDongExam(GoodsQueryBo bo) throws UnsupportedEncodingException {
+        System.out.println(bo.getBuyNote());
         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")

+ 12 - 25
zhongzheng-common/src/main/java/com/zhongzheng/common/utils/ToolsUtils.java

@@ -368,24 +368,7 @@ 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 = "";
@@ -393,7 +376,7 @@ public class ToolsUtils {
         try {
             md5 = MessageDigest.getInstance("MD5");
             // 这句是关键
-            md5.update(str.getBytes("gb2312"));
+            md5.update(str.getBytes("gbk"));
         } catch (NoSuchAlgorithmException e) {
             // TODO Auto-generated catch block
             e.printStackTrace();
@@ -553,14 +536,18 @@ public class ToolsUtils {
         return tempPKey;
     }
 
-    private static String MD5PubHasher(byte[] hashText) throws NoSuchAlgorithmException {
-        MessageDigest md5 = MessageDigest.getInstance("MD5");
-        byte[] b = md5.digest(hashText);
-        StringBuilder ret = new StringBuilder();
-        for (int i = 0; i < b.length; i++) {
-            ret.append(String.format("%02x", b[i]));
+    public static String MD5PubHasher(byte[] hashText)  {
+        try {
+            MessageDigest md5 = MessageDigest.getInstance("MD5");
+            byte[] b = md5.digest(hashText);
+            StringBuilder ret = new StringBuilder();
+            for (int i = 0; i < b.length; i++) {
+                ret.append(String.format("%02x", b[i]));
+            }
+            return ret.toString();
+        }catch (NoSuchAlgorithmException e){
+            return null;
         }
-        return ret.toString();
     }
 
     public static String encryptDes(String source, byte[] key, byte[] iv) throws Exception {

+ 1 - 1
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/service/impl/UserStudyRecordServiceImpl.java

@@ -373,7 +373,7 @@ public class UserStudyRecordServiceImpl extends ServiceImpl<UserStudyRecordMappe
                                 num = 3;
                             }
                             if(fullName.contains("继续教育")&&fullName.contains("施工现场专业人员")){
-                                num =  (int)Math.ceil(videoTime.intValue()/(46*60));
+                                num =  (int)Math.floor(videoTime.intValue()/(50*60))+1;
                             }
                             UserPeriodQueryBo userPeriodQueryBo2 = new UserPeriodQueryBo();
                             userPeriodQueryBo2.setSectionId(bo.getSectionId());

+ 2 - 2
zhongzheng-system/src/main/java/com/zhongzheng/modules/user/vo/UserVo.java

@@ -299,8 +299,8 @@ public class UserVo {
 
 	public void setNull(){
 		this.setOpenId(null);
-		this.setIdCardImg1(null);
-		this.setIdCardImg2(null);
+/*		this.setIdCardImg1(null);
+		this.setIdCardImg2(null);*/
 		this.setCertifiedTime(null);
 		this.setGzhOpenId(null);
 	/*	if(this.getTelphone()!=null){