Pārlūkot izejas kodu

fix:edit employee API

jimmyyem 7 mēneši atpakaļ
vecāks
revīzija
68ae1ee53e

+ 3 - 0
desc/wechat/employee.api

@@ -1,6 +1,7 @@
 import "../base.api"
 import "./work_experience.api"
 import "./tutorial.api"
+import "./employee_config.api"
 
 type (
     // The data of employee information | Employee信息
@@ -39,9 +40,11 @@ type (
 
         // scene | 使用场景 
         Scene  *string `json:"scene,optional"`
+		SceneList []EmployeeConfigInfo `json:"sceneList,optional"`
 
         // switch_in | 支持介入 
         SwitchIn  *string `json:"switchIn,optional"`
+		SwitchInList []EmployeeConfigInfo `json:"switchInList,optional"`
 
         Tutorial  []TutorialInfo `json:"tutorial,optional"`
 

+ 243 - 186
hook/fastgpt/usage.go

@@ -2,206 +2,263 @@ package fastgpt
 
 /**
 以下为知识库相关
+================================================================
 */
 
-//var info DatasetReq
-//info.ParentID = "66cc44d725aea7116ded5281"
-//info.Name = "dataset-测试数据(huaguo)"
-//info.Intro = "测试数据(huaguo)"
-//info.AgentModel = "gpt-3.5-turbo"
-//info.VectorModel = "text-embedding-ada-002"
-//
-//var dataset *DatasetResp
-//dataset, err := CreateDataset(&info)
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//	return
-//}
-//fmt.Printf("%v", dataset)
-//fmt.Println(dataset.Code, dataset.StatusText, dataset.Message, dataset.Data)
-
-//resp, err := DeleteDataset("66cc43e125aea7116ded514f")
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("code=%v, data=%v, message=%v, statusText=%v", resp.Code, resp.Data, resp.Message, resp.StatusText)
-
-//resp, err := GetDatasetDetail("66cc44d725aea7116ded5281")
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("code=%v, data=%v, message=%v, statusText=%v", resp.Code, resp.Data, resp.Message, resp.StatusText)
-
-//resp, err := GetDatasetList("66cc44d725aea7116ded5281")
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("%v", resp)
-
-//resp, err := GetCollectionDetail("66cc458925aea7116ded53bc")
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("code=%v, data=%v", resp.Code, resp.Data)
+/**
+// 创建数据集
+var info DatasetReq
+info.ParentID = "66cc44d725aea7116ded5281"
+info.Name = "dataset-测试数据(huaguo)"
+info.Intro = "测试数据(huaguo)"
+info.AgentModel = "gpt-3.5-turbo"
+info.VectorModel = "text-embedding-ada-002"
+
+var dataset *DatasetResp
+dataset, err := CreateDataset(&info)
+if err != nil {
+	fmt.Printf("%v", err.Error())
+	return
+}
+fmt.Printf("%v", dataset)
+fmt.Println(dataset.Code, dataset.StatusText, dataset.Message, dataset.Data)
+*/
+
+/**
+// 删除数据集
+resp, err := DeleteDataset("66cc43e125aea7116ded514f")
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("code=%v, data=%v, message=%v, statusText=%v", resp.Code, resp.Data, resp.Message, resp.StatusText)
+*/
+
+/**
+// 获取数据集详情
+resp, err := GetDatasetDetail("66cc44d725aea7116ded5281")
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("code=%v, data=%v, message=%v, statusText=%v", resp.Code, resp.Data, resp.Message, resp.StatusText)
+*/
+
+/**
+// 获取数据集列表
+resp, err := GetDatasetList("66cc44d725aea7116ded5281")
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("%v", resp)
+*/
 
 /**
 以下为集合相关
+================================================================
+*/
+
+/**
+// 获取集合详情
+resp, err := GetCollectionDetail("66cc458925aea7116ded53bc")
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("code=%v, data=%v", resp.Code, resp.Data)
 */
 
-//var params GetCollectionListReq
-//params.DatasetId = "66cc458925aea7116ded53ba"
-//params.PageNum = 1
-//params.PageSize = 20
-//resp, err := GetCollectionList(&params)
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("code=%v, data=%v", resp.Code, resp.Data)
-
-//var params CreateCollectionReq
-//params.DatasetId = "66cc458925aea7116ded53ba"
-//params.Name = "空集合v3"
-//params.Type = "folder"
-//resp, err := CreateEmptyCollection(&params)
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("%v", resp)
-
-//var params CreateTextCollectionReq
-//params.DatasetId = "66cc458925aea7116ded53ba"
-//params.Name = "文本测试训练v5"
-//params.Text = " 《毒战》改编自杜琪峰执导的同名电影,讲述为了抓捕韩国最大规模贩毒组织的神秘大BOSS李先生,警察元浩与李先生手下成员乐联手破案的故事。 "
-//params.TrainingType = "qa"
-//params.ChunkSize = 8000
-//params.ChunkSplitter = ""
-//params.QaPrompt = "11"
-//resp, err := CreateTextCollection(&params)
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("%v", resp)
-
-//var params CreateLinkCollectionReq
-//params.DatasetId = "66cc458925aea7116ded53ba"
-//params.Name = "链接测试训练v5"
-//params.Link = "https://doc.in/docs/course/quick-start/"
-//params.TrainingType = "chunk"
-//params.ChunkSize = 512
-//params.ChunkSplitter = ""
-//params.QaPrompt = ""
-//metadata := make(map[string]string)
-//metadata["webPageSelector"] = ".docs-content"
-//params.Metadata = metadata
-//resp, err := CreateLinkCollection(&params)
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("collectionId=%v", resp.Data.CollectionID)
-
-//data := make(map[string]string, 8)
-//filePath := "/tmp/movie.txt"
-//data["datasetId"] = "66cc458925aea7116ded53ba"
-//data["trainingType"] = "chunk"
-//data["chunkSize"] = "512"
-//data["chunkSplitter"] = ""
-//data["qaPrompt"] = ""
-//resp, err := CreateFileCollection(&data, filePath)
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("%v", resp)
-
-//var params UpdateCollectionReq
-//params.ID = "66cd6c0025aea7116dedb313"
-//params.Name = "链接集合V6"
-//resp, err := UpdateCollection(&params)
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("resp=%v", resp)
-
-//resp, err := DeleteCollection("66cd6c0025aea7116dedb313")
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("resp=%v", resp)
+/**
+// 获取集合列表
+var params GetCollectionListReq
+params.DatasetId = "66cc458925aea7116ded53ba"
+params.PageNum = 1
+params.PageSize = 20
+resp, err := GetCollectionList(&params)
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("code=%v, data=%v", resp.Code, resp.Data)
+*/
+
+/**
+// 创建空集合
+var params CreateCollectionReq
+params.DatasetId = "66cc458925aea7116ded53ba"
+params.Name = "空集合v3"
+params.Type = "folder"
+resp, err := CreateEmptyCollection(&params)
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("%v", resp)
+*/
+
+/**
+// 创建文本集合
+var params CreateTextCollectionReq
+params.DatasetId = "66cc458925aea7116ded53ba"
+params.Name = "文本测试训练v5"
+params.Text = " 《毒战》改编自杜琪峰执导的同名电影,讲述为了抓捕韩国最大规模贩毒组织的神秘大BOSS李先生,警察元浩与李先生手下成员乐联手破案的故事。 "
+params.TrainingType = "qa"
+params.ChunkSize = 8000
+params.ChunkSplitter = ""
+params.QaPrompt = "11"
+resp, err := CreateTextCollection(&params)
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("%v", resp)
+*/
+
+/**
+// 创建链接集合
+var params CreateLinkCollectionReq
+params.DatasetId = "66cc458925aea7116ded53ba"
+params.Name = "链接测试训练v5"
+params.Link = "https://doc.in/docs/course/quick-start/"
+params.TrainingType = "chunk"
+params.ChunkSize = 512
+params.ChunkSplitter = ""
+params.QaPrompt = ""
+metadata := make(map[string]string)
+metadata["webPageSelector"] = ".docs-content"
+params.Metadata = metadata
+resp, err := CreateLinkCollection(&params)
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("collectionId=%v", resp.Data.CollectionID)
+*/
+
+/**
+// 创建文件集合
+data := make(map[string]string, 8)
+filePath := "/tmp/movie.txt"
+data["datasetId"] = "66cc458925aea7116ded53ba"
+data["trainingType"] = "chunk"
+data["chunkSize"] = "512"
+data["chunkSplitter"] = ""
+data["qaPrompt"] = ""
+resp, err := CreateFileCollection(&data, filePath)
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("%v", resp)
+*/
+
+/**
+// 更新集合
+var params UpdateCollectionReq
+params.ID = "66cd6c0025aea7116dedb313"
+params.Name = "链接集合V6"
+resp, err := UpdateCollection(&params)
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("resp=%v", resp)
+*/
+
+/**
+// 删除集合
+resp, err := DeleteCollection("66cd6c0025aea7116dedb313")
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("resp=%v", resp)
+*/
 
 /**
 以下为数据相关
+================================================================
 */
 
-//resp, err := GetDataDetail("66cd773b25aea7116dedc017")
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("resp=%v", resp)
-
-//var params GetDataListReq
-//params.PageSize = 10
-//params.PageNum = 1
-//params.CollectionId = "66cd773b25aea7116dedc01a"
-//resp, err := GetDataList(&params)
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("resp=%v", resp)
-
-//var params CreateBulkDataReq
-//params.CollectionID = "66cd773b25aea7116dedc01a"
-//params.TrainingMode = "chunk"
-//params.Data = []DataQuestion{
-//	{
-//		Q: "你是谁?",
-//		A: "我是FastGPT助手",
-//	},
-//	{
-//		Q: "你会什么?",
-//		A: "我什么都会",
-//		Indexes: []Index{
-//			{Text: "自定义索引1"},
-//			{Text: "自定义索引2"},
-//		},
-//	},
-//}
-//resp, err := CreateBulkData(&params)
-//if err != nil {
-//	fmt.Printf("%v", err.Error())
-//}
-//fmt.Printf("resp=%v", resp)
-
-//var params UpdateDataReq
-//params.ID = "66cd7e1925aea7116dedc64b"
-//params.Q = "你是谁3?"
-//params.A = "我是FastGPT助手3"
-//params.Indexes = []Index{
-//	{Text: "自定义索引1", DataId: "66cd7e1925aea7116dedc64b", DefaultIndex: true},
-//	{Text: "自定义索引2", DataId: "66cd7e1925aea7116dedc64b", DefaultIndex: false},
-//}
-//resp, err := UpdateData(&params)
-//if err != nil {
-//	fmt.Printf("%v", err)
-//}
-//fmt.Printf("resp=%v", resp)
-
-//resp, err := DeleteData("66cd7e1925aea7116dedc651")
-//if err != nil {
-//	fmt.Printf("%v", err)
-//}
-//fmt.Printf("resp=%v", resp)
+/**
+// 获取数据详情
+resp, err := GetDataDetail("66cd773b25aea7116dedc017")
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("resp=%v", resp)
+*/
+
+/**
+// 获取数据列表
+var params GetDataListReq
+params.PageSize = 10
+params.PageNum = 1
+params.CollectionId = "66cd773b25aea7116dedc01a"
+resp, err := GetDataList(&params)
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("resp=%v", resp)
+*/
+
+/**
+// 批量创建数据
+var params CreateBulkDataReq
+params.CollectionID = "66cd773b25aea7116dedc01a"
+params.TrainingMode = "chunk"
+params.Data = []DataQuestion{
+	{
+		Q: "你是谁?",
+		A: "我是FastGPT助手",
+	},
+	{
+		Q: "你会什么?",
+		A: "我什么都会",
+		Indexes: []Index{
+			{Text: "自定义索引1"},
+			{Text: "自定义索引2"},
+		},
+	},
+}
+resp, err := CreateBulkData(&params)
+if err != nil {
+	fmt.Printf("%v", err.Error())
+}
+fmt.Printf("resp=%v", resp)
+*/
+
+/**
+// 更新数据
+var params UpdateDataReq
+params.ID = "66cd7e1925aea7116dedc64b"
+params.Q = "你是谁3?"
+params.A = "我是FastGPT助手3"
+params.Indexes = []Index{
+	{Text: "自定义索引1", DataId: "66cd7e1925aea7116dedc64b", DefaultIndex: true},
+	{Text: "自定义索引2", DataId: "66cd7e1925aea7116dedc64b", DefaultIndex: false},
+}
+resp, err := UpdateData(&params)
+if err != nil {
+	fmt.Printf("%v", err)
+}
+fmt.Printf("resp=%v", resp)
+*/
+
+/**
+// 删除数据
+resp, err := DeleteData("66cd7e1925aea7116dedc651")
+if err != nil {
+	fmt.Printf("%v", err)
+}
+fmt.Printf("resp=%v", resp)
+*/
 
 /**
 以下为搜索相关
 */
 
-//var params SearchReq
-//params.DatasetID = "66cc458925aea7116ded53ba"
-//params.Text = "毒战"
-//params.Limit = 20
-//params.SearchMode = "fullTextRecall"
-//params.UsingReRank = true
-//resp, err := SearchText(&params)
-//if err != nil {
-//	fmt.Printf("%v", err)
-//}
-//fmt.Printf("resp=%v", resp)
+/**
+// 搜索数据
+var params SearchReq
+params.DatasetID = "66cc458925aea7116ded53ba"
+params.Text = "毒战"
+params.Limit = 20
+params.SearchMode = "fullTextRecall"
+params.UsingReRank = true
+resp, err := SearchText(&params)
+if err != nil {
+	fmt.Printf("%v", err)
+}
+fmt.Printf("resp=%v", resp)
+*/

+ 14 - 14
internal/handler/routes.go

@@ -741,6 +741,20 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 	)
 
 	server.AddRoutes(
+		rest.WithMiddlewares(
+			[]rest.Middleware{serverCtx.Authority},
+			[]rest.Route{
+				{
+					Method:  http.MethodGet,
+					Path:    "/employee_config/list",
+					Handler: employee_config.GetEmployeeListConfigHandler(serverCtx),
+				},
+			}...,
+		),
+		rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
+	)
+
+	server.AddRoutes(
 		[]rest.Route{
 			{
 				Method:  http.MethodPost,
@@ -774,18 +788,4 @@ func RegisterHandlers(server *rest.Server, serverCtx *svc.ServiceContext) {
 			},
 		},
 	)
-
-	server.AddRoutes(
-		rest.WithMiddlewares(
-			[]rest.Middleware{serverCtx.Authority},
-			[]rest.Route{
-				{
-					Method:  http.MethodGet,
-					Path:    "/employee_config/list",
-					Handler: employee_config.GetEmployeeListConfigHandler(serverCtx),
-				},
-			}...,
-		),
-		rest.WithJwt(serverCtx.Config.Auth.AccessSecret),
-	)
 }

+ 45 - 0
internal/logic/employee/get_employee_by_id_logic.go

@@ -2,7 +2,10 @@ package employee
 
 import (
 	"context"
+	"github.com/spf13/cast"
+	"strings"
 	"wechat-api/ent/employee"
+	"wechat-api/ent/employeeconfig"
 
 	"wechat-api/internal/svc"
 	"wechat-api/internal/types"
@@ -69,6 +72,10 @@ func (l *GetEmployeeByIdLogic) GetEmployeeById(req *types.IDReq) (*types.Employe
 		})
 	}
 
