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
fbef21f1
Commit
fbef21f1
authored
Sep 28, 2018
by
liuyuzhen
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
下单时添加自己不能购买自己店铺的商品限制
parent
4388e52b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
13 additions
and
0 deletions
+13
-0
GroupSaleService.php
application/models/Business/Goods/GroupSaleService.php
+10
-0
CodeConfig.php
application/models/Error/CodeConfig.php
+3
-0
No files found.
application/models/Business/Goods/GroupSaleService.php
View file @
fbef21f1
...
@@ -757,6 +757,9 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
...
@@ -757,6 +757,9 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
}
}
if
(
isset
(
$storeCarts
)
&&
count
(
$storeCarts
)
>
\Our\ApiConst
::
zero
){
if
(
isset
(
$storeCarts
)
&&
count
(
$storeCarts
)
>
\Our\ApiConst
::
zero
){
$store
=
$storeDao
->
get
(
$storeId
,
false
);
$store
=
$storeDao
->
get
(
$storeId
,
false
);
if
(
$store
[
'member_id'
]
==
$memberId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
selfGoodsForStoreOrder
);
}
$temp
[
'storeName'
]
=
$store
[
'store_name'
];
$temp
[
'storeName'
]
=
$store
[
'store_name'
];
$temp
[
'storeId'
]
=
$storeId
;
$temp
[
'storeId'
]
=
$storeId
;
$temp
[
'storeCarts'
]
=
$storeCarts
;
$temp
[
'storeCarts'
]
=
$storeCarts
;
...
@@ -790,6 +793,10 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
...
@@ -790,6 +793,10 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
$cartRedis->update($memberStoreCartsKey,$temp,\Our\ApiConst::oneHour);*/
$cartRedis->update($memberStoreCartsKey,$temp,\Our\ApiConst::oneHour);*/
}
}
}
else
{
}
else
{
$store
=
$storeDao
->
get
(
$storeId
,
false
);
if
(
$store
[
'member_id'
]
==
$memberId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
selfGoodsForStoreOrder
);
}
$result
[
$storeId
]
=
$returnStoreCartsObj
[
'storeCarts'
];
$result
[
$storeId
]
=
$returnStoreCartsObj
[
'storeCarts'
];
}
}
}
}
...
@@ -954,6 +961,9 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
...
@@ -954,6 +961,9 @@ class GroupSaleServiceModel extends \Business\AbstractModel {
}
}
$store
=
$storeDao
->
get
(
$storeId
,
false
);
$store
=
$storeDao
->
get
(
$storeId
,
false
);
if
(
$store
[
'member_id'
]
==
$memberId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
selfGoodsForStoreOrder
);
}
$tempObj
[
'goodsMid'
]
=
$store
[
'member_id'
];
$tempObj
[
'goodsMid'
]
=
$store
[
'member_id'
];
$storeCarts
[]
=
$tempObj
;
$storeCarts
[]
=
$tempObj
;
$temp
[
'goodsFreight'
]
=
$goodsFreight
;
$temp
[
'goodsFreight'
]
=
$goodsFreight
;
...
...
application/models/Error/CodeConfig.php
View file @
fbef21f1
...
@@ -283,6 +283,8 @@ class CodeConfigModel {
...
@@ -283,6 +283,8 @@ class CodeConfigModel {
const
noEnoughStorageForBundlingGoods
=
30118
;
const
noEnoughStorageForBundlingGoods
=
30118
;
const
noOrderWaitToPay
=
30119
;
const
noOrderWaitToPay
=
30119
;
const
wrongEvaluation
=
30120
;
const
wrongEvaluation
=
30120
;
const
selfGoodsForStoreOrder
=
30121
;
//店铺相关错误码
//店铺相关错误码
//商品分类
//商品分类
...
@@ -760,6 +762,7 @@ class CodeConfigModel {
...
@@ -760,6 +762,7 @@ class CodeConfigModel {
self
::
noEnoughStorageForBundlingGoods
=>
'组合销售库存紧张,您购买的数量太多啦'
,
self
::
noEnoughStorageForBundlingGoods
=>
'组合销售库存紧张,您购买的数量太多啦'
,
self
::
noOrderWaitToPay
=>
'您的订单已支付,请勿重复支付'
,
self
::
noOrderWaitToPay
=>
'您的订单已支付,请勿重复支付'
,
self
::
wrongEvaluation
=>
'商品评论应在6-500字之间'
,
self
::
wrongEvaluation
=>
'商品评论应在6-500字之间'
,
self
::
selfGoodsForStoreOrder
=>
'店主不能购买自己的商品'
,
//销售员
//销售员
self
::
emptySaleGoodsId
=>
'商品id不能为空'
,
self
::
emptySaleGoodsId
=>
'商品id不能为空'
,
self
::
emptySaleGoods
=>
'销售商品不存在'
,
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