智慧食堂
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

31 rivejä
516 B

  1. package hdl
  2. import (
  3. "applet/app/db"
  4. "applet/app/e"
  5. "fmt"
  6. "github.com/gin-gonic/gin"
  7. "time"
  8. )
  9. // Demo 测试
  10. func Demo(c *gin.Context) {
  11. qrcodeWithBatchRecordsDb := db.AdminDb{}
  12. qrcodeWithBatchRecordsDb.Set()
  13. data, _, err := qrcodeWithBatchRecordsDb.GetAdminRolePermission(1001)
  14. if err != nil {
  15. e.OutErr(c, e.ERR_DB_ORM, err.Error())
  16. return
  17. }
  18. e.OutSuc(c, data, nil)
  19. go GoOnExecuting()
  20. return
  21. }
  22. func GoOnExecuting() {
  23. for i := 0; i < 20; i++ {
  24. time.Sleep(1 * time.Second)
  25. fmt.Println(i)
  26. }
  27. }