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
c3809c9e
Commit
c3809c9e
authored
Jul 11, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户城市标签
parent
812e2ec7
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
45 additions
and
74 deletions
+45
-74
ImageDepot.php
application/index/controller/ImageDepot.php
+2
-1
Member.php
application/index/controller/Member.php
+1
-0
UserSiteService.php
application/index/service/UserSiteService.php
+24
-0
UserSiteModel.php
application/model/UserSiteModel.php
+18
-73
No files found.
application/index/controller/ImageDepot.php
View file @
c3809c9e
...
...
@@ -181,7 +181,8 @@ class ImageDepot extends Basic
// $res = $s_user_agent->moveHouse();
$s
=
new
UserSiteService
();
$res
=
$s
->
moveUserSite
();
// $res = $s->moveUserSite();
$res
=
$s
->
getSiteNameList
(
135573
);
// dump($res);
}
...
...
application/index/controller/Member.php
View file @
c3809c9e
...
...
@@ -8,6 +8,7 @@ use app\api_broker\service\RedisCacheService;
use
app\api_broker\service\VipService
;
use
app\index\extend\Basic
;
use
app\index\service\BrokerService
;
use
app\index\service\UserAgentService
;
use
app\index\service\UserService
;
use
app\model\AAgents
;
use
app\model\GOperatingRecords
;
...
...
application/index/service/UserSiteService.php
View file @
c3809c9e
...
...
@@ -129,4 +129,27 @@ class UserSiteService
}
/**
* 客户城市标签
* @param $user_id
* @return string
*/
public
function
getSiteNameList
(
$user_id
)
{
//查询总监下面门店的所有经纪人
$params
=
[];
$params
[
"a.user_id"
]
=
$user_id
;
$field
=
'b.city'
;
$res
=
$this
->
m_user_site
->
getSiteNameList
(
$field
,
$params
);
$list_str
=
""
;
if
(
count
(
$res
)
>
0
)
{
foreach
(
$res
as
$k
=>
$v
)
{
$list_str
.=
$v
[
"city"
]
.
","
;
}
$list_str
=
rtrim
(
$list_str
,
","
);
}
return
$list_str
;
}
}
\ No newline at end of file
application/model/UserSiteModel.php
View file @
c3809c9e
...
...
@@ -37,9 +37,9 @@ class UserSiteModel extends Model
return
$result
;
}
/
/ /
**
//
* 查询数据
//
*/
/**
* 查询数据
*/
public
function
getUserSite
(
$field
,
$params
)
{
$result
=
$this
->
db_
...
...
@@ -49,21 +49,6 @@ class UserSiteModel extends Model
//echo $this->getLastSql();
return
$result
;
}
//
// public function selectUserAgent($field,$params)
// {
// $params["a.is_del"] = 0;
// $result = $this->db_
// ->field($field)
// ->alias('a')
// ->join('u_users b', 'a.user_id = b.id', 'left')
// ->join('a_agents c', 'a.agent_id = c.id', 'left')
// ->join('a_site d', 'a.site_id = d.id', 'left')
// ->where($params)
// ->select();
// //echo $this->getLastSql();
// return $result;
// }
/**
* 更新数据
...
...
@@ -75,59 +60,19 @@ class UserSiteModel extends Model
return
$result
;
}
//
// /**
// * @param $field
// * @param $params
// * @return array
// */
// public function getUserAgentColumn($field, $params) {
// $params['is_del'] = 0;
// return $this->db_->where($params)
// ->column($field);
// }
//
// /**
// * 统计客方
// * @param $params
// * @return false|\PDOStatement|string|\think\Collection
// * @throws \think\db\exception\DataNotFoundException
// * @throws \think\db\exception\ModelNotFoundException
// * @throws \think\exception\DbException
// */
// public function getAddUserNumGroupTimeNew($params)
// {
// $field = "count(1) as num";
// $where_['is_del'] = 0;
// if (isset($params["agent_id"])) {
// $where_["agent_id"] = $params["agent_id"];
// }
// if (isset($params["create_time"])) {
// $where_["create_time"] = $params["create_time"];
// }
// return $this->db_
// ->field($field)
// ->where($where_)
// ->select();
// }
//
// public function moveHouseInsertAll($data)
// {
// $result = Db::table($this->table)
// ->insertAll($data);
// return $result;
// }
//
// /**
// * @param $field
// * @param $where
// * @return false|\PDOStatement|string|\think\Collection
// */
// public function getAllData($field, $where)
// {
// $where['is_del'] = 0;
// return $this->db_->field($field)
// ->where($where)
// ->select();
// }
public
function
getSiteNameList
(
$field
,
$params
)
{
$params
[
"a.is_del"
]
=
0
;
$result
=
$this
->
db_
->
field
(
$field
)
->
alias
(
'a'
)
->
join
(
'a_site b'
,
'a.site_id = b.id'
,
'left'
)
->
where
(
$params
)
->
select
();
//echo $this->getLastSql();
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