删除重复的接口
This commit is contained in:
parent
baa8f9a93d
commit
2a398c957d
@ -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());
|
||||
}
|
||||
}
|
||||
}
|
||||
@ -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;
|
||||
}
|
||||
}
|
||||
Loading…
Reference in New Issue
Block a user