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
cec78295
Commit
cec78295
authored
Sep 10, 2019
by
zhuwei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
客户看了哪些铺记录
parent
b1691c9d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
91 additions
and
5 deletions
+91
-5
LookShop.php
application/api_broker/controller/LookShop.php
+1
-1
LookShopService.php
application/api_broker/service/LookShopService.php
+28
-1
LookShop.php
application/index/controller/LookShop.php
+20
-0
TLookShopUser.php
application/model/TLookShopUser.php
+40
-3
route.php
application/route.php
+2
-0
No files found.
application/api_broker/controller/LookShop.php
View file @
cec78295
...
@@ -201,7 +201,7 @@ class LookShop extends Basic
...
@@ -201,7 +201,7 @@ class LookShop extends Basic
}
}
/**
/**
*
我的看
铺记录
*
客户看了哪些
铺记录
* @return \think\Response
* @return \think\Response
*/
*/
public
function
getShopLookList
()
public
function
getShopLookList
()
...
...
application/api_broker/service/LookShopService.php
View file @
cec78295
...
@@ -274,7 +274,7 @@ class LookShopService
...
@@ -274,7 +274,7 @@ class LookShopService
}
}
/**
/**
*
我的看
铺记录
*
客户看了哪些
铺记录
* @param $user_id
* @param $user_id
* @param $pageNo
* @param $pageNo
* @param $pageSize
* @param $pageSize
...
@@ -297,6 +297,33 @@ class LookShopService
...
@@ -297,6 +297,33 @@ class LookShopService
return
$list
;
return
$list
;
}
}
/**
* 客户看了哪些铺记录 pc后台
* @param $user_id
* @param $pageNo
* @param $pageSize
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getShopLookListPc
(
$user_id
,
$pageNo
,
$pageSize
)
{
$m_user
=
new
Users
();
$fields
=
"b.id,b.buyer_nick"
;
$result
=
$m_user
->
getUserInfoById
([
'user_id'
=>
$user_id
],
$fields
);
if
(
isset
(
$result
[
0
][
"id"
])
&&
$result
[
0
][
"id"
]
>
0
)
{
$conditions
[]
=
[
'EXP'
,
"(a.user_id =
{
$result
[
0
][
"id"
]
}
and a.source = 1) or (a.user_id =
{
$user_id
}
and a.source = 0)"
];
}
else
{
$conditions
[
'a.user_id'
]
=
$user_id
;
}
$field
=
'a.type,a.create_time,a.house_id,b.internal_title'
;
$m_look_shop
=
new
TLookShopUser
();
$list
=
$m_look_shop
->
getLookShopListPc
(
$conditions
,
$field
,
$pageNo
,
$pageSize
);
$total
=
$m_look_shop
->
getLookShopListCountPc
(
$conditions
,
$field
);
$list
[
"list"
]
=
$list
;
$list
[
"total"
]
=
$total
;
return
$list
;
}
...
...
application/index/controller/LookShop.php
View file @
cec78295
...
@@ -10,6 +10,7 @@ namespace app\index\controller;
...
@@ -10,6 +10,7 @@ namespace app\index\controller;
* Intro:
* Intro:
*/
*/
use
app\api_broker\service\LookShopService
;
use
app\api_broker\service\VerifyService
;
use
app\api_broker\service\VerifyService
;
use
app\index\extend\Basic
;
use
app\index\extend\Basic
;
use
app\model\TLookShopModel
;
use
app\model\TLookShopModel
;
...
@@ -131,4 +132,22 @@ class LookShop extends Basic
...
@@ -131,4 +132,22 @@ class LookShop extends Basic
return
$this
->
response
(
"200"
,
"success"
,
$list
);
return
$this
->
response
(
"200"
,
"success"
,
$list
);
}
}
/**
* 客户看了哪些铺记录
* @return \think\Response
*/
public
function
getShopLookList
()
{
$params
=
$this
->
params
;
if
(
empty
(
$params
[
"user_id"
])){
return
$this
->
response
(
"101"
,
"请求参数错误"
);
}
$pageNo
=
empty
(
$params
[
'page_no'
])
?
1
:
$params
[
'page_no'
];
$pageSize
=
empty
(
$params
[
'page_size'
])
?
15
:
$params
[
'page_size'
];
$s_look_Shop
=
new
LookShopService
();
$result
=
$s_look_Shop
->
getShopLookListPc
(
$params
[
'user_id'
],
$pageNo
,
$pageSize
);
return
$this
->
response
(
"200"
,
"success"
,
$result
);
}
}
}
\ No newline at end of file
application/model/TLookShopUser.php
View file @
cec78295
...
@@ -66,6 +66,14 @@ class TLookShopUser extends Model
...
@@ -66,6 +66,14 @@ class TLookShopUser extends Model
->
select
();
->
select
();
}
}
/**
* 客户看了哪些铺记录
* @param $condition
* @param $field
* @param $pageNo
* @param $pageSize
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getLookShopList
(
$condition
,
$field
,
$pageNo
,
$pageSize
)
public
function
getLookShopList
(
$condition
,
$field
,
$pageNo
,
$pageSize
)
{
{
$data
=
$this
->
db_
$data
=
$this
->
db_
...
@@ -80,13 +88,42 @@ class TLookShopUser extends Model
...
@@ -80,13 +88,42 @@ class TLookShopUser extends Model
->
select
();
->
select
();
return
$data
;
return
$data
;
}
}
public
function
getLookShopListCount
(
$condition
,
$field
)
/**
* 客户看了哪些铺记录 pc后台
* @param $condition
* @param $field
* @param $pageNo
* @param $pageSize
* @return false|\PDOStatement|string|\think\Collection
*/
public
function
getLookShopListPc
(
$condition
,
$field
,
$pageNo
,
$pageSize
)
{
$data
=
$this
->
db_
->
field
(
$field
)
->
alias
(
"a"
)
->
join
(
"g_houses b"
,
"a.house_id=b.id"
,
"left"
)
->
where
(
$condition
)
->
page
(
$pageNo
)
->
limit
(
$pageSize
)
->
order
(
"a.id desc"
)
->
select
();
return
$data
;
}
/**
* 客户看了哪些铺记录 pc后台
* @param $condition
* @param $field
* @return int|string
*/
public
function
getLookShopListCountPc
(
$condition
,
$field
)
{
{
return
$this
->
db_
return
$this
->
db_
->
field
(
$field
)
->
field
(
$field
)
->
alias
(
"a"
)
->
alias
(
"a"
)
// ->join("u_wx_info b","a.user_id=b.id","left")
->
join
(
"g_houses b"
,
"a.house_id=b.id"
,
"left"
)
// ->join("u_users c", "c.buyer_id=b.id", "left")
->
where
(
$condition
)
->
where
(
$condition
)
->
count
();
->
count
();
}
}
...
...
application/route.php
View file @
cec78295
...
@@ -592,6 +592,8 @@ Route::group('index', [
...
@@ -592,6 +592,8 @@ Route::group('index', [
'editAmercement'
=>
[
'index/Amercement/editAmercement'
,
[
'method'
=>
'GET|POST'
]
],
'editAmercement'
=>
[
'index/Amercement/editAmercement'
,
[
'method'
=>
'GET|POST'
]
],
'delAmercementImage'
=>
[
'index/Amercement/delAmercementImage'
,
[
'method'
=>
'GET|POST'
]
],
'delAmercementImage'
=>
[
'index/Amercement/delAmercementImage'
,
[
'method'
=>
'GET|POST'
]
],
'getShopLookList'
=>
[
'index/LookShop/getShopLookList'
,
[
'method'
=>
'POST|GET'
]],
//客户看了哪些铺记录
]);
]);
...
...
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