mirror of
https://github.com/kuaifan/dootask.git
synced 2026-03-17 11:13:26 +00:00
perf: 只给一个月内登录App的帐号推送
This commit is contained in:
parent
883e5c26d9
commit
d9696d2398
@ -782,7 +782,9 @@ class UsersController extends AbstractController
|
|||||||
'alias' => $data['alias'],
|
'alias' => $data['alias'],
|
||||||
'platform' => $platform,
|
'platform' => $platform,
|
||||||
];
|
];
|
||||||
if (UmengAlias::where($inArray)->exists()) {
|
$row = UmengAlias::where($inArray);
|
||||||
|
if ($row->exists()) {
|
||||||
|
$row->update(['updated_at' => Carbon::now()]);
|
||||||
return Base::retSuccess('别名已存在');
|
return Base::retSuccess('别名已存在');
|
||||||
}
|
}
|
||||||
$row = UmengAlias::createInstance($inArray);
|
$row = UmengAlias::createInstance($inArray);
|
||||||
|
|||||||
@ -150,7 +150,7 @@ class UmengAlias extends AbstractModel
|
|||||||
*/
|
*/
|
||||||
public static function pushMsgToUserid($userid, $array)
|
public static function pushMsgToUserid($userid, $array)
|
||||||
{
|
{
|
||||||
$builder = self::select(['id', 'platform', 'alias']);
|
$builder = self::select(['id', 'platform', 'alias'])->where('updated_at', '>', Carbon::now()->subMonth());
|
||||||
if (is_array($userid)) {
|
if (is_array($userid)) {
|
||||||
$builder->whereIn('userid', $userid);
|
$builder->whereIn('userid', $userid);
|
||||||
} elseif (Base::isNumber($userid)) {
|
} elseif (Base::isNumber($userid)) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user