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
44a4f461
Commit
44a4f461
authored
Jan 02, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
职称和角色
parent
c7594dee
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
52 additions
and
68 deletions
+52
-68
Agent.php
application/api_broker/controller/Agent.php
+0
-64
Broker.php
application/api_broker/controller/Broker.php
+37
-0
MyCenterService.php
application/api_broker/service/MyCenterService.php
+14
-3
route.php
application/route.php
+1
-1
No files found.
application/api_broker/controller/Agent.php
deleted
100644 → 0
View file @
c7594dee
<?php
namespace
app\api_broker\controller
;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018-11-12
* Time: 10:25:16
*/
use
app\api_broker\extend\Basic
;
use
app\model\AAgents
;
class
Agent
extends
Basic
{
protected
$aAgents
;
public
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
aAgents
=
new
AAgents
();
}
/**
* 消息页面--通讯录
* User: 朱伟
* Date: 2018-11-12
* Time: 10:49:56
* 接口文档 http://showdoc.tonglianjituan.com/index.php?s=/1&page_id=680
*/
public
function
getPhoneBook
()
{
$params
=
$this
->
params
;
$where
=
[];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
if
(
!
empty
(
$params
[
'keyword'
]))
{
$where
[
'Agents.name|Agents.phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'keyword'
]
.
'%'
];
}
$field
=
'Agents.id as agent_id,'
;
$field
.=
'Agents.name,'
;
$field
.=
'Agents.img,'
;
$field
.=
'Agents.status,'
;
$field
.=
'Agents.phone'
;
$res
=
$this
->
aAgents
->
getPhoneBookList
(
$field
,
$where
,
$pageSize
,
$pageNo
);
foreach
(
$res
as
$key
=>
$val
)
{
$res
[
$key
][
'head_portrait'
]
=
AGENTHEADERIMGURL
.
$val
[
'img'
];
}
$res_total
=
$this
->
aAgents
->
getPhoneBookListTotal
(
$where
);
return
$this
->
response
(
"200"
,
"成功"
,[
'data'
=>
$res
,
'total'
=>
$res_total
]);
}
}
\ No newline at end of file
application/api_broker/controller/Broker.php
View file @
44a4f461
...
...
@@ -910,4 +910,40 @@ class Broker extends Basic
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
* 消息页面--通讯录
* User: 朱伟
* Date: 2018-11-12
* Time: 10:49:56
* 接口文档 http://showdoc.tonglianjituan.com/index.php?s=/1&page_id=680
*/
public
function
getPhoneBook
()
{
$params
=
$this
->
params
;
$where
=
[];
$pageNo
=
empty
(
$params
[
'pageNo'
])
?
1
:
$params
[
'pageNo'
];
$pageSize
=
empty
(
$params
[
'pageSize'
])
?
15
:
$params
[
'pageSize'
];
if
(
!
empty
(
$params
[
'keyword'
]))
{
$where
[
'Agents.name|Agents.phone'
]
=
[
'LIKE'
,
'%'
.
$params
[
'keyword'
]
.
'%'
];
}
$field
=
'Agents.id as agent_id,'
;
$field
.=
'Agents.name,'
;
$field
.=
'Agents.img,'
;
$field
.=
'Agents.status,'
;
$field
.=
'Agents.phone'
;
$res
=
$this
->
a_agents
->
getPhoneBookList
(
$field
,
$where
,
$pageSize
,
$pageNo
);
foreach
(
$res
as
$key
=>
$val
)
{
$res
[
$key
][
'head_portrait'
]
=
AGENTHEADERIMGURL
.
$val
[
'img'
];
}
$res_total
=
$this
->
a_agents
->
getPhoneBookListTotal
(
$where
);
return
$this
->
response
(
"200"
,
"成功"
,[
'data'
=>
$res
,
'total'
=>
$res_total
]);
}
}
\ No newline at end of file
application/api_broker/service/MyCenterService.php
View file @
44a4f461
<?php
namespace
app\api_broker\service
;
use
app\model\AAgents
;
use
app\model\AuthGroup
;
/**
* Created by PhpStorm.
...
...
@@ -23,13 +24,17 @@ class MyCenterService{
}
/**
* 我得个人中心
* 我的个人中心
*
* @param $agent_id
* @return false|null|\PDOStatement|string|\think\Collection
* @return false|mixed|null|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
center
(
$agent_id
){
$field
=
"a.id,a.store_id,a.auth_group_id,a.district_id,a.level,a.name,a.phone,a.sex,a.img,a.status,b.store_name,
c.district_name"
;
c.district_name
,a.position
"
;
$params
[
"agent_id"
]
=
$agent_id
;
...
...
@@ -55,6 +60,11 @@ class MyCenterService{
//todo 需要计算暂时没做。
//$result["money_total"] = 1000;
if
(
!
empty
(
$result
[
'auth_group_id'
]))
{
$m_auth_group
=
new
AuthGroup
();
$auth_group_name
=
$m_auth_group
->
getValue
(
'title'
,
[
'id'
=>
$result
[
'auth_group_id'
]]);
$result
[
'auth_group_name'
]
=
empty
(
$auth_group_name
)
?
''
:
$auth_group_name
;
}
return
$result
;
}
}
\ No newline at end of file
application/route.php
View file @
44a4f461
...
...
@@ -724,7 +724,7 @@ Route::group('broker', [
'getAgentSiteList'
=>
[
'api_broker/Site/getAgentSiteList'
,
[
'method'
=>
'POST|GET'
]
],
//获取经纪人站点列表
'getPhoneBook'
=>
[
'api_broker/
Agent
/getPhoneBook'
,
[
'method'
=>
'POST|GET'
]
],
//消息页面--通讯录
'getPhoneBook'
=>
[
'api_broker/
broker
/getPhoneBook'
,
[
'method'
=>
'POST|GET'
]
],
//消息页面--通讯录
'commentAndDeal'
=>
[
'api_broker/broker/commentAndDeal'
,
[
'method'
=>
'get'
]
],
//获取当前经纪人的评价和交易列表
'addSpreadUser'
=>
[
'api_broker/SpreadUser/addSpreadUser'
,
[
'method'
=>
'POST|GET'
]
],
'getVolume'
=>
[
'api_broker/SpreadUser/getVolume'
,
[
'method'
=>
'POST|GET'
]
],
...
...
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