37 lines
802 B
Go
37 lines
802 B
Go
package admin
|
|
|
|
import (
|
|
"blazing/cool"
|
|
"blazing/modules/player/service"
|
|
"context"
|
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
)
|
|
|
|
type SignRecordController struct {
|
|
*cool.Controller
|
|
}
|
|
|
|
func init() {
|
|
cool.RegisterController(&SignRecordController{
|
|
&cool.Controller{
|
|
Prefix: "/admin/game/signrecord",
|
|
Api: []string{"Delete", "Update", "Info", "List", "Page"},
|
|
Service: service.NewSignService(0),
|
|
},
|
|
})
|
|
}
|
|
|
|
type ResetAllReq struct {
|
|
g.Meta `path:"/resetAll" method:"POST"`
|
|
Authorization string `json:"Authorization" in:"header"`
|
|
}
|
|
|
|
func (c *SignRecordController) ResetAll(ctx context.Context, req *ResetAllReq) (res *cool.BaseRes, err error) {
|
|
result, err := service.NewSignService(0).ResetAll()
|
|
if err != nil {
|
|
return cool.Fail(err.Error()), nil
|
|
}
|
|
return cool.Ok(result), nil
|
|
}
|