Skip to content

Commit 2976789

Browse files
committed
java to kotlin
1 parent 9d018c3 commit 2976789

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

42 files changed

+723
-1459
lines changed

core/src/main/java/info/xiaomo/core/base/BaseController.kt

Lines changed: 0 additions & 93 deletions
This file was deleted.

website/src/main/java/info/xiaomo/website/XiaomoMain.java

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,7 @@ public static void main(String[] args) throws Exception {
5656

5757
@RequestMapping(value = "/", method = RequestMethod.GET)
5858
public String index() {
59-
return UserView.INDEX.getName();
59+
return UserView.INDEX.getViewName();
6060
}
6161

6262
/**

website/src/main/java/info/xiaomo/website/controller/AdminUserController.java

Lines changed: 2 additions & 91 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package info.xiaomo.website.controller;
22

3-
import info.xiaomo.core.base.BaseController;
43
import info.xiaomo.core.base.Result;
54
import info.xiaomo.core.constant.CodeConst;
65
import info.xiaomo.core.exception.UserNotFoundException;
@@ -10,7 +9,6 @@
109
import info.xiaomo.website.service.AdminUserService;
1110
import io.swagger.annotations.*;
1211
import org.springframework.beans.factory.annotation.Autowired;
13-
import org.springframework.data.domain.Page;
1412
import org.springframework.http.MediaType;
1513
import org.springframework.web.bind.annotation.*;
1614

@@ -33,15 +31,15 @@
3331
* @author : xiaomo
3432
* github: https://github.com/xiaomoinfo
3533
36-
34+
* <p>
3735
* Date: 16/4/2 12:47
3836
* Description: 后台用户控制器
3937
* Copyright(©) 2015 by xiaomo.
4038
*/
4139
@RestController
4240
@RequestMapping("/adminUser")
4341
@Api(value = "后台用户相关api", description = "后台用户相关api")
44-
public class AdminUserController extends BaseController {
42+
public class AdminUserController {
4543

4644
private final AdminUserService service;
4745

@@ -123,46 +121,13 @@ public Result findUserById(@PathVariable("id") Long id) {
123121
return new Result<>(adminModel);
124122
}
125123

126-
/**
127-
* 查找所有(不带分页)
128-
*
129-
* @return result
130-
*/
131-
@Override
132-
public Result<List> findAll() {
133-
return null;
134-
}
135-
136-
/**
137-
* 带分页
138-
*
139-
* @param start 起始页
140-
* @param pageSize 页码数
141-
* @return result
142-
*/
143-
@Override
144-
public Result<Page> findAll(@PathVariable int start, @PathVariable int pageSize) {
145-
return null;
146-
}
147-
148-
/**
149-
* 根据id查看模型
150-
*
151-
* @param id id
152-
* @return result
153-
*/
154-
@Override
155-
public Result findById(@PathVariable Long id) {
156-
return null;
157-
}
158124

159125
/**
160126
* 根据名字查找
161127
*
162128
* @param userName userName
163129
* @return Result
164130
*/
165-
@Override
166131
@ApiOperation(value = "查找用户", notes = "根据传来的用户名查找用户并返回", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
167132
@RequestMapping(value = "findByName/{userName}", method = RequestMethod.GET)
168133
@ApiImplicitParams({
@@ -180,60 +145,6 @@ public Result findByName(@PathVariable("userName") String userName) {
180145
return new Result<>(adminModel);
181146
}
182147

183-
/**
184-
* 根据名字删除模型
185-
*
186-
* @param name name
187-
* @return result
188-
*/
189-
@Override
190-
public Result<Boolean> delByName(@PathVariable String name) {
191-
return null;
192-
}
193-
194-
/**
195-
* 根据id删除模型
196-
*
197-
* @param id id
198-
* @return result
199-
*/
200-
@Override
201-
public Result<Boolean> delById(@PathVariable Long id) {
202-
return null;
203-
}
204-
205-
/**
206-
* 添加模型
207-
*
208-
* @param model model
209-
* @return result
210-
*/
211-
@Override
212-
public Result<Boolean> add(@RequestBody Object model) {
213-
return null;
214-
}
215-
216-
/**
217-
* 更新
218-
*
219-
* @param model model
220-
* @return result
221-
*/
222-
@Override
223-
public Result<Boolean> update(@RequestBody Object model) {
224-
return null;
225-
}
226-
227-
/**
228-
* 批量删除
229-
*
230-
* @param ids ids
231-
* @return result
232-
*/
233-
@Override
234-
public Result<Boolean> delByIds(@PathVariable List ids) {
235-
return null;
236-
}
237148

238149
/**
239150
* 修改密码

website/src/main/java/info/xiaomo/website/controller/ChangeLogController.java

Lines changed: 1 addition & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,5 @@
11
package info.xiaomo.website.controller;
22

3-
import info.xiaomo.core.base.BaseController;
43
import info.xiaomo.core.base.Result;
54
import info.xiaomo.core.constant.CodeConst;
65
import info.xiaomo.website.model.ChangeLogModel;
@@ -10,7 +9,6 @@
109
import io.swagger.annotations.ApiImplicitParams;
1110
import io.swagger.annotations.ApiOperation;
1211
import org.springframework.beans.factory.annotation.Autowired;
13-
import org.springframework.data.domain.Page;
1412
import org.springframework.http.MediaType;
1513
import org.springframework.web.bind.annotation.*;
1614

@@ -33,7 +31,7 @@
3331
@RestController
3432
@RequestMapping("/changeLog")
3533
@Api(value = "更新日志相关api", description = "更新日志相关api")
36-
public class ChangeLogController extends BaseController {
34+
public class ChangeLogController {
3735

3836
private final ChangeLogService service;
3937

@@ -48,7 +46,6 @@ public ChangeLogController(ChangeLogService service) {
4846
* @param id id
4947
* @return model
5048
*/
51-
@Override
5249
@RequestMapping(value = "findById/{id}", method = RequestMethod.GET)
5350
@ApiOperation(value = "通过id查找", notes = "通过id查找", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
5451
@ApiImplicitParams({
@@ -67,7 +64,6 @@ public Result findById(@PathVariable("id") Long id) {
6764
*
6865
* @return result
6966
*/
70-
@Override
7167
@RequestMapping(value = "findByName/{name}", method = RequestMethod.GET)
7268
@ApiOperation(value = "通过名字查找", notes = "通过名字查找", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
7369
@ApiImplicitParams({
@@ -81,67 +77,12 @@ public Result findByName(@PathVariable("name") String name) {
8177
return new Result(model);
8278
}
8379

84-
/**
85-
* 根据名字删除模型
86-
*
87-
* @param name name
88-
* @return result
89-
*/
90-
@Override
91-
public Result<Boolean> delByName(@PathVariable String name) {
92-
return null;
93-
}
94-
95-
/**
96-
* 根据id删除模型
97-
*
98-
* @param id id
99-
* @return result
100-
*/
101-
@Override
102-
public Result<Boolean> delById(@PathVariable Long id) {
103-
return null;
104-
}
105-
106-
/**
107-
* 添加模型
108-
*
109-
* @param model model
110-
* @return result
111-
*/
112-
@Override
113-
public Result<Boolean> add(@RequestBody Object model) {
114-
return null;
115-
}
116-
117-
/**
118-
* 更新
119-
*
120-
* @param model model
121-
* @return result
122-
*/
123-
@Override
124-
public Result<Boolean> update(@RequestBody Object model) {
125-
return null;
126-
}
127-
128-
/**
129-
* 批量删除
130-
*
131-
* @param ids ids
132-
* @return result
133-
*/
134-
@Override
135-
public Result<Boolean> delByIds(@PathVariable List ids) {
136-
return null;
137-
}
13880

13981
/**
14082
* 分页查询更新日志
14183
*
14284
* @return 分页
14385
*/
144-
@Override
14586
@RequestMapping(value = "findAll", method = RequestMethod.GET)
14687
@ApiOperation(value = "分页查询更新日志", notes = "分页查询更新日志", httpMethod = "GET", produces = MediaType.APPLICATION_JSON_UTF8_VALUE)
14788
public Result findAll() {
@@ -152,18 +93,6 @@ public Result findAll() {
15293
return new Result<>(pages);
15394
}
15495

155-
/**
156-
* 带分页
157-
*
158-
* @param start 起始页
159-
* @param pageSize 页码数
160-
* @return result
161-
*/
162-
@Override
163-
public Result<Page> findAll(@PathVariable int start, @PathVariable int pageSize) {
164-
return null;
165-
}
166-
16796
/**
16897
* 增加更新日志
16998
*

0 commit comments

Comments
 (0)