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
8481d1f5
Commit
8481d1f5
authored
Jun 04, 2019
by
hujun
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
楼盘报备
parent
36c3d883
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
134 additions
and
0 deletions
+134
-0
OfficeReport.php
application/api_broker/controller/OfficeReport.php
+0
-0
OfficeReportService.php
application/api_broker/service/OfficeReportService.php
+0
-0
OfficeUserService.php
application/index/service/OfficeUserService.php
+0
-0
OfficeFollowUpLogModel.php
application/model/OfficeFollowUpLogModel.php
+134
-0
No files found.
application/api_broker/controller/OfficeReport.php
0 → 100644
View file @
8481d1f5
This diff is collapsed.
Click to expand it.
application/api_broker/service/OfficeReportService.php
0 → 100644
View file @
8481d1f5
This diff is collapsed.
Click to expand it.
application/index/service/OfficeUserService.php
0 → 100644
View file @
8481d1f5
This diff is collapsed.
Click to expand it.
application/model/OfficeFollowUpLogModel.php
0 → 100644
View file @
8481d1f5
<?php
namespace
app\model
;
/**
* Created by PhpStorm.
* User: zw
* Date: 2017/12/21
* Time: 14:41
*/
use
think\Db
;
use
think\Model
;
class
OfficeFollowUpLogModel
extends
Model
{
// 设置当前模型对应的完整数据表名称
protected
$table
=
'office_o_follow_up_log'
;
private
$db_
;
function
__construct
()
{
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
/**
* 新增跟进
* @param $params
* @return int
*/
public
function
addFollowUpLog
(
$params
)
{
$params
[
"create_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
$params
[
"update_time"
]
=
date
(
"Y-m-d H:i:s"
,
time
());
Db
::
startTrans
();
try
{
$this
->
db_
->
insert
(
$params
);
Db
::
commit
();
return
1
;
}
catch
(
\Exception
$e
)
{
Db
::
rollback
();
return
0
;
}
}
/**
* 获取跟进数据
* @param $field_
* @param $where_
* @param $order_
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
selectFollowUpList
(
$field_
,
$where_
,
$order_
)
{
if
(
isset
(
$where_
[
"agent_id"
]))
{
$data
=
$this
->
db_
->
field
(
$field_
)
->
where
(
$where_
)
->
order
(
$order_
)
->
select
();
}
else
{
$data
=
$this
->
db_
->
field
(
$field_
)
->
where
(
$where_
)
->
order
(
$order_
)
->
limit
(
1
)
->
select
();
}
return
$data
;
}
/**
* 查询跟进记录
* @param $field
* @param $params
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
selectFollowUpListByReportId
(
$field
,
$params
)
{
$where_
=
[];
if
(
isset
(
$params
[
"report_id"
]))
{
$where_
[
"report_id"
]
=
$params
[
"report_id"
];
}
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
return
$this
->
db_
->
field
(
$field
)
->
where
(
$where_
)
->
select
();
}
public
function
getFollowUpByOrderId
(
$field
,
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"report_id"
]))
{
$where_
[
"report_id"
]
=
$params
[
"report_id"
];
}
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"a_agents b"
,
"a.agent_id = b.id"
,
"left"
)
->
join
(
"a_store c"
,
"b.store_id = c.id"
,
"left"
)
->
join
(
"o_report d"
,
"a.report_id = d.id"
,
"left"
)
->
where
(
$where_
)
->
select
();
}
/**
* 获取经纪人新增带看数量
* @param $params
* @return int|string
*/
public
function
getAddFollowUpNumByAgentId
(
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"create_time"
])){
$where_
[
"create_time"
]
=
$params
[
"create_time"
];
}
return
$this
->
db_
->
where
(
$where_
)
->
count
();
}
}
\ No newline at end of file
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