Skip to content
体验新版
项目
组织
正在加载...
登录
切换导航
打开侧边栏
starsw001
ShopXO
提交
699c8f77
ShopXO
项目概览
starsw001
/
ShopXO
与 Fork 源项目一致
Fork自
纵之格 / ShopXO
通知
1
Star
0
Fork
0
代码
文件
提交
分支
Tags
贡献者
分支图
Diff
Issue
0
列表
看板
标记
里程碑
合并请求
0
DevOps
流水线
流水线任务
计划
Wiki
0
Wiki
分析
仓库
DevOps
项目成员
Pages
ShopXO
项目概览
项目概览
详情
发布
仓库
仓库
文件
提交
分支
标签
贡献者
分支图
比较
Issue
0
Issue
0
列表
看板
标记
里程碑
合并请求
0
合并请求
0
Pages
DevOps
DevOps
流水线
流水线任务
计划
分析
分析
仓库分析
DevOps
Wiki
0
Wiki
成员
成员
收起侧边栏
关闭侧边栏
动态
分支图
创建新Issue
流水线任务
提交
Issue看板
体验新版 GitCode,发现更多精彩内容 >>
提交
699c8f77
编写于
5月 10, 2019
作者:
D
devil_gong
浏览文件
操作
浏览文件
下载
电子邮件补丁
差异文件
钱包提现处理
上级
3b06734d
变更
14
展开全部
显示空白变更内容
内联
并排
Showing
14 changed file
with
395 addition
and
48 deletion
+395
-48
application/lang/zh-cn.php
application/lang/zh-cn.php
+1
-0
application/plugins/view/wallet/admin/admin/saveinfo.html
application/plugins/view/wallet/admin/admin/saveinfo.html
+2
-2
application/plugins/view/wallet/admin/cash/auditinfo.html
application/plugins/view/wallet/admin/cash/auditinfo.html
+90
-0
application/plugins/view/wallet/admin/cash/index.html
application/plugins/view/wallet/admin/cash/index.html
+8
-6
application/plugins/view/wallet/admin/wallet/index.html
application/plugins/view/wallet/admin/wallet/index.html
+1
-1
application/plugins/view/wallet/admin/wallet/saveinfo.html
application/plugins/view/wallet/admin/wallet/saveinfo.html
+4
-4
application/plugins/view/wallet/index/cash/index.html
application/plugins/view/wallet/index/cash/index.html
+1
-1
application/plugins/wallet/admin/Cash.php
application/plugins/wallet/admin/Cash.php
+21
-15
application/plugins/wallet/service/CashService.php
application/plugins/wallet/service/CashService.php
+185
-2
application/plugins/wallet/uninstall.sql
application/plugins/wallet/uninstall.sql
+11
-0
application/service/MessageService.php
application/service/MessageService.php
+1
-1
config/shopxo.sql
config/shopxo.sql
+9
-9
public/static/plugins/css/wallet/admin/cash.css
public/static/plugins/css/wallet/admin/cash.css
+52
-7
public/static/plugins/js/wallet/admin/cash.js
public/static/plugins/js/wallet/admin/cash.js
+9
-0
未找到文件。
application/lang/zh-cn.php
浏览文件 @
699c8f77
...
...
@@ -155,6 +155,7 @@ return array(
0
=>
array
(
'id'
=>
0
,
'name'
=>
'默认'
,
'checked'
=>
true
),
1
=>
array
(
'id'
=>
1
,
'name'
=>
'订单'
),
2
=>
array
(
'id'
=>
2
,
'name'
=>
'充值'
),
3
=>
array
(
'id'
=>
3
,
'name'
=>
'提现'
),
),
// 用户积分 - 操作类型
...
...
application/plugins/view/wallet/admin/admin/saveinfo.html
浏览文件 @
699c8f77
...
...
@@ -4,9 +4,9 @@
<div
class=
"content-right"
>
<div
class=
"content"
>
<!-- form start -->
<form
class=
"am-form form-validation view-save"
action=
"{{:PluginsAdminUrl('wallet', 'admin', 'save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:PluginsAdminUrl('wallet', 'admin', 'index')}}"
enctype=
"multipart/form-data"
>
<form
class=
"am-form form-validation view-save"
action=
"{{:PluginsAdminUrl('wallet', 'admin', 'save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:PluginsAdminUrl('wallet', 'admin', 'index')}}"
>
<legend>
<span
class=
"fs-16"
>
钱包
</span>
<span
class=
"fs-16"
>
配置管理
</span>
<a
href=
"{{:PluginsAdminUrl('wallet', 'admin', 'index')}}"
class=
"fr fs-14 m-t-5 am-icon-mail-reply"
>
返回
</a>
</legend>
...
...
application/plugins/view/wallet/admin/cash/auditinfo.html
0 → 100644
浏览文件 @
699c8f77
{{include file="public/header" /}}
<!-- right content start -->
<div
class=
"content-right"
>
<div
class=
"content"
>
<legend>
<span
class=
"fs-16"
>
提现审核
</span>
<a
href=
"{{:PluginsAdminUrl('wallet', 'cash', 'index')}}"
class=
"fr fs-14 m-t-5 am-icon-mail-reply"
>
返回
</a>
</legend>
<div
class=
"cash-content"
>
{{if !empty($data)}}
<!-- form start -->
<form
class=
"am-form form-validation view-save"
action=
"{{:PluginsAdminUrl('wallet', 'cash', 'audit')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:PluginsAdminUrl('wallet', 'cash', 'index')}}"
>
{{if !empty($data['user'])}}
<div
class=
"am-alert am-alert-secondary user-info"
data-am-alert
>
<p
class=
"am-alert-title"
>
用户信息
</p>
<img
src=
"{{$data.user.avatar}}"
alt=
"{{$data.user.user_name_view}}"
class=
"am-img-thumbnail am-radius am-align-left"
/>
<ul
class=
"user-base"
>
<li>
名称:{{if empty($data['user']['username'])}}
<span
class=
"cr-ccc"
>
未填写
</span>
{{else /}}{{$data.user.username}}{{/if}}
</li>
<li>
昵称:{{if empty($data['user']['nickname'])}}
<span
class=
"cr-ccc"
>
未填写
</span>
{{else /}}{{$data.user.nickname}}{{/if}}
</li>
<li>
手机:{{if empty($data['user']['mobile'])}}
<span
class=
"cr-ccc"
>
未填写
</span>
{{else /}}{{$data.user.mobile}}{{/if}}
</li>
<li>
邮箱:{{if empty($data['user']['email'])}}
<span
class=
"cr-ccc"
>
未填写
</span>
{{else /}}{{$data.user.email}}{{/if}}
</li>
</ul>
</div>
{{/if}}
<div
class=
"am-alert am-alert-secondary"
data-am-alert
>
<p
class=
"am-alert-title"
>
用户钱包
</p>
<div>
<span>
有效金额:
</span>
<span
class=
"normal-money"
>
{{$user_wallet.normal_money}}
</span>
元
</div>
<div>
<span>
冻结金额:
</span>
<span
class=
"frozen-money"
>
{{$user_wallet.frozen_money}}
</span>
元
</div>
<div>
<span>
赠送金额:
</span>
<span
class=
"give-money"
>
{{$user_wallet.give_money}}
</span>
元
</div>
</div>
<div
class=
"am-alert"
data-am-alert
>
<p
class=
"am-alert-title"
>
收款信息
</p>
银行:{{$data.bank_name}}
<br
/>
账号:{{$data.bank_accounts}}
<br
/>
姓名:{{$data.bank_username}}
<br
/>
</div>
<div
class=
"am-alert"
data-am-alert
>
<p
class=
"am-alert-title"
>
申请信息
</p>
单号:{{$data.cash_no}}
<br
/>
金额:
<span
class=
"money-bold cash-money"
>
{{$data.money}}
</span>
元
</div>
<div
class=
"am-form-group"
>
<label>
打款金额
<span
class=
"am-form-group-label-tips"
>
最多两位小数,不能大于提现申请金额 [ {{$data.money}} 元 ]
</span></label>
<input
type=
"number"
name=
"pay_money"
placeholder=
"打款金额"
step=
"0.01"
min=
"0.01"
max=
"{{$data.money}}"
pattern=
"^([0-9]{1}\d{0,6})(\.\d{1,2})?$"
data-validation-message=
"打款金额有误,最低0.01元,最高{{$data.money}}元"
class=
"am-radius"
value=
"{{$data.money}}"
/>
</div>
<div
class=
"am-form-group"
>
<label>
备注
<span
class=
"am-form-group-label-tips"
>
用户可见
</span></label>
<textarea
class=
"am-radius"
name=
"msg"
rows=
"3"
maxlength=
"180"
placeholder=
"备注最多 180 个字符"
data-validation-message=
"备注格式最多 80 个字符"
></textarea>
</div>
<div
class=
"am-form-group"
>
<label
class=
"block"
>
发送站内信
</label>
<input
name=
"is_send_message"
value=
"1"
type=
"checkbox"
data-off-text=
"否"
data-on-text=
"是"
data-size=
"xs"
data-on-color=
"success"
data-off-color=
"default"
data-handle-width=
"50"
data-am-switch
checked=
"true"
/>
</div>
<div
class=
"am-form-group am-form-group-refreshing am-cf form-submit-list"
>
<input
type=
"hidden"
name=
"id"
{{
if
!
empty
($
data
['
id
'])}}
value=
"{{$data.id}}"
{{/
if
}}
/>
<input
type=
"text"
name=
"type"
data-validation-message=
"操作类型有误,同意或拒绝操作出错"
required
/>
<button
type=
"submit"
class=
"am-btn am-btn-primary am-radius btn-loading-example am-btn-sm am-fl"
data-am-loading=
"{loadingText:'处理中...'}"
data-type=
"agree"
>
提交
</button>
<button
type=
"submit"
class=
"am-btn am-btn-danger am-radius btn-loading-example am-btn-sm am-fr"
data-am-loading=
"{loadingText:'处理中...'}"
data-type=
"refuse"
>
拒绝
</button>
</div>
</form>
<!-- form end -->
{{else /}}
<div
class=
"table-no"
><i
class=
"am-icon-warning"
></i>
{{$msg}}
</div>
{{/if}}
</div>
</div>
</div>
<!-- right content end -->
<!-- footer start -->
{{include file="public/footer" /}}
<!-- footer end -->
\ No newline at end of file
application/plugins/view/wallet/admin/cash/index.html
浏览文件 @
699c8f77
...
...
@@ -4,7 +4,7 @@
<div
class=
"content-right"
>
<div
class=
"content"
>
<legend>
<span
class=
"fs-16"
>
钱包
</span>
<span
class=
"fs-16"
>
提现申请管理
</span>
<a
href=
"{{:PluginsAdminUrl('wallet', 'admin', 'index')}}"
class=
"fr fs-14 m-t-5 am-icon-mail-reply"
>
返回
</a>
</legend>
...
...
@@ -45,7 +45,7 @@
<th
class=
"am-hide-sm-only"
>
提现信息
</th>
<th>
收款信息
</th>
<th
class=
"am-hide-sm-only"
>
打款信息
</th>
<th
class=
"am-hide-md-down"
>
描述
</th>
<th
class=
"am-hide-md-down"
>
备注
</th>
<th>
更多
</th>
<th>
操作
</th>
</tr>
...
...
@@ -138,7 +138,7 @@
{{/if}}
</dd>
<dt>
描述
</dt>
<dt>
备注
</dt>
<dd>
{{if empty($v['msg'])}}
<span
class=
"cr-ddd"
>
未填写
</span>
{{else /}}{{$v.msg}}{{/if}}
</dd>
<dt>
申请时间
</dt>
...
...
@@ -152,9 +152,11 @@
</div>
</td>
<td
class=
"view-operation"
>
<a
href=
"{{:PluginsAdminUrl('wallet', 'wallet', 'saveinfo', ['id'=>$v['id']])}}"
>
{{if $v['status'] eq 0}}
<a
href=
"{{:PluginsAdminUrl('wallet', 'cash', 'auditinfo', ['id'=>$v['id']])}}"
>
<button
class=
"am-btn am-btn-secondary am-btn-xs am-radius am-icon-gavel"
>
审核
</button>
</a>
{{/if}}
</td>
</tr>
{{/foreach}}
...
...
application/plugins/view/wallet/admin/wallet/index.html
浏览文件 @
699c8f77
...
...
@@ -4,7 +4,7 @@
<div
class=
"content-right"
>
<div
class=
"content"
>
<legend>
<span
class=
"fs-16"
>
钱包
</span>
<span
class=
"fs-16"
>
钱包
管理
</span>
<a
href=
"{{:PluginsAdminUrl('wallet', 'admin', 'index')}}"
class=
"fr fs-14 m-t-5 am-icon-mail-reply"
>
返回
</a>
</legend>
...
...
application/plugins/view/wallet/admin/wallet/saveinfo.html
浏览文件 @
699c8f77
...
...
@@ -12,18 +12,18 @@
{{if !empty($data)}}
<!-- form start -->
<form
class=
"am-form form-validation view-save"
action=
"{{:PluginsAdminUrl('wallet', 'wallet', 'save')}}"
method=
"POST"
request-type=
"ajax-url"
request-value=
"{{:PluginsAdminUrl('wallet', 'wallet', 'index')}}"
enctype=
"multipart/form-data"
>
<div
class=
"am-alert am-alert-secondary saveinfo-view"
data-am-alert
=
""
>
<div
class=
"am-alert am-alert-secondary saveinfo-view"
data-am-alert
>
<div>
<span>
有效金额:
</span>
<span
class=
"normal-money"
>
{{$data.normal_money}}
</span>
<span
class=
"normal-money"
>
{{$data.normal_money}}
</span>
元
</div>
<div>
<span>
冻结金额:
</span>
<span
class=
"frozen-money"
>
{{$data.frozen_money}}
</span>
<span
class=
"frozen-money"
>
{{$data.frozen_money}}
</span>
元
</div>
<div>
<span>
赠送金额:
</span>
<span
class=
"give-money"
>
{{$data.give_money}}
</span>
<span
class=
"give-money"
>
{{$data.give_money}}
</span>
元
</div>
</div>
<div
class=
"am-form-group"
>
...
...
application/plugins/view/wallet/index/cash/index.html
浏览文件 @
699c8f77
...
...
@@ -71,7 +71,7 @@
<th
class=
"am-hide-sm-only"
>
提现信息
</th>
<th>
收款信息
</th>
<th>
打款信息
</th>
<th
class=
"am-hide-sm-only"
>
描述
</th>
<th
class=
"am-hide-sm-only"
>
备注
</th>
<th
class=
"am-hide-sm-only"
>
申请时间
</th>
</tr>
</thead>
...
...
application/plugins/wallet/admin/Cash.php
浏览文件 @
699c8f77
...
...
@@ -13,6 +13,7 @@ namespace app\plugins\wallet\admin;
use
think\Controller
;
use
app\plugins\wallet\service\CashService
;
use
app\plugins\wallet\service\BaseService
;
use
app\plugins\wallet\service\WalletService
;
/**
* 钱包插件 - 提现管理
...
...
@@ -76,7 +77,7 @@ class Cash extends Controller
}
/**
*
钱包编辑
页面
*
审核
页面
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
...
...
@@ -84,7 +85,7 @@ class Cash extends Controller
* @desc description
* @param [array] $params [输入参数]
*/
public
function
save
info
(
$params
=
[])
public
function
audit
info
(
$params
=
[])
{
$data
=
[];
if
(
!
empty
(
$params
[
'id'
]))
...
...
@@ -94,26 +95,31 @@ class Cash extends Controller
'n'
=>
1
,
'where'
=>
[
'id'
=>
intval
(
$params
[
'id'
])],
);
$ret
=
BaseService
::
Wallet
List
(
$data_params
);
$ret
=
BaseService
::
Cash
List
(
$data_params
);
if
(
!
empty
(
$ret
[
'data'
][
0
]))
{
// 用户钱包
$user_wallet
=
WalletService
::
UserWallet
(
$ret
[
'data'
][
0
][
'user_id'
]);
if
(
$user_wallet
[
'code'
]
==
0
)
{
$data
=
$ret
[
'data'
][
0
];
// 静态数据
$this
->
assign
(
'wallet_status_list'
,
WalletService
::
$wallet_status_list
);
$this
->
assign
(
'user_wallet'
,
$user_wallet
[
'data'
]);
}
else
{
$this
->
assign
(
'msg'
,
$user_wallet
[
'msg'
]);
}
}
else
{
$this
->
assign
(
'msg'
,
'
钱包有误
'
);
$this
->
assign
(
'msg'
,
'
数据不存在或已删除
'
);
}
}
else
{
$this
->
assign
(
'msg'
,
'
钱包
id有误'
);
$this
->
assign
(
'msg'
,
'
参数
id有误'
);
}
$this
->
assign
(
'data'
,
$data
);
return
$this
->
fetch
(
'../../../plugins/view/wallet/admin/
wallet/save
info'
);
return
$this
->
fetch
(
'../../../plugins/view/wallet/admin/
cash/audit
info'
);
}
/**
*
钱包编辑
*
审核
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
...
...
@@ -121,9 +127,9 @@ class Cash extends Controller
* @desc description
* @param [array] $params [输入参数]
*/
public
function
save
(
$params
=
[])
public
function
audit
(
$params
=
[])
{
return
WalletService
::
WalletE
dit
(
$params
);
return
CashService
::
CashAu
dit
(
$params
);
}
}
?>
\ No newline at end of file
application/plugins/wallet/service/CashService.php
浏览文件 @
699c8f77
...
...
@@ -234,7 +234,7 @@ class CashService
*/
public
static
function
CashCreate
(
$params
=
[])
{
//
数据
验证
//
参数
验证
$p
=
[
[
'checked_type'
=>
'empty'
,
...
...
@@ -337,11 +337,194 @@ class CashService
}
// 消息通知
MessageService
::
MessageAdd
(
$user_wallet
[
'data'
][
'user_id'
],
'账户余额变动'
,
$log_data
[
'msg'
],
0
,
$cash_id
);
MessageService
::
MessageAdd
(
$user_wallet
[
'data'
][
'user_id'
],
'账户余额变动'
,
$log_data
[
'msg'
],
3
,
$cash_id
);
// 提交事务
Db
::
commit
();
return
DataReturn
(
'操作成功'
,
0
);
}
/**
* 提现申请审核
* @author Devil
* @blog http://gong.gg/
* @version 1.0.0
* @date 2019-05-10
* @desc description
* @param [array] $params [输入参数]
*/
public
static
function
CashAudit
(
$params
=
[])
{
// 参数验证
$p
=
[
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'id'
,
'error_msg'
=>
'提现id有误'
,
],
[
'checked_type'
=>
'empty'
,
'key_name'
=>
'pay_money'
,
'error_msg'
=>
'打款金额有误'
,
],
[
'checked_type'
=>
'fun'
,
'key_name'
=>
'pay_money'
,
'checked_data'
=>
'CheckPrice'
,
'error_msg'
=>
'请输入有效的打款金额有误'
,
],
[
'checked_type'
=>
'min'
,
'key_name'
=>
'pay_money'
,
'checked_data'
=>
0.01
,
'error_msg'
=>
'打款金额有误,最低0.01元'
,
],
[
'checked_type'
=>
'length'
,
'key_name'
=>
'msg'
,
'checked_data'
=>
'180'
,
'error_msg'
=>
'备注最多 180 个字符'
,
],
[
'checked_type'
=>
'in'
,
'key_name'
=>
'type'
,
'checked_data'
=>
[
'agree'
,
'refuse'
],
'error_msg'
=>
'操作类型有误,同意或拒绝操作出错'
,
],
];
$ret
=
ParamsChecked
(
$params
,
$p
);
if
(
$ret
!==
true
)
{
return
DataReturn
(
$ret
,
-
1
);
}
// 获取提现数据
$cash
=
Db
::
name
(
'PluginsWalletCash'
)
->
find
(
intval
(
$params
[
'id'
]));
if
(
empty
(
$cash
))
{
return
DataReturn
(
'提现数据不存在或已删除'
,
-
10
);
}
// 状态
if
(
$cash
[
'status'
]
!=
0
)
{
return
DataReturn
(
'状态不可操作['
.
self
::
$cash_status_list
[
$cash
[
'status'
]][
'name'
]
.
']'
,
-
11
);
}
// 金额处理
$pay_money
=
PriceNumberFormat
(
$params
[
'pay_money'
]);
if
(
$pay_money
<=
0.00
||
$pay_money
>
$cash
[
'money'
])
{
return
DataReturn
(
'打款金额有误,最低0.01元,最高'
.
$cash
[
'money'
]
.
'元'
,
-
12
);
}
// 获取用户钱包
$wallet
=
Db
::
name
(
'PluginsWallet'
)
->
find
(
intval
(
$cash
[
'wallet_id'
]));
if
(
empty
(
$wallet
))
{
return
DataReturn
(
'用户钱包不存在或已删除'
,
-
20
);
}
// 是否发送消息
$is_send_message
=
(
isset
(
$params
[
'is_send_message'
])
&&
$params
[
'is_send_message'
]
==
1
)
?
1
:
0
;
// 开始处理
Db
::
startTrans
();
// 数据处理
if
(
$params
[
'type'
]
==
'agree'
)
{
// 钱包更新数据
$wallet_upd_data
=
[
'frozen_money'
=>
PriceNumberFormat
(
$wallet
[
'frozen_money'
]
-
$cash
[
'money'
]),
];
// 提现更新数据
$cash_upd_data
=
[
'status'
=>
1
,
'pay_money'
=>
$pay_money
,
'pay_time'
=>
time
(),
];
$money_field
=
[
[
'field'
=>
'frozen_money'
,
'money_type'
=>
1
,
'msg'
=>
' [ 提现申请成功 , 冻结金额减少'
.
$cash
[
'money'
]
.
'元 ]'
],
];
// 打款金额是否小于提现金额
if
(
$pay_money
<
$cash
[
'money'
])
{
$surplus_money
=
PriceNumberFormat
(
$cash
[
'money'
]
-
$pay_money
);
$wallet_upd_data
[
'normal_money'
]
=
PriceNumberFormat
(
$wallet
[
'normal_money'
]
+
$surplus_money
);
$money_field
[]
=
[
'field'
=>
'normal_money'
,
'money_type'
=>
0
,
'msg'
=>
' [ 提现申请成功 , 部分金额未打款 , 冻结金额退回至有效金额'
.
$surplus_money
.
'元 ]'
];
}
}
else
{
// 钱包更新数据
$wallet_upd_data
=
[
'frozen_money'
=>
PriceNumberFormat
(
$wallet
[
'frozen_money'
]
-
$cash
[
'money'
]),
'normal_money'
=>
PriceNumberFormat
(
$wallet
[
'normal_money'
]
+
$cash
[
'money'
]),
];
// 提现更新数据
$cash_upd_data
=
[
'status'
=>
2
,
];
$money_field
=
[
[
'field'
=>
'frozen_money'
,
'money_type'
=>
1
,
'msg'
=>
' [ 提现申请失败 , 冻结金额释放 '
.
$cash
[
'money'
]
.
'元 ]'
],
[
'field'
=>
'normal_money'
,
'money_type'
=>
0
,
'msg'
=>
' [ 提现申请失败 , 冻结金额退回至有效金额'
.
$cash
[
'money'
]
.
'元 ]'
],
];
}
// 提现更新
$cash_upd_data
[
'msg'
]
=
empty
(
$params
[
'msg'
])
?
''
:
$params
[
'msg'
];
$cash_upd_data
[
'upd_time'
]
=
time
();
if
(
!
Db
::
name
(
'PluginsWalletCash'
)
->
where
([
'id'
=>
$cash
[
'id'
]])
->
update
(
$cash_upd_data
))
{
Db
::
rollback
();
return
DataReturn
(
'提现申请操作失败'
,
-
100
);
}
// 钱包更新
if
(
!
Db
::
name
(
'PluginsWallet'
)
->
where
([
'id'
=>
$wallet
[
'id'
]])
->
update
(
$wallet_upd_data
))
{
Db
::
rollback
();
return
DataReturn
(
'钱包操作失败'
,
-
101
);
}
foreach
(
$money_field
as
$v
)
{
// 有效金额
if
(
$wallet
[
$v
[
'field'
]]
!=
$wallet_upd_data
[
$v
[
'field'
]])
{
$log_data
=
[
'user_id'
=>
$wallet
[
'user_id'
],
'wallet_id'
=>
$wallet
[
'id'
],
'business_type'
=>
2
,
'operation_type'
=>
(
$wallet
[
$v
[
'field'
]]
<
$wallet_upd_data
[
$v
[
'field'
]])
?
1
:
0
,
'money_type'
=>
$v
[
'money_type'
],
'operation_money'
=>
(
$wallet
[
$v
[
'field'
]]
<
$wallet_upd_data
[
$v
[
'field'
]])
?
PriceNumberFormat
(
$wallet_upd_data
[
$v
[
'field'
]]
-
$wallet
[
$v
[
'field'
]])
:
PriceNumberFormat
(
$wallet
[
$v
[
'field'
]]
-
$wallet_upd_data
[
$v
[
'field'
]]),
'original_money'
=>
$wallet
[
$v
[
'field'
]],
'latest_money'
=>
$wallet_upd_data
[
$v
[
'field'
]],
'msg'
=>
$v
[
'msg'
],
];
if
(
!
WalletService
::
WalletLogInsert
(
$log_data
))
{
Db
::
rollback
();
return
DataReturn
(
'日志添加失败'
,
-
101
);
}
// 消息通知
if
(
$is_send_message
==
1
)
{
MessageService
::
MessageAdd
(
$wallet
[
'user_id'
],
'账户余额变动'
,
$log_data
[
'msg'
],
3
,
$cash
[
'id'
]);
}
}
}
// 处理成功
Db
::
commit
();
return
DataReturn
(
'操作成功'
,
0
);
}
}
?>
\ No newline at end of file
application/plugins/wallet/uninstall.sql
0 → 100644
浏览文件 @
699c8f77
#
钱包
-
应用
DROP
TABLE
`s_plugins_wallet`
;
#
充值
-
应用
DROP
TABLE
`s_plugins_wallet_recharge`
;
#
钱包日志
-
应用
DROP
TABLE
`s_plugins_wallet_log`
;
#
钱包提现
-
应用
DROP
TABLE
`s_plugins_wallet_cash`
;
\ No newline at end of file
application/service/MessageService.php
浏览文件 @
699c8f77
...
...
@@ -31,7 +31,7 @@ class MessageService
* @param [int] $user_id [用户id]
* @param [string] $title [标题]
* @param [string] $detail [内容]
* @param [int] $business_type [业务类型(0默认, 1订单, 2充值, ...)]
* @param [int] $business_type [业务类型(0默认, 1订单, 2充值,
3提现,
...)]
* @param [int] $business_id [业务id]
* @param [int] $type [类型(默认0 普通消息)]
* @return [boolean] [成功true, 失败false]
...
...
config/shopxo.sql
浏览文件 @
699c8f77
此差异已折叠。
点击以展开。
public/static/plugins/css/wallet/admin/cash.css
浏览文件 @
699c8f77
...
...
@@ -17,18 +17,22 @@
}
/**
*
列表
*
用户信息
*/
.cash-content
table
.am-table
ul
{
list-style
:
none
;
padding
:
0
;
margin
:
0
;
}
.cash-content
table
.am-table
.user-info
img
{
.cash-content
.user-info
img
{
max-width
:
35px
;
max-height
:
35px
;
margin
:
0
5px
2px
0
;
}
.cash-content
ul
{
list-style
:
none
;
padding
:
0
;
margin
:
0
;
}
/**
* 列表
*/
.cash-content
table
.am-table
.operation-msg
{
width
:
15%
;
}
...
...
@@ -45,3 +49,44 @@
.cash-content
.cash-money
{
color
:
#FF9800
;
}
/**
* 用户钱包金额
*/
.cash-content
.normal-money
,
.cash-content
.frozen-money
,
.cash-content
.give-money
{
font-weight
:
700
;
}
.cash-content
.normal-money
{
color
:
#4CAF50
;
}
.cash-content
.frozen-money
{
color
:
#FF9800
;
}
.cash-content
.give-money
{
color
:
#666
;
}
/**
* 审核页面
*/
.cash-content
.am-alert-title
{
margin-bottom
:
5px
;
font-weight
:
700
;
font-size
:
14px
;
color
:
#888
;
}
@media
only
screen
and
(
min-width
:
641px
)
{
.cash-content
.form-submit-list
{
padding-left
:
20%
!important
;
padding-right
:
40%
!important
;
}
}
.cash-content
.form-submit-list
button
{
width
:
45%
;
}
.cash-content
.form-submit-list
input
[
name
=
"type"
]
{
position
:
absolute
;
margin-left
:
-1000000px
;
}
\ No newline at end of file
public/static/plugins/js/wallet/admin/cash.js
0 → 100644
浏览文件 @
699c8f77
$
(
function
()
{
// 表单提交
$
(
'
.cash-content .form-submit-list button[type="submit"]
'
).
on
(
'
click
'
,
function
()
{
$
(
'
.cash-content .form-submit-list input[name="type"]
'
).
val
(
$
(
this
).
data
(
'
type
'
))
$
(
'
.cash-content .form-submit-list input[name="type"]
'
).
blur
();
});
});
\ No newline at end of file
编辑
预览
Markdown
is supported
0%
请重试
或
添加新附件
.
添加附件
取消
You are about to add
0
people
to the discussion. Proceed with caution.
先完成此消息的编辑!
取消
想要评论请
注册
或
登录