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
91d20a7d
Commit
91d20a7d
authored
Dec 09, 2018
by
christ
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
makerefund
parent
1aff3b17
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
24 additions
and
0 deletions
+24
-0
RefundService.php
application/models/Business/Order/RefundService.php
+15
-0
RefundReturn.php
application/models/DAO/Order/RefundReturn.php
+1
-0
Shopkeeper.php
application/modules/Client/controllers/Shopkeeper.php
+8
-0
No files found.
application/models/Business/Order/RefundService.php
View file @
91d20a7d
...
...
@@ -210,6 +210,21 @@ class RefundServiceModel extends \Business\AbstractModel
$refundReturnDao
->
db
->
doRollback
();
return
false
;
}
public
function
makeRefund
(
$storeId
,
$refundId
){
$refundReturnDao
=
\DAO\Order\RefundReturnModel
::
getInstance
(
DbNameConst
::
masterDBConnectName
);
$returnDetail
=
$refundReturnDao
->
findByRefundId
(
$refundId
);
if
(
$returnDetail
[
'storeId'
]
!=
$storeId
){
ErrorModel
::
throwException
(
CodeConfigModel
::
notExistRefund
);
}
$updateData
=
array
();
$updateData
[
'is_suc_refund'
]
=
ApiConst
::
refundSuccess
;
$res
=
$refundReturnDao
->
update
(
array
(
'refund_id'
=>
$refundId
),
$updateData
);
if
(
$res
!==
false
){
return
true
;
}
return
false
;
}
/**
* 退货审核页
...
...
application/models/DAO/Order/RefundReturn.php
View file @
91d20a7d
...
...
@@ -92,6 +92,7 @@ class RefundReturnModel extends \DAO\AbstractModel
public
function
update
(
$where
,
$data
)
{
$this
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
$data
[
'gmt_update'
]
=
TIMESTAMP
;
return
$this
->
db
->
update
(
$this
->
_tableName
)
->
where
(
$where
)
->
rows
(
$data
)
->
execute
();
}
...
...
application/modules/Client/controllers/Shopkeeper.php
View file @
91d20a7d
...
...
@@ -268,6 +268,14 @@ class ShopkeeperController extends \Our\Controller_AbstractClient {
}
//标记为已退款
public
function
makeRefundAction
(){
$refundService
=
\Business\Order\RefundServiceModel
::
getInstance
();
if
(
$refundService
->
makeRefund
(
$this
->
storeId
,
$this
->
req
[
'data'
][
'refundId'
])){
$this
->
success
(
'操作成功'
);
};
ErrorModel
::
throwException
(
CodeConfigModel
::
commonError
);
}
/**
* 拒绝退款
*/
...
...
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