refactor(gateway): 移除查询和提交接口中的异常捕获代码

- 从 query() 和 submit() 方法中删除了 try-catch 块
- 移除了异常捕获后的日志记录和错误响应逻辑
- 保留了注释掉的 try-catch 块,以便未来可能的错误处理
This commit is contained in:
mzeros 2024-12-07 13:02:37 +08:00
parent 74b0763e2c
commit ae569d2866

View File

@ -18,7 +18,7 @@ class Handle extends Core
# 查询接口 一般用于查询数据,同步执行
public function query(): void
{
try{
$settingStatus = sysconf('settingStatus');
if ($settingStatus == 1) {
$this->no(-1000);
@ -30,17 +30,14 @@ class Handle extends Core
}
$data = $this->channel($this->mid, $this->product, false);
$this->yes($data);
} catch (\Exception $e){
$this->writelog($e->getMessage(), 'error');
$this->no(-100,$e->getMessage());
}
}
# 提交接口 一般用于提交数据,异步执行
public function submit(): void
{
try{
$settingStatus = sysconf('settingStatus');
if ($settingStatus == 1) {
$this->no(-1000);
@ -53,11 +50,11 @@ class Handle extends Core
$data = $this->channel($this->mid, $this->product, true);
$this->yes($data);
} catch (\Exception $e){
$this->writelog($e->getMessage(), 'error');
$this->no(-100,$e->getMessage());
}
// } catch (\Exception $e){
//
// $this->writelog($e->getMessage(), 'error');
// $this->no(-100,$e->getMessage());
// }
}