diff --git a/app/svc/svc_printer_list.go b/app/svc/svc_printer_list.go index 0bd7ca1..e16e98a 100644 --- a/app/svc/svc_printer_list.go +++ b/app/svc/svc_printer_list.go @@ -53,6 +53,8 @@ func PrinterIndexList(c *gin.Context) { e.OutErr(c, e.ERR_MASTER_ID, nil) return } + user := GetUser(c) + search.StoreId = utils.IntToStr(user.Info.Uid) list, err := db.GetPrinterIndexList(engine, &search) fmt.Println(err) fmt.Println(list) @@ -98,6 +100,7 @@ func PrinterModuleList(c *gin.Context) { e.OutErr(c, e.ERR_MASTER_ID, nil) return } + list, err := db.GetPrinterModuleList(engine, &search) if err != nil { e.OutErr(c, e.ERR_BAD_REQUEST, err) @@ -305,6 +308,8 @@ func PrinterIndexRecordList(c *gin.Context) { e.OutErr(c, e.ERR_MASTER_ID, nil) return } + user := GetUser(c) + search.StoreId = utils.IntToStr(user.Info.Uid) list, err := db.GetPrinterRecordList(engine, &search) if err != nil { e.OutErr(c, e.ERR_BAD_REQUEST, err) @@ -338,6 +343,8 @@ func PrinterIndexToSend(c *gin.Context) { e.OutErr(c, e.ERR_INVALID_ARGS, err) return } + user := GetUser(c) + search.StoreId = utils.IntToStr(user.Info.Uid) // 加锁 防止并发 mutexKey := fmt.Sprintf("%s:printer_send:p%ss%s", c.GetString("mid"), search.PrinterId, search.StoreId) withdrawAvailable, err := cache.Do("SET", mutexKey, 1, "EX", 5, "NX")