Browse Source

update

add_mode
DengBiao 1 year ago
parent
commit
eb90f297de
2 changed files with 3 additions and 2 deletions
  1. +1
    -0
      app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go
  2. +2
    -2
      app/db/db_central_kitchen_for_school_package_ord_for_reserve.go

+ 1
- 0
app/admin/hdl/enterprise_manage/hdl_central_kitchen_for_school.go View File

@@ -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())


+ 2
- 2
app/db/db_central_kitchen_for_school_package_ord_for_reserve.go View File

@@ -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


Loading…
Cancel
Save