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
9c80956e
Commit
9c80956e
authored
Jan 29, 2018
by
clone
Committed by
hujun
Mar 01, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
构建
parent
83aeadd4
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
117 additions
and
11 deletions
+117
-11
FollowUp.php
application/api_broker/controller/FollowUp.php
+30
-8
FollowUpService.php
application/api_broker/service/FollowUpService.php
+22
-0
OFollowUp.php
application/model/OFollowUp.php
+47
-0
route.php
application/route.php
+18
-3
No files found.
application/api_broker/controller/FollowUp.php
View file @
9c80956e
<?php
<?php
namespace
app\api_broker\controller
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\extend\Basic
;
use
app\api_broker\service\FollowUpService
;
use
app\model\OFollowUp
;
/**
/**
* Created by PhpStorm.
* Created by PhpStorm.
...
@@ -9,24 +12,44 @@ use app\api_broker\extend\Basic;
...
@@ -9,24 +12,44 @@ use app\api_broker\extend\Basic;
* Time : 14:24
* Time : 14:24
* Intro:
* Intro:
*/
*/
class
FollowUp
extends
Basic
class
FollowUp
extends
Basic
{
{
private
$service_
;
private
$followUpModel
;
public
function
__construct
(
$request
=
null
)
public
function
__construct
(
$request
=
null
)
{
{
parent
::
__construct
(
$request
);
parent
::
__construct
(
$request
);
$this
->
service_
=
new
FollowUpService
();
$this
->
followUpModel
=
new
OFollowUp
();
}
}
/**
/**
* 报备
* 报备
* @return \think\Response
*/
*/
public
function
report
(){
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
,
"report_store_id"
=>
1
,
"user_id"
=>
1
,
"user_id"
=>
1
,
"shop_ids"
=>
"1,2,3"
,
"house_ids"
=>
"1,2,3"
,
""
"vehicle"
=>
10
,
"intro"
=>
"123123123"
,
"to_see_time"
=>
date
(
"Y-m-d H:i:s"
,
time
()),
);
);
$result
=
$this
->
followUpModel
->
addFollowUp
(
$params
);
if
(
$result
[
"code"
]
==
200
){
return
$this
->
response
(
"200"
,
"request success"
,
[
"id"
,
$result
[
"msg"
]]);
}
else
{
return
$this
->
response
(
"101"
,
"request faild"
);
}
$this
->
response
(
"200"
,
"request success"
,[]);
}
}
}
}
\ No newline at end of file
application/api_broker/service/FollowUpService.php
0 → 100644
View file @
9c80956e
<?php
namespace
app\api_broker\service
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/1/26
* Time : 16:41
* Intro:
*/
class
FollowUpService
{
function
__construct
()
{
}
public
function
verifyReport
(){
}
}
\ No newline at end of file
application/model/OFollowUp.php
0 → 100644
View file @
9c80956e
<?php
namespace
app\model
;
/**
* Created by PhpStorm.
* User : zw
* Date : 2018/1/26
* Time : 16:48
* Intro:
*/
use
think\Model
;
use
think\helper\Time
;
use
think\Db
;
class
OFollowUp
extends
Model
{
// 设置当前模型对应的完整数据表名称
protected
$table
=
'o_follow_up'
;
protected
$db
;
function
__construct
()
{
$this
->
db
=
Db
::
name
(
$this
->
table
);
}
/**
* 添加报备
* @param $params
* @return array
*/
public
function
addFollowUp
(
$params
)
{
Db
::
startTrans
();
try
{
$this
->
db
->
insert
(
$params
);
$id
=
$this
->
id
;
Db
::
commit
();
return
[
"code"
=>
"200"
,
"msg"
=>
$id
];
}
catch
(
\Exception
$e
)
{
Db
::
rollback
();
return
[
"code"
=>
"101"
,
"msg"
=>
"失败,数据异常"
];
}
}
}
\ No newline at end of file
application/route.php
View file @
9c80956e
...
@@ -211,9 +211,24 @@ Route::group('api', [
...
@@ -211,9 +211,24 @@ Route::group('api', [
//Version
//Version
'getVersionNo'
=>
[
'api/Version/getVersionNo'
,
[
'method'
=>
'post'
]
],
'getVersionNo'
=>
[
'api/Version/getVersionNo'
,
[
'method'
=>
'post'
]
],
'agentUserTb'
=>
[
'api_broker/Client/agentUserTb'
,
[
'method'
=>
'get'
]
],
//客户列表
'agentUserFollow'
=>
[
'api_broker/Client/agentUserFollow'
,
[
'method'
=>
'get'
]
],
//客户列表
]);
'agentSearch'
=>
[
'api_broker/Client/agentSearch'
,
[
'method'
=>
'get'
]
],
//经纪人搜索
Route
::
group
(
'chat'
,
[
'index'
=>
[
'chat/AppChat/index'
,
[
'method'
=>
'get'
]
],
'userChat'
=>
[
'chat/AppChat/userChat'
,
[
'method'
=>
'post|get'
]
],
'pushMsg'
=>
[
'chat/AppChat/pushMsg'
,
[
'method'
=>
'post|get'
]
],
'getChatHistory'
=>
[
'chat/AppChat/getChatHistory'
,
[
'method'
=>
'post|get'
]
],
'getUserOrAgentInfo'
=>
[
'chat/AppChat/getUserOrAgentInfo'
,
[
'method'
=>
'post|get'
]
],
'uploadImg'
=>
[
'chat/AppChat/uploadImg'
,
[
'method'
=>
'post|get'
]
],
'createGroupByOnlyId'
=>
[
'chat/Group/createGroupByOnlyId'
,
[
'method'
=>
'post|get'
]
],
'delGroup'
=>
[
'chat/Group/delGroup'
,
[
'method'
=>
'post|get'
]
],
'getGroupUser'
=>
[
'chat/Group/getGroupUser'
,
[
'method'
=>
'post|get'
]
],
'addGroupUserByIds'
=>
[
'chat/Group/addGroupUserByIds'
,
[
'method'
=>
'post|get'
]
],
'delGroupUserByIds'
=>
[
'chat/Group/delGroupUserByIds'
,
[
'method'
=>
'post|get'
]
],
'addGroupManage'
=>
[
'chat/Group/addGroupManage'
,
[
'method'
=>
'post|get'
]
],
'delGroupManage'
=>
[
'chat/Group/delGroupManage'
,
[
'method'
=>
'post|get'
]
],
'pushMsg_gethouseinfo'
=>
[
'chat/AppChat/pushMsg_gethouseinfo'
,
[
'method'
=>
'post|get'
]
],
]);
]);
Route
::
group
(
'task'
,[
Route
::
group
(
'task'
,[
...
...
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