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
f0d9bcc4
Commit
f0d9bcc4
authored
Sep 18, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
eva
parent
4369417e
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
9 additions
and
3 deletions
+9
-3
EvaluationService.php
application/models/Business/Goods/EvaluationService.php
+9
-3
No files found.
application/models/Business/Goods/EvaluationService.php
View file @
f0d9bcc4
...
...
@@ -255,9 +255,10 @@ class EvaluationServiceModel extends \Business\AbstractModel {
$list
=
$orderDao
->
getList
(
array
(
'finnshed_time'
=>
array
(
'elt'
,
time
()
-
(
\Our\ApiConst
::
oneDaySecond
)),
'evaluation_state'
=>
\Our\ApiConst
::
waitEvaluation
,
'order_state'
=>
\Our\ApiConst
::
orderStateComplete
,
'delete_state'
=>
0
,
'lock_state'
=>
0
),
'order_id,buyer_id,buyer_name,store_name,store_id,order_sn,order_id,diliveryman_id'
,
$pageBegin
,
\Our\PageConst
::
taskPageSize
,
''
);
foreach
(
$list
[
'list'
]
as
$order
)
{
$orderGoods
=
$orderGoodsDao
->
getOrderGoodsList
(
array
(
'order_id'
=>
$order
[
'order_id'
],
'refund_id'
=>
0
),
'rec_id,goods_id,goods_commonid,goods_name,goods_image,goods_pay_price,goods_num,goods_spec'
);
$evaluations
=
array
();
foreach
(
$orderGoods
as
$k
=>
$v
){
$evaluation
=
array
();
if
(
$v
[
'goods_commonid'
]
>
0
)
{
$evaluation
=
array
();
$evaluation
[
'geval_orderid'
]
=
$order
[
'order_id'
];
$evaluation
[
'geval_orderno'
]
=
$order
[
'order_sn'
];
$evaluation
[
'geval_ordergoodsid'
]
=
$v
[
'rec_id'
];
...
...
@@ -280,10 +281,13 @@ class EvaluationServiceModel extends \Business\AbstractModel {
$evaluations
[]
=
$evaluation
;
}
}
$result
=
\DAO\EvaluateGoodsModel
::
getInstance
()
->
insertAll
(
$evaluations
);
if
(
$evaluations
)
{
$result
=
\DAO\EvaluateGoodsModel
::
getInstance
()
->
insertAll
(
$evaluations
);
}
if
(
!
$result
){
return
false
;
}
$insert
=
array
();
foreach
(
$orderGoods
as
$v
)
{
if
(
$v
[
'goods_commonid'
]
>
0
)
{
//更新商品评分
...
...
@@ -301,7 +305,9 @@ class EvaluationServiceModel extends \Business\AbstractModel {
}
}
//批量插入或更新评论总分等
\DAO\GoodsScoreStatisticsModel
::
getInstance
()
->
insertAllOrUpdate
(
$insert
);
if
(
$insert
)
{
\DAO\GoodsScoreStatisticsModel
::
getInstance
()
->
insertAllOrUpdate
(
$insert
);
}
if
(
$order
[
'diliveryman_id'
]){
$delivery
[
'deval_orderid'
]
=
$order
[
'order_id'
];
//配送评价表的内容
$delivery
[
'deval_orderno'
]
=
$order
[
'order_sn'
];
...
...
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