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
3d7213dc
Commit
3d7213dc
authored
Aug 03, 2018
by
clone
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'test' into 0723-v2.5.0
# Conflicts: # application/api_broker/service/StatementService.php # application/index/view/cell_phone/index.html # application/model/OMarchInModel.php
parents
708cb0d4
80e00bb9
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
58 additions
and
19 deletions
+58
-19
Broker.php
application/api_broker/controller/Broker.php
+11
-18
StatementService.php
application/api_broker/service/StatementService.php
+1
-1
BrokerValidate.php
application/api_broker/validate/BrokerValidate.php
+36
-0
UPhoneFollowPp.php
application/model/UPhoneFollowPp.php
+10
-0
No files found.
application/api_broker/controller/Broker.php
View file @
3d7213dc
...
...
@@ -271,38 +271,31 @@ class Broker extends Basic
{
header
(
'Access-Control-Allow-Origin:*'
);
$params
=
$this
->
params
;
/*$params['content']='跟进内容';//跟进内容
/*
$params['content']='跟进内容';//跟进内容
$params['labels_id']=1;//g_labels表主键
$params['user_id']=1;//u_users ID用户表id
$params['agent_id']=1;//agent表id-当前登录用户id
$params['type']='1';//B端agent表*/
$params['type']='1';//0电话跟进 1普通跟进
*/
if
(
!
isset
(
$params
[
'content'
])
||
!
isset
(
$params
[
'user_id'
]))
{
return
$this
->
response
(
"300"
,
"参数不全"
,
[
'remote_groupid'
=>
''
]);
$checkResult
=
$this
->
validate
(
$params
,
"BrokerValidate.verifyStatus"
);
if
(
true
!==
$checkResult
)
{
return
$this
->
response
(
"300"
,
$checkResult
);
}
$content
=
$params
[
'content'
];
$labels_id
=
empty
(
$params
[
'labels_id'
])
?
0
:
$params
[
'labels_id'
];
$user_id
=
$params
[
'user_id'
];
$agent_id
=
$params
[
'agent_id'
];
$user_status
=
$params
[
'user_status'
];
$type
=
$params
[
'type'
];
//0电话跟进 1普通跟进
//主表查询商铺详细信息
$UPhoneFollowPp
=
new
UPhoneFollowPp
();
$UPhoneFollowPp
->
content
=
$content
;
$UPhoneFollowPp
->
labels_id
=
$labels_id
;
$UPhoneFollowPp
->
user_id
=
$user_id
;
$UPhoneFollowPp
->
agent_id
=
$agent_id
;
$UPhoneFollowPp
->
type
=
$type
;
$UPhoneFollowPp
->
user_status
=
$user_status
;
$UPhoneFollowPp
->
save
();
//dump($UPhoneFollowPp->id);exit;
$result
=
$UPhoneFollowPp
->
savePhoneFollow
(
$params
);
//跟进,对客户状态进行更新 0:求租;1:已租;-1:无效
$Users
=
new
Users
();
$Users
->
update_user_status
([
'id'
=>
$user_id
,
'user_status'
=>
$user_status
]);
if
(
$
UPhoneFollowPp
->
id
)
{
return
$this
->
response
(
"200"
,
"success!"
,
$
UPhoneFollowPp
->
id
);
if
(
$
result
==
1
)
{
return
$this
->
response
(
"200"
,
"success!"
,
$
result
);
}
else
{
return
$this
->
response
(
"101"
,
"失败!"
);
}
...
...
application/api_broker/service/StatementService.php
View file @
3d7213dc
...
...
@@ -233,7 +233,7 @@ class StatementService
$addMarchInNum
=
$this
->
marchInModel
->
getAddMarchInNum
(
$where_
);
$result
[
"look_at_num_day_store"
]
=
isset
(
$addMarchInNum
[
0
][
"num"
])
?
$addMarchInNum
[
0
][
"num"
]
:
0
;
//dump($addMarchInNum);
//todo
$result
[
"store_list"
]
=
$store_list
;
$result
[
"district_list"
]
=
$district_list
;
...
...
application/api_broker/validate/BrokerValidate.php
0 → 100644
View file @
3d7213dc
<?php
namespace
app\api_broker\validate
;
use
think\Validate
;
/**
* Created by PhpStorm.
* User: zhuwei
* Date: 2018/8/3
* Time: 上午10:11
*/
class
BrokerValidate
extends
Validate
{
protected
$rule
=
[
'type'
=>
'require|in:0,1,2'
,
'agent_id'
=>
'require|number|gt:0'
,
'labels_id'
=>
'number'
,
'user_id'
=>
'require|number|gt:0'
,
'user_status'
=>
'require|in:-1,0,1'
];
protected
$message
=
[
'type.require'
=>
'type为必填字段'
,
'type.number'
=>
'type只能为数字'
,
'agent_id.require'
=>
'agent_id为必填字段'
,
'agent_id.number'
=>
'agent_id只能为数字'
,
'labels_id.number'
=>
'labels_id只能为数字'
,
'user_id.require'
=>
'user_id为必填字段'
,
'user_id.number'
=>
'user_id只能为数字'
,
'user_status.require'
=>
'user_status为必填字段'
,
'user_status.number'
=>
'user_status只能为数字'
];
protected
$scene
=
[
'add_phone_follow_up_verify'
=>
[
'labels_id'
,
'user_id'
,
'agent_id'
,
'user_status'
,
'type'
],
];
}
application/model/UPhoneFollowPp.php
View file @
3d7213dc
...
...
@@ -16,6 +16,16 @@ class UPhoneFollowPp extends BaseModel
$this
->
UPhoneFollowPp
=
Db
(
$this
->
table
);
}
/**
* 新增电话跟进-插入数据
* @param $data
* @return int|string
*/
public
function
savePhoneFollow
(
$data
)
{
$result
=
$this
->
UPhoneFollowPp
->
insert
(
$data
);
return
$result
;
}
/**
* @return array|false|\PDOStatement|string|\think\Model
* @throws \think\db\exception\DataNotFoundException
...
...
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