Ver código fonte

fix 推送地址

he2802 3 anos atrás
pai
commit
82c63102db

+ 5 - 0
zhongzheng-admin/src/main/resources/application-dev.yml

@@ -112,3 +112,8 @@ wx:
 
 certificate:
     host: http://192.168.1.38:8000/
+
+officialPush:
+    infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
+    infoAccount: peixunjigou
+    token: 0ca175b9c0f726a831d895e26933246

+ 6 - 7
zhongzheng-admin/src/main/resources/application-pre.yml

@@ -62,11 +62,7 @@ spring:
         # 端口,默认为6379
         port: 6379
         # 数据库索引
-<<<<<<< HEAD
         database: 1
-=======
-        database: 0
->>>>>>> pre
         # 密码
         password: zhongzheng2021_redis
         # 连接超时时间
@@ -113,9 +109,12 @@ wx:
         key: GdXyPxYjZx1234123yJzXgDxYpXyjpx9
         appsecret: GdXyPxYjZx1234123yJzXgDxYpXyjpx9
         notifyUrl: http://42.192.164.187:19005/wx/pay/callback
-<<<<<<< HEAD
+
 
 certificate:
     host: http://192.168.1.38:8000/
-=======
->>>>>>> pre
+
+officialPush:
+    infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
+    infoAccount: peixunjigou
+    token: 0ca175b9c0f726a831d895e26933246

+ 5 - 0
zhongzheng-admin/src/main/resources/application-prod.yml

@@ -112,3 +112,8 @@ wx:
 
 certificate:
     host: http://192.168.1.38:8000/
+
+officialPush:
+    infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
+    infoAccount: peixunjigou
+    token: 0ca175b9c0f726a831d895e26933246

+ 5 - 0
zhongzheng-api/src/main/resources/application-dev.yml

@@ -112,3 +112,8 @@ wx:
 
 certificate:
     host: http://192.168.1.38:8000/
+
+officialPush:
+    infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
+    infoAccount: peixunjigou
+    token: 0ca175b9c0f726a831d895e26933246

+ 8 - 0
zhongzheng-api/src/main/resources/application-pre.yml

@@ -109,3 +109,11 @@ wx:
         key: GdXyPxYjZx1234123yJzXgDxYpXyjpx9
         appsecret: GdXyPxYjZx1234123yJzXgDxYpXyjpx9
         notifyUrl: http://42.192.164.187:19005/wx/pay/callback
+
+certificate:
+    host: http://192.168.1.38:8000/
+
+officialPush:
+    infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
+    infoAccount: peixunjigou
+    token: 0ca175b9c0f726a831d895e26933246

+ 5 - 0
zhongzheng-api/src/main/resources/application-prod.yml

@@ -124,3 +124,8 @@ wx:
 
 certificate:
     host: http://192.168.1.38:8000/
+
+officialPush:
+    infoPath: http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan
+    infoAccount: peixunjigou
+    token: 0ca175b9c0f726a831d895e26933246

+ 18 - 12
zhongzheng-system/src/main/java/com/zhongzheng/modules/grade/service/impl/ClassGradeUserServiceImpl.java

@@ -105,6 +105,15 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     @Value("${aliyun.oss.endpoint}")
     private String ALIYUN_OSS_ENDPOINT;
 
+    @Value("${officialPush.infoPath}")
+    private String OFFICIALPUSH_INFOPATH;
+
+    @Value("${officialPush.infoAccount}")
+    private String OFFICIALPUSH_INFOACCOUNT;
+
+    @Value("${officialPush.token}")
+    private String OFFICIALPUSH_TOKEN;
+
     @Override
     public ClassGradeUserVo queryById(Long id){
         ClassGradeUser db = this.baseMapper.selectById(id);
@@ -368,8 +377,8 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
             throw new CustomException("用户不存在");
         }
 
-       /* Map<String, String> params =  new HashMap<>();
-        params.put("zh","peixunjigou");
+        Map<String, String> params =  new HashMap<>();
+        params.put("zh",OFFICIALPUSH_INFOACCOUNT);
         params.put("bh",userVo.getCode());
         params.put("xm","何建林");
         params.put("sfz",userVo.getIdCard());
@@ -377,23 +386,23 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
         params.put("bmrq","2022-11-11");
         String  dataTxt = params.get("zh")+params.get("bh")+params.get("xm")+params.get("sfz")+params.get("dh")+params.get("bmrq");
         System.out.println(dataTxt);
-        String encrypted = dataSign(dataTxt,"0ca175b9c0f726a831d895e26933246");
+        String encrypted = dataSign(dataTxt,OFFICIALPUSH_TOKEN);
         System.out.println(encrypted);
         params.put("SignMsg",encrypted);
         String respone = "";
         try{
-         respone = HttpUtils.postFormBody("http://jypt-dev.gdcic.net/organjxjy/ShangBaoMingdan",params);
+         respone = HttpUtils.postFormBody(OFFICIALPUSH_INFOPATH,params);
         System.out.println(respone);
         }catch (IOException e){
             throw new CustomException("请求错误");
-        }*/
-        /*ClassGradeUserOfficialBo officialBo = new ClassGradeUserOfficialBo();
+        }
+        ClassGradeUserOfficialBo officialBo = new ClassGradeUserOfficialBo();
         officialBo.setZh("peixunjigou");
         officialBo.setBh(userVo.getClassName());
         officialBo.setSfz(userVo.getIdCard());
         officialBo.setXm(userVo.getRealName());
         officialBo.setDh(userVo.getTelPhone());
-        officialBo.setBmrq("2022-2-15");*/
+        officialBo.setBmrq("2022-2-15");
 
         return true;
     }
@@ -404,12 +413,9 @@ public class ClassGradeUserServiceImpl extends ServiceImpl<ClassGradeUserMapper,
     {
         try{
             String TempPKey;
-            TempPKey = getMD5(PKey,"UTF-8");
-            System.out.println(TempPKey);
+            TempPKey = getMD5(PKey,"gb2312");
             TempPKey = SourceMsg + TempPKey;
-            System.out.println(TempPKey);
-            TempPKey = getMD5(TempPKey,"UTF-8");
-            System.out.println(TempPKey);
+            TempPKey = getMD5(TempPKey,"gb2312");
             return TempPKey;
         }catch (NoSuchAlgorithmException e){
             throw new CustomException("数据错误");