diff --git a/app/common/repositories/store/order/StoreOrderCreateRepository.php b/app/common/repositories/store/order/StoreOrderCreateRepository.php index daf59aa..7437fc3 100755 --- a/app/common/repositories/store/order/StoreOrderCreateRepository.php +++ b/app/common/repositories/store/order/StoreOrderCreateRepository.php @@ -21,13 +21,12 @@ use app\common\repositories\store\product\{ ProductRepository, StoreDiscountRepository }; -use app\common\repositories\user\{ - MemberinterestsRepository, +use app\common\repositories\user\{MemberinterestsRepository, UserAddressRepository, + UserAssetsRepository, UserBillRepository, UserMerchantRepository, - UserRepository -}; + UserRepository}; use app\validate\api\{ OrderVirtualFieldValidate, UserAddressValidate @@ -39,7 +38,8 @@ class StoreOrderCreateRepository extends StoreOrderRepository public function v2CartIdByOrderInfo($user, array $cartId, array $takes = null, array $useCoupon = null, bool $useIntegral = false, int $addressId = null, $createOrder = false) { $uid = $user->uid; - $userIntegral = $user->integral; + $assets = app(UserAssetsRepository::class)->assets($uid); + $userIntegral = $assets['integral_buy']; $key = md5(json_encode(compact('cartId', 'takes', 'useCoupon', 'useIntegral', 'addressId'))) . $uid; //去掉过期的优惠券信息 @@ -1037,6 +1037,10 @@ class StoreOrderCreateRepository extends StoreOrderRepository $rate = bcmul($merchantCart['merchantCategory']['commission_rate'], 100, 4); } $user_address = isset($address) ? ($address['province'] . $address['city'] . $address['district'] . $address['street'] . $address['detail']) : ''; + if($merchantCart['order']['total_integral']){ + $pay_type = 7; + } + $pay_type = 7; //整理订单数据 $_order = [ 'cartInfo' => $merchantCart, diff --git a/app/controller/admin/order/Order.php b/app/controller/admin/order/Order.php index cce413a..eb97607 100755 --- a/app/controller/admin/order/Order.php +++ b/app/controller/admin/order/Order.php @@ -75,7 +75,7 @@ class Order extends BaseController [$page, $limit] = $this->getPage(); $where = $this->request->params(['type', 'date', 'mer_id', 'keywords', 'status', 'username', 'order_sn', 'is_trader', 'activity_type', 'group_order_sn', 'store_name', 'spread_name', 'top_spread_name', 'filter_delivery', 'filter_product']); $pay_type = $this->request->param('pay_type', ''); - if ($pay_type != '') $where['pay_type'] = $this->repository::PAY_TYPE_FILTEER[$pay_type]; + if ($pay_type != '') $where['pay_type'] = $pay_type; $where['is_spread'] = $this->request->param('is_spread', 0); $data = $this->repository->adminGetList($where, $page, $limit); return app('json')->success($data); diff --git a/app/controller/api/Diy.php b/app/controller/api/Diy.php index 5405a64..a1dd612 100755 --- a/app/controller/api/Diy.php +++ b/app/controller/api/Diy.php @@ -22,9 +22,11 @@ use app\common\repositories\store\product\SpuRepository; use app\common\repositories\store\StoreCategoryRepository; use app\common\repositories\store\StoreSeckillTimeRepository; use app\common\repositories\system\merchant\MerchantRepository; +use app\controller\admin\points\Product; use crmeb\basic\BaseController; use think\App; use think\facade\Cache; +use think\facade\Log; class Diy extends BaseController { @@ -184,20 +186,23 @@ class Diy extends BaseController */ public function spu(SpuRepository $repository) { - $data = $this->cache(function() use($repository) { - $where = $this->request->params(['cate_pid','product_ids','mer_id','mer_cate_id']); - $limit = (int)$this->request->param('limit',10); - $where['spu_status'] = 1; - $where['mer_status'] = 1; - $where['not_type'] = [20]; - $where['is_gift_bag'] = 0; - $where['product_type'] = 0; - $list = $repository->search($where)->with(['merchant'=> function($query){ - $query->with(['typeName','categoryName'])->field('mer_id,category_id,type_id,mer_avatar,mer_name,is_trader'); - },'issetCoupon'])->limit($limit)->select(); - if ($list) $data['list'] = $list->toArray(); - return $data; - }); + $productList = app(ProductRepository::class)->selectWhere(['is_good' => 1], 'product_id'); + $productIdArr = $productList->isEmpty() ? [] : array_column($productList->toArray(), 'product_id'); + Log::info('productList'.json_encode($productIdArr)); + Log::info('=============================productList'); + + $where = $this->request->params(['cate_pid','product_ids','mer_id','mer_cate_id']); + $limit = (int)$this->request->param('limit',10); + $where['spu_status'] = 1; + $where['mer_status'] = 1; + $where['not_type'] = [20]; + $where['is_gift_bag'] = 0; + $where['product_type'] = 0; + $where['product_ids'] = $productIdArr; + $list = $repository->search($where)->with(['merchant'=> function($query){ + $query->with(['typeName','categoryName'])->field('mer_id,category_id,type_id,mer_avatar,mer_name,is_trader'); + },'issetCoupon'])->limit($limit)->select(); + if ($list) $data['list'] = $list->toArray(); return app('json')->success($data); } diff --git a/view/admin/src/views/accounts/transferRecord/index.vue b/view/admin/src/views/accounts/transferRecord/index.vue index 19981e0..7a04545 100644 --- a/view/admin/src/views/accounts/transferRecord/index.vue +++ b/view/admin/src/views/accounts/transferRecord/index.vue @@ -100,11 +100,11 @@ 搜索 - 重置 + 重置 - +
导出列表 @@ -452,7 +452,7 @@ export default { if (lebData.export.length) { data = data.concat(lebData.export) excelData.page++ - } + } } createWorkBook(lebData.header, lebData.title, data, lebData.foot,lebData.filename); return diff --git a/view/admin/src/views/order/list/index.vue b/view/admin/src/views/order/list/index.vue index af07801..271c078 100644 --- a/view/admin/src/views/order/list/index.vue +++ b/view/admin/src/views/order/list/index.vue @@ -42,23 +42,7 @@ @change="onchangeTime" /> - - - - - + - - - - - - + - - + - - - - - - - - - - + + /> 搜索 - 重置 + 重置
- + 导出列表 用户已删除 - - - - - - + + @@ -636,7 +568,7 @@ export default {