瀏覽代碼

Merge branch 'dev/v1.2.6_rjj' of SocialPlatform/messageCenter into feature/v1.2.6

duxin 2 年之前
父節點
當前提交
f1292a67fb

+ 110 - 152
.idea/workspace.xml

@@ -5,33 +5,7 @@
   </component>
   <component name="ChangeListManager">
     <list default="true" id="f5220264-ecf0-4305-ada3-6105184077a7" name="Changes" comment="提交">
-      <change afterPath="$PROJECT_DIR$/rpc/messagecenter/internal/logic/groupnameupdatelogic.go" afterDir="false" />
       <change beforePath="$PROJECT_DIR$/.idea/workspace.xml" beforeDir="false" afterPath="$PROJECT_DIR$/.idea/workspace.xml" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/README.md" beforeDir="false" afterPath="$PROJECT_DIR$/README.md" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/api/messagecenter/internal/logic/findmessagelogic.go" beforeDir="false" afterPath="$PROJECT_DIR$/api/messagecenter/internal/logic/findmessagelogic.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/api/messagecenter/internal/logic/messageaddlogic.go" beforeDir="false" afterPath="$PROJECT_DIR$/api/messagecenter/internal/logic/messageaddlogic.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/api/messagecenter/internal/logic/userlistlogic.go" beforeDir="false" afterPath="$PROJECT_DIR$/api/messagecenter/internal/logic/userlistlogic.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/api/messagecenter/internal/logic/withdrawmessagelogic.go" beforeDir="false" afterPath="$PROJECT_DIR$/api/messagecenter/internal/logic/withdrawmessagelogic.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/api/messagecenter/internal/types/types.go" beforeDir="false" afterPath="$PROJECT_DIR$/api/messagecenter/internal/types/types.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/api/messagecenter/messagecenter.api" beforeDir="false" afterPath="$PROJECT_DIR$/api/messagecenter/messagecenter.api" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/entity/util.go" beforeDir="false" afterPath="$PROJECT_DIR$/entity/util.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/go.mod" beforeDir="false" afterPath="$PROJECT_DIR$/go.mod" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/rpc/messagecenter/internal/logic/entpersonslistlogic.go" beforeDir="false" afterPath="$PROJECT_DIR$/rpc/messagecenter/internal/logic/groupchatlogic.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/rpc/messagecenter/internal/server/messagecenterserver.go" beforeDir="false" afterPath="$PROJECT_DIR$/rpc/messagecenter/internal/server/messagecenterserver.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/rpc/messagecenter/logs/access.log" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/rpc/messagecenter/logs/error.log" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/rpc/messagecenter/logs/severe.log" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/rpc/messagecenter/logs/slow.log" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/rpc/messagecenter/logs/stat.log" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/rpc/messagecenter/messagecenter.proto" beforeDir="false" afterPath="$PROJECT_DIR$/rpc/messagecenter/messagecenter.proto" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/rpc/messagecenter/messagecenter/messagecenter.go" beforeDir="false" afterPath="$PROJECT_DIR$/rpc/messagecenter/messagecenter/messagecenter.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/rpc/messagecenter/messagecenter/messagecenter.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/rpc/messagecenter/messagecenter/messagecenter.pb.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/rpc/messagecenter/messagecenter/messagecenter_grpc.pb.go" beforeDir="false" afterPath="$PROJECT_DIR$/rpc/messagecenter/messagecenter/messagecenter_grpc.pb.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/service/chat_group.go" beforeDir="false" afterPath="$PROJECT_DIR$/service/chat_group.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/service/ent_address_book.go" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/service/ent_address_book_test.go" beforeDir="false" />
-      <change beforePath="$PROJECT_DIR$/service/message_mail_box.go" beforeDir="false" afterPath="$PROJECT_DIR$/service/message_mail_box.go" afterDir="false" />
-      <change beforePath="$PROJECT_DIR$/service/message_mail_box_test.go" beforeDir="false" afterPath="$PROJECT_DIR$/service/message_mail_box_test.go" afterDir="false" />
     </list>
     <option name="SHOW_DIALOG" value="false" />
     <option name="HIGHLIGHT_CONFLICTS" value="true" />
@@ -48,37 +22,11 @@
       </list>
     </option>
   </component>
-  <component name="GOROOT" url="file://H:/go/go1.18" />
+  <component name="GOROOT" url="file://E:/soft/go1.18/go1.18" />
   <component name="Git.Settings">
-    <favorite-branches>
-      <branch-storage>
-        <map>
-          <entry type="LOCAL">
-            <value>
-              <list>
-                <branch-info repo="$PROJECT_DIR$" source="dev_v1.2.6_wh" />
-              </list>
-            </value>
-          </entry>
-          <entry type="REMOTE">
-            <value>
-              <list>
-                <branch-info repo="$PROJECT_DIR$" source="origin/feature/v1.2.6" />
-              </list>
-            </value>
-          </entry>
-        </map>
-      </branch-storage>
-    </favorite-branches>
-    <option name="PUSH_TAGS">
-      <GitPushTagMode>
-        <option name="argument" value="--tags" />
-        <option name="title" value="All" />
-      </GitPushTagMode>
-    </option>
     <option name="RECENT_BRANCH_BY_REPOSITORY">
       <map>
-        <entry key="$PROJECT_DIR$" value="feature/v1.2.6_wh" />
+        <entry key="$PROJECT_DIR$" value="feature/v1.0.2_wky" />
       </map>
     </option>
     <option name="RECENT_GIT_ROOT_PATH" value="$PROJECT_DIR$" />
@@ -91,49 +39,11 @@
       <filtered-out-file-type name="COMMIT_BY_MESSAGE" />
     </file-type-list>
   </component>
-  <component name="GitToolBoxStore">
-    <option name="projectConfigVersion" value="5" />
-    <option name="recentBranches">
-      <RecentBranches>
-        <option name="branchesForRepo">
-          <list>
-            <RecentBranchesForRepo>
-              <option name="branches">
-                <list>
-                  <RecentBranch>
-                    <option name="branchName" value="dev/v1.2.6_wh" />
-                    <option name="lastUsedInstant" value="1682236043" />
-                  </RecentBranch>
-                  <RecentBranch>
-                    <option name="branchName" value="feature/v1.2.6_wh" />
-                    <option name="lastUsedInstant" value="1682235983" />
-                  </RecentBranch>
-                  <RecentBranch>
-                    <option name="branchName" value="feature/v1.2.6" />
-                    <option name="lastUsedInstant" value="1682235768" />
-                  </RecentBranch>
-                  <RecentBranch>
-                    <option name="branchName" value="master" />
-                    <option name="lastUsedInstant" value="1681434817" />
-                  </RecentBranch>
-                </list>
-              </option>
-              <option name="repositoryRootUrl" value="file://$PROJECT_DIR$" />
-            </RecentBranchesForRepo>
-          </list>
-        </option>
-      </RecentBranches>
-    </option>
-  </component>
   <component name="GoLibraries">
     <option name="indexEntireGoPath" value="true" />
   </component>
   <component name="HighlightingSettingsPerFile">
-    <setting file="file://H:/go/go1.16/pkg/mod/app.yhyue.com/moapp/jybase@v0.0.0-20220617085837-48c1bf245c2f/mysql/mysql.go" root0="SKIP_INSPECTION" />
-    <setting file="file://H:/go/go1.17.2/src/runtime/asm_amd64.s" root0="SKIP_INSPECTION" />
     <setting file="file://$PROJECT_DIR$/go.mod" root0="FORCE_HIGHLIGHTING" />
-    <setting file="file://H:/go/go1.16/pkg/mod/github.com/zeromicro/go-zero@v1.3.4/zrpc/internal/serverinterceptors/timeoutinterceptor.go" root0="SKIP_INSPECTION" />
-    <setting file="file://H:/go/go1.16/pkg/mod/app.yhyue.com/moapp/jybase@v0.0.0-20220617085837-48c1bf245c2f/common/common.go" root0="SKIP_INSPECTION" />
     <setting file="file://$PROJECT_DIR$/service/message_mail_box.go" root0="FORCE_HIGHLIGHTING" />
   </component>
   <component name="MarkdownSettingsMigration">
@@ -146,48 +56,41 @@
     <option name="showLibraryContents" value="true" />
   </component>
   <component name="PropertiesComponent">
-    <property name="DefaultGoTemplateProperty" value="Go File" />
-    <property name="Git.Branch.Popup.ShowAllRemotes" value="true" />
     <property name="WebServerToolWindowFactoryState" value="false" />
     <property name="configurable..is.expanded" value="false" />
     <property name="configurable.GoLibrariesConfigurable.is.expanded" value="true" />
+    <property name="go.format.on.save.advertiser.fired" value="true" />
+    <property name="go.formatter.settings.were.checked" value="true" />
     <property name="go.import.settings.migrated" value="true" />
-    <property name="last_opened_file_path" value="$PROJECT_DIR$/rpc/messagecenter/messagecenter" />
-    <property name="settings.editor.selected.configurable" value="go.vgo" />
+    <property name="go.modules.go.list.on.any.changes.was.set" value="true" />
+    <property name="go.sdk.automatically.set" value="true" />
+    <property name="go.watchers.conflict.with.on.save.actions.check.performed" value="true" />
+    <property name="last_opened_file_path" value="$USER_HOME$" />
+    <property name="settings.editor.selected.configurable" value="preferences.fileTypes" />
+    <property name="vue.rearranger.settings.migration" value="true" />
   </component>
   <component name="RecentsManager">
     <key name="CopyFile.RECENT_KEYS">
