【更新】更新

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/log/entity"
"pandax/apps/log/services"
"pandax/base/ctx"
"pandax/base/ginx"
"pandax/base/utils"
)
@@ -23,7 +22,7 @@ type LogJobApi struct {
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /log/logJob/list [get]
// @Security
func (l *LogJobApi) GetJobLogList(rc *ctx.ReqCtx) {
func (l *LogJobApi) GetJobLogList(rc *ginx.ReqCtx) {
pageNum := ginx.QueryInt(rc.GinCtx, "pageNum", 1)
pageSize := ginx.QueryInt(rc.GinCtx, "pageSize", 10)
name := rc.GinCtx.Query("name")
@@ -46,7 +45,7 @@ func (l *LogJobApi) GetJobLogList(rc *ctx.ReqCtx) {
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Success 200 {string} string "{"code": 400, "message": "删除失败"}"
// @Router /log/logJob/{logId} [delete]
func (l *LogJobApi) DeleteJobLog(rc *ctx.ReqCtx) {
func (l *LogJobApi) DeleteJobLog(rc *ginx.ReqCtx) {
logIds := rc.GinCtx.Param("logId")
group := utils.IdsStrToIdsIntGroup(logIds)
l.LogJobApp.Delete(group)
@@ -58,6 +57,6 @@ func (l *LogJobApi) DeleteJobLog(rc *ctx.ReqCtx) {
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Success 200 {string} string "{"code": 400, "message": "删除失败"}"
// @Router /log/logJob/all [delete]
func (l *LogJobApi) DeleteAll(rc *ctx.ReqCtx) {
func (l *LogJobApi) DeleteAll(rc *ginx.ReqCtx) {
l.LogJobApp.DeleteAll()
}

View File

@@ -3,7 +3,6 @@ package api
import (
"pandax/apps/log/entity"
"pandax/apps/log/services"
"pandax/base/ctx"
"pandax/base/ginx"
"pandax/base/utils"
)
@@ -22,7 +21,7 @@ type LogLoginApi struct {
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /log/logLogin/list [get]
// @Security
func (l *LogLoginApi) GetLoginLogList(rc *ctx.ReqCtx) {
func (l *LogLoginApi) GetLoginLogList(rc *ginx.ReqCtx) {
pageNum := ginx.QueryInt(rc.GinCtx, "pageNum", 1)
pageSize := ginx.QueryInt(rc.GinCtx, "pageSize", 10)
loginLocation := rc.GinCtx.Query("loginLocation")
@@ -43,7 +42,7 @@ func (l *LogLoginApi) GetLoginLogList(rc *ctx.ReqCtx) {
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /log/logLogin/{infoId} [get]
// @Security
func (l *LogLoginApi) GetLoginLog(rc *ctx.ReqCtx) {
func (l *LogLoginApi) GetLoginLog(rc *ginx.ReqCtx) {
infoId := ginx.PathParamInt(rc.GinCtx, rc.GinCtx.Param("infoId"))
rc.ResData = l.LogLoginApp.FindOne(int64(infoId))
}
@@ -58,7 +57,7 @@ func (l *LogLoginApi) GetLoginLog(rc *ctx.ReqCtx) {
// @Success 200 {string} string "{"code": 400, "message": "添加失败"}"
// @Router /log/logLogin [put]
// @Security X-TOKEN
func (l *LogLoginApi) UpdateLoginLog(rc *ctx.ReqCtx) {
func (l *LogLoginApi) UpdateLoginLog(rc *ginx.ReqCtx) {
var log entity.LogLogin
ginx.BindJsonAndValid(rc.GinCtx, &log)
l.LogLoginApp.Update(log)
@@ -71,7 +70,7 @@ func (l *LogLoginApi) UpdateLoginLog(rc *ctx.ReqCtx) {
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Success 200 {string} string "{"code": 400, "message": "删除失败"}"
// @Router /log/logLogin/{infoId} [delete]
func (l *LogLoginApi) DeleteLoginLog(rc *ctx.ReqCtx) {
func (l *LogLoginApi) DeleteLoginLog(rc *ginx.ReqCtx) {
infoIds := rc.GinCtx.Param("infoId")
group := utils.IdsStrToIdsIntGroup(infoIds)
l.LogLoginApp.Delete(group)
@@ -83,6 +82,6 @@ func (l *LogLoginApi) DeleteLoginLog(rc *ctx.ReqCtx) {
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Success 200 {string} string "{"code": 400, "message": "删除失败"}"
// @Router /log/logLogin/all [delete]
func (l *LogLoginApi) DeleteAll(rc *ctx.ReqCtx) {
func (l *LogLoginApi) DeleteAll(rc *ginx.ReqCtx) {
l.LogLoginApp.DeleteAll()
}

View File

@@ -4,7 +4,6 @@ import (
"log"
"pandax/apps/log/entity"
"pandax/apps/log/services"
"pandax/base/ctx"
"pandax/base/ginx"
"pandax/base/utils"
)
@@ -23,7 +22,7 @@ type LogOperApi struct {
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /log/logOper/list [get]
// @Security
func (l *LogOperApi) GetOperLogList(rc *ctx.ReqCtx) {
func (l *LogOperApi) GetOperLogList(rc *ginx.ReqCtx) {
pageNum := ginx.QueryInt(rc.GinCtx, "pageNum", 1)
pageSize := ginx.QueryInt(rc.GinCtx, "pageSize", 10)
@@ -46,7 +45,7 @@ func (l *LogOperApi) GetOperLogList(rc *ctx.ReqCtx) {
// @Success 200 {string} string "{"code": 200, "data": [...]}"
// @Router /log/logOper/{operId} [get]
// @Security
func (l *LogOperApi) GetOperLog(rc *ctx.ReqCtx) {
func (l *LogOperApi) GetOperLog(rc *ginx.ReqCtx) {
operId := ginx.PathParamInt(rc.GinCtx, rc.GinCtx.Param("operId"))
rc.ResData = l.LogOperApp.FindOne(int64(operId))
}
@@ -58,7 +57,7 @@ func (l *LogOperApi) GetOperLog(rc *ctx.ReqCtx) {
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Success 200 {string} string "{"code": 400, "message": "删除失败"}"
// @Router /log/logOper/{operId} [delete]
func (l *LogOperApi) DeleteOperLog(rc *ctx.ReqCtx) {
func (l *LogOperApi) DeleteOperLog(rc *ginx.ReqCtx) {
operIds := rc.GinCtx.Param("operId")
group := utils.IdsStrToIdsIntGroup(operIds)
log.Println("group", group)
@@ -71,6 +70,6 @@ func (l *LogOperApi) DeleteOperLog(rc *ctx.ReqCtx) {
// @Success 200 {string} string "{"code": 200, "message": "删除成功"}"
// @Success 200 {string} string "{"code": 400, "message": "删除失败"}"
// @Router /log/logOper/all [delete]
func (l *LogOperApi) DeleteAll(rc *ctx.ReqCtx) {
func (l *LogOperApi) DeleteAll(rc *ginx.ReqCtx) {
l.LogOperApp.DeleteAll()
}