|
@@ -8,6 +8,7 @@ import org.springframework.stereotype.Service;
|
|
|
|
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
import com.free.entity.ChatRecord;
|
|
import com.free.entity.ChatRecord;
|
|
|
|
+import com.free.entity.User;
|
|
import com.free.mapper.ChatRecordMapper;
|
|
import com.free.mapper.ChatRecordMapper;
|
|
|
|
|
|
import java.util.ArrayList;
|
|
import java.util.ArrayList;
|
|
@@ -20,7 +21,8 @@ public class ChatRecordService extends ServiceImpl<ChatRecordMapper, ChatRecord>
|
|
@Autowired
|
|
@Autowired
|
|
private CustomerService customerService;
|
|
private CustomerService customerService;
|
|
|
|
|
|
-
|
|
|
|
|
|
+ @Autowired
|
|
|
|
+ private UserService userService;
|
|
|
|
|
|
/**
|
|
/**
|
|
* 将列表中的客服id和用户io的数据取出来
|
|
* 将列表中的客服id和用户io的数据取出来
|
|
@@ -39,8 +41,14 @@ public class ChatRecordService extends ServiceImpl<ChatRecordMapper, ChatRecord>
|
|
map.put("customer_name", cData.getNick_name());
|
|
map.put("customer_name", cData.getNick_name());
|
|
}
|
|
}
|
|
}
|
|
}
|
|
- // TODO:查询用户名称
|
|
|
|
- map.put("user_name", "还没有呢");
|
|
|
|
|
|
+ String user_id = i.getUser_id();
|
|
|
|
+ if (null != user_id) {
|
|
|
|
+ User uData = userService.getById(user_id);
|
|
|
|
+ if (null != uData) {
|
|
|
|
+ // 查询用户名称
|
|
|
|
+ map.put("user_name", uData.getName());
|
|
|
|
+ }
|
|
|
|
+ }
|
|
|
|
|
|
returnData.add(map);
|
|
returnData.add(map);
|
|
|
|
|