package com.yitianyigexiangfa.service.impl;

import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import com.yitianyigexiangfa.model.Programme;
import com.yitianyigexiangfa.spider.LjswSpider;

@Service
public class SentryService {
	
	@Autowired
	private LjswSpider ljsw;
	
	public Programme getLjsw(){
		return ljsw.getNewestLjsw();
	}
}

@@ -38,16 +38,40 @@
 .impl;%0A%0A
+import java.util.List;%0A%0A
 import o
@@ -173,16 +173,63 @@
 rvice;%0A%0A
+import com.yitianyigexiangfa.dao.ProgrammeDao;%0A
 import c
@@ -398,70 +398,448 @@
 w;%0A%09
-%0A%09public Programme getLjsw()%7B%0A%09%09return ljsw.getNewestLjsw();%0A%09%7D
+@Autowired%0A%09private ProgrammeDao programmeDao;%0A%09%0A%09%0A%09// spider here%0A%09public Programme getLjsw()%7B%0A%09%09return ljsw.getNewestLjsw();%0A%09%7D%0A%09%0A%09// email here%0A%09public void sendEmail()%7B%0A%09%09System.out.println(%22%E5%8F%91%E9%80%81%E4%B8%80%E5%B0%81%E9%82%AE%E4%BB%B6%22);%0A%09%7D%0A%09%0A%09// timer task here%0A%09%0A%09// crud%0A%09public void addProgramme(Programme pro)%7B%0A%09%09programmeDao.insertProgramme(pro);%0A%09%7D%0A%09%0A%09public List%3CProgramme%3E getProgrammeByPrimaryKey(int vol)%7B%0A%09%09return programmeDao.getProgrammeByPrimaryKey(vol);%0A%09%7D%0A%09
 %0A%7D%0A

update service