|
@@ -176,4 +176,26 @@ class CouponConfig extends Controller
|
|
|
{
|
|
|
$this->_delete($this->table);
|
|
|
}
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+ /**
|
|
|
+ * @auth true
|
|
|
+ * @menu true
|
|
|
+ */
|
|
|
+ public function user_coupon()
|
|
|
+ {
|
|
|
+ $coupon_id = input('id');
|
|
|
+ $status_arr = ['','正常','已使用','过期','删除'];
|
|
|
+ $this->assign('status_arr',$status_arr);
|
|
|
+ $list =$this->_query('UserCouponList')
|
|
|
+ ->alias('l')
|
|
|
+ ->field('l.*,m.name as user_name , c.title as coupon_name')
|
|
|
+ ->join('store_member m','m.id = l.user_id','LEFT')
|
|
|
+ ->join('store_coupon_config c','l.coupon_id= m.id','LEFT')
|
|
|
+ ->where(['l.coupon_id'=>$coupon_id])
|
|
|
+ ->order('l.id desc')
|
|
|
+ ->page();
|
|
|
+ }
|
|
|
+
|
|
|
}
|