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
4ff5aaac
Commit
4ff5aaac
authored
Jun 27, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
新增或取消我关注的店铺
parent
654aff77
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
30 additions
and
13 deletions
+30
-13
OfficeFinance.php
application/index/controller/OfficeFinance.php
+9
-3
OfficeRoomService.php
application/index/service/OfficeRoomService.php
+1
-1
AttentionModel.php
application/model/AttentionModel.php
+11
-3
OfficeOPartialCommission.php
application/model/OfficeOPartialCommission.php
+9
-6
No files found.
application/index/controller/OfficeFinance.php
View file @
4ff5aaac
...
...
@@ -85,7 +85,7 @@ class OfficeFinance extends Basic
}
if
(
!
empty
(
$this
->
params
[
'internal_address'
]))
{
$where
[
'
d.internal_
address'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'internal_address'
]
.
'%'
];
$where
[
'
s.
address'
]
=
[
'like'
,
'%'
.
$this
->
params
[
'internal_address'
]
.
'%'
];
$select
=
1
;
}
...
...
@@ -104,6 +104,12 @@ class OfficeFinance extends Basic
$select
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'agents_id'
]))
{
$where
[
'e.id'
]
=
$this
->
params
[
'agents_id'
];
$select
=
1
;
}
if
(
!
empty
(
$this
->
params
[
'store_id'
]))
{
$where
[
'e.store_id'
]
=
$this
->
params
[
'store_id'
];
$select
=
1
;
...
...
@@ -114,8 +120,8 @@ class OfficeFinance extends Basic
$select
=
1
;
}
$field
=
'a.id,b.id as bargain_id,f.income_time,a.practical_fee,b.scale_fee,d.internal_address,b.agent_id,
'
;
$field
.=
'
b.house_number,b.father_id,b.order_id,a.real_income_id,a.role,b.scale'
;
$field
=
'a.id,b.id as bargain_id,f.income_time,a.practical_fee,b.scale_fee,s.address as internal_address
'
;
$field
.=
',b.agent_id,
b.house_number,b.father_id,b.order_id,a.real_income_id,a.role,b.scale'
;
// $m_commission = new OPartialCommission();
$m_Office_commission
=
new
OfficeOPartialCommission
();
...
...
application/index/service/OfficeRoomService.php
View file @
4ff5aaac
...
...
@@ -885,6 +885,7 @@ class OfficeRoomService
}
/*盘方 end*/
/*房东手机号搜索 start*/
if
(
$params
[
'landlord_phone'
]
!=
NULL
)
{
if
(
strlen
(
$params
[
'landlord_phone'
])
!=
11
)
{
...
...
@@ -910,7 +911,6 @@ class OfficeRoomService
/*房东手机号搜索 end*/
$field
=
'a.id,b.type,b.disc,b.business_district_id,b.title,a.price_total,a.area,a.station_start,a.station_end,'
;
$field
.=
'a.status,a.is_rent,a.is_show,a.create_time,a.floor_tag,a.price,a.building_id,a.is_carefully_chosen'
;
$room_data
=
$this
->
m_office_room
->
getRoomAgent
(
$page_no
,
$page_size
,
$field
,
$where
);
$m_business
=
new
GBusinessDistrict
();
foreach
(
$room_data
as
$k
=>
$v
)
{
...
...
application/model/AttentionModel.php
View file @
4ff5aaac
...
...
@@ -32,11 +32,18 @@ class AttentionModel extends Model
$arr
[
"house_id"
]
=
$params
[
'house_id'
];
}
if
(
isset
(
$params
[
'type'
])
&&
$params
[
'type'
]
==
1
)
{
$type
=
1
;
}
else
{
$type
=
0
;
}
$arr
[
"type"
]
=
$type
;
$saveWhere
=
array
();
if
(
isset
(
$params
[
'id'
]))
{
//取消关注
$result
=
$this
->
where
(
"id="
.
$params
[
'id'
])
->
where
(
"id="
.
$params
[
'id'
]
.
' and type ='
.
$type
)
->
select
();
if
(
count
(
$result
)
>
0
)
{
$saveWhere
[
"id"
]
=
$params
[
"id"
];
...
...
@@ -46,9 +53,10 @@ class AttentionModel extends Model
}
}
else
{
//关注
//保存的时候可能是上次取消关注过的所以改遍状态就行了
$where_
[
"user_id"
]
=
$params
[
'user_id'
];
$where_
[
"user_id"
]
=
$params
[
'user_id'
];
$where_
[
"house_id"
]
=
$params
[
'house_id'
];
$res
=
$this
$where_
[
"type"
]
=
$type
;
$res
=
$this
->
where
(
$where_
)
->
select
();
...
...
application/model/OfficeOPartialCommission.php
View file @
4ff5aaac
...
...
@@ -32,9 +32,10 @@ class OfficeOPartialCommission extends BaseModel
{
$data
=
$this
->
field
(
$fields
)
->
alias
(
'a'
)
->
join
(
'o_bargain b'
,
'a.bargain_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'b.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'office_o_bargain b'
,
'a.bargain_id = b.id'
,
'left'
)
->
join
(
'office_o_order c'
,
'b.order_id = c.id'
,
'left'
)
->
join
(
"office_g_room r"
,
"c.house_id = r.id"
,
"left"
)
->
join
(
"office_g_building s"
,
"r.building_id = s.id"
,
"left"
)
->
join
(
'a_agents e'
,
'b.agent_id = e.id'
,
'left'
)
->
join
(
'o_real_income f'
,
'a.real_income_id = f.id'
,
'left'
)
->
where
(
$where
)
...
...
@@ -42,6 +43,7 @@ class OfficeOPartialCommission extends BaseModel
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
big_log
(
$this
->
getLastSql
());
$m_agent
=
new
AAgents
();
$fields_str
=
'a.id,a.name,a.phone,b.store_name'
;
foreach
(
$data
as
$k
=>
$v
)
{
...
...
@@ -119,9 +121,10 @@ class OfficeOPartialCommission extends BaseModel
public
function
getCommissionBargainListTotal
(
$where
)
{
return
$this
->
alias
(
'a'
)
->
join
(
'o_bargain b'
,
'a.bargain_id = b.id'
,
'left'
)
->
join
(
'o_order c'
,
'b.order_id = c.id'
,
'left'
)
->
join
(
'g_houses d'
,
'c.house_id = d.id'
,
'left'
)
->
join
(
'office_o_bargain b'
,
'a.bargain_id = b.id'
,
'left'
)
->
join
(
'office_o_order c'
,
'b.order_id = c.id'
,
'left'
)
->
join
(
"office_g_room r"
,
"c.house_id = r.id"
,
"left"
)
->
join
(
"office_g_building s"
,
"r.building_id = s.id"
,
"left"
)
->
join
(
'a_agents e'
,
'b.agent_id = e.id'
,
'left'
)
->
join
(
'o_real_income f'
,
'a.real_income_id = f.id'
,
'left'
)
->
where
(
$where
)
...
...
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