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
f3ce19ef
Commit
f3ce19ef
authored
Aug 14, 2018
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
商铺跟进省市区转换
parent
473550dd
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
53 additions
and
15 deletions
+53
-15
HouseFollowUp.php
application/index/controller/HouseFollowUp.php
+38
-12
GHousesFollowUp.php
application/model/GHousesFollowUp.php
+14
-3
route.php
application/route.php
+1
-0
No files found.
application/index/controller/HouseFollowUp.php
View file @
f3ce19ef
...
@@ -7,18 +7,43 @@
...
@@ -7,18 +7,43 @@
*/
*/
namespace
app\index\controller
;
namespace
app\index\controller
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
class
HouseFollowUp
extends
Basic
{
use
app\model\GHouses
;
//在controller里新增的php文件名
use
app\model\GHousesFollowUp
;
public
function
followUpList
(){
//followUpList 方法
class
HouseFollowUp
extends
Basic
if
(
!
$this
->
request
->
isAjax
())
{
{
return
view
(
'houses/HouseFollowUp'
);
public
function
followUpList
()
//找到view下的 houses 文件夹下的 HouseFollowUp的html 文件
{
if
(
!
$this
->
request
->
isAjax
())
{
return
view
(
'houses/HouseFollowUp'
);
}
}
}
}
/**
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
transformFollowUp
()
{
$time
=
time
();
$m_house
=
new
GHouses
();
$m_follow
=
new
GHousesFollowUp
();
$total
=
$m_follow
->
getTotal
();
$page
=
ceil
(
$total
/
5000
);
for
(
$i
=
1
;
$i
<=
$page
;
$i
++
)
{
$data
=
$m_house
->
getList
(
$i
,
5000
,
'id asc'
,
'id,province,city,disc'
);
foreach
(
$data
as
$k
=>
$v
)
{
$insert
[
'province'
]
=
$v
[
'province'
];
$insert
[
'city'
]
=
$v
[
'city'
];
$insert
[
'disc'
]
=
$v
[
'disc'
];
$m_follow
->
where
(
'house_id'
,
$v
[
'id'
])
->
update
(
$insert
);
}
}
echo
time
()
-
$time
.
'秒'
;
}
}
}
\ No newline at end of file
application/model/GHousesFollowUp.php
View file @
f3ce19ef
...
@@ -3,7 +3,6 @@
...
@@ -3,7 +3,6 @@
namespace
app\model
;
namespace
app\model
;
use
think\Db
;
use
think\Db
;
use
think\Model
;
/**
/**
* Created by PhpStorm.
* Created by PhpStorm.
...
@@ -12,7 +11,7 @@ use think\Model;
...
@@ -12,7 +11,7 @@ use think\Model;
* Time : 下午4:31
* Time : 下午4:31
* Intro:
* Intro:
*/
*/
class
GHousesFollowUp
extends
Model
class
GHousesFollowUp
extends
Base
Model
{
{
protected
$table
=
"g_houses_follow_up"
;
protected
$table
=
"g_houses_follow_up"
;
protected
$db_
;
protected
$db_
;
...
@@ -68,6 +67,9 @@ class GHousesFollowUp extends Model
...
@@ -68,6 +67,9 @@ class GHousesFollowUp extends Model
* @param $field
* @param $field
* @param $params
* @param $params
* @return false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
getShopFollowUpList
(
$field
,
$params
)
public
function
getShopFollowUpList
(
$field
,
$params
)
{
{
...
@@ -84,7 +86,6 @@ class GHousesFollowUp extends Model
...
@@ -84,7 +86,6 @@ class GHousesFollowUp extends Model
}
}
/**
/**
* 首页商铺跟进搜索
* @param int $p
* @param int $p
* @param int $pageSize
* @param int $pageSize
* @param string $order_
* @param string $order_
...
@@ -93,6 +94,9 @@ class GHousesFollowUp extends Model
...
@@ -93,6 +94,9 @@ class GHousesFollowUp extends Model
* @param $where
* @param $where
* @param $group
* @param $group
* @return false|\PDOStatement|string|\think\Collection
* @return false|\PDOStatement|string|\think\Collection
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
*/
public
function
getSearch
(
$p
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$join
,
$where
,
$group
)
public
function
getSearch
(
$p
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$join
,
$where
,
$group
)
{
{
...
@@ -126,6 +130,13 @@ class GHousesFollowUp extends Model
...
@@ -126,6 +130,13 @@ class GHousesFollowUp extends Model
return
$data
;
return
$data
;
}
}
/**
* @param array $params
* @return bool
* @throws \think\db\exception\DataNotFoundException
* @throws \think\db\exception\ModelNotFoundException
* @throws \think\exception\DbException
*/
public
function
getFollowUpByHouseId
(
array
$params
)
:
bool
public
function
getFollowUpByHouseId
(
array
$params
)
:
bool
{
{
$where_
=
[];
$where_
=
[];
...
...
application/route.php
View file @
f3ce19ef
...
@@ -280,6 +280,7 @@ Route::group('index', [
...
@@ -280,6 +280,7 @@ Route::group('index', [
'selectDistrictPerformance'
=>
[
'index/Performance/selectDistrictPerformance'
,
[
'method'
=>
'POST|GET'
]
],
//区域业绩排行 朱伟 2018-07-31
'selectDistrictPerformance'
=>
[
'index/Performance/selectDistrictPerformance'
,
[
'method'
=>
'POST|GET'
]
],
//区域业绩排行 朱伟 2018-07-31
'selectStorePerformance'
=>
[
'index/Performance/selectStorePerformance'
,
[
'method'
=>
'POST|GET'
]
],
//门店业绩排行 朱伟 2018-07-31
'selectStorePerformance'
=>
[
'index/Performance/selectStorePerformance'
,
[
'method'
=>
'POST|GET'
]
],
//门店业绩排行 朱伟 2018-07-31
'selectIndividualPerformance'
=>
[
'index/Performance/selectIndividualPerformance'
,
[
'method'
=>
'POST|GET'
]
],
//个人业绩排行 朱伟 2018-07-31
'selectIndividualPerformance'
=>
[
'index/Performance/selectIndividualPerformance'
,
[
'method'
=>
'POST|GET'
]
],
//个人业绩排行 朱伟 2018-07-31
'transformFollowUp'
=>
[
'index/HouseFollowUp/transformFollowUp'
,
[
'method'
=>
'GET'
]
],
//个人业绩排行 朱伟 2018-07-31
...
...
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