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
838d7064
Commit
838d7064
authored
Apr 04, 2018
by
clone
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
报备时间轴和数据转换
parent
b850d9c3
Hide whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
65 additions
and
4 deletions
+65
-4
Basic.php
application/api/extend/Basic.php
+2
-1
OrderLogService.php
application/api_broker/service/OrderLogService.php
+2
-1
Applies.php
application/model/Applies.php
+23
-0
OrderModel.php
application/model/OrderModel.php
+4
-2
Users.php
application/model/Users.php
+31
-0
route.php
application/route.php
+3
-0
No files found.
application/api/extend/Basic.php
View file @
838d7064
...
@@ -48,7 +48,8 @@ class Basic extends Controller
...
@@ -48,7 +48,8 @@ class Basic extends Controller
"api/getBroker"
,
"api/getBroker"
,
"api/brokerDetail"
,
"api/brokerDetail"
,
"api/commentAndDeal"
,
"api/commentAndDeal"
,
"api/check_code"
"api/check_code"
,
"api/convertOrderByTime"
,
);
);
/**
/**
...
...
application/api_broker/service/OrderLogService.php
View file @
838d7064
...
@@ -205,7 +205,8 @@ class OrderLogService
...
@@ -205,7 +205,8 @@ class OrderLogService
$oBargainModel
=
new
OBargainModel
();
$oBargainModel
=
new
OBargainModel
();
$orderData
=
$orderModel
->
selectOrderByOrderId
(
"f_id,house_title"
,
[
"id"
=>
$order_id
]);
$orderData
=
$orderModel
->
selectOrderByOrderId
(
"f_id,house_title"
,
[
"order_id"
=>
$order_id
]);
//dump($orderData);
if
(
count
(
$orderData
)
==
0
)
{
if
(
count
(
$orderData
)
==
0
)
{
return
[
"101"
,
"找不到此订单编号"
];
return
[
"101"
,
"找不到此订单编号"
];
}
}
...
...
application/model/Applies.php
View file @
838d7064
...
@@ -2,6 +2,7 @@
...
@@ -2,6 +2,7 @@
namespace
app\model
;
namespace
app\model
;
use
Think\Db
;
use
think\Model
;
use
think\Model
;
class
Applies
extends
Model
class
Applies
extends
Model
...
@@ -23,4 +24,26 @@ class Applies extends Model
...
@@ -23,4 +24,26 @@ class Applies extends Model
->
select
();
->
select
();
}
}
public
function
getApplies
(
$pageNo
,
$pageSize
,
$field
)
{
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'
)
->
limit
(
$pageSize
)
->
page
(
$pageNo
)
->
select
();
}
public
function
getAppliesCount
()
{
return
$this
->
field
(
"a.id"
)
->
alias
(
"a"
)
->
join
(
'houseinfos b'
,
'a.house_id = b.id'
,
'LEFT'
)
->
count
();
}
}
}
application/model/OrderModel.php
View file @
838d7064
...
@@ -41,7 +41,7 @@ class OrderModel extends Model
...
@@ -41,7 +41,7 @@ class OrderModel extends Model
{
{
$where_
=
[];
$where_
=
[];
if
(
isset
(
$params
[
"order_id"
]))
{
if
(
isset
(
$params
[
"order_id"
]))
{
$where_
[
"
order_
id"
]
=
$params
[
"order_id"
];
$where_
[
"id"
]
=
$params
[
"order_id"
];
}
}
if
(
isset
(
$params
[
"f_id"
]))
{
if
(
isset
(
$params
[
"f_id"
]))
{
$where_
[
"f_id"
]
=
$params
[
"f_id"
];
$where_
[
"f_id"
]
=
$params
[
"f_id"
];
...
@@ -49,10 +49,12 @@ class OrderModel extends Model
...
@@ -49,10 +49,12 @@ class OrderModel extends Model
if
(
isset
(
$params
[
"house_id"
]))
{
if
(
isset
(
$params
[
"house_id"
]))
{
$where_
[
"house_id"
]
=
$params
[
"house_id"
];
$where_
[
"house_id"
]
=
$params
[
"house_id"
];
}
}
return
$this
->
db_
$result
=
$this
->
db_
->
field
(
$filed
)
->
field
(
$filed
)
->
where
(
$where_
)
->
where
(
$where_
)
->
select
();
->
select
();
//echo $this->db_->getLastSql();
return
$result
;
}
}
/**
/**
...
...
application/model/Users.php
View file @
838d7064
...
@@ -368,4 +368,35 @@ class Users extends Model
...
@@ -368,4 +368,35 @@ class Users extends Model
->
field
(
'id as user_id,sex,user_nick,user_phone,user_status,agent_id,create_time'
)
->
field
(
'id as user_id,sex,user_nick,user_phone,user_status,agent_id,create_time'
)
->
select
();
->
select
();
}
}
/**
* 数据转换 返回用户信息
* @param $params
* @return false|mixed|\PDOStatement|string|\think\Collection
*/
public
function
insertUserConvert
(
$params
){
$where_
=
[];
if
(
isset
(
$params
[
"user_phone"
])){
$where_
[
"user_phone"
]
=
$params
[
"user_phone"
];
}
$model
=
Db
::
table
(
$this
->
table
);
$list
=
$model
->
field
(
"id,user_name,user_phone"
)
->
where
(
$where_
)
->
limit
(
1
)
->
select
();
if
(
count
(
$list
)
>
0
){
return
$list
[
0
];
}
else
{
$id
=
$model
->
insertGetId
(
$params
);
if
(
$id
>
0
){
$list
[
"id"
]
=
$id
;
$list
[
"user_name"
]
=
$params
[
"user_name"
];
$list
[
"user_phone"
]
=
$params
[
"user_phone"
];
return
$list
;
}
}
}
}
}
application/route.php
View file @
838d7064
...
@@ -274,6 +274,9 @@ Route::group('api', [
...
@@ -274,6 +274,9 @@ Route::group('api', [
'getULabelsListApp'
=>
[
'api_broker/Client/getULabelsListApp'
,
[
'method'
=>
'get'
]
],
//客户标签
'getULabelsListApp'
=>
[
'api_broker/Client/getULabelsListApp'
,
[
'method'
=>
'get'
]
],
//客户标签
'all_user'
=>
[
'api_broker/Client/all_user'
,
[
'method'
=>
'post|get'
]
],
//全部客户 朱伟
'all_user'
=>
[
'api_broker/Client/all_user'
,
[
'method'
=>
'post|get'
]
],
//全部客户 朱伟
'convertOrderByTime'
=>
[
'api/ConvertOrder/convertOrderByTime'
,
[
'method'
=>
'post|get'
]
],
]);
]);
Route
::
group
(
'chat'
,
[
Route
::
group
(
'chat'
,
[
...
...
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