|
|
@@ -28,11 +28,6 @@ class History extends Common
|
|
|
return json(['code' => $code, 'data' => [], 'msg' => $msg]);
|
|
|
}
|
|
|
$redisconfig = require(APP_PATH . DS . 'redis.php');
|
|
|
- $redis = new Redis($redisconfig);
|
|
|
- $redis->handler()->set('debub',date('Y-m-d H:i:s'));
|
|
|
- $d = $redis->handler()->get('debub');
|
|
|
- echo $d;
|
|
|
- exit ;
|
|
|
|
|
|
try {
|
|
|
// 获取用户信息.
|
|
|
@@ -388,10 +383,12 @@ class History extends Common
|
|
|
try {
|
|
|
// 获取用户ID.
|
|
|
$accountId = input('get.account_id');
|
|
|
+ $accountId_user = input('get.account_user_id');
|
|
|
+
|
|
|
$chatLogField = ['*'];
|
|
|
// 关联信息.
|
|
|
- $chatLogWhere['from_id'] = $accountId;
|
|
|
- $chatLogWhereOr['to_id'] = $accountId;
|
|
|
+ $chatLogWhere = "from_id='$accountId' and to_id='$accountId_user'";
|
|
|
+ $chatLogWhereOr = "from_id='$accountId_user' and to_id='$accountId'";
|
|
|
// 分页.
|
|
|
$currentPage = input('get.currentPage', '1');
|
|
|
$pageSize = input('get.pageSize', '10');
|
|
|
@@ -404,6 +401,7 @@ class History extends Common
|
|
|
$offset,
|
|
|
$pageSize
|
|
|
);
|
|
|
+
|
|
|
$countChatLog = model('ChatLog')->userChatLogCount($chatLogWhere, $chatLogWhereOr);
|
|
|
|
|
|
$result['total'] = $countChatLog;
|