|
- package hdl
-
- import (
- "applet/app/bigData/svc"
- "applet/app/db"
- "applet/app/e"
- "github.com/gin-gonic/gin"
- )
-
- func MakingData(c *gin.Context) {
- args := map[string]string{
- "state": "1",
- }
- svc.CommMakingData(c, args)
- }
- func BakingData(c *gin.Context) {
- args := map[string]string{
- "state": "2",
- }
- svc.CommMakingData(c, args)
- }
- func SortingData(c *gin.Context) {
- result, err := svc.LeftDataForSorting()
- if err != nil {
- e.OutErr(c, e.ERR, err.Error())
- return
- }
- e.OutSuc(c, result, nil)
- return
- }
- func NewOrderNotice(c *gin.Context) {
- sysCfgDb := db.SysCfgDb{}
- sysCfgDb.Set()
- cfg, _ := sysCfgDb.SysCfgGetOne("has_new_order")
- res := map[string]string{
- "has_new_order": "0",
- }
- if cfg != nil {
- res["has_new_order"] = cfg.Val
- cfg.Val = "0"
- db.Db.Where("`key`=?", "has_new_order").Update(cfg)
- }
- e.OutSuc(c, res, nil)
- return
- }
|