diff --git a/CHANGELOG.md b/CHANGELOG.md index 051cbc23..c6238fc4 100644 --- a/CHANGELOG.md +++ b/CHANGELOG.md @@ -8,6 +8,7 @@ - 修正第三方登录解除绑定失败问题 - 使用ServiceTrait归纳获取服务代码 - 优化anonymous隐藏部分字符函数 +- 调整积分兑换相关定义命名 - 去除js_vars中关于IM客服的配置 - 增加验证码开关 diff --git a/app/Console/Tasks/PointGiftDeliverTask.php b/app/Console/Tasks/PointGiftDeliverTask.php index 8edc51d7..ec93e357 100644 --- a/app/Console/Tasks/PointGiftDeliverTask.php +++ b/app/Console/Tasks/PointGiftDeliverTask.php @@ -19,7 +19,7 @@ use App\Repos\ImGroupUser as ImGroupUserRepo; use App\Repos\PointGift as PointGiftRepo; use App\Repos\PointGiftRedeem as PointGiftRedeemRepo; use App\Services\Logic\Notice\DingTalk\PointGiftRedeem as PointGiftRedeemNotice; -use App\Services\Logic\Point\History\PointRefund as PointRefundPointHistory; +use App\Services\Logic\Point\History\PointGiftRefund as PointGiftRefundPointHistory; use Phalcon\Mvc\Model\Resultset; use Phalcon\Mvc\Model\ResultsetInterface; @@ -44,12 +44,6 @@ class PointGiftDeliverTask extends Task $redeem = $redeemRepo->findById($task->item_id); - if (!$redeem) { - $task->status = TaskModel::STATUS_FAILED; - $task->update(); - break; - } - try { $this->db->begin(); @@ -177,7 +171,7 @@ class PointGiftDeliverTask extends Task protected function handlePointRefund(PointGiftRedeemModel $redeem) { - $service = new PointRefundPointHistory(); + $service = new PointGiftRefundPointHistory(); $service->handle($redeem); } diff --git a/app/Http/Admin/Views/setting/dingtalk_robot.volt b/app/Http/Admin/Views/setting/dingtalk_robot.volt index 76bb4ab9..64bbb80e 100644 --- a/app/Http/Admin/Views/setting/dingtalk_robot.volt +++ b/app/Http/Admin/Views/setting/dingtalk_robot.volt @@ -28,13 +28,13 @@
- +
- +
diff --git a/app/Http/Admin/Views/setting/im_cs.volt b/app/Http/Admin/Views/setting/im_cs.volt deleted file mode 100644 index ac4b83c3..00000000 --- a/app/Http/Admin/Views/setting/im_cs.volt +++ /dev/null @@ -1,35 +0,0 @@ -
-
- -
- - -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- -
-
-
- -
- - - -
-
-
\ No newline at end of file diff --git a/app/Http/Admin/Views/setting/im_main.volt b/app/Http/Admin/Views/setting/im_main.volt index 22e5080b..9542c2b0 100644 --- a/app/Http/Admin/Views/setting/im_main.volt +++ b/app/Http/Admin/Views/setting/im_main.volt @@ -9,13 +9,13 @@
- +
- +
diff --git a/app/Http/Admin/Views/setting/mail.volt b/app/Http/Admin/Views/setting/mail.volt index 440c3fe9..088b180c 100644 --- a/app/Http/Admin/Views/setting/mail.volt +++ b/app/Http/Admin/Views/setting/mail.volt @@ -9,25 +9,25 @@
- +
- +
- +
- +
@@ -49,13 +49,13 @@
- +
- +
diff --git a/app/Http/Admin/Views/setting/vod.volt b/app/Http/Admin/Views/setting/vod.volt index b625821e..9df01023 100644 --- a/app/Http/Admin/Views/setting/vod.volt +++ b/app/Http/Admin/Views/setting/vod.volt @@ -96,13 +96,13 @@
- +
- +
diff --git a/app/Models/PointHistory.php b/app/Models/PointHistory.php index 49942b5f..24b6d122 100644 --- a/app/Models/PointHistory.php +++ b/app/Models/PointHistory.php @@ -14,8 +14,8 @@ class PointHistory extends Model * 事件类型 */ const EVENT_ORDER_CONSUME = 1; // 订单消费 - const EVENT_POINT_REDEEM = 2; // 积分兑换 - const EVENT_POINT_REFUND = 3; // 积分退款 + const EVENT_POINT_GIFT_REDEEM = 2; // 积分礼品兑换 + const EVENT_POINT_GIFT_REFUND = 3; // 积分礼品退款 const EVENT_ACCOUNT_REGISTER = 4; // 帐号注册 const EVENT_SITE_VISIT = 5; // 站点访问 const EVENT_CHAPTER_STUDY = 6; // 课时学习 @@ -126,8 +126,8 @@ class PointHistory extends Model { return [ self::EVENT_ORDER_CONSUME => '订单消费', - self::EVENT_POINT_REDEEM => '积分兑换', - self::EVENT_POINT_REFUND => '积分退款', + self::EVENT_POINT_GIFT_REDEEM => '积分礼品兑换', + self::EVENT_POINT_GIFT_REFUND => '积分礼品退款', self::EVENT_ACCOUNT_REGISTER => '用户注册', self::EVENT_SITE_VISIT => '用户登录', self::EVENT_CHAPTER_STUDY => '课时学习', diff --git a/app/Services/Logic/Point/History/PointRedeem.php b/app/Services/Logic/Point/History/PointGiftRedeem.php similarity index 96% rename from app/Services/Logic/Point/History/PointRedeem.php rename to app/Services/Logic/Point/History/PointGiftRedeem.php index 0e4ccca9..046a9b90 100644 --- a/app/Services/Logic/Point/History/PointRedeem.php +++ b/app/Services/Logic/Point/History/PointGiftRedeem.php @@ -25,7 +25,7 @@ class PointGiftRedeem extends PointHistory if ($pointEnabled == 0) return; $eventId = $redeem->id; - $eventType = PointHistoryModel::EVENT_POINT_REDEEM; + $eventType = PointHistoryModel::EVENT_POINT_GIFT_REDEEM; $eventPoint = 0 - $redeem->gift_point; $historyRepo = new PointHistoryRepo(); diff --git a/app/Services/Logic/Point/History/PointRefund.php b/app/Services/Logic/Point/History/PointGiftRefund.php similarity index 93% rename from app/Services/Logic/Point/History/PointRefund.php rename to app/Services/Logic/Point/History/PointGiftRefund.php index e5db10e9..477af098 100644 --- a/app/Services/Logic/Point/History/PointRefund.php +++ b/app/Services/Logic/Point/History/PointGiftRefund.php @@ -13,13 +13,13 @@ use App\Repos\PointHistory as PointHistoryRepo; use App\Repos\User as UserRepo; use App\Services\Logic\Point\PointHistory; -class PointRefund extends PointHistory +class PointGiftRefund extends PointHistory { public function handle(PointGiftRedeemModel $redeem) { $eventId = $redeem->id; - $eventType = PointHistoryModel::EVENT_POINT_REFUND; + $eventType = PointHistoryModel::EVENT_POINT_GIFT_REFUND; $eventPoint = $redeem->gift_point; $historyRepo = new PointHistoryRepo(); diff --git a/db/migrations/20210403184518.php b/db/migrations/20210403184518.php index c8bd566e..8f854d97 100644 --- a/db/migrations/20210403184518.php +++ b/db/migrations/20210403184518.php @@ -821,7 +821,7 @@ final class V20210403184518 extends AbstractMigration [ 'section' => 'vod', 'item_key' => 'key_anti_ip_limit', - 'item_value' => '', + 'item_value' => '3', ], [ 'section' => 'dingtalk.robot',