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
245b169d
Commit
245b169d
authored
Nov 15, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购物车日志
parent
e3493f54
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
4 deletions
+3
-4
CartService.php
application/models/Business/Cart/CartService.php
+3
-3
Cart.php
application/models/DAO/Cart/Cart.php
+0
-1
No files found.
application/models/Business/Cart/CartService.php
View file @
245b169d
...
...
@@ -59,7 +59,7 @@ class CartServiceModel extends \Business\AbstractModel{
$cartArray
=
$this
->
getFormattedCartDataForEdit
(
$data
,
$cart
,
$memberId
,
$pBundlind
,
$validReturnData
);
$cartDao
=
\DAO\Cart\CartModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
);
$result
=
$cartDao
->
update
(
$cartArray
[
'newCarts'
][
0
],
array
(
'cart_id'
=>
$data
[
'cartId'
]));
if
(
!
$result
){
if
(
$result
===
false
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
editCartFailed
);
}
$cartRedis
=
\Redis\Db7\CartRedisModel
::
getInstance
();
...
...
@@ -117,7 +117,7 @@ class CartServiceModel extends \Business\AbstractModel{
$cartIds
=
array_filter
(
$cartIds
);
$sql
=
\Our\Common
::
format
(
' cart_id in({0}) and buyer_id={1}'
,
implode
(
','
,
$cartIds
),
$memberId
);
$result
=
$cartDao
->
del
(
$sql
);
if
(
!
$result
){
if
(
$result
===
false
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
editCartFailed
);
}
...
...
@@ -158,7 +158,7 @@ class CartServiceModel extends \Business\AbstractModel{
$cart
=
$this
->
getOneCart
(
$data
,
$memberId
);
$cartDao
=
\DAO\Cart\CartModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
);
$result
=
$cartDao
->
del
(
array
(
'cart_id'
=>
$data
[
'cartId'
],
'buyer_id'
=>
$memberId
));
if
(
!
$result
){
if
(
$result
===
false
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
editCartFailed
);
}
$memberStoreCartsKey
=
\Our\NameConst
::
memberStoreCartsPrefix
.
$memberId
.
\Our\NameConst
::
underline
.
$cart
[
'store_id'
];
...
...
application/models/DAO/Cart/Cart.php
View file @
245b169d
...
...
@@ -56,7 +56,6 @@ class CartModel extends \DAO\AbstractModel{
public
function
update
(
$data
,
$where
){
$this
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$result
=
$this
->
db
->
update
(
$this
->
_tableName
)
->
rows
(
$data
)
->
where
(
$where
)
->
execute
();
\Our\Log
::
getInstance
()
->
write
(
$this
->
db
->
getLastSql
(),
'/data/log/appcart'
);
return
$result
;
}
...
...
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