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
d513eda6
Commit
d513eda6
authored
Jan 31, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
跟进
parent
318954c0
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
112 additions
and
6 deletions
+112
-6
Report.php
application/api_broker/controller/Report.php
+68
-6
FollowUpLogModel.php
application/model/FollowUpLogModel.php
+44
-0
No files found.
application/api_broker/controller/Report.php
View file @
d513eda6
...
...
@@ -4,6 +4,7 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\ReportService
;
use
app\model\FollowUpLogModel
;
/**
* Created by PhpStorm.
...
...
@@ -15,12 +16,13 @@ use app\api_broker\service\ReportService;
class
Report
extends
Basic
{
private
$service_
;
private
$fulModel
;
public
function
__construct
(
$request
=
null
)
{
parent
::
__construct
(
$request
);
$this
->
service_
=
new
ReportService
();
$this
->
fulModel
=
new
FollowUpLogModel
();
}
/**
...
...
@@ -29,13 +31,13 @@ class Report extends Basic
*/
public
function
report
()
{
/*
$params = $this->params;
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
'report_agent_id'
])
||
!
isset
(
$params
[
'report_store_id'
])
||
!
isset
(
$params
[
'user_id'
])
||
!
isset
(
$params
[
'house_ids'
])
||
!
isset
(
$params
[
'vehicle'
])
)
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
*/
}
$params
=
array
(
/*
$params = array(
"report_agent_id" => 1,//报备经纪人id
"report_store_id" => 1,//门店id
"user_id" => 1,//用户id
...
...
@@ -43,7 +45,7 @@ class Report extends Basic
"vehicle" => 10,//交通工具
"intro" => "123123123",//备注
"predict_see_time" => date("Y-m-d H:i:s", time()),//预计到看时间
);
);
*/
//todo 检查经纪人状态 basic类做
//todo 验证用户id是否正常
...
...
@@ -67,11 +69,70 @@ class Report extends Basic
}
/**
* 根据报备的编号进场
* 根据报备的编号
进场
* @return \think\Response
*/
public
function
marchInByOrderId
()
{
return
$this
->
response
();
}
/**
* 新增跟进
* @return \think\Response
*/
public
function
addFollowUp
(){
/*$params = array(
"report_id" => 1,
"agent_id" => 12,
"user_type" =>"1,2", // 用户类型
"decision_maker" =>"zhangsan",// 第一决策人
"industry_type" =>"1,2",//租商铺做什么
"area_requirement" =>"1,2",//面积要求
"price_requirement" =>"1,2", //价格要求
"province" =>"1,2", //省
"city" =>"1,2",//市
"district" =>"1,2",//区
"business_area" =>"1,2",//商圈
"other_area" =>"1,2",//其他地区
"explain" =>"1,2",//备注
"explain_img" =>"1,2"//备注图
);*/
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
'report_id'
])
||
!
isset
(
$params
[
'agent_id'
])
||
!
isset
(
$params
[
'user_type'
])
||
!
isset
(
$params
[
'industry_type'
])
||
!
isset
(
$params
[
'area_requirement'
])
||
!
isset
(
$params
[
'price_requirement'
]))
{
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$is_ok
=
$this
->
fulModel
->
addFollowUpLog
(
$params
);
if
(
$is_ok
>
0
){
return
$this
->
response
(
"200"
,
"request success"
,[]);
}
else
{
return
$this
->
response
(
"101"
,
"request error"
);
}
}
public
function
getFollowUpList
(){
$params
=
array
(
"report_id"
=>
1
,
// 报备id
"agent_id"
=>
1
,
//非必填 经纪人id
);
$params
=
$this
->
params
;
if
(
!
isset
(
$params
[
"report_id"
])){
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$field_
=
"id,report_id,agent_id,user_type,decision_maker,industry_type,area_requirement,price_requirement,province
,city,district,business_area,other_area,explain,explain_img,create_time,update_time"
;
$where_
=
[];
$where_
[
"report_id"
]
=
$params
[
"report_id"
];
if
(
isset
(
$params
[
"agent_id"
])){
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
$result
=
$this
->
fulModel
->
selectFollowUpList
(
$field_
,
$where_
);
}
}
\ No newline at end of file
application/model/FollowUpLogModel.php
0 → 100644
View file @
d513eda6
<?php
namespace
app\model
;
/**
* Created by PhpStorm.
* User: zw
* Date: 2017/12/21
* Time: 14:41
*/
use
think\Db
;
use
think\Model
;
class
FollowUpLogModel
extends
Model
{
// 设置当前模型对应的完整数据表名称
protected
$table
=
'o_follow_up_log'
;
private
$db_
;
function
__construct
()
{
$this
->
db_
=
Db
::
name
(
$this
->
table
);
}
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
;
}
}
public
function
selectFollowUpList
(
$field_
,
$where_
){
}
}
\ 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