Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tl_estate
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
hujun
tl_estate
Commits
692f28b4
Commit
692f28b4
authored
Jul 15, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
1
parent
e51f9e69
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
35 additions
and
1 deletion
+35
-1
UserAgentService.php
application/index/service/UserAgentService.php
+34
-1
Users.php
application/model/Users.php
+1
-0
No files found.
application/index/service/UserAgentService.php
View file @
692f28b4
...
...
@@ -125,7 +125,7 @@ class UserAgentService
public
function
moveHouseSaveData
(
$page
=
1
,
$limit
=
100
){
$field
=
"a.id as user_id,b.id as agent_id,a.site_ids as site_id,a.create_time"
;
$params
[]
=
[
'EXP'
,
'a.site_ids IS NOT NULL AND a.agent_id IS NOT NULL AND a.agent_id > 0'
];
$user_list
=
$this
->
m_user
->
moveHouse
(
$field
,
$params
,
$page
,
$limit
,
"a.id
a
sc"
);
$user_list
=
$this
->
m_user
->
moveHouse
(
$field
,
$params
,
$page
,
$limit
,
"a.id
de
sc"
);
$user_list_
=
[];
foreach
(
$user_list
as
$k
=>
$v
)
{
$site_ids
=
explode
(
','
,
$v
[
'site_id'
]);
...
...
@@ -155,6 +155,39 @@ class UserAgentService
return
true
;
}
// public function moveHouseSaveDataV2($page = 1,$limit = 100){
// $field = "a.id as user_id,b.id as agent_id,a.site_ids as site_id,a.create_time";
// $params[] = ['EXP', 'a.site_ids IS NULL AND a.agent_id IS NOT NULL AND a.agent_id > 0'];
// $user_list = $this->m_user->moveHouse($field, $params, $page, $limit, "a.id asc");
// $user_list_ = [];
// foreach ($user_list as $k => $v) {
// $site_ids = explode(',', $v['site_id']);
// foreach ($site_ids as $k1 => $v1) {
// // dump($v1);exit;
// $a = [];
// $a['user_id'] = $v['user_id'];
// $a['site_id'] = $v1;
// $a['agent_id'] = $v['agent_id'];
// $a['create_time'] = $v['create_time'];
// $a['update_time'] = $v['create_time'];
// $user_list_[] = $a;
// }
// }
//
// foreach ($user_list_ as $k2 => $v2) {
// $is_save = $this->isSaveEd($v2['user_id'],$v2['agent_id'],$v2['site_id']);
// if($is_save){
// unset($user_list_[$k2]);
// }
// }
//
//
// if($user_list_){
// $user_insert = $this->m_user_agent->moveHouseInsertAll($user_list_);
// }
// return true;
// }
/**
* 查询当前关系是否已经存在
* @param $user_id
...
...
application/model/Users.php
View file @
692f28b4
...
...
@@ -1142,6 +1142,7 @@ class Users extends Model
->
page
(
$page
)
->
limit
(
$limit
)
->
select
();
// dump($this->getLastSql());exit;
return
$result
;
}
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment