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
8929d53f
Commit
8929d53f
authored
Jan 11, 2019
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
优惠券问题
parent
62b7c4e1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
5 additions
and
2 deletions
+5
-2
OrderConfirmUtil.php
application/library/Order/OrderConfirmUtil.php
+1
-1
MemberCoupon.php
application/models/DAO/Coupon/MemberCoupon.php
+1
-1
Abstract.php
application/models/Redis/Db13/Abstract.php
+3
-0
No files found.
application/library/Order/OrderConfirmUtil.php
View file @
8929d53f
...
...
@@ -1096,7 +1096,7 @@ class OrderConfirmUtil {
$couponStoreIds
[]
=
\Our\ApiConst
::
zero
;
$couponIds
=
array_column
(
$memberCouponArray
,
'coupon_id'
);
$couponSql
=
\Our\Common
::
format
(
' id in ({0}) and store_id in({1})'
,
implode
(
','
,
$couponIds
),
implode
(
','
,
$couponStoreIds
));
$couponDao
=
\DAO\Coupon\CouponModel
::
getInstance
(
\Our\DbNameConst
::
master
DBConnectName
);
$couponDao
=
\DAO\Coupon\CouponModel
::
getInstance
(
\Our\DbNameConst
::
salve
DBConnectName
);
$couponList
=
$couponDao
->
getCartCouponTitles
(
$couponSql
);
if
(
!
$couponList
){
$storeCartData
[
'couponList'
]
=
array
();
...
...
application/models/DAO/Coupon/MemberCoupon.php
View file @
8929d53f
...
...
@@ -81,7 +81,7 @@ class MemberCouponModel extends \DAO\AbstractModel{
$field
=
'coupon_id,add_time,out_time'
;
$memberCoupons
=
$this
->
getList
(
$where
,
$field
);
if
(
$memberCoupons
){
$memberCouponRedisModel
->
tableCacheSet
(
\Our\NameConst
::
memberCounponListPrefix
.
$memberId
,
$memberCoupons
,
\Our\ApiConst
::
oneDaySecond
);
$memberCouponRedisModel
->
tableCacheSet
(
\Our\NameConst
::
memberCounponListPrefix
.
$memberId
,
serialize
(
$memberCoupons
)
,
\Our\ApiConst
::
oneDaySecond
);
}
return
$memberCoupons
;
}
...
...
application/models/Redis/Db13/Abstract.php
100755 → 100644
View file @
8929d53f
...
...
@@ -25,6 +25,9 @@ class AbstractModel extends \Redis\AbstractModel {
public
function
tableCacheGet
(
$id
){
$result
=
$this
->
get
(
$this
->
calcKey
(
$id
));
if
(
$this
->
is_serialized
(
$result
)){
return
unserialize
(
$result
);
}
return
$result
;
}
public
function
tableCacheSet
(
$id
,
$data
,
$experio
){
...
...
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