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