Browse Source

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

# Conflicts:
#	svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/wechat/WechatMenuController.java
wangzhinan 4 years ago
parent
commit
196dbedcdb

+ 5 - 4
business/base-service/src/main/java/com/yihu/jw/hospital/mapping/service/PatientMappingService.java

@ -2,20 +2,20 @@ package com.yihu.jw.hospital.mapping.service;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.patient.PatientMedicareCardDO;
import com.yihu.jw.hospital.prescription.service.PrescriptionService;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.patient.dao.BasePatientDao;
import com.yihu.jw.patient.dao.BasePatientMedicareCardDao;
import net.sf.json.JSONArray;
import com.yihu.jw.entity.hospital.mapping.PatientMappingDO;
import com.yihu.jw.hospital.mapping.dao.PatientMappingDao;
import com.yihu.jw.hospital.prescription.service.entrance.EntranceService;
import net.sf.json.JSONObject;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import java.util.Date;
@ -24,6 +24,7 @@ import java.util.Date;
 * 互联网医院居民信息映射
 */
@Service
@Transactional
public class PatientMappingService {
    private static final Logger logger = LoggerFactory.getLogger(PatientMappingService.class);

+ 1 - 1
business/base-service/src/main/java/com/yihu/jw/hospital/prescription/service/YkyyPrescriptionService.java

@ -863,7 +863,7 @@ public class YkyyPrescriptionService extends BaseJpaService<WlyyPrescriptionDO,
            String url = wxWechatDO.getBaseUrl();
            String notifyUrl =url;
            String totalFee =businessOrderDO.getPayPrice().intValue()+"";
            map = businessOrderService.unifiedorder(wechatId,businessOrderDO.getDescription(),totalFee, tradeType,openId,businessOrderDO.getOrderNo(),notifyUrl);
            map = businessOrderService.unifiedorder(wechatId,businessOrderDO.getDescription(),totalFee, tradeType,openId,businessOrderDO.getOrderNo(),notifyUrl,businessOrderDO.getPatient());
        }
        return map;
    }

+ 16 - 10
business/base-service/src/main/java/com/yihu/jw/order/BusinessOrderService.java

@ -47,7 +47,6 @@ import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.util.wechat.WeiXinPayUtils;
import com.yihu.jw.util.wechat.wxhttp.HttpUtil;
import com.yihu.jw.utils.ByteToInputStream;
import com.yihu.jw.utils.StringUtil;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.jw.wechat.dao.WechatDao;
import com.yihu.jw.wechat.dao.WxPayLogDao;
@ -385,7 +384,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        String appCallBack = businessOrderDO.getAppCallbackUrl();
        String url = wxWechatDO.getBaseUrl();
        String notifyUrl =url;
        Map<String,Object> map = unifiedorder(wechatId,description,businessOrderDO.getPayPrice().toString(),WeChatConfig.TRADE_TYPE_JSAPI,openId,orderNo,notifyUrl);
        Map<String,Object> map = unifiedorder(wechatId,description,businessOrderDO.getPayPrice().toString(),WeChatConfig.TRADE_TYPE_JSAPI,openId,orderNo,notifyUrl,patient);
        String doctorId = "";
        if (doctorMappingDO!=null){
            doctorId = doctorMappingDO.getMappingCode();
@ -451,12 +450,11 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (!StringUtils.isNoneBlank(tradeType)){
            tradeType=WeChatConfig.TRADE_TYPE_JSAPI;
        }
        String url = wxWechatDO.getBaseUrl();
        String notifyUrl =url;
        Map<String,Object> map = new HashedMap();
        if (payFlag){
            map = unifiedorder(wechatId,body,totalFee,tradeType,openid,ourTradeNo,notifyUrl);
            map = unifiedorder(wechatId,body,totalFee,tradeType,openid,ourTradeNo,notifyUrl,patient);
        }else {
            updatePayStatusByRelation(relationCode,wechatId);
        }
@ -475,7 +473,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
     * @return
     * @throws Exception
     */
    public  Map<String,Object> unifiedorder(String wechatId,String body,String totalFee,String tradeType,String openId,String ourTradeNo,String notifyUrl) throws Exception {
    public  Map<String,Object> unifiedorder(String wechatId,String body,String totalFee,String tradeType,String openId,String ourTradeNo,String notifyUrl,String code) throws Exception {
        WxWechatDO wxWechatDO = wechatDao.findById(wechatId);
        if(wxWechatDO==null){
            throw new Exception("can't find wechat:the wxId is "+wechatId);
@ -517,6 +515,12 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        if (tradeType.equalsIgnoreCase("JSAPI")){
            map.put("openid", openId);
        }
        if (tradeType.equalsIgnoreCase("APPLETS")){
            BasePatientDO patientDO = patientDao.findById(code);
            if (patientDO!=null){
                map.put("openid",patientDO.getOpenid());
            }
        }
        String wapUrl = "";
        String wapName = "";
        if ("xm_ykyy_wx".equalsIgnoreCase(wechatId)){
@ -796,6 +800,7 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
                        WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode());
                        wlyyOutpatientDO.setPayStatus(1);
                        outpatientDao.save(wlyyOutpatientDO);
                    }
                }else if (businessOrderDO.getOrderCategory().equalsIgnoreCase("2")||businessOrderDO.getOrderCategory().equalsIgnoreCase("3")){
                    WlyyOutpatientDO wlyyOutpatientDO = outpatientDao.findById(businessOrderDO.getRelationCode());
@ -888,11 +893,11 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
            wxPayLogDO.setPayTime(new Date());
            wxPayLogDO.setPayStatus(1);
            wxPayLogDao.save(wxPayLogDO);
            rs.put("code","1");
            rs.put("message","支付成功");
            rs.put("return_code","SUCCESS");
            rs.put("return_msg","OK");
        }else{
            rs.put("code","-1");
            rs.put("return_msg","FAIL");
            rs.put("return_code","FAIL");
            rs.put("return_msg","OK");
        }
        return rs;
    }
@ -1667,9 +1672,10 @@ public class BusinessOrderService extends BaseJpaService<BusinessOrderDO,Busines
        String url = wxWechatDO.getBaseUrl();
        String notifyUrl =url;
        String price = (int)(businessOrderDO.getPayPrice()*100)+"";
        map = unifiedorder(wechatId,businessOrderDO.getDescription(),price,wxPayType,patientWechatDoList.get(0).getOpenid(),businessOrderDO.getOrderNo(),notifyUrl);
        map = unifiedorder(wechatId,businessOrderDO.getDescription(),price,wxPayType,patientWechatDoList.get(0).getOpenid(),businessOrderDO.getOrderNo(),notifyUrl,patientId);
        logger.info("success="+JSONObject.toJSONString(map));
        return map;
    }
}

