12345678910111213141516171819202122232425262728293031323334353637383940 |
- package routers
- import (
- "github.com/gin-gonic/gin"
- "kpt.xdmy/apiserver/model"
- "kpt.xdmy/apiserver/service"
- )
- func ProofList(c *gin.Context) {
- p := new(model.ProofReq)
- if !Bind(c, p) {
- return
- }
- rp := service.ProofList(p)
- c.JSON(200, &rp)
- }
- func ProofOff(c *gin.Context) {
- p := new(model.ProofReq)
- if !Bind(c, p) {
- return
- }
- rp := svc.ProofOff(p)
- c.JSON(200, &rp)
- }
- func ProofOffList(c *gin.Context) {
- p := new(model.ProofReq)
- if !Bind(c, p) {
- return
- }
- rp := service.ProofList(p)
- c.JSON(rp.Code, &rp)
- }
- func ManualTransfer(c *gin.Context) {
- code := c.PostForm("code")
- count, e := service.ManualTransfer(code)
- c.JSON(200, map[string]interface{}{"count": count, "error": e})
- }
|