This commit is contained in:
hujiabin 2022-11-30 16:41:08 +08:00
parent ab1020c877
commit 8cc9c610cb

View File

@ -8,22 +8,25 @@ use phpcommon\SqlHelper;
class NftActive extends BaseModel
{
public static function upsert($data){
if ($data['token_id']){
$where = array(
'token_id' =>$data['token_id'],
'daytime' =>myself()->_getDaySeconds(myself()->_getNowTime()),
);
}else{
$where = array(
'uniid' =>$data['uniid'],
'daytime' =>myself()->_getDaySeconds(myself()->_getNowTime()),
);
}
// if ($data['token_id']){
// $where = array(
// 'token_id' =>$data['token_id'],
// 'daytime' =>myself()->_getDaySeconds(myself()->_getNowTime()),
// );
// }else{
// $where = array(
// 'uniid' =>$data['uniid'],
// 'daytime' =>myself()->_getDaySeconds(myself()->_getNowTime()),
// );
// }
SqlHelper::upsert
(myself()->_getSelfMysql(),
't_nft_active',
$where,
array(
'uniid' =>$data['uniid'],
'daytime' =>myself()->_getDaySeconds(myself()->_getNowTime()),
),
array(
),
array(