You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
34 lines
655 B
34 lines
655 B
<?php
|
|
|
|
namespace app\base\model\mpqq;
|
|
|
|
use app\base\model\Base;
|
|
use think\model\concern\SoftDelete;
|
|
|
|
class MpqqUser extends Base
|
|
{
|
|
use SoftDelete;
|
|
|
|
// 设置当前模型对应的完整数据表名称
|
|
protected $table = 'base_mpqq_user';
|
|
|
|
/**
|
|
* 更新平台用户信息
|
|
* @param array $data 小程序用户信息
|
|
* @date 2021-07-01
|
|
*/
|
|
public function updateUser($data)
|
|
{
|
|
$where = [
|
|
['openid', '=', $data['openid']]
|
|
];
|
|
$id = $this->getOneData($where, 'id');
|
|
|
|
if (!empty($id)) {
|
|
$data['id'] = $id;
|
|
}
|
|
|
|
return $this->dataUpdate($data);
|
|
}
|
|
}
|