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
33c77bbc
Commit
33c77bbc
authored
Feb 24, 2018
by
zw
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
异常捕获
parent
fcc83182
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
31 additions
and
25 deletions
+31
-25
Report.php
application/api_broker/controller/Report.php
+31
-25
No files found.
application/api_broker/controller/Report.php
View file @
33c77bbc
...
...
@@ -5,6 +5,7 @@ namespace app\api_broker\controller;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\ReportService
;
use
app\model\FollowUpLogModel
;
use
think\Exception
;
/**
* Created by PhpStorm.
...
...
@@ -82,30 +83,30 @@ class Report extends Basic
*/
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;
/*
$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"
,
"请求参数错误"
);
}
$params
[
"agent_name"
]
=
$this
->
agentName
;
$is_ok
=
$this
->
fulModel
->
addFollowUpLog
(
$params
);
$is_ok
=
$this
->
fulModel
->
addFollowUpLog
(
$params
);
if
(
$is_ok
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
[]);
}
else
{
...
...
@@ -138,13 +139,17 @@ class Report extends Basic
if
(
isset
(
$params
[
"agent_id"
]))
{
$where_
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
$result
=
$this
->
fulModel
->
selectFollowUpList
(
$field_
,
$where_
,
$order_
);
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
return
$this
->
response
(
"300"
,
"not fund list"
,
[]);
try
{
$result
=
$this
->
fulModel
->
selectFollowUpList
(
$field_
,
$where_
,
$order_
);
if
(
count
(
$result
)
>
0
)
{
return
$this
->
response
(
"200"
,
"request success"
,
$result
);
}
else
{
return
$this
->
response
(
"300"
,
"not fund list"
,
[]);
}
}
catch
(
Exception
$e
)
{
return
$this
->
response
(
"101"
,
"request error:"
.
$e
);
}
return
$this
->
response
(
"101"
,
"request error"
);
}
}
\ 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