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
0a3e1dc5
Commit
0a3e1dc5
authored
Jan 10, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户电话跟进-临时表
parent
8f8d7831
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
108 additions
and
7 deletions
+108
-7
UPhoneFollowUp.php
application/model/UPhoneFollowUp.php
+2
-7
UPhoneFollowUpTemporary.php
application/model/UPhoneFollowUpTemporary.php
+106
-0
No files found.
application/model/UPhoneFollowUp.php
View file @
0a3e1dc5
...
...
@@ -10,13 +10,10 @@ class UPhoneFollowUp extends BaseModel
protected
$table
=
'u_phone_follow_up'
;
protected
$UPhoneFollowUp
;
protected
$siteId
;
function
__construct
(
$site_id
)
{
$date
=
date
(
"Ymd"
,
time
());
$this
->
UPhoneFollowUp
=
Db
(
$this
->
table
.
"_"
.
$site_id
.
"_"
.
$date
);
$this
->
siteId
=
$site_id
;
$this
->
UPhoneFollowUp
=
Db
(
$this
->
table
.
"_"
.
$site_id
);
}
/**
...
...
@@ -54,9 +51,7 @@ class UPhoneFollowUp extends BaseModel
if
(
isset
(
$params
[
"disc"
]))
{
$arr
[
"disc"
]
=
$params
[
"disc"
];
}
if
(
isset
(
$this
->
siteId
))
{
$arr
[
"site_id"
]
=
$this
->
siteId
;
}
$result
=
$this
->
UPhoneFollowUp
->
insert
(
$arr
);
return
$result
;
}
...
...
application/model/UPhoneFollowUpTemporary.php
0 → 100755
View file @
0a3e1dc5
<?php
namespace
app\model
;
/**
* 客户电话跟进-临时表
*/
use
think\Db
;
class
UPhoneFollowUpTemporary
extends
BaseModel
{
protected
$table
=
'u_phone_follow_up'
;
protected
$UPhoneFollowUp
;
protected
$siteId
;
function
__construct
(
$site_id
)
{
$date
=
date
(
"Ymd"
,
time
());
$this
->
UPhoneFollowUp
=
Db
(
$this
->
table
.
"_"
.
$site_id
.
"_"
.
$date
);
$this
->
siteId
=
$site_id
;
}
/**
* 新增电话跟进-插入数据
* @param $params
* @return int|string
*/
public
function
savePhoneFollow
(
$params
)
{
$arr
=
[];
if
(
isset
(
$params
[
"content"
]))
{
$arr
[
"content"
]
=
$params
[
"content"
];
}
if
(
isset
(
$params
[
"labels_id"
]))
{
$arr
[
"labels_id"
]
=
$params
[
"labels_id"
];
}
if
(
isset
(
$params
[
"user_id"
]))
{
$arr
[
"user_id"
]
=
$params
[
"user_id"
];
}
if
(
isset
(
$params
[
"agent_id"
]))
{
$arr
[
"agent_id"
]
=
$params
[
"agent_id"
];
}
if
(
isset
(
$params
[
"type"
]))
{
$arr
[
"type"
]
=
$params
[
"type"
];
}
if
(
isset
(
$params
[
"user_status"
]))
{
$arr
[
"user_status"
]
=
$params
[
"user_status"
];
}
if
(
isset
(
$params
[
"province"
]))
{
$arr
[
"province"
]
=
$params
[
"province"
];
}
if
(
isset
(
$params
[
"city"
]))
{
$arr
[
"city"
]
=
$params
[
"city"
];
}
if
(
isset
(
$params
[
"disc"
]))
{
$arr
[
"disc"
]
=
$params
[
"disc"
];
}
if
(
isset
(
$this
->
siteId
))
{
$arr
[
"site_id"
]
=
$this
->
siteId
;
}
$result
=
$this
->
UPhoneFollowUp
->
insert
(
$arr
);
return
$result
;
}
public
function
getSearch
(
$p
=
1
,
$pageSize
=
15
,
$order_
=
'id desc'
,
$field
,
$join
,
$where
,
$group
)
{
$r
=
$this
->
UPhoneFollowUp
->
field
(
$field
)
->
alias
(
'f'
)
->
join
(
$join
)
->
where
(
$where
)
->
group
(
$group
)
->
order
(
$order_
)
->
limit
(
$pageSize
)
->
page
(
$p
)
->
select
();
$data
=
array
();
foreach
(
$r
as
$k
=>
$v
)
{
$data
[
$k
]
=
$v
;
if
(
$v
[
'img'
])
{
$data
[
$k
][
'imagename'
]
=
AGENTHEADERIMGURL
.
$v
[
'img'
];
}
}
return
$data
;
}
/**
* 查询数据
* 朱伟 2018-10-24
*/
public
function
getPhoneFollowData
(
$field
,
$params
,
$order
)
{
$result
=
$this
->
UPhoneFollowUp
->
field
(
$field
)
->
order
(
$order
)
->
where
(
$params
)
->
limit
(
1
)
->
select
();
//dump($this->getLastSql());
return
$result
;
}
}
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