This commit is contained in:
邹宗楠
2025-08-06 18:12:20 +08:00
parent 22813b9b29
commit a1a74f9e93
4 changed files with 41 additions and 27 deletions

View File

@@ -1,11 +1,9 @@
package controllers
import (
"encoding/json"
"git.rosy.net.cn/baseapi/platformapi/lakala"
"git.rosy.net.cn/baseapi/utils"
lakalaServer "git.rosy.net.cn/jx-callback/business/lakala"
"git.rosy.net.cn/jx-callback/business/partner/purchase/jx/localjx"
"github.com/astaxie/beego/server/web"
)
@@ -1046,24 +1044,25 @@ func (c *LaKaLaController) CloseOrderByMini() {
})
}
// AggregateRefundOrder 聚合支付退款
// @Title 聚合支付退款
// @Description 聚合支付退款
// @Param token header string true "认证token"
// @Param vendorOrderID formData string true "订单ID"
// @Param skuIds formData string true "[key:value]退款商品 skuId:count,int"
// @Param Reason formData string false "退单原因"
// @Success 200 {object} controllers.CallResult
// @Failure 200 {object} controllers.CallResult
// @router /AggregateRefundOrder [post]
func (c *LaKaLaController) AggregateRefundOrder() {
c.callAggregateRefundOrder(func(params *tLakalaAggregateRefundOrderParams) (retVal interface{}, errCode string, err error) {
skuIds := make(map[int]int, 0)
if err = json.Unmarshal([]byte(params.SkuIds), &skuIds); err != nil {
return nil, "", err
}
retVal, err = localjx.RefundBarCodeScannerOrderByLaKaLa(params.Ctx, params.VendorOrderID, skuIds, params.Reason, "aggregate")
return
})
}
//
//// AggregateRefundOrder 聚合支付退款
//// @Title 聚合支付退款
//// @Description 聚合支付退款
//// @Param token header string true "认证token"
//// @Param vendorOrderID formData string true "订单ID"
//// @Param skuIds formData string true "[key:value]退款商品 skuId:count,int"
//// @Param Reason formData string false "退单原因"
//// @Success 200 {object} controllers.CallResult
//// @Failure 200 {object} controllers.CallResult
//// @router /AggregateRefundOrder [post]
//func (c *LaKaLaController) AggregateRefundOrder() {
// c.callAggregateRefundOrder(func(params *tLakalaAggregateRefundOrderParams) (retVal interface{}, errCode string, err error) {
// skuIds := make(map[int]int, 0)
// if err = json.Unmarshal([]byte(params.SkuIds), &skuIds); err != nil {
// return nil, "", err
// }
//
// retVal, err = localjx.RefundBarCodeScannerOrderByLaKaLa(params.Ctx, params.VendorOrderID, skuIds, params.Reason, "aggregate")
// return
// })
//}