54 lines
1.2 KiB
PHP
54 lines
1.2 KiB
PHP
<?php
|
|
|
|
|
|
namespace models;
|
|
|
|
use mt;
|
|
use phpcommon\SqlHelper;
|
|
class SignLog extends BaseModel
|
|
{
|
|
public static function isSignRecord(){
|
|
if (self::find()){
|
|
return true;
|
|
}
|
|
return false;
|
|
}
|
|
|
|
public static function find(){
|
|
return SqlHelper::ormSelectOne(
|
|
myself()->_getSelfMysql(),
|
|
't_user_sign_log',
|
|
array(
|
|
'account_id' => myself()->_getAccountId()
|
|
)
|
|
);
|
|
}
|
|
|
|
public static function create(){
|
|
SqlHelper::insert
|
|
(myself()->_getSelfMysql(),
|
|
't_user_sign_log',
|
|
array(
|
|
'account_id' => myself()->_getAccountId(),
|
|
'days' => 1,
|
|
'sign_time' => myself()->_getNowTime(),
|
|
'is_receive' => 0,
|
|
'createtime' => myself()->_getNowTime(),
|
|
'modifytime' => myself()->_getNowTime(),
|
|
)
|
|
);
|
|
}
|
|
|
|
public static function update($fieldKv){
|
|
SqlHelper::update
|
|
(myself()->_getSelfMysql(),
|
|
't_user_sign_log',
|
|
array(
|
|
'account_id' => myself()->_getAccountId(),
|
|
),
|
|
$fieldKv
|
|
);
|
|
}
|
|
|
|
|
|
} |