Compare commits

..

No commits in common. "main" and "dev-lzh" have entirely different histories.

View File

@ -112,22 +112,6 @@ func UpdateOrderRecordByOrderNO(orderRecord *model.BundleOrderRecords) (res *bun
valueAdd.CheckoutSessionId = orderRecord.CheckoutSessionId
valueAdd.CheckoutSessionUrl = orderRecord.CheckoutSessionUrl
}
if orderRecord.Status == 2 {
tempValues := make([]*model.BundleOrderValueAdd, 0)
err = app.ModuleClients.BundleDB.Model(&model.BundleOrderValueAdd{}).
Where("order_no = ?", orderRecord.OrderNo).
Find(&tempValues).Error
if len(tempValues) > 0 {
for _, value := range tempValues {
if value.PaymentStatus == 2 {
fmt.Println("====================已经付过了")
return nil, errors.New("已付款了")
}
}
}
}
err = app.ModuleClients.BundleDB.Model(&model.BundleOrderValueAdd{}).
Where("order_no = ?", orderRecord.OrderNo).
Updates(valueAdd).Error