fix: 调整创建订单的uuid
This commit is contained in:
parent
2155d56187
commit
151abc145b
@ -818,7 +818,17 @@ func DeleteValueAddService(req *bundle.DeleteValueAddServiceRequest) (res *bundl
|
|||||||
|
|
||||||
func UpdateReconciliationStatusBySerialNumber(req *bundle.UpdateStatusAndPayTimeBySerialNumber) (res *bundle.CommonResponse, err error) {
|
func UpdateReconciliationStatusBySerialNumber(req *bundle.UpdateStatusAndPayTimeBySerialNumber) (res *bundle.CommonResponse, err error) {
|
||||||
var existing model.Reconciliation
|
var existing model.Reconciliation
|
||||||
if err := app.ModuleClients.BundleDB.Where("serial_number = ?", req.SerialNumber).First(&existing).Error; err != nil {
|
|
||||||
|
//req.SerialNumber现在是orderuuid
|
||||||
|
var order model.BundleOrderRecords
|
||||||
|
if err := app.ModuleClients.BundleDB.Where("uuid = ?", req.SerialNumber).First(&order).Error; err != nil {
|
||||||
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
|
return nil, errors.New("订单记录不存在")
|
||||||
|
}
|
||||||
|
return nil, fmt.Errorf("查询订单失败: %v", err)
|
||||||
|
}
|
||||||
|
|
||||||
|
if err := app.ModuleClients.BundleDB.Where("bundle_order_on = ?", req.SerialNumber).First(&existing).Error; err != nil {
|
||||||
if errors.Is(err, gorm.ErrRecordNotFound) {
|
if errors.Is(err, gorm.ErrRecordNotFound) {
|
||||||
return nil, errors.New("对账单记录不存在")
|
return nil, errors.New("对账单记录不存在")
|
||||||
}
|
}
|
||||||
@ -827,7 +837,7 @@ func UpdateReconciliationStatusBySerialNumber(req *bundle.UpdateStatusAndPayTime
|
|||||||
updates := model.Reconciliation{
|
updates := model.Reconciliation{
|
||||||
PayTime: req.PayTime,
|
PayTime: req.PayTime,
|
||||||
PayStatus: int(req.PaymentStatus),
|
PayStatus: int(req.PaymentStatus),
|
||||||
SerialNumber: req.SerialNumber,
|
SerialNumber: order.OrderNo,
|
||||||
}
|
}
|
||||||
|
|
||||||
if req.PaymentStatus == 2 && existing.CurrencyType == 2 && existing.PayAmount > 0 {
|
if req.PaymentStatus == 2 && existing.CurrencyType == 2 && existing.PayAmount > 0 {
|
||||||
|
|||||||
Loading…
Reference in New Issue
Block a user