Example #1
0
        public ActionResult <BaseResponse> ModifyPermission(RouterDto request)
        {
            var  entity = _mapper.Map <Router>(request);
            bool result;

            if (request.Id > 0)
            {
                result = _accountStoreService.UpdateRouter(entity);
            }
            else
            {
                entity.CreateTime = DateTime.Now;
                result            = _accountStoreService.AddRouter(entity);
            }
            return(BaseResponse.GetResponse(result));
        }