面包店
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.
 
 
 
 
 

46 lines
852 B

  1. package hdl
  2. import (
  3. "applet/app/bigData/svc"
  4. "applet/app/db"
  5. "applet/app/e"
  6. "github.com/gin-gonic/gin"
  7. )
  8. func MakingData(c *gin.Context) {
  9. args := map[string]string{
  10. "state": "1",
  11. }
  12. svc.CommMakingData(c, args)
  13. }
  14. func BakingData(c *gin.Context) {
  15. args := map[string]string{
  16. "state": "2",
  17. }
  18. svc.CommMakingData(c, args)
  19. }
  20. func SortingData(c *gin.Context) {
  21. result, err := svc.LeftDataForSorting()
  22. if err != nil {
  23. e.OutErr(c, e.ERR, err.Error())
  24. return
  25. }
  26. e.OutSuc(c, result, nil)
  27. return
  28. }
  29. func NewOrderNotice(c *gin.Context) {
  30. sysCfgDb := db.SysCfgDb{}
  31. sysCfgDb.Set()
  32. cfg, _ := sysCfgDb.SysCfgGetOne("has_new_order")
  33. res := map[string]string{
  34. "has_new_order": "0",
  35. }
  36. if cfg != nil {
  37. res["has_new_order"] = cfg.Val
  38. cfg.Val = "0"
  39. db.Db.Where("`key`=?", "has_new_order").Update(cfg)
  40. }
  41. e.OutSuc(c, res, nil)
  42. return
  43. }