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
b9f650d5
Commit
b9f650d5
authored
Dec 02, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
购物车已删除商品问题
parent
f4a500fb
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
6 deletions
+7
-6
Goods.php
application/models/DAO/Goods.php
+3
-3
Store.php
application/models/DAO/Store.php
+2
-2
CodeConfig.php
application/models/Error/CodeConfig.php
+2
-1
No files found.
application/models/DAO/Goods.php
View file @
b9f650d5
...
...
@@ -271,10 +271,10 @@ class GoodsModel extends \DAO\AbstractModel {
}
if
(
$fromCart
){
$sql
=
\Our\Common
::
format
(
' goods_commonid in ({0})'
,
implode
(
','
,
$goodsCommonIds
));
$field
=
'goods_commonid,goods_id,goods_storage,goods_state,goods_verify,is_transport,transport_id,gc_id,gc_id_1,gc_id_2,gc_id_3,snapshot_id,goods_image,goods_freight,goods_free,delivery_template_id'
;
$field
=
'goods_commonid,goods_id,goods_storage,goods_state,goods_verify,is_transport,transport_id,gc_id,gc_id_1,gc_id_2,gc_id_3,snapshot_id,goods_image,goods_freight,goods_free,delivery_template_id
,is_del
'
;
}
else
if
(
$noRedisGoodsCommonIds
){
$sql
=
\Our\Common
::
format
(
' goods_commonid in ({0})'
,
implode
(
','
,
$noRedisGoodsCommonIds
));
$field
=
'goods_commonid,goods_id,goods_storage,goods_state,goods_verify'
;
$field
=
'goods_commonid,goods_id,goods_storage,goods_state,goods_verify
,is_del
'
;
}
if
(
$sql
&&
$field
){
$goodsArray
=
$this
->
getList
(
$sql
,
$field
);
...
...
@@ -294,7 +294,7 @@ class GoodsModel extends \DAO\AbstractModel {
foreach
(
$goodsCommonList
[
$goodsCommonId
]
as
$goodsId
){
$goods
=
$goodsList
[
$goodsId
];
$data
=
array
(
'goodsStorage'
=>
$goods
[
'goods_storage'
]);
if
(
$goods
[
'goods_state'
]
==
\Our\ApiConst
::
onlineGoodsState
&&
$goods
[
'goods_verify'
]
==
\Our\ApiConst
::
onlineGoodsVerify
){
if
(
$goods
[
'goods_state'
]
==
\Our\ApiConst
::
onlineGoodsState
&&
$goods
[
'goods_verify'
]
==
\Our\ApiConst
::
onlineGoodsVerify
&&
$goods
[
'is_del'
]
==
\Our\ApiConst
::
zero
){
$data
[
'onlineFlag'
]
=
\Our\ApiConst
::
one
;
}
else
{
$data
[
'onlineFlag'
]
=
\Our\ApiConst
::
zero
;
...
...
application/models/DAO/Store.php
View file @
b9f650d5
...
...
@@ -424,12 +424,12 @@ class StoreModel extends \DAO\AbstractModel
public
function
checkAddressInServiceArea
(
$address
,
$store
)
{
$inAreaFlag
=
\Our\ApiConst
::
zero
;
if
(
$store
[
'
buyer_distribution'
]
||
$store
[
'
express_distribution'
])
{
//如果店铺开启了到店自提和快递配送,则认为存在可用配送方式
if
(
$store
[
'express_distribution'
])
{
//如果店铺开启了到店自提和快递配送,则认为存在可用配送方式
$inAreaFlag
=
\Our\ApiConst
::
one
;
return
$inAreaFlag
;
}
if
(
$store
[
'seller_distribution'
]
&&
$address
)
{
$result
=
\Store\StoreUtil
::
getInstance
()
->
checkAddressInServiceArea
(
array
(
'lng'
=>
$address
[
'lng'
],
'lat'
=>
$address
[
'lat'
]),
$store
[
'store_id'
]
);
$result
=
\Store\StoreUtil
::
getInstance
()
->
checkAddressInServiceArea
ByStore
(
array
(
'lng'
=>
$address
[
'lng'
],
'lat'
=>
$address
[
'lat'
]),
$store
);
if
(
$result
)
{
$inAreaFlag
=
\Our\ApiConst
::
one
;
}
...
...
application/models/Error/CodeConfig.php
View file @
b9f650d5
...
...
@@ -179,7 +179,7 @@ class CodeConfigModel
const
editCartUploadCartFailed
=
50042
;
const
wrongAddCartForSelfStore
=
50043
;
const
pbundingGoodsCannotMoveToFavouites
=
50044
;
const
wrongGoodsForEditGoods
=
50045
;
//订单相关错误码
const
orderNotExist
=
30001
;
...
...
@@ -607,6 +607,7 @@ class CodeConfigModel
self
::
editCartUploadCartFailed
=>
'编辑购物车更新购物车时间失败'
,
self
::
wrongAddCartForSelfStore
=>
'店主不能添加自己店铺的商品到购物车'
,
self
::
pbundingGoodsCannotMoveToFavouites
=>
'组合商品暂不支持移入收藏夹'
,
self
::
wrongGoodsForEditGoods
=>
'编辑的商品错误'
,
self
::
addressNotExist
=>
'地址不存在'
,
self
::
emptyAddressId
=>
'地址主键参数不能为空'
,
...
...
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