Merge branch 'dev'
This commit is contained in:
commit
b21a51af0c
17
app/Factory/CacheFactory.php
Normal file
17
app/Factory/CacheFactory.php
Normal file
@ -0,0 +1,17 @@
|
||||
<?php
|
||||
|
||||
namespace App\Factory;
|
||||
|
||||
use Hyperf\Cache\Cache;
|
||||
use Hyperf\Cache\CacheManager;
|
||||
|
||||
class CacheFactory extends Cache
|
||||
{
|
||||
protected $driver;
|
||||
|
||||
public function __construct(CacheManager $manager)
|
||||
{
|
||||
parent::__construct($manager);
|
||||
$this->driver = $manager->getDriver('prod');
|
||||
}
|
||||
}
|
||||
10
app/Factory/ProdRedisFactory.php
Normal file
10
app/Factory/ProdRedisFactory.php
Normal file
@ -0,0 +1,10 @@
|
||||
<?php
|
||||
|
||||
namespace App\Factory;
|
||||
|
||||
use Hyperf\Redis\Redis;
|
||||
|
||||
class ProdRedisFactory extends Redis
|
||||
{
|
||||
protected string $poolName = 'prod';
|
||||
}
|
||||
@ -344,6 +344,7 @@ class InquiryService extends BaseService
|
||||
Db::commit();
|
||||
} catch (\Exception $e) {
|
||||
Db::rollBack();
|
||||
Log::getInstance()->error("错误:" . $e->getMessage());
|
||||
return fail(HttpEnumCode::HTTP_ERROR, $e->getMessage());
|
||||
}
|
||||
|
||||
|
||||
@ -40,7 +40,10 @@ class IdCard extends Base
|
||||
}
|
||||
|
||||
if ($result['code'] != "200"){
|
||||
throw new BusinessException("姓名与身份证号不一致");
|
||||
if (!empty($result['msg'])){
|
||||
return $result['msg'];
|
||||
}
|
||||
return "身份证认证失败";
|
||||
}
|
||||
|
||||
if (empty($result['result'])){
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user