This commit is contained in:
momo 2023-10-07 17:03:28 +08:00
parent 0b0e08c377
commit e9f6b6cc68

View File

@ -744,7 +744,7 @@ func (d *defaultOrder) CreatePrePaymentByDeposit(ctx context.Context, in *Create
var table = gmodel.NewAllModels(d.MysqlConn).FsOrder.TableName()
var resUpdate *gorm.DB
if in.DeliveryMethod == constants.DELIVERYMETHODDIRECTMAIL {
resUpdate = d.MysqlConn.Exec(fmt.Sprintf("UPDATE %s SET `delivery_method` = ?, `utime` = ?, `order_address` = JSON_MERGE_PATCH(`order_address`,?), `status_link` = JSON_MERGE_PATCH(`status_link`,?) WHERE `id` = ?", table), ntime, in.DeliveryMethod, orderAddressByte, statusLinkByte, orderInfo.Id)
resUpdate = d.MysqlConn.Exec(fmt.Sprintf("UPDATE %s SET `delivery_method` = ? , `utime` = ?, `order_address` = JSON_MERGE_PATCH(`order_address`,?), `status_link` = JSON_MERGE_PATCH(`status_link`,?) WHERE `id` = ?", table), in.DeliveryMethod, ntime, orderAddressByte, statusLinkByte, orderInfo.Id)
} else {
resUpdate = d.MysqlConn.Exec(fmt.Sprintf("UPDATE %s SET `delivery_method` = ? , `utime` = ? WHERE `id` = ?", table), in.DeliveryMethod, ntime, orderInfo.Id)
}