李昊 4 anos atrás
pai
commit
ca1bc0a21e

+ 1 - 10
gx_api/GxPress/Api/GxPress.Api/WebControllers/WebGroupController.cs

@@ -229,15 +229,6 @@ namespace GxPress.Api.WebControllers
         {
             return await _groupRepository.SearchGroupUserAsync(request);
         }
-        /// <summary>
-        /// 根据parendId获取小组广场
-        /// </summary>
-        /// <param name="parentId"></param>
-        /// <returns></returns>
-        [HttpGet("list-group-categroy/{parentId}")]
-        public async Task<IEnumerable<GroupCategoryResult>> GetAllByGroupCategroyAsync(int parentId)
-        {
-            return await groupCategroyRepository.GetAllAsync(parentId);
-        }
+
     }
 }

+ 0 - 5
gx_api/GxPress/Model/GxPress.Result/App/GroupUser/GroupUserFindResult.cs

@@ -1,8 +1,3 @@
-using System;
-using System.Collections.Generic;
-using System.Text;
-using GxPress.EnumConst;
-
 namespace GxPress.Result.App.GroupUser
 {
     /// <summary>

+ 12 - 12
gx_api/GxPress/Repository/GxPress.Repository.Implement/GroupRepository.cs

@@ -131,7 +131,7 @@ namespace GxPress.Repository.Implement
             // if (!string.IsNullOrEmpty(request.Key))
             //     sqlValue += $"and b.Name like '%{request.Key}%'";
             //共享数量
-            var topicSharingCount = "(select count(1) from ccpph.tede_group_user where GroupId=a.MiddleId) as TopicSharingCount";
+            var topicSharingCount = "(select count(1) from tede_group_user where GroupId=a.MiddleId) as TopicSharingCount";
             //总话题数量
             var topicAllCount = "(select count(1) from tede_topic where GroupId=a.MiddleId) as TopicAllCount";
             //未读话题数量
@@ -142,14 +142,14 @@ namespace GxPress.Repository.Implement
                                                     (SELECT 
                                                             COUNT(1)
                                                         FROM
-                                                            ccpph.tede_group
+                                                            tede_group
                                                         WHERE
                                                             id IN (SELECT 
                                                                     MiddleId
                                                                 FROM
-                                                                    ccpph.tede_middle
+                                                                    tede_middle
                                                                 WHERE
-                    ParentId = a.Id)) AS FileCount,b.Id, b.AvatarUrl, b.Name FROM ccpph.tede_Middle a LEFT JOIN ccpph.tede_group b ON a.MiddleId = b.Id WHERE 1=1 ";
+                    ParentId = a.Id)) AS FileCount,b.Id, b.AvatarUrl, b.Name FROM tede_Middle a LEFT JOIN tede_group b ON a.MiddleId = b.Id WHERE 1=1 ";
             if (request.GroupFolderId == 0 && string.IsNullOrEmpty(request.Key))
                 sql += $"and a.ParentId = @groupFolderId ";
             else if (request.GroupFolderId > 0 && !string.IsNullOrEmpty(request.Key))
@@ -183,7 +183,7 @@ namespace GxPress.Repository.Implement
 
             pagedList.Items = result;
             var sqlCount =
-                @"SELECT  count(1) FROM ccpph.tede_Middle a LEFT JOIN ccpph.tede_group b ON a.MiddleId = b.Id  WHERE 1=1 ";
+                @"SELECT  count(1) FROM tede_Middle a LEFT JOIN tede_group b ON a.MiddleId = b.Id  WHERE 1=1 ";
             if (request.GroupFolderId == 0 && string.IsNullOrEmpty(request.Key))
                 sqlCount += $"and a.ParentId = {request.GroupFolderId} ";
             else if (request.GroupFolderId > 0 && !string.IsNullOrEmpty(request.Key))
@@ -227,7 +227,7 @@ namespace GxPress.Repository.Implement
             if (!string.IsNullOrEmpty(groupDetail.QRCoder))
                 groupDetail.QRCoder = StringUtils.AddDomain(groupDetail.QRCoder);
             var sql =
-                "SELECT a.*,b.Name,b.AvatarUrl,c.Name  FROM ccpph.tede_group_user a inner join ccpph.tede_user b on a.UserId=b.Id inner join ccpph.tede_department c on b.DepartmentId=c.Id where a.GroupId=@groupId order by a.GroupUserRoleId";
+                "SELECT a.*,b.Name,b.AvatarUrl,c.Name  FROM tede_group_user a inner join tede_user b on a.UserId=b.Id inner join tede_department c on b.DepartmentId=c.Id where a.GroupId=@groupId order by a.GroupUserRoleId";
             var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypeStr, DatabaseType.MySql);
             var database = new Database(databaseType, _connectionString);
             var connection = database.GetConnection();
