初步完成龙台的读卡逻辑
This commit is contained in:
@@ -5,7 +5,7 @@ import (
|
||||
"encoding/json"
|
||||
"game-driver/config"
|
||||
"game-driver/internal/middleware"
|
||||
"game-driver/internal/routes/play/card_device"
|
||||
"game-driver/internal/routes/play/card_pusher"
|
||||
"game-driver/internal/schema"
|
||||
"game-driver/leaf"
|
||||
"game-driver/pkg/utils"
|
||||
@@ -16,19 +16,20 @@ import (
|
||||
)
|
||||
|
||||
type ResponseBody struct {
|
||||
Empty int `json:"empty"`
|
||||
Error int `json:"error"`
|
||||
OutOk int `json:"out_ok"`
|
||||
num int
|
||||
CardId string `json:"card_id"`
|
||||
Empty int `json:"empty"`
|
||||
Error int `json:"error"`
|
||||
OutOk int `json:"out_ok"`
|
||||
num int
|
||||
}
|
||||
|
||||
func PushCard(ctx context.Context) leaf.HandlerFunc {
|
||||
devices := make([]*card_device.Device, 0)
|
||||
devices := make([]*card_pusher.Device, 0)
|
||||
for _, group := range config.C.Game.CardGroups {
|
||||
gv, _ := json.Marshal(group)
|
||||
zap.S().Info("发卡器指针:", string(gv))
|
||||
|
||||
device, err := card_device.New(group)
|
||||
device, err := card_pusher.New(group)
|
||||
if err != nil {
|
||||
zap.S().Panicln("初始化发卡器失败: ", err)
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user