DengBiao 1 год назад
Родитель
Сommit
eb90f297de
2 измененных файлов: 3 добавлений и 2 удалений
  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 Просмотреть файл

@@ -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 Просмотреть файл

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


Загрузка…
Отмена
Сохранить