|
@@ -174,7 +174,7 @@ class SystemUserTask extends BaseModel
|
|
|
* @param int $number 限定时间
|
|
* @param int $number 限定时间
|
|
|
* @return boolean
|
|
* @return boolean
|
|
|
* */
|
|
* */
|
|
|
- public static function SingleConsumptionAmount($task_id, $uid = 0, $start_time = 0, $number = 0)
|
|
|
|
|
|
|
+ public static function SingleConsumptionAmount($task_id, $uid = 0, $start_time = 0, $number = 0)
|
|
|
{
|
|
{
|
|
|
$isComplete = false;
|
|
$isComplete = false;
|
|
|
$SumPayPrice = StoreOrder::where('paid', 1)->where('refund_status', 0)->where('is_del', 0)->where('uid', $uid)->where('add_time', '>', $start_time)->order('pay_price DESC')->find();
|
|
$SumPayPrice = StoreOrder::where('paid', 1)->where('refund_status', 0)->where('is_del', 0)->where('uid', $uid)->where('add_time', '>', $start_time)->order('pay_price DESC')->find();
|
|
@@ -198,6 +198,8 @@ class SystemUserTask extends BaseModel
|
|
|
* */
|
|
* */
|
|
|
public static function ConsumptionFrequency($task_id, $uid = 0, $start_time = 0, $number = 0)
|
|
public static function ConsumptionFrequency($task_id, $uid = 0, $start_time = 0, $number = 0)
|
|
|
{
|
|
{
|
|
|
|
|
+ @file_put_contents('quanju.txt', $uid . "-团队消费次数触发\r\n", 8);
|
|
|
|
|
+
|
|
|
$isComplete = false;
|
|
$isComplete = false;
|
|
|
$countPay = StoreOrder::where('paid', 1)->where('refund_status', 0)->where('is_del', 0)->where('uid', $uid)->where('add_time', '>', $start_time)->count();
|
|
$countPay = StoreOrder::where('paid', 1)->where('refund_status', 0)->where('is_del', 0)->where('uid', $uid)->where('add_time', '>', $start_time)->count();
|
|
|
if ($countPay >= $number) $isComplete = UserTaskFinish::setFinish($uid, $task_id) ? true : false;
|
|
if ($countPay >= $number) $isComplete = UserTaskFinish::setFinish($uid, $task_id) ? true : false;
|