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
4e049ceb
Commit
4e049ceb
authored
Apr 04, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug
parent
7197a280
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
34 additions
and
8 deletions
+34
-8
Broker.php
application/api_broker/controller/Broker.php
+15
-0
SquareService.php
application/api_broker/service/SquareService.php
+1
-2
Square.php
application/index/controller/Square.php
+2
-6
AAgents.php
application/model/AAgents.php
+12
-0
route.php
application/route.php
+4
-0
No files found.
application/api_broker/controller/Broker.php
View file @
4e049ceb
...
@@ -1092,4 +1092,18 @@ class Broker extends Basic
...
@@ -1092,4 +1092,18 @@ class Broker extends Basic
$data
[
'total'
]
=
$res_total
;
$data
[
'total'
]
=
$res_total
;
return
$this
->
response
(
"200"
,
"成功"
,
$data
);
return
$this
->
response
(
"200"
,
"成功"
,
$data
);
}
}
public
function
getAgentDistrictId
(){
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"phone"
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$get_params
[
'a.phone'
]
=
$params
[
'phone'
];
$get_params
[
"a.status"
]
=
array
(
"in"
,
"0,3"
);
$get_params
[
'a.level'
]
=
array
(
'in'
,
'30,40'
);
$data
=
$this
->
a_agents
->
getAgentDistrictId
(
"a.id,a.name,a.site_id,b.name"
,
$get_params
);
return
$this
->
response
(
"200"
,
"成功"
,
$data
);
}
}
}
\ No newline at end of file
application/api_broker/service/SquareService.php
View file @
4e049ceb
...
@@ -246,7 +246,7 @@ class SquareService
...
@@ -246,7 +246,7 @@ class SquareService
}
}
public
function
getCommenInfo
(
$params
){
public
function
getCommenInfo
(
$params
){
$field
=
'Comment.id,Comment.comment,Comment.create_time'
;
//
$field
=
'Comment.id,Comment.comment,Comment.create_time
,Comment.agent_id
'
;
//
$get_params
[
'Comment.id'
]
=
$params
[
'id'
];
$get_params
[
'Comment.id'
]
=
$params
[
'id'
];
$res
=
$this
->
m_coment
->
getCommenInfo
(
$field
,
$get_params
);
$res
=
$this
->
m_coment
->
getCommenInfo
(
$field
,
$get_params
);
...
@@ -292,7 +292,6 @@ class SquareService
...
@@ -292,7 +292,6 @@ class SquareService
$res
[
$key2
][
'agent_name_a'
]
=
$agent_a
[
'name'
];
$res
[
$key2
][
'agent_name_a'
]
=
$agent_a
[
'name'
];
$res
[
$key2
][
'agent_name_b'
]
=
$agent_b
[
'name'
];
$res
[
$key2
][
'agent_name_b'
]
=
$agent_b
[
'name'
];
}
}
}
}
return
[
'data'
=>
$res
,
'total'
=>
$res_total
];
return
[
'data'
=>
$res
,
'total'
=>
$res_total
];
...
...
application/index/controller/Square.php
View file @
4e049ceb
...
@@ -107,12 +107,8 @@ class Square extends Basic
...
@@ -107,12 +107,8 @@ class Square extends Basic
return
$this
->
response
(
"101"
,
"参数不全"
);
return
$this
->
response
(
"101"
,
"参数不全"
);
}
}
$res
=
$this
->
s_square
->
editSquare
(
$params
);
$this
->
s_square
->
editSquare
(
$params
);
if
(
$res
)
{
return
$this
->
response
(
"200"
,
"成功"
);
return
$this
->
response
(
"200"
,
"成功"
);
}
else
{
return
$this
->
response
(
"101"
,
"失败"
);
}
}
}
...
...
application/model/AAgents.php
View file @
4e049ceb
...
@@ -1650,4 +1650,15 @@ class AAgents extends BaseModel
...
@@ -1650,4 +1650,15 @@ class AAgents extends BaseModel
->
find
();
->
find
();
}
}
public
function
getAgentDistrictId
(
$field
,
$params
)
{
$result
=
Db
::
table
(
$this
->
table
)
->
alias
(
'a'
)
->
field
(
$field
)
->
join
(
'a_site b'
,
'a.site_id=b.id'
,
'left'
)
->
where
(
$params
)
->
select
();
return
$result
;
}
}
}
\ No newline at end of file
application/route.php
View file @
4e049ceb
...
@@ -866,6 +866,9 @@ Route::group('broker', [
...
@@ -866,6 +866,9 @@ Route::group('broker', [
'getSquareCommentExtList'
=>
[
'api_broker/Square/getSquareCommentExtList'
,
[
'method'
=>
'GET|POST'
]
],
'getSquareCommentExtList'
=>
[
'api_broker/Square/getSquareCommentExtList'
,
[
'method'
=>
'GET|POST'
]
],
'editCommenSort'
=>
[
'api_broker/Square/editCommenSort'
,
[
'method'
=>
'GET|POST'
]
],
'editCommenSort'
=>
[
'api_broker/Square/editCommenSort'
,
[
'method'
=>
'GET|POST'
]
],
'getAgentDistrictId'
=>
[
'api_broker/Broker/getAgentDistrictId'
,
[
'method'
=>
'GET|POST'
]
],
]);
]);
//Route::miss('api/index/miss');//处理错误的url
//Route::miss('api/index/miss');//处理错误的url
\ No newline at end of file
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