diff --git a/app/api/controller/LocalStore.php b/app/api/controller/LocalStore.php index 9c8ef1db..e13d7db9 100755 --- a/app/api/controller/LocalStore.php +++ b/app/api/controller/LocalStore.php @@ -380,16 +380,4 @@ class LocalStore extends Api return JsonServer::error($e->getMessage()); } } - - // 获取核销订单详情 - public function getVerifyOrderDetails() - { - try { - $post = $this->request->post(); - $data = LocalStoreLogic::getVerifyOrderDetails($post, $this->user_id); - return JsonServer::success('设置成功', $data); - } catch (\Exception $e) { - return JsonServer::error($e->getMessage()); - } - } } \ No newline at end of file diff --git a/app/api/logic/LocalStoreLogic.php b/app/api/logic/LocalStoreLogic.php index 052cf120..3e5c4eeb 100644 --- a/app/api/logic/LocalStoreLogic.php +++ b/app/api/logic/LocalStoreLogic.php @@ -2,16 +2,11 @@ namespace app\api\logic; -use app\common\model\localstore\LocalStoreGoods; use app\common\basics\Logic; use app\common\model\LocalStore; use app\common\model\localstore\LocalGoodsStore; -use app\common\model\localstore\LocalGoodsOrder; -use app\common\model\localstore\LocalStoreGoodsItem; use app\common\model\LocalStoreOrder; use app\common\model\LocalStorePostStation; -use app\common\model\localstore\LocalStoreVerify; -use app\common\model\user\User; use think\facade\Db; use think\facade\Config; @@ -454,39 +449,4 @@ class LocalStoreLogic extends Logic throw new \Exception('删除失败'); } - - public static function getVerifyOrderDetails($post, $user_id) - { - // 查找改用户是否有核销权限 - $order = LocalGoodsOrder::where('lsg_order_id', $post['lsg_order_id'])->find(); - $has_verify = LocalStoreVerify::where([ - 'lstore_id' => $order['lstore_id'], - 'user_id' => $user_id, - 'is_delete' => 0 - ])->find(); - - if (empty($has_verify)) { - throw new \Exception('该用户没有核销权限'); - } - - // 获取被核销人员信息 - $data['user'] = User::where('id', $order['user_id'])->field('nickname, avatar as abs_avatar')->find(); - - // 被核销订单信息 - $data['order'] = $order; - - // 物品信息 - $shop = LocalStoreGoods::where('id', $order['goods_id'])->field('title')->find(); - - $shop_spec = ''; - if ($order['item_id'] > 0) { - $spec = LocalStoreGoodsItem::where('id', $order['item'])->field('spec_value_str')->find(); - if ($spec) { - $shop['title'] .= ' ' . $spec['spec_value_str']; - } - } - - $data['shop_title'] = $shop['title']; - return $data; - } } \ No newline at end of file