Explorar o código

fix:处理冲突

jimmyyem hai 1 semana
pai
achega
4d39041e8a
Modificáronse 2 ficheiros con 19 adicións e 17 borrados
  1. 14 13
      ent/client.go
  2. 5 4
      internal/types/types.go

+ 14 - 13
ent/client.go

@@ -461,12 +461,13 @@ func (c *Client) Use(hooks ...Hook) {
 		c.Agent, c.AgentBase, c.AliyunAvatar, c.AllocAgent, c.ApiKey, c.BatchMsg,
 		c.Category, c.ChatRecords, c.ChatSession, c.CompapiAsynctask, c.Contact,
 		c.ContactField, c.ContactFieldTemplate, c.CreditBalance, c.CreditUsage,
-		c.Employee, c.EmployeeConfig, c.Label, c.LabelLog,c.LabelRelationship, c.LabelTagging,
-		c.Message, c.MessageRecords, c.Msg, c.PayRecharge, c.Server, c.SopNode,
-		c.SopStage, c.SopTask, c.Token, c.Tutorial, c.UsageDetail, c.UsageStatisticDay,
-		c.UsageStatisticHour, c.UsageStatisticMonth, c.UsageTotal, c.Whatsapp,
-		c.WhatsappChannel, c.WorkExperience, c.WpChatroom, c.WpChatroomMember, c.Wx,
-		c.WxCard, c.WxCardUser, c.WxCardVisit, c.Xunji, c.XunjiService,
+		c.Employee, c.EmployeeConfig, c.Label, c.LabelLog, c.LabelRelationship,
+		c.LabelTagging, c.Message, c.MessageRecords, c.Msg, c.PayRecharge, c.Server,
+		c.SopNode, c.SopStage, c.SopTask, c.Token, c.Tutorial, c.UsageDetail,
+		c.UsageStatisticDay, c.UsageStatisticHour, c.UsageStatisticMonth, c.UsageTotal,
+		c.Whatsapp, c.WhatsappChannel, c.WorkExperience, c.WpChatroom,
+		c.WpChatroomMember, c.Wx, c.WxCard, c.WxCardUser, c.WxCardVisit, c.Xunji,
+		c.XunjiService,
 	} {
 		n.Use(hooks...)
 	}
@@ -479,12 +480,13 @@ func (c *Client) Intercept(interceptors ...Interceptor) {
 		c.Agent, c.AgentBase, c.AliyunAvatar, c.AllocAgent, c.ApiKey, c.BatchMsg,
 		c.Category, c.ChatRecords, c.ChatSession, c.CompapiAsynctask, c.Contact,
 		c.ContactField, c.ContactFieldTemplate, c.CreditBalance, c.CreditUsage,
-		c.Employee, c.EmployeeConfig, c.Label, c.LabelLog,c.LabelRelationship, c.LabelTagging,
-		c.Message, c.MessageRecords, c.Msg, c.PayRecharge, c.Server, c.SopNode,
-		c.SopStage, c.SopTask, c.Token, c.Tutorial, c.UsageDetail, c.UsageStatisticDay,
-		c.UsageStatisticHour, c.UsageStatisticMonth, c.UsageTotal, c.Whatsapp,
-		c.WhatsappChannel, c.WorkExperience, c.WpChatroom, c.WpChatroomMember, c.Wx,
-		c.WxCard, c.WxCardUser, c.WxCardVisit, c.Xunji, c.XunjiService,
+		c.Employee, c.EmployeeConfig, c.Label, c.LabelLog, c.LabelRelationship,
+		c.LabelTagging, c.Message, c.MessageRecords, c.Msg, c.PayRecharge, c.Server,
+		c.SopNode, c.SopStage, c.SopTask, c.Token, c.Tutorial, c.UsageDetail,
+		c.UsageStatisticDay, c.UsageStatisticHour, c.UsageStatisticMonth, c.UsageTotal,
+		c.Whatsapp, c.WhatsappChannel, c.WorkExperience, c.WpChatroom,
+		c.WpChatroomMember, c.Wx, c.WxCard, c.WxCardUser, c.WxCardVisit, c.Xunji,
+		c.XunjiService,
 	} {
 		n.Intercept(interceptors...)
 	}
@@ -2174,7 +2176,6 @@ func (c *ContactClient) QueryContactRelationships(co *Contact) *LabelRelationshi
 	return query
 }
 
-
 // QueryContactFields queries the contact_fields edge of a Contact.
 func (c *ContactClient) QueryContactFields(co *Contact) *ContactFieldQuery {
 	query := (&ContactFieldClient{config: c.config}).Query()

+ 5 - 4
internal/types/types.go

@@ -1077,7 +1077,7 @@ type ContactListReq struct {
 	Ctype *uint64 `json:"ctype,optional"`
 	//标签搜索开始结束日期
 	SearchDate []*string `json:"date,optional"`
-	Status    *uint8  `json:"status,optional"`
+	Status     *uint8    `json:"status,optional"`
 }
 
 // Contact information response | Contact信息返回体
@@ -3389,9 +3389,10 @@ type UsageDetailInfo struct {
 	// 响应token数
 	CompletionTokens *uint64 `json:"completionTokens,optional"`
 	// 组织ID
-	OrganizationId   *uint64 `json:"organizationId,optional"`
-	OrganizationName *string `json:"organizationName,optional"`
-	Model            *string `json:"model,optional"`
+	OrganizationId   *uint64  `json:"organizationId,optional"`
+	OrganizationName *string  `json:"organizationName,optional"`
+	Model            *string  `json:"model,optional"`
+	Credits          *float64 `json:"credits,optional"`
 }
 
 // The response data of UsageDetail list | UsageDetail列表数据