QuerynativeQuery=entityManager.createNativeQuery("select IFNULL(sum(b.amount),0) as data FROM bonus b where b.user_info_user_id=:user and month (b.create_date) = :month and year(b.create_date) = :year ");
QuerynativeQuery=entityManager.createNativeQuery("select IFNULL(sum(b.amount),0) as data FROM bonus b where b.user_info_user_id=:user and month (b.create_date) = :month and year(b.create_date) = :year ");
QuerynativeQuery=entityManager.createNativeQuery("select IFNULL(sum(b.amount),0) as data FROM bonus b where b.user_info_user_id=:user and dayofyear(b.create_date) = :day and year(b.create_date) = :year ");
QuerynativeQuery=manager.createNativeQuery("select IFNULL(sum(b.amount),0) as data FROM bonus b where b.user_info_user_id=:me and b.user_id IN (SELECT x.user_info_user_id FROM network x WHERE x.network_info_user_id=:id) ");
@Formula(value="(SELECT IFNULL(CEILING(SUM((a.item_score+a.service_score+a.logistics_score+a.price_score)/4)/COUNT(a.item_id)),5) FROM tb_cf_item_comment a WHERE a.item_id=item_id)")
...
...
@@ -467,11 +465,4 @@ public class TbCfStationItem {
@Query(value="select a from #{#entityName} a WHERE dayofyear(a.createDate) = :day and year(a.createDate) = :year and a.userInfo=:id order by a.id desc")