| 
														
															@@ -8,6 +8,9 @@ import cn.hutool.core.util.ObjectUtil; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.alibaba.fastjson.JSON; 
														 | 
														
														 | 
														
															 import com.alibaba.fastjson.JSON; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.common.core.domain.R; 
														 | 
														
														 | 
														
															 import com.fs.common.core.domain.R; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.common.utils.DateUtils; 
														 | 
														
														 | 
														
															 import com.fs.common.utils.DateUtils; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.fs.store.cache.IFsUserCacheService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.fs.store.cache.impl.IFsStoreOrderCacheServiceImpl; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.fs.store.cache.impl.IFsUserCacheServiceImpl; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.store.domain.*; 
														 | 
														
														 | 
														
															 import com.fs.store.domain.*; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.store.dto.TemplateMessageSendRequestDTO; 
														 | 
														
														 | 
														
															 import com.fs.store.dto.TemplateMessageSendRequestDTO; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.store.enums.IcgProcessStatusEnum; 
														 | 
														
														 | 
														
															 import com.fs.store.enums.IcgProcessStatusEnum; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -18,6 +21,7 @@ import com.fs.store.param.FsStoreCouponReceiveParam; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.store.service.IFsCouponScheduleService; 
														 | 
														
														 | 
														
															 import com.fs.store.service.IFsCouponScheduleService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.fs.store.service.IFsStoreCouponIssueService; 
														 | 
														
														 | 
														
															 import com.fs.store.service.IFsStoreCouponIssueService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import com.github.pagehelper.util.StringUtil; 
														 | 
														
														 | 
														
															 import com.github.pagehelper.util.StringUtil; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+import com.hc.openapi.tool.util.StringUtils; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import lombok.RequiredArgsConstructor; 
														 | 
														
														 | 
														
															 import lombok.RequiredArgsConstructor; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import lombok.extern.slf4j.Slf4j; 
														 | 
														
														 | 
														
															 import lombok.extern.slf4j.Slf4j; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 import org.apache.commons.collections4.CollectionUtils; 
														 | 
														
														 | 
														
															 import org.apache.commons.collections4.CollectionUtils; 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -73,6 +77,8 @@ public class FsCouponScheduleServiceImpl implements IFsCouponScheduleService 
														 | 
													
												
											
												
													
														| 
														 | 
														
															      */ 
														 | 
														
														 | 
														
															      */ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 //    private final String WX_MINI_APP_NOTIFY_TEMPLATE_ID = "5ZSzz2nPmJo9EuenZa78mQPScoOMc84LnEfEpV0-i04"; 
														 | 
														
														 | 
														
															 //    private final String WX_MINI_APP_NOTIFY_TEMPLATE_ID = "5ZSzz2nPmJo9EuenZa78mQPScoOMc84LnEfEpV0-i04"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     private final String WX_MINI_APP_NOTIFY_TEMPLATE_ID = "K0RUbGggwYz7V4yjtJjFVXtthnx4hOJgHvr7RNOyRSE"; 
														 | 
														
														 | 
														
															     private final String WX_MINI_APP_NOTIFY_TEMPLATE_ID = "K0RUbGggwYz7V4yjtJjFVXtthnx4hOJgHvr7RNOyRSE"; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private final IFsStoreOrderCacheServiceImpl fsStoreOrderCacheService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+    private final IFsUserCacheServiceImpl IFsUserCacheService; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     /** 
														 | 
														
														 | 
														
															     /** 
														 | 
													
												
											
												
													
														| 
														 | 
														
															      * 查询定时发放优惠券队列 
														 | 
														
														 | 
														
															      * 查询定时发放优惠券队列 
														 | 
													
												
											
										
											
												
													
														 | 
														
															@@ -110,7 +116,33 @@ public class FsCouponScheduleServiceImpl implements IFsCouponScheduleService 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     @Override 
														 | 
														
														 | 
														
															     @Override 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     public List<FsCouponSchedule> selectFsCouponScheduleList(FsCouponSchedule fsCouponSchedule) 
														 | 
														
														 | 
														
															     public List<FsCouponSchedule> selectFsCouponScheduleList(FsCouponSchedule fsCouponSchedule) 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     { 
														 | 
														
														 | 
														
															     { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															-        return fsCouponScheduleMapper.selectFsCouponScheduleList(fsCouponSchedule); 
														 | 
														
														 | 
														
															 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        if(StringUtils.isNotBlank(fsCouponSchedule.getOrderCode())){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            FsStoreOrder fsStoreOrder = fsStoreOrderCacheService.selectFsStoreOrderByOrderCode(fsCouponSchedule.getOrderCode()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if(ObjectUtil.isNotNull(fsStoreOrder)){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                fsCouponSchedule.setOrderId(fsStoreOrder.getId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } else { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                fsCouponSchedule.setOrderId(-1L); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        List<FsCouponSchedule> list = fsCouponScheduleMapper.selectFsCouponScheduleList(fsCouponSchedule); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        for (FsCouponSchedule couponSchedule : list) { 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if(ObjectUtil.isNotNull(couponSchedule.getOrderId())){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                FsStoreOrder fsStoreOrder = fsStoreOrderCacheService.selectFsStoreOrderById(couponSchedule.getOrderId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if(ObjectUtil.isNotNull(fsStoreOrder)){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    couponSchedule.setOrderCode(fsStoreOrder.getOrderCode()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            if(ObjectUtil.isNotNull(couponSchedule.getUserId())){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                FsUser fsUser = IFsUserCacheService.selectFsUserById(couponSchedule.getUserId()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                if(ObjectUtil.isNotNull(fsUser)){ 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                    couponSchedule.setUserName(fsUser.getUsername()); 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+                } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+            } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															 
														 | 
														
														 | 
														
															+        return list; 
														 | 
													
												
											
												
													
														| 
														 | 
														
															     } 
														 | 
														
														 | 
														
															     } 
														 | 
													
												
											
												
													
														| 
														 | 
														
															  
														 | 
														
														 | 
														
															  
														 | 
													
												
											
												
													
														| 
														 | 
														
															     /** 
														 | 
														
														 | 
														
															     /** 
														 |