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
4e64ea8c
Commit
4e64ea8c
authored
Apr 24, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
调整 搜索成交报告id
parent
f3994309
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
66 additions
and
13 deletions
+66
-13
Bargain.php
application/api_broker/controller/Bargain.php
+13
-12
BargainService.php
application/api_broker/service/BargainService.php
+53
-0
OBargainModel.php
application/model/OBargainModel.php
+0
-1
No files found.
application/api_broker/controller/Bargain.php
View file @
4e64ea8c
...
...
@@ -114,16 +114,16 @@ class Bargain extends Basic
public
function
bargainListSearchBargainId
()
{
$params
=
$this
->
params
;
/*
$params = array(
"submit_agent_id" => 93,
"status" => 1,//0全部 1未结单 2已结单 3 撤销审核 4已撤销
"is_my_correlation" => 1, //是否与我相关 0全部 1与我相关
"keyword" => "17717536291",
"page_no" => 1,
"page_size" => 10,
"bargain_id" =>10
);*/
/*
AuthToken:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo1Nzc1LCJuYW1lIjoiXHU2ZDRiXHU4YmQ1MiIsInBob25lIjoiMTU2MDE2NTIzNTIiLCJsZXZlbCI6MjB9LCJ0aW1lU3RhbXBfIjoxNTU2MDc0NjY1fQ.EmHCH_QtMdymkAbYSLBGJ6q2-DUtrcv0ngXBDAKlMU4
is_my_correlation:0
keyword:288
page_no:1
page_size:15
status:5
submit_agent_id:5775
type:3
*/
$checkResult
=
$this
->
validate
(
$params
,
"BargainValidate.bargainList"
);
if
(
true
!==
$checkResult
)
{
...
...
@@ -136,16 +136,17 @@ class Bargain extends Basic
$is_my_correlation
=
$params
[
"is_my_correlation"
];
$keyword
=
empty
(
$params
[
"keyword"
])
?
""
:
$params
[
"keyword"
];
$bargain_id
=
empty
(
$params
[
'bargain_id'
])
?
''
:
$params
[
'bargain_id'
];
$type
=
empty
(
$params
[
'type'
])
?
''
:
$params
[
'type'
];
/*业务员不允许点击查看全部成交报告 start*/
$agent_field
=
"a.level"
;
$agent_res
=
$this
->
agentModel
->
getAgentsInfoByAgentId
(
$agent_field
,
[
"agent_id"
=>
$submit_agent_id
]);
if
((
$agent_res
[
0
][
'level'
]
==
10
)
&&
(
$is_my_correlation
==
0
)){
return
$this
->
response
(
"101"
,
"暂无权限!
2
"
);
return
$this
->
response
(
"101"
,
"暂无权限!"
);
}
/*业务员不允许点击查看全部成交报告 end*/
$result
=
$this
->
service_
->
getBargainList
(
$pageNo
,
$pageSize
,
$submit_agent_id
,
$status
,
$is_my_correlation
,
$keyword
,
$bargain_id
);
$result
=
$this
->
service_
->
getBargainList
V2
(
$pageNo
,
$pageSize
,
$submit_agent_id
,
$status
,
$is_my_correlation
,
$keyword
,
$bargain_id
,
$type
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
...
...
application/api_broker/service/BargainService.php
View file @
4e64ea8c
...
...
@@ -74,6 +74,59 @@ class BargainService
return
$convertResult
;
}
public
function
getBargainListV2
(
$pageNo
,
$pageSize
,
$submit_agent_id
,
$status
,
$is_my_correlation
,
$keyword
,
$bargain_id
,
$type
)
{
$condition
=
[];
if
(
$is_my_correlation
==
1
)
{
$aService
=
new
VerifyService
();
$ids
=
$aService
->
getAgentsByAgentId
(
$submit_agent_id
);
$condition
[
"ids"
]
=
$ids
;
}
else
{
$condition
[
"father_id"
]
=
0
;
}
switch
(
$status
)
{
case
1
:
$condition
[
"account_statement"
]
=
0
;
break
;
case
2
:
$condition
[
"account_statement"
]
=
1
;
break
;
case
3
:
$condition
[
"status"
]
=
20
;
break
;
case
4
:
$condition
[
"status"
]
=
21
;
break
;
case
5
://
调账
->
搜成交报告
不包括
待撤销和已撤销
$condition
[
"status"
]
=
array
(
'not in'
,
'20,21'
);
break
;
default
:
}
if
(
!
empty
(
$keyword
))
{
$condition
[
"keyword"
]
=
$keyword
;
}
if
(
!
empty
(
$bargain_id
))
{
$condition
[
"id"
]
=
$bargain_id
;
}
if
(
!
empty
(
$type
))
{
$condition
[
"type"
]
=
$type
;
}
$bargainModel
=
new
OBargainModel
();
$filed
=
"a.id,a.father_id,a.house_number,a.price,a.commission,a.agent_id,a.create_time,b.user_phone,
b.user_name,b.user_id,c.id as order_id,c.order_no,d.id as house_id,d.internal_title,d.internal_address,b.id as report_id"
;
$result
=
$bargainModel
->
selectBargainList
(
$filed
,
$condition
,
$pageNo
,
$pageSize
);
$convertResult
[
"total"
]
=
count
(
$result
);
$convertResult
[
"result"
]
=
$this
->
convert
(
$is_my_correlation
,
$result
);
return
$convertResult
;
}
private
function
convert
(
$is_my_correlation
,
$result
)
{
$sortResult
=
[];
...
...
application/model/OBargainModel.php
View file @
4e64ea8c
...
...
@@ -260,7 +260,6 @@ class OBargainModel extends Model
if
(
!
isset
(
$params
[
"type"
])
&&
isset
(
$params
[
"keyword"
]))
{
$where_
[
"b.user_phone|b.user_name|d.internal_address"
]
=
array
(
"like"
,
"%"
.
$params
[
"keyword"
]
.
"%"
);
}
switch
((
int
)
$params
[
"type"
]){
//1商铺id 2商铺地址 3成交报告id 4带看id 5客户id
case
1
:
$where_
[
"d.id"
]
=
$params
[
"keyword"
];
...
...
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