From eb90f297de763f167ddbcab5bea80d4c7aec615d Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Thu, 14 Sep 2023 19:48:55 +0800 Subject: [PATCH] update --- .../hdl/enterprise_manage/hdl_central_kitchen_for_school.go | 1 + .../db_central_kitchen_for_school_package_ord_for_reserve.go | 4 ++-- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go b/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go index 0fdefe4..4f8a6ba 100644 --- a/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go +++ b/app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go @@ -856,6 +856,7 @@ func CentralKitchenForSchoolReserveUpdateStudent(c *gin.Context) { } centralKitchenForSchoolPackageOrdForReserve.UserIdentityId = req.UserIdentityId centralKitchenForSchoolPackageOrdForReserve.UserIdentityName = identity.Name + centralKitchenForSchoolPackageOrdForReserve.UpdateAt = time.Now().Format("2006-01-02 15:04:05") updateAffected, err := centralKitchenForSchoolPackageOrdForReserveDb.CentralKitchenForSchoolPackageOrdForReserveUpdate(centralKitchenForSchoolPackageOrdForReserve, "user_identity_name", "user_identity_id", "update_at") if err != nil { e.OutErr(c, e.ERR_DB_ORM, err.Error()) diff --git a/app/db/db_central_kitchen_for_school_package_ord_for_reserve.go b/app/db/db_central_kitchen_for_school_package_ord_for_reserve.go index 563e81a..b3bc0eb 100644 --- a/app/db/db_central_kitchen_for_school_package_ord_for_reserve.go +++ b/app/db/db_central_kitchen_for_school_package_ord_for_reserve.go @@ -83,9 +83,9 @@ func (centralKitchenForSchoolPackageOrdForReserveDb *CentralKitchenForSchoolPack err error ) if forceColums != nil { - affected, err = centralKitchenForSchoolPackageOrdForReserveDb.Db.Where("out_trade_no=?", centralKitchenForSchoolPackageOrdForReserveDb.OutTradeNo).Cols(forceColums...).Update(m) + affected, err = centralKitchenForSchoolPackageOrdForReserveDb.Db.Where("id=?", m.Id).Cols(forceColums...).Update(m) } else { - affected, err = centralKitchenForSchoolPackageOrdForReserveDb.Db.Where("out_trade_no=?", centralKitchenForSchoolPackageOrdForReserveDb.OutTradeNo).Update(m) + affected, err = centralKitchenForSchoolPackageOrdForReserveDb.Db.Where("id=?", m.Id).Update(m) } if err != nil { return 0, err