|
@@ -33,6 +33,7 @@ func NewUserListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *UserList
|
|
|
func (l *UserListLogic) UserList(in *messagecenter.UserReq) (*messagecenter.UserResp, error) {
|
|
|
// todo: add your logic here and delete this line
|
|
|
m := service.MessaggeService{}
|
|
|
+ nowIndex := 0
|
|
|
queryAgain:
|
|
|
data, count, err := m.UserList(in)
|
|
|
if err != nil {
|
|
@@ -40,8 +41,9 @@ queryAgain:
|
|
|
}
|
|
|
var result = []*messagecenter.UserEntity{}
|
|
|
//聊天内容为空,插入默认客服聊天内容
|
|
|
- if (count == 0 || len(*data) == 0) && in.UserType == 2 {
|
|
|
+ if (count == 0 || len(*data) == 0) && in.UserType == 2 && in.QueryType != 1 && nowIndex < 1 {
|
|
|
if insertDefaultChat(in) {
|
|
|
+ nowIndex++
|
|
|
goto queryAgain
|
|
|
}
|
|
|
}
|