Merge remote-tracking branch 'origin/rsm' into rsm

This commit is contained in:
邹宗楠
2022-07-27 14:09:05 +08:00
3 changed files with 20 additions and 2 deletions

View File

@@ -200,11 +200,14 @@ func CreateWayOrder(ctx *jxcontext.Context, param *model.MakeOrderParamReq, user
func CancelWayOrder(ctx *jxcontext.Context, userId string, param *bida.CancelOrderReq) error {
// 查询订单
globals.SugarLogger.Debug("userid==================", userId)
globals.SugarLogger.Debug("param.order_no==================", param.OrderNo)
order := &model.UserVendorOrder{UserId: userId, LocalWayBill: param.OrderNo}
if err := dao.GetEntity(dao.GetDB(), order, "UserId", "LocalWayBill"); err != nil {
return err
}
globals.SugarLogger.Debugf("sdhgeagqweg344w33qgweag== %s ", order.OtherWayBill)
globals.SugarLogger.Debugf("jbhbhjdsgbgjhghiwsg== %s ", order.LastOperator)
if time.Now().Unix()-order.CreatedAt.Unix() <= 30 {
return errors.New("支付成功后超过30s才能取消")
}