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
7a5ccbea
Commit
7a5ccbea
authored
Sep 26, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evaluate
parent
7e7f73b1
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
13 additions
and
4 deletions
+13
-4
EvaluationService.php
application/models/Business/Goods/EvaluationService.php
+3
-4
StoreService.php
application/models/Business/Store/StoreService.php
+8
-0
CodeConfig.php
application/models/Error/CodeConfig.php
+2
-0
No files found.
application/models/Business/Goods/EvaluationService.php
View file @
7a5ccbea
...
...
@@ -45,7 +45,6 @@ class EvaluationServiceModel extends \Business\AbstractModel {
*/
public
function
submit
(
$data
,
$memberId
){
list
(
$data
,
$order
,
$orderGoods
)
=
$this
->
_submitValite
(
$data
,
$memberId
);
$log
=
\Our\Log
::
getInstance
();
foreach
(
$orderGoods
as
$v
){
$orderGoods
[
$v
[
'goods_id'
]]
=
$v
;
}
...
...
@@ -218,15 +217,15 @@ class EvaluationServiceModel extends \Business\AbstractModel {
$param
[
'descCredit'
]
||
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyDescCredit
);
$param
[
'deliveryCredit'
]
||
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyDeliveryCredit
);
$param
[
'deliveryCredit'
]
||
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyServiceCredit
);
$log
=
\Our\Log
::
getInstance
();
$log
->
write
(
json_encode
(
$param
[
'goods'
]));
if
(
!
is_array
(
$param
[
'goods'
]))
{
$param
[
'goods'
]
=
json_decode
(
$param
[
'goods'
],
true
);
}
$log
->
write
(
json_encode
(
$param
[
'goods'
]));
foreach
(
$param
[
'goods'
]
as
$v
){
$v
[
'goodsId'
]
||
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyGoodsId
);
$v
[
'scores'
]
||
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
emptyScores
);
if
(
!
empty
(
$v
[
'content'
])
&&
(
mb_strlen
(
$v
[
'content'
]
<
6
||
mb_strlen
(
$v
[
'content'
])
>
500
)))
{
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
wrongEvaluation
);
}
}
//获取订单商品
$orderGoodsInstance
=
\DAO\Order\OrderGoodsModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
);
...
...
application/models/Business/Store/StoreService.php
View file @
7a5ccbea
...
...
@@ -48,6 +48,14 @@ class StoreServiceModel extends \Business\AbstractModel{
\Redis\Db4\SaleActivityRedisModel
::
getInstance
()
->
tableDel
(
'storeId:'
.
$storeId
);
}
}
$storeMembers
=
array
();
$storeMember
=
array
();
$storeMember
[
'store_id'
]
=
$storeId
;
$storeMember
[
'member_id'
]
=
$memberId
;
$storeMember
[
'fav_from'
]
=
\Our\ApiConst
::
scanFavor
;
$storeMembers
[]
=
$storeMember
;
$favoritesStoreDao
=
\DAO\FavoritesStoreModel
::
getInstance
();
$result
=
$favoritesStoreDao
->
insertAll
(
$storeMembers
);
}
else
{
$sess
=
\Yaf\Session
::
getInstance
();
$scan_store_ids
=
$sess
->
get
(
'scan_store_ids'
);
...
...
application/models/Error/CodeConfig.php
View file @
7a5ccbea
...
...
@@ -282,6 +282,7 @@ class CodeConfigModel {
const
noEnoughStorageForBundlingGoods
=
30118
;
const
noOrderWaitToPay
=
30119
;
const
wrongEvaluation
=
30120
;
//店铺相关错误码
//商品分类
...
...
@@ -758,6 +759,7 @@ class CodeConfigModel {
self
::
goodsNoStoreForCartOrOrder1
=>
'商品库存紧张,您的购买数量太多啦'
,
self
::
noEnoughStorageForBundlingGoods
=>
'组合销售库存紧张,您购买的数量太多啦'
,
self
::
noOrderWaitToPay
=>
'您的订单已支付,请勿重复支付'
,
self
::
wrongEvaluation
=>
'商品评论应在6-500字之间'
,
//销售员
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