| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -74,6 +74,7 @@ public Result login(@RequestBody AdminModel model) { | |||
| 74 | 74 | * | |
| 75 | 75 | * @return Result | |
| 76 | 76 | */ | |
| 77 | + @ApiOperation(value = "添加后台用户", notes = "传一个管理员用户模型过来然后保存到数据库",httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) | ||
| 77 | 78 | @RequestMapping(value = "add", method = RequestMethod.POST) | |
| 78 | 79 | public Result add(@RequestBody AdminModel model) { | |
| 79 | 80 | AdminModel adminModel = service.findAdminUserByUserName(model.getUserName()); | |
@@ -93,6 +94,7 @@ public Result add(@RequestBody AdminModel model) { | |||
| 93 | 94 | * @param id id | |
| 94 | 95 | * @return Result | |
| 95 | 96 | */ | |
| 97 | + @ApiOperation(value = "查找用户", notes = "根据传来的id查找用户并返回",httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) | ||
| 96 | 98 | @RequestMapping(value = "findById/{id}", method = RequestMethod.GET) | |
| 97 | 99 | public Result findUserById(@PathVariable("id") Long id) { | |
| 98 | 100 | AdminModel adminModel = service.findAdminUserById(id); | |
@@ -108,6 +110,7 @@ public Result findUserById(@PathVariable("id") Long id) { | |||
| 108 | 110 | * @param userName userName | |
| 109 | 111 | * @return Result | |
| 110 | 112 | */ | |
| 113 | + @ApiOperation(value = "查找用户", notes = "根据传来的用户名查找用户并返回",httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) | ||
| 111 | 114 | @RequestMapping(value = "findByName/{userName}", method = RequestMethod.GET) | |
| 112 | 115 | public Result findByName(@PathVariable("userName") String userName) { | |
| 113 | 116 | AdminModel adminModel = service.findAdminUserByUserName(userName); | |
@@ -123,6 +126,7 @@ public Result findByName(@PathVariable("userName") String userName) { | |||
| 123 | 126 | * @return model | |
| 124 | 127 | * @throws UserNotFoundException UserNotFoundException | |
| 125 | 128 | */ | |
| 129 | + @ApiOperation(value = "修改用户密码", notes = "传来模型验证并修改密码",httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) | ||
| 126 | 130 | @RequestMapping(value = "changePassword", method = RequestMethod.POST) | |
| 127 | 131 | public Result changePassword(@RequestBody AdminModel model) throws UserNotFoundException { | |
| 128 | 132 | AdminModel adminModel = service.findAdminUserByUserName(model.getUserName()); | |
@@ -140,8 +144,9 @@ public Result changePassword(@RequestBody AdminModel model) throws UserNotFoundE | |||
| 140 | 144 | /** | |
| 141 | 145 | * 返回所有 | |
| 142 | 146 | * | |
| 143 | - * @return 分页 | ||
| 147 | + * @return 不分页 | ||
| 144 | 148 | */ | |
| 149 | + @ApiOperation(value = "返回所有用户信息", notes = "不分页",httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) | ||
| 145 | 150 | @RequestMapping(value = "findAll", method = RequestMethod.GET) | |
| 146 | 151 | public Result getAll() { | |
| 147 | 152 | List<AdminModel> pages = service.getAdminUsers(); | |
@@ -158,6 +163,7 @@ public Result getAll() { | |||
| 158 | 163 | * @return model | |
| 159 | 164 | * @throws UserNotFoundException UserNotFoundException | |
| 160 | 165 | */ | |
| 166 | + @ApiOperation(value = "删除用户", notes = "根据传入的id删除对应的用户",httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) | ||
| 161 | 167 | @RequestMapping(value = "delete/{id}", method = RequestMethod.GET) | |
| 162 | 168 | public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundException { | |
| 163 | 169 | AdminModel adminModel = service.findAdminUserById(id); | |
@@ -175,6 +181,7 @@ public Result deleteUserById(@PathVariable("id") Long id) throws UserNotFoundExc | |||
| 175 | 181 | * @return model | |
| 176 | 182 | * @throws UserNotFoundException UserNotFoundException | |
| 177 | 183 | */ | |
| 184 | + @ApiOperation(value = "更新用户信息", notes = "根据传入的模型更新用户信息",httpMethod = "POST", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) | ||
| 178 | 185 | @RequestMapping(value = "update", method = RequestMethod.POST) | |
| 179 | 186 | public Result update( | |
| 180 | 187 | @RequestParam("userName") String userName | |
@@ -195,6 +202,7 @@ public Result update( | |||
| 195 | 202 | * @return model | |
| 196 | 203 | * @throws UserNotFoundException UserNotFoundException | |
| 197 | 204 | */ | |
| 205 | + @ApiOperation(value = "封号", notes = "根据传入的id对修改对应帐号状态",httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE) | ||
| 198 | 206 | @RequestMapping(value = "forbid/{id}", method = RequestMethod.GET) | |
| 199 | 207 | public Result forbid(@PathVariable("id") Long id) throws UserNotFoundException { | |
| 200 | 208 | AdminModel model = service.findAdminUserById(id); | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,17 +19,17 @@ | |||
| 19 | 19 | <script src='lib/handlebars-4.0.5.js' type='text/javascript'></script> | |
| 20 | 20 | <script src='lib/lodash.min.js' type='text/javascript'></script> | |
| 21 | 21 | <script src='lib/backbone-min.js' type='text/javascript'></script> | |
| 22 | - <script src='swagger-ui.js' type='text/javascript'></script> | ||
| 22 | + <script src='swagger-ui.min.js' type='text/javascript'></script> | ||
| 23 | 23 | <script src='lib/highlight.9.1.0.pack.js' type='text/javascript'></script> | |
| 24 | 24 | <script src='lib/highlight.9.1.0.pack_extended.js' type='text/javascript'></script> | |
| 25 | 25 | <script src='lib/jsoneditor.min.js' type='text/javascript'></script> | |
| 26 | 26 | <script src='lib/marked.js' type='text/javascript'></script> | |
| 27 | 27 | <script src='lib/swagger-oauth.js' type='text/javascript'></script> | |
| 28 | 28 | ||
| 29 | 29 | <!-- Some basic translations --> | |
| 30 | - <!-- <script src='lang/translator.js' type='text/javascript'></script> --> | ||
| 31 | - <!-- <script src='lang/ru.js' type='text/javascript'></script> --> | ||
| 32 | - <!-- <script src='lang/en.js' type='text/javascript'></script> --> | ||
| 30 | + <!--<script src='lang/translator.js' type='text/javascript'></script>--> | ||
| 31 | + <!--<script src='lang/ru.js' type='text/javascript'></script>--> | ||
| 32 | + <!--<script src='lang/en.js' type='text/javascript'></script>--> | ||
| 33 | 33 | ||
| 34 | 34 | <script type="text/javascript"> | |
| 35 | 35 | $(function () { | |
@@ -84,18 +84,18 @@ | |||
| 84 | 84 | console.log.apply(console, arguments); | |
| 85 | 85 | } | |
| 86 | 86 | } | |
| 87 | - }); | ||
| 87 | + }); | ||
| 88 | 88 | </script> | |
| 89 | 89 | </head> | |
| 90 | 90 | ||
| 91 | 91 | <body class="swagger-section"> | |
| 92 | 92 | <div id='header'> | |
| 93 | 93 | <div class="swagger-ui-wrap"> | |
| 94 | - <a id="logo" href="http://swagger.io"><img class="logo__img" alt="swagger" height="30" width="30" src="images/logo_small.png" /><span class="logo__title">swagger</span></a> | ||
| 94 | + <a id="logo" href="http://swagger.io"><img class="logo__img" alt="swagger" height="30" width="30" src="images/logo_small.png" /><span class="logo__title">小莫</span></a> | ||
| 95 | 95 | <form id='api_selector'> | |
| 96 | 96 | <div class='input'><input placeholder="http://example.com/api" id="input_baseUrl" name="baseUrl" type="text"/></div> | |
| 97 | 97 | <div id='auth_container'></div> | |
| 98 | - <div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>Explore</a></div> | ||
| 98 | + <div class='input'><a id="explore" class="header__btn" href="#" data-sw-translate>搜索</a></div> | ||
| 99 | 99 | </form> | |
| 100 | 100 | </div> | |
| 101 | 101 | </div> | |
| Back | FazBrowse Home | New Git URL |
0 commit comments