|
@@ -225,18 +225,22 @@ class GoodsService extends BaseService
|
|
|
public function getOrderGoods($ids, $goods, $userId, $orderNo='')
|
|
public function getOrderGoods($ids, $goods, $userId, $orderNo='')
|
|
|
{
|
|
{
|
|
|
// 用户信息
|
|
// 用户信息
|
|
|
- if(empty($orderNo)){
|
|
|
|
|
- $userInfo = MemberModel::where(['id' => $userId, 'mark' => 1])
|
|
|
|
|
- ->select(['id', 'discount_point', 'status'])
|
|
|
|
|
- ->first();
|
|
|
|
|
- $status = isset($userInfo['status']) ? $userInfo['status'] : 0;
|
|
|
|
|
- $discountPoint = isset($userInfo['discount_point']) ? $userInfo['discount_point'] : 0; // 折扣
|
|
|
|
|
- if (empty($userInfo) || $status != 1) {
|
|
|
|
|
- $this->error = 1045;
|
|
|
|
|
- return false;
|
|
|
|
|
- }
|
|
|
|
|
|
|
+ $userInfo = MemberModel::where(['id' => $userId, 'mark' => 1])
|
|
|
|
|
+ ->select(['id', 'discount_point', 'status'])
|
|
|
|
|
+ ->first();
|
|
|
|
|
+ $status = isset($userInfo['status']) ? $userInfo['status'] : 0;
|
|
|
|
|
+ $discountPoint = isset($userInfo['discount_point']) ? $userInfo['discount_point'] : 0; // 折扣
|
|
|
|
|
+ if (empty($userInfo) || $status != 1) {
|
|
|
|
|
+ $this->error = 1045;
|
|
|
|
|
+ return false;
|
|
|
}
|
|
}
|
|
|
|
|
|
|
|
|
|
+ if (empty($openid)) {
|
|
|
|
|
+ $this->error = 1042;
|
|
|
|
|
+ return false;
|
|
|
|
|
+ }
|
|
|
|
|
+
|
|
|
|
|
+
|
|
|
$list = $this->model->whereIn('id', $ids)
|
|
$list = $this->model->whereIn('id', $ids)
|
|
|
->where(['status'=>1,'mark'=>1])
|
|
->where(['status'=>1,'mark'=>1])
|
|
|
->select(['id as goods_id','goods_name','category_id','store_id','delivery_fee','sku_type','price','stock','unit','weight','thumb','sku_type'])
|
|
->select(['id as goods_id','goods_name','category_id','store_id','delivery_fee','sku_type','price','stock','unit','weight','thumb','sku_type'])
|