public async Task <ApiRequestResult> AddAsync(FlashPromotionProductRelationDto dto)
        {
            var command = dto.EntityMap <FlashPromotionProductRelationDto, FlashPromotionProductRelation>();
            await _flashPromotionProductRelationRepository.AddAsync(command);

            return(ApiRequestResult.Success("添加成功"));
        }
        public async Task <ApiRequestResult> UpdateAsync(FlashPromotionProductRelationDto dto)
        {
            try
            {
                var entity = await _flashPromotionProductRelationRepository.GetAsync(dto.Id.Value);

                var newEntity = dto.EntityMap(entity);
                await _flashPromotionProductRelationRepository.UpdateAsync(newEntity);

                return(ApiRequestResult.Success("修改成功"));
            }
            catch (Exception ex)
            {
                throw;
            }
        }