-      <recent name="D:\top_git_projects\SocialPlatform1\messageCenter\rpc\messagecenter\messagecenter" />
       <recent name="D:\workspace\top_project\SocialPlatform\messageCenter\rpc\messagecenterclient" />
       <recent name="D:\workspace\top_project\SocialPlatform\messageCenter\api\etc" />
       <recent name="D:\workspace\top_project\SocialPlatform\messageCenter\rpc\etc" />
       <recent name="D:\workspace\top_project\SocialPlatform\messageCenter\rpc" />
     </key>
     <key name="MoveFile.RECENT_KEYS">
-      <recent name="D:\top_git_projects\SocialPlatform1\messageCenter\rpc\messagecenter\messagecenter" />
       <recent name="D:\workspace\top_project\SocialPlatform\messageCenter\rpc\messagecenterclient" />
       <recent name="D:\workspace\top_project\SocialPlatform\messageCenter" />
       <recent name="D:\workspace\top_project\SocialPlatform\messageCenter\rpc" />
       <recent name="D:\workspace\top_project\SocialPlatform\messageCenter\api" />
     </key>
   </component>
-  <component name="RunManager" selected="Go 构建.go build  rpc">
-    <configuration name="go build  rpc" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true">
+  <component name="RunManager" selected="Go 构建.messageApi_win">
+    <configuration default="true" type="GoApplicationRunConfiguration" factoryName="Go Application">
       <module name="messageCenter" />
-      <working_directory value="$PROJECT_DIR$/rpc/messagecenter" />
-      <kind value="PACKAGE" />
-      <package value="bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter" />
+      <working_directory value="$PROJECT_DIR$" />
+      <go_parameters value="-i" />
+      <kind value="FILE" />
       <directory value="$PROJECT_DIR$" />
-      <filePath value="$PROJECT_DIR$/rpc/messagecenter/messagecenter.go" />
-      <method v="2" />
-    </configuration>
-    <configuration name="go build api" type="GoApplicationRunConfiguration" factoryName="Go Application" temporary="true">
-      <module name="messageCenter" />
-      <working_directory value="$PROJECT_DIR$/api/messagecenter" />
-      <kind value="PACKAGE" />
-      <package value="bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/api/messagecenter" />
-      <directory value="$PROJECT_DIR$/api/messagecenter" />
-      <filePath value="$PROJECT_DIR$/api/messagecenter/messagecenter.go" />
+      <filePath value="$PROJECT_DIR$" />
       <method v="2" />
     </configuration>
     <configuration name="messageApi" type="GoApplicationRunConfiguration" factoryName="Go Application">
@@ -206,6 +109,15 @@
       <option name="run" value="false" />
       <method v="2" />
     </configuration>
+    <configuration name="messageApi_win" type="GoApplicationRunConfiguration" factoryName="Go Application">
+      <module name="messageCenter" />
+      <working_directory value="$PROJECT_DIR$/api/messagecenter" />
+      <kind value="DIRECTORY" />
+      <package value="D:\top_git_projects\messageCenter\api\messagecenter" />
+      <directory value="$PROJECT_DIR$/api/messagecenter" />
+      <filePath value="$PROJECT_DIR$" />
+      <method v="2" />
+    </configuration>
     <configuration name="messageRpc" type="GoApplicationRunConfiguration" factoryName="Go Application">
       <module name="messageCenter" />
       <working_directory value="$PROJECT_DIR$/rpc/messagecenter" />
@@ -222,7 +134,16 @@
       <option name="run" value="false" />
       <method v="2" />
     </configuration>
-    <configuration name="bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_GroupNoticeGet/公告获取" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
+    <configuration name="messageRpc_win" type="GoApplicationRunConfiguration" factoryName="Go Application">
+      <module name="messageCenter" />
+      <working_directory value="$PROJECT_DIR$/rpc/messagecenter" />
+      <kind value="DIRECTORY" />
+      <package value="messagecenter" />
+      <directory value="$PROJECT_DIR$/rpc/messagecenter" />
+      <filePath value="$PROJECT_DIR$" />
+      <method v="2" />
+    </configuration>
+    <configuration name="TestMessaggeService_SaveMessage/7、机器人给用户发送信息 in bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
       <module name="messageCenter" />
       <working_directory value="$PROJECT_DIR$/service" />
       <root_directory value="$PROJECT_DIR$" />
@@ -231,10 +152,10 @@
       <directory value="$PROJECT_DIR$" />
       <filePath value="$PROJECT_DIR$" />
       <framework value="gotest" />
-      <pattern value="^\QTestChatGroupService_GroupNoticeGet\E$/^\Q公告获取\E$" />
+      <pattern value="^\QTestMessaggeService_SaveMessage\E$/^\Q7、机器人给用户发送信息\E$" />
       <method v="2" />
     </configuration>
-    <configuration name="bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_GroupNoticeUpdate/公告修改" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
+    <configuration name="TestMessaggeService_UpdateReadById in bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
       <module name="messageCenter" />
       <working_directory value="$PROJECT_DIR$/service" />
       <root_directory value="$PROJECT_DIR$" />
@@ -243,31 +164,73 @@
       <directory value="$PROJECT_DIR$" />
       <filePath value="$PROJECT_DIR$" />
       <framework value="gotest" />
-      <pattern value="^\QTestChatGroupService_GroupNoticeUpdate\E$/^\Q公告修改\E$" />
+      <pattern value="^\QTestMessaggeService_UpdateReadById\E$" />
       <method v="2" />
     </configuration>
-    <configuration name="genRpc" type="MAKEFILE_TARGET_RUN_CONFIGURATION" factoryName="Makefile" temporary="true">
-      <makefile filename="$PROJECT_DIR$/Makefile" target="genRpc" workingDirectory="" arguments="">
-        <envs />
-      </makefile>
+    <configuration name="Test_test1 in bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/test (1)" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
+      <module name="messageCenter" />
+      <working_directory value="$PROJECT_DIR$/rpc/messagecenter/test" />
+      <root_directory value="$PROJECT_DIR$" />
+      <kind value="PACKAGE" />
+      <package value="bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/test" />
+      <directory value="$PROJECT_DIR$" />
+      <filePath value="$PROJECT_DIR$" />
+      <framework value="gotest" />
+      <pattern value="^\QTest_test1\E$" />
+      <method v="2" />
+    </configuration>
+    <configuration default="true" type="GoTestRunConfiguration" factoryName="Go Test">
+      <module name="messageCenter" />
+      <working_directory value="$PROJECT_DIR$" />
+      <go_parameters value="-i" />
+      <kind value="DIRECTORY" />
+      <directory value="$PROJECT_DIR$" />
+      <filePath value="$PROJECT_DIR$" />
+      <framework value="gotest" />
+      <method v="2" />
+    </configuration>
+    <configuration name="bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_ChatGroupAdd/群组新增" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
+      <module name="messageCenter" />
+      <working_directory value="$PROJECT_DIR$/service" />
+      <root_directory value="$PROJECT_DIR$" />
+      <kind value="PACKAGE" />
+      <package value="bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service" />
+      <directory value="$PROJECT_DIR$" />
+      <filePath value="$PROJECT_DIR$" />
+      <framework value="gotest" />
+      <pattern value="^\QTestChatGroupService_ChatGroupAdd\E$/^\Q群组新增\E$" />
+      <method v="2" />
+    </configuration>
+    <configuration name="bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_EntPersonsList/企业列表" type="GoTestRunConfiguration" factoryName="Go Test" temporary="true" nameIsGenerated="true">
+      <module name="messageCenter" />
+      <working_directory value="$PROJECT_DIR$/service" />
+      <root_directory value="$PROJECT_DIR$" />
+      <kind value="PACKAGE" />
+      <package value="bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service" />
+      <directory value="$PROJECT_DIR$" />
+      <filePath value="$PROJECT_DIR$" />
+      <framework value="gotest" />
+      <pattern value="^\QTestChatGroupService_EntPersonsList\E$/^\Q企业列表\E$" />
       <method v="2" />
     </configuration>
     <list>
-      <item itemvalue="Go 构建.go build  rpc" />
-      <item itemvalue="Go 构建.go build api" />
       <item itemvalue="Go 构建.messageApi" />
+      <item itemvalue="Go 构建.messageApi_win" />
       <item itemvalue="Go 构建.messageRpc" />
-      <item itemvalue="Go 测试.bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_GroupNoticeGet/公告获取" />
-      <item itemvalue="Go 测试.bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_GroupNoticeUpdate/公告修改" />
-      <item itemvalue="Makefile 目标.genRpc" />
+      <item itemvalue="Go 构建.messageRpc_win" />
+      <item itemvalue="Go 测试.TestMessaggeService_SaveMessage/7、机器人给用户发送信息 in bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service" />
+      <item itemvalue="Go 测试.TestMessaggeService_UpdateReadById in bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service" />
+      <item itemvalue="Go 测试.Test_test1 in bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/test (1)" />
+      <item itemvalue="Go 测试.bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_ChatGroupAdd/群组新增" />
+      <item itemvalue="Go 测试.bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_EntPersonsList/企业列表" />
     </list>
     <recent_temporary>
       <list>
-        <item itemvalue="Go 构建.go build  rpc" />
-        <item itemvalue="Go 构建.go build api" />
-        <item itemvalue="Makefile 目标.genRpc" />
-        <item itemvalue="Go 测试.bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_GroupNoticeUpdate/公告修改" />
-        <item itemvalue="Go 测试.bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_GroupNoticeGet/公告获取" />
+        <item itemvalue="Go 测试.bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_ChatGroupAdd/群组新增" />
+        <item itemvalue="Go 测试.bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service 中的 TestChatGroupService_EntPersonsList/企业列表" />
+        <item itemvalue="Go 测试.Test_test1 in bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/test (1)" />
+        <item itemvalue="Go 测试.TestMessaggeService_UpdateReadById in bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service" />
+        <item itemvalue="Go 测试.TestMessaggeService_SaveMessage/7、机器人给用户发送信息 in bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/service" />
       </list>
     </recent_temporary>
   </component>
