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
7984c618
Commit
7984c618
authored
Jan 30, 2018
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into chat_0818
parents
8be47e8e
919ab834
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
54 additions
and
28 deletions
+54
-28
AttentionShop.php
application/api/controller/AttentionShop.php
+2
-1
Member.php
application/api/controller/Member.php
+20
-13
Shop.php
application/api/controller/Shop.php
+12
-5
Banner.php
application/index/controller/Banner.php
+1
-1
Evaluate.php
application/model/Evaluate.php
+1
-1
Exclusive.php
application/task/controller/Exclusive.php
+18
-7
No files found.
application/api/controller/AttentionShop.php
View file @
7984c618
...
...
@@ -73,7 +73,8 @@ class AttentionShop extends Basic
$order_
=
'a.create_time desc'
;
//b.room_num_left 前端显示已下架,不可点击到详情
$field
=
"a.id,a.house_id,b.title,b.area,b.room_area2,b.price,b.shangpu_tags,b.room_num_left,c.foreign_name"
;
$field
=
"a.id,a.house_id,b.title,b.room_area,b.room_area2,b.price,b.shangpu_tags,b.shangpu_type,b.room_num_left
,b.rent_type,c.foreign_name"
;
if
(
!
isset
(
$params
[
"user_id"
]))
{
return
$this
->
response
(
"101"
,
"用户id不能为空"
);
...
...
application/api/controller/Member.php
View file @
7984c618
...
...
@@ -166,11 +166,14 @@ class Member extends Basic
return
$this
->
response
(
$data
[
'status'
],
$data
[
'msg'
],
$data
[
'data'
]);
}
/**
* 用户注册、编辑、邀请注册
*
* @return type
* 用户注册、编辑、邀请注册
*
* @return \think\Response
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
register
()
{
$type
=
$this
->
request
->
param
(
'type'
);
...
...
@@ -238,18 +241,22 @@ class Member extends Basic
if
(
empty
(
$user_data
->
id
))
{
if
(
$this
->
request
->
param
(
'code'
)
==
$code
&&
$code
!=
''
)
{
$referrer_source
=
$this
->
request
->
param
(
'referrer_source'
);
$referrer_id
=
$this
->
request
->
param
(
'referrer_id'
);
if
(
$referrer_source
==
20
)
{
//经纪人id 计算佣金的字段
$insert_data
[
'agent_id'
]
=
$referrer_id
;
}
$insert_data
[
'referrer_id'
]
=
$this
->
request
->
param
(
'referrer_id'
)
;
$insert_data
[
'referrer_source'
]
=
$
this
->
request
->
param
(
'referrer_source'
)
;
$insert_data
[
'referrer_id'
]
=
$referrer_id
;
$insert_data
[
'referrer_source'
]
=
$
referrer_source
;
$insert_data
[
'status'
]
=
0
;
$insert_data
[
'create_time'
]
=
$date
;
// $insert_data['update_time'] = $date;
// $insert_data['last_login_time'] = $date;
// $insert_data['last_login_ip'] = ip2long($this->request->ip());
$insert_data
[
'user_phone'
]
=
$phone
;
$insert_data
[
'user_pswd'
]
=
$pwd
;
$insert_data
[
'user_nick'
]
=
$user_nick
;
$insert_data
[
'user_pic'
]
=
$user_pic
;
$insert_data
[
'user_phone'
]
=
$phone
;
$insert_data
[
'user_pswd'
]
=
$pwd
;
$insert_data
[
'user_nick'
]
=
$user_nick
;
$insert_data
[
'user_pic'
]
=
$user_pic
;
$this
->
user
->
save
(
$insert_data
);
//注册用户
if
(
$this
->
user
->
id
)
{
...
...
application/api/controller/Shop.php
View file @
7984c618
...
...
@@ -55,7 +55,7 @@ class Shop extends Basic
$params
=
$this
->
params
;
$field
=
"a.id,a.agent_id,a.title,a.address,a.city,disc,a.disccircles,a.sales,a.yetai,a.room_area,a.room_area2,
a.shangpu_type,a.is_test,a.room_num_left,a.shangpu_tags,a.carefully_chosen,a.price,b.foreign_name,b.address_detail_c,
a.shangpu_type,a.is_test,a.room_num_left,a.shangpu_tags,a.carefully_chosen,a.price,
a.rent_type,
b.foreign_name,b.address_detail_c,
b.foreign_advantage"
;
$conditions
=
[];
...
...
@@ -90,15 +90,22 @@ class Shop extends Basic
$conditions
[
'a.shangpu_type'
]
=
array
(
"eq"
,
$params
[
'shangpu_type'
]
);
}
//面积 room_area最小面积 room_area2最大面积 参考老版本
//面积 room_area最小面积 room_area2最大面积 参考老版本
if
(
isset
(
$params
[
'area_start'
])
&&
isset
(
$params
[
'area_end'
]))
{
$conditions
[
'a.room_area'
]
=
array
(
'between'
,
array
(
$params
[
'area_start'
],
$params
[
'area_end'
]
)
);
$conditions
[
'a.room_area2'
]
=
array
(
'between'
,
array
(
$params
[
'area_start'
],
$params
[
'area_end'
]
)
);
//街铺只有一个room_area
if
(
$params
[
'shangpu_type'
]
==
0
){
$conditions
[
'a.room_area2'
]
=
array
(
'between'
,
array
(
$params
[
'area_start'
],
$params
[
'area_end'
]
)
);
}
}
else
if
(
isset
(
$params
[
'area_start'
])
&&
!
isset
(
$params
[
'area_end'
]))
{
//100米以上不用传结束面积
$conditions
[
'a.room_area'
]
=
array
(
'egt'
,
$params
[
'area_start'
]
);
$conditions
[
'a.room_area2'
]
=
array
(
'egt'
,
$params
[
'area_start'
]
);
if
(
$params
[
'shangpu_type'
]
==
0
){
$conditions
[
'a.room_area2'
]
=
array
(
'egt'
,
$params
[
'area_start'
]
);
}
}
if
(
isset
(
$params
[
'money_start'
])
&&
isset
(
$params
[
'money_end'
]))
{
//面积
$conditions
[
'a.price'
]
=
array
(
'between'
,
array
(
$params
[
'money_start'
],
$params
[
'money_end'
]
)
);
}
else
if
(
isset
(
$params
[
'money_start'
])
&&
!
isset
(
$params
[
'money_end'
]))
{
...
...
@@ -155,7 +162,7 @@ class Shop extends Basic
$field
=
"a.id,a.management_fee,a.title,a.address,a.city,a.room_area,a.room_area2,a.business_area,a.disc,a.disccircles,
a.sales,a.slotting_fee,a.transfer_fee, a.yetai,a.room_area2,a.shangpu_type,a.is_test,a.sellingpoint,a.singn_rule,
a.business_date,a.start_business_date,a.opentime,a.has_gas,a.traffic,a.has_moved,a.room_num_left,a.room_num_total,
a.shangpu_tags,a.carefully_chosen,a.price,a.dish,a.file_path,b.foreign_name,b.address_detail_c,
a.shangpu_tags,a.carefully_chosen,a.price,a.dish,a.file_path,
a.rent_type,
b.foreign_name,b.address_detail_c,
b.foreign_advantage"
;
$conditions
=
[];
...
...
@@ -171,7 +178,7 @@ class Shop extends Basic
$result
[
"api_path"
]
=
IMG_PATH
;
$param
[
"house_id"
]
=
$params
[
'id'
];
//todo 这里的是否要更改成b端后台上传的类型
//
$param["imgtype"] = 2;
$param
[
"imgtype"
]
=
2
;
$result
[
"images"
]
=
$this
->
dbImg
->
getHouseImages
(
$param
,
15
);
$param
[
"imgtype"
]
=
4
;
//图片类型:1效果图,2实景图,3样板图,4户型图,5交通图
$result
[
"plan_images"
]
=
$this
->
dbImg
->
getHouseImages
(
$param
,
4
);
...
...
application/index/controller/Banner.php
View file @
7984c618
...
...
@@ -111,7 +111,7 @@ class Banner extends Basic
$params
[
"is_show"
]
=
$_POST
[
"is_show"
];
}
if
(
empty
(
$params
[
"title"
])
||
empty
(
$params
[
"
type"
])
||
empty
(
$params
[
"url"
])
||
empty
(
$params
[
"
cover_image"
])
||
empty
(
$params
[
"sort"
]))
{
if
(
empty
(
$params
[
"title"
])
||
empty
(
$params
[
"cover_image"
])
||
empty
(
$params
[
"sort"
]))
{
return
$this
->
response
(
"101"
,
"请提交正确的请求参数"
);
}
if
(
isset
(
$params
[
'id'
]))
{
...
...
application/model/Evaluate.php
View file @
7984c618
...
...
@@ -41,7 +41,7 @@ class Evaluate extends Model
->
page
(
$pageNo
)
->
select
();
}
$data
=
array
();
$sign
=
new
EvaluateSign
();
$watch
=
new
AppointWatchShop
();
foreach
(
$result
as
$k
=>
$v
)
{
...
...
application/task/controller/Exclusive.php
View file @
7984c618
...
...
@@ -9,29 +9,40 @@
*/
namespace
app\task\controller
;
use
app\model\HouseInfos
;
use
think\Log
;
class
Exclusive
{
/**
* 独家时间过期下架商铺
*
* @return type
*
* @return string
* @throws \Exception
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
exclusiveExpirationTime
()
{
$house
=
new
HouseInfos
();
$house_data
=
$house
->
field
(
'id,room_num_left,exclusive_end'
)
->
where
(
'exclusive_type'
,
1
)
->
where
(
'is_delete'
,
0
)
->
select
();
$house_data
=
$house
->
field
(
'id,room_num_left,exclusive_end'
)
->
where
(
'exclusive_type'
,
1
)
->
where
(
'is_delete'
,
0
)
->
where
(
'room_num_left'
,
'<>'
,
0
)
->
select
();
$result
=
array
();
if
(
$house_data
)
{
$insert
=
array
();
foreach
(
$house_data
as
$k
=>
$v
)
{
if
(
strtotime
(
$v
[
'exclusive_end'
]
.
'23:59:59'
)
>
time
()
&&
$v
[
'exclusive_end'
]
!=
NULL
)
{
if
(
(
strtotime
(
$v
[
'exclusive_end'
]
.
'23:59:59'
)
>
time
())
&&
(
$v
[
'exclusive_end'
]
!=
NULL
)
)
{
continue
;
}
$insert
[
$k
][
'id'
]
=
$v
[
'id'
];
$insert
[
$k
][
'room_num_left'
]
=
0
;
}
$result
=
$house
->
saveAll
(
$insert
);
}
return
;
Log
::
record
(
'exclusiveExpirationTime:'
.
json_encode
(
$result
),
'TASK'
);
return
;
}
}
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