【更新】更新

This commit is contained in:
PandaGoAdmin
2022-08-02 17:19:14 +08:00
parent 791a23306c
commit 0555922a90
50 changed files with 678 additions and 450 deletions

View File

@@ -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, &notice)
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, &notice)
@@ -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)