Skip to content
Toggle navigation
P
Projects
G
Groups
S
Snippets
Help
杨树贤
/
ic_server_welfare
This project
Loading...
Sign in
Toggle navigation
Go to a project
Project
Repository
Issues
0
Merge Requests
0
Pipelines
Wiki
Snippets
Settings
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Commit
8190b438
authored
Sep 02, 2019
by
杨树贤
Browse files
Options
_('Browse Files')
Download
Email Patches
Plain Diff
添加红包的提示文字
parent
70107b40
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
16 additions
and
13 deletions
app/Http/Controllers/IntegralsController.php
app/Models/Integral.php
app/Models/IntegralBill.php
storage/laravels.json
storage/laravels.pid
app/Http/Controllers/IntegralsController.php
View file @
8190b438
...
...
@@ -59,12 +59,13 @@ class IntegralsController extends Controller
public
function
create
(
Request
$request
,
Integral
$integral
)
{
$data
=
[
'name'
=>
$request
->
name
,
'description'
=>
$request
->
description
,
'daily_limit'
=>
$request
->
daily_limit
,
'amount'
=>
$request
->
amount
,
'name'
=>
$request
->
get
(
'name'
),
'description'
=>
$request
->
get
(
'description'
),
'tips'
=>
$request
->
get
(
'tips'
),
'daily_limit'
=>
$request
->
get
(
'daily_limit'
),
'amount'
=>
$request
->
get
(
'amount'
),
'add_time'
=>
time
(),
'status'
=>
$request
->
status
,
'status'
=>
$request
->
get
(
'status'
)
,
];
$res
=
$integral
->
addIntegral
(
$data
);
...
...
@@ -85,11 +86,12 @@ class IntegralsController extends Controller
{
$id
=
$request
->
id
;
$data
=
[
'name'
=>
$request
->
name
,
'description'
=>
$request
->
description
,
'amount'
=>
$request
->
amount
,
'status'
=>
$request
->
status
,
'daily_limit'
=>
$request
->
daily_limit
,
'name'
=>
$request
->
get
(
'name'
),
'description'
=>
$request
->
get
(
'description'
),
'tips'
=>
$request
->
get
(
'tips'
),
'amount'
=>
$request
->
get
(
'amount'
),
'status'
=>
$request
->
get
(
'status'
),
'daily_limit'
=>
$request
->
get
(
'daily_limit'
),
'update_time'
=>
time
(),
];
...
...
app/Models/Integral.php
View file @
8190b438
...
...
@@ -75,6 +75,7 @@ class Integral extends Model
foreach
(
$integrals
as
$key
=>
$integral
)
{
$operatedCount
=
$redis
->
hget
(
'ic_welfare_integral_limit_'
.
$integral
[
'id'
],
$userId
);
$integrals
[
$key
][
'operated_count'
]
=
empty
(
$operatedCount
)
?
0
:
(
int
)
$operatedCount
;
$integrals
[
$key
][
'tips'
]
=
$integral
[
'tips'
]
===
null
?
''
:
$integral
[
'tips'
];
}
if
(
$integrals
)
{
...
...
app/Models/IntegralBill.php
View file @
8190b438
...
...
@@ -94,7 +94,7 @@ class IntegralBill extends Model
$exchangedAmount
=
DB
::
table
(
'user_exchanges'
)
->
leftJoin
(
'exchange_settings'
,
'user_exchanges.exchange_id'
,
'exchange_settings.id'
)
->
where
(
'user_id'
,
$userId
)
->
sum
(
'amount'
);
->
sum
(
'
user_exchanges.
amount'
);
//剩余可兑换积分金额
$integral
=
DB
::
table
(
'user_integrals'
)
->
where
(
'user_id'
,
$userId
)
->
value
(
'integral'
);
...
...
storage/laravels.json
View file @
8190b438
This diff is collapsed.
Click to expand it.
storage/laravels.pid
View file @
8190b438
3309
\ No newline at end of file
5986
\ No newline at end of file
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