go-common/app/job/main/account-summary/http/summary.go
2019-04-22 18:49:16 +08:00

28 lines
494 B
Go

package http
import (
"go-common/app/job/main/account-summary/model"
bm "go-common/library/net/http/blademaster"
)
func syncOne(ctx *bm.Context) {
arg := &model.ArgMid{}
if err := ctx.Bind(arg); err != nil {
return
}
if err := srv.SyncOne(ctx, arg.Mid); err != nil {
ctx.JSON(nil, err)
return
}
ctx.JSON(srv.GetOne(ctx, arg.Mid))
}
func getOne(ctx *bm.Context) {
arg := &model.ArgMid{}
if err := ctx.Bind(arg); err != nil {
return
}
ctx.JSON(srv.GetOne(ctx, arg.Mid))
}