mirror of
https://gitee.com/XM-GO/PandaX.git
synced 2026-05-06 20:11:27 +08:00
【更新】更新
This commit is contained in:
@@ -3,7 +3,6 @@ package api
|
||||
import (
|
||||
"pandax/apps/system/entity"
|
||||
"pandax/apps/system/services"
|
||||
"pandax/base/ctx"
|
||||
"pandax/base/ginx"
|
||||
"pandax/base/utils"
|
||||
"strings"
|
||||
@@ -24,7 +23,7 @@ type NoticeApi struct {
|
||||
// @Success 200 {string} string "{"code": 200, "data": [...]}"
|
||||
// @Router /system/post [get]
|
||||
// @Security
|
||||
func (p *NoticeApi) GetNoticeList(rc *ctx.ReqCtx) {
|
||||
func (p *NoticeApi) GetNoticeList(rc *ginx.ReqCtx) {
|
||||
pageNum := ginx.QueryInt(rc.GinCtx, "pageNum", 1)
|
||||
pageSize := ginx.QueryInt(rc.GinCtx, "pageSize", 10)
|
||||
noticeType := rc.GinCtx.Query("noticeType")
|
||||
@@ -56,7 +55,7 @@ func (p *NoticeApi) GetNoticeList(rc *ctx.ReqCtx) {
|
||||
// @Success 200 {string} string "{"code": 400, "message": "添加失败"}"
|
||||
// @Router /system/notice [post]
|
||||
// @Security X-TOKEN
|
||||
func (p *NoticeApi) InsertNotice(rc *ctx.ReqCtx) {
|
||||
func (p *NoticeApi) InsertNotice(rc *ginx.ReqCtx) {
|
||||
var notice entity.SysNotice
|
||||
ginx.BindJsonAndValid(rc.GinCtx, ¬ice)
|
||||
notice.UserName = rc.LoginAccount.UserName
|
||||
@@ -73,7 +72,7 @@ func (p *NoticeApi) InsertNotice(rc *ctx.ReqCtx) {
|
||||
// @Success 200 {string} string "{"code": 400, "message": "添加失败"}"
|
||||
// @Router /system/notice [put]
|
||||
// @Security X-TOKEN
|
||||
func (p *NoticeApi) UpdateNotice(rc *ctx.ReqCtx) {
|
||||
func (p *NoticeApi) UpdateNotice(rc *ginx.ReqCtx) {
|
||||
var notice entity.SysNotice
|
||||
ginx.BindJsonAndValid(rc.GinCtx, ¬ice)
|
||||
|
||||
@@ -87,7 +86,7 @@ func (p *NoticeApi) UpdateNotice(rc *ctx.ReqCtx) {
|
||||
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
|
||||
// @Success 200 {string} string "{"code": 400, "message": "删除失败"}"
|
||||
// @Router /system/notice/{noticeId} [delete]
|
||||
func (p *NoticeApi) DeleteNotice(rc *ctx.ReqCtx) {
|
||||
func (p *NoticeApi) DeleteNotice(rc *ginx.ReqCtx) {
|
||||
noticeId := rc.GinCtx.Param("noticeId")
|
||||
noticeIds := utils.IdsStrToIdsIntGroup(noticeId)
|
||||
p.NoticeApp.Delete(noticeIds)
|
||||
|
||||
Reference in New Issue
Block a user