查看错误
This commit is contained in:
@@ -98,7 +98,7 @@ class Redpacket extends BaseCom
|
|||||||
// 获取房间内红包列表
|
// 获取房间内红包列表
|
||||||
public function roomRedPackets()
|
public function roomRedPackets()
|
||||||
{
|
{
|
||||||
$roomId = $this->request->post('room_id');
|
$roomId = $this->request->get('room_id');
|
||||||
$result = Db::name('redpacket')->where(['room_id' => $roomId, 'status' => ['<=',1]])->select();
|
$result = Db::name('redpacket')->where(['room_id' => $roomId, 'status' => ['<=',1]])->select();
|
||||||
if($result){
|
if($result){
|
||||||
foreach ($result as &$item) {
|
foreach ($result as &$item) {
|
||||||
|
|||||||
@@ -100,7 +100,7 @@ class Redpacket extends Model
|
|||||||
'start_time' => $startTime,
|
'start_time' => $startTime,
|
||||||
'end_time' => $endTime,
|
'end_time' => $endTime,
|
||||||
'createtime' => time(),
|
'createtime' => time(),
|
||||||
'remark' => !empty($data['remark']) ? $data['remark'] : '大吉大利,红包拿来啦!'
|
'remark' => (!empty($data['remark']) && trim($data['remark']) !== '') ? trim($data['remark']) : '大吉大利,红包拿来啦!'
|
||||||
];
|
];
|
||||||
|
|
||||||
$redpacketId = $this->insertGetId($redpacketData);
|
$redpacketId = $this->insertGetId($redpacketData);
|
||||||
|
|||||||
@@ -242,7 +242,7 @@ class PerformPerSecond
|
|||||||
{
|
{
|
||||||
// 查找已结束但未退款的红包
|
// 查找已结束但未退款的红包
|
||||||
$expiredRedpackets = Db::name('redpacket')
|
$expiredRedpackets = Db::name('redpacket')
|
||||||
->where(['end_time' => ['<',time()]])
|
->where(['end_time' => ['<',time()], 'status' => 1])
|
||||||
->select();
|
->select();
|
||||||
|
|
||||||
foreach ($expiredRedpackets as $redpacket) {
|
foreach ($expiredRedpackets as $redpacket) {
|
||||||
|
|||||||
Reference in New Issue
Block a user