Skip to content

Commit 4c70425

Browse files
authored
😅 rename and modify some method name
1 parent 1877dce commit 4c70425

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

memo/src/main/java/pers/haungyuhui/memo/controller/StudentController.java renamed to memo/src/main/java/pers/haungyuhui/memo/controller/FriendController.java

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -62,13 +62,13 @@ public String getFriendListView() {
6262
* @description: 分页查询:根据好友姓名获取指定/所有好友信息列表
6363
* @param: page 当前页码
6464
* @param: rows 列表行数
65-
* @param: username 管理员姓名
65+
* @param: username 好友姓名
6666
* @date: 2019-06-28 9:16 PM
6767
* @return: java.util.Map<java.lang.String, java.lang.Object>
6868
*/
6969
@PostMapping("/getFriendList")
7070
@ResponseBody
71-
public Map<String, Object> getAdminList(Integer page, Integer rows, String username) {
71+
public Map<String, Object> getFriendList(Integer page, Integer rows, String username) {
7272

7373
//获取查询的好友姓名
7474
Friend friend = new Friend();
@@ -99,7 +99,7 @@ public Map<String, Object> getAdminList(Integer page, Integer rows, String usern
9999
*/
100100
@PostMapping("/addFriend")
101101
@ResponseBody
102-
public Map<String, Object> addAdmin(Friend friend) {
102+
public Map<String, Object> addFriend(Friend friend) {
103103
//判断姓名是否已存在
104104
Friend f = friendService.findByName(friend.getName());
105105
if (f == null) {
@@ -124,7 +124,7 @@ public Map<String, Object> addAdmin(Friend friend) {
124124
*/
125125
@PostMapping("/editFriend")
126126
@ResponseBody
127-
public Map<String, Object> edityAdmin(Friend friend) {
127+
public Map<String, Object> editFriend(Friend friend) {
128128
//需排除只修改姓名以外信息的操作
129129
Friend user = friendService.findByName(friend.getName());
130130
if (user != null) {
@@ -152,7 +152,7 @@ public Map<String, Object> edityAdmin(Friend friend) {
152152
*/
153153
@PostMapping("/deleteFriend")
154154
@ResponseBody
155-
public Map<String, Object> deleteAdmin(@RequestParam(value = "ids[]", required = true) Integer[] ids) {
155+
public Map<String, Object> deleteFriend(@RequestParam(value = "ids[]", required = true) Integer[] ids) {
156156

157157
if (friendService.delete(ids) > 0) {
158158
result.put("success", true);
@@ -178,4 +178,4 @@ public Map<String, Object> uploadPhoto(MultipartFile photo) throws FileNotFoundE
178178
//返回头像的上传结果
179179
return UploadFile.getUploadResult(photo, dirPath, uploadPath);
180180
}
181-
}
181+
}

0 commit comments

Comments
 (0)