Skip to content

Instantly share code, notes, and snippets.

View crazywhalecc's full-sized avatar

Jerry Ma crazywhalecc

  • Shanghai
  • 20:46 (UTC +08:00)
View GitHub Profile
<?php
declare(strict_types=1);
namespace ZM\Annotation\CQ;
use Attribute;
use Doctrine\Common\Annotations\Annotation\NamedArgumentConstructor;
use Doctrine\Common\Annotations\Annotation\Required;
use ZM\Annotation\AnnotationBase;
private function doSign() {
$sign_data = DP::query("SELECT * FROM sign_data WHERE user_id = ?", [$this->getUserId()]);
if ($sign_data == []) $sign_data = $this->initData();
else $sign_data = $sign_data[0];
$today_zero = TimeManager::getTodayZero();
if ($sign_data["last_sign"] >= $today_zero) return false;//签过了
$last_day_zero = $today_zero - 86400;
if ($sign_data["last_sign"] >= $last_day_zero) {//是不是连签
$sign_data["sign_day_long"]++;
<?php
/**
* Created by PhpStorm.
* User: jerry
* Date: 2018/4/10
* Time: 14:35
*/
namespace crazybot\mods;
@crazywhalecc
crazywhalecc / MiraiPatch.php
Last active May 8, 2020 12:31
zhamao-framework connect with mirai
<?php
// TODO: 还没写