Browse Source

读身份证的患者不需要绑卡到服务号

lighter 2 tháng trước cách đây
mục cha
commit
12ec922e87

+ 1 - 1
src/main/java/thyyxxk/wxservice_server/config/RestTemplateConfig.java

@@ -13,7 +13,7 @@ public class RestTemplateConfig {
     @Bean
     public RestTemplate restTemplate(RestTemplateBuilder builder) {
         return builder
-                .setConnectTimeout(Duration.ofSeconds(10))
+                .setConnectTimeout(Duration.ofSeconds(30))
                 .build();
     }
 }

+ 5 - 2
src/main/java/thyyxxk/wxservice_server/dao/selfmachine/LoginDao.java

@@ -27,7 +27,10 @@ public interface LoginDao {
             "with(nolock) where openid=#{openid} and del_flag=0")
     List<OutpatientCard> getPatientCardListByOpenid(String openid);
 
-    @Select("select distinct name,patient_id,social_no from t_wechat_patient_bind " +
-            "with(nolock) where social_no=#{idCard} and del_flag=0")
+    @Select("select name,patient_id,social_no from t_wechat_patient_bind " +
+            "with(nolock) where social_no=#{idCard} and del_flag=0 union " +
+            "select rtrim(name) as name,rtrim(patient_id) as patientId, " +
+            "rtrim(social_no) as socialNo from mz_patient_mi " +
+            "with(nolock) where social_no=#{idCard} and isnull(del_flag,0)=0")
     List<OutpatientCard> getPatientCardListByIdCard(String idCard);
 }