From 1ffab5d1a53e6cee392fdde1302505e4a4237cce Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Sat, 31 Aug 2024 09:19:53 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hdl/hdl_register.go | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/app/hdl/hdl_register.go b/app/hdl/hdl_register.go index 98ed0c3..6bb6ffe 100644 --- a/app/hdl/hdl_register.go +++ b/app/hdl/hdl_register.go @@ -104,6 +104,21 @@ func RegisterForMedium(c *gin.Context) { e.OutErr(c, e.ERR_DB_ORM, "新增 medium 记录失败") return } + //4、新增 MediumDivisionStrategy 记录 + MediumDivisionStrategyModel := model.MediumDivisionStrategy{ + MediumId: utils.StrToInt(mediumId), + Uuid: utils.StrToInt(masterId), + CreateAt: now.Format("2006-01-02 15:04:05"), + UpdateAt: now.Format("2006-01-02 15:04:05"), + } + insertAffected, err = db.Db.Insert(&MediumDivisionStrategyModel) + if err != nil { + return + } + if insertAffected <= 0 { + e.OutErr(c, e.ERR_DB_ORM, "新增 记录失败") + return + } e.OutSuc(c, "success", nil) return