From 866311395e961aaf50acaa44bbba7ba760ca09c7 Mon Sep 17 00:00:00 2001 From: DengBiao <2319963317@qq.com> Date: Wed, 3 Apr 2024 10:59:16 +0800 Subject: [PATCH] update --- app/admin/hdl/hdl_merchant.go | 3 ++- app/admin/md/md_merchant.go | 1 + 2 files changed, 3 insertions(+), 1 deletion(-) diff --git a/app/admin/hdl/hdl_merchant.go b/app/admin/hdl/hdl_merchant.go index b20bdf0..f4a9d88 100644 --- a/app/admin/hdl/hdl_merchant.go +++ b/app/admin/hdl/hdl_merchant.go @@ -115,7 +115,8 @@ func MerchantUpdate(c *gin.Context) { merchant.EnterpriseId = req.EnterpriseId merchant.Name = req.Name merchant.UpdateAt = now.Format("2006-01-02 15:04:05") - _, err = merchantDb.MerchantUpdate(merchant, "name", "enterprise_id", "update_at") + merchant.CreateAt = req.CreateAt + _, err = merchantDb.MerchantUpdate(merchant, "name", "enterprise_id", "update_at", "create_at") if err != nil { e.OutErr(c, e.ERR_DB_ORM, err.Error()) return diff --git a/app/admin/md/md_merchant.go b/app/admin/md/md_merchant.go index 5ac765f..f47a2e3 100644 --- a/app/admin/md/md_merchant.go +++ b/app/admin/md/md_merchant.go @@ -9,6 +9,7 @@ type MerchantUpdateReq struct { Id int `json:"id" binding:"required" label:"id"` Name string `json:"name" binding:"required" label:"名称"` EnterpriseId int `json:"enterprise_id" binding:"required" label:"校企id"` + CreateAt string `json:"create_at" binding:"required" label:"创建时间"` } type MerchantListReq struct {