public async Task <OperationResult <IEnumerable <ShopVoteRecordModel> > > SelectShopVoteRecordAsync(Guid userId, DateTime startDate, DateTime endDate) { if (userId == Guid.Empty) { return(OperationResult.FromError <IEnumerable <ShopVoteRecordModel> >("userId is is empty", "userId 不能为空")); } if (startDate == DateTime.MinValue || startDate == DateTime.MaxValue) { return(OperationResult.FromError <IEnumerable <ShopVoteRecordModel> >("startDate is is empty", "startDate 必须在 MinValue和MaxValue之间")); } if (endDate == DateTime.MinValue || endDate == DateTime.MaxValue) { return(OperationResult.FromError <IEnumerable <ShopVoteRecordModel> >("endDate is is empty", "endDate 必须在 MinValue和MaxValue之间")); } return(await SexAnnualVoteManager.SelectShopVoteRecordAsync(userId, startDate, endDate)); }
///<summary>技师报名</summary>/// public async Task <OperationResult <bool> > AddEmployeeSignUpAsync(ShopEmployeeVoteModel model) { try { //验证是否可以反序列化,保证数据有效 JsonConvert.DeserializeObject <JArray>(model.ImageUrls); var check = await CheckEmployeeSignUpAsync(model.ShopId, model.EmployeeId); if (check.Result) { return(OperationResult.FromResult(true)); } else { var result = await SexAnnualVoteManager.InsertShopEmployeeVoteAsync(model); return(OperationResult.FromResult(result.Result)); } } catch (Exception e) { return(OperationResult.FromError <bool>("0", e.Message)); } }
public async Task <OperationResult <PagedModel <ShopEmployeeVoteBaseModel> > > SelectShopEmployeeRankingAsync(SexAnnualVoteQueryRequest query) { return(await SexAnnualVoteManager.SelectShopEmployeeRankingAsync(query)); }
///<summary>验证技师是否已经报过名了</summary>/// public async Task <OperationResult <bool> > CheckEmployeeSignUpAsync(long shopId, long employeeId) { var result = await SexAnnualVoteManager.GetShopEmployeeVoteAsync(shopId, employeeId); return(OperationResult.FromResult(result.Result != null)); }
public async Task <OperationResult <ShopEmployeeVoteModel> > FetchShopEmployeeDetailAsync(long shopId, long employeeId) { return(await SexAnnualVoteManager.FetchShopEmployeeDetailAsync(shopId, employeeId)); }