|
|
|
@ -6,7 +6,6 @@ import (
|
|
|
|
|
"recook/internal/back"
|
|
|
|
|
"recook/internal/cache"
|
|
|
|
|
"recook/internal/dbc"
|
|
|
|
|
"recook/internal/libs/snow"
|
|
|
|
|
"recook/internal/model/aftersales"
|
|
|
|
|
"recook/internal/model/goods"
|
|
|
|
|
"recook/internal/model/order"
|
|
|
|
@ -176,14 +175,14 @@ func ApplyReturnOrder(c *gin.Context) {
|
|
|
|
|
ReasonImg: p.ReasonImg,
|
|
|
|
|
RefundNo: fmt.Sprintf("%vA%d", orderInfo.TradeNo, v.ID),
|
|
|
|
|
}
|
|
|
|
|
lastID, e := snow.GetAfsWorker().NextID()
|
|
|
|
|
if e != nil {
|
|
|
|
|
back.Err(c, "网络异常,请稍后重试")
|
|
|
|
|
tx.Rollback()
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
one.ID = uint(lastID)
|
|
|
|
|
//lastID, e := snow.GetAfsWorker().NextID()
|
|
|
|
|
//if e != nil {
|
|
|
|
|
// back.Err(c, "网络异常,请稍后重试")
|
|
|
|
|
// tx.Rollback()
|
|
|
|
|
// return
|
|
|
|
|
//}
|
|
|
|
|
//
|
|
|
|
|
//one.ID = uint(lastID)
|
|
|
|
|
|
|
|
|
|
if err := tx.Create(&one).Error; err != nil {
|
|
|
|
|
back.Err(c, err.Error())
|
|
|
|
@ -194,7 +193,7 @@ func ApplyReturnOrder(c *gin.Context) {
|
|
|
|
|
//这里插入日志
|
|
|
|
|
userLog, _ := common.GetManageUser(c)
|
|
|
|
|
Log := aftersales.AftersalesLog{
|
|
|
|
|
AsId: uint(lastID),
|
|
|
|
|
AsId: one.ID,
|
|
|
|
|
Title: "买家申请退货",
|
|
|
|
|
Content: "退货原因:" + p.ReasonContent + "|退款金额:" + one.RefundAmount.String() + "|退回瑞币:" + one.RefundCoin.Add(one.ExpressFree).String(),
|
|
|
|
|
Ctime: formatime.NewSecondNow(),
|
|
|
|
|