query="select count(DISTINCT device_id) num ,device from login_info where phone_no=?1 and device =?2 and device_id != ?3 and created_at > DATE_ADD(CURRENT_TIMESTAMP(),INTERVAL -90 DAY)",
@Query(value="select count(distinct phone_no) from login_info where device_id=?1 and phone_no != ?2 and created_at> DATE_ADD(CURRENT_TIMESTAMP(),INTERVAL -90 DAY)",nativeQuery=true)
LongcountByDeviceId(StringdeviceId,Stringphone);
/**
* 账号维度策略
*
* @param phone
* @return
*/
// @Query(value = "select count(1) ,device from login_info where phone_no=?1 and last_login_at> DATE_ADD(CURRENT_TIMESTAMP(),INTERVAL -90 DAY group by device", nativeQuery = true)