From 848bcf2801203ffaa189fef77a2b80725cabef30 Mon Sep 17 00:00:00 2001 From: wangxinglong <2371974647@qq.com> Date: Fri, 25 Mar 2022 17:27:18 +0800 Subject: [PATCH] setter --- app/controller/api/Coupon.php | 10 ++++++++-- 1 file changed, 8 insertions(+), 2 deletions(-) diff --git a/app/controller/api/Coupon.php b/app/controller/api/Coupon.php index 7111d81..ae508d8 100644 --- a/app/controller/api/Coupon.php +++ b/app/controller/api/Coupon.php @@ -859,13 +859,19 @@ class Coupon extends Base } Db::commit(); - return $this->json(); + return $this->json( + 0, + "优惠券签到使用成功,您获得{$consumerMoney}元红包,已存入您的零钱", + [ + "redpack" =>$consumerMoney, + "user_coupon_id" =>$couponId, + ]); }catch (RepositoryException $e){ Db::rollback(); return $this->json(5001, "Repository服务器错误"); }catch (\Exception $e){ - echo $e->getMessage(); + Log::error('核销优惠券失败:'.$e->getMessage()); Db::rollback(); return $this->json(5002, "服务器错误"); }