diff --git a/app/api/controller/user/UserController.php b/app/api/controller/user/UserController.php index 6fffcc870..67c7efbd1 100644 --- a/app/api/controller/user/UserController.php +++ b/app/api/controller/user/UserController.php @@ -87,7 +87,7 @@ class UserController extends BaseApiController $params['channel_type'] = $this->userInfo['terminal']; $order = UserLogic::recharge($params); $redirectUrl = $params['redirect'] ?? '/pages/payment/payment'; - $result = PaymentLogic::pay(PayEnum::WECHAT_PAY, 'recharge', $order, $this->userInfo['terminal'], $redirectUrl); + $result = PaymentLogic::pay(PayEnum::WECHAT_PAY_MINI, 'recharge', $order, $this->userInfo['terminal'], $redirectUrl); if (PaymentLogic::hasError()) { return $this->fail(PaymentLogic::getError(), $params); } diff --git a/app/store/controller/system_store_storage/SystemStoreStorageController.php b/app/store/controller/system_store_storage/SystemStoreStorageController.php new file mode 100644 index 000000000..ef3f1c0e2 --- /dev/null +++ b/app/store/controller/system_store_storage/SystemStoreStorageController.php @@ -0,0 +1,35 @@ +dataLists(new SystemStoreStorageLists()); + } + + + +} \ No newline at end of file diff --git a/app/store/lists/system_store_storage/SystemStoreStorageLists.php b/app/store/lists/system_store_storage/SystemStoreStorageLists.php new file mode 100644 index 000000000..e2e94148c --- /dev/null +++ b/app/store/lists/system_store_storage/SystemStoreStorageLists.php @@ -0,0 +1,82 @@ + ['admin_id', 'staff_id', 'status'], + ]; + } + + + /** + * @notes 获取门店入库记录列表 + * @return array + * @throws \think\db\exception\DataNotFoundException + * @throws \think\db\exception\DbException + * @throws \think\db\exception\ModelNotFoundException + * @author admin + * @date 2024/06/06 17:06 + */ + public function lists(): array + { + $this->searchWhere[] = ['store_id','=',$this->adminInfo['store_id']];//只显示当前门店的入库记录 + return SystemStoreStorage::where($this->searchWhere) + ->field(['id', 'store_id', 'admin_id', 'staff_id', 'product_id', 'nums','mark', 'status']) + ->limit($this->limitOffset, $this->limitLength) + ->order(['id' => 'desc']) + ->select()->each(function ($item) { + $item['system_store_name'] = SystemStore::where('id', $item['store_id'])->value('name'); + $item['admin_name'] = Admin::where('id', $item['admin_id'])->value('name'); + $item['admin_name'] = Admin::where('id', $item['admin_id'])->value('name'); + if ($item['staff_id'] > 0) { + $item['staff_name'] = SystemStoreStaff::where('id', $item['staff_id'])->value('staff_name'); + } else { + $item['staff_name'] = '无'; + } + $find=StoreProduct::where('id',$item['product_id'])->field('store_name,image')->find(); + $item['store_name']=$find['store_name']; + $item['image']=$find['image']; + return $item; + }) + ->toArray(); + } + + + /** + * @notes 获取门店入库记录数量 + * @return int + * @author admin + * @date 2024/06/06 17:06 + */ + public function count(): int + { + return SystemStoreStorage::where($this->searchWhere)->count(); + } + +}