切换导航条
此项目
正在载入...
登录
郭盛
/
community
·
提交
转到一个项目
GitLab
转到仪表盘
项目
活动
文件
提交
管道
0
构建
0
图表
里程碑
问题
0
合并请求
0
成员
标记
维基
派生
网络
创建新的问题
下载为
差异文件
浏览文件
作者
何书鹏
4 years ago
提交
f2b0d6d1526980156c922ba979cb9cf0585888b2
2 个父辈
26c79981
e66fe610
1 个管道 的构建
通过
耗费 3 秒
合并分支 'heshupeng' 到 'master'
板币-》金币 查看合并请求
!396
变更
7
构建
1
隐藏空白字符变更
内嵌
并排对比
正在显示
7 个修改的文件
包含
23 行增加
和
23 行删除
application/admin/controller/deposit/Deposit.php
application/admin/lang/zh-cn/deposit/deposit.php
application/admin/lang/zh-cn/deposit/deposit_order.php
application/admin/lang/zh-cn/user/user_withdraw.php
application/api/controller/Store.php
application/api/validate/StoreValidate.php
application/index/controller/Ajax.php
application/admin/controller/deposit/Deposit.php
查看文件 @
f2b0d6d
...
...
@@ -5,7 +5,7 @@ namespace app\admin\controller\deposit;
use
app\common\controller\Backend
;
/**
*
板
币充值配置管理
*
金
币充值配置管理
*
* @icon fa fa-circle-o
*/
...
...
application/admin/lang/zh-cn/deposit/deposit.php
查看文件 @
f2b0d6d
...
...
@@ -2,7 +2,7 @@
return
[
'Money'
=>
'充值金额'
,
'Score'
=>
'
板
币数量'
,
'Score'
=>
'
金
币数量'
,
'Weigh'
=>
'排序'
,
'Createtime'
=>
'生成时间'
,
'Updatetime'
=>
'更新时间'
...
...
application/admin/lang/zh-cn/deposit/deposit_order.php
查看文件 @
f2b0d6d
...
...
@@ -4,7 +4,7 @@ return [
'Order_sn'
=>
'订单号'
,
'User_id'
=>
'用户id'
,
'Deposit_id'
=>
'充值id'
,
'Score'
=>
'
板
币数量'
,
'Score'
=>
'
金
币数量'
,
'Money'
=>
'支付金额'
,
'Status'
=>
'状态'
,
'Status 1'
=>
'待付款'
,
...
...
application/admin/lang/zh-cn/user/user_withdraw.php
查看文件 @
f2b0d6d
...
...
@@ -5,8 +5,8 @@ return [
'Type'
=>
'提现类型'
,
'Type 1'
=>
'商家'
,
'Type 2'
=>
'用户'
,
'Before_money'
=>
'提现前余额/板币'
,
'After_money'
=>
'提现后余额/板币'
,
'Before_money'
=>
'提现前余额/金币'
,
'After_money'
=>
'提现后余额/金币'
,
'Order_sn'
=>
'提现单号'
,
'Status'
=>
'订单状态'
,
'Status 0'
=>
'待审核'
,
...
...
application/api/controller/Store.php
查看文件 @
f2b0d6d
...
...
@@ -620,11 +620,11 @@ class Store extends Api
}
/**
* 计算发布所需
板
币
* 计算发布所需
金
币
* @ApiWeigh (31)
*
* @ApiTitle (计算发布所需板币)
* @ApiSummary (计算发布所需板币)
* @ApiTitle (计算发布所需金币)
* @ApiSummary (计算发布所需金币)
* @ApiMethod (POST)
* @ApiRoute (/api/store/store_inform_score)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
...
...
@@ -722,7 +722,7 @@ class Store extends Api
$param
[
'single'
]
=
$param
[
'red_package'
]
/
$param
[
'number'
];
$param
[
'score'
]
=
bcadd
(
config
(
'site.send_score'
),
$param
[
'red_package'
]
*
config
(
'site.withdraw_percent'
),
2
);
if
(
$this
->
auth
->
score
<
$param
[
'score'
])
{
$this
->
error
(
'
板
币不足,请充值'
);
$this
->
error
(
'
金
币不足,请充值'
);
}
if
(
$param
[
'single'
]
<
config
(
'site.single_min'
))
{
$this
->
error
(
'单个红包不能少于'
.
config
(
'site.single_min'
)
.
'元'
);
...
...
@@ -762,7 +762,7 @@ class Store extends Api
$result
=
$model
->
add
(
$param
);
}
if
(
$param
[
'type'
]
==
1
)
{
// 减少用户
板
币余额
// 减少用户
金
币余额
$res_user
=
Db
::
name
(
'user'
)
->
where
(
'id'
,
$param
[
'user_id'
])
->
setDec
(
'score'
,
$param
[
'score'
]);
//记录钱包log
$insert_data
=
array
(
...
...
@@ -851,7 +851,7 @@ class Store extends Api
];
$result
=
$model
->
edit
(
$edit
);
if
(
$param
[
'type'
]
==
1
&&
$inform
[
'type'
]
==
1
)
{
// 返还用户
板
币余额
// 返还用户
金
币余额
$score
=
$inform
[
'surplus'
]
*
$inform
[
'single'
];
if
(
$score
>
0
)
{
$res_user
=
Db
::
name
(
'user'
)
->
where
(
'id'
,
$this
->
auth
->
id
)
->
setInc
(
'score'
,
$score
);
...
...
@@ -1415,11 +1415,11 @@ class Store extends Api
}
/**
*
板
币充值列表
*
金
币充值列表
* @ApiWeigh (20)
*
* @ApiTitle (板币充值列表)
* @ApiSummary (板币充值列表)
* @ApiTitle (金币充值列表)
* @ApiSummary (金币充值列表)
* @ApiMethod (POST)
* @ApiRoute (/api/store/deposit)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
...
...
@@ -1429,12 +1429,12 @@ class Store extends Api
'code':'1',
'msg':'返回成功',
"data": {
"score":
板
币余额,
"score":
金
币余额,
"list": [
{
"id": 1,
"money": "充值金额",
"score": "赠送
板
币",
"score": "赠送
金
币",
"weigh": 1,
},
]
...
...
@@ -1457,15 +1457,15 @@ class Store extends Api
}
/**
*
板
币充值提交
*
金
币充值提交
* @ApiWeigh (15)
*
* @ApiTitle (板币充值提交)
* @ApiSummary (板币充值提交)
* @ApiTitle (金币充值提交)
* @ApiSummary (金币充值提交)
* @ApiMethod (POST)
* @ApiRoute (/api/store/deposit_order)
* @ApiHeaders (name=token, type=string, required=true, description="请求的Token")
* @ApiParams (name="deposit_id", type="integer", required=true, description="
板
币充值id")
* @ApiParams (name="deposit_id", type="integer", required=true, description="
金
币充值id")
* @ApiReturnParams (name="code", type="integer", required=true, sample="0")
* @ApiReturnParams (name="msg", type="string", required=true, sample="返回成功")
* @ApiReturn ({
...
...
@@ -1486,7 +1486,7 @@ class Store extends Api
// 获取支付参数
$attributes
=
[
'trade_type'
=>
'JSAPI'
,
// 请对应换成你的支付方式对应的值类型
'body'
=>
'
板
币充值'
,
'body'
=>
'
金
币充值'
,
'out_trade_no'
=>
$order_sn
,
'total_fee'
=>
$deposit
[
'money'
]
*
100
,
// $param['money'] * 100
'spbill_create_ip'
=>
request
()
->
ip
(),
// 可选,如不传该参数,SDK 将会自动获取相应 IP 地址
...
...
application/api/validate/StoreValidate.php
查看文件 @
f2b0d6d
...
...
@@ -54,7 +54,7 @@ class StoreValidate extends BaseValidate
'comment_detail'
=>
[
'msg_id'
,
'page'
],
// 留言详情
'comment_detail_pt'
=>
[
'msg_id'
],
// 留言详情-平台
'comment_reply'
=>
[
'msg_id'
],
// 留言回复
'deposit_order'
=>
[
'deposit_id'
],
//
板
币充值提交
'deposit_order'
=>
[
'deposit_id'
],
//
金
币充值提交
'msg'
=>
[
'goods_id'
,
'content'
,
'mobile'
],
// 客服留言提交
];
}
\ No newline at end of file
...
...
application/index/controller/Ajax.php
查看文件 @
f2b0d6d
...
...
@@ -276,7 +276,7 @@ class Ajax extends Frontend
'memo'
=>
'充值'
,
);
$res_log
=
Db
::
name
(
'user_score_log'
)
->
insert
(
$insert_data
);
// 增加用户
板
币余额
// 增加用户
金
币余额
$res_user
=
Db
::
name
(
'user'
)
->
where
(
'id'
,
$info
[
'user_id'
])
->
setInc
(
'score'
,
$info
[
'score'
]);
if
(
!
$res_order
||
!
$res_log
||
!
$res_user
)
{
Db
::
rollback
();
...
...
请
注册
或
登录
后发表评论