|
|
|
@ -169,9 +169,9 @@ func DeleteMenuInfo(c *gin.Context) {
|
|
|
|
|
// @Success 200 {object} Model.Res
|
|
|
|
|
// @Router /base/menu/UpdateMenuInfo [post]
|
|
|
|
|
// @X-EmptyLimit ["menuId","menuName","menuCode","menuUrl","menuIcon"]
|
|
|
|
|
// @X-LengthLimit [{"menuName":"36,36"},{"menuName":"2,50"},{"menuCode":"2,20"},{"menuUrl":"1,500"}]
|
|
|
|
|
// @X-LengthLimit [{"menuId":"36,36"},{"menuName":"36,36"},{"menuName":"2,50"},{"menuCode":"2,20"},{"menuUrl":"1,500"}]
|
|
|
|
|
// @X-RoleLimit ["1"]
|
|
|
|
|
// @X-Sort [3]
|
|
|
|
|
// @X-Sort [5]
|
|
|
|
|
func UpdateMenuInfo(c *gin.Context) {
|
|
|
|
|
//菜单ID
|
|
|
|
|
menuId := c.PostForm("menuName")
|
|
|
|
@ -197,3 +197,36 @@ func UpdateMenuInfo(c *gin.Context) {
|
|
|
|
|
Message: r.Message,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
// @Summary 设置菜单排序
|
|
|
|
|
// @Description 设置菜单排序
|
|
|
|
|
// @Tags 菜单信息
|
|
|
|
|
// @Accept application/x-www-form-urlencoded
|
|
|
|
|
// @Produce json
|
|
|
|
|
// @Param menuId formData string true "菜单ID"
|
|
|
|
|
// @Param direction formData int true "调整顺序的方向 1:向上 2:向下"
|
|
|
|
|
// @Success 200 {object} Model.Res
|
|
|
|
|
// @Router /base/menu/SetMenuSortInfo [post]
|
|
|
|
|
// @X-EmptyLimit ["menuId","direction"]
|
|
|
|
|
// @X-LengthLimit [{"menuId":"36,36"}]
|
|
|
|
|
// @X-IntRangeLimit [{"direction":"1,2"}]
|
|
|
|
|
// @X-RoleLimit ["1"]
|
|
|
|
|
// @X-Sort [6]
|
|
|
|
|
func SetMenuSortInfo(c *gin.Context) {
|
|
|
|
|
//菜单ID
|
|
|
|
|
menuId := c.PostForm("menuId")
|
|
|
|
|
//调整顺序的方向
|
|
|
|
|
direction := CommonUtil.ConvertStringToInt32(c.PostForm("direction"))
|
|
|
|
|
r, err := BaseMenuService.SetMenuSortInfo(menuId, direction)
|
|
|
|
|
if err != nil {
|
|
|
|
|
c.JSON(http.StatusOK, Model.Res{
|
|
|
|
|
Success: false,
|
|
|
|
|
Message: "调用RPC服务失败!",
|
|
|
|
|
})
|
|
|
|
|
return
|
|
|
|
|
}
|
|
|
|
|
c.JSON(http.StatusOK, Model.Res{
|
|
|
|
|
Success: r.Success,
|
|
|
|
|
Message: r.Message,
|
|
|
|
|
})
|
|
|
|
|
}
|
|
|
|
|