123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- declare (strict_types=1);
- namespace app\services\activity\coupon;
- use app\services\BaseServices;
- use app\dao\activity\coupon\StoreCouponUserUserDao;
- class StoreCouponUserUserServices extends BaseServices
- {
-
- public function __construct(StoreCouponUserUserDao $dao)
- {
- $this->dao = $dao;
- }
-
- public function getList(array $where)
- {
- [$page, $limit] = $this->getPageValue();
- $list = $this->dao->sysPage($where, $page, $limit);
- foreach ($list as $k => &$v) {
- $v['start_time'] = $v['add_time'];
- if ($v['end_time'] < time() || $v['use_time'] != 0) $v['is_fail'] = 1;
- }
- $count = $this->dao->sysCount($where);
- return compact('list', 'count');
- }
- }
|