| 12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455 |
- <?php
- namespace app\jobs\integral;
- use crmeb\basic\BaseJobs;
- use crmeb\traits\QueueTrait;
- /**
- * 订单消息队列
- * Class OrderJob
- * @package app\jobs
- */
- class IntegralJob extends BaseJobs
- {
- use QueueTrait;
- public function dealOrderIntegral($order)
- {
- $integral_price =
- $total_price = $order['total_price'];
- $static_integral_ratio = sys_config('static_integral_ratio', 0);
- $give_static_integral = bcdiv(bcmul($total_price, $static_integral_ratio), 100, 2);
- }
- /**
- * 减积分
- * @param int $uid 用户
- * @param float $static 静态积分
- * @param float $action 动态积分
- * @param float $cash 资金池
- * @param int $link_id 关联ID
- * @param string $mark 备注
- */
- public function decIntegral(int $uid, float $static, float $action, float $cash, int $link_id = 0, string $mark = '')
- {
- }
- /**
- * 加积分
- * @param int $uid 用户
- * @param float $static 静态积分
- * @param float $action 动态积分
- * @param float $cash 资金池
- * @param int $link_id 关联ID
- * @param string $mark 备注
- */
- public function incIntegral(int $uid, float $static, float $action, float $cash, int $link_id = 0, string $mark = '')
- {
- }
- }
|