京东售前删除simple
This commit is contained in:
@@ -1410,6 +1410,12 @@ func AdjustJdsOrderSimple(ctx *jxcontext.Context, vendorOrderID string, skuID in
|
||||
if len(orderSkus) == 0 {
|
||||
return fmt.Errorf("未查询到该订单商品!")
|
||||
}
|
||||
|
||||
orderSku := orderSkus[0]
|
||||
if orderSku.Count > 1 {
|
||||
orderSku.Count--
|
||||
_, err = dao.UpdateEntity(db, orderSku, "Count")
|
||||
} else {
|
||||
_, err = dao.DeleteEntity(db, orderSku)
|
||||
}
|
||||
return err
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user