boweniac 4 месяцев назад
Родитель
Сommit
7d85e5e4f0

+ 1 - 1
desc/wechat/usage_detail.api

@@ -18,7 +18,7 @@ type (
         ReceiverId  *string `json:"receiverId,optional"`
 
         // 1 cow-basic 2 cow-agent 3 cow-sop 4 mp-card 5 mp-employee
-        App  *int `json:"app,optional"
+        App  *string `json:"app,optional"
 
         // 名片会话id
         SessionId *uint64 `json:"sessionId,optional"`

+ 12 - 1
internal/logic/UsageDetail/get_usage_detail_list_logic.go

@@ -48,6 +48,16 @@ func (l *GetUsageDetailListLogic) GetUsageDetailList(req *types.UsageDetailListR
 	resp.Data.Total = data.PageDetails.Total
 
 	for _, v := range data.List {
+		app := "未知"
+		if v.App == 1 {
+			app = "智能回复"
+		} else if v.App == 2 {
+			app = "AI角色-优化问题"
+		} else if v.App == 3 {
+			app = "AI角色-回复"
+		} else if v.App == 4 {
+			app = "SOP-节点判断"
+		}
 		request := v.Request
 		if v.App == 2 {
 			request = "问题优化"
@@ -64,7 +74,8 @@ func (l *GetUsageDetailListLogic) GetUsageDetailList(req *types.UsageDetailListR
 				Status:           &v.Status,
 				Type:             &v.Type,
 				BotId:            &v.BotID,
-				App:              &v.App,
+				ReceiverId:       &v.ReceiverID,
+				App:              &app,
 				SessionId:        &v.SessionID,
 				Request:          &request,
 				Response:         &v.Response,

+ 1 - 1
internal/types/types.go

@@ -2766,7 +2766,7 @@ type UsageDetailInfo struct {
 	// 微信id或open_id
 	ReceiverId *string `json:"receiverId,optional"`
 	// 1 cow-basic 2 cow-agent 3 cow-sop 4 mp-card 5 mp-employee
-	App *int
+	App *string
 	// 名片会话id
 	SessionId *uint64 `json:"sessionId,optional"`
 	// 请求内容