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
26ae4b42
Commit
26ae4b42
authored
Nov 03, 2018
by
wwccw0591
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
temp
parent
3628ab6b
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
82 additions
and
2 deletions
+82
-2
RefundService.php
application/models/Business/Order/RefundService.php
+3
-2
SellerLog.php
application/models/DAO/SellerLog.php
+79
-0
No files found.
application/models/Business/Order/RefundService.php
View file @
26ae4b42
...
...
@@ -140,7 +140,7 @@ class RefundServiceModel extends \Business\AbstractModel
// add by ky start
//检测该店铺是否开启直接退款功能
$storeDAO
=
\DAO\StoreModel
::
getInstance
();
$is_direct_refund
=
$storeDAO
->
getInfoById
(
$storeId
,
'is_direct_refund'
,
true
);
$is_direct_refund
=
$storeDAO
->
getInfoById
(
$storeId
,
'is_direct_refund'
,
'is_direct_refund'
);
if
(
$is_direct_refund
==
1
)
{
//支持直接退款
//获取订单
$order_id
=
$refund
[
'order_id'
];
...
...
@@ -174,8 +174,9 @@ class RefundServiceModel extends \Business\AbstractModel
}
}
}
\Our\RedisHelper
::
delCachedFunction
(
\Redis\Db5\OrderRedisModel
::
getInstance
(),
array
(
&
$refundReturnDao
,
'getList'
),
array
(),
array
(
$refund
[
'store_id'
]));
$refundReturnDao
->
deleteRefundCache
(
$refund
[
'buyer_id'
],
$refund
[
'refund_id'
]);
$orderDao
->
deleteOrderCache
(
$refund
[
'buyer_id'
],
$refund
[
'order_id'
],
$refund
[
'store_id'
]);
$orderDao
->
deleteOrderCache
(
$refund
[
'buyer_id'
],
$refund
[
'order_id'
],
$refund
[
'store_id'
]);
$refundReturnDao
->
db
->
doCommit
();
return
true
;
}
...
...
application/models/DAO/SellerLog.php
0 → 100644
View file @
26ae4b42
<?php
namespace
DAO
;
/**
* 卖家操作日志
* Class SellerLogModel
* @package DAO
*/
class
SellerLogModel
extends
\DAO\AbstractModel
{
private
$logField
=
'log_content as logContent , log_time as logTime'
;
/**
* 表名
*
* @var string
*/
protected
$_tableName
=
'han_seller_log'
;
/**
* 主键
*
* @var string
*/
protected
$_primaryKey
=
'log_id'
;
public
function
init
(){
}
public
function
insert
(
$param
){
$param
[
'log_time'
]
=
TIMESTAMP
;
$this
->
setDb
(
\Our\DbNameConst
::
masterDBConnectName
);
return
$this
->
db
->
insert
(
$this
->
_tableName
)
->
rows
(
$param
)
->
execute
();
}
public
function
recordSellerLog
(
$content
,
$state
=
1
,
$seller
=
array
()){
$seller_info
=
array
();
$seller_info
[
'log_content'
]
=
$content
;
$seller_info
[
'log_time'
]
=
TIMESTAMP
;
$seller_info
[
'log_seller_id'
]
=
$seller
[
'seller_id'
];
$seller_info
[
'log_seller_name'
]
=
$seller
[
'seller_name'
];
$seller_info
[
'log_store_id'
]
=
$seller
[
'store_id'
];
$seller_info
[
'log_seller_ip'
]
=
''
;
$seller_info
[
'log_url'
]
=
''
;
$seller_info
[
'log_state'
]
=
$state
;
$model_seller_log
=
$this
->
insert
(
$seller_info
);
}
public
function
getList
(
$where
){
$this
->
setDb
(
$this
->
dbName
);
if
(
is_array
(
$where
)){
$where
=
$this
->
db
->
getSqlWhereByArray
(
$where
);
}
$result
=
$this
->
db
->
select
(
$this
->
logField
)
->
from
(
$this
->
_tableName
)
->
where
(
$where
)
->
fetchAll
();
return
$result
;
}
/**
* 类实例
*
* @var \DAO\UserModel
*/
private
static
$_instance
=
null
;
/**
* 获取类实例
*
* @return \DAO\UserModel
*/
public
static
function
getInstance
(
$dbName
=
\Our\DbNameConst
::
salveDBConnectName
)
{
if
(
!
(
self
::
$_instance
instanceof
self
))
{
self
::
$_instance
=
new
self
(
$dbName
);
}
return
self
::
$_instance
;
}
}
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