فهرست منبع

Merge branch 'dev' of http://192.168.1.220:10080/Amoy2/wlyy2.0 into dev

# Conflicts:
#	business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/entrance/XzzxEntranceService.java
wangzhinan 5 سال پیش
والد
کامیت
9eb20b0ea9

+ 11 - 1
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -433,6 +433,7 @@ public class BusinessOrderService {
    public Map<String,String> getWxPayResultNotify(String result) {
        Map<String,String> rs = new HashedMap();
        Map<String,Object> wxrs =  XMLUtil.xmltoMap(result);
        logger.info("回调参数");
        if("SUCCESS".equals(wxrs.get("return_code").toString())){
            // 我方 订单号+时间差
            String seqNo = wxrs.get("out_trade_no")+"";
@ -480,7 +481,16 @@ public class BusinessOrderService {
        String orderCatagrate = businessOrderDO.getOrderCategory();
        String pcCallBack=businessOrderDO.getPcCallbackUrl();
        String appCallBack = businessOrderDO.getAppCallbackUrl();
        String response = ykyyService.addYktOrder(orderNo,patientId,orderAmout,description,state,orderType,doctorMappingDO.getMappingCode(),payType,null,patientTel,orderCatagrate,pcCallBack,appCallBack);
        String doctorResponse = ykyyService.getYktDoctor(doctorMappingDO.getMappingCode());
        String yktDoctor ="";
        JSONObject jsonObject = JSONObject.parseObject(doctorResponse);
        if (jsonObject.getInteger("code")==200){
            JSONArray array = jsonObject.getJSONArray("data");
            if (array!=null&&array.size()!=0){
                yktDoctor=array.getJSONObject(0).getString("DOCTORUSERID");
            }
        }
        String response = ykyyService.addYktOrder(orderNo,patientId,orderAmout,description,state,orderType,yktDoctor,payType,null,patientTel,orderCatagrate,pcCallBack,appCallBack);
        return response;
    }

+ 17 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/core/userdetails/jdbc/WlyyUserDetailsService.java

@ -1,7 +1,9 @@
package com.yihu.jw.security.core.userdetails.jdbc;
import com.alibaba.fastjson.JSONObject;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.security.core.userdetails.SaltUser;
import com.yihu.jw.security.dao.patient.BasePatientWechatDao;
import com.yihu.jw.security.model.WlyyUserDetails;
import com.yihu.jw.security.model.WlyyUserSimple;
@ -72,6 +74,9 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
    @Value("${iHealth.user-info-uri}")
    private String iHealthUserInfoUrl;//失败重试次数
    @Autowired
    private BasePatientWechatDao basePatientWechatDao;
    @Autowired
    private ClientDetailsService clientDetailsService;
@ -574,7 +579,18 @@ public class WlyyUserDetailsService extends JdbcDaoSupport implements UserDetail
    }
    public void updateOpenIdAndWechatId(String openid, String userId,String wechatId) {
        this.getJdbcTemplate().update("update base_patient_wechat p set p.openid = ? where p.patient_id= ? and p.wechat_id", openid, userId,wechatId);
        List<BasePatientWechatDo> patientWechatDos = basePatientWechatDao.findByWechatIdAndPatientId(wechatId,userId);
        if (patientWechatDos!=null&&patientWechatDos.size()!=0){
            this.getJdbcTemplate().update("update base_patient_wechat p set p.openid = ? where p.patient_id= ? and p.wechat_id= ? ", openid, userId,wechatId);
        }else {
            BasePatientWechatDo basePatientWechatDo=new BasePatientWechatDo();
            basePatientWechatDo.setCreateTime(new Date());
            basePatientWechatDo.setOpenid(openid);
            basePatientWechatDo.setPatientId(userId);
            basePatientWechatDo.setWechatId(wechatId);
            basePatientWechatDao.save(basePatientWechatDo);
        }
    }
    public String getSynPath(String wxId){