|
@@ -17,6 +17,7 @@ using GxPress.Request.AddressBookGroup;
|
|
|
using GxPress.Request.AddressBookGroupUser;
|
|
|
using GxPress.Request.App.User;
|
|
|
using GxPress.Request.Department;
|
|
|
+using GxPress.Request.Feedback;
|
|
|
using GxPress.Request.User;
|
|
|
using GxPress.Result.AddressBook;
|
|
|
using GxPress.Result.AddressBookGroupUser;
|
|
@@ -52,9 +53,11 @@ namespace GxPress.Api.WebControllers
|
|
|
private readonly IUserLoginRepository userLoginRepository;
|
|
|
private readonly IAddressBookGroupRepository addressBookGroupRepository;
|
|
|
private readonly IAddressBookGroupUserRepository _addressBookGroupUserRepository;
|
|
|
+
|
|
|
+ private readonly IFeedbackRepository _feedbackRepository;
|
|
|
public UserController(IUserRepository userRepository, IOptions<JwtOptions> jwtOptions,
|
|
|
ILogger<UserController> logger, IDepartmentRepository departmentRepository, ILoginContext loginContext,
|
|
|
- IUserService userService, IFileLibraryRepository fileLibraryRepository, IDistributedCache cache, IUserLoginRepository userLoginRepository, IAddressBookGroupRepository addressBookGroupRepository, IAddressBookGroupUserRepository _addressBookGroupUserRepository)
|
|
|
+ IUserService userService, IFileLibraryRepository fileLibraryRepository, IDistributedCache cache, IUserLoginRepository userLoginRepository, IAddressBookGroupRepository addressBookGroupRepository, IAddressBookGroupUserRepository _addressBookGroupUserRepository,IFeedbackRepository _feedbackRepository)
|
|
|
{
|
|
|
_userRepository = userRepository;
|
|
|
_departmentRepository = departmentRepository;
|
|
@@ -67,6 +70,7 @@ namespace GxPress.Api.WebControllers
|
|
|
this.userLoginRepository = userLoginRepository;
|
|
|
this.addressBookGroupRepository = addressBookGroupRepository;
|
|
|
this._addressBookGroupUserRepository = _addressBookGroupUserRepository;
|
|
|
+ this._feedbackRepository=_feedbackRepository;
|
|
|
}
|
|
|
/// <summary>
|
|
|
/// 登录
|
|
@@ -439,5 +443,22 @@ namespace GxPress.Api.WebControllers
|
|
|
{
|
|
|
return await _departmentRepository.GetDepartmentUserResultAsync(request);
|
|
|
}
|
|
|
+ /// <summary>
|
|
|
+ /// 添加意见反馈
|
|
|
+ /// </summary>
|
|
|
+ /// <param name="request"></param>
|
|
|
+ /// /// <returns></returns>
|
|
|
+ [HttpPut("add-feedback")]
|
|
|
+ public async Task<bool> Add([FromBody] FeedbackInRequest request)
|
|
|
+ {
|
|
|
+ request.UserId = _loginContext.AccountId;
|
|
|
+ var feedback = new Feedback
|
|
|
+ {
|
|
|
+ UserId = request.UserId,
|
|
|
+ Content = request.Content,
|
|
|
+ FeedbackType = request.FeedbackType
|
|
|
+ };
|
|
|
+ return await _feedbackRepository.InsertAsync(feedback) > 0;
|
|
|
+ }
|
|
|
}
|
|
|
}
|