Merge branch 'feature/purchase_record' into dev
This commit is contained in:
commit
8cf56815d8
@ -563,14 +563,14 @@ class StoreOrderRepository extends BaseRepository
|
||||
public function userOrderNumber(int $uid, $product_type=0)
|
||||
{
|
||||
$noPay = app()->make(StoreGroupOrderRepository::class)->orderNumber($uid, $product_type);
|
||||
$noPostage = $this->dao->search(['uid' => $uid, 'status' => 0, 'paid' => 1,'is_user' => 1, 'product_type' => $product_type])->where('StoreOrder.is_del', 0)->count();
|
||||
$noDeliver = $this->dao->search(['uid' => $uid, 'status' => 1, 'paid' => 1, 'product_type' => $product_type])->where('StoreOrder.is_del', 0)->count();
|
||||
$noComment = $this->dao->search(['uid' => $uid, 'status' => 2, 'paid' => 1,'is_user' => 1, 'product_type' => $product_type])->where('StoreOrder.is_del', 0)->count();
|
||||
$done = $this->dao->search(['uid' => $uid, 'status' => 3, 'paid' => 1,'is_user' => 1, 'product_type' => $product_type])->where('StoreOrder.is_del', 0)->count();
|
||||
$noPostage = $this->dao->search(['uid' => $uid, 'status' => 0, 'paid' => 1,'is_user' => 1])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->count();
|
||||
$noDeliver = $this->dao->search(['uid' => $uid, 'status' => 1, 'paid' => 1])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->count();
|
||||
$noComment = $this->dao->search(['uid' => $uid, 'status' => 2, 'paid' => 1,'is_user' => 1])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->count();
|
||||
$done = $this->dao->search(['uid' => $uid, 'status' => 3, 'paid' => 1,'is_user' => 1])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->count();
|
||||
$refund = app()->make(StoreRefundOrderRepository::class)->getWhereCount(['uid' => $uid, 'status' => [0, 1, 2]]);
|
||||
//$orderPrice = $this->dao->search(['uid' => $uid, 'paid' => 1])->sum('pay_price');
|
||||
$all = $this->dao->search(['uid' => $uid, 'status' => -2,'is_user' => 1, 'product_type' => $product_type])->where('StoreOrder.is_del', 0)->count();
|
||||
$orderCount = $this->dao->search(['uid' => $uid, 'paid' => 1,'is_user' => 1, 'product_type' => $product_type])->where('StoreOrder.is_del', 0)->count();
|
||||
$all = $this->dao->search(['uid' => $uid, 'status' => -2,'is_user' => 1])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->count();
|
||||
$orderCount = $this->dao->search(['uid' => $uid, 'paid' => 1,'is_user' => 1])->where('activity_type', $product_type)->where('StoreOrder.is_del', 0)->count();
|
||||
return compact('noComment', 'done', 'refund', 'noDeliver', 'noPay', 'noPostage', 'orderCount', 'all');
|
||||
}
|
||||
|
||||
|
@ -67,7 +67,7 @@ class ProductRepository extends BaseRepository
|
||||
|
||||
protected $dao;
|
||||
const CREATE_PARAMS = [
|
||||
"image", "slider_image", "store_name", "store_info", "keyword", "bar_code", "guarantee_template_id", "cate_id", "mer_cate_id", "unit_name", "sort" , "is_show", "is_good", 'is_gift_bag', 'integral_rate', "video_link", "temp_id", "content", "spec_type", "extension_type", "attr", 'mer_labels', 'delivery_way', 'delivery_free','param_temp_id','extend',
|
||||
"image", "slider_image", "store_name", "store_info", "keyword", "bar_code", "guarantee_template_id", "cate_id", "mer_cate_id", "unit_name", "sort" , "is_show", "is_good", 'is_gift_bag', 'integral_rate', "video_link", "temp_id", "content", "spec_type", "extension_type", "attr", 'mer_labels', 'delivery_way', 'delivery_free','param_temp_id','extend', 'source_product_id',
|
||||
["brand_id",0],
|
||||
['once_max_count',0],
|
||||
['once_min_count',0],
|
||||
@ -483,6 +483,7 @@ class ProductRepository extends BaseRepository
|
||||
'once_max_count' => $data['once_max_count'] ?? 0,
|
||||
'pay_limit' => $data['pay_limit'] ?? 0,
|
||||
'svip_price_type' => $data['svip_price_type'] ?? 0,
|
||||
'source_product_id' => $data['source_product_id'] ?? 0,
|
||||
];
|
||||
$result['bar_code'] = $data['attrValue'][0]['bar_code'] ?? '';
|
||||
if (isset($data['mer_id']))
|
||||
@ -2374,7 +2375,10 @@ class ProductRepository extends BaseRepository
|
||||
$find['attr'][] = ['attr_name' => $item['attr_name'], 'detail' => explode('-!-', $item['attr_values'])];
|
||||
}
|
||||
$where = empty($unique) ? ['product_id' => $find['product_id']] : ['product_id' => $find['product_id'], 'unique' => $unique];
|
||||
$find['attrValue'] = Db::name('store_product_attr_value')->where($where)->field('image,price,cost,ot_price,svip_price,0 as stock,bar_code,weight,volume,detail')->select();
|
||||
$find['attrValue'] = Db::name('store_product_attr_value')->where($where)->field('image,price,cost,ot_price,svip_price,0 as stock,bar_code,weight,volume,detail')->select()->each(function ($item) {
|
||||
$item['detail'] = empty($item['detail']) ? [] : json_decode($item['detail'], true);
|
||||
return $item;
|
||||
})->toArray();
|
||||
$find['content'] = Db::name('store_product_content')->where('product_id', $find['product_id'])->value('content');
|
||||
$find['is_show'] = 0;
|
||||
$find['mer_id'] = $mer_id;
|
||||
|
Loading…
x
Reference in New Issue
Block a user