+	// 分别获得 scene 和 switch_in 的列表
+	sceneList := getEmployeeConfigList(l, data.Scene)
+	switchInList := getEmployeeConfigList(l, data.SwitchIn)
+
 	return &types.EmployeeInfoResp{
 		BaseDataInfo: types.BaseDataInfo{
 			Code: 0,
@@ -91,10 +98,48 @@ func (l *GetEmployeeByIdLogic) GetEmployeeById(req *types.IDReq) (*types.Employe
 			Skill:            &data.Skill,
 			AbilityType:      &data.AbilityType,
 			Scene:            &data.Scene,
+			SceneList:        sceneList,
 			Tutorial:         tutorial,
 			SwitchIn:         &data.SwitchIn,
+			SwitchInList:     switchInList,
 			VideoUrl:         &data.VideoURL,
 			WorkExperience:   workExperience,
 		},
 	}, nil
 }
+
+func FormatIds(str string) []uint64 {
+	str = strings.Trim(str, " ")
+	idsArray := strings.Split(str, ",")
+	idArray := make([]uint64, 0, len(idsArray))
+	for _, idstr := range idsArray {
+		idArray = append(idArray, cast.ToUint64(idstr))
+	}
+
+	return idArray
+}
+
+func getEmployeeConfigList(l *GetEmployeeByIdLogic, ids string) []types.EmployeeConfigInfo {
+	sceneIds := FormatIds(ids)
+	employeeConfigList, err := l.svcCtx.DB.EmployeeConfig.Query().Where(
+		employeeconfig.IDIn(sceneIds...),
+	).All(l.ctx)
+
+	sceneList := make([]types.EmployeeConfigInfo, 0)
+	if err == nil && len(employeeConfigList) > 0 {
+		for _, val := range employeeConfigList {
+			sceneList = append(sceneList, types.EmployeeConfigInfo{
+				BaseIDInfo: types.BaseIDInfo{
+					Id:        &val.ID,
+					CreatedAt: pointy.GetPointer(val.CreatedAt.UnixMilli()),
+					UpdatedAt: pointy.GetPointer(val.UpdatedAt.UnixMilli()),
+				},
+				Stype: &val.Stype,
+				Title: &val.Title,
+				Photo: &val.Photo,
+			})
+		}
+	}
+
+	return sceneList
+}