@@ -285,9 +248,9 @@
         </entry>
       </map>
     </option>
-    <option name="oldMeFiltersMigrated" value="true" />
   </component>
   <component name="VcsManagerConfiguration">
+    <MESSAGE value="封装方法" />
     <MESSAGE value="代码整合" />
     <MESSAGE value="用户列表修改" />
     <MESSAGE value="域名添加" />
@@ -301,26 +264,21 @@
     <MESSAGE value="系统消息保存" />
     <MESSAGE value="信息过滤" />
     <MESSAGE value="聊天提交" />
-    <MESSAGE value="提交" />
     <MESSAGE value="已读状态修改" />
-    <MESSAGE value="分支创建" />
-    <MESSAGE value="协议文件提交" />
-    <MESSAGE value="协议文件修改" />
-    <MESSAGE value="rpc更新提交" />
-    <MESSAGE value="协议文件出错修改" />
-    <MESSAGE value="api编码" />
-    <MESSAGE value="注释增加" />
-    <MESSAGE value="注释新增" />
-    <MESSAGE value="自测出现问题处理" />
-    <MESSAGE value="接口删除" />
-    <option name="LAST_COMMIT_MESSAGE" value="接口删除" />
+    <MESSAGE value="提交" />
+    <MESSAGE value="历史消息列表" />
+    <MESSAGE value="删除查询企业人员接口" />
+    <MESSAGE value="查看消息修改未读消息数量" />
+    <MESSAGE value="未读消息数量sql修改" />
+    <option name="LAST_COMMIT_MESSAGE" value="未读消息数量sql修改" />
   </component>
   <component name="VgoProject">
     <integration-enabled>true</integration-enabled>
     <environment>
       <map>
-        <entry key="GOPRIVATE" value="bp.jydev.jianyu360.cn,app.yhyue.com" />
-        <entry key="GOPROXY" value="https://goproxy.cn,https://goproxy.io,https://mirrors.aliyun.com/goproxy/,direct" />
+        <entry key="GOPRIVATE" value="https://app.yhyue.com" />
+        <entry key="GOPROXY" value="https://goproxy.io,direct" />
+        <entry key="GOSUMDB" value="off" />
       </map>
     </environment>
   </component>
@@ -328,14 +286,14 @@
     <breakpoint-manager>
       <breakpoints>
         <line-breakpoint enabled="true" type="DlvLineBreakpoint">
-          <url>file://$PROJECT_DIR$/service/chat_group.go</url>
-          <line>8</line>
-          <option name="timeStamp" value="59" />
+          <url>file://$PROJECT_DIR$/service/message_mail_box_test.go</url>
+          <line>55</line>
+          <option name="timeStamp" value="8" />
         </line-breakpoint>
         <line-breakpoint enabled="true" type="DlvLineBreakpoint">
-          <url>file://$PROJECT_DIR$/service/chat_group.go</url>
-          <line>7</line>
-          <option name="timeStamp" value="60" />
+          <url>file://$PROJECT_DIR$/service/message_mail_box_test.go</url>
+          <line>254</line>
+          <option name="timeStamp" value="9" />
         </line-breakpoint>
       </breakpoints>
       <default-breakpoints>

+ 1 - 0
api/messagecenter/internal/logic/findmessagelogic.go

