2023-12-21 17:02:53 +08:00

42 lines
1.1 KiB
PHP

<?php
namespace models;
use phpcommon\SqlHelper;
class Map extends BaseModel
{
public static function findMap(){
$rows = SqlHelper::ormSelect(
myself()->_getSelfMysql(),
't_unlocked_map',
array(
'account_id'=> myself()->_getAccountId()
)
);
return $rows;
}
public static function upsertMap($itemMeta){
SqlHelper::upsert
(myself()->_getSelfMysql(),
't_unlocked_map',
array(
'account_id' => myself()->_getAccountId(),
'map_id' => $itemMeta['param1'],
),
array(
'unlockedtime' => myself()->_getNowTime(),
),
array(
'account_id' => myself()->_getAccountId(),
'map_id' => $itemMeta['param1'],
'unlockedtime' => myself()->_getNowTime(),
'createtime' => myself()->_getNowTime(),
'modifytime' => myself()->_getNowTime(),
)
);
}
}