赞
踩
- /**
- * 本周注册人数
- *
- * @return
- */
- @Query(nativeQuery = true, value = "SELECT COUNT(1) AS num FROM `user` WHERE YEARWEEK(DATE_FORMAT(create_time,'%Y-%m-%d')) = YEARWEEK(NOW())")
- Integer weekTotalNum();
-
- /**
- * 查询注册用户数
- *
- * @param startDay
- * @param limitDay
- */
- @Query(nativeQuery = true, value = "SELECT a.create_date AS createDate, IFNULL(b.num, 0) AS num FROM (SELECT @date \\:= DATE_SUB(@date, INTERVAL 1 DAY) AS create_date FROM (SELECT @date \\:= DATE_SUB(CURDATE(), INTERVAL ?1 DAY) FROM `user` LIMIT ?2) t) a LEFT JOIN (SELECT LEFT(create_time, 10) AS date_time, COUNT(1) AS num FROM `user` GROUP BY date_time) b ON a.create_date = b.date_time ORDER BY a.create_date DESC")
- List<Map<String, Object>> registerList(@Param("startDay") Integer startDay, @Param("limitDay") Integer limitDay);
-
-
- /**
- * 根据Kol的认证ID查询音乐人认证ID
- *
- * @param idList
- * @return
- */
- @Query(value = "SELECT uak.musicId FROM UserAuthKol uak WHERE uak.id IN ( :idList ) AND uak.musicId>0 ")
- List<Integer> musicIdList(@Param("idList") List<Integer> idList);
-
- /**
- * 批量审核同意
- *
- * @param idList
- * @param status
- */
- @Modifying
- @Transactional(rollbackFor = Exception.class)
- @Query(value = "UPDATE UserAuthKol uak SET uak.status =:status WHERE uak.id IN ( :idList )")
- void checkAgreeByIdList(@Param("idList") List<Integer> idList, @Param("status") Byte status);
Copyright © 2003-2013 www.wpsshop.cn 版权所有,并保留所有权利。