@@ -19,18 +19,18 @@ type SysErrorApi struct{}
1919// @Produce application/json
2020// @Param data body system.SysError true "创建错误日志"
2121// @Success 200 {object} response.Response{msg=string} "创建成功"
22- // @Router /sysErrpr /createSysError [post]
23- func (sysErrprApi * SysErrorApi ) CreateSysError (c * gin.Context ) {
22+ // @Router /sysError /createSysError [post]
23+ func (sysErrorApi * SysErrorApi ) CreateSysError (c * gin.Context ) {
2424 // 创建业务用Context
2525 ctx := c .Request .Context ()
2626
27- var sysErrpr system.SysError
28- err := c .ShouldBindJSON (& sysErrpr )
27+ var sysError system.SysError
28+ err := c .ShouldBindJSON (& sysError )
2929 if err != nil {
3030 response .FailWithMessage (err .Error (), c )
3131 return
3232 }
33- err = sysErrprService .CreateSysError (ctx , & sysErrpr )
33+ err = sysErrorService .CreateSysError (ctx , & sysError )
3434 if err != nil {
3535 global .GVA_LOG .Error ("创建失败!" , zap .Error (err ))
3636 response .FailWithMessage ("创建失败:" + err .Error (), c )
@@ -47,13 +47,13 @@ func (sysErrprApi *SysErrorApi) CreateSysError(c *gin.Context) {
4747// @Produce application/json
4848// @Param data body system.SysError true "删除错误日志"
4949// @Success 200 {object} response.Response{msg=string} "删除成功"
50- // @Router /sysErrpr /deleteSysError [delete]
51- func (sysErrprApi * SysErrorApi ) DeleteSysError (c * gin.Context ) {
50+ // @Router /sysError /deleteSysError [delete]
51+ func (sysErrorApi * SysErrorApi ) DeleteSysError (c * gin.Context ) {
5252 // 创建业务用Context
5353 ctx := c .Request .Context ()
5454
5555 ID := c .Query ("ID" )
56- err := sysErrprService .DeleteSysError (ctx , ID )
56+ err := sysErrorService .DeleteSysError (ctx , ID )
5757 if err != nil {
5858 global .GVA_LOG .Error ("删除失败!" , zap .Error (err ))
5959 response .FailWithMessage ("删除失败:" + err .Error (), c )
@@ -69,13 +69,13 @@ func (sysErrprApi *SysErrorApi) DeleteSysError(c *gin.Context) {
6969// @Accept application/json
7070// @Produce application/json
7171// @Success 200 {object} response.Response{msg=string} "批量删除成功"
72- // @Router /sysErrpr /deleteSysErrorByIds [delete]
73- func (sysErrprApi * SysErrorApi ) DeleteSysErrorByIds (c * gin.Context ) {
72+ // @Router /sysError /deleteSysErrorByIds [delete]
73+ func (sysErrorApi * SysErrorApi ) DeleteSysErrorByIds (c * gin.Context ) {
7474 // 创建业务用Context
7575 ctx := c .Request .Context ()
7676
7777 IDs := c .QueryArray ("IDs[]" )
78- err := sysErrprService .DeleteSysErrorByIds (ctx , IDs )
78+ err := sysErrorService .DeleteSysErrorByIds (ctx , IDs )
7979 if err != nil {
8080 global .GVA_LOG .Error ("批量删除失败!" , zap .Error (err ))
8181 response .FailWithMessage ("批量删除失败:" + err .Error (), c )
@@ -92,18 +92,18 @@ func (sysErrprApi *SysErrorApi) DeleteSysErrorByIds(c *gin.Context) {
9292// @Produce application/json
9393// @Param data body system.SysError true "更新错误日志"
9494// @Success 200 {object} response.Response{msg=string} "更新成功"
95- // @Router /sysErrpr /updateSysError [put]
96- func (sysErrprApi * SysErrorApi ) UpdateSysError (c * gin.Context ) {
95+ // @Router /sysError /updateSysError [put]
96+ func (sysErrorApi * SysErrorApi ) UpdateSysError (c * gin.Context ) {
9797 // 从ctx获取标准context进行业务行为
9898 ctx := c .Request .Context ()
9999
100- var sysErrpr system.SysError
101- err := c .ShouldBindJSON (& sysErrpr )
100+ var sysError system.SysError
101+ err := c .ShouldBindJSON (& sysError )
102102 if err != nil {
103103 response .FailWithMessage (err .Error (), c )
104104 return
105105 }
106- err = sysErrprService .UpdateSysError (ctx , sysErrpr )
106+ err = sysErrorService .UpdateSysError (ctx , sysError )
107107 if err != nil {
108108 global .GVA_LOG .Error ("更新失败!" , zap .Error (err ))
109109 response .FailWithMessage ("更新失败:" + err .Error (), c )
@@ -120,19 +120,19 @@ func (sysErrprApi *SysErrorApi) UpdateSysError(c *gin.Context) {
120120// @Produce application/json
121121// @Param ID query uint true "用id查询错误日志"
122122// @Success 200 {object} response.Response{data=system.SysError,msg=string} "查询成功"
123- // @Router /sysErrpr /findSysError [get]
124- func (sysErrprApi * SysErrorApi ) FindSysError (c * gin.Context ) {
123+ // @Router /sysError /findSysError [get]
124+ func (sysErrorApi * SysErrorApi ) FindSysError (c * gin.Context ) {
125125 // 创建业务用Context
126126 ctx := c .Request .Context ()
127127
128128 ID := c .Query ("ID" )
129- resysErrpr , err := sysErrprService .GetSysError (ctx , ID )
129+ resysError , err := sysErrorService .GetSysError (ctx , ID )
130130 if err != nil {
131131 global .GVA_LOG .Error ("查询失败!" , zap .Error (err ))
132132 response .FailWithMessage ("查询失败:" + err .Error (), c )
133133 return
134134 }
135- response .OkWithData (resysErrpr , c )
135+ response .OkWithData (resysError , c )
136136}
137137
138138// GetSysErrorList 分页获取错误日志列表
@@ -143,8 +143,8 @@ func (sysErrprApi *SysErrorApi) FindSysError(c *gin.Context) {
143143// @Produce application/json
144144// @Param data query systemReq.SysErrorSearch true "分页获取错误日志列表"
145145// @Success 200 {object} response.Response{data=response.PageResult,msg=string} "获取成功"
146- // @Router /sysErrpr /getSysErrorList [get]
147- func (sysErrprApi * SysErrorApi ) GetSysErrorList (c * gin.Context ) {
146+ // @Router /sysError /getSysErrorList [get]
147+ func (sysErrorApi * SysErrorApi ) GetSysErrorList (c * gin.Context ) {
148148 // 创建业务用Context
149149 ctx := c .Request .Context ()
150150
@@ -154,7 +154,7 @@ func (sysErrprApi *SysErrorApi) GetSysErrorList(c *gin.Context) {
154154 response .FailWithMessage (err .Error (), c )
155155 return
156156 }
157- list , total , err := sysErrprService .GetSysErrorInfoList (ctx , pageInfo )
157+ list , total , err := sysErrorService .GetSysErrorInfoList (ctx , pageInfo )
158158 if err != nil {
159159 global .GVA_LOG .Error ("获取失败!" , zap .Error (err ))
160160 response .FailWithMessage ("获取失败:" + err .Error (), c )
0 commit comments