|
@@ -4,6 +4,7 @@ import (
|
|
|
"ElectronicInvoice/internal/service"
|
|
|
"github.com/gogf/gf/v2/frame/g"
|
|
|
"github.com/gogf/gf/v2/net/ghttp"
|
|
|
+ "github.com/gogf/gf/v2/util/gconv"
|
|
|
"net/url"
|
|
|
"strings"
|
|
|
)
|
|
@@ -38,10 +39,8 @@ func CallBack(r *ghttp.Request) {
|
|
|
}
|
|
|
service.JyInvoiceManager.ScanLogin <- flag
|
|
|
case "quit":
|
|
|
- t := r.Get("taskType").String()
|
|
|
- data := r.Get("data").String()
|
|
|
- g.Dump("quit--", data)
|
|
|
- switch t {
|
|
|
+ qData := gconv.Map(r.Get("data"))
|
|
|
+ switch qData["taskType"] {
|
|
|
case "2": //电子发票开具
|
|
|
service.JyInvoiceManager.ReleasePool() //可进行下次开票请求
|
|
|
g.Log().Infof(ctx, "开具发票结束")
|
|
@@ -51,7 +50,7 @@ func CallBack(r *ghttp.Request) {
|
|
|
service.JyInvoiceManager.ReleasePool() //可进行下次开票请求
|
|
|
g.Log().Infof(ctx, "发票冲红结束")
|
|
|
default:
|
|
|
- g.Log().Infof(ctx, "未知回调任务退出 %d", t)
|
|
|
+ g.Log().Infof(ctx, "未知回调任务退出 %d", qData)
|
|
|
}
|
|
|
default:
|
|
|
g.Log().Infof(ctx, "未设置消息回调:%s", callType)
|