浏览代码

Merge branch 'master' of http://1.14.104.71:10880/root/ylrz_his_scrm_java

caoliqin 4 天之前
父节点
当前提交
5c11ac310e

+ 9 - 5
fs-service/src/main/java/com/fs/event/WeixinTemplateService.java

@@ -5,6 +5,7 @@ import cn.binarywang.wx.miniapp.api.WxMaService;
 import cn.binarywang.wx.miniapp.bean.WxMaSubscribeMessage;
 import cn.hutool.core.util.StrUtil;
 import com.fs.core.config.WxMaConfiguration;
+import com.fs.his.config.WxMiniappTempConfig;
 import com.fs.his.domain.FsUser;
 import com.fs.his.service.IFsUserService;
 import com.fs.his.utils.ConfigUtil;
@@ -30,6 +31,9 @@ public class WeixinTemplateService {
     @Autowired
     private IFsUserService userService;
 
+    @Autowired
+    WxMiniappTempConfig wxMiniappTempConfig;
+
 
     public void cancelOrderNotice(String orderId,String title,String remark,Long uid){
         String openId = this.getUserOpenid(uid);
@@ -40,7 +44,7 @@ public class WeixinTemplateService {
         //订单号
         map.put("thing1",title);
         map.put("thing4",remark);
-        String tempId = "YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok";
+        String tempId = wxMiniappTempConfig.getInquiryTempID();
         if(StrUtil.isNotBlank(tempId)) {
             this.sendWxMpTemplateMessage(openId, tempId, "pages_order/inquiryOrderDetails?orderId=" + orderId, map);
         }
@@ -54,7 +58,7 @@ public class WeixinTemplateService {
         //订单号
         map.put("thing1",title);
         map.put("thing4",remark);
-        String tempId = "YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok";
+        String tempId = wxMiniappTempConfig.getInquiryTempID();;
         if(StrUtil.isNotBlank(tempId)) {
             this.sendWxMpTemplateMessage(openId, tempId, "pages_order/inquiryOrderDetails?orderId=" + orderId, map);
         }
@@ -71,7 +75,7 @@ public class WeixinTemplateService {
         map.put("time7",df.format(createTime));
         map.put("character_string9",orderCode);
         map.put("thing4",remark);
-        String tempId = "jARl4BpoBkRu-2MxPMkQVhIfGMG0V9qW-X3V_7NtEOU";
+        String tempId = wxMiniappTempConfig.getPayOrderTempID();
         if(StrUtil.isNotBlank(tempId)) {
             this.sendWxMpTemplateMessage(openId, tempId, "pages_order/packageOrderDetails?orderId=" + orderId, map);
         }
@@ -85,7 +89,7 @@ public class WeixinTemplateService {
         Map<String,String> map = new HashMap<>();
         map.put("thing1",title);
         map.put("thing4",remark);
-        String tempId = "YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok";
+        String tempId = wxMiniappTempConfig.getInquiryTempID();
         if(StrUtil.isNotBlank(tempId)) {
             this.sendWxMpTemplateMessage(openId, tempId, "pages_user/followList", map);
         }
@@ -99,7 +103,7 @@ public class WeixinTemplateService {
         Map<String,String> map = new HashMap<>();
         map.put("thing1",title);
         map.put("thing4",remark);
-        String tempId = "YyaBF62vH1GPKY0tume8C2C5UETxcKrVsaTKdBW5eok";
+        String tempId = wxMiniappTempConfig.getInquiryTempID();
         if(StrUtil.isNotBlank(tempId)) {
             this.sendWxMpTemplateMessage(openId, tempId, "pages/TUIKit/TUIPages/TUIConversation/index" , map);
         }

+ 19 - 0
fs-service/src/main/java/com/fs/his/config/WxMiniappTempConfig.java

@@ -0,0 +1,19 @@
+package com.fs.his.config;
+
+import lombok.Data;
+import org.springframework.beans.factory.annotation.Value;
+import org.springframework.stereotype.Component;
+
+import java.io.Serializable;
+
+@Data
+@Component
+public class WxMiniappTempConfig implements Serializable {
+
+
+    @Value("${wx_miniapp_temp.pay_order_temp_id}")
+    private String payOrderTempID;
+
+    @Value("${wx_miniapp_temp.inquiry_temp_id}")
+    private String inquiryTempID;
+}

+ 12 - 8
fs-service/src/main/java/com/fs/his/service/impl/FsInquiryOrderServiceImpl.java

@@ -985,14 +985,18 @@ public class FsInquiryOrderServiceImpl implements IFsInquiryOrderService
         map.setStatus(3);
         map.setStartTime(new Date());
         fsInquiryOrderMapper.updateFsInquiryOrder(map);
-        TemplateBean templateBean = TemplateBean.builder()
-                .orderId(order.getOrderId().toString())
-                .title("问诊订单医生已接单")
-                .remark("您的问诊订单,订单号:"+order.getOrderSn()+"医生已接单")
-                .uid(order.getUserId())
-                .templateType(TemplateListenEnum.TYPE_2.getValue())
-                .build();
-        publisher.publishEvent(new TemplateEvent(this, templateBean));
+        try {
+            TemplateBean templateBean = TemplateBean.builder()
+                    .orderId(order.getOrderId().toString())
+                    .title("问诊订单医生已接单")
+                    .remark("您的问诊订单,订单号:"+order.getOrderSn()+"医生已接单")
+                    .uid(order.getUserId())
+                    .templateType(TemplateListenEnum.TYPE_2.getValue())
+                    .build();
+            publisher.publishEvent(new TemplateEvent(this, templateBean));
+        } catch (Exception e) {
+            throw new RuntimeException(e);
+        }
 
 
         if (order.getInquiryType()!=2){

+ 2 - 1
fs-service/src/main/java/com/fs/qw/service/impl/QwUserServiceImpl.java

@@ -1159,7 +1159,8 @@ public class QwUserServiceImpl implements IQwUserService
             return R.ok("登录成功");
         }
         WxWorkSetCallbackUrlDTO wxWorkSetCallbackUrlDTO = new WxWorkSetCallbackUrlDTO();
-        wxWorkSetCallbackUrlDTO.setUrl(aiHostProper+"/msg/callback/"+serverId);
+        System.out.println("回调地址"+aiHostProper.getIpadUrl()+"/msg/callback/"+serverId);
+        wxWorkSetCallbackUrlDTO.setUrl(aiHostProper.getIpadUrl()+"/msg/callback/"+serverId);
         wxWorkSetCallbackUrlDTO.setUuid(data.getUuid());
         wxWorkService.SetCallbackUrl(wxWorkSetCallbackUrlDTO,serverId);
 

+ 6 - 1
fs-service/src/main/resources/application-config-myhk.yml

@@ -47,7 +47,8 @@ watch:
   password3: v9xsKuqn_$d2y
 
 fs :
-  commonApi: http://172.16.0.16:8010
+#  commonApi: http://172.16.0.16:8010
+  commonApi: http://127.0.0.1:8010
   h5CommonApi: http://119.29.195.254:8010
 nuonuo:
   key: 10924508
@@ -70,5 +71,9 @@ headerImg:
 ipad:
   ipadUrl: http://ipad.cdwjyyh.com
 
+wx_miniapp_temp:
+  pay_order_temp_id: VXEvKaGNPFuJmhWK9O_QPrTZxe9umDCukq-maI8Vdek
+  inquiry_temp_id: 9POPYeqhI48LOPvq-Rfoklze7H-9SlunJKh10Qt4_2I
+
 
 

+ 1 - 1
fs-user-app/src/main/java/com/fs/app/utils/JwtUtils.java

@@ -32,7 +32,7 @@ public class JwtUtils {
         //过期时间
         Date expireDate = new Date(nowDate.getTime() + expire * 1000);
 //        System.out.println("==============================="+secret);
-        logger.info("secret:{}",secret);
+//        logger.info("secret:{}",secret);
         return Jwts.builder()
                 .setHeaderParam("typ", "JWT")
                 .setSubject(userId+"")