Browse Source

Merge branch 'dev' of yeshijie/wlyy2.0 into dev

叶仕杰 3 years ago
parent
commit
207d0a70d9

+ 8 - 2
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/endpoint/patient/PayEndpoint.java

@ -88,9 +88,15 @@ public class PayEndpoint extends EnvelopRestEndpoint {
    @GetMapping("orderInfo")
    @ApiOperation(value = "订单详情")
    public ObjEnvelop orderInfo(@ApiParam(name = "id", value = "订单id") @RequestParam(value = "id", required = true) Integer id) {
    public ObjEnvelop orderInfo(@ApiParam(name = "id", value = "订单id")
                                    @RequestParam(value = "id", required = false) Integer id,
                                @ApiParam(name = "orderId", value = "工单id")
                                @RequestParam(value = "orderId", required = false) String orderId) {
        try {
            JSONObject json = payService.orderInfo(id);
            if(StringUtil.isBlank(orderId)&&id==null){
                return ObjEnvelop.getError("入参有误",-1);
            }
            JSONObject json = payService.orderInfo(id,orderId);
            return ObjEnvelop.getSuccess("获取成功",json);
        } catch (Exception e) {
            return failedObjEnvelopException2(e);

+ 10 - 4
svr/svr-cloud-care/src/main/java/com/yihu/jw/care/service/pay/PayService.java

@ -189,10 +189,16 @@ public class PayService {
     * 订单详情接口
     * @param id
     */
    public JSONObject orderInfo(Integer id){
    public JSONObject orderInfo(Integer id,String orderId){
        JSONObject resJson = new JSONObject();
        resJson.put("id",id);
        BusinessOrderDO businessOrderDO = businessOrderDao.findOne(id);
        BusinessOrderDO businessOrderDO;
        if(StringUtil.isBlank(orderId)){
            businessOrderDO = businessOrderDao.findOne(id);
        }else{
            businessOrderDO = businessOrderDao.selectByRelationCode(orderId);
        }
        resJson.put("id",businessOrderDO.getId());
        resJson.put("orderId",businessOrderDO.getRelationCode());
        String type = businessOrderDO.getOrderCategory();
        Integer status = businessOrderDO.getStatus();
        resJson.put("orderCategory",type);
@ -354,7 +360,7 @@ public class PayService {
            result.put(ResponseContant.resultMsg, "工单未创建支付订单");
            return result;
        }
        JSONObject payInfo = orderInfo(businessOrderDO.getId());
        JSONObject payInfo = orderInfo(businessOrderDO.getId(),null);
        result.put(ResponseContant.resultFlag, ResponseContant.success);
        result.put(ResponseContant.resultMsg, payInfo);
        return result;