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
6f1fab25
Commit
6f1fab25
authored
Aug 24, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Plain Diff
time
parents
ee85d0cd
87d2ca77
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
37 additions
and
5 deletions
+37
-5
Index.php
application/controllers/Index.php
+8
-1
OrderService.php
application/models/Business/Order/OrderService.php
+1
-1
Order.php
application/models/DAO/Order/Order.php
+1
-1
OrderGoods.php
application/models/DAO/Order/OrderGoods.php
+7
-2
goodsdetail.phtml
application/views/index/goodsdetail.phtml
+20
-0
No files found.
application/controllers/Index.php
View file @
6f1fab25
...
@@ -91,6 +91,13 @@ class IndexController extends \Our\Controller_Abstract {
...
@@ -91,6 +91,13 @@ class IndexController extends \Our\Controller_Abstract {
$this
->
_view
->
assign
(
'totalCount'
,
$returnMessage
[
'totalCount'
]);
$this
->
_view
->
assign
(
'totalCount'
,
$returnMessage
[
'totalCount'
]);
}
}
public
function
goodsDetailAction
()
{
$goodsCommonId
=
(
int
)
$this
->
getRequest
()
->
getQuery
()[
'goodsCommonId'
];
if
(
$goodsCommonId
>
0
)
{
$commonGoodsInstance
=
\DAO\GoodsCommonModel
::
getInstance
();
$commonInfo
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db4\GoodsCommonRedisModel
::
getInstance
(),
array
(
&
$commonGoodsInstance
,
'getOneById'
),
array
(
$goodsCommonId
),
0
,
array
(
$goodsCommonId
));
}
$this
->
_view
->
assign
(
'commonInfo'
,
$commonInfo
);
}
}
}
application/models/Business/Order/OrderService.php
View file @
6f1fab25
...
@@ -191,7 +191,7 @@ class OrderServiceModel extends \Business\AbstractModel
...
@@ -191,7 +191,7 @@ class OrderServiceModel extends \Business\AbstractModel
// }
// }
//定单商品表
//定单商品表
$this
->
orderGoodsList
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$orderGoodsDao
,
'getOrderGoodsByOrderIds'
),
array
(
$orderId
,
$this
->
getGoodsDetailField
()),
\Our\ApiConst
::
oneDaySecond
);
$this
->
orderGoodsList
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$orderGoodsDao
,
'getOrderGoodsByOrderIds'
),
array
(
$orderId
,
$this
->
getGoodsDetailField
()),
\Our\ApiConst
::
oneDaySecond
,
array
(
$orderId
)
);
//商店相关信息
//商店相关信息
$this
->
store
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$storeDao
,
'getInfoById'
),
array
(
$this
->
order
[
'storeId'
],
$this
->
storeField
),
\Our\ApiConst
::
oneDaySecond
);
$this
->
store
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$storeDao
,
'getInfoById'
),
array
(
$this
->
order
[
'storeId'
],
$this
->
storeField
),
\Our\ApiConst
::
oneDaySecond
);
$returnData
=
$this
->
order
;
$returnData
=
$this
->
order
;
...
...
application/models/DAO/Order/Order.php
View file @
6f1fab25
...
@@ -709,7 +709,7 @@ class OrderModel extends \DAO\AbstractModel
...
@@ -709,7 +709,7 @@ class OrderModel extends \DAO\AbstractModel
if
(
!
empty
(
$orderId
)){
if
(
!
empty
(
$orderId
)){
$this
->
deleteFindByOrderIdCache
(
$orderId
);
$this
->
deleteFindByOrderIdCache
(
$orderId
);
$orderGoodsDao
=
\DAO\Order\OrderGoodsModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$orderGoodsDao
=
\DAO\Order\OrderGoodsModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$orderGoodsDao
->
deleteOrderGoodsCache
(
$orderId
);
$orderGoodsDao
->
deleteOrderGoodsCache
(
$
memberId
,
$
orderId
);
}
}
}
}
...
...
application/models/DAO/Order/OrderGoods.php
View file @
6f1fab25
...
@@ -100,9 +100,14 @@ class OrderGoodsModel extends \DAO\AbstractModel {
...
@@ -100,9 +100,14 @@ class OrderGoodsModel extends \DAO\AbstractModel {
return
$this
->
getOrderGoods
(
$where
,
$field
);
return
$this
->
getOrderGoods
(
$where
,
$field
);
}
}
public
function
deleteOrderGoodsCache
(
$orderIds
){
public
function
deleteOrderGoodsCache
(
$memberId
,
$orderIds
){
if
(
$memberId
){
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsByOrderIds'
),
array
(
$memberId
));
}
if
(
$orderIds
){
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsByOrderIds'
),
array
(
$orderIds
));
return
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$this
,
'getOrderGoodsByOrderIds'
),
array
(
$orderIds
));
}
}
}
public
function
getIsRefundMoney
(
$orderGoodses
,
$promotionsId
){
public
function
getIsRefundMoney
(
$orderGoodses
,
$promotionsId
){
$isRefundMoney
=
ApiConst
::
zero
;
$isRefundMoney
=
ApiConst
::
zero
;
foreach
(
$orderGoodses
as
$orderGood
){
foreach
(
$orderGoodses
as
$orderGood
){
...
...
application/views/index/goodsdetail.phtml
0 → 100644
View file @
6f1fab25
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN"
"http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html
xmlns=
"http://www.w3.org/1999/xhtml"
xml:lang=
"en"
>
<head>
<meta
http-equiv=
"Content-Type"
content=
"text/html;charset=UTF-8 ?>"
>
<title>
Document
</title>
</head>
<body>
<div
style=
"width: 750px"
>
<?php
echo
$commonInfo
[
'goods_body'
];
?>
</div>
</body>
</html>
<style>
*
{
margin
:
0
;
padding
:
0
;
}
</style>
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