Browse Source

Improve-notification

new-feature
Viet.LeQ2 1 year ago
parent
commit
79f294d7fb
1 changed files with 2 additions and 1 deletions
  1. +2
    -1
      src/main/java/vn/azteam/tpf/service/TBCropQueryService.java

+ 2
- 1
src/main/java/vn/azteam/tpf/service/TBCropQueryService.java View File

@@ -511,7 +511,8 @@ public class TBCropQueryService extends QueryService<TBCrop> {
" left join tb_guideline_period as guideline_period on guideline_period.id = tgd.tb_guideline_period_id \n" +
" left join tb_assignment ta on crop.id = ta.tb_crops_id \n" +
" left join tb_detail_user tdu on ta.tb_detail_users_id = tdu.id \n" +
"where ta.tb_detail_users_id is not null and tdu.fcm_token is not null and DATE(activity.execute_date) = CURDATE() \n" +
"where ta.tb_detail_users_id is not null and tdu.fcm_token is not null \n" +
"and DATE(crop.start_date) <= NOW() and NOW() <= DATE (crop.end_date) \n" +
"group by crop.id, crop.code, crop.tb_crop_type_id, crop.start_date, crop.end_date, activity_type.description, activity.execute_date, ta.tb_detail_users_id, tdu.fcm_token \n";
Query nativeQuery = em.createNativeQuery(sqlString);
return (List<Object[]>) nativeQuery.getResultList();

Loading…
Cancel
Save