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
70490af8
Commit
70490af8
authored
Aug 20, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
pc
parent
d49fc02c
Show whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
44 additions
and
5 deletions
+44
-5
ArrayConst.php
application/library/Our/ArrayConst.php
+5
-1
RefundService.php
application/models/Business/Order/RefundService.php
+37
-3
addRefund.php
public/test/order/addRefund.php
+2
-1
No files found.
application/library/Our/ArrayConst.php
View file @
70490af8
...
...
@@ -130,7 +130,11 @@ class ArrayConst
'buttonId'
=>
ApiConst
::
messageButtonIdOne
),
);
const
defaultDeliveryMan
=
array
(
'id'
=>
0
,
'trueName'
=>
'配送员a'
,
'mobile'
=>
'18650329907'
,
);
const
messageOrderButtonsType
=
array
(
0
,
1
,
2
);
...
...
application/models/Business/Order/RefundService.php
View file @
70490af8
...
...
@@ -4,6 +4,7 @@ namespace Business\Order;
use
Error\CodeConfigModel
;
use
Error\ErrorModel
;
use
OSS\OssClient
;
use
Our\ApiConst
;
use
Our\ArrayConst
;
use
Our\Common
;
...
...
@@ -356,8 +357,19 @@ class RefundServiceModel extends \Business\AbstractModel
$refundArray
[
'reason_info'
]
=
$refundReasonList
[
$reasonId
][
'reasonInfo'
];
}
$picArray
=
array
();
$picArray
[
'buyer'
]
=
array
();
if
(
!
empty
(
$refund
[
'images'
]))
{
$picArray
[
'buyer'
]
=
$refund
[
'images'
];
foreach
(
$refund
[
'images'
]
as
$key
=>
$image
){
$ismuch
=
preg_match
(
'/^(data:\s*image\/(\w+);base64,)/'
,
$image
,
$result
);
if
(
$ismuch
){
$fileName
=
ImageUtil
::
uploadBase64Image
(
$image
,
ImageConst
::
refund
,
ImageUtil
::
getFileName
(
$memberId
.
$key
));
$fileName
=
basename
(
$fileName
);
}
else
{
$fileName
=
$image
;
}
array_push
(
$picArray
[
'buyer'
],
$fileName
);
}
// $picArray['buyer'] = $refund['images'];
}
else
{
$picArray
[
'buyer'
]
=
array
();
}
...
...
@@ -399,6 +411,7 @@ class RefundServiceModel extends \Business\AbstractModel
$orderGoodsDao
=
\DAO\Order\OrderGoodsModel
::
getInstance
();
$goodsDao
=
\DAO\GoodsModel
::
getInstance
();
$refundReturn
=
$refundReturnDao
->
findByRefundId
(
$returnId
,
$this
->
refundReturnField
);
$diliveryManDao
=
\DAO\Order\DiliverymanModel
::
getInstance
(
DbNameConst
::
salveDBConnectName
);
if
(
empty
(
$refundReturn
))
{
ErrorModel
::
throwException
(
CodeConfigModel
::
notExistRefund
);
}
...
...
@@ -408,8 +421,10 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturn
[
'sellerStateName'
]
=
ArrayConst
::
sellerState
[
$refundReturn
[
'sellerState'
]];
$refundReturn
[
'refundTypeName'
]
=
ArrayConst
::
refundType
[
$refundReturn
[
'refundType'
]];
$refundReturn
[
'returnTypeName'
]
=
ArrayConst
::
returnType
[
$refundReturn
[
'returnType'
]];
$refundReturn
[
'picInfo'
]
=
unserialize
(
$refundReturn
[
'picInfo'
]);
$refundReturn
[
'picInfo'
]
=!
empty
(
$refundReturn
[
'picInfo'
])
?
unserialize
(
$refundReturn
[
'picInfo'
])
:
array
();
if
(
!
empty
(
$refundReturn
[
'picInfo'
])){
$refundReturn
[
'picInfo'
]
=
$refundReturnDao
->
getRefundPics
(
$refundReturn
[
'picInfo'
][
'buyer'
]);
}
//平台操作类型
$refundReturn
[
'platformStateName'
]
=
ArrayConst
::
platformState
[
$refundReturn
[
'platformState'
]];
$refundReturn
[
'refundShippingTypeName'
]
=
ArrayConst
::
refundShippingType
[
$refundReturn
[
'refundShippingType'
]][
'name'
];
...
...
@@ -430,6 +445,25 @@ class RefundServiceModel extends \Business\AbstractModel
}
$info
[
'canPlatformIn'
]
=
$refundReturnDao
->
isPlatformIn
(
$info
)
?
ApiConst
::
one
:
ApiConst
::
zero
;
$info
[
'canSendShippingType'
]
=
$refundReturnDao
->
checkIsAddReturnShipping
(
$info
)
?
ApiConst
::
one
:
ApiConst
::
zero
;
if
(
$info
[
'refundShippingType'
]
==
ApiConst
::
bySeller
){
if
(
!
$info
[
'diliverymanId'
]){
$info
[
'diliveryman'
]
=
ArrayConst
::
defaultDeliveryMan
;
}
else
{
$diliveryMan
=
$diliveryManDao
->
findById
(
$info
[
'diliverymanId'
]);
if
(
!
empty
(
$diliveryMan
)){
$diliveryMan
=
array
(
'id'
=>
$diliveryMan
[
'id'
],
'trueName'
=>
$diliveryMan
[
'true_name'
],
'mobile'
=>
$diliveryMan
[
'mobile'
],
);
$info
[
'diliveryman'
]
=
$diliveryMan
;
}
else
{
$info
[
'diliveryman'
]
=
new
\stdClass
();
}
}
}
else
{
$info
[
'diliveryman'
]
=
new
\stdClass
();
}
if
(
!
$refundReturn
)
{
ErrorModel
::
throwException
(
CodeConfigModel
::
orderError
);
}
else
{
...
...
public/test/order/addRefund.php
View file @
70490af8
This source diff could not be displayed because it is too large. You can
view the blob
instead.
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