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
b0eff14e
Commit
b0eff14e
authored
Sep 26, 2018
by
zhz
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
evaluate
parent
1c23cdf5
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
3 additions
and
3 deletions
+3
-3
EvaluationService.php
application/models/Business/Goods/EvaluationService.php
+3
-3
No files found.
application/models/Business/Goods/EvaluationService.php
View file @
b0eff14e
...
@@ -12,7 +12,7 @@ class EvaluationServiceModel extends \Business\AbstractModel {
...
@@ -12,7 +12,7 @@ class EvaluationServiceModel extends \Business\AbstractModel {
$order
=
$this
->
_validate
(
intval
(
$param
[
'orderId'
]),
$memberId
);
$order
=
$this
->
_validate
(
intval
(
$param
[
'orderId'
]),
$memberId
);
//获取订单商品
//获取订单商品
$orderGoodsDAO
=
\DAO\Order\OrderGoodsModel
::
getInstance
();
$orderGoodsDAO
=
\DAO\Order\OrderGoodsModel
::
getInstance
();
$orderGoods
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderGoodsRedisModel
::
getInstance
(),
array
(
&
$orderGoodsDAO
,
'getOrderGoodsList'
),
array
(
array
(
'order_id'
=>
$order
[
'order_id'
]),
'rec_id,goods_id,goods_commonid,goods_name,goods_image,goods_pay_price,goods_num,goods_spec'
),
\Our\ApiConst
::
oneHour
);
$orderGoods
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderGoodsRedisModel
::
getInstance
(),
array
(
&
$orderGoodsDAO
,
'getOrderGoodsList'
),
array
(
array
(
'order_id'
=>
$order
[
'order_id'
]),
'rec_id,goods_id,goods_commonid,goods_name,goods_image,goods_pay_price,goods_num,goods_spec'
),
\Our\ApiConst
::
tenMinSecond
,
array
(
$order
[
'order_id'
])
);
if
(
!
$orderGoods
){
if
(
!
$orderGoods
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
orderError
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
orderError
);
}
}
...
@@ -204,7 +204,7 @@ class EvaluationServiceModel extends \Business\AbstractModel {
...
@@ -204,7 +204,7 @@ class EvaluationServiceModel extends \Business\AbstractModel {
//验证订单状态 是否待评价
//验证订单状态 是否待评价
$orderInstance
=
\DAO\Order\OrderModel
::
getInstance
();
$orderInstance
=
\DAO\Order\OrderModel
::
getInstance
();
$orderInstance
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$orderInstance
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$order
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$orderInstance
,
'find'
),
array
(
array
(
'order_id'
=>
$orderId
)),
\Our\ApiConst
::
one
MinSecond
,
array
(
$orderId
));
$order
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$orderInstance
,
'find'
),
array
(
array
(
'order_id'
=>
$orderId
)),
\Our\ApiConst
::
ten
MinSecond
,
array
(
$orderId
));
if
(
$order
[
'evaluation_state'
]
!=
0
||
$order
[
'order_state'
]
!=
40
||
$order
[
'buyer_id'
]
!=
$memberId
){
if
(
$order
[
'evaluation_state'
]
!=
0
||
$order
[
'order_state'
]
!=
40
||
$order
[
'buyer_id'
]
!=
$memberId
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
orderError
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
orderError
);
}
}
...
@@ -229,7 +229,7 @@ class EvaluationServiceModel extends \Business\AbstractModel {
...
@@ -229,7 +229,7 @@ class EvaluationServiceModel extends \Business\AbstractModel {
}
}
//获取订单商品
//获取订单商品
$orderGoodsInstance
=
\DAO\Order\OrderGoodsModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
);
$orderGoodsInstance
=
\DAO\Order\OrderGoodsModel
::
getInstance
(
\Our\DbNameConst
::
masterDBConnectName
);
$orderGoods
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderGoodsRedisModel
::
getInstance
(),
array
(
&
$orderGoodsInstance
,
'getOrderGoodsList'
),
array
(
array
(
'order_id'
=>
$order
[
'order_id'
]),
'rec_id,goods_id,goods_commonid,goods_name,goods_image,goods_pay_price,goods_num,goods_spec'
),
\Our\ApiConst
::
one
MinSecond
,
array
(
$order
[
'order_id'
]));
$orderGoods
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderGoodsRedisModel
::
getInstance
(),
array
(
&
$orderGoodsInstance
,
'getOrderGoodsList'
),
array
(
array
(
'order_id'
=>
$order
[
'order_id'
]),
'rec_id,goods_id,goods_commonid,goods_name,goods_image,goods_pay_price,goods_num,goods_spec'
),
\Our\ApiConst
::
ten
MinSecond
,
array
(
$order
[
'order_id'
]));
// $orderGoods = \DAO\OrderGoodsModel::getInstance()->getOrderGoodsList(array('order_id'=>$order['order_id']),'rec_id,goods_id,goods_name,goods_image,goods_pay_price,goods_num');
// $orderGoods = \DAO\OrderGoodsModel::getInstance()->getOrderGoodsList(array('order_id'=>$order['order_id']),'rec_id,goods_id,goods_name,goods_image,goods_pay_price,goods_num');
if
(
!
$orderGoods
){
if
(
!
$orderGoods
){
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
orderError
);
\Error\ErrorModel
::
throwException
(
\Error\CodeConfigModel
::
orderError
);
...
...
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