From b3f5e5ba3fd436f00f73cef1de6e8208fe6cf8c4 Mon Sep 17 00:00:00 2001 From: admin <weikou2014> Date: 星期一, 22 六月 2020 10:23:18 +0800 Subject: [PATCH] Merge remote-tracking branch 'origin/div' into div --- fanli/src/main/java/com/yeshi/fanli/job/UserCloudJob.java | 21 ++++++++++----------- 1 files changed, 10 insertions(+), 11 deletions(-) diff --git a/fanli/src/main/java/com/yeshi/fanli/job/UserCloudJob.java b/fanli/src/main/java/com/yeshi/fanli/job/UserCloudJob.java index 5f14f99..9544892 100644 --- a/fanli/src/main/java/com/yeshi/fanli/job/UserCloudJob.java +++ b/fanli/src/main/java/com/yeshi/fanli/job/UserCloudJob.java @@ -11,6 +11,8 @@ import com.yeshi.fanli.entity.bus.user.cloud.UserCloudOrder; import com.yeshi.fanli.entity.dynamic.GoodsEvaluate; +import com.yeshi.fanli.entity.dynamic.GoodsEvaluate.EvaluateEnum; +import com.yeshi.fanli.log.LogHelper; import com.yeshi.fanli.service.inter.dynamic.GoodsEvaluateService; import com.yeshi.fanli.service.inter.user.cloud.UserCloudOrderService; import com.yeshi.fanli.service.inter.user.cloud.UserCloudService; @@ -48,6 +50,7 @@ try { userCloudAlipayManager.tradeQueryByOrderId(cloudOrder.getId()); } catch (Exception e) { + LogHelper.errorDetailInfo(e); e.printStackTrace(); } } @@ -66,19 +69,15 @@ Calendar nowCalendar = Calendar.getInstance(); nowCalendar.setTimeInMillis(java.lang.System.currentTimeMillis()); int hour = nowCalendar.get(Calendar.HOUR_OF_DAY); - if (hour < 9 && hour > 21) + if (hour < 9 || hour > 21) return; - // 涓�涓皬鏃朵箣鍐呮渶鏂板彂鍦� - long rand = 1000 * 60 * 60; - long time = java.lang.System.currentTimeMillis() - rand; - Date lastTime = new Date(time); - - List<GoodsEvaluate> list = goodsEvaluateService.listByStartTime(lastTime); - if (list == null || list.size() == 0) - return; - - userCloudService.fixedTimeSend(list.get(0).getId()); + // 娲诲姩鍒楄〃 + List<GoodsEvaluate> listActivity = goodsEvaluateService.queryValidSortASC(1, 100, EvaluateEnum.activity, false); + // 鍗曞搧鍟嗗搧 + List<GoodsEvaluate> listGoods = goodsEvaluateService.queryValidSortASC(1, 5, EvaluateEnum.single, true); + // 鎵ц鍙戝崟 + userCloudService.fixedTimeSend(listActivity, listGoods); } } -- Gitblit v1.8.0