|
|
@@ -104,4 +104,29 @@ class CartRepository extends BaseRepository
|
|
104
|
104
|
return $cartSelect[0];
|
|
105
|
105
|
}
|
|
106
|
106
|
|
|
|
107
|
+ /**
|
|
|
108
|
+ * TODO 获取购物车列表
|
|
|
109
|
+ * @param $uid
|
|
|
110
|
+ * @return array
|
|
|
111
|
+ */
|
|
|
112
|
+ public function getListFromUid($uid){
|
|
|
113
|
+ //SELECT * FROM `rrx_store_product` `rsp` INNER JOIN `rrx_store_product_attr_value` `rspav` ON `rsp`.`product_id`=`rspav`.`product_id` WHERE `rsp`.`product_id` = '434' AND `rspav`.`unique` = 'f53eccfdd090' LIMIT 1
|
|
|
114
|
+ $list = Db::query("select * from `rrx_store_cart` `rsc`
|
|
|
115
|
+ INNER JOIN `rrx_store_product_attr` `rspa` on `rsc`.``
|
|
|
116
|
+ where
|
|
|
117
|
+ `uid`=? and
|
|
|
118
|
+ `is_del`=? and
|
|
|
119
|
+ `is_new`=? and
|
|
|
120
|
+ `is_pay`=?"
|
|
|
121
|
+ ,[$uid,0,0,0]);
|
|
|
122
|
+ $this -> formatCartList($list);
|
|
|
123
|
+ return [];
|
|
|
124
|
+ }
|
|
|
125
|
+
|
|
|
126
|
+ //购物车列表格式化
|
|
|
127
|
+ public function formatCartList(&$list){
|
|
|
128
|
+ dump($list);
|
|
|
129
|
+// foreach
|
|
|
130
|
+ }
|
|
|
131
|
+
|
|
107
|
132
|
}
|