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
f1669566
Commit
f1669566
authored
Sep 25, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
storeMemberId
parent
855dd9c6
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
14 additions
and
3 deletions
+14
-3
OrderService.php
application/models/Business/Order/OrderService.php
+4
-2
RefundService.php
application/models/Business/Order/RefundService.php
+10
-1
No files found.
application/models/Business/Order/OrderService.php
View file @
f1669566
...
...
@@ -254,7 +254,9 @@ class OrderServiceModel extends \Business\AbstractModel
$this
->
orderGoodsList
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$orderGoodsDao
,
'getOrderGoodsByOrderIds'
),
array
(
$orderId
,
$this
->
getGoodsDetailField
()),
\Our\ApiConst
::
oneDaySecond
,
array
(
$orderId
));
//商店相关信息
$this
->
store
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$storeDao
,
'getInfoById'
),
array
(
$this
->
order
[
'storeId'
],
$this
->
storeField
),
\Our\ApiConst
::
oneDaySecond
);
$this
->
store
=
$storeDao
->
get
(
$this
->
order
[
'storeId'
]);
$this
->
store
=
Common
::
convertUnderline
(
$this
->
store
[
0
]);
// $this->store = \Our\RedisHelper::cachedFunction(\Redis\Db5\OrderRedisModel::getInstance(), array(&$storeDao, 'getInfoById'), array($this->order['storeId'], $this->storeField), \Our\ApiConst::oneDaySecond,array($this->order['storeId']));
$returnData
=
$this
->
order
;
//配送员信息
$this
->
diliveryman
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$diliverymanDao
,
'findById'
),
array
(
$returnData
[
'diliverymanId'
]),
\Our\ApiConst
::
oneDaySecond
);
...
...
@@ -277,7 +279,7 @@ class OrderServiceModel extends \Business\AbstractModel
$returnData
[
'diliverymanId'
]
=
ApiConst
::
zero
;
$returnData
[
'deliveryman'
]
=
new
\stdClass
();
}
$returnData
[
'storeMemberId'
]
=
$this
->
store
[
'memberId'
];
$returnData
[
'totalGoodsNum'
]
=
$orderGoodsDao
->
getGoodsCount
(
$this
->
orderGoodsList
);
$returnData
[
'offlinePayway'
]
=
$this
->
store
[
'offlinePayway'
]
?
$this
->
store
[
'offlinePayway'
]
:
''
;
$returnData
[
'reciverInfo'
]
=
$this
->
address
;
...
...
application/models/Business/Order/RefundService.php
View file @
f1669566
...
...
@@ -217,6 +217,7 @@ class RefundServiceModel extends \Business\AbstractModel
//退款原因列表
$refundReasonDao
=
\DAO\Order\RefundReasonModel
::
getInstance
();
$storeDao
=
\DAO\StoreModel
::
getInstance
();
$refundReasonList
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\RefundReasonRedisModel
::
getInstance
(),
array
(
&
$refundReasonDao
,
'getAll'
),
array
(
$this
->
refunReasonField
),
\Our\ApiConst
::
oneDaySecond
);
$shippingTypes
=
array_values
(
ArrayConst
::
refundShippingType
);
$refundTypes
=
array_values
(
ArrayConst
::
refundTypes
);
...
...
@@ -228,11 +229,14 @@ class RefundServiceModel extends \Business\AbstractModel
if
(
empty
(
$orderInfo
))
{
ErrorModel
::
throwException
(
CodeConfigModel
::
notExistRefund
);
}
//获得订单商品
$orderGoodsDao
=
\DAO\Order\OrderGoodsModel
::
getInstance
();
$orderGoodses
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\RefundReasonRedisModel
::
getInstance
(),
array
(
&
$orderGoodsDao
,
'getOrderGoodsByOrderIds'
),
array
(
$orderInfo
[
'orderId'
],
$this
->
orderGoodsField
),
\Our\ApiConst
::
oneDaySecond
);
$orderGoodses
=
$orderGoodsDao
->
convertOrderGoods
(
$orderGoodses
,
'goodsId'
);
$goodsIds
=
$orderGoodsDao
->
getRefundOrderGoodsIds
(
$orderGoodses
);
$this
->
store
=
$storeDao
->
get
(
$this
->
order
[
'storeId'
]);
$this
->
store
=
Common
::
convertUnderline
(
$this
->
store
[
0
]);
if
(
!
empty
(
$orderGoodses
[
$goodsId
])){
$orderGoods
=
$orderGoodses
[
$goodsId
];
}
...
...
@@ -261,6 +265,7 @@ class RefundServiceModel extends \Business\AbstractModel
'storeName'
=>
$orderInfo
[
'storeName'
],
'storeId'
=>
$orderInfo
[
'storeId'
],
'refundSeletedId'
=>
$orderDao
->
selectedTypeId
(
$orderInfo
),
'storeMemberId'
=>
$this
->
store
[
'memberId'
]
);
$refundCondition
=
$orderInfo
[
'refundCondition'
]
?
unserialize
(
$orderInfo
[
'refundCondition'
])
:
array
();
$returnData
[
'needShippingFee'
]
=
$orderInfo
[
'needShippingFee'
];
...
...
@@ -430,6 +435,7 @@ class RefundServiceModel extends \Business\AbstractModel
{
$refundReturnDao
=
\DAO\Order\RefundReturnModel
::
getInstance
();
$orderGoodsDao
=
\DAO\Order\OrderGoodsModel
::
getInstance
();
$storeDao
=
\DAO\StoreModel
::
getInstance
(
DbNameConst
::
salveDBConnectName
);
$goodsDao
=
\DAO\GoodsModel
::
getInstance
();
$refundReturn
=
$refundReturnDao
->
findByRefundId
(
$returnId
,
$this
->
refundReturnField
);
$diliveryManDao
=
\DAO\Order\DiliverymanModel
::
getInstance
(
DbNameConst
::
salveDBConnectName
);
...
...
@@ -437,6 +443,8 @@ class RefundServiceModel extends \Business\AbstractModel
ErrorModel
::
throwException
(
CodeConfigModel
::
notExistRefund
);
}
$orderGoods
=
\Our\RedisHelper
::
cachedFunction
(
\Redis\Db5\RefundReasonRedisModel
::
getInstance
(),
array
(
&
$orderGoodsDao
,
'findByRecId'
),
array
(
$refundReturn
[
'orderGoodsId'
],
$this
->
getGoodsDetailField
()),
\Our\ApiConst
::
oneDaySecond
);
$this
->
store
=
$storeDao
->
get
(
$refundReturn
[
'storeId'
]);
$this
->
store
=
Common
::
convertUnderline
(
$this
->
store
[
0
]);
$refundReturn
[
'goodsGroup'
]
=
$goodsDao
->
getGoodsGroup
(
$orderGoods
[
'goodsGroup'
]);
$refundReturn
[
'goodsAttr'
]
=
$goodsDao
->
getFormatGoodsAttr
(
$orderGoods
[
'goodsSpec'
]);
$refundReturn
[
'sellerStateName'
]
=
ArrayConst
::
sellerState
[
$refundReturn
[
'sellerState'
]];
...
...
@@ -447,8 +455,9 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturn
[
'picInfo'
]
=
$refundReturnDao
->
getRefundPics
(
$refundReturn
[
'picInfo'
][
'buyer'
]);
}
//平台操作类型
$refundReturn
[
'storeMemberId'
]
=
$this
->
store
[
'memberId'
];
$refundReturn
[
'platformStateName'
]
=
ArrayConst
::
platformState
[
$refundReturn
[
'platformState'
]];
$refundReturn
[
'refundShippingTypeName'
]
=
ArrayConst
::
refundShippingType
[
$refundReturn
[
'refundShippingType'
]][
'name'
];
$refundReturn
[
'refundShippingTypeName'
]
=
ArrayConst
::
refundShippingType
[
$refundReturn
[
'refundShippingType'
]][
'name'
];
$refundReturn
[
'refundText'
]
=
$refundReturnDao
->
getRefundTextStatus
(
$refundReturn
);
$refundReturn
[
'goodsImage'
]
=
ImageUtil
::
getGoodsImgUrl
(
$refundReturn
[
'goodsImage'
],
ApiConst
::
goodsSmallSize
);
$addressDao
=
\DAO\Order\DAddressModel
::
getInstance
();
...
...
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