Răsfoiți Sursa

Merge branch 'lcd250411' into debug

# Conflicts:
#	desc/wechat/auth_login.api
#	desc/wechat/contact.api
#	internal/handler/auth/login_handler.go
#	internal/logic/fastgpt/set_token_logic.go
#	internal/types/types.go
lichangdong 3 săptămâni în urmă
părinte
comite
5bf61e32cc

+ 3 - 2
desc/wechat/contact.api

@@ -64,8 +64,9 @@ type (
 
 		// 内容类型:1-个微 3-企微
 		Ctype *uint64 `json:"ctype,optional"`
-        // 达标的起止时间
-        StartDate *string `json:"start_date,optional"`
+
+		//标签搜索开始结束日期
+		StartDate *string `json:"start_date,optional"`
         EndDate *string `json:"end_date,optional"`
     }
 

+ 4 - 0
go.mod

@@ -44,6 +44,8 @@ require (
 	gorm.io/plugin/dbresolver v1.5.0
 )
 
+require github.com/stretchr/testify v1.9.0
+
 require (
 	ariga.io/atlas v0.19.2 // indirect
 	filippo.io/edwards25519 v1.1.0 // indirect
@@ -129,6 +131,7 @@ require (
 	github.com/patrickmn/go-cache v2.1.0+incompatible // indirect
 	github.com/pelletier/go-toml/v2 v2.1.1 // indirect
 	github.com/pkg/errors v0.9.1 // indirect
+	github.com/pmezard/go-difflib v1.0.1-0.20181226105442-5d4384ee4fb2 // indirect
 	github.com/prometheus/client_golang v1.19.0 // indirect
 	github.com/prometheus/client_model v0.5.0 // indirect
 	github.com/prometheus/common v0.48.0 // indirect
@@ -137,6 +140,7 @@ require (
 	github.com/quic-go/quic-go v0.42.0 // indirect
 	github.com/refraction-networking/utls v1.6.3 // indirect
 	github.com/spaolacci/murmur3 v1.1.0 // indirect
+	github.com/stretchr/objx v0.5.2 // indirect
 	github.com/tidwall/gjson v1.17.1 // indirect
 	github.com/tidwall/match v1.1.1 // indirect
 	github.com/tidwall/pretty v1.2.1 // indirect

+ 2 - 0
go.sum

@@ -629,6 +629,8 @@ github.com/stretchr/objx v0.1.1/go.mod h1:HFkY916IF+rwdDfMAkV7OtwuqBVzrE8GR6GFx+
 github.com/stretchr/objx v0.2.0/go.mod h1:qt09Ya8vawLte6SNmTgCsAVtYtaKzEcn8ATUoHMkEqE=
 github.com/stretchr/objx v0.4.0/go.mod h1:YvHI0jy2hoMjB+UWwv71VJQ9isScKT/TqJzVSSt89Yw=
 github.com/stretchr/objx v0.5.0/go.mod h1:Yh+to48EsGEfYuaHDzXPcE3xhTkx73EhmCGUpEOglKo=
+github.com/stretchr/objx v0.5.2 h1:xuMeJ0Sdp5ZMRXx/aWO6RZxdr3beISkG5/G/aIRr3pY=
+github.com/stretchr/objx v0.5.2/go.mod h1:FRsXN1f5AsAjCGJKqEizvkpNtU+EGNCLh3NxZ/8L+MA=
 github.com/stretchr/testify v1.2.2/go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs=
 github.com/stretchr/testify v1.3.0/go.mod h1:M5WIy9Dh21IEIfnGCwXGc5bZfKNJtfHm1UVUgZn+9EI=
 github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81PSLYec5m4=

+ 1 - 1
internal/handler/auth/login_handler.go

@@ -9,7 +9,7 @@ import (
 	"wechat-api/internal/types"
 )
 
-// swagger:route post /auth/login auth Login
+// swagger:route post /user/login auth Login
 //
 // Log in | 登录
 //

+ 6 - 3
internal/logic/Wx/get_wx_list_logic.go

@@ -165,7 +165,7 @@ func (l *GetWxListLogic) GetWxList(req *types.WxListReq) (*types.WxListResp, err
 	} else {
 		var result types.WorkPhoneGetWeChatsResp
 
-		res, err := reqv3.C().DevMode().R().SetSuccessResult(&result).Post("http://chat.gkscrm.com:13086/pc/GetWeChatsReq?id=13")
+		res, err := reqv3.C().DevMode().R().SetSuccessResult(&result).Post("http://chat.gkscrm.com:13086/pc/GetWeChatsReq?id=0")
 		if err != nil {
 			return nil, err
 		}
@@ -176,7 +176,10 @@ func (l *GetWxListLogic) GetWxList(req *types.WxListReq) (*types.WxListResp, err
 
 		workphoneWxList := make(map[string]types.WorkPhoneWeChat, len(result.Data))
 		for _, v := range result.Data {
-			workphoneWxList[v.Wechatid] = v
+			if v.Wechatid == nil || *v.Wechatid == "" {
+				continue
+			}
+			workphoneWxList[*v.Wechatid] = v
 		}
 
 		for _, v := range data.List {
@@ -203,7 +206,7 @@ func (l *GetWxListLogic) GetWxList(req *types.WxListReq) (*types.WxListResp, err
 				}
 			} else {
 				workphoneWx, exists := workphoneWxList[v.Wxid]
-				if exists && workphoneWx.Isonline == 0 {
+				if exists && *workphoneWx.Isonline == 0 {
 					loginStatus = 1
 				} else {
 					loginStatus = 0

+ 10 - 0
internal/logic/chat/chat_completions_logic.go

@@ -49,6 +49,16 @@ func (l *ChatCompletionsLogic) ChatCompletions(req *types.CompApiReq) (resp *typ
 	if !ok {
 		return nil, errors.New("content get token err")
 	}
+	if req.WorkId == "TEST_DOUYIN" || req.WorkId == "TEST_DOUYIN_CN" || req.WorkId == "travel" { //临时加
+		apiKeyObj.OpenaiBase = "http://cn-agent.gkscrm.com/api/v1/"
+		if req.WorkId == "TEST_DOUYIN" || req.WorkId == "TEST_DOUYIN_CN" {
+			workToken = "fastgpt-jsMmQKEM5uX7tDimT1zHlZHkBhMHRT2k61YaxyDJRZTUHehID7sG8BKXADNIU"
+		} else if req.WorkId == "travel" {
+			workToken = "fastgpt-bcnfFtw1lXWdmYGOv165UVD5R1kY28tyXX8SJv8MHhrSMOgVJsuU"
+		}
+
+	}
+
 	/*
 		fmt.Println("=========================================")
 		fmt.Printf("In ChatCompletion Get Token Info:\nKey:'%s'\n", apiKeyObj.Key)

+ 47 - 9
internal/logic/contact/get_contact_list_logic.go

@@ -90,18 +90,56 @@ func (l *GetContactListLogic) GetContactList(req *types.ContactListReq) (*types.
 		predicates = append(predicates, contact.HasContactRelationshipsWith(relPreds...))
 	}
 
-	var ctype uint64 = 1
-	if req.Ctype != nil {
-		ctype = *req.Ctype
+	layout := "2006-01-02 15:04:05"
+	var startTime, endTime *time.Time
+
+	if req.StartDate != nil && *req.StartDate != "" {
+		startStr := *req.StartDate + " 00:00:00"
+		if t, err := time.Parse(layout, startStr); err == nil {
+			t = t.Add(23*time.Hour + 59*time.Minute + 59*time.Second)
+			startTime = &t
+		} else {
+			l.Logger.Errorf("invalid startDate: %v", err)
+		}
 	}
-	predicates = append(predicates, contact.Ctype(ctype))
+
+	if req.EndDate != nil && *req.EndDate != "" {
+		endStr := *req.EndDate + " 23:59:59"
+		if t, err := time.Parse(layout, endStr); err == nil {
+			t = t.Add(23*time.Hour + 59*time.Minute + 59*time.Second)
+			endTime = &t
+		} else {
+			l.Logger.Errorf("invalid endDate: %v", err)
+		}
+	}
+
+	var relPreds []predicate.LabelRelationship
+
+	if startTime != nil {
+		relPreds = append(relPreds, labelrelationship.CreatedAtGTE(*startTime))
+	}
+	if endTime != nil {
+		relPreds = append(relPreds, labelrelationship.CreatedAtLTE(*endTime))
+	}
+	if len(relPreds) > 0 {
+		predicates = append(predicates, contact.HasContactRelationshipsWith(relPreds...))
+	}
+
 	if len(req.LabelIDs) > 0 {
-		predicates = append(predicates, contact.HasContactRelationshipsWith(
-			labelrelationship.HasLabelsWith(
-				label.IDIn(req.LabelIDs...),
-			),
-		))
+		relPreds = append(relPreds,
+			labelrelationship.HasLabelsWith(label.IDIn(req.LabelIDs...)),
+		)
 	}
+	if len(relPreds) > 0 {
+		predicates = append(predicates, contact.HasContactRelationshipsWith(relPreds...))
+	}
+
+	if req.Ctype != nil {
+		predicates = append(predicates, contact.Ctype(*req.Ctype))
+	} else {
+		predicates = append(predicates, contact.Ctype(1)) // 默认 Ctype = 1
+	}
+
 	if req.WxWxid != nil {
 		predicates = append(predicates, contact.WxWxidContains(*req.WxWxid))
 	}

+ 181 - 0
internal/logic/contact/get_contact_list_logic_test.go

@@ -0,0 +1,181 @@
+package contact
+
+import (
+	"context"
+	"testing"
+	"time"
+
+	"wechat-api/ent"
+	"wechat-api/ent/contact"
+	"wechat-api/ent/label"
+	"wechat-api/ent/labelrelationship"
+	"wechat-api/ent/wx"
+	"wechat-api/internal/svc"
+	"wechat-api/internal/types"
+	"wechat-api/internal/utils/dberrorhandler"
+
+	"github.com/stretchr/testify/assert"
+	"github.com/stretchr/testify/mock"
+	"github.com/suyuan32/simple-admin-common/msg/errormsg"
+	"github.com/suyuan32/simple-admin-common/utils/pointy"
+)
+
+// MockContactClient is a mock implementation of the Contact client.
+type MockContactClient struct {
+	mock.Mock
+}
+
+func (m *MockContactClient) Query() *ent.ContactQuery {
+	args := m.Called()
+	return args.Get(0).(*ent.ContactQuery)
+}
+
+// MockContactQuery is a mock implementation of the Contact query.
+type MockContactQuery struct {
+	mock.Mock
+}
+
+func (m *MockContactQuery) Where(predicates ...predicate.Contact) *ent.ContactQuery {
+	args := m.Called(predicates)
+	return args.Get(0).(*ent.ContactQuery)
+}
+
+func (m *MockContactQuery) WithContactRelationships(f func(*ent.LabelRelationshipQuery)) *ent.ContactQuery {
+	args := m.Called(f)
+	return args.Get(0).(*ent.ContactQuery)
+}
+
+func (m *MockContactQuery) Page(ctx context.Context, page, pageSize int) (*ent.ContactPage, error) {
+	args := m.Called(ctx, page, pageSize)
+	return args.Get(0).(*ent.ContactPage), args.Error(1)
+}
+
+// MockWxClient is a mock implementation of the Wx client.
+type MockWxClient struct {
+	mock.Mock
+}
+
+func (m *MockWxClient) Query() *ent.WxQuery {
+	args := m.Called()
+	return args.Get(0).(*ent.WxQuery)
+}
+
+// MockWxQuery is a mock implementation of the Wx query.
+type MockWxQuery struct {
+	mock.Mock
+}
+
+func (m *MockWxQuery) Where(predicates ...predicate.Wx) *ent.WxQuery {
+	args := m.Called(predicates)
+	return args.Get(0).(*ent.WxQuery)
+}
+
+func (m *MockWxQuery) All(ctx context.Context) ([]*ent.Wx, error) {
+	args := m.Called(ctx)
+	return args.Get(0).([]*ent.Wx), args.Error(1)
+}
+
+func TestGetContactList(t *testing.T) {
+	ctx := context.Background()
+	mockContactClient := new(MockContactClient)
+	mockWxClient := new(MockWxClient)
+	svcCtx := &svc.ServiceContext{
+		DB: &ent.Client{
+			Contact: mockContactClient,
+			Wx:      mockWxClient,
+		},
+	}
+
+	logic := NewGetContactListLogic(ctx, svcCtx)
+
+	// Mock the ContactQuery and WxQuery
+	mockContactQuery := new(MockContactQuery)
+	mockContactClient.On("Query").Return(mockContactQuery)
+
+	mockWxQuery := new(MockWxQuery)
+	mockWxClient.On("Query").Return(mockWxQuery)
+
+	// Prepare the expected data
+	expectedContact := &ent.Contact{
+		ID:         1,
+		CreatedAt:  time.Now(),
+		UpdatedAt:  time.Now(),
+		Status:     1,
+		WxWxid:     "wxid_1",
+		Type:       1,
+		Wxid:       "wxid_1",
+		Account:    "account_1",
+		Nickname:   "nickname_1",
+		Markname:   "markname_1",
+		Headimg:    "headimg_1",
+		Sex:        1,
+		Starrole:   1,
+		Dontseeit:  1,
+		Dontseeme:  1,
+		Lag:        1,
+		Gid:        "gid_1",
+		Gname:      "gname_1",
+		V3:         1,
+		Ctype:      1,
+		Cname:      "cname_1",
+		Cage:       25,
+		Carea:      "carea_1",
+		Cc:         "cc_1",
+		Phone:      "phone_1",
+		Cbirthday:  "cbirthday_1",
+		Cbirtharea: "cbirtharea_1",
+		CidcardNo:  "cidcardno_1",
+		Ctitle:     "ctitle_1",
+		Edges: ent.ContactEdges{
+			ContactRelationships: []*ent.LabelRelationship{
+				{
+					LabelID: 1,
+					Edges: ent.LabelRelationshipEdges{
+						Labels: &ent.Label{
+							Name: "label_1",
+						},
+					},
+				},
+			},
+		},
+	}
+
+	expectedWx := &ent.Wx{
+		Wxid:           "wxid_1",
+		Nickname:       "wx_nickname_1",
+		BlockList:      []string{"block_1"},
+		GroupBlockList: []string{"group_block_1"},
+	}
+
+	expectedPage := &ent.ContactPage{
+		List: []*ent.Contact{expectedContact},
+		PageDetails: ent.PageDetails{
+			Total: 1,
+		},
+	}
+
+	mockContactQuery.On("Where", mock.Anything).Return(mockContactQuery)
+	mockContactQuery.On("WithContactRelationships", mock.Anything).Return(mockContactQuery)
+	mockContactQuery.On("Page", ctx, 1, 10).Return(expectedPage, nil)
+
+	mockWxQuery.On("Where", mock.Anything).Return(mockWxQuery)
+	mockWxQuery.On("All", ctx).Return([]*ent.Wx{expectedWx}, nil)
+
+	// Call the GetContactList method
+	req := &types.ContactListReq{
+		Page:     1,
+		PageSize: 10,
+	}
+	resp, err := logic.GetContactList(req)
+
+	// Assertions
+	assert.NoError(t, err)
+	assert.Equal(t, errormsg.Success, resp.Msg)
+	assert.Equal(t, int64(1), resp.Data.Total)
+	assert.Len(t, resp.Data.Data, 1)
+	assert.Equal(t, expectedContact.ID, *resp.Data.Data[0].Id)
+	assert.Equal(t, expectedContact.WxWxid, *resp.Data.Data[0].WxWxid)
+	assert.Equal(t, expectedWx.Nickname, *resp.Data.Data[0].WxWxidNickname)
+	assert.Len(t, resp.Data.Data[0].LabelRelationships, 1)
+	assert.Equal(t, "label_1", *resp.Data.Data[0].LabelRelationships[0].Label)
+}

+ 9 - 1
internal/logic/fastgpt/set_token_logic.go

@@ -32,7 +32,6 @@ func NewSetTokenLogic(ctx context.Context, svcCtx *svc.ServiceContext, rw http.R
 }
 
 func (l *SetTokenLogic) SetToken(username string) (resp *types.BaseMsgResp, err error) {
-	//println(username)
 	claims, err := ParseJWT(username, l.svcCtx.Config.Auth.AccessSecret)
 	if err != nil {
 		return nil, error(err)
@@ -68,6 +67,15 @@ func (l *SetTokenLogic) SetToken(username string) (resp *types.BaseMsgResp, err
 	return
 }
 
+// SetTokenByUserId 根据用户ID设置token。
+// 参数:
+//
+//	UserId - 用户的唯一标识符。
+//
+// 返回值:
+//
+//	*types.BaseMsgResp - 响应消息,包含设置结果的代码和消息。
+//	error - 如果操作失败,返回错误。
 func (l *SetTokenLogic) SetTokenByUserId(UserId string) (resp *types.BaseMsgResp, err error) {
 	data, err := l.svcCtx.CoreRpc.GetUserById(context.TODO(), &core.UUIDReq{Id: UserId})
 	println(data)

+ 46 - 42
internal/service/wechat/sync_wx.go

@@ -2,7 +2,7 @@ package wechat
 
 import (
 	"context"
-	"encoding/json"
+	"fmt"
 	"github.com/imroc/req/v3"
 	"github.com/zeromicro/go-zero/core/logx"
 	"strconv"
@@ -32,16 +32,13 @@ func SyncAllWx(svcCtx *svc.ServiceContext) {
 
 	// 遍历微信列表
 	for _, account := range result.Data {
-		if account.Wechatid == "" {
+		if account.Wechatid == nil || *account.Wechatid == "" {
 			continue
 		}
 		wxinfo, err := svcCtx.DB.Wx.Query().
 			Where(
 				wx.And(
-					wx.Or(
-						wx.WxidEQ(account.Wechatid),
-						wx.PortEQ(account.Deviceid),
-					),
+					wx.WxidEQ(*account.Wechatid),
 					wx.CtypeEQ(1),
 				),
 			).
@@ -52,66 +49,73 @@ func SyncAllWx(svcCtx *svc.ServiceContext) {
 			return
 		}
 		var status uint8
-		if account.Isonline == 0 {
+		logx.Info(fmt.Printf("*account.Isonline: %d\n", *account.Isonline))
+		if *account.Isonline == 0 {
 			status = 1
 		} else {
 			status = 0
 		}
+
 		if wxinfo != nil {
+			logx.Info(fmt.Printf("wxinfo is not nil, account: %s\n", *account.Wechatid))
+			logx.Info(fmt.Printf("wxinfo is not nil, account: %s\n", *account.Wechatnick))
 			err = svcCtx.DB.Wx.UpdateOneID(wxinfo.ID).
 				SetServerID(0).
-				SetPort(account.Deviceid).
+				SetPort(*account.Deviceid).
 				SetProcessID(strconv.FormatInt(account.Cid, 10)).
-				SetAccount(account.Wechatno).
-				SetNickname(account.Wechatnick).
-				SetHeadBig(account.Avatar).
+				SetNotNilAccount(account.Wechatno).
+				SetNotNilNickname(account.Wechatnick).
+				SetNotNilHeadBig(account.Avatar).
 				SetStatus(status).
 				Exec(context.TODO())
-
 			if err != nil {
 				logx.Error("syncWx: ", err)
-				return
+				continue
 			}
 		} else {
-			logx.Debug("wxinfo is nil")
+			logx.Error(fmt.Printf("wxinfo is nil, account: %+v\n", account))
 			_, err := svcCtx.DB.Wx.Create().
 				SetServerID(0).
-				SetPort(account.Deviceid).
+				SetPort(*account.Deviceid).
 				SetProcessID(strconv.FormatInt(account.Cid, 10)).
-				SetWxid(account.Wechatid).
-				SetAccount(account.Wechatno).
-				SetHeadBig(account.Avatar).
-				SetNickname(account.Wechatnick).
+				SetWxid(*account.Wechatid).
+				SetNotNilAccount(account.Wechatno).
+				SetNotNilHeadBig(account.Avatar).
+				SetNotNilNickname(account.Wechatnick).
 				SetStatus(status).
 				SetAllowList([]string{}).SetBlockList([]string{}).SetGroupAllowList([]string{}).SetGroupBlockList([]string{}).
 				Save(context.TODO())
 			if err != nil {
 				logx.Error("syncWx: ", err)
-				return
+				continue
 			}
 		}
 
-		data := map[string]interface{}{
-			"MsgType": "TriggerFriendPushTask",
-			"Content": map[string]interface{}{
-				"WeChatId": account.Wechatid,
-			},
-		}
-		jsonStr, err := json.Marshal(data)
-		err = svcCtx.WechatWs["default"].SendMsg([]byte(jsonStr))
-		if err != nil {
-			logx.Error("syncWx: ", err)
-			return
-		}
-
-		dataChatroom := map[string]interface{}{
-			"MsgType": "TriggerChatroomPushTask",
-			"Content": map[string]interface{}{
-				"WeChatId": account.Wechatid,
-				"Flag":     1,
-			},
-		}
-		jsonStrChatroom, err := json.Marshal(dataChatroom)
-		err = svcCtx.WechatWs["default"].SendMsg([]byte(jsonStrChatroom))
+		//data := map[string]interface{}{
+		//	"MsgType": "TriggerFriendPushTask",
+		//	"Content": map[string]interface{}{
+		//		"WeChatId": *account.Wechatid,
+		//	},
+		//}
+		//jsonStr, err := json.Marshal(data)
+		//err = svcCtx.WechatWs["default"].SendMsg([]byte(jsonStr))
+		//if err != nil {
+		//	logx.Error("syncWx: ", err)
+		//	continue
+		//}
+		//
+		//dataChatroom := map[string]interface{}{
+		//	"MsgType": "TriggerChatroomPushTask",
+		//	"Content": map[string]interface{}{
+		//		"WeChatId": *account.Wechatid,
+		//		"Flag":     1,
+		//	},
+		//}
+		//jsonStrChatroom, err := json.Marshal(dataChatroom)
+		//err = svcCtx.WechatWs["default"].SendMsg([]byte(jsonStrChatroom))
+		//if err != nil {
+		//	logx.Error("syncWx: ", err)
+		//	continue
+		//}
 	}
 }

+ 1 - 1
internal/types/types.go

@@ -1027,7 +1027,7 @@ type ContactListReq struct {
 	Type *int `json:"type,optional"`
 	// 内容类型:1-个微 3-企微
 	Ctype *uint64 `json:"ctype,optional"`
-	// 达标的起止时间
+	//标签搜索开始结束日期
 	StartDate *string `json:"start_date,optional"`
 	EndDate   *string `json:"end_date,optional"`
 }

+ 18 - 18
internal/types/workphone.go

@@ -1,27 +1,27 @@
 package types
 
 type WorkPhoneWeChat struct {
-	Accountid   string      `json:"accountid"`
-	Avatar      string      `json:"avatar"`
-	Brand       string      `json:"brand"`
+	Accountid   *string     `json:"accountid"`
+	Avatar      *string     `json:"avatar"`
+	Brand       *string     `json:"brand"`
 	Cid         int64       `json:"cid"`
-	City        string      `json:"city"`
+	City        *string     `json:"city"`
 	Cname       interface{} `json:"cname"`
-	Country     string      `json:"country"`
-	Deviceid    string      `json:"deviceid"`
-	Devnickname string      `json:"devnickname"`
-	Gender      int64       `json:"gender"`
+	Country     *string     `json:"country"`
+	Deviceid    *string     `json:"deviceid"`
+	Devnickname *string     `json:"devnickname"`
+	Gender      *int64      `json:"gender"`
 	Groupid     interface{} `json:"groupid"`
-	ID          int64       `json:"id"`
-	Isonline    int64       `json:"isonline"`
-	LoginTime   int64       `json:"login_time"`
-	ModifyTime  int64       `json:"modify_time"`
-	Module      string      `json:"module"`
-	Province    string      `json:"province"`
-	Snumber     int64       `json:"snumber"`
-	Wechatid    string      `json:"wechatid"`
-	Wechatnick  string      `json:"wechatnick"`
-	Wechatno    string      `json:"wechatno"`
+	ID          *int64      `json:"id"`
+	Isonline    *int64      `json:"isonline"`
+	LoginTime   *int64      `json:"login_time"`
+	ModifyTime  *int64      `json:"modify_time"`
+	Module      *string     `json:"module"`
+	Province    *string     `json:"province"`
+	Snumber     *int64      `json:"snumber"`
+	Wechatid    *string     `json:"wechatid"`
+	Wechatnick  *string     `json:"wechatnick"`
+	Wechatno    *string     `json:"wechatno"`
 }
 
 type WorkPhoneGetWeChatsResp struct {

+ 1 - 0
internal/utils/compapi/config.go

@@ -22,4 +22,5 @@ var fastgptWorkIdMap = map[string]workIdInfo{
 	"TEST_DOUYIN":          {"fastgpt-bwt6oSGcjwJ1qBgT276oeFD34IAhfjEQBCZWJfJR1oj3WqJl7751ljSrc", 2},
 	"GENERALIZED_KEYWORDS": {"fastgpt-yefNCWpNtzY2Qn0xtJvKuvepOP9DR7BiXQwv5BiVP5JseP2IS92gE", 3},
 	"TEST_DOUYIN_CN":       {"fastgpt-jsMmQKEM5uX7tDimT1zHlZHkBhMHRT2k61YaxyDJRZTUHehID7sG8BKXADNIU", 4},
+	"travel":       {"fastgpt-bcnfFtw1lXWdmYGOv165UVD5R1kY28tyXX8SJv8MHhrSMOgVJsuU", 5},
 }