Merge branch 'feat-zjy-fixbug-033' into dev
This commit is contained in:
commit
00460ed290
@ -842,7 +842,17 @@ func DeleteValueAddService(req *bundle.DeleteValueAddServiceRequest) (res *bundl
|
||||
|
||||
func UpdateReconciliationStatusBySerialNumber(req *bundle.UpdateStatusAndPayTimeBySerialNumber) (res *bundle.CommonResponse, err error) {
|
||||
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) {
|
||||
return nil, errors.New("对账单记录不存在")
|
||||
}
|
||||
@ -851,7 +861,7 @@ func UpdateReconciliationStatusBySerialNumber(req *bundle.UpdateStatusAndPayTime
|
||||
updates := model.Reconciliation{
|
||||
PayTime: req.PayTime,
|
||||
PayStatus: int(req.PaymentStatus),
|
||||
SerialNumber: req.SerialNumber,
|
||||
SerialNumber: order.OrderNo,
|
||||
}
|
||||
|
||||
if req.PaymentStatus == 2 && existing.CurrencyType == 2 && existing.PayAmount > 0 {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user