/// <summary>
        /// 编辑WechatUser
        /// </summary>

        protected virtual async Task Update(WechatUserEditDto input)
        {
            //TODO:更新前的逻辑判断,是否允许更新

            var entity = await _entityRepository.GetAsync(input.Id.Value);

            input.MapTo(entity);

            // ObjectMapper.Map(input, entity);
            await _entityRepository.UpdateAsync(entity);
        }
        /// <summary>
        /// 新增WechatUser
        /// </summary>

        protected virtual async Task <WechatUserEditDto> Create(WechatUserEditDto input)
        {
            //TODO:新增前的逻辑判断,是否允许新增

            // var entity = ObjectMapper.Map <WechatUser>(input);
            var entity = input.MapTo <WechatUser>();


            entity = await _entityRepository.InsertAsync(entity);

            return(entity.MapTo <WechatUserEditDto>());
        }
        /// <summary>
        /// 获取编辑 WechatUser
        /// </summary>
        /// <param name="input"></param>
        /// <returns></returns>

        public async Task <GetWechatUserForEditOutput> GetForEdit(NullableIdDto <long> input)
        {
            var output = new GetWechatUserForEditOutput();
            WechatUserEditDto editDto;

            if (input.Id.HasValue)
            {
                var entity = await _entityRepository.GetAsync(input.Id.Value);

                editDto = entity.MapTo <WechatUserEditDto>();

                //wechatUserEditDto = ObjectMapper.Map<List<wechatUserEditDto>>(entity);
            }
            else
            {
                editDto = new WechatUserEditDto();
            }

            output.WechatUser = editDto;
            return(output);
        }