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
c314d871
Commit
c314d871
authored
Nov 22, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
shop
parent
b721de41
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
33 additions
and
5 deletions
+33
-5
Shop.php
application/api_broker/controller/Shop.php
+22
-4
AAgents.php
application/model/AAgents.php
+10
-0
GHousesToAgents.php
application/model/GHousesToAgents.php
+1
-1
No files found.
application/api_broker/controller/Shop.php
View file @
c314d871
...
@@ -494,8 +494,8 @@ class Shop extends Basic
...
@@ -494,8 +494,8 @@ class Shop extends Basic
$result
[
"enter_num"
]
.=
$str
;
$result
[
"enter_num"
]
.=
$str
;
$verify
=
new
VerifyService
();
$verify
=
new
VerifyService
();
$
agentId
=
$verify
->
getPanpartyAgentsByHouseId
(
$params
[
"id"
]);
$
panPartyArr
=
$verify
->
getPanpartyAgentsByHouseId
(
$params
[
"id"
]);
$result
[
"panParty"
]
=
$
agentId
;
$result
[
"panParty"
]
=
$
panPartyArr
;
// 计数开始
// 计数开始
...
@@ -544,15 +544,33 @@ class Shop extends Basic
...
@@ -544,15 +544,33 @@ class Shop extends Basic
$vip_services
=
new
VipService
();
$vip_services
=
new
VipService
();
$result
[
'is_can_edit'
]
=
$vip_services
->
vip
(
$params
[
'user_id'
],
'index/houseEdit'
);
$result
[
'is_can_edit'
]
=
$vip_services
->
vip
(
$params
[
'user_id'
],
'index/houseEdit'
);
}
}
$is_bool
=
$this
->
isCanEditByAgentId
(
$panPartyArr
);
if
(
$is_bool
){
$result
[
'is_can_edit'
]
=
0
;
}
$result
[
'new_sign_rule'
]
=
"付
{
$result
[
'payment_month'
]
}
押
{
$result
[
'deposit_month'
]
}
,签订
{
$result
[
'age_limit'
]
}
年"
;
$result
[
'new_sign_rule'
]
=
"付
{
$result
[
'payment_month'
]
}
押
{
$result
[
'deposit_month'
]
}
,签订
{
$result
[
'age_limit'
]
}
年"
;
$result
[
'payment_deposit'
]
=
empty
(
$result
[
'payment_month'
])
?
""
:
"付
{
$result
[
'payment_month'
]
}
押
{
$result
[
'deposit_month'
]
}
"
;
$result
[
'payment_deposit'
]
=
empty
(
$result
[
'payment_month'
])
?
""
:
"付
{
$result
[
'payment_month'
]
}
押
{
$result
[
'deposit_month'
]
}
"
;
$result
[
'age_limit'
]
=
empty
(
$result
[
'age_limit'
])
?
""
:
"签订
{
$result
[
'age_limit'
]
}
年"
;
$result
[
'age_limit'
]
=
empty
(
$result
[
'age_limit'
])
?
""
:
"签订
{
$result
[
'age_limit'
]
}
年"
;
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
return
$this
->
response
(
"200"
,
'request success'
,
$result
);
}
}
private
function
isCanEditByAgentId
(
$agent_id
){
/**
* 判断是否是此楼盘盘方的店长
* @param $panPartyArr
* @return bool
*/
private
function
isCanEditByAgentId
(
$panPartyArr
){
$agentModel
=
new
AAgents
();
foreach
(
$panPartyArr
as
$item
){
$params
[
"store_id"
]
=
$item
[
"store_id"
];
$params
[
"level"
]
=
array
(
"in"
,
"20,40"
);
$agentModel
->
getStoreIdByAgentId
(
"id"
,
$params
);
if
(
$this
->
agentId
==
$agentModel
[
0
][
"id"
]){
return
true
;
}
}
return
false
;
}
}
/**
/**
...
...
application/model/AAgents.php
View file @
c314d871
...
@@ -1525,4 +1525,13 @@ class AAgents extends BaseModel
...
@@ -1525,4 +1525,13 @@ class AAgents extends BaseModel
return
$result
;
return
$result
;
}
}
public
function
getStoreIdByAgentId
(
$field
,
$params
)
{
$result
=
$this
->
field
(
$field
)
->
where
(
$params
)
->
select
();
}
}
}
\ No newline at end of file
application/model/GHousesToAgents.php
View file @
c314d871
...
@@ -308,7 +308,7 @@ class GHousesToAgents extends BaseModel
...
@@ -308,7 +308,7 @@ class GHousesToAgents extends BaseModel
public
function
getHousesUpdateAgents
(
$houses_id
)
public
function
getHousesUpdateAgents
(
$houses_id
)
{
{
$select_data
=
$this
$select_data
=
$this
->
field
(
'b.id,b.name,b.img,a.type,b.phone,c.store_name,d.district_name'
)
->
field
(
'b.id,b.
store_id,b.
name,b.img,a.type,b.phone,c.store_name,d.district_name'
)
->
alias
(
'a'
)
->
alias
(
'a'
)
->
join
(
'a_agents b'
,
'a.agents_id = b.id'
,
'LEFT'
)
->
join
(
'a_agents b'
,
'a.agents_id = b.id'
,
'LEFT'
)
->
join
(
"a_store c"
,
"b.store_id = c.id"
,
"left"
)
->
join
(
"a_store c"
,
"b.store_id = c.id"
,
"left"
)
...
...
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