用户好友的助力点击事件里 后台需要查询最近1分钟内该助力成功的条数,如果大于1,说明频率过快,有违规操作嫌疑,我对这个框架实在是不熟,比如php取得了当前的时分秒以后,下面的代码:
$make = app()->make(ProductAssistUserRepository::class);
$make->getSearch(['product_assist_id' => 2228)->count();
要怎么改造,到达这样的效果:
SELECT DATE_FORMAT(create_time, '%Y-%m-%d %H:%i') AS minute, COUNT(*) AS count FROM eb_store_product_assist_user
where product_assist_set_id=2228 GROUP BY minute HAVING count >0;