+ 1 - 1
common/common-entity/src/main/java/com/yihu/jw/entity/IntegerIdentityEntity.java

@ -25,7 +25,7 @@ public abstract class IntegerIdentityEntity implements Serializable {
//==========mysql 环境 id策略 end======================================================
//==========Oracle 环境id策略 =========================================================
   /*@GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
/*   @GeneratedValue(strategy=GenerationType.SEQUENCE, generator="id_generated")*/
//==========Oracle 环境id策略 =========================================================
    public Integer getId() {
        return id;

+ 10 - 0
common/common-entity/src/main/java/com/yihu/jw/entity/base/wx/WxWechatDO.java

@ -36,6 +36,7 @@ public class WxWechatDO extends UuidIdentityEntityWithOperator implements java.i
    private String cerfiticate;//商户证书(预留字段,保存证书路径??) 目前暂未使用到
    private String appKey;//appKey
    private String applets;//小程序id
    private String appletsSecret;//小程序秘钥
    @Transient
@ -228,4 +229,13 @@ public class WxWechatDO extends UuidIdentityEntityWithOperator implements java.i
    public void setApplets(String applets) {
        this.applets = applets;
    }
    @Column(name = "applets_secret")
    public String getAppletsSecret() {
        return appletsSecret;
    }
    public void setAppletsSecret(String appletsSecret) {
        this.appletsSecret = appletsSecret;
    }
}

+ 31 - 0
server/svr-authentication/src/main/java/com/yihu/jw/security/dao/patient/WechatDao.java

@ -0,0 +1,31 @@
package com.yihu.jw.security.dao.patient;
import com.yihu.jw.entity.base.wx.WxWechatDO;
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
import org.springframework.data.jpa.repository.Query;
import org.springframework.data.repository.PagingAndSortingRepository;
import java.util.List;
/**
 * Created by Administrator on 2017/5/20 0020.
 */
public interface WechatDao extends PagingAndSortingRepository<WxWechatDO, String>, JpaSpecificationExecutor<WxWechatDO> {
    @Query("from WxWechatDO w where w.appId = ?1 and w.status!=-1")
    WxWechatDO findByAppId(String appId);
    @Query("from WxWechatDO w where w.appId = ?1 and w.id!= ?2 and w.status!=-1")
    WxWechatDO findByAppIdExcludeId(String appId, String id);
    @Query("from WxWechatDO w where w.id = ?1 and w.status!=-1")
    WxWechatDO findById(String id);
    @Query("from WxWechatDO w where w.status!=-1")
    List<WxWechatDO> findAll();
    @Query("from WxWechatDO w where w.appOriginId = ?1 and w.status!=-1")
    WxWechatDO findByAppOriginId(String appOriginId);
    List<WxWechatDO> findByName(String name);
}

+ 38 - 1
server/svr-authentication/src/main/java/com/yihu/jw/security/oauth2/provider/endpoint/WlyyLoginEndpoint.java

@ -7,6 +7,7 @@ import com.google.code.kaptcha.util.Config;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.login.BaseLoginLogDO;
import com.yihu.jw.entity.base.patient.BasePatientDO;
import com.yihu.jw.entity.base.wx.WxWechatDO;
import com.yihu.jw.restmodel.ResultStatus;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
@ -14,6 +15,7 @@ import com.yihu.jw.security.core.userdetails.jdbc.WlyyUserDetailsService;
import com.yihu.jw.security.dao.OauthKeypairDao;
import com.yihu.jw.security.dao.doctor.BaseDoctorDao;
import com.yihu.jw.security.dao.patient.BasePatientDao;
import com.yihu.jw.security.dao.patient.WechatDao;
import com.yihu.jw.security.exception.ImgCaptchaException;
import com.yihu.jw.security.login.service.BaseLoginLogService;
import com.yihu.jw.security.model.*;
@ -28,6 +30,8 @@ import com.yihu.jw.security.utils.SerializeUtil;
import com.yihu.jw.sms.service.YkyySMSService;
import com.yihu.jw.sms.service.ZhongShanSMSService;
import com.yihu.jw.sms.util.ykyy.vo.ResultMsg;
import com.yihu.utils.network.HttpResponse;
import com.yihu.utils.network.HttpUtils;
import com.yihu.utils.security.MD5;
import com.yihu.utils.security.RSAUtils;
import io.swagger.annotations.Api;
@ -143,6 +147,8 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
    private String wechatId;
    @Autowired
    private XzzxService xzzxService;
    @Autowired
    private WechatDao wechatDao;
    @PostConstruct
    private void init() {
@ -1718,6 +1724,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        String text = parameters.get("text");
        String captcha = parameters.get("captcha");
        String loginType = parameters.get("login_type");
        String appletCode = parameters.get("appletCode");
        if(org.apache.commons.lang3.StringUtils.isNotBlank(key)&& org.apache.commons.lang3.StringUtils.isNotBlank(text)){
            if(!verifyCaptcha(key,text)){
                throw new ImgCaptchaException("img_captcha error");
@ -1910,7 +1917,7 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
        BaseLoginLogDO baseLoginLogDO = new BaseLoginLogDO();
        if (!StringUtils.isEmpty(openid) && !"undefined".equalsIgnoreCase(openid) && "3".equals(loginType)) {
            baseLoginLogDO.setOpenid(openid);
            userDetailsService.updateOpenId(openid, wlyyUserSimple.getId());
            /*userDetailsService.updateOpenId(openid, wlyyUserSimple.getId());*/
            if (!StringUtils.isEmpty(wechatId)&& !"undefined".equalsIgnoreCase(wechatId)){
                userDetailsService.updateOpenIdAndWechatId(openid,wlyyUserSimple.getId(),wechatId);
            }
@ -1919,6 +1926,16 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
            //使用密码登录成功后, 更新失败次数为 0
            userDetailsService.addFailureCount(username, 0);
        }
        WxWechatDO wxWechatDO = wechatDao.findById(wechatId);
        String appletOpenid = null;
        if (!StringUtils.isEmpty(appletCode)){
            Map<String,Object> objectMap = checkApplets(appletCode,wxWechatDO.getApplets(),wxWechatDO.getAppletsSecret());
            if (objectMap!=null){
                appletOpenid = objectMap.get("openid").toString();
                userDetailsService.updateOpenId(appletOpenid, wlyyUserSimple.getId());
            }
        }
        userDetailsService.setRolePhth(loginType, token, wlyyUserSimple.getId(), redisTemplate);
        baseLoginLogDO.setUserId(wlyyUserSimple.getId());
@ -1932,6 +1949,26 @@ public class WlyyLoginEndpoint extends AbstractEndpoint {
    }
    public Map<String, Object> checkApplets(String code,String appid,String appSecret) throws Exception {
        HttpUtils httpUtils = new HttpUtils();
        Map<String, Object> param = new HashedMap();
        param.put("appid", appid);
        param.put("secret", appSecret);
        param.put("js_code", code);
        param.put("grant_type", "authorization_code");
        HttpResponse response = httpUtils.doGet("https://api.weixin.qq.com/sns/jscode2session", param);
        org.json.JSONObject rs = new org.json.JSONObject(response.getContent());
        Map<String, Object> res = new HashedMap();
        logger.info("checkApplets:"+response.getContent());
        if (rs.has("openid")){
            res.put("openid", rs.getString("openid"));
            res.put("sessionKey", rs.getString("session_key"));
        }
        return res;
    }
    @RequestMapping(value = "/oauth/findYktPatientPw", method = RequestMethod.POST)
    public Envelop findYktPatientPw(String mobile,String client_id,String login_type,String captcha,String pw)throws Exception {
        if (wlyyRedisVerifyCodeService.verification(client_id, mobile, captcha)) {

+ 27 - 5
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/patient/PatientNoLoginEndPoint.java

@ -10,6 +10,7 @@ import com.yihu.jw.entity.base.dict.DictHospitalDeptDO;
import com.yihu.jw.entity.base.dict.DictJobTitleDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorDO;
import com.yihu.jw.entity.base.doctor.BaseDoctorHospitalDO;
import com.yihu.jw.entity.base.wx.BasePatientWechatDo;
import com.yihu.jw.entity.base.wx.WxWechatDO;
import com.yihu.jw.entity.hospital.article.KnowledgeArticleDO;
import com.yihu.jw.entity.hospital.article.KnowledgeArticleUserDO;
@ -49,6 +50,7 @@ import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.rm.patient.PatientRequestMapping;
import com.yihu.jw.util.common.XMLUtil;
import com.yihu.jw.util.date.DateUtil;
import com.yihu.jw.wechat.dao.BasePatientWechatDao;
import com.yihu.jw.wechat.dao.WechatDao;
import com.yihu.jw.wechat.service.WechatInfoService;
import com.ylzinfo.onepay.sdk.OnepayClient;
@ -64,6 +66,7 @@ import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import net.sf.json.JSONArray;
import org.apache.axis.utils.StringUtils;
import org.apache.commons.collections.map.HashedMap;
import org.slf4j.Logger;
import org.slf4j.LoggerFactory;
import org.springframework.beans.factory.annotation.Autowired;
@ -164,6 +167,8 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    private HospitalSystemMessageService hospitalSystemMessageService;
    @Autowired
    private StatisticsEsService statisticsEsService;
    @Autowired
    private BasePatientWechatDao patientWechatDao;
@ -385,7 +390,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
     */
    @RequestMapping(value = "/getOpenidByCode", method = {RequestMethod.POST, RequestMethod.GET})
    @ResponseBody
    public Envelop getOpenidByCode(String code) throws Exception {
    public Envelop getOpenidByCode(String code,String patientId) throws Exception {
        //通过redis获取openid, 获取不到,则调用微信接口去取
        String key = wxId+":code";
        String openid = redisTemplate.opsForValue().get(key);
@ -393,6 +398,20 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
            return success(PatientRequestMapping.Wechat.api_success,openid);
        }
        openid = wechatInfoService.getOpenidByCode(code, wxId);
        List<BasePatientWechatDo> patientWechatDoList =  patientWechatDao.findByWechatIdAndPatientId(wxId,patientId);
        if (patientWechatDoList!=null&&patientWechatDoList.size()!=0){
            BasePatientWechatDo patientWechatDo = patientWechatDoList.get(0);
            patientWechatDo.setOpenid(openid);
            patientWechatDao.save(patientWechatDo);
        }else {
            BasePatientWechatDo patientWechatDo = new BasePatientWechatDo();
            patientWechatDo.setCreateTime(new Date());
            patientWechatDo.setOpenid(openid);
            patientWechatDo.setWechatId(wxId);
            patientWechatDo.setPatientId(patientId);
            patientWechatDo.setSaasId("dev");
            patientWechatDao.save(patientWechatDo);
        }
        redisTemplate.opsForValue().set(key,openid);
        redisTemplate.expire(key,10, TimeUnit.SECONDS);
        return success(PatientRequestMapping.Wechat.api_success,openid);
@ -409,7 +428,7 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
    @ResponseBody
    @ApiOperation("微信支付结果通知")
    @RequestMapping(value = "/notify", method = {RequestMethod.GET, RequestMethod.POST})
    public Map<String, String> wxPayNotify(HttpServletRequest request, HttpServletResponse response) throws Exception {
    public String wxPayNotify(HttpServletRequest request, HttpServletResponse response) throws Exception {
        String result = "";
        String inputLine;
        while ((inputLine = request.getReader().readLine()) != null) {
@ -418,11 +437,12 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
        request.getReader().close();
        //im处方发消息
        Map<String,Object> wxrs =  XMLUtil.xmltoMap(result);
        Map<String, String> map = new HashedMap();
        if("SUCCESS".equals(wxrs.get("return_code").toString())){
            // 我方 订单号+时间差
            String seqNo = wxrs.get("out_trade_no")+"";
            BusinessOrderDO businessOrderDO = businessOrderDao.selectByOrderNo(seqNo);
            if (businessOrderDO.getStatus()!=1){
            if (businessOrderDO.getStatus()!=1&&businessOrderDO.getStatus()!=9){
                if (businessOrderDO!=null&&businessOrderDO.getOrderCategory().equalsIgnoreCase("4")){
                    WlyyPrescriptionDO wlyyPrescriptionDO = prescriptionDao.findOne(businessOrderDO.getRelationCode());
                    JSONObject object = (JSONObject) JSONObject.toJSON(wlyyPrescriptionDO);
@ -440,10 +460,12 @@ public class PatientNoLoginEndPoint extends EnvelopRestEndpoint {
                    prescriptionVO.setPayStatus(1);
                    imService.pushPrescriptionImMessage(prescriptionVO);
                }
                map= businessOrderService.getWxPayResultNotify(result);
            }
        }
        Map<String, String> map = businessOrderService.getWxPayResultNotify(result);
        return map;
        return XMLUtil.map2xml(map);
    }

+ 1 - 1
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/prescription/PrescriptionEndpoint.java

@ -1464,7 +1464,7 @@ public class PrescriptionEndpoint extends EnvelopRestEndpoint {
            @RequestParam(required = true)Integer type,
            @ApiParam(name = "paymentType", value = "1支付宝 2微信", required = true)
            @RequestParam(required = true)Integer paymentType,
            @ApiParam(name = "patientId", value = "居民Ccode", required = true)
            @ApiParam(name = "patientId", value = "居民code", required = true)
            @RequestParam(required = true)String patientId,
            @ApiParam(name = "hospitalId", value = "医院Ccode", required = true)
            @RequestParam(required = true)String hospitalId,

+ 4 - 6
svr/svr-internet-hospital/src/main/java/com/yihu/jw/hospital/endpoint/ykyy/YkyyController.java

@ -1,21 +1,17 @@
package com.yihu.jw.hospital.endpoint.ykyy;
import com.yihu.jw.entity.hospital.mapping.HospitalDeptMappingDO;
import com.yihu.jw.entity.order.BusinessOrderDO;
import com.yihu.jw.hospital.prescription.service.entrance.YkyyEntranceService;
import com.yihu.jw.hospital.ykyy.service.YkyyService;
import com.yihu.jw.order.BusinessOrderService;
import com.yihu.jw.restmodel.web.Envelop;
import com.yihu.jw.restmodel.web.ListEnvelop;
import com.yihu.jw.restmodel.web.ObjEnvelop;
import com.yihu.jw.restmodel.web.endpoint.EnvelopRestEndpoint;
import com.yihu.jw.rm.hospital.BaseHospitalRequestMapping;
import com.yihu.jw.rm.patient.PatientRequestMapping;
import com.yihu.jw.wechat.service.WxTemplateService;
import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import io.swagger.annotations.ApiParam;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.beans.factory.annotation.Value;
import org.springframework.web.bind.annotation.*;
@ -205,9 +201,11 @@ public class YkyyController extends EnvelopRestEndpoint {
            @ApiParam(name = "outTradeNo", value = "outTradeNo", required = true)
            @RequestParam(required = true)String outTradeNo,
            @ApiParam(name = "notifyUrl", value = "notifyUrl", required = true)
            @RequestParam(required = true)String notifyUrl) throws Exception {
            @RequestParam(required = true)String notifyUrl,
            @ApiParam(name = "patient", value = "patient", required = false)
            @RequestParam(required = false)String patient) throws Exception {
        try {
            return ObjEnvelop.getSuccess("ok",businessOrderService.unifiedorder(wxId,body,totalFee,tradeType,openId,outTradeNo,notifyUrl));
            return ObjEnvelop.getSuccess("ok",businessOrderService.unifiedorder(wxId,body,totalFee,tradeType,openId,outTradeNo,notifyUrl,patient));
        } catch (Exception e) {
            return ObjEnvelop.getError(e.getMessage());
        }