|
|
@ -31,6 +31,21 @@ class Square extends \app\common\model\Square |
|
|
|
return $this->save($data) !== false; |
|
|
|
return $this->save($data) !== false; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
|
|
|
|
* 详情信息 |
|
|
|
|
|
|
|
* @param int $storeId |
|
|
|
|
|
|
|
* @return static|array|null |
|
|
|
|
|
|
|
*/ |
|
|
|
|
|
|
|
public static function detail(int $squareId, $store_id = 0) |
|
|
|
|
|
|
|
{ |
|
|
|
|
|
|
|
$store_id = $store_id ? $store_id : self::$storeId; |
|
|
|
|
|
|
|
$where = [ |
|
|
|
|
|
|
|
'square_id' => $squareId, |
|
|
|
|
|
|
|
'store_id' => $store_id |
|
|
|
|
|
|
|
]; |
|
|
|
|
|
|
|
return static::get($where, []); |
|
|
|
|
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|
* 新增记录 |
|
|
|
* 新增记录 |
|
|
|
* @param array $data |
|
|
|
* @param array $data |
|
|
|