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
7a8bf575
Commit
7a8bf575
authored
Dec 12, 2017
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
edit
parent
25baa234
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
1 deletion
+44
-1
Broker.php
application/api/controller/Broker.php
+24
-1
Agents.php
application/model/Agents.php
+19
-0
route.php
application/route.php
+1
-0
No files found.
application/api/controller/Broker.php
View file @
7a8bf575
...
@@ -6,6 +6,7 @@ use app\model\Agents;
...
@@ -6,6 +6,7 @@ use app\model\Agents;
use
app\model\Evaluate
;
use
app\model\Evaluate
;
use
app\model\EvaluateSign
;
use
app\model\EvaluateSign
;
use
app\model\JournalAccounts
;
use
app\model\JournalAccounts
;
use
think\Db
;
/**
/**
* Description of Agents
* Description of Agents
*
*
...
@@ -134,7 +135,7 @@ class Broker extends Basic{
...
@@ -134,7 +135,7 @@ class Broker extends Basic{
//评价列表信息
//评价列表信息
$result
[
'evaluate'
]
=
$evalutate
->
getEvaluate
(
$pageNo
,
$pageSize
,
'id desc'
,
$fields_evaluate
,
''
,
$params
[
'agent_id'
]);
$result
[
'evaluate'
]
=
$evalutate
->
getEvaluate
(
$pageNo
,
$pageSize
,
'id desc'
,
$fields_evaluate
,
''
,
$params
[
'agent_id'
]);
//成交记录
//成交记录
$result
[
'journalAccounts'
]
=
$journal
->
getJournalHouseInfo
(
$pageNo
,
$pageSize
,
'j.id desc'
,
$fields
,
'j.transaction_status = 3'
,
$params
[
'agent_id'
]);
$result
[
'journalAccounts'
]
=
$journal
->
getJournalHouseInfo
(
$pageNo
,
$pageSize
,
'j.id desc'
,
''
,
'j.transaction_status = 3'
,
$params
[
'agent_id'
]);
$data
[
'data'
]
=
$result
;
$data
[
'data'
]
=
$result
;
break
;
break
;
case
1
:
case
1
:
...
@@ -158,4 +159,26 @@ class Broker extends Basic{
...
@@ -158,4 +159,26 @@ class Broker extends Basic{
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
/**
* 经纪人详情
*
* @return type
*/
public
function
brokerDetail
()
{
$data
[
'status'
]
=
200
;
$data
[
'data'
]
=
''
;
$data
[
'msg'
]
=
''
;
if
(
$this
->
params
[
'id'
])
{
$agents
=
new
Agents
();
$data
[
'data'
]
=
$agents
->
agentsDetail
(
$this
->
params
[
'id'
]);
}
else
{
$data
[
'status'
]
=
101
;
$data
[
'msg'
]
=
'agent_id is null'
;
}
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
}
}
application/model/Agents.php
View file @
7a8bf575
...
@@ -3,6 +3,7 @@
...
@@ -3,6 +3,7 @@
namespace
app\model
;
namespace
app\model
;
use
think\Model
;
use
think\Model
;
use
think\Db
;
class
Agents
extends
Model
class
Agents
extends
Model
{
{
...
@@ -50,4 +51,22 @@ class Agents extends Model
...
@@ -50,4 +51,22 @@ class Agents extends Model
return
$data
;
return
$data
;
}
}
/**
* 经纪人详情
*
* @param type $id
* @return boolean
*/
public
function
agentsDetail
(
$id
)
{
if
(
$id
)
{
$result
=
$this
->
field
(
'id,realname,created,sub_shopname,head_portrait'
)
->
where
(
'id'
,
$id
)
->
find
();
$result
[
'head_portrait'
]
=
'user_header/'
.
$result
[
'head_portrait'
];
$result
[
'evaluate_grade'
]
=
Db
::
table
(
''
);
}
else
{
$data
=
false
;
}
return
$result
;
}
}
}
application/route.php
View file @
7a8bf575
...
@@ -54,6 +54,7 @@ Route::group('api',[
...
@@ -54,6 +54,7 @@ Route::group('api',[
//get broker
//get broker
'getBroker'
=>
[
'api/broker/index'
,[
'method'
=>
'get'
]],
//获取当前商铺或街铺的经纪人
'getBroker'
=>
[
'api/broker/index'
,[
'method'
=>
'get'
]],
//获取当前商铺或街铺的经纪人
'commentAndDeal'
=>
[
'api/broker/commentAndDeal'
,[
'method'
=>
'get'
]],
//获取当前经纪人的评价和交易列表
'commentAndDeal'
=>
[
'api/broker/commentAndDeal'
,[
'method'
=>
'get'
]],
//获取当前经纪人的评价和交易列表
'brokerDetail/:id'
=>
[
'api/broker/brokerDetail'
,[
'method'
=>
'get'
]],
//经纪人详情
//post broker
//post broker
'appraiser'
=>
[
'api/broker/appraiser'
,[
'method'
=>
'post'
]],
//评价经纪人
'appraiser'
=>
[
'api/broker/appraiser'
,[
'method'
=>
'post'
]],
//评价经纪人
...
...
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