+ 31 - 0
internal/logic/employee/get_employee_list_logic.go

@@ -2,6 +2,7 @@ package employee
 
 import (
 	"context"
+	"wechat-api/ent/employeeconfig"
 
 	"wechat-api/ent/employee"
 	"wechat-api/ent/predicate"
@@ -85,6 +86,9 @@ func (l *GetEmployeeListLogic) GetEmployeeList(req *types.EmployeeListReq) (*typ
 			})
 		}
 
+		sceneList := getEmployeeConfigListByIds(l, v.Scene)
+		switchInList := getEmployeeConfigListByIds(l, v.SwitchIn)
+
 		resp.Data.Data = append(resp.Data.Data,
 			types.EmployeeInfo{
 				BaseIDInfo: types.BaseIDInfo{
@@ -103,7 +107,9 @@ func (l *GetEmployeeListLogic) GetEmployeeList(req *types.EmployeeListReq) (*typ
 				Skill:            &v.Skill,
 				AbilityType:      &v.AbilityType,
 				Scene:            &v.Scene,
+				SceneList:        sceneList,
 				SwitchIn:         &v.SwitchIn,
+				SwitchInList:     switchInList,
 				Tutorial:         tutorial,
 				VideoUrl:         &v.VideoURL,
 				WorkExperience:   workExperience,
@@ -112,3 +118,28 @@ func (l *GetEmployeeListLogic) GetEmployeeList(req *types.EmployeeListReq) (*typ
 
 	return resp, nil
 }
+
+func getEmployeeConfigListByIds(l *GetEmployeeListLogic, ids string) []types.EmployeeConfigInfo {
+	sceneIds := FormatIds(ids)
+	employeeConfigList, err := l.svcCtx.DB.EmployeeConfig.Query().Where(
+		employeeconfig.IDIn(sceneIds...),
+	).All(l.ctx)
+
+	sceneList := make([]types.EmployeeConfigInfo, 0)
+	if err == nil && len(employeeConfigList) > 0 {
+		for _, val := range employeeConfigList {
+			sceneList = append(sceneList, types.EmployeeConfigInfo{
+				BaseIDInfo: types.BaseIDInfo{
+					Id:        &val.ID,
+					CreatedAt: pointy.GetPointer(val.CreatedAt.UnixMilli()),
+					UpdatedAt: pointy.GetPointer(val.UpdatedAt.UnixMilli()),
+				},
+				Stype: &val.Stype,
+				Title: &val.Title,
+				Photo: &val.Photo,
+			})
+		}
+	}
+
+	return sceneList
+}

+ 46 - 44
internal/types/types.go

@@ -1368,10 +1368,12 @@ type EmployeeInfo struct {
 	// ability_type | 能力类型
 	AbilityType *string `json:"abilityType,optional"`
 	// scene | 使用场景
-	Scene *string `json:"scene,optional"`
+	Scene     *string              `json:"scene,optional"`
+	SceneList []EmployeeConfigInfo `json:"sceneList,optional"`
 	// switch_in | 支持介入
-	SwitchIn *string        `json:"switchIn,optional"`
-	Tutorial []TutorialInfo `json:"tutorial,optional"`
+	SwitchIn     *string              `json:"switchIn,optional"`
+	SwitchInList []EmployeeConfigInfo `json:"switchInList,optional"`
+	Tutorial     []TutorialInfo       `json:"tutorial,optional"`
 	// video_url | 视频地址
 	VideoUrl *string `json:"videoUrl,optional"`
 	// work_experience | 工作经验
@@ -1510,6 +1512,47 @@ type TutorialInfoResp struct {
 	Data TutorialInfo `json:"data"`
 }
 
+// The data of employee config information | EmployeeConfig信息
+// swagger:model EmployeeConfigInfo
+type EmployeeConfigInfo struct {
+	BaseIDInfo
+	// 类型:scene-场景 switch_in-接入方式
+	Stype *string `json:"stype,optional"`
+	// 标题
+	Title *string `json:"title,optional"`
+	// 图片地址
+	Photo *string `json:"photo,optional"`
+}
+
+// EmployeeConfig list data | EmployeeConfig列表数据
+// swagger:model EmployeeConfigListInfo
+type EmployeeConfigListInfo struct {
+	BaseListInfo
+	// The API list data | EmployeeConfig列表数据
+	Data []EmployeeConfigInfo `json:"data"`
+}
+
+// Employee config response | Employee配置信息返回体
+// swagger:model EmployeeConfigListReq
+type EmployeeConfigListReq struct {
+	/// 类型:scene-场景 switch_in-接入方式
+	Stype *string `json:"stype,optional"`
+}
+
+// EmployeeConfig information response | EmployeeConfig信息返回体
+type EmployeeConfig struct {
+	Scene    []EmployeeConfigInfo `json:"scene"`
+	SwitchIn []EmployeeConfigInfo `json:"switchIn"`
+}
+
+// Employee config response | Employee配置信息返回体
+// swagger:model EmployeeConfigListResp
+type EmployeeConfigListResp struct {
+	BaseDataInfo
+	// Employee information | Employee数据
+	Data EmployeeConfig `json:"data"`
+}
+
 // The data of token information | Token信息
 // swagger:model TokenInfo
 type TokenInfo struct {
@@ -1574,44 +1617,3 @@ type CheckTokenResp struct {
 	// Timestamp 时间戳
 	Timestamp *int64 `json:"timestamp"`
 }
-
-// The data of employee config information | EmployeeConfig信息
-// swagger:model EmployeeConfigInfo
-type EmployeeConfigInfo struct {
-	BaseIDInfo
-	// 类型:scene-场景 switch_in-接入方式
-	Stype *string `json:"stype,optional"`
-	// 标题
-	Title *string `json:"title,optional"`
-	// 图片地址
-	Photo *string `json:"photo,optional"`
-}
-
-// EmployeeConfig list data | EmployeeConfig列表数据
-// swagger:model EmployeeConfigListInfo
-type EmployeeConfigListInfo struct {
-	BaseListInfo
-	// The API list data | EmployeeConfig列表数据
-	Data []EmployeeConfigInfo `json:"data"`
-}
-
-// Employee config response | Employee配置信息返回体
-// swagger:model EmployeeConfigListReq
-type EmployeeConfigListReq struct {
-	/// 类型:scene-场景 switch_in-接入方式
-	Stype *string `json:"stype,optional"`
-}
-
-// EmployeeConfig information response | EmployeeConfig信息返回体
-type EmployeeConfig struct {
-	Scene    []EmployeeConfigInfo `json:"scene"`
-	SwitchIn []EmployeeConfigInfo `json:"switchIn"`
-}
-
-// Employee config response | Employee配置信息返回体
-// swagger:model EmployeeConfigListResp
-type EmployeeConfigListResp struct {
-	BaseDataInfo
-	// Employee information | Employee数据
-	Data EmployeeConfig `json:"data"`
-}