李昊 4 years ago
parent
commit
bc71bf4df9

+ 3 - 2
gx_api/GxPress/Repository/GxPress.Repository.Implement/MiddleRepository.cs

@@ -59,7 +59,7 @@ namespace GxPress.Repository.Implement
         {
             if (middles.Count == 0)
                 return false;
-            var sql = "INSERT INTO `tede_middle`(`Guid`,`CreatedDate`,`LastModifiedDate`,`FolderName`,`FolderType`,`IsTop`,`RoleId`,`Sort`,`MiddleId`,`ParentId`,`UserId`,`MiddleSonId`,`IsRead`,`NoticeAddresseeType`,`IsAdmin`,`IsDelete`,`AttributeValue`,`IsDefault`,`IsUpload`,`Title`,`TitleLong`,`Content`,`AddressUser`,`CcUser`,`AddressUserComplete`,`CcUserComplete`)VALUES";
+            var sql = "INSERT INTO `tede_middle`(`Guid`,`CreatedDate`,`LastModifiedDate`,`FolderName`,`FolderType`,`IsTop`,`RoleId`,`Sort`,`MiddleId`,`ParentId`,`UserId`,`MiddleSonId`,`IsRead`,`NoticeAddresseeType`,`IsAdmin`,`IsDelete`,`AttributeValue`,`IsDefault`,`IsUpload`,`Title`,`TitleLong`,`Content`,`AddressUser`,`CcUser`,`AddressUserComplete`,`CcUserComplete`,`IsRecall`)VALUES";
             foreach (var item in middles)
             {
                 var guId = Guid.NewGuid().ToString();
@@ -68,7 +68,8 @@ namespace GxPress.Repository.Implement
                 var isDefault = item.IsDefault == true ? 1 : 0;
                 var isDelete = item.IsDelete == true ? 1 : 0;
                 var isAdmin = item.IsAdmin == true ? 1 : 0;
-                sql += $"('{guId}','{createdDate}','{createdDate}','{item.FolderName}',{item.FolderType},{item.IsTop},{item.RoleId},{item.Sort},{item.MiddleId},{item.ParentId},{item.UserId},{item.MiddleSonId},{isRead},{item.NoticeAddresseeType.GetHashCode()},{isAdmin},{isDelete},{item.AttributeValue},{isDefault},0,'{item.Title}','{item.TitleLong}','{item.Content}','{item.AddressUser}','{item.CcUser}','{item.AddressUserComplete}','{item.CcUserComplete}'),";
+                var isRecall = item.IsRecall == true ? 1 : 0;
+                sql += $"('{guId}','{createdDate}','{createdDate}','{item.FolderName}',{item.FolderType},{item.IsTop},{item.RoleId},{item.Sort},{item.MiddleId},{item.ParentId},{item.UserId},{item.MiddleSonId},{isRead},{item.NoticeAddresseeType.GetHashCode()},{isAdmin},{isDelete},{item.AttributeValue},{isDefault},0,'{item.Title}','{item.TitleLong}','{item.Content}','{item.AddressUser}','{item.CcUser}','{item.AddressUserComplete}','{item.CcUserComplete},{isRecall}'),";
             }
             sql = sql.Remove(sql.Length - 1, 1);
             var databaseType = StringUtils.ToEnum<DatabaseType>(_databaseTypeStr, DatabaseType.MySql);

+ 2 - 1
gx_api/GxPress/Service/GxPress.Service.Implement/Middle/MiddleService.cs

@@ -216,7 +216,8 @@ namespace GxPress.Service.Implement.Middle
                 AddressUser=request.AddressUser,
                 CcUser=request.CcUser,
                 CcUserComplete=request.CcUserComplete,
-                AddressUserComplete=request.AddressUserComplete
+                AddressUserComplete=request.AddressUserComplete,
+                IsRecall=false
             };
             if (request.AttributeValue == 0)
                 middle.AttributeValue = 1;

+ 1 - 0
gx_api/GxPress/Service/GxPress.Service.Implement/Notice/NoticeService.Insert.cs

@@ -192,6 +192,7 @@ namespace GxPress.Service.Implement.Notice
                                 AddressUser = Common.Tools.StringUtils.ObjectCollectionToString(addresseeUsers.Select(n => n.Name), 10),
                                 CcUserComplete = Common.Tools.StringUtils.ObjectCollectionToString(ccUsers.Select(n => n.Name)),
                                 CcUser = Common.Tools.StringUtils.ObjectCollectionToString(ccUsers.Select(n => n.Name), 10),
+                                IsRecall=false
                             };
                             middles.Add(middle);
                         }