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
32a130fb
Commit
32a130fb
authored
Nov 15, 2018
by
christ
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into ccw
parents
a35934f4
8a4ff984
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
27 additions
and
12 deletions
+27
-12
CartService.php
application/models/Business/Cart/CartService.php
+3
-3
GoodsClassService.php
application/models/Business/Goods/GoodsClassService.php
+9
-8
OrderService.php
application/models/Business/Order/OrderService.php
+15
-1
No files found.
application/models/Business/Cart/CartService.php
View file @
32a130fb
...
...
@@ -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/Business/Goods/GoodsClassService.php
View file @
32a130fb
...
...
@@ -190,6 +190,8 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
$storeDao
=
\DAO\StoreModel
::
getInstance
();
$signStoreClasses
=
$this
->
getSignClassesByCityCode
(
$cityCode
);
if
(
$signStoreClasses
){
$storeIds
=
array_unique
(
array_column
(
$signStoreClasses
,
'store_id'
));
$tempStoreList
=
$storeDao
->
getNearbyStores
(
$cityCode
,
$storeIds
);
$storeList
=
array
();
...
...
@@ -198,7 +200,6 @@ class GoodsClassServiceModel extends \Business\AbstractModel{
$storeList
[
$tempStore
[
'store_id'
]]
=
$tempStore
;
}
}
if
(
$signStoreClasses
){
$returnClass
=
array
();
$newStoreIds
=
array
();
foreach
(
$signStoreClasses
as
$signClass
){
...
...
application/models/Business/Order/OrderService.php
View file @
32a130fb
...
...
@@ -977,11 +977,25 @@ class OrderServiceModel extends \Business\AbstractModel
$store
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db6\StoreRedisModel
::
getInstance
(),
array
(
&
$storeDao
,
'getInfoById'
),
array
(
$order
[
'store_id'
]),
\Our\ApiConst
::
oneHour
);
$orderContent
[
'storeName'
]
=
$store
[
'store_name'
];
if
(
$order
[
'payment_type'
]
==
\Our\ApiConst
::
payOffline
)
{
$orderContent
[
'imageUrls'
]
=
array
();
if
(
\Our\Common
::
isSerialized
(
$store
[
'offline_payway'
])){
$paywayArray
=
unserialize
(
$store
[
'offline_payway'
]);
$orderContent
[
'payway'
]
=
$paywayArray
[
'payway'
];
if
(
$paywayArray
){
foreach
(
$paywayArray
[
'images'
]
as
$image
){
if
(
$image
){
$orderContent
[
'imageUrls'
][]
=
\Our\Common
::
getStaticFile
(
$image
,
\Our\ImageConst
::
storeLabel
);
}
}
}
}
else
{
$orderContent
[
'payway'
]
=
$store
[
'offline_payway'
];
}
}
else
if
(
$order
[
'payment_type'
]
==
\Our\ApiConst
::
payAog
)
{
$orderContent
[
'payway'
]
=
\Our\DescribeConst
::
afterPay
;
}
$orderContent
[
'orderAmount'
]
=
$order
[
'order_amount'
];
$orderContent
[
'dlyoPickupCode'
]
=
substr
(
$order
[
'order_sn'
],
ApiConst
::
positionPickupCodeBegin
);
$orderContents
[]
=
$orderContent
;
}
$orderIds
[]
=
$order
[
'order_id'
];
...
...
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