diff --git a/app/common/repositories/store/parameter/ParameterValueRepository.php b/app/common/repositories/store/parameter/ParameterValueRepository.php index f472a0bb..47aeebc3 100755 --- a/app/common/repositories/store/parameter/ParameterValueRepository.php +++ b/app/common/repositories/store/parameter/ParameterValueRepository.php @@ -35,6 +35,7 @@ class ParameterValueRepository extends BaseRepository public function create($id, $data,$merId) { if (empty($data)) return ; + $create=[]; foreach ($data as $datum) { if ($datum['name'] && $datum['value']) { $create[] = [ @@ -48,7 +49,7 @@ class ParameterValueRepository extends BaseRepository ]; } } - if ($create) $this->dao->insertAll($create); + if (count($create)>0) $this->dao->insertAll($create); } diff --git a/app/common/repositories/system/merchant/MerchantRepository.php b/app/common/repositories/system/merchant/MerchantRepository.php index 3953ea26..7dce5736 100755 --- a/app/common/repositories/system/merchant/MerchantRepository.php +++ b/app/common/repositories/system/merchant/MerchantRepository.php @@ -110,7 +110,7 @@ class MerchantRepository extends BaseRepository 'merchantType' ]) ->order('mer_id','desc') - ->field('sort, mer_id, mer_name, real_name, mer_phone, mer_address, mark, status, create_time,is_best,is_trader,type_id,category_id,copy_product_num,export_dump_num,is_margin,margin,mer_avatar')->select(); + ->field('sort, mer_id, mer_name, real_name, mer_phone, mer_address, mark, status, create_time,is_best,is_trader,type_id,category_id,copy_product_num,export_dump_num,is_margin,margin,mer_avatar,sale_amount,purchase_amount')->select(); return compact('count', 'list'); } diff --git a/app/controller/admin/store/StoreProduct.php b/app/controller/admin/store/StoreProduct.php index 34ee3776..c56e7adf 100755 --- a/app/controller/admin/store/StoreProduct.php +++ b/app/controller/admin/store/StoreProduct.php @@ -306,30 +306,30 @@ class StoreProduct extends BaseController public function copy($product_id = 0, $mer_id = 0, $street_code = 0, $type_id = 0, $category_id = 0) { if ($product_id == 0) return app('json')->fail('参数错误'); - $find= Db::name('merchant')->where('mer_id',$mer_id)->find(); + // $find= Db::name('merchant')->where('mer_id',$mer_id)->find(); $products = $this->repository->getAdminOneProduct($product_id, 0); $product = $products->toArray(); $product['mer_id'] = $mer_id; $product['old_product_id'] = $product['product_id']; $productId = $this->repository->create($product, 0, 1); - $data = [ - 'product_id' => $productId, - 'mer_id' => $mer_id, - 'source_mer_id' => $products['mer_id'], - 'street_code' => $street_code, - 'weight' => 1, - 'status' => 1, - 'create_time' => date('Y-m-d H:i:s'), - 'type_id' => $type_id, - 'category_id' => $category_id, - 'cate_id' => 2244, - 'long' => $find['long'], - 'lat' => $find['lat'], - 'lat' => $find['lat'], - 'store_name' => $products['store_name'], - 'activity_id' =>2, - ]; - Db::name('cloud_product')->insert($data); + // $data = [ + // 'product_id' => $productId, + // 'mer_id' => $mer_id, + // 'source_mer_id' => $products['mer_id'], + // 'street_code' => $street_code, + // 'weight' => 1, + // 'status' => 1, + // 'create_time' => date('Y-m-d H:i:s'), + // 'type_id' => $type_id, + // 'category_id' => $category_id, + // 'cate_id' => 2244, + // 'long' => $find['long'], + // 'lat' => $find['lat'], + // 'lat' => $find['lat'], + // 'store_name' => $products['store_name'], + // 'activity_id' =>2, + // ]; + // Db::name('cloud_product')->insert($data); return $productId; } } diff --git a/app/controller/api/Common.php b/app/controller/api/Common.php index cbd5aa15..74e4f26b 100755 --- a/app/controller/api/Common.php +++ b/app/controller/api/Common.php @@ -644,7 +644,7 @@ class Common extends BaseController public function Qrcode($data) { $siteUrl = systemConfig('site_url'); - $name = 'orcode'.$data['id'] .md5(date('Ymd')) . '.png'; + $name = 'orcode'.$data['id'] .md5(date('code') . date('Ymd')) . '.png'; $attachmentRepository = app()->make(AttachmentRepository::class); $imageInfo = $attachmentRepository->getWhere(['attachment_name' => $name]); diff --git a/app/controller/api/store/order/ScanPay.php b/app/controller/api/store/order/ScanPay.php index 58000de6..3950e85b 100644 --- a/app/controller/api/store/order/ScanPay.php +++ b/app/controller/api/store/order/ScanPay.php @@ -36,6 +36,7 @@ class ScanPay extends BaseController public function qrcode() { $merId = $this->request->get('mer_id'); + /** @var Common $common */ $common = app()->make(Common::class); $siteUrl = systemConfig('site_url'); $user = $this->request->userInfo(); diff --git a/public/index.html b/public/index.html index 08ec4025..c2e7abf8 100644 --- a/public/index.html +++ b/public/index.html @@ -2,4 +2,4 @@ document.write('') if(window.location.protocol == 'https:'){ document.write('') - }