From 986af5f431fb495b1fe2d9fc6a2f196b6b84b847 Mon Sep 17 00:00:00 2001 From: huangjiajun <582604932@qq.com> Date: Thu, 5 Dec 2024 11:18:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=89=93=E5=8C=85?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- app/hdl/cloud_bundle/hdl_list.go | 2 +- app/md/md_cloud_bundle.go | 4 ++++ app/svc/cloud_bundle/svc_list.go | 4 ++-- 3 files changed, 7 insertions(+), 3 deletions(-) diff --git a/app/hdl/cloud_bundle/hdl_list.go b/app/hdl/cloud_bundle/hdl_list.go index 06a1587..657119d 100644 --- a/app/hdl/cloud_bundle/hdl_list.go +++ b/app/hdl/cloud_bundle/hdl_list.go @@ -42,7 +42,7 @@ func Build(c *gin.Context) { // @Accept json // @Produce json // @param Authorization header string true "验证参数Bearer和token空格拼接" -// @Param req body md.ArticleDelReq true "(分页信息必填)" +// @Param req body md.CloudBundleDelReq true "(分页信息必填)" // @Success 200 {string} "具体数据" // @Failure 400 {object} md.Response "具体错误" // @Router /api/cloudBundle/del [post] diff --git a/app/md/md_cloud_bundle.go b/app/md/md_cloud_bundle.go index 5f472ef..1cca7eb 100644 --- a/app/md/md_cloud_bundle.go +++ b/app/md/md_cloud_bundle.go @@ -93,6 +93,10 @@ type Guide struct { type AuditClearReq struct { Os string `json:"os" example:"1-安卓 2-ios"` } +type CloudBundleDelReq struct { + Ids []string `json:"ids"` +} + type CloudBundleVersion struct { Type string `json:"type"` Img string `json:"img"` diff --git a/app/svc/cloud_bundle/svc_list.go b/app/svc/cloud_bundle/svc_list.go index 6916c3a..6d907be 100644 --- a/app/svc/cloud_bundle/svc_list.go +++ b/app/svc/cloud_bundle/svc_list.go @@ -175,12 +175,12 @@ func getcurl(url string) (string, error) { return string(body), nil } func Del(c *gin.Context) { - var req *md.ArticleDelReq + var req *md.CloudBundleDelReq if err := c.ShouldBindJSON(&req); err != nil { e.OutErr(c, e.ERR_INVALID_ARGS, err) return } - db.Db.In("id", req.Id).Delete(&model.CloudBundle{}) + db.Db.In("id", req.Ids).Delete(&model.CloudBundle{}) e.OutSuc(c, "success", nil) return }