| 1234567891011121314151617181920212223242526272829303132333435 |
- <?php
- use app\models\store\StoreOrderCartInfo;
- abstract class ActivityCalc {
- protected $ctx = [];
- public function __construct() {
- }
- /**
- * @param $cate_id
- * @return array
- */
- public static function getOrders($cate_id) {
- $products = StoreOrderCartInfo::alias('ci')
- ->join('store_order o', 'o.id=ci.oid')
- ->join('store_product p', 'ci.product_id=p.id')
- ->join('user u', 'u.uid = o.uid')
- ->where('o.paid', 1)
- ->where('o.status', '>=', 0)
- ->where('o.refund_status', 0)
- ->where('o.is_del', 0)
- ->where('o.is_system_del', 0)
- ->where('p.cart_id', $cate_id)
- ->where('ci.activity', '')
- ->field('o.id, o.pay_price, ci.product_id, ci.cart_info, u.uid, u.now_money, p.store_name')->select();
- $products = $products ? $products->toArray() : [];
- return $products;
- }
- abstract public function getId();
- abstract public function getName();
- }
|