Commit 8190b438 by 杨树贤

添加红包的提示文字

parent 70107b40
......@@ -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(),
];
......
......@@ -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) {
......
......@@ -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');
......
3309
\ No newline at end of file
5986
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or sign in to comment