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
fe71a2e6
Commit
fe71a2e6
authored
Apr 24, 2019
by
hujun
Browse files
Options
Browse Files
Download
Plain Diff
Merge remote-tracking branch 'origin/0416-v3.2.5' into 0416-v3.2.5
parents
02cde00d
4e64ea8c
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
85 additions
and
18 deletions
+85
-18
Bargain.php
application/api_broker/controller/Bargain.php
+13
-12
BargainService.php
application/api_broker/service/BargainService.php
+53
-0
FindShop.php
application/index/controller/FindShop.php
+9
-5
OBargainModel.php
application/model/OBargainModel.php
+0
-1
UFindShop.php
application/model/UFindShop.php
+10
-0
No files found.
application/api_broker/controller/Bargain.php
View file @
fe71a2e6
...
@@ -114,16 +114,16 @@ class Bargain extends Basic
...
@@ -114,16 +114,16 @@ class Bargain extends Basic
public
function
bargainListSearchBargainId
()
public
function
bargainListSearchBargainId
()
{
{
$params
=
$this
->
params
;
$params
=
$this
->
params
;
/*
$params = array(
/*
"submit_agent_id" => 93,
AuthToken:eyJ0eXAiOiJKV1QiLCJhbGciOiJIUzI1NiJ9.eyJkYXRhIjp7ImlkIjo1Nzc1LCJuYW1lIjoiXHU2ZDRiXHU4YmQ1MiIsInBob25lIjoiMTU2MDE2NTIzNTIiLCJsZXZlbCI6MjB9LCJ0aW1lU3RhbXBfIjoxNTU2MDc0NjY1fQ.EmHCH_QtMdymkAbYSLBGJ6q2-DUtrcv0ngXBDAKlMU4
"status" => 1,//0全部 1未结单 2已结单 3 撤销审核 4已撤销
is_my_correlation:0
"is_my_correlation" => 1, //是否与我相关 0全部 1与我相关
keyword:288
"keyword" => "17717536291",
page_no:1
"page_no" => 1,
page_size:15
"page_size" => 10,
status:5
"bargain_id" =>10
submit_agent_id:5775
);*/
type:3
*/
$checkResult
=
$this
->
validate
(
$params
,
"BargainValidate.bargainList"
);
$checkResult
=
$this
->
validate
(
$params
,
"BargainValidate.bargainList"
);
if
(
true
!==
$checkResult
)
{
if
(
true
!==
$checkResult
)
{
...
@@ -136,16 +136,17 @@ class Bargain extends Basic
...
@@ -136,16 +136,17 @@ class Bargain extends Basic
$is_my_correlation
=
$params
[
"is_my_correlation"
];
$is_my_correlation
=
$params
[
"is_my_correlation"
];
$keyword
=
empty
(
$params
[
"keyword"
])
?
""
:
$params
[
"keyword"
];
$keyword
=
empty
(
$params
[
"keyword"
])
?
""
:
$params
[
"keyword"
];
$bargain_id
=
empty
(
$params
[
'bargain_id'
])
?
''
:
$params
[
'bargain_id'
];
$bargain_id
=
empty
(
$params
[
'bargain_id'
])
?
''
:
$params
[
'bargain_id'
];
$type
=
empty
(
$params
[
'type'
])
?
''
:
$params
[
'type'
];
/*业务员不允许点击查看全部成交报告 start*/
/*业务员不允许点击查看全部成交报告 start*/
$agent_field
=
"a.level"
;
$agent_field
=
"a.level"
;
$agent_res
=
$this
->
agentModel
->
getAgentsInfoByAgentId
(
$agent_field
,
[
"agent_id"
=>
$submit_agent_id
]);
$agent_res
=
$this
->
agentModel
->
getAgentsInfoByAgentId
(
$agent_field
,
[
"agent_id"
=>
$submit_agent_id
]);
if
((
$agent_res
[
0
][
'level'
]
==
10
)
&&
(
$is_my_correlation
==
0
)){
if
((
$agent_res
[
0
][
'level'
]
==
10
)
&&
(
$is_my_correlation
==
0
)){
return
$this
->
response
(
"101"
,
"暂无权限!
2
"
);
return
$this
->
response
(
"101"
,
"暂无权限!"
);
}
}
/*业务员不允许点击查看全部成交报告 end*/
/*业务员不允许点击查看全部成交报告 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
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
}
...
...
application/api_broker/service/BargainService.php
View file @
fe71a2e6
...
@@ -74,6 +74,59 @@ class BargainService
...
@@ -74,6 +74,59 @@ class BargainService
return
$convertResult
;
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
)
private
function
convert
(
$is_my_correlation
,
$result
)
{
{
$sortResult
=
[];
$sortResult
=
[];
...
...
application/index/controller/FindShop.php
View file @
fe71a2e6
...
@@ -36,8 +36,8 @@ class FindShop extends Basic
...
@@ -36,8 +36,8 @@ class FindShop extends Basic
"page_no" => 1,
"page_no" => 1,
"page_size" => 15,
"page_size" => 15,
);*/
);*/
$pageNo
=
empty
(
$params
[
'page
No'
])
?
1
:
$params
[
'pageN
o'
];
$pageNo
=
empty
(
$params
[
'page
_no'
])
?
1
:
$params
[
'page_n
o'
];
$pageSize
=
empty
(
$params
[
'page
Size'
])
?
15
:
$params
[
'pageS
ize'
];
$pageSize
=
empty
(
$params
[
'page
_size'
])
?
15
:
$params
[
'page_s
ize'
];
$conditions
=
[];
$conditions
=
[];
if
(
$params
[
'is_my'
]
!=
0
&&
$params
[
'is_my'
]
!=
1
)
{
if
(
$params
[
'is_my'
]
!=
0
&&
$params
[
'is_my'
]
!=
1
)
{
...
@@ -72,10 +72,14 @@ class FindShop extends Basic
...
@@ -72,10 +72,14 @@ class FindShop extends Basic
$
resul
t
=
$findShopModel
->
getFindShopAndUserList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
);
$
lis
t
=
$findShopModel
->
getFindShopAndUserList
(
$field
,
$conditions
,
$pageNo
,
$pageSize
);
foreach
(
$
resul
t
as
$key
=>
$item
){
foreach
(
$
lis
t
as
$key
=>
$item
){
$
resul
t
[
$key
][
"user_phone"
]
=
substr_replace
(
$item
[
"user_phone"
],
'****'
,
3
,
4
);
$
lis
t
[
$key
][
"user_phone"
]
=
substr_replace
(
$item
[
"user_phone"
],
'****'
,
3
,
4
);
}
}
$total
=
$findShopModel
->
getFindShopAndUserCount
(
$field
,
$conditions
);
$result
[
"list"
]
=
$list
;
$result
[
"total"
]
=
$total
;
return
$this
->
response
(
"200"
,
"success"
,
$result
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
...
...
application/model/OBargainModel.php
View file @
fe71a2e6
...
@@ -260,7 +260,6 @@ class OBargainModel extends Model
...
@@ -260,7 +260,6 @@ class OBargainModel extends Model
if
(
!
isset
(
$params
[
"type"
])
&&
isset
(
$params
[
"keyword"
]))
{
if
(
!
isset
(
$params
[
"type"
])
&&
isset
(
$params
[
"keyword"
]))
{
$where_
[
"b.user_phone|b.user_name|d.internal_address"
]
=
array
(
"like"
,
"%"
.
$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
switch
((
int
)
$params
[
"type"
]){
//1商铺id 2商铺地址 3成交报告id 4带看id 5客户id
case
1
:
case
1
:
$where_
[
"d.id"
]
=
$params
[
"keyword"
];
$where_
[
"d.id"
]
=
$params
[
"keyword"
];
...
...
application/model/UFindShop.php
View file @
fe71a2e6
...
@@ -60,6 +60,16 @@ class UFindShop extends Model{
...
@@ -60,6 +60,16 @@ class UFindShop extends Model{
->
limit
(
$page_size
)
->
limit
(
$page_size
)
->
select
();
->
select
();
}
}
public
function
getFindShopAndUserCount
(
$field
,
$params
)
{
$params
[
"a.status"
]
=
0
;
return
$this
->
db_
->
alias
(
"a"
)
->
join
(
"u_users b"
,
"a.user_id = b.id"
,
"left"
)
->
field
(
$field
)
->
where
(
$params
)
->
count
();
}
/**
/**
* @param $params
* @param $params
...
...
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