@@ -259,8 +259,8 @@ namespace GxPress.Repository.Implement
         public async Task<IEnumerable<GroupUserListResult>> SearchGroupUserAsync(TopicDetailListRequest request)
         {
             string sql =
-                $@"SELECT a.*, b.Name, b.AvatarUrl, c.Name FROM ccpph.tede_group_user a  INNER JOIN ccpph.tede_user b ON a.UserId = b.Id INNER JOIN
-            ccpph.tede_department c ON b.DepartmentId = c.Id
+                $@"SELECT a.*, b.Name, b.AvatarUrl, c.Name FROM tede_group_user a  INNER JOIN tede_user b ON a.UserId = b.Id INNER JOIN
+            tede_department c ON b.DepartmentId = c.Id
             WHERE  a.GroupId = {request.GroupId} and b.Name like '%{request.Key}%'";
             var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypeStr, DatabaseType.MySql);
             var database = new Database(databaseType, _connectionString);
@@ -294,7 +294,7 @@ namespace GxPress.Repository.Implement
             if (!string.IsNullOrEmpty(groupDetail.QRCoder))
                 groupDetail.QRCoder = StringUtils.AddDomain(groupDetail.QRCoder);
             var sql =
-                "SELECT a.*,b.Name,b.AvatarUrl,c.Name  FROM ccpph.tede_group_user a inner join ccpph.tede_user b on a.UserId=b.Id inner join ccpph.tede_department c on b.DepartmentId=c.Id where a.GroupId=@groupId";
+                "SELECT a.*,b.Name,b.AvatarUrl,c.Name  FROM tede_group_user a inner join tede_user b on a.UserId=b.Id inner join tede_department c on b.DepartmentId=c.Id where a.GroupId=@groupId";
 
             var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypeStr, DatabaseType.MySql);
             var database = new Database(databaseType, _connectionString);
@@ -328,7 +328,7 @@ namespace GxPress.Repository.Implement
         public async Task<int> GetUReadCountAsync(int userId, int groupId)
         {
             string sql =
-                @"select count(1) from ccpph.tede_topic a inner join ccpph.tede_topic_addressee b on a.Id=b.TopicId where b.UserId=@userId and b.IsRead=0 and a.GroupId=@groupId";
+                @"select count(1) from tede_topic a inner join tede_topic_addressee b on a.Id=b.TopicId where b.UserId=@userId and b.IsRead=0 and a.GroupId=@groupId";
             var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypeStr, DatabaseType.MySql);
             var database = new Database(databaseType, _connectionString);
             var connection = database.GetConnection();
@@ -344,7 +344,7 @@ namespace GxPress.Repository.Implement
         public async Task<int> SharingCountAsync(int groupId)
         {
             var sql =
-                $"select count(1) from ccpph.tede_group_user where GroupId={groupId}";
+                $"select count(1) from tede_group_user where GroupId={groupId}";
             var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypeStr, DatabaseType.MySql);
             var database = new Database(databaseType, _connectionString);
             var connection = database.GetConnection();
@@ -382,7 +382,7 @@ namespace GxPress.Repository.Implement
 
         public async Task<List<JobGroupResult>> ElasticSearchGroup()
         {
-            var sql = "select a.Id,a.GuId,a.UserId,b.Id,b.Name,b.AvatarUrl,b.CreatedDate,c.Name from ccpph.tede_middle a inner join ccpph.tede_group b on a.MiddleId=b.Id inner join ccpph.tede_user c on c.Id=b.UserId where a.FolderType=7 and a.IsUpload=0 order by a.CreatedDate desc limit 0,100";
+            var sql = "select a.Id,a.GuId,a.UserId,b.Id,b.Name,b.AvatarUrl,b.CreatedDate,c.Name from tede_middle a inner join tede_group b on a.MiddleId=b.Id inner join tede_user c on c.Id=b.UserId where a.FolderType=7 and a.IsUpload=0 order by a.CreatedDate desc limit 0,100";
             var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypeStr, DatabaseType.MySql);
             var database = new Database(databaseType, _connectionString);
             var connection = database.GetConnection();