part.go 218 B

123456789101112131415
  1. package routers
  2. import (
  3. "github.com/gin-gonic/gin"
  4. "kpt.xdmy/apiserver/service"
  5. )
  6. func EasBatch(c *gin.Context) {
  7. n, e := service.PartBatch()
  8. if n == 0 {
  9. c.JSON(500, e.Error())
  10. } else {
  11. c.JSON(200, n)
  12. }
  13. }