|
|
@@ -4,9 +4,11 @@ import api.entity.database.system.Customer;
|
|
4
|
4
|
import api.entity.input.online.MessageInput;
|
|
5
|
5
|
import api.service.system.ICustomerService;
|
|
6
|
6
|
import api.service.websocket.WebSocket;
|
|
|
7
|
+import api.util.annotation.Anonymous;
|
|
7
|
8
|
import api.util.helper.AsyncHelper;
|
|
8
|
9
|
import api.util.helper.DateHelper;
|
|
9
|
10
|
import api.util.helper.FileUploadHelper;
|
|
|
11
|
+import com.alibaba.fastjson2.JSON;
|
|
10
|
12
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
11
|
13
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
12
|
14
|
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
@@ -95,10 +97,11 @@ public class MessageController extends BaseController {
|
|
95
|
97
|
@Log(title = "查询留言消息列表",businessType = BusinessType.QUERY)
|
|
96
|
98
|
@GetMapping("/leavelist")
|
|
97
|
99
|
public AjaxResult getLeaveList() {
|
|
98
|
|
- LambdaQueryWrapper<Message> qw = new QueryWrapper<Message>().select("kh_user user,count(*) as count,max(create_time) as time").lambda();
|
|
|
100
|
+ LambdaQueryWrapper<Message> qw = new QueryWrapper<Message>().select("kh_user user,count(*) as count,DATE_FORMAT(max(create_time), '%Y-%m-%d %H:%i:%s') as time").lambda();
|
|
99
|
101
|
qw.eq( Message::getSend, 1).isNull( Message::getKfUser).groupBy(Message::getKhUser);
|
|
100
|
102
|
List<Map<String,Object>> list=messageService.getMaps(qw);
|
|
101
|
|
- if(list.stream().count()>0) {
|
|
|
103
|
+
|
|
|
104
|
+ if(list.size()>0) {
|
|
102
|
105
|
List<String> users = list.stream().map(p -> p.get("user").toString()).collect(Collectors.toList());
|
|
103
|
106
|
LambdaQueryWrapper<Customer> qw1 = new LambdaQueryWrapper<>();
|
|
104
|
107
|
qw1.in(Customer::getCustomerNo, users).select(Customer::getCustomerNo, Customer::getCustomerName);
|