李昊 4 years ago
parent
commit
168e00c176

+ 1 - 1
gx_api/GxPress/Api/GxPress.Api/AppControllers/AddressBookGroupController.cs

@@ -72,7 +72,7 @@ namespace GxPress.Api.AppControllers
         /// <param name="request"></param>
         /// <returns></returns>
         [HttpPost("add")]
-        public async Task<bool> Insert(AddressBookGroupInRequest request)
+        public async Task<Entity.AddressBookGroup> Insert(AddressBookGroupInRequest request)
         {
             request.UserId = _loginContext.AccountId;
             return await addressBookGroupService.InsertAsync(request);

+ 2 - 1
gx_api/GxPress/Api/GxPress.Api/AppControllers/UserController.cs

@@ -142,6 +142,7 @@ namespace GxPress.Api.AppControllers
             if (!string.IsNullOrEmpty(code))
                 throw new BusinessException("请求太频繁!");
             code = RandomGenerator.GetNumberString(6);
+            code = "123456";
             if (Common.Sms.AliySms.SendSms(phone, code))
             {
                 _logger.LogInformation("{phone}验证码:{code}", phone, code);
@@ -348,7 +349,7 @@ namespace GxPress.Api.AppControllers
         [HttpPost("search")]
         public async Task<IEnumerable<UserInfoResult>> SearchUserName(SearchUserNameRequest request)
         {
-            return await _userService.GetSearchUserInfoResults(_loginContext.AccountId,request.Key);
+            return await _userService.GetSearchUserInfoResults(_loginContext.AccountId, request.Key);
         }
 
         /// <summary>

+ 1 - 0
gx_api/GxPress/Repository/GxPress.Repository.Implement/AddressBookGroupUserRepository.cs

@@ -122,6 +122,7 @@ namespace GxPress.Repository.Implement
                     }
                     trans.Complete();
                 }
+                
             }
             catch
             {

+ 4 - 3
gx_api/GxPress/Service/GxPress.Service.Implement/AddressBookGroup/AddressBookGroupService.cs

@@ -21,7 +21,7 @@ namespace GxPress.Service.Implement.AddressBookGroup
         /// </summary>
         /// <param name="request"></param>
         /// <returns></returns>
-        public async Task<bool> InsertAsync(AddressBookGroupInRequest request)
+        public async Task<Entity.AddressBookGroup> InsertAsync(AddressBookGroupInRequest request)
         {
             try
             {
@@ -39,13 +39,14 @@ namespace GxPress.Service.Implement.AddressBookGroup
                         UserId = request.UserIds
                     });
                     transactionScope.Complete();
+                    return addressBookGroup;
                 }
             }
             catch
             {
-                return false;
+                return new Entity.AddressBookGroup();
             }
-            return true;
+            return new Entity.AddressBookGroup();
         }
     }
 }

+ 1 - 1
gx_api/GxPress/Service/GxPress.Service.Interface/AddressBookGroup/IAddressBookGroupService.cs

@@ -10,6 +10,6 @@ namespace GxPress.Service.Interface.AddressBookGroup
         /// </summary>
         /// <param name="request"></param>
         /// <returns></returns>
-        Task<bool> InsertAsync(AddressBookGroupInRequest request);
+        Task<Entity.AddressBookGroup> InsertAsync(AddressBookGroupInRequest request);
     }
 }