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
17d7adab
Commit
17d7adab
authored
Sep 28, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master_dev' of git.shenbd.com:qm-develop/shenbd into master_dev
parents
622a6f46
d02df1a5
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
CartService.php
application/models/Business/Cart/CartService.php
+9
-0
GroupSaleService.php
application/models/Business/Goods/GroupSaleService.php
+10
-0
CodeConfig.php
application/models/Error/CodeConfig.php
+5
-0
No files found.
application/models/Business/Cart/CartService.php
View file @
17d7adab
...
...
@@ -240,6 +240,9 @@ class CartServiceModel extends \Business\AbstractModel{
foreach
(
$validReturnData
as
$goods
){
$newCart
=
array
();
$store
=
$storeDao
->
get
(
$goods
[
'store_id'
],
false
);
if
(
$store
[
'member_id'
]
==
$memberId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
wrongAddCartForSelfStore
);
}
if
(
!
(
$storeIds
&&
in_array
(
$goods
[
'store_id'
],
$storeIds
))){
$storeIds
[]
=
$goods
[
'store_id'
];
}
...
...
@@ -263,6 +266,9 @@ class CartServiceModel extends \Business\AbstractModel{
}
else
{
$goods
=
$validReturnData
;
$store
=
$storeDao
->
get
(
$goods
[
'store_id'
],
false
);
if
(
$store
[
'member_id'
]
==
$memberId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
wrongAddCartForSelfStore
);
}
$storeIds
[]
=
$goods
[
'store_id'
];
$newCart
[
'store_id'
]
=
$goods
[
'store_id'
];
$newCart
[
'goods_id'
]
=
$goods
[
'goods_id'
];
...
...
@@ -291,6 +297,9 @@ class CartServiceModel extends \Business\AbstractModel{
public
function
getPBundlingGoodsCartData
(
$blNum
,
$memberId
,
$pBundling
){
$storeDao
=
\DAO\StoreModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
);
$store
=
$storeDao
->
get
(
$pBundling
[
'store_id'
],
false
);
if
(
$store
[
'member_id'
]
==
$memberId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
wrongAddCartForSelfStore
);
}
$newCart
[
'store_id'
]
=
$pBundling
[
'store_id'
];
$newCart
[
'goods_id'
]
=
$pBundling
[
'blId'
];
$newCart
[
'goods_commonid'
]
=
\Our\ApiConst
::
zero
;
...
...
application/models/Business/Goods/GroupSaleService.php
View file @
17d7adab
...
...
@@ -757,6 +757,9 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
}
if
(
isset
(
$storeCarts
)
&&
count
(
$storeCarts
)
>
\Our\ApiConst
::
zero
){
$store
=
$storeDao
->
get
(
$storeId
,
false
);
if
(
$store
[
'member_id'
]
==
$memberId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
selfGoodsForStoreOrder
);
}
$temp
[
'storeName'
]
=
$store
[
'store_name'
];
$temp
[
'storeId'
]
=
$storeId
;
$temp
[
'storeCarts'
]
=
$storeCarts
;
...
...
@@ -790,6 +793,10 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
$cartRedis->update($memberStoreCartsKey,$temp,\Our\ApiConst::oneHour);*/
}
}
else
{
$store
=
$storeDao
->
get
(
$storeId
,
false
);
if
(
$store
[
'member_id'
]
==
$memberId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
selfGoodsForStoreOrder
);
}
$result
[
$storeId
]
=
$returnStoreCartsObj
[
'storeCarts'
];
}
}
...
...
@@ -954,6 +961,9 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
}
$store
=
$storeDao
->
get
(
$storeId
,
false
);
if
(
$store
[
'member_id'
]
==
$memberId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
selfGoodsForStoreOrder
);
}
$tempObj
[
'goodsMid'
]
=
$store
[
'member_id'
];
$storeCarts
[]
=
$tempObj
;
$temp
[
'goodsFreight'
]
=
$goodsFreight
;
...
...
application/models/Error/CodeConfig.php
View file @
17d7adab
...
...
@@ -167,6 +167,7 @@ class CodeConfigModel {
const
pBundlingNoStorageForOrder
=
50040
;
const
editDelCartFailed
=
50041
;
const
editCartUploadCartFailed
=
50042
;
const
wrongAddCartForSelfStore
=
50043
;
//订单相关错误码
...
...
@@ -283,6 +284,8 @@ class CodeConfigModel {
const
noEnoughStorageForBundlingGoods
=
30118
;
const
noOrderWaitToPay
=
30119
;
const
wrongEvaluation
=
30120
;
const
selfGoodsForStoreOrder
=
30121
;
//店铺相关错误码
//商品分类
...
...
@@ -563,6 +566,7 @@ class CodeConfigModel {
self
::
pBundlingNoStorageForOrder
=>
'组合销售商品库存不足'
,
self
::
editDelCartFailed
=>
'编辑购物车时删除数据失败'
,
self
::
editCartUploadCartFailed
=>
'编辑购物车更新购物车时间失败'
,
self
::
wrongAddCartForSelfStore
=>
'店主不能添加自己店铺的商品到购物车'
,
self
::
addressNotExist
=>
'地址不存在'
,
self
::
emptyAddressId
=>
'地址主键参数不能为空'
,
...
...
@@ -760,6 +764,7 @@ class CodeConfigModel {
self
::
noEnoughStorageForBundlingGoods
=>
'组合销售库存紧张,您购买的数量太多啦'
,
self
::
noOrderWaitToPay
=>
'您的订单已支付,请勿重复支付'
,
self
::
wrongEvaluation
=>
'商品评论应在6-500字之间'
,
self
::
selfGoodsForStoreOrder
=>
'店主不能购买自己的商品'
,
//销售员
self
::
emptySaleGoodsId
=>
'商品id不能为空'
,
self
::
emptySaleGoods
=>
'销售商品不存在'
,
...
...
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