Bläddra i källkod

Merge branch 'feature/635-huaguo-remark-search' into debug

jimmyyem 3 dagar sedan
förälder
incheckning
b15ec8189d

+ 27 - 4
crontask/init.go

@@ -24,7 +24,6 @@ func NewCronTask(ctx context.Context, svcCtx *svc.ServiceContext) *CronTask {
 
 func ScheduleRun(c *cron.Cron, serverCtx *svc.ServiceContext) {
 
-	//除了fe环境任务关闭 其他环境任务要正常打开
 	l := NewCronTask(context.Background(), serverCtx)
 	c.AddFunc("* * * * *", func() {
 		l.sendMsg()
@@ -51,9 +50,33 @@ func ScheduleRun(c *cron.Cron, serverCtx *svc.ServiceContext) {
 	})
 
 	contactForm2 := NewCronTask(context.Background(), serverCtx)
-	c.AddFunc("0 12 * * *", func() {
-		bot_wxid := "wxid_ifzo7uu0cl3b22"
-		contactForm2.analyze(&bot_wxid)
+	c.AddFunc("0 8 * * *", func() {
+		bot_wxid1 := "wxid_mqq8zf6kdofj22"
+		contactForm2.analyze(&bot_wxid1)
+		bot_wxid2 := "wxid_4p6046tox6pd22"
+		contactForm2.analyze(&bot_wxid2)
+		bot_wxid3 := "wxid_s1bes9nbk37v12"
+		contactForm2.analyze(&bot_wxid3)
+	})
+
+	contactForm3 := NewCronTask(context.Background(), serverCtx)
+	c.AddFunc("30 11 * * *", func() {
+		bot_wxid1 := "wxid_mqq8zf6kdofj22"
+		contactForm3.analyze(&bot_wxid1)
+		bot_wxid2 := "wxid_4p6046tox6pd22"
+		contactForm3.analyze(&bot_wxid2)
+		bot_wxid3 := "wxid_s1bes9nbk37v12"
+		contactForm3.analyze(&bot_wxid3)
+	})
+
+	contactForm4 := NewCronTask(context.Background(), serverCtx)
+	c.AddFunc("0 17 * * *", func() {
+		bot_wxid1 := "wxid_mqq8zf6kdofj22"
+		contactForm4.analyze(&bot_wxid1)
+		bot_wxid2 := "wxid_4p6046tox6pd22"
+		contactForm4.analyze(&bot_wxid2)
+		bot_wxid3 := "wxid_s1bes9nbk37v12"
+		contactForm4.analyze(&bot_wxid3)
 	})
 
 	l = NewCronTask(context.Background(), serverCtx)

+ 1 - 1
desc/wechat/agent.api

@@ -253,7 +253,7 @@ type (
 
 		CollectionId  *string `json:"collectionId" validate:"required"`
 
-		AgentId  *uint64 `json:"agentId,optional"`
+		Keyword *string `json:"keyword,optional"`
 	}
 
 	// Data list response | Data List信息返回体

+ 3 - 0
desc/wechat/contact.api

@@ -59,6 +59,9 @@ type (
         // 昵称
         Nickname  *string `json:"nickname,optional"`
 
+		// 备注
+		Markname  *string `json:"markname,optional"`
+
         // 联系人类型:1好友,2群组,3公众号,4企业微信联系人
         Type  *int `json:"type,optional"`
 

+ 1 - 1
internal/handler/routes.go

@@ -1,5 +1,5 @@
 // Code generated by goctl. DO NOT EDIT.
-// goctls v1.10.4
+// goctls v1.10.1
 
 package handler
 

+ 4 - 0
internal/logic/agent_base/get_agent_base_list_logic.go

@@ -31,7 +31,11 @@ func (l *GetAgentBaseListLogic) GetAgentBaseList(req *types.DataListReq) (*types
 	params.CollectionId = *req.CollectionId
 	params.PageSize = *req.PageSize
 	params.PageNum = *req.Page
+	if req.Keyword != nil && *req.Keyword != "" {
+		params.SearchText = *req.Keyword
+	}
 	resp, err := fastgpt.GetDataList(&params)
+	//fmt.Printf("resp=%v err=%v\n", resp, err)
 	if err != nil {
 		return nil, errorx.NewInvalidArgumentError("fastgpt get data list failed " + err.Error())
 	}

+ 3 - 0
internal/logic/contact/get_contact_list_logic.go

@@ -140,6 +140,9 @@ func (l *GetContactListLogic) GetContactList(req *types.ContactListReq) (*types.
 	if req.Nickname != nil && *req.Nickname != "" {
 		predicates = append(predicates, contact.NicknameContains(*req.Nickname))
 	}
+	if req.Markname != nil && *req.Markname != "" {
+		predicates = append(predicates, contact.MarknameContains(*req.Markname))
+	}
 	if req.Type != nil {
 		predicates = append(predicates, contact.TypeEQ(*req.Type))
 	} else {

+ 3 - 1
internal/types/types.go

@@ -706,7 +706,7 @@ type DataListReq struct {
 	PageSize *int `json:"pageSize" validate:"required,number,lt=100000"`
 	// required : true
 	CollectionId *string `json:"collectionId" validate:"required"`
-	AgentId      *uint64 `json:"agentId,optional"`
+	Keyword      *string `json:"keyword,optional"`
 }
 
 // Data list response | Data List信息返回体
@@ -1089,6 +1089,8 @@ type ContactListReq struct {
 	Account *string `json:"account,optional"`
 	// 昵称
 	Nickname *string `json:"nickname,optional"`
+	// 备注
+	Markname *string `json:"markname,optional"`
 	// 联系人类型:1好友,2群组,3公众号,4企业微信联系人
 	Type *int `json:"type,optional"`
 	// 内容类型:1-个微 3-企微