瀏覽代碼

update

add_mode
DengBiao 1 年之前
父節點
當前提交
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


Loading…
取消
儲存