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 }