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
e4222f6a
Commit
e4222f6a
authored
Apr 06, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
数据转换
parent
f39d740b
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
7 changed files
with
65 additions
and
7 deletions
+65
-7
AppointmentTime.php
application/api/controller/AppointmentTime.php
+1
-1
ConvertOrder.php
application/api/controller/ConvertOrder.php
+0
-0
Applies.php
application/model/Applies.php
+4
-2
OMarchInModel.php
application/model/OMarchInModel.php
+17
-0
RefundTables.php
application/model/RefundTables.php
+11
-0
Remarks.php
application/model/Remarks.php
+28
-1
Users.php
application/model/Users.php
+4
-3
No files found.
application/api/controller/AppointmentTime.php
View file @
e4222f6a
...
...
@@ -67,7 +67,7 @@ class AppointmentTime extends Basic
return
$this
->
response
(
"101"
,
"楼盘信息不能为空"
);
}
//todo 参数校验
if
(
!
isset
(
$params
[
"phone"
])
||
!
preg_match
(
'/
1[345678]\d{9}
/'
,
$params
[
"phone"
]))
{
if
(
!
isset
(
$params
[
"phone"
])
||
!
preg_match
(
'/
^1[345678]\d{9}$
/'
,
$params
[
"phone"
]))
{
return
$this
->
response
(
"101"
,
"手机号为空或手机号无效"
);
}
...
...
application/api/controller/ConvertOrder.php
View file @
e4222f6a
This diff is collapsed.
Click to expand it.
application/model/Applies.php
View file @
e4222f6a
...
...
@@ -26,23 +26,25 @@ class Applies extends Model
public
function
getApplies
(
$pageNo
,
$pageSize
,
$field
)
{
$where_
[
"transaction_status"
]
=
1
;
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
'houseinfos b'
,
'a.house_id = b.id'
,
'LEFT'
)
->
join
(
'agents c'
,
'a.agent_id = c.id'
,
'LEFT'
)
->
where
(
$where_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
public
function
getAppliesCount
()
{
$where_
[
"transaction_status"
]
=
1
;
return
$this
->
field
(
"a.id"
)
->
alias
(
"a"
)
->
join
(
'houseinfos b'
,
'a.house_id = b.id'
,
'LEFT'
)
->
where
(
$where_
)
->
count
();
}
...
...
application/model/OMarchInModel.php
View file @
e4222f6a
...
...
@@ -42,6 +42,23 @@ class OMarchInModel extends Model
}
}
/**
* 新增跟进信息 批量
* @param $params
* @return int
*/
public
function
addMarchInAll
(
$params
)
{
Db
::
startTrans
();
try
{
$this
->
db_model
->
insertAll
(
$params
);
Db
::
commit
();
return
1
;
}
catch
(
\Exception
$e
)
{
Db
::
rollback
();
return
0
;
}
}
/**
* @param $filed
* @param $params
...
...
application/model/RefundTables.php
View file @
e4222f6a
...
...
@@ -2,10 +2,21 @@
namespace
app\model
;
use
Think\Db
;
use
think\Model
;
class
RefundTables
extends
Model
{
// 设置当前模型对应的完整数据表名称
protected
$table
=
'refundtables'
;
public
function
getRefundList
(
$field
)
{
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
'o_report b'
,
'a.apply_id = b.id'
,
'LEFT'
)
->
join
(
'o_order c'
,
'b.id = c.f_id'
,
'LEFT'
)
->
select
();
}
}
application/model/Remarks.php
View file @
e4222f6a
...
...
@@ -6,7 +6,7 @@ use think\Model;
use
think\Db
;
class
Remarks
extends
Model
{
protected
$table
=
"remarks"
;
/**
* 成交记录列表
*
...
...
@@ -125,4 +125,31 @@ class Remarks extends Model
/****************************处理客户电话****************************************/
return
$data
;
}
public
function
getRemarksList
(
$pageNo
,
$pageSize
,
$field
)
{
$where_
[
"a.isinstatus"
]
=
1
;
return
Db
::
table
(
$this
->
table
)
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
'o_report b'
,
'a.apply_id = b.id'
,
'LEFT'
)
->
join
(
'o_order c'
,
'b.id = c.f_id'
,
'LEFT'
)
->
join
(
'remarksimgs d'
,
'a.id = d.remarks_id'
,
'LEFT'
)
->
where
(
$where_
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
public
function
getRemarksCount
()
{
$where_
[
"a.isinstatus"
]
=
1
;
return
Db
::
table
(
$this
->
table
)
->
field
(
"a.id"
)
->
alias
(
"a"
)
->
join
(
'o_report b'
,
'a.apply_id = b.id'
,
'LEFT'
)
->
join
(
'o_order c'
,
'b.id = c.f_id'
,
'LEFT'
)
->
join
(
'remarksimgs d'
,
'a.id = d.remarks_id'
,
'LEFT'
)
->
where
(
$where_
)
->
count
();
}
}
application/model/Users.php
View file @
e4222f6a
...
...
@@ -376,10 +376,11 @@ class Users extends Model
*/
public
function
insertUserConvert
(
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"user_phone"
])){
$where_
[
"user_phone"
]
=
$params
[
"user_phone"
]
;
if
(
!
isset
(
$params
[
"user_phone"
])
||
!
preg_match
(
'/^1[345678]\d{9}$/'
,
$params
[
"user_phone"
])){
return
null
;
}
$model
=
Db
::
table
(
$this
->
table
);
$where_
[
"user_phone"
]
=
$params
[
"user_phone"
];
$model
=
Db
::
name
(
$this
->
table
);
$list
=
$model
->
field
(
"id,user_name,user_phone"
)
...
...
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