提交 5f40abf3 编写于 作者: D devil_gong

数据优化

上级 59caa708
......@@ -49,7 +49,6 @@ class Message extends Common
// 参数
$params = $this->data_post;
$params['user'] = $this->user;
$params['user_type'] = 'user';
// 消息更新未已读
MessageService::MessageRead($params);
......
......@@ -50,7 +50,6 @@ class UserIntegral extends Common
// 参数
$params = $this->data_post;
$params['user'] = $this->user;
$params['user_type'] = 'user';
// 分页
$number = 10;
......
......@@ -50,7 +50,6 @@ class Message extends Common
// 参数
$params = input();
$params['user'] = $this->user;
$params['user_type'] = 'user';
// 消息更新未已读
MessageService::MessageRead($params);
......
......@@ -50,7 +50,6 @@ class UserIntegral extends Common
// 参数
$params = input();
$params['user'] = $this->user;
$params['user_type'] = 'user';
// 分页
$number = 10;
......
......@@ -69,20 +69,13 @@ class IntegralService
*/
public static function UserIntegralLogListWhere($params = [])
{
// 用户类型
$user_type = isset($params['user_type']) ? $params['user_type'] : 'user';
// 条件初始化
$where = [];
// 用户类型
if(isset($params['user_type']) && $params['user_type'] == 'user')
// 用户id
if(!empty($params['user']))
{
// 用户id
if(!empty($params['user']))
{
$where[] = ['user_id', '=', $params['user']['id']];
}
$where[] = ['user_id', '=', $params['user']['id']];
}
if(!empty($params['keywords']))
......
......@@ -62,9 +62,6 @@ class MessageService
*/
public static function MessageListWhere($params = [])
{
// 用户类型
$user_type = isset($params['user_type']) ? $params['user_type'] : 'user';
// 条件初始化
$where = [
['is_delete_time', '=', 0],
......@@ -76,14 +73,10 @@ class MessageService
$where[] = ['id', '=', $params['id']];
}
// 用户类型
if(isset($params['user_type']) && $params['user_type'] == 'user')
// 用户id
if(!empty($params['user']))
{
// 用户id
if(!empty($params['user']))
{
$where[] = ['user_id', '=', $params['user']['id']];
}
$where[] = ['user_id', '=', $params['user']['id']];
}
// 关键字
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册