{"id":19991998,"url":"https://github.com/zhaopeiym/ShortURL","last_synced_at":"2025-05-04T11:30:33.888Z","repository":{"id":81936923,"uuid":"145285262","full_name":"zhaopeiym/ShortURL","owner":"zhaopeiym","description":"短网址生成器，演示地址：http://t.haojima.net/","archived":false,"fork":false,"pushed_at":"2019-09-28T23:50:27.000Z","size":527,"stargazers_count":55,"open_issues_count":0,"forks_count":12,"subscribers_count":3,"default_branch":"master","last_synced_at":"2025-04-13T01:58:07.530Z","etag":null,"topics":["qrcode","shorturl","url"],"latest_commit_sha":null,"homepage":"http://t.haojima.net/","language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/zhaopeiym.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2018-08-19T08:18:02.000Z","updated_at":"2024-05-01T04:47:59.000Z","dependencies_parsed_at":null,"dependency_job_id":"732d17dc-aeb5-4f62-bb4d-d5e2180ded2d","html_url":"https://github.com/zhaopeiym/ShortURL","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaopeiym%2FShortURL","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaopeiym%2FShortURL/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaopeiym%2FShortURL/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/zhaopeiym%2FShortURL/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/zhaopeiym","download_url":"https://codeload.github.com/zhaopeiym/ShortURL/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":252329098,"owners_count":21730548,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["qrcode","shorturl","url"],"created_at":"2024-11-13T04:52:00.347Z","updated_at":"2025-05-04T11:30:32.875Z","avatar_url":"https://github.com/zhaopeiym.png","language":"C#","funding_links":[],"categories":["C\\#"],"sub_categories":[],"readme":"# 短网址生成器\n\n## 演示地址\nhttp://t.haojima.net/\n\n## 原理\n- 转短码：\n- 1、根据自增主键id前面补0，如：00000123\n- 2、倒转32100000\n- 3、把倒转后的十进制转六十二进制（乱序后）\n- 解析短码：\n- 1、六十二进制转十进制，得到如：32100000\n- 2、倒转00000123，得到123\n- 3、根据123作为主键去数据库查询映射对象\n\n## 注意\n由于NET Core(2.1)还是没有System.Drawing程序集，图片二维码等操作只有通过第三方编写的组件如ZKWeb.System.Drawing，但是在Linux环境需要依赖libgdiplus组件。\n- contos环境处理：yum install -y libgdiplus \u0026\u0026 ln -s /usr/lib/libgdiplus.so /usr/lib/gdiplus.dll\n- docker环境处理可参考：https://www.cnblogs.com/stulzq/p/9339250.html\n\n## 效果图\n![default](https://user-images.githubusercontent.com/5820324/44307118-3ce50580-a3cf-11e8-98b3-f60c2cb9c819.png)\n\n## 数据表结构\n```\nSET FOREIGN_KEY_CHECKS=0;\n\n-- ----------------------------\n-- Table structure for ShortURLs\n-- ----------------------------\nDROP TABLE IF EXISTS `ShortURLs`;\nCREATE TABLE `ShortURLs` (\n  `Id` int(11) NOT NULL AUTO_INCREMENT,\n  `ShortURL` varchar(255) NOT NULL,\n  `Url` varchar(255) NOT NULL,\n  `CreationTime` datetime NOT NULL,\n  `LastModificationTime` datetime NOT NULL,\n  `AccessNumber` int(11) NOT NULL DEFAULT '0',\n  PRIMARY KEY (`Id`)\n) ENGINE=InnoDB AUTO_INCREMENT=230 DEFAULT CHARSET=utf8;\nSET FOREIGN_KEY_CHECKS=1;\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaopeiym%2FShortURL","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fzhaopeiym%2FShortURL","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fzhaopeiym%2FShortURL/lists"}