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
75d7b4ad
Commit
75d7b4ad
authored
Nov 01, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
upd
parent
7320c4de
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
47 additions
and
0 deletions
+47
-0
RefundService.php
application/models/Business/Order/RefundService.php
+32
-0
Shopkeeper.php
application/modules/Client/controllers/Shopkeeper.php
+15
-0
No files found.
application/models/Business/Order/RefundService.php
View file @
75d7b4ad
...
...
@@ -76,6 +76,33 @@ class RefundServiceModel extends \Business\AbstractModel
return
$max_data
[
$day_type
];
}
/**
* 修改收货时间
* @param $storeId
* @param $refundId
* @param $receiveTime
*/
public
function
setReceiveTime
(
$storeId
,
$refundId
,
$receiveTime
)
{
$dtime
=
strtotime
(
$receiveTime
);
if
(
$receiveTime
<
TIMESTAMP
){
ErrorModel
::
throwException
(
CodeConfigModel
::
commonError
);
}
$refundReturnDao
=
\DAO\Order\RefundReturnModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$whereRefund
=
array
();
$whereRefund
[
'store_id'
]
=
$storeId
;
$whereRefund
[
'refund_id'
]
=
$refundId
;
$refund
=
$refundReturnDao
->
find
(
$whereRefund
);
if
(
!
$refund
)
{
//未知的退款信息
ErrorModel
::
throwException
(
CodeConfigModel
::
notExistRefund
);
}
$state
=
$refundReturnDao
->
update
(
array
(
'refund_id'
=>
$refundId
),
array
(
'receive_time'
=>
$receiveTime
));
if
(
!
$state
){
return
false
;
}
return
true
;
}
/**
* 退货收货处理
* @param $storeId
...
...
@@ -214,6 +241,11 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturnDao
->
db
->
doCommit
();
return
true
;
}
if
(
$refundAmount
>
$refund
[
'buyer_refund_amount'
]){
//showDialog('退款金额不可大于本订单支付金额','','error');
$refundReturnDao
->
db
->
doRollback
();
return
false
;
}
//以下为同意退款流程
if
(
$order_info
[
'order_state'
]
==
40
){
//交易完成订单,退积分
$res
=
$this
->
edit_points
(
$refund
,
$order_info
);
...
...
application/modules/Client/controllers/Shopkeeper.php
View file @
75d7b4ad
...
...
@@ -298,6 +298,21 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
$version
=
\Business\Common\SettingServiceModel
::
getInstance
()
->
getAppVersion
();
$this
->
success
(
$version
);
}
/**
* 设置收货时间
* @throws Exception
*/
public
function
setReceiveTimeAction
(){
$refundId
=
intval
(
$this
->
req
[
'data'
][
'refundId'
]);
if
(
!
$refundId
)
{
ErrorModel
::
throwException
(
CodeConfigModel
::
notExistRefund
);
}
$refundService
=
\Business\Order\RefundServiceModel
::
getInstance
();
$receiveTime
=
trim
(
$this
->
req
[
'data'
][
'receiveTime'
]);
$res
=
$refundService
->
setReceiveTime
(
$this
->
storeId
,
$refundId
,
$receiveTime
);
$this
->
success
(
$res
);
}
}
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