Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Contribute to GitLab
Sign in
Toggle navigation
M
my-yaf-project
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
chenchuanwen
my-yaf-project
Commits
487f83e6
Commit
487f83e6
authored
Aug 27, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
footprints
parent
84e3ce78
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
16 additions
and
6 deletions
+16
-6
FootprintService.php
application/models/Business/User/FootprintService.php
+16
-6
No files found.
application/models/Business/User/FootprintService.php
View file @
487f83e6
...
@@ -46,14 +46,14 @@ class FootprintServiceModel extends \Business\AbstractModel
...
@@ -46,14 +46,14 @@ class FootprintServiceModel extends \Business\AbstractModel
if
(
$viewTime
===
0
){
if
(
$viewTime
===
0
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
ViewTimeNotExist
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
ViewTimeNotExist
);
}
}
$viewTime
+=
\Our\ApiConst
::
oneDaySecond
;
//
$viewTime += \Our\ApiConst::oneDaySecond;
// if($pageSize === 0){
// if($pageSize === 0){
// \Error\ErrorModel::throwException(\Error\CodeConfigModel::commonError);
// \Error\ErrorModel::throwException(\Error\CodeConfigModel::commonError);
// }
// }
$acts
=
\DAO\SaleMemberModel
::
getInstance
()
->
isJoinPlatform
(
$memberId
);
$acts
=
\DAO\SaleMemberModel
::
getInstance
()
->
isJoinPlatform
(
$memberId
);
$browseDAO
=
\DAO\GoodsBrowseModel
::
getInstance
();
$browseDAO
=
\DAO\GoodsBrowseModel
::
getInstance
();
$commonDAO
=
\DAO\GoodsCommonModel
::
getInstance
();
$commonDAO
=
\DAO\GoodsCommonModel
::
getInstance
();
$where1
=
"member_id =
{
$memberId
}
AND browse
time <
"
.
$viewTime
;
$where1
=
"member_id =
{
$memberId
}
AND browse
date =
"
.
$viewTime
;
$field
=
'goods_commonid,browsedate,group_id'
;
$field
=
'goods_commonid,browsedate,group_id'
;
//$limit = array($pageIndex*$pageSize,$pageSize);
//$limit = array($pageIndex*$pageSize,$pageSize);
...
@@ -82,19 +82,21 @@ class FootprintServiceModel extends \Business\AbstractModel
...
@@ -82,19 +82,21 @@ class FootprintServiceModel extends \Business\AbstractModel
'goodsPrice'
=>
$goodsCommon
[
'goods_price'
],
'goodsPrice'
=>
$goodsCommon
[
'goods_price'
],
'viewDate'
=>
$dates
[
$v
]
'viewDate'
=>
$dates
[
$v
]
];
];
$footPrints
[]
=
$temp
;
//$footPrints[] = $temp;
$goodsCommons
[
$goodsCommon
[
'goods_commonid'
]]
=
$temp
;
}
}
}
}
}
else
{
}
else
{
$acts
=
array_keys
(
$acts
);
$acts
=
array_keys
(
$acts
);
$field
=
'han_goods_common.goods_commonid AS goodsCommonId,goods_name AS goodsName,goods_image AS goodsImage,goods_price AS goodsPrice'
;
$field
=
'han_goods_common.goods_commonid AS goodsCommonId,goods_name AS goodsName,goods_image AS goodsImage,goods_price AS goodsPrice'
;
$list
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db4\GoodsCommonRedisModel
::
getInstance
(),
array
(
&
$commonDAO
,
'getListWithSale'
),
array
(
$where
,
$field
,
$acts
,[],[],
''
,
false
),
\Our\ApiConst
::
oneMinute
);
$list
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db4\GoodsCommonRedisModel
::
getInstance
(),
array
(
&
$commonDAO
,
'getListWithSale'
),
array
(
$where
,
$field
,
$acts
,[],[],
''
,
false
),
\Our\ApiConst
::
oneMinute
);
;
if
(
$list
){
if
(
$list
){
foreach
(
$list
as
$goodsCommon
)
{
foreach
(
$list
as
$goodsCommon
)
{
$goodsCommon
[
'goodsImage'
]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$goodsCommon
[
'goodsImage'
],
360
);
$goodsCommon
[
'goodsImage'
]
=
\Our\ImageUtil
::
getGoodsImgUrl
(
$goodsCommon
[
'goodsImage'
],
360
);
$goodsCommon
[
'viewDate'
]
=
$dates
[
$goodsCommon
[
'goodsCommonId'
]];
$goodsCommon
[
'viewDate'
]
=
$dates
[
$goodsCommon
[
'goodsCommonId'
]];
$goodsCommon
[
'groupId'
]
=
0
;
$goodsCommon
[
'groupId'
]
=
0
;
$footPrints
[]
=
$goodsCommon
;
//$footPrints[] = $goodsCommon;
$goodsCommons
[
$goodsCommon
[
'goodsCommonId'
]]
=
$goodsCommon
;
}
}
}
}
}
}
...
@@ -115,10 +117,18 @@ class FootprintServiceModel extends \Business\AbstractModel
...
@@ -115,10 +117,18 @@ class FootprintServiceModel extends \Business\AbstractModel
'goodsPrice'
=>
$group
[
'discountPrice'
],
'goodsPrice'
=>
$group
[
'discountPrice'
],
'viewDate'
=>
$dates
[
$group
[
'blId'
]]
'viewDate'
=>
$dates
[
$group
[
'blId'
]]
];
];
$
footPrints
[
]
=
$temp
;
$
groups
[
$group
[
'blId'
]
]
=
$temp
;
}
}
}
}
}
}
foreach
(
$browseList
as
$browse
)
{
if
(
$browse
[
'goods_commonid'
])
{
$footPrints
[]
=
$goodsCommons
[
$browse
[
'goods_commonid'
]];
}
if
(
$browse
[
'group_id'
])
{
$footPrints
[]
=
$groups
[
$browse
[
'group_id'
]];
}
}
}
}
return
array
(
'footprints'
=>
$footPrints
);
return
array
(
'footprints'
=>
$footPrints
);
}
}
...
...
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