| 
					
				 | 
			
			
				@@ -12,6 +12,7 @@ import com.tzld.piaoquan.wecom.model.po.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.piaoquan.wecom.service.AccessTokenService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.piaoquan.wecom.service.HistoryMessageService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.piaoquan.wecom.service.MessageAttachmentService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+import com.tzld.piaoquan.wecom.service.UserService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.piaoquan.wecom.utils.*; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.tzld.piaoquan.wecom.utils.page.Page; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				 import com.xxl.job.core.biz.model.ReturnT; 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -56,6 +57,9 @@ public class WeComHistoryDataJob1 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     private StaffWithUserMapper staffWithUserMapper; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    @Autowired 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+    private UserService userService; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+ 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				  
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     @XxlJob("saveHistoryMessageJob1") 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				     public ReturnT<String> selectHistoryMessageByDay(String param) { 
			 | 
		
	
	
		
			
				| 
					
				 | 
			
			
				@@ -289,15 +293,7 @@ public class WeComHistoryDataJob1 { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 historyMessage.setCreateTime(new Date(createTime * 1000)); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 historyMessageList.add(historyMessage); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 if (status == 2) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    StaffWithUserExample example = new StaffWithUserExample(); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    example.createCriteria().andUserIdEqualTo(userId).andStaffIdEqualTo(staff.getId()); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    List<StaffWithUser> staffWithUserList = staffWithUserMapper.selectByExample(example); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    if (CollectionUtils.isEmpty(staffWithUserList)) { 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                        continue; 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    StaffWithUser staffWithUser = staffWithUserList.get(0); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    staffWithUser.setIsDelete(1); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				-                    staffWithUserMapper.updateByPrimaryKeySelective(staffWithUser); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				+                    userService.delStaffWithUser(userId, staff.getId(), createTime); 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				                 } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				             } 
			 | 
		
	
		
			
				 | 
				 | 
			
			
				         } 
			 |