mirror of
https://gitee.com/zoujingli/ThinkAdmin.git
synced 2025-04-06 03:58:04 +08:00
Update Address.php
This commit is contained in:
parent
a70457b996
commit
5bb4554bf4
@ -76,9 +76,6 @@ class Address extends Auth
|
|||||||
|
|
||||||
/**
|
/**
|
||||||
* 修改地址状态
|
* 修改地址状态
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
|
||||||
* @throws \think\db\exception\DbException
|
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
|
||||||
*/
|
*/
|
||||||
public function state()
|
public function state()
|
||||||
{
|
{
|
||||||
@ -129,14 +126,10 @@ class Address extends Auth
|
|||||||
* 获取指定的地址
|
* 获取指定的地址
|
||||||
* @param string $code
|
* @param string $code
|
||||||
* @return null|array
|
* @return null|array
|
||||||
* @throws \think\db\exception\DataNotFoundException
|
|
||||||
* @throws \think\db\exception\DbException
|
|
||||||
* @throws \think\db\exception\ModelNotFoundException
|
|
||||||
*/
|
*/
|
||||||
private function _getAddress(string $code): array
|
private function _getAddress(string $code): array
|
||||||
{
|
{
|
||||||
$map = ['code' => $code, 'uuid' => $this->uuid, 'deleted' => 0];
|
$map = ['code' => $code, 'uuid' => $this->uuid, 'deleted' => 0];
|
||||||
$data = DataUserAddress::mk()->withoutField('deleted')->where($map)->find();
|
return DataUserAddress::mk()->withoutField('deleted')->where($map)->findOrEmpty()->toArray();
|
||||||
return empty($data) ? [] : $data->toArray();
|
|
||||||
}
|
}
|
||||||
}
|
}
|
Loading…
x
Reference in New Issue
Block a user