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
c644aa8f
Commit
c644aa8f
authored
Oct 12, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组合销售不能移入收藏夹
parent
34fb9fdc
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
2 deletions
+4
-2
CartService.php
application/models/Business/Cart/CartService.php
+4
-2
No files found.
application/models/Business/Cart/CartService.php
View file @
c644aa8f
...
@@ -512,10 +512,12 @@ class CartServiceModel extends \Business\AbstractModel{
...
@@ -512,10 +512,12 @@ class CartServiceModel extends \Business\AbstractModel{
$favoritesDao
=
\DAO\FavoritesModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
);
$favoritesDao
=
\DAO\FavoritesModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
);
$cartDao
->
db
->
doTransaction
();
$cartDao
->
db
->
doTransaction
();
$favList
=
array
();
$favList
=
array
();
$delCacheList
=
array
();
foreach
(
$cartList
as
$cart
){
foreach
(
$cartList
as
$cart
){
if
(
$cart
[
'type'
]
==
\Our\ApiConst
::
addBundingToCart
){
if
(
$cart
[
'type'
]
==
\Our\ApiConst
::
addBundingToCart
){
continue
;
continue
;
}
}
$delCacheList
[]
=
$cart
;
$fav
=
array
();
$fav
=
array
();
$fav
[
'member_id'
]
=
$memberId
;
$fav
[
'member_id'
]
=
$memberId
;
if
(
$cart
[
'type'
]
==
\Our\ApiConst
::
addGoodsToCart
){
if
(
$cart
[
'type'
]
==
\Our\ApiConst
::
addGoodsToCart
){
...
@@ -536,7 +538,7 @@ class CartServiceModel extends \Business\AbstractModel{
...
@@ -536,7 +538,7 @@ class CartServiceModel extends \Business\AbstractModel{
}
}
$cartIds
=
explode
(
','
,
$where
[
'cartIds'
]);
$cartIds
=
explode
(
','
,
$where
[
'cartIds'
]);
$cartIds
=
array_filter
(
$cartIds
);
$cartIds
=
array_filter
(
$cartIds
);
$sql
=
\Our\Common
::
format
(
' cart_id in({0}) and buyer_id={1}'
,
implode
(
','
,
$cartIds
),
$memberId
);
$sql
=
\Our\Common
::
format
(
' cart_id in({0}) and buyer_id={1}
and type =1
'
,
implode
(
','
,
$cartIds
),
$memberId
);
$result
=
$cartDao
->
del
(
$sql
);
$result
=
$cartDao
->
del
(
$sql
);
if
(
!
$result
){
if
(
!
$result
){
$cartDao
->
db
->
doRollback
();
$cartDao
->
db
->
doRollback
();
...
@@ -546,7 +548,7 @@ class CartServiceModel extends \Business\AbstractModel{
...
@@ -546,7 +548,7 @@ class CartServiceModel extends \Business\AbstractModel{
$cartRedis
=
\Redis\Db7\CartRedisModel
::
getInstance
();
$cartRedis
=
\Redis\Db7\CartRedisModel
::
getInstance
();
$cartRedis
->
tableDel
(
$memberCartKey
);
$cartRedis
->
tableDel
(
$memberCartKey
);
$FavoritesInstance
=
\DAO\FavoritesModel
::
getInstance
();
$FavoritesInstance
=
\DAO\FavoritesModel
::
getInstance
();
foreach
(
$
cart
List
as
$cart
){
foreach
(
$
delCache
List
as
$cart
){
$memberStoreCartsKey
=
\Our\NameConst
::
memberStoreCartsPrefix
.
$memberId
.
\Our\NameConst
::
underline
.
$cart
[
'store_id'
];
$memberStoreCartsKey
=
\Our\NameConst
::
memberStoreCartsPrefix
.
$memberId
.
\Our\NameConst
::
underline
.
$cart
[
'store_id'
];
$cartRedis
->
tableDel
(
$memberStoreCartsKey
);
$cartRedis
->
tableDel
(
$memberStoreCartsKey
);
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db4\FavoritesRedisModel
::
getInstance
(),
array
(
&
$FavoritesInstance
,
'getOne'
),
array
(
'*'
,
array
(
'member_id'
=>
$memberId
,
'goods_commonid'
=>
$cart
[
'goods_commonid'
])),
array
(
$memberId
));
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db4\FavoritesRedisModel
::
getInstance
(),
array
(
&
$FavoritesInstance
,
'getOne'
),
array
(
'*'
,
array
(
'member_id'
=>
$memberId
,
'goods_commonid'
=>
$cart
[
'goods_commonid'
])),
array
(
$memberId
));
...
...
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