|
|
@@ -1,9 +1,11 @@
|
|
1
|
1
|
package api.controller.system;
|
|
2
|
2
|
|
|
|
3
|
+import api.entity.database.call.CallLog;
|
|
3
|
4
|
import api.entity.database.system.*;
|
|
4
|
5
|
import api.entity.view.call.CallLogView;
|
|
|
6
|
+import api.entity.view.system.CustomerView;
|
|
5
|
7
|
import api.entity.view.system.UserView;
|
|
6
|
|
-import api.service.system.IUserExtensionService;
|
|
|
8
|
+import api.service.system.*;
|
|
7
|
9
|
import api.util.annotation.Anonymous;
|
|
8
|
10
|
import com.alibaba.fastjson2.JSON;
|
|
9
|
11
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
@@ -13,9 +15,6 @@ import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
13
|
15
|
import api.controller.BaseController;
|
|
14
|
16
|
import api.entity.input.PageInput;
|
|
15
|
17
|
import api.model.AjaxResult;
|
|
16
|
|
-import api.service.system.IDeptService;
|
|
17
|
|
-import api.service.system.IRoleService;
|
|
18
|
|
-import api.service.system.IUserService;
|
|
19
|
18
|
import api.util.annotation.Log;
|
|
20
|
19
|
import api.util.enums.BusinessType;
|
|
21
|
20
|
import api.util.helper.*;
|
|
|
@@ -70,10 +69,14 @@ public class UserController extends BaseController {
|
|
70
|
69
|
qw.eq(!StringHelper.isEmpty(input.getStatus()), User::getStatus, input.getStatus());
|
|
71
|
70
|
qw.eq(User::getDelFlag, "0");
|
|
72
|
71
|
qw.orderByDesc(User::getUserId);
|
|
|
72
|
+
|
|
73
|
73
|
Page<User> page = GetPage(pageInput);
|
|
74
|
74
|
if (page != null) {
|
|
75
|
75
|
//IPage<User> iPage = userService.getListPage(page, qw);
|
|
76
|
76
|
IPage<User> iPage = userService.selectUserDeptList(page, qw);
|
|
|
77
|
+
|
|
|
78
|
+
|
|
|
79
|
+
|
|
77
|
80
|
return Success("成功", iPage.getRecords(), iPage.getTotal());
|
|
78
|
81
|
} else {
|
|
79
|
82
|
return Success("成功", userService.selectUserDeptList(qw));
|
|
|
@@ -217,6 +220,23 @@ public class UserController extends BaseController {
|
|
217
|
220
|
}
|
|
218
|
221
|
return Error("修改失败!");
|
|
219
|
222
|
}
|
|
|
223
|
+
|
|
|
224
|
+ /**
|
|
|
225
|
+ * 修改图像
|
|
|
226
|
+ */
|
|
|
227
|
+ @ApiOperation("修改图像")
|
|
|
228
|
+ @Log(title = "修改图像", businessType = BusinessType.OTHER)
|
|
|
229
|
+ @PutMapping("/avatar")
|
|
|
230
|
+ public AjaxResult avatar(String url) {
|
|
|
231
|
+ UserView currentUser=CurrentUser();
|
|
|
232
|
+
|
|
|
233
|
+ var entity=userService.getEntity(currentUser.getUserId());
|
|
|
234
|
+ entity.setAvatar(url);
|
|
|
235
|
+ if (userService.update(entity)) {
|
|
|
236
|
+ return Success("修改成功!");
|
|
|
237
|
+ }
|
|
|
238
|
+ return Error("修改失败!");
|
|
|
239
|
+ }
|
|
220
|
240
|
/**
|
|
221
|
241
|
* 修改状态
|
|
222
|
242
|
*
|