商城退款 实例

本文详细介绍了关于一站式支付的退款参数设置,包括订单ID、患者ID等关键信息,并提供了查询未支付账单结算单ID及正向单的SQL语句。通过这些内容,读者可以了解如何进行支付退款操作及账单状态查询。

摘要生成于 C知道 ,由 DeepSeek-R1 满血版支持, 前往体验 >

 http://10.100.30.140:8001/WebReport/ReportServer?reportlet=product%2Fdemohnxd%2Fthc_rcm_wuhu_yibao.cpt&id=01c43809b8764524bc2d3a36c681e814&op=vie

 

 

1.一站式支付退款参数:

{
    "orderId":"58E654C3FFDF4146812C6FDF7F443A5A",
    "patientId":"XML429lNKpjyl7t5rDI",
    "seller":"0492b551-2757-4039-9677-23e095fbe3ab",
    "orderTime":"2019-01-09 16:28:17",
    "membersNo":null,
    "bizType":3,
    "direction":2,
    "totalPrice":140,
    "payPrice":140,
    "orderNo":"",
    "refundNo":"54702249603099",
    "details":[
        {
            "orderItemNo":"54702249603100",
            "goodsId":"22002",
            "goodsName":"住院诊疗费-主治",
            "goodsType":4,
            "singleOrigPrice":60,
            "singleSalePrice":60,
            "count":1
        },
        {
            "orderItemNo":"54702249603101",
            "goodsId":"b7c7d5ee-d04e-11e8-a947-525400ccdcb2",
            "goodsName":"住院诊疗费-副主任",
            "goodsType":4,
            "singleOrigPrice":80,
            "singleSalePrice":80,
            "count":1
        }
    ]
}

 

2. 查询所有的未支付的账单结算单ID  SQL 

select distinct
    a.id as accountId,
    a.settlement_id,
    c.settlement_no
from thc_rcm.`mall_account_bill` a
join thc_rcm.`mall_account_bill_detail` b on a.id = b.`account_id`
join thc_rcm.`mall_settlement_detail` d on d.`account_detail_id` = b.id and d.`account_id` = a.id
join thc_rcm.`mall_settlement` c on c.id = d.`settlement_id`
inner join `thc_passport`.`patient` p on a.`patient_id` = p.id
where a.`refund_no` = '54702249603099' and a.status in (0,1)  and c.status in (0,1)
order by a.id

 

3. 正向单的查询:

select 
    p.name,
    a.id as accountId,
    a.settlement_id,
    c.settlement_no,
    b.id as accountDetailId,
    d.id as settlementDetailId,
    a.status as accountStatus,
    c.status as settlementStatus,
    a.isDelete as accountDelete,
    c.isDelete as settlementDelete
from thc_rcm.`mall_account_bill` a
join thc_rcm.`mall_account_bill_detail` b on a.id = b.`account_id`
join thc_rcm.`mall_settlement_detail` d on d.`account_detail_id` = b.id and d.`account_id` = a.id
join thc_rcm.`mall_settlement` c on c.id = d.`settlement_id`
inner join `thc_passport`.`patient` p on a.`patient_id` = p.id
where a.`order_no` in ('54702249603099') -- and a.status in (0,1) -- 0 新建 1待处理 2已处理 3部分退款 4全部退款
order by a.id

 

 

商城账单里回写了结算单ID字段

 

转载于:https://www.cnblogs.com/guchunchao/p/10246918.html

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值