1
This commit is contained in:
@@ -583,7 +583,7 @@ func SeparateResultQuery(merchantNo, separateNo string) (*lakala.SeparateResultQ
|
|||||||
recordsObj.Status = result.Status
|
recordsObj.Status = result.Status
|
||||||
recordsObj.SeparateNo = result.SeparateNo
|
recordsObj.SeparateNo = result.SeparateNo
|
||||||
recordsObj.OutSeparateNo = result.OutSeparateNo
|
recordsObj.OutSeparateNo = result.OutSeparateNo
|
||||||
|
recordsObj.TotalAmt = result.TotalAmt
|
||||||
recv := make([]*lakala.RecvDatasParam, 0, 0)
|
recv := make([]*lakala.RecvDatasParam, 0, 0)
|
||||||
for _, v := range result.DetailDatas {
|
for _, v := range result.DetailDatas {
|
||||||
recv = append(recv, &lakala.RecvDatasParam{
|
recv = append(recv, &lakala.RecvDatasParam{
|
||||||
|
|||||||
@@ -94,6 +94,9 @@ func RefundOrderByLaKaLa(ctx *jxcontext.Context, orderPay *model.OrderPay, afsOr
|
|||||||
}
|
}
|
||||||
|
|
||||||
resp, err := api.LaKaLaApi.RefundOrder(param)
|
resp, err := api.LaKaLaApi.RefundOrder(param)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
orderPayRefund = &model.OrderPayRefund{
|
orderPayRefund = &model.OrderPayRefund{
|
||||||
RefundID: refundID,
|
RefundID: refundID,
|
||||||
VendorRefundID: resp.LogNo,
|
VendorRefundID: resp.LogNo,
|
||||||
@@ -104,15 +107,10 @@ func RefundOrderByLaKaLa(ctx *jxcontext.Context, orderPay *model.OrderPay, afsOr
|
|||||||
RefundFee: refundFee,
|
RefundFee: refundFee,
|
||||||
RefundCreatedAt: time.Now(),
|
RefundCreatedAt: time.Now(),
|
||||||
}
|
}
|
||||||
if err == nil {
|
|
||||||
orderPayRefund.Status = model.RefundStatusYes
|
orderPayRefund.Status = model.RefundStatusYes
|
||||||
orderPayRefund.OriginalData = utils.Format4Output(resp, true)
|
orderPayRefund.OriginalData = utils.Format4Output(resp, true)
|
||||||
orderPay.Status = model.PayStatusRefund
|
orderPay.Status = model.PayStatusRefund
|
||||||
dao.UpdateEntity(db, orderPay, "Status")
|
dao.UpdateEntity(db, orderPay, "Status")
|
||||||
} else {
|
|
||||||
orderPayRefund.Status = model.RefundStatusNo
|
|
||||||
orderPayRefund.OriginalData = err.Error()
|
|
||||||
}
|
|
||||||
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
|
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
|
||||||
dao.CreateEntity(db, orderPayRefund)
|
dao.CreateEntity(db, orderPayRefund)
|
||||||
case lakala.PayWayMini, lakala.PayWayRegister: // 主扫被扫
|
case lakala.PayWayMini, lakala.PayWayRegister: // 主扫被扫
|
||||||
@@ -128,6 +126,9 @@ func RefundOrderByLaKaLa(ctx *jxcontext.Context, orderPay *model.OrderPay, afsOr
|
|||||||
LocationInfo: lakala.LocationInfoObj{RequestIp: ctx.GetRealRemoteIP()},
|
LocationInfo: lakala.LocationInfoObj{RequestIp: ctx.GetRealRemoteIP()},
|
||||||
}
|
}
|
||||||
resp, err := api.LaKaLaApi.AggregateRefund(param)
|
resp, err := api.LaKaLaApi.AggregateRefund(param)
|
||||||
|
if err != nil {
|
||||||
|
return nil, err
|
||||||
|
}
|
||||||
orderPayRefund = &model.OrderPayRefund{
|
orderPayRefund = &model.OrderPayRefund{
|
||||||
RefundID: refundID,
|
RefundID: refundID,
|
||||||
VendorRefundID: resp.LogNo,
|
VendorRefundID: resp.LogNo,
|
||||||
@@ -138,16 +139,10 @@ func RefundOrderByLaKaLa(ctx *jxcontext.Context, orderPay *model.OrderPay, afsOr
|
|||||||
RefundFee: refundFee,
|
RefundFee: refundFee,
|
||||||
RefundCreatedAt: time.Now(),
|
RefundCreatedAt: time.Now(),
|
||||||
}
|
}
|
||||||
if err == nil {
|
|
||||||
orderPayRefund.Status = model.RefundStatusYes
|
orderPayRefund.Status = model.RefundStatusYes
|
||||||
orderPayRefund.OriginalData = utils.Format4Output(resp, true)
|
orderPayRefund.OriginalData = utils.Format4Output(resp, true)
|
||||||
orderPay.Status = model.PayStatusRefund
|
orderPay.Status = model.PayStatusRefund
|
||||||
dao.UpdateEntity(db, orderPay, "Status")
|
dao.UpdateEntity(db, orderPay, "Status")
|
||||||
} else {
|
|
||||||
orderPayRefund.Status = model.RefundStatusNo
|
|
||||||
orderPayRefund.OriginalData = err.Error()
|
|
||||||
}
|
|
||||||
|
|
||||||
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
|
dao.WrapAddIDCULDEntity(orderPayRefund, ctx.GetUserName())
|
||||||
dao.CreateEntity(db, orderPayRefund)
|
dao.CreateEntity(db, orderPayRefund)
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user