@@ -38,6 +38,7 @@ func (l *FindMessageLogic) FindMessage(req *types.MessageReq) (*types.CommonRes,
 		NewUserId:   req.NewUserId,
 		Sort:        req.Sort,
 		ChatGroupId: req.ChatGroupId,
+		PositionId:  req.PositionId,
 	})
 	if err != nil {
 		return nil, err

+ 1 - 0
api/messagecenter/internal/types/types.go

@@ -58,6 +58,7 @@ type MessageReq struct {
 	EntId       int64  `header:"entId,optional"`
 	Sort        string `json:"sort,optional"`
 	ChatGroupId int64  `json:"chatGroupId,optional"`
+	PositionId  int64  `header:"positionId,optional"`
 }
 
 type CommonRes struct {

+ 1 - 0
api/messagecenter/messagecenter.api

@@ -53,6 +53,7 @@ type MessageReq {
 	EntId       int64  `header:"entId,optional"`
 	Sort        string `json:"sort,optional"`
 	ChatGroupId int64  `json:"chatGroupId,optional"`
+	PositionId  int64  `header:"positionId,optional"`
 }
 
 type CommonRes {

+ 0 - 31
rpc/messagecenter/internal/logic/chatgroupaddlogic.go

@@ -1,31 +0,0 @@
-package logic
-
-import (
-	"context"
-
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type ChatGroupAddLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewChatGroupAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ChatGroupAddLogic {
-	return &ChatGroupAddLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-// 群组新增
-func (l *ChatGroupAddLogic) ChatGroupAdd(in *messagecenter.ChatGroupAddReq) (*messagecenter.CommonReq, error) {
-	// todo: add your logic here and delete this line
-
-	return &messagecenter.CommonReq{}, nil
-}

+ 0 - 31
rpc/messagecenter/internal/logic/chatgroupjoinlogic.go

@@ -1,31 +0,0 @@
-package logic
-
-import (
-	"context"
-
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type ChatGroupJoinLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewChatGroupJoinLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ChatGroupJoinLogic {
-	return &ChatGroupJoinLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-// 加入群组
-func (l *ChatGroupJoinLogic) ChatGroupJoin(in *messagecenter.ChatGroupJoinReq) (*messagecenter.CommonReq, error) {
-	// todo: add your logic here and delete this line
-
-	return &messagecenter.CommonReq{}, nil
-}

+ 0 - 31
rpc/messagecenter/internal/logic/chatgrouplistlogic.go

@@ -1,31 +0,0 @@
-package logic
-
-import (
-	"context"
-
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type ChatGroupListLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewChatGroupListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ChatGroupListLogic {
-	return &ChatGroupListLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-// 群组列表查询
-func (l *ChatGroupListLogic) ChatGroupList(in *messagecenter.ChatGroupListReq) (*messagecenter.ChatGroupListResp, error) {
-	// todo: add your logic here and delete this line
-
-	return &messagecenter.ChatGroupListResp{}, nil
-}

+ 0 - 31
rpc/messagecenter/internal/logic/chatgrouppersonlogic.go

@@ -1,31 +0,0 @@
-package logic
-
-import (
-	"context"
-
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type ChatGroupPersonLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewChatGroupPersonLogic(ctx context.Context, svcCtx *svc.ServiceContext) *ChatGroupPersonLogic {
-	return &ChatGroupPersonLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-// 群组成员查询
-func (l *ChatGroupPersonLogic) ChatGroupPerson(in *messagecenter.ChatGroupPersonReq) (*messagecenter.ChatGroupPersonResp, error) {
-	// todo: add your logic here and delete this line
-
-	return &messagecenter.ChatGroupPersonResp{}, nil
-}

+ 1 - 1
rpc/messagecenter/internal/logic/countlogic.go

@@ -29,7 +29,7 @@ func NewCountLogic(ctx context.Context, svcCtx *svc.ServiceContext) *CountLogic
 func (l *CountLogic) Count(in *messagecenter.CountReq) (*messagecenter.CountResp, error) {
 	// todo: add your logic here and delete this line
 	m := service.MessaggeService{}
-	count, last, err := m.Count(in.NewUserId, in.UserType, in.EntUserId, false)
+	count, last, err := m.Count(in.NewUserId)
 	if err != nil {
 		return nil, err
 	}

+ 0 - 31
rpc/messagecenter/internal/logic/entpersonslistlogic.go

@@ -1,31 +0,0 @@
-package logic
-
-import (
-	"context"
-
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type EntPersonsListLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewEntPersonsListLogic(ctx context.Context, svcCtx *svc.ServiceContext) *EntPersonsListLogic {
-	return &EntPersonsListLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-// 通讯录 -企业人员列表
-func (l *EntPersonsListLogic) EntPersonsList(in *messagecenter.EntPersonsListReq) (*messagecenter.EntPersonListResp, error) {
-	// todo: add your logic here and delete this line
-
-	return &messagecenter.EntPersonListResp{}, nil
-}

+ 0 - 31
rpc/messagecenter/internal/logic/groupnameupdatelogic.go

@@ -1,31 +0,0 @@
-package logic
-
-import (
-	"context"
-
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type GroupNameUpdateLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewGroupNameUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GroupNameUpdateLogic {
-	return &GroupNameUpdateLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-// 群组名称修改
-func (l *GroupNameUpdateLogic) GroupNameUpdate(in *messagecenter.GroupNameUpdateReq) (*messagecenter.CommonReq, error) {
-	// todo: add your logic here and delete this line
-
-	return &messagecenter.CommonReq{}, nil
-}

+ 0 - 31
rpc/messagecenter/internal/logic/groupnoticeaddlogic.go

@@ -1,31 +0,0 @@
-package logic
-
-import (
-	"context"
-
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type GroupNoticeAddLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewGroupNoticeAddLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GroupNoticeAddLogic {
-	return &GroupNoticeAddLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-// 群任务新增
-func (l *GroupNoticeAddLogic) GroupNoticeAdd(in *messagecenter.GroupNoticeAddReq) (*messagecenter.CommonReq, error) {
-	// todo: add your logic here and delete this line
-
-	return &messagecenter.CommonReq{}, nil
-}

+ 0 - 31
rpc/messagecenter/internal/logic/groupnoticegetlogic.go

@@ -1,31 +0,0 @@
-package logic
-
-import (
-	"context"
-
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type GroupNoticeGetLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewGroupNoticeGetLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GroupNoticeGetLogic {
-	return &GroupNoticeGetLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-// 群任务详情
-func (l *GroupNoticeGetLogic) GroupNoticeGet(in *messagecenter.ChatGroupPersonReq) (*messagecenter.GroupNoticeGetResp, error) {
-	// todo: add your logic here and delete this line
-
-	return &messagecenter.GroupNoticeGetResp{}, nil
-}

+ 0 - 31
rpc/messagecenter/internal/logic/groupnoticeupdatelogic.go

@@ -1,31 +0,0 @@
-package logic
-
-import (
-	"context"
-
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/internal/svc"
-	"bp.jydev.jianyu360.cn/SocialPlatform/messageCenter/rpc/messagecenter/messagecenter"
-
-	"github.com/zeromicro/go-zero/core/logx"
-)
-
-type GroupNoticeUpdateLogic struct {
-	ctx    context.Context
-	svcCtx *svc.ServiceContext
-	logx.Logger
-}
-
-func NewGroupNoticeUpdateLogic(ctx context.Context, svcCtx *svc.ServiceContext) *GroupNoticeUpdateLogic {
-	return &GroupNoticeUpdateLogic{
-		ctx:    ctx,
-		svcCtx: svcCtx,
-		Logger: logx.WithContext(ctx),
-	}
-}
-
-// 群任务编辑
-func (l *GroupNoticeUpdateLogic) GroupNoticeUpdate(in *messagecenter.GroupNoticeUpdateReq) (*messagecenter.CommonReq, error) {
-	// todo: add your logic here and delete this line
-
-	return &messagecenter.CommonReq{}, nil
-}

+ 9 - 63
rpc/messagecenter/internal/server/messagecenterserver.go

@@ -22,37 +22,37 @@ func NewMessageCenterServer(svcCtx *svc.ServiceContext) *MessageCenterServer {
 	}
 }
 
-// 查询数量
+//  查询数量
 func (s *MessageCenterServer) Count(ctx context.Context, in *messagecenter.CountReq) (*messagecenter.CountResp, error) {
 	l := logic.NewCountLogic(ctx, s.svcCtx)
 	return l.Count(in)
 }
 
-// 用户列表查询
+//  用户列表查询
 func (s *MessageCenterServer) UserList(ctx context.Context, in *messagecenter.UserReq) (*messagecenter.UserResp, error) {
 	l := logic.NewUserListLogic(ctx, s.svcCtx)
 	return l.UserList(in)
 }
 
-// 聊天内容查询
+//  聊天内容查询
 func (s *MessageCenterServer) FindMessage(ctx context.Context, in *messagecenter.MessageReq) (*messagecenter.MessageResp, error) {
 	l := logic.NewFindMessageLogic(ctx, s.svcCtx)
 	return l.FindMessage(in)
 }
 
-// 聊天保存
+//  聊天保存
 func (s *MessageCenterServer) SaveMessage(ctx context.Context, in *messagecenter.MessageEntity) (*messagecenter.SaveMessageResp, error) {
 	l := logic.NewSaveMessageLogic(ctx, s.svcCtx)
 	return l.SaveMessage(in)
 }
 
-// 会话创建
+//  会话创建
 func (s *MessageCenterServer) CreateChatSession(ctx context.Context, in *messagecenter.ChatSessionReq) (*messagecenter.ChatSessionResp, error) {
 	l := logic.NewCreateChatSessionLogic(ctx, s.svcCtx)
 	return l.CreateChatSession(in)
 }
 
-// 会话关闭
+//  会话关闭
 func (s *MessageCenterServer) CloseChatSession(ctx context.Context, in *messagecenter.CloseSessionReq) (*messagecenter.ChatSessionResp, error) {
 	l := logic.NewCloseChatSessionLogic(ctx, s.svcCtx)
 	return l.CloseChatSession(in)
@@ -70,79 +70,25 @@ func (s *MessageCenterServer) UpdateReadById(ctx context.Context, in *messagecen
 	return l.UpdateReadById(in)
 }
 
-// 群组列表查询
-func (s *MessageCenterServer) ChatGroupList(ctx context.Context, in *messagecenter.ChatGroupListReq) (*messagecenter.ChatGroupListResp, error) {
-	l := logic.NewChatGroupListLogic(ctx, s.svcCtx)
-	return l.ChatGroupList(in)
-}
-
-// 群组新增
-func (s *MessageCenterServer) ChatGroupAdd(ctx context.Context, in *messagecenter.ChatGroupAddReq) (*messagecenter.CommonReq, error) {
-	l := logic.NewChatGroupAddLogic(ctx, s.svcCtx)
-	return l.ChatGroupAdd(in)
-}
-
-// 群组成员查询
-func (s *MessageCenterServer) ChatGroupPerson(ctx context.Context, in *messagecenter.ChatGroupPersonReq) (*messagecenter.ChatGroupPersonResp, error) {
-	l := logic.NewChatGroupPersonLogic(ctx, s.svcCtx)
-	return l.ChatGroupPerson(in)
-}
-
-// 加入群组
-func (s *MessageCenterServer) ChatGroupJoin(ctx context.Context, in *messagecenter.ChatGroupJoinReq) (*messagecenter.CommonReq, error) {
-	l := logic.NewChatGroupJoinLogic(ctx, s.svcCtx)
-	return l.ChatGroupJoin(in)
-}
-
-// 群组名称修改
-func (s *MessageCenterServer) GroupNameUpdate(ctx context.Context, in *messagecenter.GroupNameUpdateReq) (*messagecenter.CommonReq, error) {
-	l := logic.NewGroupNameUpdateLogic(ctx, s.svcCtx)
-	return l.GroupNameUpdate(in)
-}
-
-// 群任务新增
-func (s *MessageCenterServer) GroupNoticeAdd(ctx context.Context, in *messagecenter.GroupNoticeAddReq) (*messagecenter.CommonReq, error) {
-	l := logic.NewGroupNoticeAddLogic(ctx, s.svcCtx)
-	return l.GroupNoticeAdd(in)
-}
-
-// 群任务编辑
-func (s *MessageCenterServer) GroupNoticeUpdate(ctx context.Context, in *messagecenter.GroupNoticeUpdateReq) (*messagecenter.CommonReq, error) {
-	l := logic.NewGroupNoticeUpdateLogic(ctx, s.svcCtx)
-	return l.GroupNoticeUpdate(in)
-}
-
-// 群任务详情
-func (s *MessageCenterServer) GroupNoticeGet(ctx context.Context, in *messagecenter.ChatGroupPersonReq) (*messagecenter.GroupNoticeGetResp, error) {
-	l := logic.NewGroupNoticeGetLogic(ctx, s.svcCtx)
-	return l.GroupNoticeGet(in)
-}
-
-// 通讯录 -企业人员列表
-func (s *MessageCenterServer) EntPersonsList(ctx context.Context, in *messagecenter.EntPersonsListReq) (*messagecenter.EntPersonListResp, error) {
-	l := logic.NewEntPersonsListLogic(ctx, s.svcCtx)
-	return l.EntPersonsList(in)
-}
-
 // 用户撤回消息
 func (s *MessageCenterServer) WithdrawMessage(ctx context.Context, in *messagecenter.ReadWithdrawReq) (*messagecenter.CurrencyResp, error) {
 	l := logic.NewWithdrawMessageLogic(ctx, s.svcCtx)
 	return l.WithdrawMessage(in)
 }
 
-// 用户评价回复
+//  用户评价回复
 func (s *MessageCenterServer) AppraiseMessage(ctx context.Context, in *messagecenter.AppraiseReq) (*messagecenter.CurrencyResp, error) {
 	l := logic.NewAppraiseMessageLogic(ctx, s.svcCtx)
 	return l.AppraiseMessage(in)
 }
 
-// 客服列表查询
+//  客服列表查询
 func (s *MessageCenterServer) ConversationList(ctx context.Context, in *messagecenter.ConversationReq) (*messagecenter.UserResp, error) {
 	l := logic.NewConversationListLogic(ctx, s.svcCtx)
 	return l.ConversationList(in)
 }
 
-// 群聊
+//  群聊
 func (s *MessageCenterServer) GroupChat(ctx context.Context, in *messagecenter.MessageSaveReq) (*messagecenter.CommonReq, error) {
 	l := logic.NewGroupChatLogic(ctx, s.svcCtx)
 	return l.GroupChat(in)

+ 11 - 128
rpc/messagecenter/messagecenter.proto

@@ -57,13 +57,12 @@ message MessageReq {
   int64         LastId = 2;
   int64         pageSize = 3;
   int64         sendId = 4;
-  int64         newUserId = 5;
+  int64         newUserId = 5; //base_user  表id
   int64         entUserId = 7;
   int64         entId = 8;
-  int64         customerEntId = 9;
-  string        sort = 10;
-  int64         chatGroupId = 11;
-  int64         userId = 12; //base_user  表id
+  string        sort = 9;
+  int64         chatGroupId = 10;
+  int64         positionId = 11; //登录用户base_position id
 }
 message MessageResp {
   int64         count = 1;
@@ -155,111 +154,6 @@ message CurrencyResp {
   int64 error_code = 2; //响应代码
   string error_msg = 1; //响应消息
 }
-message ChatGroupListReq{
-  int64 entId = 1;
-  string userName = 2;
-  string groupName = 3;
-  int64 positionId = 4;
-  string appId = 5;
-}
-message ChatGroupListResp {
-  repeated      ChatGroupList data = 1;
-  int64         error_code = 2; //响应代码
-  string        error_msg = 3; //响应消息
-}
-message ChatGroupList {
-  string  groupName = 1;
-  int64   personCount = 2;
-  string  chatGroupId = 3;
-  string  appId = 4;
-}
-message ChatGroupAddReq {
-  int64  entId = 1;
-  int64   positionId = 2;
-  repeated int64 userIdArr = 3;
-  string  appId = 4;
-}
-message CommonReq {
-  bool          status = 1;
-  int64         error_code = 2; //响应代码
-  string        error_msg = 3; //响应消息
-}
-message ChatGroupPersonReq{
-  int64 chatGroupId = 1;
-  int64 ent_id = 2;
-  string  appId = 3;
-}
-message ChatGroupPersonResp{
-  map<string, ChatGroupPersonList> data = 1;//地区
-  int64         error_code = 2; //响应代码
-  string        error_msg = 3; //响应消息
-}
-
-message ChatGroupPersonList{
-  repeated      ChatGroupPerson data = 1;
-}
-message ChatGroupPerson{
-  string   personName = 1;
-  bool     isSystem = 2;
-  string   appId = 3;
-  string   positionId = 4;
-}
-message ChatGroupJoinReq{
-  int64 chatGroupId = 1;
-  int64 positionId = 2;
-  repeated int64 userIdArr = 3;
-  string  appId = 4;
-}
-message GroupNameUpdateReq{
-  int64  chatGroupId = 1;
-  int64  positionId = 2;
-  string groupName = 3;
-  string  appId = 4;
-}
-message GroupNoticeAddReq{
-  int64 chatGroupId = 1;
-  string content = 2;
-  string  appId = 3;
-}
-message GroupNoticeUpdateReq{
-  int64 groupNoticeId = 1;
-  string content = 2;
-  string appId = 3;
-}
-message GroupNoticeGetResp{
-  GroupNotice        data = 1;
-  int64         error_code = 2; //响应代码
-  string        error_msg = 3; //响应消息
-}
-message  GroupNotice{
-  string content = 1;
-  string  groupNoticeId = 2;
-}
-//企业人员列表、拉人进群列表
-message EntPersonsListReq{
-  string name =1;
-  int64 entId = 2;
-  int64 GroupId = 3;
-}
-message PersonInfo{
-  int64 id = 1;
-  string personName = 2;
-  string phone = 3;
-  string email = 4;
-  int64 positionId = 5;
-}
-message departmentsInfo{
-  int64 id = 1;
-  string departmentName = 2;
-  repeated PersonInfo persons = 3;//部门下的人
-}
-message EntPersonListResp{
-  int64         error_code = 1; //响应代码
-  string        error_msg = 2; //响应消息
-  repeated departmentsInfo data = 3; //返回数据
-  string entName = 4;
-}
-
 message ConversationReq {
   int64     entId = 1;
   int64     newUserId = 2;  //用户标识
@@ -280,6 +174,13 @@ message MessageSaveReq {
   int64 messageType =9;//1:文本 2:链接 3:图片 4:附件
   string link =10; //链接
 }
+
+message CommonReq {
+  bool          status = 1;
+  int64         error_code = 2; //响应代码
+  string        error_msg = 3; //响应消息
+}
+
 service messageCenter {
   // 查询数量
   rpc Count(CountReq) returns(CountResp);
@@ -297,24 +198,6 @@ service messageCenter {
   rpc SaveAutoReplyMsg(SaveAutoReplyReq)returns(MessageResp);
   //根据消息修改已读状态
   rpc UpdateReadById(ReadStateReq)returns(CurrencyResp);
-  //群组列表查询
-  rpc ChatGroupList(ChatGroupListReq)returns(ChatGroupListResp);
-  //群组新增
-  rpc ChatGroupAdd(ChatGroupAddReq)returns(CommonReq);
-  //群组成员查询
-  rpc ChatGroupPerson(ChatGroupPersonReq)returns(ChatGroupPersonResp);
-  //加入群组
-  rpc ChatGroupJoin(ChatGroupJoinReq)returns(CommonReq);
-  //群组名称修改
-  rpc GroupNameUpdate(GroupNameUpdateReq)returns(CommonReq);
-  //群任务新增
-  rpc GroupNoticeAdd(GroupNoticeAddReq)returns(CommonReq);
-  //群任务编辑
-  rpc GroupNoticeUpdate(GroupNoticeUpdateReq)returns(CommonReq);
-  //群任务详情
-  rpc GroupNoticeGet(ChatGroupPersonReq)returns(GroupNoticeGetResp);
-  //通讯录 -企业人员列表
-  rpc EntPersonsList(EntPersonsListReq) returns(EntPersonListResp);
   //用户撤回消息
   rpc WithdrawMessage(ReadWithdrawReq)returns(CurrencyResp);
   // 用户评价回复

+ 9 - 81
rpc/messagecenter/messagecenter/messagecenter.go

@@ -28,24 +28,6 @@ type (
 		SaveAutoReplyMsg(ctx context.Context, in *SaveAutoReplyReq, opts ...grpc.CallOption) (*MessageResp, error)
 		// 根据消息修改已读状态
 		UpdateReadById(ctx context.Context, in *ReadStateReq, opts ...grpc.CallOption) (*CurrencyResp, error)
-		// 群组列表查询
-		ChatGroupList(ctx context.Context, in *ChatGroupListReq, opts ...grpc.CallOption) (*ChatGroupListResp, error)
-		// 群组新增
-		ChatGroupAdd(ctx context.Context, in *ChatGroupAddReq, opts ...grpc.CallOption) (*CommonReq, error)
-		// 群组成员查询
-		ChatGroupPerson(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*ChatGroupPersonResp, error)
-		// 加入群组
-		ChatGroupJoin(ctx context.Context, in *ChatGroupJoinReq, opts ...grpc.CallOption) (*CommonReq, error)
-		// 群组名称修改
-		GroupNameUpdate(ctx context.Context, in *GroupNameUpdateReq, opts ...grpc.CallOption) (*CommonReq, error)
-		// 群任务新增
-		GroupNoticeAdd(ctx context.Context, in *GroupNoticeAddReq, opts ...grpc.CallOption) (*CommonReq, error)
-		// 群任务编辑
-		GroupNoticeUpdate(ctx context.Context, in *GroupNoticeUpdateReq, opts ...grpc.CallOption) (*CommonReq, error)
-		// 群任务详情
-		GroupNoticeGet(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*GroupNoticeGetResp, error)
-		// 通讯录 -企业人员列表
-		EntPersonsList(ctx context.Context, in *EntPersonsListReq, opts ...grpc.CallOption) (*EntPersonListResp, error)
 		// 用户撤回消息
 		WithdrawMessage(ctx context.Context, in *ReadWithdrawReq, opts ...grpc.CallOption) (*CurrencyResp, error)
 		//  用户评价回复
@@ -67,37 +49,37 @@ func NewMessageCenter(cli zrpc.Client) MessageCenter {
 	}
 }
 
-// 查询数量
+//  查询数量
 func (m *defaultMessageCenter) Count(ctx context.Context, in *CountReq, opts ...grpc.CallOption) (*CountResp, error) {
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.Count(ctx, in, opts...)
 }
 
-// 用户列表查询
+//  用户列表查询
 func (m *defaultMessageCenter) UserList(ctx context.Context, in *UserReq, opts ...grpc.CallOption) (*UserResp, error) {
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.UserList(ctx, in, opts...)
 }
 
-// 聊天内容查询
+//  聊天内容查询
 func (m *defaultMessageCenter) FindMessage(ctx context.Context, in *MessageReq, opts ...grpc.CallOption) (*MessageResp, error) {
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.FindMessage(ctx, in, opts...)
 }
 
-// 聊天保存
+//  聊天保存
 func (m *defaultMessageCenter) SaveMessage(ctx context.Context, in *MessageEntity, opts ...grpc.CallOption) (*SaveMessageResp, error) {
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.SaveMessage(ctx, in, opts...)
 }
 
-// 会话创建
+//  会话创建
 func (m *defaultMessageCenter) CreateChatSession(ctx context.Context, in *ChatSessionReq, opts ...grpc.CallOption) (*ChatSessionResp, error) {
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.CreateChatSession(ctx, in, opts...)
 }
 
-// 会话关闭
+//  会话关闭
 func (m *defaultMessageCenter) CloseChatSession(ctx context.Context, in *CloseSessionReq, opts ...grpc.CallOption) (*ChatSessionResp, error) {
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.CloseChatSession(ctx, in, opts...)
@@ -115,79 +97,25 @@ func (m *defaultMessageCenter) UpdateReadById(ctx context.Context, in *ReadState
 	return client.UpdateReadById(ctx, in, opts...)
 }
 
-// 群组列表查询
-func (m *defaultMessageCenter) ChatGroupList(ctx context.Context, in *ChatGroupListReq, opts ...grpc.CallOption) (*ChatGroupListResp, error) {
-	client := NewMessageCenterClient(m.cli.Conn())
-	return client.ChatGroupList(ctx, in, opts...)
-}
-
-// 群组新增
-func (m *defaultMessageCenter) ChatGroupAdd(ctx context.Context, in *ChatGroupAddReq, opts ...grpc.CallOption) (*CommonReq, error) {
-	client := NewMessageCenterClient(m.cli.Conn())
-	return client.ChatGroupAdd(ctx, in, opts...)
-}
-
-// 群组成员查询
-func (m *defaultMessageCenter) ChatGroupPerson(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*ChatGroupPersonResp, error) {
-	client := NewMessageCenterClient(m.cli.Conn())
-	return client.ChatGroupPerson(ctx, in, opts...)
-}
-
-// 加入群组
-func (m *defaultMessageCenter) ChatGroupJoin(ctx context.Context, in *ChatGroupJoinReq, opts ...grpc.CallOption) (*CommonReq, error) {
-	client := NewMessageCenterClient(m.cli.Conn())
-	return client.ChatGroupJoin(ctx, in, opts...)
-}
-
-// 群组名称修改
-func (m *defaultMessageCenter) GroupNameUpdate(ctx context.Context, in *GroupNameUpdateReq, opts ...grpc.CallOption) (*CommonReq, error) {
-	client := NewMessageCenterClient(m.cli.Conn())
-	return client.GroupNameUpdate(ctx, in, opts...)
-}
-
-// 群任务新增
-func (m *defaultMessageCenter) GroupNoticeAdd(ctx context.Context, in *GroupNoticeAddReq, opts ...grpc.CallOption) (*CommonReq, error) {
-	client := NewMessageCenterClient(m.cli.Conn())
-	return client.GroupNoticeAdd(ctx, in, opts...)
-}
-
-// 群任务编辑
-func (m *defaultMessageCenter) GroupNoticeUpdate(ctx context.Context, in *GroupNoticeUpdateReq, opts ...grpc.CallOption) (*CommonReq, error) {
-	client := NewMessageCenterClient(m.cli.Conn())
-	return client.GroupNoticeUpdate(ctx, in, opts...)
-}
-
-// 群任务详情
-func (m *defaultMessageCenter) GroupNoticeGet(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*GroupNoticeGetResp, error) {
-	client := NewMessageCenterClient(m.cli.Conn())
-	return client.GroupNoticeGet(ctx, in, opts...)
-}
-
-// 通讯录 -企业人员列表
-func (m *defaultMessageCenter) EntPersonsList(ctx context.Context, in *EntPersonsListReq, opts ...grpc.CallOption) (*EntPersonListResp, error) {
-	client := NewMessageCenterClient(m.cli.Conn())
-	return client.EntPersonsList(ctx, in, opts...)
-}
-
 // 用户撤回消息
 func (m *defaultMessageCenter) WithdrawMessage(ctx context.Context, in *ReadWithdrawReq, opts ...grpc.CallOption) (*CurrencyResp, error) {
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.WithdrawMessage(ctx, in, opts...)
 }
 
-// 用户评价回复
+//  用户评价回复
 func (m *defaultMessageCenter) AppraiseMessage(ctx context.Context, in *AppraiseReq, opts ...grpc.CallOption) (*CurrencyResp, error) {
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.AppraiseMessage(ctx, in, opts...)
 }
 
-// 客服列表查询
+//  客服列表查询
 func (m *defaultMessageCenter) ConversationList(ctx context.Context, in *ConversationReq, opts ...grpc.CallOption) (*UserResp, error) {
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.ConversationList(ctx, in, opts...)
 }
 
-// 群聊
+//  群聊
 func (m *defaultMessageCenter) GroupChat(ctx context.Context, in *MessageSaveReq, opts ...grpc.CallOption) (*CommonReq, error) {
 	client := NewMessageCenterClient(m.cli.Conn())
 	return client.GroupChat(ctx, in, opts...)

文件差異過大導致無法顯示
+ 85 - 1284
rpc/messagecenter/messagecenter/messagecenter.pb.go


+ 6 - 348
rpc/messagecenter/messagecenter/messagecenter_grpc.pb.go

@@ -34,29 +34,11 @@ type MessageCenterClient interface {
 	CreateChatSession(ctx context.Context, in *ChatSessionReq, opts ...grpc.CallOption) (*ChatSessionResp, error)
 	// 会话关闭
 	CloseChatSession(ctx context.Context, in *CloseSessionReq, opts ...grpc.CallOption) (*ChatSessionResp, error)
-	// 创建会话并且保存信息
+	//创建会话并且保存信息
 	SaveAutoReplyMsg(ctx context.Context, in *SaveAutoReplyReq, opts ...grpc.CallOption) (*MessageResp, error)
-	// 根据消息修改已读状态
+	//根据消息修改已读状态
 	UpdateReadById(ctx context.Context, in *ReadStateReq, opts ...grpc.CallOption) (*CurrencyResp, error)
-	// 群组列表查询
-	ChatGroupList(ctx context.Context, in *ChatGroupListReq, opts ...grpc.CallOption) (*ChatGroupListResp, error)
-	// 群组新增
-	ChatGroupAdd(ctx context.Context, in *ChatGroupAddReq, opts ...grpc.CallOption) (*CommonReq, error)
-	// 群组成员查询
-	ChatGroupPerson(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*ChatGroupPersonResp, error)
-	// 加入群组
-	ChatGroupJoin(ctx context.Context, in *ChatGroupJoinReq, opts ...grpc.CallOption) (*CommonReq, error)
-	// 群组名称修改
-	GroupNameUpdate(ctx context.Context, in *GroupNameUpdateReq, opts ...grpc.CallOption) (*CommonReq, error)
-	// 群任务新增
-	GroupNoticeAdd(ctx context.Context, in *GroupNoticeAddReq, opts ...grpc.CallOption) (*CommonReq, error)
-	// 群任务编辑
-	GroupNoticeUpdate(ctx context.Context, in *GroupNoticeUpdateReq, opts ...grpc.CallOption) (*CommonReq, error)
-	// 群任务详情
-	GroupNoticeGet(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*GroupNoticeGetResp, error)
-	// 通讯录 -企业人员列表
-	EntPersonsList(ctx context.Context, in *EntPersonsListReq, opts ...grpc.CallOption) (*EntPersonListResp, error)
-	// 用户撤回消息
+	//用户撤回消息
 	WithdrawMessage(ctx context.Context, in *ReadWithdrawReq, opts ...grpc.CallOption) (*CurrencyResp, error)
 	// 用户评价回复
 	AppraiseMessage(ctx context.Context, in *AppraiseReq, opts ...grpc.CallOption) (*CurrencyResp, error)
@@ -146,87 +128,6 @@ func (c *messageCenterClient) UpdateReadById(ctx context.Context, in *ReadStateR
 	return out, nil
 }
 
-func (c *messageCenterClient) ChatGroupList(ctx context.Context, in *ChatGroupListReq, opts ...grpc.CallOption) (*ChatGroupListResp, error) {
-	out := new(ChatGroupListResp)
-	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/ChatGroupList", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *messageCenterClient) ChatGroupAdd(ctx context.Context, in *ChatGroupAddReq, opts ...grpc.CallOption) (*CommonReq, error) {
-	out := new(CommonReq)
-	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/ChatGroupAdd", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *messageCenterClient) ChatGroupPerson(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*ChatGroupPersonResp, error) {
-	out := new(ChatGroupPersonResp)
-	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/ChatGroupPerson", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *messageCenterClient) ChatGroupJoin(ctx context.Context, in *ChatGroupJoinReq, opts ...grpc.CallOption) (*CommonReq, error) {
-	out := new(CommonReq)
-	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/ChatGroupJoin", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *messageCenterClient) GroupNameUpdate(ctx context.Context, in *GroupNameUpdateReq, opts ...grpc.CallOption) (*CommonReq, error) {
-	out := new(CommonReq)
-	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/GroupNameUpdate", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *messageCenterClient) GroupNoticeAdd(ctx context.Context, in *GroupNoticeAddReq, opts ...grpc.CallOption) (*CommonReq, error) {
-	out := new(CommonReq)
-	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/GroupNoticeAdd", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *messageCenterClient) GroupNoticeUpdate(ctx context.Context, in *GroupNoticeUpdateReq, opts ...grpc.CallOption) (*CommonReq, error) {
-	out := new(CommonReq)
-	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/GroupNoticeUpdate", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *messageCenterClient) GroupNoticeGet(ctx context.Context, in *ChatGroupPersonReq, opts ...grpc.CallOption) (*GroupNoticeGetResp, error) {
-	out := new(GroupNoticeGetResp)
-	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/GroupNoticeGet", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
-func (c *messageCenterClient) EntPersonsList(ctx context.Context, in *EntPersonsListReq, opts ...grpc.CallOption) (*EntPersonListResp, error) {
-	out := new(EntPersonListResp)
-	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/EntPersonsList", in, out, opts...)
-	if err != nil {
-		return nil, err
-	}
-	return out, nil
-}
-
 func (c *messageCenterClient) WithdrawMessage(ctx context.Context, in *ReadWithdrawReq, opts ...grpc.CallOption) (*CurrencyResp, error) {
 	out := new(CurrencyResp)
 	err := c.cc.Invoke(ctx, "/messagecenter.messageCenter/WithdrawMessage", in, out, opts...)
@@ -279,29 +180,11 @@ type MessageCenterServer interface {
 	CreateChatSession(context.Context, *ChatSessionReq) (*ChatSessionResp, error)
 	// 会话关闭
 	CloseChatSession(context.Context, *CloseSessionReq) (*ChatSessionResp, error)
-	// 创建会话并且保存信息
+	//创建会话并且保存信息
 	SaveAutoReplyMsg(context.Context, *SaveAutoReplyReq) (*MessageResp, error)
-	// 根据消息修改已读状态
+	//根据消息修改已读状态
 	UpdateReadById(context.Context, *ReadStateReq) (*CurrencyResp, error)
-	// 群组列表查询
-	ChatGroupList(context.Context, *ChatGroupListReq) (*ChatGroupListResp, error)
-	// 群组新增
-	ChatGroupAdd(context.Context, *ChatGroupAddReq) (*CommonReq, error)
-	// 群组成员查询
-	ChatGroupPerson(context.Context, *ChatGroupPersonReq) (*ChatGroupPersonResp, error)
-	// 加入群组
-	ChatGroupJoin(context.Context, *ChatGroupJoinReq) (*CommonReq, error)
-	// 群组名称修改
-	GroupNameUpdate(context.Context, *GroupNameUpdateReq) (*CommonReq, error)
-	// 群任务新增
-	GroupNoticeAdd(context.Context, *GroupNoticeAddReq) (*CommonReq, error)
-	// 群任务编辑
-	GroupNoticeUpdate(context.Context, *GroupNoticeUpdateReq) (*CommonReq, error)
-	// 群任务详情
-	GroupNoticeGet(context.Context, *ChatGroupPersonReq) (*GroupNoticeGetResp, error)
-	// 通讯录 -企业人员列表
-	EntPersonsList(context.Context, *EntPersonsListReq) (*EntPersonListResp, error)
-	// 用户撤回消息
+	//用户撤回消息
 	WithdrawMessage(context.Context, *ReadWithdrawReq) (*CurrencyResp, error)
 	// 用户评价回复
 	AppraiseMessage(context.Context, *AppraiseReq) (*CurrencyResp, error)
@@ -340,33 +223,6 @@ func (UnimplementedMessageCenterServer) SaveAutoReplyMsg(context.Context, *SaveA
 func (UnimplementedMessageCenterServer) UpdateReadById(context.Context, *ReadStateReq) (*CurrencyResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method UpdateReadById not implemented")
 }
-func (UnimplementedMessageCenterServer) ChatGroupList(context.Context, *ChatGroupListReq) (*ChatGroupListResp, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method ChatGroupList not implemented")
-}
-func (UnimplementedMessageCenterServer) ChatGroupAdd(context.Context, *ChatGroupAddReq) (*CommonReq, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method ChatGroupAdd not implemented")
-}
-func (UnimplementedMessageCenterServer) ChatGroupPerson(context.Context, *ChatGroupPersonReq) (*ChatGroupPersonResp, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method ChatGroupPerson not implemented")
-}
-func (UnimplementedMessageCenterServer) ChatGroupJoin(context.Context, *ChatGroupJoinReq) (*CommonReq, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method ChatGroupJoin not implemented")
-}
-func (UnimplementedMessageCenterServer) GroupNameUpdate(context.Context, *GroupNameUpdateReq) (*CommonReq, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GroupNameUpdate not implemented")
-}
-func (UnimplementedMessageCenterServer) GroupNoticeAdd(context.Context, *GroupNoticeAddReq) (*CommonReq, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GroupNoticeAdd not implemented")
-}
-func (UnimplementedMessageCenterServer) GroupNoticeUpdate(context.Context, *GroupNoticeUpdateReq) (*CommonReq, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GroupNoticeUpdate not implemented")
-}
-func (UnimplementedMessageCenterServer) GroupNoticeGet(context.Context, *ChatGroupPersonReq) (*GroupNoticeGetResp, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method GroupNoticeGet not implemented")
-}
-func (UnimplementedMessageCenterServer) EntPersonsList(context.Context, *EntPersonsListReq) (*EntPersonListResp, error) {
-	return nil, status.Errorf(codes.Unimplemented, "method EntPersonsList not implemented")
-}
 func (UnimplementedMessageCenterServer) WithdrawMessage(context.Context, *ReadWithdrawReq) (*CurrencyResp, error) {
 	return nil, status.Errorf(codes.Unimplemented, "method WithdrawMessage not implemented")
 }
@@ -536,168 +392,6 @@ func _MessageCenter_UpdateReadById_Handler(srv interface{}, ctx context.Context,
 	return interceptor(ctx, in, info, handler)
 }
 
-func _MessageCenter_ChatGroupList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(ChatGroupListReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(MessageCenterServer).ChatGroupList(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/messagecenter.messageCenter/ChatGroupList",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(MessageCenterServer).ChatGroupList(ctx, req.(*ChatGroupListReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _MessageCenter_ChatGroupAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(ChatGroupAddReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(MessageCenterServer).ChatGroupAdd(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/messagecenter.messageCenter/ChatGroupAdd",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(MessageCenterServer).ChatGroupAdd(ctx, req.(*ChatGroupAddReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _MessageCenter_ChatGroupPerson_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(ChatGroupPersonReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(MessageCenterServer).ChatGroupPerson(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/messagecenter.messageCenter/ChatGroupPerson",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(MessageCenterServer).ChatGroupPerson(ctx, req.(*ChatGroupPersonReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _MessageCenter_ChatGroupJoin_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(ChatGroupJoinReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(MessageCenterServer).ChatGroupJoin(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/messagecenter.messageCenter/ChatGroupJoin",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(MessageCenterServer).ChatGroupJoin(ctx, req.(*ChatGroupJoinReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _MessageCenter_GroupNameUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(GroupNameUpdateReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(MessageCenterServer).GroupNameUpdate(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/messagecenter.messageCenter/GroupNameUpdate",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(MessageCenterServer).GroupNameUpdate(ctx, req.(*GroupNameUpdateReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _MessageCenter_GroupNoticeAdd_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(GroupNoticeAddReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(MessageCenterServer).GroupNoticeAdd(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/messagecenter.messageCenter/GroupNoticeAdd",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(MessageCenterServer).GroupNoticeAdd(ctx, req.(*GroupNoticeAddReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _MessageCenter_GroupNoticeUpdate_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(GroupNoticeUpdateReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(MessageCenterServer).GroupNoticeUpdate(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/messagecenter.messageCenter/GroupNoticeUpdate",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(MessageCenterServer).GroupNoticeUpdate(ctx, req.(*GroupNoticeUpdateReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _MessageCenter_GroupNoticeGet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(ChatGroupPersonReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(MessageCenterServer).GroupNoticeGet(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/messagecenter.messageCenter/GroupNoticeGet",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(MessageCenterServer).GroupNoticeGet(ctx, req.(*ChatGroupPersonReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
-func _MessageCenter_EntPersonsList_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
-	in := new(EntPersonsListReq)
-	if err := dec(in); err != nil {
-		return nil, err
-	}
-	if interceptor == nil {
-		return srv.(MessageCenterServer).EntPersonsList(ctx, in)
-	}
-	info := &grpc.UnaryServerInfo{
-		Server:     srv,
-		FullMethod: "/messagecenter.messageCenter/EntPersonsList",
-	}
-	handler := func(ctx context.Context, req interface{}) (interface{}, error) {
-		return srv.(MessageCenterServer).EntPersonsList(ctx, req.(*EntPersonsListReq))
-	}
-	return interceptor(ctx, in, info, handler)
-}
-
 func _MessageCenter_WithdrawMessage_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) {
 	in := new(ReadWithdrawReq)
 	if err := dec(in); err != nil {
@@ -809,42 +503,6 @@ var MessageCenter_ServiceDesc = grpc.ServiceDesc{
 			MethodName: "UpdateReadById",
 			Handler:    _MessageCenter_UpdateReadById_Handler,
 		},
-		{
-			MethodName: "ChatGroupList",
-			Handler:    _MessageCenter_ChatGroupList_Handler,
-		},
-		{
-			MethodName: "ChatGroupAdd",
-			Handler:    _MessageCenter_ChatGroupAdd_Handler,
-		},
-		{
-			MethodName: "ChatGroupPerson",
-			Handler:    _MessageCenter_ChatGroupPerson_Handler,
-		},
-		{
-			MethodName: "ChatGroupJoin",
-			Handler:    _MessageCenter_ChatGroupJoin_Handler,
-		},
-		{
-			MethodName: "GroupNameUpdate",
-			Handler:    _MessageCenter_GroupNameUpdate_Handler,
-		},
-		{
-			MethodName: "GroupNoticeAdd",
-			Handler:    _MessageCenter_GroupNoticeAdd_Handler,
-		},
-		{
-			MethodName: "GroupNoticeUpdate",
-			Handler:    _MessageCenter_GroupNoticeUpdate_Handler,
-		},
-		{
-			MethodName: "GroupNoticeGet",
-			Handler:    _MessageCenter_GroupNoticeGet_Handler,
-		},
-		{
-			MethodName: "EntPersonsList",
-			Handler:    _MessageCenter_EntPersonsList_Handler,
-		},
 		{
 			MethodName: "WithdrawMessage",
 			Handler:    _MessageCenter_WithdrawMessage_Handler,

+ 80 - 58
service/message_mail_box.go

@@ -22,56 +22,76 @@ type MessaggeService struct{}
 
 var rwLock = new(sync.RWMutex)
 
-// 未读消息查询
-func (b MessaggeService) Count(newUserId, userType, entUserId int64, isClean bool) (count int, last map[string]interface{}, err error) {
-	log.Printf("用户id:%d,userType:%d,entUserId:%d,isClean:%v", newUserId, userType, entUserId, isClean)
-	v := make([]interface{}, 0)
-	sqlStr := ""
+// Count 未读消息查询
+func (b MessaggeService) Count(newUserId int64) (count int, last map[string]interface{}, err error) {
+	//导航右上角未读消息总量  1v1聊天+群组消息+客服消息
+	//v := make([]interface{}, 0)
+	var (
+		allSql string
+		sqlArr []string
+	)
+	//一对一
+	oneSql := fmt.Sprintf(`(SELECT
+							a.your_position_id AS id,
+							1 AS userType,
+							c.nickname AS name,
+							c.headimg,
+							d.content,
+							d.type 
+							d.create_time,
+							a.unread as number,
+						    a.timestamp
+						FROM
+							socialize_summary a
+							INNER JOIN base_position b ON ( a.my_position_id = %d AND a.unread > 0 AND a.your_position_id = b.id )
+							INNER JOIN base_user c ON ( b.user_id = c.id )
+							LEFT JOIN socialize_message d ON ( a.message_id = d.id ))`, newUserId)
+	//客服列表
+	serviceSql := fmt.Sprintf(` (
+						SELECT
+							a.ent_id AS id,
+							2 AS userType,
+							b.nickname AS name,
+							b.headimage as headimg,
+							c.content,
+							c.type,
+							c.create_time,
+							a.unread as number,
+							a.timestamp
+						FROM
+							socialize_summary a
+							INNER JOIN socialize_tenant_robot b ON ( a.user_id = %d AND a.unread > 0 AND a.ent_id = b.ent_id  )
+							LEFT JOIN socialize_message c ON ( a.message_id = c.id ) 
+						) `, newUserId)
+	//群列表
+	groupSql := fmt.Sprintf(` (
+						SELECT
+							b.id,
+							3 AS userType,
+							b.name,
+							'' AS headimg,
+							d.content,
+							d.type,
+							d.create_time,
+							a.unread as number,
+							c.timestamp
+						FROM
+							socialize_chat_group_person a
+							INNER JOIN socialize_chat_group b ON ( a.position_id = %d AND a.unread > 0 AND a.chat_group_id = b.id AND b.isdismiss = 0)
+							INNER JOIN socialize_summary c ON ( b.id = c.chat_group_id )
+							LEFT JOIN socialize_message d ON ( c.message_id = d.id ) 
+						) `, newUserId)
 
-	pc_a, err := util.GetData(userType, newUserId)
-	if err == nil && pc_a != nil {
-		if !isClean {
-			return pc_a.Count, pc_a.Data, err
-		}
-	}
-	sqlStr = fmt.Sprintf("select  count(b.id) from    %s  b "+
-		"where   b.send_user_id != %d    "+
-		"AND   b.own_id=%d "+
-		"AND b.iswithdraw = 0  "+
-		"AND  b.isread=0 "+
-		"AND own_type = 2 "+
-		"order by create_time", util.SOCIALIZE_MESSAGE_MAILBOX, newUserId, newUserId)
+	allSql = strings.Join(append(sqlArr, oneSql, groupSql, serviceSql), " union ")
 
-	log.Println(sqlStr, v)
-	rs := IC.BaseMysql.CountBySql(sqlStr, v...)
-	log.Println(rs)
-	count = int(rs)
-	//最后一条信息查询
-	sqlStr = fmt.Sprintf("SELECT  c.* FROM %s  b   "+
-		"LEFT join %s c on  b.messag_id=c.id "+
-		"WHERE  b.send_user_id != %d   "+
-		"AND b.own_id = %d "+
-		"AND b.iswithdraw = 0  "+
-		"AND   b.isread=0  "+
-		"AND own_type = 2  "+
-		"ORDER BY  create_time DESC   "+
-		"LIMIT 0,1", util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_MESSAGE,
-		newUserId, newUserId)
-	lastData := IC.BaseMysql.SelectBySql(sqlStr)
-	if len(*lastData) > 0 {
-		last = (*lastData)[0]
-		if userType == 1 {
-			util.SetData(userType, entUserId, map[string]interface{}{"data": last, "count": count}, IC.SurvivalTime)
-		} else {
-			util.SetData(userType, newUserId, map[string]interface{}{"data": last, "count": count}, IC.SurvivalTime)
-		}
-	} else {
-		if userType == 1 {
-			util.SetData(userType, entUserId, map[string]interface{}{"data": map[string]interface{}{}, "count": count}, IC.SurvivalTime)
-		} else {
-			util.SetData(userType, newUserId, map[string]interface{}{"data": map[string]interface{}{}, "count": count}, IC.SurvivalTime)
-		}
-	}
+	sqlStr := fmt.Sprintf(`SELECT * FROM
+					(
+						%s
+					) a 
+				a.ORDER BY a.timestamp DESC`, allSql)
+	log.Println("查询sql", sqlStr)
+	data := IC.BaseMysql.SelectBySql(sqlStr)
+	log.Println("查询数据:", data)
 	return
 }
 
@@ -177,8 +197,7 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 		case 2: //历史会话列表
 			allSql = strings.Join(append(sqlArr, oneSql, groupSql, serviceSql), " UNION ALL ")
 		}
-		sqlStr = fmt.Sprintf(`SELECT * FROM
-					(
+		sqlStr = fmt.Sprintf(`SELECT * FROM(
 						%s
 					) a LIMIT 0,500
 				a.ORDER BY a.timestamp DESC`, allSql)
@@ -295,11 +314,14 @@ func (b MessaggeService) UserList(in *messagecenter.UserReq) (data *[]map[string
 					} else if quitl.IntAll(v["userType"]) == 3 {
 						var names []string
 						if quitl.InterfaceToStr(v["groupMember"]) != "" {
-							for i, id := range strings.Split(quitl.InterfaceToStr(v["groupMember"]), ",") {
-								if i > 4 {
+							for _, id := range strings.Split(quitl.InterfaceToStr(v["groupMember"]), ",") {
+								if len(names) > 4 {
 									break
 								}
-								names = append(names, positionMap[quitl.IntAll(id)])
+								//防止匹配的是群名称 去除不匹配的群成员
+								if strings.Contains(positionMap[quitl.IntAll(id)], in.NameSearch) {
+									names = append(names, positionMap[quitl.IntAll(id)])
+								}
 							}
 						}
 						v["groupMember"] = names
@@ -634,12 +656,12 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
 			"LEFT  JOIN  %s c on  c.id=a.send_user_id   "+
 			"LEFT JOIN  %s d on  d.id=a.receive_user_id  "+
 			"where  a.own_id=  %d and a.iswithdraw = 0"+
-			"AND ((a.send_user_id=   %d AND   a.receive_user_id=   %d) or (a.send_user_id=  %d AND  a.receive_user_id=  %d)) "+
+			"AND ((a.send_user_id= %d AND   a.receive_user_id=   %d) or (a.send_user_id=  %d AND  a.receive_user_id=  %d)) "+
 			"AND  a.type=2  %s "+
 			"ORDER BY a.create_time desc,a.id   asc "+
 			"limit 0 ,  %d ",
 			util.SOCIALIZE_MESSAGE_MAILBOX, util.SOCIALIZE_MESSAGE, util.BASE_USER, util.BASE_USER,
-			in.NewUserId, in.NewUserId, in.SendId, in.SendId, in.NewUserId, lastStr, in.PageSize)
+			in.PositionId, in.PositionId, in.SendId, in.SendId, in.PositionId, lastStr, in.PageSize)
 		break
 	case 3: //群聊天
 
@@ -758,15 +780,15 @@ func (b MessaggeService) FindMessage(in *messagecenter.MessageReq) *[]map[string
 						"AND a.type IN ( 4,5,6,7)  "+
 						"AND a.isread = 0    "+
 						"AND a.own_id IN (SELECT id FROM %s WHERE user_id = %d)",
-						util.SOCIALIZE_MESSAGE_MAILBOX, util.BASE_POSITION, in.UserId)
-					unreadSql = fmt.Sprintf("UPDATE %s SET unread = 0 WHERE user_id = %d", util.Socialize_customer_service_user, in.UserId)
+						util.SOCIALIZE_MESSAGE_MAILBOX, util.BASE_POSITION, in.NewUserId)
+					unreadSql = fmt.Sprintf("UPDATE %s SET unread = 0 WHERE user_id = %d", util.Socialize_customer_service_user, in.NewUserId)
 				} else { //2用户
 					sqlStr = fmt.Sprintf("UPDATE %s a  SET a.isread = 1,    a.read_time = now( )  "+
 						"WHERE    a.own_type = 2 and a.iswithdraw = 0 "+
 						"AND a.type IN ( 4,5,6,7 )  "+
 						"AND a.isread = 0    "+
 						"AND a.own_id  in (%s) ", util.SOCIALIZE_MESSAGE_MAILBOX, positionStr)
-					unreadSql = fmt.Sprintf("UPDATE %s SET unread = 0 WHERE user_id = %d", util.SOCIALIZE_SUMMARY, in.UserId)
+					unreadSql = fmt.Sprintf("UPDATE %s SET unread = 0 WHERE user_id = %d", util.SOCIALIZE_SUMMARY, in.NewUserId)
 				}
 				IC.BaseMysql.UpdateOrDeleteBySql(sqlStr)
 				IC.BaseMysql.UpdateOrDeleteBySql(unreadSql)

+ 1 - 40
service/message_mail_box_test.go

@@ -101,7 +101,7 @@ func TestMessaggeService_Count(t *testing.T) {
 	for _, tt := range tests {
 		t.Run(tt.name, func(t *testing.T) {
 			b := MessaggeService{}
-			gotCount, gotLast, err := b.Count(tt.args.newUserId, tt.args.userType, tt.args.entUserId, true)
+			gotCount, gotLast, err := b.Count(tt.args.newUserId)
 			if (err != nil) != tt.wantErr {
 				t.Errorf("Count() error = %v, wantErr %v", err, tt.wantErr)
 				return
@@ -685,42 +685,3 @@ func TestChat(t *testing.T) {
 		})
 	}
 }
-
-func TestChat(t *testing.T) {
-	type args struct {
-		in *messagecenter.MessageSaveReq
-	}
-	tests := []struct {
-		name          string
-		args          args
-		wantErrorCode bool
-		wantErrorMsg  string
-		wantContent   string
-		wantMessageId int64
-	}{
-		{name: "发送群聊",
-			args: args{
-				in: &messagecenter.MessageSaveReq{
-					Title:       "标题?",
-					Content:     "hello world1",
-					Item:        8,
-					MessageType: 1,
-					Link:        "",
-					Appid:       "10000",
-					ReceiverIds: []int64{1, 2, 3},
-					GroupIds:    []int64{8},
-					Type:        1,
-					SendId:      333,
-				},
-			},
-		},
-	}
-
-	for _, tt := range tests {
-		t.Run(tt.name, func(t *testing.T) {
-			b := MessaggeService{}
-			b.Chat(tt.args.in)
-
-		})
-	}
-}

部分文件因文件數量過多而無法顯示