正在显示
93 个修改的文件
包含
4745 行增加
和
0 行删除
.svn/entries
0 → 100644
1 | +12 |
.svn/format
0 → 100644
1 | +12 |
1 | +package yxy.timer.dao; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.pojo.YxyReplyInfo; | ||
6 | +/** | ||
7 | + * | ||
8 | + * @author xieyong | ||
9 | + * 回复DAO接口 | ||
10 | + */ | ||
11 | +public interface YxyReplyInfoDao { | ||
12 | + /**实体插入*/ | ||
13 | + public int addPojo(YxyReplyInfo reply)throws Exception; | ||
14 | + /**查询指定量数据*/ | ||
15 | + public List<YxyReplyInfo> findByHqlSet(String hql,int num)throws Exception; | ||
16 | + /**统计条数*/ | ||
17 | + public int count(String hql)throws Exception; | ||
18 | + /**根据sql查询*/ | ||
19 | + public List<Object> findBySql(String sql)throws Exception; | ||
20 | + /**hql更新*/ | ||
21 | + public void updateByHql(String hql)throws Exception; | ||
22 | +} |
1 | +package yxy.timer.dao.impl; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.List; | ||
5 | + | ||
6 | +import org.hibernate.Query; | ||
7 | +import org.hibernate.Session; | ||
8 | +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; | ||
9 | + | ||
10 | +import yxy.timer.dao.HibernateBaseDAO; | ||
11 | + | ||
12 | +public abstract class SaleHibernateBaseDAOImpl<T extends Serializable ,Pk extends Serializable> extends HibernateDaoSupport | ||
13 | + implements HibernateBaseDAO<T, Pk> | ||
14 | +{ | ||
15 | + //------------------------------常用CRUD操作----------------------------------------- | ||
16 | + | ||
17 | + /**增加记录 (返回新增加记录的主键)*/ | ||
18 | + public int add(T o) throws Exception { | ||
19 | + return (Integer) super.getHibernateTemplate().save(o); | ||
20 | + | ||
21 | + } | ||
22 | + | ||
23 | + /**增加记录(无返回�?)*/ | ||
24 | + public void adddate(T o) throws Exception | ||
25 | + { | ||
26 | + super.getHibernateTemplate().save(o); | ||
27 | + } | ||
28 | + | ||
29 | + /**修改记录*/ | ||
30 | + public void update(T o) throws Exception { | ||
31 | + super.getHibernateTemplate().update(o); | ||
32 | + } | ||
33 | + /**删除记录*/ | ||
34 | + public void del(T o) throws Exception { | ||
35 | + super.getHibernateTemplate().delete(o); | ||
36 | + } | ||
37 | + | ||
38 | + /**添加或更改*/ | ||
39 | + public void saveOrUpdate(T o) throws Exception { | ||
40 | + super.getHibernateTemplate().saveOrUpdate(o); | ||
41 | + } | ||
42 | + /**根据ID获取�?��数据*/ | ||
43 | + @SuppressWarnings("unchecked") | ||
44 | + public T get(Class<T> t,Pk pk) throws Exception { | ||
45 | + return (T) super.getHibernateTemplate().get(t, pk); | ||
46 | + } | ||
47 | + /**根据ID获取�?��数据*/ | ||
48 | + @SuppressWarnings("unchecked") | ||
49 | + public T load(Class<T> t,Pk pk) throws Exception { | ||
50 | + return (T) super.getHibernateTemplate().load(t, pk); | ||
51 | + } | ||
52 | + /**根据hql进行条件查询*/ | ||
53 | + @SuppressWarnings("unchecked") | ||
54 | + public List<T> getAll(String hql) throws Exception { | ||
55 | + return super.getHibernateTemplate().find(hql); | ||
56 | + } | ||
57 | + /**条件查询*/ | ||
58 | + @SuppressWarnings("unchecked") | ||
59 | + public List<T> getAll(String whereHql, Object... params) throws Exception { | ||
60 | + return super.getHibernateTemplate().find(whereHql,params); | ||
61 | + } | ||
62 | + | ||
63 | + /**根据条件和参数查询�?记录*/ | ||
64 | + public int count(String hql, Object... params) throws Exception { | ||
65 | + return Integer.valueOf(super.getHibernateTemplate().find(hql,params).get(0).toString()); | ||
66 | + } | ||
67 | + /**根据条件查询总记录*/ | ||
68 | + public int count(String hql) throws Exception { | ||
69 | + List result=super.getHibernateTemplate().find(hql); | ||
70 | + if(result.size()>0&&result.get(0)!=null&&!result.get(0).equals("null")){ | ||
71 | + return Integer.valueOf(result.get(0).toString()); | ||
72 | + }else{ | ||
73 | + return 0; | ||
74 | + } | ||
75 | + //return Integer.valueOf(super.getHibernateTemplate().find(hql).get(0).toString()); | ||
76 | + } | ||
77 | + | ||
78 | + /**批量插入*/ | ||
79 | + public void addPi(List<T> o)throws Exception{ | ||
80 | + Session session =null; | ||
81 | + | ||
82 | + if(o!=null){ | ||
83 | + session=super.getHibernateTemplate().getSessionFactory().openSession(); | ||
84 | + session.beginTransaction(); | ||
85 | + for(int i=0;i<o.size();i++){ | ||
86 | + session.saveOrUpdate(o.get(i)); | ||
87 | + if(i%10==0){ | ||
88 | + session.flush(); | ||
89 | + session.clear(); | ||
90 | + } | ||
91 | + } | ||
92 | + session.getTransaction().commit(); | ||
93 | + } | ||
94 | + session.close(); | ||
95 | + | ||
96 | + } | ||
97 | + | ||
98 | + /**Hql语句修改删除记录*/ | ||
99 | + public int updateorDelByHql(String hql){ | ||
100 | + Query query = null; | ||
101 | + int result=0; | ||
102 | + Session session =null; | ||
103 | + try { | ||
104 | + session=super.getHibernateTemplate().getSessionFactory().openSession(); | ||
105 | + query = session.createQuery(hql); | ||
106 | + result = query.executeUpdate(); | ||
107 | + } catch (Exception e) { | ||
108 | + e.printStackTrace(); | ||
109 | + }finally{ | ||
110 | + if(session!=null){ | ||
111 | + session.clear(); | ||
112 | + session.close(); | ||
113 | + } | ||
114 | + } | ||
115 | + | ||
116 | + return result; | ||
117 | + } | ||
118 | + | ||
119 | + /**查询设定的记录条数据*/ | ||
120 | + public List<T> findBySet(String hql,int num){ | ||
121 | + Session session = null; | ||
122 | + Query query=null; | ||
123 | + try { | ||
124 | + session=super.getHibernateTemplate().getSessionFactory().openSession(); | ||
125 | + query = session.createQuery(hql); | ||
126 | + query.setMaxResults(num); | ||
127 | + return query.list(); | ||
128 | + } catch (Exception e) { | ||
129 | + e.printStackTrace(); | ||
130 | + }finally{ | ||
131 | + if(session!=null){ | ||
132 | + session.clear(); | ||
133 | + session.close(); | ||
134 | + } | ||
135 | + } | ||
136 | + return null; | ||
137 | + } | ||
138 | + | ||
139 | + /**sql语句查询*/ | ||
140 | + public List findBySql(String sql) throws Exception{ | ||
141 | + Session session=null; | ||
142 | + try { | ||
143 | + session =super.getHibernateTemplate().getSessionFactory(). | ||
144 | + openSession(); | ||
145 | + return session.createSQLQuery(sql).list(); | ||
146 | + } catch (Exception e) { | ||
147 | + e.printStackTrace(); | ||
148 | + }finally{ | ||
149 | + if(session!=null){ | ||
150 | + session.clear(); | ||
151 | + session.close(); | ||
152 | + } | ||
153 | + } | ||
154 | + return null; | ||
155 | + } | ||
156 | + | ||
157 | + /**sql语句修改删除记录*/ | ||
158 | + public int updateorDelSql(String sql){ | ||
159 | + Query query = null; | ||
160 | + int result=0; | ||
161 | + Session session =null; | ||
162 | + try { | ||
163 | + session=super.getHibernateTemplate().getSessionFactory().openSession(); | ||
164 | + query = session.createSQLQuery(sql); | ||
165 | + result = query.executeUpdate(); | ||
166 | + } catch (Exception e) { | ||
167 | + e.printStackTrace(); | ||
168 | + }finally{ | ||
169 | + if(session!=null){ | ||
170 | + session.clear(); | ||
171 | + session.close(); | ||
172 | + } | ||
173 | + } | ||
174 | + | ||
175 | + return result; | ||
176 | + } | ||
177 | +} |
不能预览此文件类型
1 | +package yxy.timer.dao.impl; | ||
2 | +import java.util.List; | ||
3 | +import yxy.timer.dao.YxyUnsubscribeInfoSaleDao; | ||
4 | +import yxy.timer.sale.YxyUnsubscribeInfo; | ||
5 | +public class YxyUnsubscribeInfoSaleDaoImpl extends SaleHibernateBaseDAOImpl<YxyUnsubscribeInfo, Long> implements YxyUnsubscribeInfoSaleDao{ | ||
6 | + /**HQL查询*/ | ||
7 | + public List<YxyUnsubscribeInfo> findByHql(String hql) throws Exception { | ||
8 | + return super.getAll(hql); | ||
9 | + } | ||
10 | + /**查询指定量数据*/ | ||
11 | + public List<YxyUnsubscribeInfo> findByHqlSet(String hql,int num)throws Exception{ | ||
12 | + return super.findBySet(hql, num); | ||
13 | + } | ||
14 | + /**批量插入退订信息*/ | ||
15 | + public void insertUnPi(List<YxyUnsubscribeInfo> o) throws Exception { | ||
16 | + super.addPi(o); | ||
17 | + } | ||
18 | + /**sql查询*/ | ||
19 | + public List<Object> findBySql(String sql) throws Exception | ||
20 | + { | ||
21 | + return super.findBySql(sql); | ||
22 | + } | ||
23 | + /**HQL更新*/ | ||
24 | + public void updateByHql(String hql)throws Exception | ||
25 | + { | ||
26 | + super.updateorDelByHql(hql); | ||
27 | + } | ||
28 | + public int insertUn(YxyUnsubscribeInfo o)throws Exception{ | ||
29 | + return super.add(o); | ||
30 | + } | ||
31 | + | ||
32 | + public int findByHqlCount(String hql)throws Exception{ | ||
33 | + return super.count(hql); | ||
34 | + } | ||
35 | +} |
1 | +package yxy.timer.service.impl; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.dao.YxySendMailMasterDao; | ||
6 | +import yxy.timer.pojo.YxySendMailMaster; | ||
7 | +import yxy.timer.service.YxySendMailMasterService; | ||
8 | + | ||
9 | +public class YxySendMailMasterServiceImpl implements YxySendMailMasterService{ | ||
10 | + | ||
11 | + //查询正在使用的邮件 | ||
12 | + public List<YxySendMailMaster> findByStatus() throws Exception { | ||
13 | + | ||
14 | + String hql="from YxySendMailMaster where isuse=1"; | ||
15 | + return yxysendmailmasterdao.findByHql(hql); | ||
16 | + } | ||
17 | + //批量更新 | ||
18 | + public void updateMaster(List<YxySendMailMaster> o) throws Exception { | ||
19 | + yxysendmailmasterdao.updateByMaster(o); | ||
20 | + } | ||
21 | + //sql查询 | ||
22 | + public List<Object> findbysql(String sql)throws Exception{ | ||
23 | + return yxysendmailmasterdao.findbysql(sql); | ||
24 | + } | ||
25 | + //sql更新 | ||
26 | + public void updatebysql(String sql)throws Exception{ | ||
27 | + yxysendmailmasterdao.updatebysql(sql); | ||
28 | + } | ||
29 | + private YxySendMailMasterDao yxysendmailmasterdao;//邮件待发dao | ||
30 | + | ||
31 | + public YxySendMailMasterDao getYxysendmailmasterdao() { | ||
32 | + return yxysendmailmasterdao; | ||
33 | + } | ||
34 | + | ||
35 | + public void setYxysendmailmasterdao(YxySendMailMasterDao yxysendmailmasterdao) { | ||
36 | + this.yxysendmailmasterdao = yxysendmailmasterdao; | ||
37 | + } | ||
38 | + | ||
39 | + | ||
40 | +} |
1 | +package yxy.timer.dao.impl; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.dao.YxyReadDao; | ||
6 | +import yxy.timer.pojo.YxyReadingInfo; | ||
7 | + | ||
8 | +/* | ||
9 | + * 点读DAO实现类 | ||
10 | + */ | ||
11 | +public class YxyReadDaoImpl extends HibernateBaseDAOImpl<YxyReadingInfo, Long> implements YxyReadDao | ||
12 | +{ | ||
13 | + /**HQL查询*/ | ||
14 | + public List<YxyReadingInfo> findByHql(String hql) throws Exception | ||
15 | + { | ||
16 | + return super.getAll(hql); | ||
17 | + } | ||
18 | + /**批量插入*/ | ||
19 | + public void insertReadPi(List<YxyReadingInfo> o) throws Exception { | ||
20 | + super.addPi(o); | ||
21 | + } | ||
22 | + /**HQL查询指定条数据*/ | ||
23 | + public List findByHqlNum(String hql) throws Exception | ||
24 | + { | ||
25 | + return super.findBySet(hql, 1000); | ||
26 | + } | ||
27 | + /**sql查询*/ | ||
28 | + public List<Object> findBySql(String sql) throws Exception | ||
29 | + { | ||
30 | + return super.findBySql(sql); | ||
31 | + } | ||
32 | + | ||
33 | + /**sql更新*/ | ||
34 | + public void updateSql(String sql) throws Exception{ | ||
35 | + super.updateorDelSql(sql); | ||
36 | + } | ||
37 | + | ||
38 | + /**HQL更新*/ | ||
39 | + public void updateByHql(String hql)throws Exception | ||
40 | + { | ||
41 | + super.updateorDelByHql(hql); | ||
42 | + } | ||
43 | + /**批量插入*/ | ||
44 | + public int insertRead(YxyReadingInfo o)throws Exception{ | ||
45 | + return super.add(o); | ||
46 | + } | ||
47 | + | ||
48 | + public int findByHqlCount(String hql)throws Exception{ | ||
49 | + return super.count(hql); | ||
50 | + } | ||
51 | +} |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<projectDescription> | ||
3 | + <name>yxyTimerService</name> | ||
4 | + <comment></comment> | ||
5 | + <projects> | ||
6 | + </projects> | ||
7 | + <buildSpec> | ||
8 | + <buildCommand> | ||
9 | + <name>org.eclipse.wst.jsdt.core.javascriptValidator</name> | ||
10 | + <arguments> | ||
11 | + </arguments> | ||
12 | + </buildCommand> | ||
13 | + <buildCommand> | ||
14 | + <name>com.genuitec.eclipse.j2eedt.core.WebClasspathBuilder</name> | ||
15 | + <arguments> | ||
16 | + </arguments> | ||
17 | + </buildCommand> | ||
18 | + <buildCommand> | ||
19 | + <name>org.eclipse.jdt.core.javabuilder</name> | ||
20 | + <arguments> | ||
21 | + </arguments> | ||
22 | + </buildCommand> | ||
23 | + <buildCommand> | ||
24 | + <name>com.genuitec.eclipse.j2eedt.core.J2EEProjectValidator</name> | ||
25 | + <arguments> | ||
26 | + </arguments> | ||
27 | + </buildCommand> | ||
28 | + <buildCommand> | ||
29 | + <name>com.genuitec.eclipse.j2eedt.core.DeploymentDescriptorValidator</name> | ||
30 | + <arguments> | ||
31 | + </arguments> | ||
32 | + </buildCommand> | ||
33 | + <buildCommand> | ||
34 | + <name>org.eclipse.wst.validation.validationbuilder</name> | ||
35 | + <arguments> | ||
36 | + </arguments> | ||
37 | + </buildCommand> | ||
38 | + <buildCommand> | ||
39 | + <name>com.genuitec.eclipse.ast.deploy.core.DeploymentBuilder</name> | ||
40 | + <arguments> | ||
41 | + </arguments> | ||
42 | + </buildCommand> | ||
43 | + </buildSpec> | ||
44 | + <natures> | ||
45 | + <nature>com.genuitec.eclipse.ast.deploy.core.deploymentnature</nature> | ||
46 | + <nature>com.genuitec.eclipse.j2eedt.core.webnature</nature> | ||
47 | + <nature>org.eclipse.jdt.core.javanature</nature> | ||
48 | + <nature>org.eclipse.wst.jsdt.core.jsNature</nature> | ||
49 | + </natures> | ||
50 | +</projectDescription> |
1 | +package yxy.timer.method; | ||
2 | +import java.sql.Connection; | ||
3 | +import java.sql.PreparedStatement; | ||
4 | +import java.sql.ResultSet; | ||
5 | + | ||
6 | +import yxy.timer.service.YxyReadService; | ||
7 | +import yxy.timer.tool.DBUtil; | ||
8 | +import yxy.timer.tool.UserAgentUtil; | ||
9 | +import yxy.timer.tool.getArea; | ||
10 | + | ||
11 | +/*** | ||
12 | + * | ||
13 | + * @author 谢勇 | ||
14 | + * 获取远程退订信息 | ||
15 | + */ | ||
16 | + | ||
17 | +public class GetUnTimer { | ||
18 | + private boolean isRun = false; //判断定时器是否在运行 默认false | ||
19 | + private Connection conn; | ||
20 | + private ResultSet rs; | ||
21 | + private PreparedStatement pst; | ||
22 | + | ||
23 | + /**获取远程退订信息*/ | ||
24 | + public void getUnTimerMethod(){ | ||
25 | + try { | ||
26 | + if(!isRun) | ||
27 | + { | ||
28 | + System.out.println("正在从远程获取退订信息..."); | ||
29 | + isRun = true;//在运行 | ||
30 | + conn = DBUtil.getConnection("clickdataSource"); | ||
31 | + String sql = "select yxy_unsubscribe_id,yxy_unsubscribe_loginid,yxy_unsubscribe_domain," + | ||
32 | + "yxy_unsubscribe_mail_uid,yxy_unsubscribe_date,yxy_unsubscribe_body," + | ||
33 | + "yxy_unsubscribe_email,yxy_unsubscribe_ip,yxy_unsubscribe_agent " + | ||
34 | + "from yxy_unsubscribe_info where yxy_unsubscribe_issyn = 0 limit 200"; | ||
35 | + pst = conn.prepareStatement(sql); | ||
36 | + rs = pst.executeQuery(); | ||
37 | + while(rs.next()){ | ||
38 | + int yxy_unsubscribe_id = rs.getInt("yxy_unsubscribe_id"); | ||
39 | + String yxy_unsubscribe_loginid = rs.getString("yxy_unsubscribe_loginid"); | ||
40 | + String yxy_unsubscribe_domain = rs.getString("yxy_unsubscribe_domain"); | ||
41 | + String yxy_unsubscribe_mail_uid = rs.getString("yxy_unsubscribe_mail_uid"); | ||
42 | + String yxy_unsubscribe_date = rs.getString("yxy_unsubscribe_date"); | ||
43 | + String yxy_unsubscribe_body = rs.getString("yxy_unsubscribe_body"); | ||
44 | + String yxy_unsubscribe_email = rs.getString("yxy_unsubscribe_email"); | ||
45 | + String yxy_unsubscribe_ip = rs.getString("yxy_unsubscribe_ip"); | ||
46 | + String yxy_unsubscribe_agent = rs.getString("yxy_unsubscribe_agent"); | ||
47 | + if(yxy_unsubscribe_mail_uid!=null&&yxy_unsubscribe_email!=null){ | ||
48 | + if("sale100.com".equals(yxy_unsubscribe_domain)){//个人版的营销邮 | ||
49 | + //查询本地库是否存在了 | ||
50 | + String hql="select count(*) from YxyUnsubscribeInfo where unsubscribe_mail_uid='"+yxy_unsubscribe_mail_uid+"' and unsubscribe_email='"+yxy_unsubscribe_email+"'"; | ||
51 | + int counts=yxyreadservice.findisRecode2(hql); | ||
52 | + if(counts==0){//未同步 | ||
53 | + yxy.timer.sale.YxyMailNumCountInfo count = yxyreadservice.getYxyMailNumCount2(yxy_unsubscribe_mail_uid); | ||
54 | + if(count == null){//添加 | ||
55 | + count = new yxy.timer.sale.YxyMailNumCountInfo(); | ||
56 | + count.setId(0); | ||
57 | + count.setMail_uid(yxy_unsubscribe_mail_uid); | ||
58 | + count.setUnsub_person(1); | ||
59 | + }else{//编辑 | ||
60 | + count.setUnsub_person(count.getUnsub_person()+1); | ||
61 | + } | ||
62 | + //获取ip所属地区 | ||
63 | + String area = "未知"; | ||
64 | + if(yxy_unsubscribe_ip!=null&&!"".equals(yxy_unsubscribe_ip)&&!"unknown".equals(yxy_unsubscribe_ip)){ | ||
65 | + area = getArea.getArea(yxy_unsubscribe_ip); | ||
66 | + } | ||
67 | + yxy.timer.sale.YxyUnsubscribeInfo unsub = new yxy.timer.sale.YxyUnsubscribeInfo(); | ||
68 | + unsub.setUnsubscribe_loginid(yxy_unsubscribe_loginid); | ||
69 | + unsub.setUnsubscribe_domain(yxy_unsubscribe_domain); | ||
70 | + unsub.setUnsubscribe_mail_uid(yxy_unsubscribe_mail_uid); | ||
71 | + unsub.setUnsubscribe_date(yxy_unsubscribe_date); | ||
72 | + unsub.setUnsubscribe_body(yxy_unsubscribe_body); | ||
73 | + unsub.setUnsubscribe_email(yxy_unsubscribe_email); | ||
74 | + unsub.setIp(yxy_unsubscribe_ip); | ||
75 | + unsub.setArea(area); | ||
76 | + unsub.setUser_agent(yxy_unsubscribe_agent); | ||
77 | + unsub.setUser_agent_info(UserAgentUtil.parseUserAgent(yxy_unsubscribe_agent)); | ||
78 | + String yxy_unsubscribe_date2 = yxy_unsubscribe_date.split(" ")[0]; | ||
79 | + int unsubscribe_year = Integer.parseInt(yxy_unsubscribe_date2.split("-")[0]); | ||
80 | + int unsubscribe_month = Integer.parseInt(yxy_unsubscribe_date2.split("-")[1]); | ||
81 | + int unsubscribe_day = Integer.parseInt(yxy_unsubscribe_date2.split("-")[2]); | ||
82 | + unsub.setUnsubscribe_year(unsubscribe_year); | ||
83 | + unsub.setUnsubscribe_month(unsubscribe_month); | ||
84 | + unsub.setUnsubscribe_day(unsubscribe_day); | ||
85 | + //添加退订信息 | ||
86 | + yxyreadservice.insertUn2(unsub); | ||
87 | + //添加邮件对应的数量统计 | ||
88 | + yxyreadservice.addEditYxyMailNumCount2(count); | ||
89 | + } | ||
90 | + }else{//自己的营销邮 | ||
91 | + //查询本地库是否存在了 | ||
92 | + String hql="select count(*) from YxyUnsubscribeInfo where unsubscribe_mail_uid='"+yxy_unsubscribe_mail_uid+"' and unsubscribe_email='"+yxy_unsubscribe_email+"'"; | ||
93 | + int counts=yxyreadservice.findisRecode(hql); | ||
94 | + if(counts==0){//未同步 | ||
95 | + yxy.timer.pojo.YxyMailNumCount count = yxyreadservice.getYxyMailNumCount(yxy_unsubscribe_mail_uid); | ||
96 | + if(count == null){//添加 | ||
97 | + count = new yxy.timer.pojo.YxyMailNumCount(); | ||
98 | + count.setId(0); | ||
99 | + count.setMail_uid(yxy_unsubscribe_mail_uid); | ||
100 | + count.setUnsub_person(1); | ||
101 | + }else{//编辑 | ||
102 | + count.setUnsub_person(count.getUnsub_person()+1); | ||
103 | + } | ||
104 | + //获取ip所属地区 | ||
105 | + String area = "未知"; | ||
106 | + if(yxy_unsubscribe_ip!=null&&!"".equals(yxy_unsubscribe_ip)&&!"unknown".equals(yxy_unsubscribe_ip)){ | ||
107 | + area = getArea.getArea(yxy_unsubscribe_ip); | ||
108 | + } | ||
109 | + yxy.timer.pojo.YxyUnsubscribeInfo unsub = new yxy.timer.pojo.YxyUnsubscribeInfo(); | ||
110 | + unsub.setUnsubscribe_loginid(yxy_unsubscribe_loginid); | ||
111 | + unsub.setUnsubscribe_domain(yxy_unsubscribe_domain); | ||
112 | + unsub.setUnsubscribe_mail_uid(yxy_unsubscribe_mail_uid); | ||
113 | + unsub.setUnsubscribe_date(yxy_unsubscribe_date); | ||
114 | + unsub.setUnsubscribe_body(yxy_unsubscribe_body); | ||
115 | + unsub.setUnsubscribe_email(yxy_unsubscribe_email); | ||
116 | + unsub.setIp(yxy_unsubscribe_ip); | ||
117 | + unsub.setArea(area); | ||
118 | + unsub.setUser_agent(yxy_unsubscribe_agent); | ||
119 | + unsub.setUser_agent_info(UserAgentUtil.parseUserAgent(yxy_unsubscribe_agent)); | ||
120 | + String yxy_unsubscribe_date2 = yxy_unsubscribe_date.split(" ")[0]; | ||
121 | + int unsubscribe_year = Integer.parseInt(yxy_unsubscribe_date2.split("-")[0]); | ||
122 | + int unsubscribe_month = Integer.parseInt(yxy_unsubscribe_date2.split("-")[1]); | ||
123 | + int unsubscribe_day = Integer.parseInt(yxy_unsubscribe_date2.split("-")[2]); | ||
124 | + unsub.setUnsubscribe_year(unsubscribe_year); | ||
125 | + unsub.setUnsubscribe_month(unsubscribe_month); | ||
126 | + unsub.setUnsubscribe_day(unsubscribe_day); | ||
127 | + //添加退订信息 | ||
128 | + yxyreadservice.insertUn(unsub); | ||
129 | + //添加邮件对应的数量统计 | ||
130 | + yxyreadservice.addEditYxyMailNumCount(count); | ||
131 | + } | ||
132 | + } | ||
133 | + } | ||
134 | + //更新远程 | ||
135 | + conn.setAutoCommit(false); | ||
136 | + String updatesql="update yxy_unsubscribe_info set yxy_unsubscribe_issyn=1 where yxy_unsubscribe_id="+yxy_unsubscribe_id; | ||
137 | + pst = conn.prepareStatement(updatesql); | ||
138 | + pst.executeUpdate(); | ||
139 | + conn.commit(); | ||
140 | + System.out.println("邮件退订量处理中..."); | ||
141 | + } | ||
142 | + } | ||
143 | + System.out.println("正常结束从远程获取退订信息"); | ||
144 | + } catch (Exception e) { | ||
145 | + e.printStackTrace(); | ||
146 | + System.out.println("异常从远处获取退订信息"); | ||
147 | + }finally{ | ||
148 | + DBUtil.close(rs, pst, conn); | ||
149 | + isRun = false;//更改状态为非执行 | ||
150 | + } | ||
151 | + | ||
152 | + } | ||
153 | + private YxyReadService yxyreadservice;//点读service | ||
154 | + public YxyReadService getYxyreadservice() { | ||
155 | + return yxyreadservice; | ||
156 | + } | ||
157 | + public void setYxyreadservice(YxyReadService yxyreadservice) { | ||
158 | + this.yxyreadservice = yxyreadservice; | ||
159 | + } | ||
160 | +} |
1 | +package yxy.timer.service; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | +import java.util.Map; | ||
5 | + | ||
6 | +/** | ||
7 | + * 程序名称: EspeedMail_时速邮箱 | ||
8 | + * 程序版本: V1.0 | ||
9 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
10 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
11 | + * 技术支持: Tech@21gmail.com | ||
12 | + * 单元名称: 控制参数Service(营销游) | ||
13 | + * 开始时间: 2013.12.09 | ||
14 | + * 程 序 员: 谢勇 | ||
15 | + * 最后修改: | ||
16 | + * 备 注: 如需修改请通知程序员 | ||
17 | + */ | ||
18 | +public interface YxySysParamaterService { | ||
19 | + | ||
20 | + /**通过级别查询控制参数*/ | ||
21 | + public Map<String,String> findParamaterByLevel(int level,String loginid,String domain)throws Exception; | ||
22 | + | ||
23 | + /**通过code查询控制参数,如果用户参数不存在则查企业控制参数,企业控制参数不存在则查询企业默认参数(用户级)*/ | ||
24 | + public String findUserParamValue(String loginid,String domain,String usercode,String syscode)throws Exception; | ||
25 | + | ||
26 | + /**查询用户总分配量*/ | ||
27 | + public int findTolFenPeiCount(String loginid,String domain)throws Exception; | ||
28 | +} |
1 | +package yxy.timer.dao; | ||
2 | +import java.util.List; | ||
3 | +import yxy.timer.sale.YxyLinkInfo; | ||
4 | +public interface YxyLinkInfoSaleDao { | ||
5 | + /**实体插入*/ | ||
6 | + public int addPojo(YxyLinkInfo link)throws Exception; | ||
7 | + /**查询指定量数据*/ | ||
8 | + public List<YxyLinkInfo> findByHqlSet(String hql,int num)throws Exception; | ||
9 | + /**统计条数*/ | ||
10 | + public int count(String hql)throws Exception; | ||
11 | + /**根据sql查询*/ | ||
12 | + public List<Object> findBySql(String sql)throws Exception; | ||
13 | + /**hql更新*/ | ||
14 | + public void updateByHql(String hql)throws Exception; | ||
15 | + /**实体编辑*/ | ||
16 | + public void updatePojo(YxyLinkInfo link)throws Exception; | ||
17 | +} |
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.GeneratedValue; | ||
7 | +import javax.persistence.GenerationType; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Table; | ||
10 | + | ||
11 | +@Entity | ||
12 | +@Table(name="yxy_send_mail_master") | ||
13 | +public class YxySendMailMaster implements Serializable{ | ||
14 | + | ||
15 | + private int send_mail_id;//发送邮件ID | ||
16 | + private String result_remark;//发送情况摘要 | ||
17 | + private int isuse;//是否使用中 | ||
18 | + | ||
19 | + @Id | ||
20 | + @GeneratedValue(strategy=GenerationType.AUTO) | ||
21 | + public int getSend_mail_id() { | ||
22 | + return send_mail_id; | ||
23 | + } | ||
24 | + public void setSend_mail_id(int sendMailId) { | ||
25 | + send_mail_id = sendMailId; | ||
26 | + } | ||
27 | + public String getResult_remark() { | ||
28 | + return result_remark; | ||
29 | + } | ||
30 | + public void setResult_remark(String resultRemark) { | ||
31 | + result_remark = resultRemark; | ||
32 | + } | ||
33 | + public int getIsuse() { | ||
34 | + return isuse; | ||
35 | + } | ||
36 | + public void setIsuse(int isuse) { | ||
37 | + this.isuse = isuse; | ||
38 | + } | ||
39 | + | ||
40 | +} |
不能预览此文件类型
1 | +package yxy.timer.service.impl; | ||
2 | + | ||
3 | +import java.util.HashMap; | ||
4 | +import java.util.List; | ||
5 | +import java.util.Map; | ||
6 | + | ||
7 | +import yxy.timer.dao.YxySysParamaterDao; | ||
8 | +import yxy.timer.dao.YxySysParamatersValueDao; | ||
9 | +import yxy.timer.pojo.YxySysParamaters; | ||
10 | +import yxy.timer.pojo.YxySysParamatersValue; | ||
11 | +import yxy.timer.service.YxySysParamaterService; | ||
12 | +/** | ||
13 | + * 程序名称: EspeedMail_时速邮箱 | ||
14 | + * 程序版本: V1.0 | ||
15 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
16 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
17 | + * 技术支持: Tech@21gmail.com | ||
18 | + * 单元名称: 控制参数Service实现类(营销游) | ||
19 | + * 开始时间: 2013.12.09 | ||
20 | + * 程 序 员: 谢勇 | ||
21 | + * 最后修改: | ||
22 | + * 备 注: 如需修改请通知程序员 | ||
23 | + */ | ||
24 | +public class YxySysParamaterServiceImpl implements YxySysParamaterService{ | ||
25 | + | ||
26 | + /**通过level查询控制参数*/ | ||
27 | + public Map<String,String> findParamaterByLevel(int level,String loginid,String domain) throws Exception { | ||
28 | + //返回一个map集合 | ||
29 | + Map<String,String> paraMap=new HashMap<String,String>(); | ||
30 | + //查询控制参数(所有level的默认参数) | ||
31 | + String parahql="from YxySysParamaters where owner_type="+level; | ||
32 | + List<YxySysParamaters> paras=yxysysparamaterdao.findByHql(parahql); | ||
33 | + if(level==1){//系统级 | ||
34 | + for(int j=0;j<paras.size();j++){ | ||
35 | + paraMap.put(paras.get(j).getPara_code(), paras.get(j).getDefault_value()); | ||
36 | + } | ||
37 | + }else if(level==2){//企业级 | ||
38 | + //查询控制参数值(所有用户控制参数的配置值) | ||
39 | + String paravaluehql="from YxySysParamatersValue where company_domain='"+domain+"' and owner_type=2"; | ||
40 | + List<YxySysParamatersValue> paraValue=yxysysparamatersvaluedao.findByHql(paravaluehql); | ||
41 | + //循环赋值 | ||
42 | + int isexits=0; | ||
43 | + for(int j=0;j<paras.size();j++){ | ||
44 | + isexits=0; | ||
45 | + if(paraValue.size()>0){ | ||
46 | + our:for(int i=0;i<paraValue.size();i++){ | ||
47 | + if(paras.get(j).getPara_id()==paraValue.get(i).getPara_id()){ | ||
48 | + isexits++; | ||
49 | + if(paraValue.get(i).getPara_value()!=null||paraValue.get(i).getPara_value().equals("")){ | ||
50 | + paraMap.put(paras.get(j).getPara_code(), paraValue.get(i).getPara_value()); | ||
51 | + }else{ | ||
52 | + paraMap.put(paras.get(j).getPara_code(), paras.get(j).getDefault_value()); | ||
53 | + } | ||
54 | + break our; | ||
55 | + } | ||
56 | + } | ||
57 | + if(isexits==0){ | ||
58 | + paraMap.put(paras.get(j).getPara_code(), paras.get(j).getDefault_value()); | ||
59 | + } | ||
60 | + }else{ | ||
61 | + paraMap.put(paras.get(j).getPara_code(), paras.get(j).getDefault_value()); | ||
62 | + } | ||
63 | + } | ||
64 | + }else if(level==4){//用户级 | ||
65 | + //查询控制参数值(所有用户控制参数的配置值) | ||
66 | + String paravaluehql="from YxySysParamatersValue where owner_loginid='"+loginid+"' and company_domain='"+domain+"' and owner_type=4"; | ||
67 | + List<YxySysParamatersValue> paraValue=yxysysparamatersvaluedao.findByHql(paravaluehql); | ||
68 | + //循环赋值 | ||
69 | + int isexits=0; | ||
70 | + for(int j=0;j<paras.size();j++){ | ||
71 | + isexits=0; | ||
72 | + if(paraValue.size()>0){ | ||
73 | + our:for(int i=0;i<paraValue.size();i++){ | ||
74 | + if(paras.get(j).getPara_id()==paraValue.get(i).getPara_id()){ | ||
75 | + isexits++; | ||
76 | + if(paraValue.get(i).getPara_value()!=null||paraValue.get(i).getPara_value().equals("")){ | ||
77 | + paraMap.put(paras.get(j).getPara_code(), paraValue.get(i).getPara_value()); | ||
78 | + } | ||
79 | + break our; | ||
80 | + } | ||
81 | + } | ||
82 | + if(isexits==0){ | ||
83 | + paraMap.put(paras.get(j).getPara_code(), paras.get(j).getDefault_value()); | ||
84 | + } | ||
85 | + } | ||
86 | + } | ||
87 | + } | ||
88 | + | ||
89 | + return paraMap; | ||
90 | + } | ||
91 | + | ||
92 | + /**通过code查询控制参数,如果用户参数不存在则查企业控制参数,企业控制参数不存在则查询企业默认参数(用户级)*/ | ||
93 | + public String findUserParamValue(String loginid,String domain,String usercode,String syscode)throws Exception{ | ||
94 | + //根据code查询paraid | ||
95 | + String usercodehql="from YxySysParamaters where para_code='"+usercode+"'"; | ||
96 | + List<YxySysParamaters> paramlist=yxysysparamaterdao.findByHql(usercodehql); | ||
97 | + int paramid=paramlist.get(0).getPara_id(); | ||
98 | + //根据paramid查询值 | ||
99 | + String paravaluehql="from YxySysParamatersValue where owner_loginid='"+loginid+"' and company_domain='"+domain+"' and para_id="+paramid; | ||
100 | + List<YxySysParamatersValue> paramvlist=yxysysparamatersvaluedao.findByHql(paravaluehql); | ||
101 | + if(paramvlist.size()>0){ | ||
102 | + return paramvlist.get(0).getPara_value(); | ||
103 | + }else{ | ||
104 | + //查询系统参数 | ||
105 | + String syscodehql="from YxySysParamaters where para_code='"+syscode+"'"; | ||
106 | + List<YxySysParamaters> sysparamlist=yxysysparamaterdao.findByHql(syscodehql); | ||
107 | + int sysparamid=sysparamlist.get(0).getPara_id(); | ||
108 | + //根据paramid查询值 | ||
109 | + String sysparavaluehql="from YxySysParamatersValue where owner_loginid='"+loginid+"' and company_domain='"+domain+"' and para_id="+sysparamid; | ||
110 | + List<YxySysParamatersValue> sysparamvlist=yxysysparamatersvaluedao.findByHql(sysparavaluehql); | ||
111 | + if(sysparamvlist.size()>0){ | ||
112 | + return sysparamvlist.get(0).getPara_value(); | ||
113 | + }else{ | ||
114 | + return sysparamlist.get(0).getDefault_value(); | ||
115 | + } | ||
116 | + } | ||
117 | + } | ||
118 | + | ||
119 | + | ||
120 | + /**查询用户总分配量*/ | ||
121 | + public int findTolFenPeiCount(String loginid,String domain)throws Exception{ | ||
122 | + String hql="select count(*) from YxySysParamatersValue where para_id=34 and owner_loginid='"+loginid+"' and company_domain='"+domain+"'"; | ||
123 | + return yxysysparamatersvaluedao.findByHqlCount(hql); | ||
124 | + } | ||
125 | + | ||
126 | + private YxySysParamaterDao yxysysparamaterdao; | ||
127 | + private YxySysParamatersValueDao yxysysparamatersvaluedao; | ||
128 | + | ||
129 | + public YxySysParamaterDao getYxysysparamaterdao() { | ||
130 | + return yxysysparamaterdao; | ||
131 | + } | ||
132 | + public void setYxysysparamaterdao(YxySysParamaterDao yxysysparamaterdao) { | ||
133 | + this.yxysysparamaterdao = yxysysparamaterdao; | ||
134 | + } | ||
135 | + public YxySysParamatersValueDao getYxysysparamatersvaluedao() { | ||
136 | + return yxysysparamatersvaluedao; | ||
137 | + } | ||
138 | + public void setYxysysparamatersvaluedao( | ||
139 | + YxySysParamatersValueDao yxysysparamatersvaluedao) { | ||
140 | + this.yxysysparamatersvaluedao = yxysysparamatersvaluedao; | ||
141 | + } | ||
142 | + | ||
143 | + | ||
144 | + | ||
145 | +} |
1 | +package yxy.timer.dao.impl; | ||
2 | +import java.util.List; | ||
3 | +import yxy.timer.dao.YxyReadInfoSaleDao; | ||
4 | +import yxy.timer.sale.YxyReadingInfo; | ||
5 | +public class YxyReadInfoSaleDaoImpl extends SaleHibernateBaseDAOImpl<YxyReadingInfo, Long> implements YxyReadInfoSaleDao | ||
6 | +{ | ||
7 | + /**HQL查询*/ | ||
8 | + public List<YxyReadingInfo> findByHql(String hql) throws Exception | ||
9 | + { | ||
10 | + return super.getAll(hql); | ||
11 | + } | ||
12 | + /**批量插入*/ | ||
13 | + public void insertReadPi(List<YxyReadingInfo> o) throws Exception { | ||
14 | + super.addPi(o); | ||
15 | + } | ||
16 | + /**HQL查询指定条数据*/ | ||
17 | + public List findByHqlNum(String hql) throws Exception | ||
18 | + { | ||
19 | + return super.findBySet(hql, 1000); | ||
20 | + } | ||
21 | + /**sql查询*/ | ||
22 | + public List<Object> findBySql(String sql) throws Exception | ||
23 | + { | ||
24 | + return super.findBySql(sql); | ||
25 | + } | ||
26 | + /**sql更新*/ | ||
27 | + public void updateSql(String sql) throws Exception{ | ||
28 | + super.updateorDelSql(sql); | ||
29 | + } | ||
30 | + /**HQL更新*/ | ||
31 | + public void updateByHql(String hql)throws Exception | ||
32 | + { | ||
33 | + super.updateorDelByHql(hql); | ||
34 | + } | ||
35 | + /**批量插入*/ | ||
36 | + public int insertRead(YxyReadingInfo o)throws Exception{ | ||
37 | + return super.add(o); | ||
38 | + } | ||
39 | + public int findByHqlCount(String hql)throws Exception{ | ||
40 | + return super.count(hql); | ||
41 | + } | ||
42 | +} |
1 | +package yxy.timer.webservice.interfaces; | ||
2 | + | ||
3 | +import javax.jws.WebMethod; | ||
4 | +import javax.jws.WebParam; | ||
5 | +import javax.jws.WebResult; | ||
6 | +import javax.jws.WebService; | ||
7 | + | ||
8 | +@WebService(targetNamespace="http://UserSignatureWebservice.interfaces.webservice.timer.yxy/",serviceName="signatureWebservice") | ||
9 | +public interface UserSignatureWebservice | ||
10 | +{ | ||
11 | + @WebResult(name="result",targetNamespace="http://UserSignatureWebservice.interfaces.webservice.timer.yxy/") | ||
12 | + @WebMethod | ||
13 | + public String updateUserSignature(@WebParam(name="id",targetNamespace="http://UserSignatureWebservice.interfaces.webservice.timer.yxy/")int id, | ||
14 | + @WebParam(name="title",targetNamespace="http://UserSignatureWebservice.interfaces.webservice.timer.yxy/")String title, | ||
15 | + @WebParam(name="body",targetNamespace="http://UserSignatureWebservice.interfaces.webservice.timer.yxy/")String body); | ||
16 | +} |
1 | +package yxy.timer.dao.impl; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.dao.YxyReplyInfoDao; | ||
6 | +import yxy.timer.pojo.YxyReplyInfo; | ||
7 | + | ||
8 | +/** | ||
9 | + * | ||
10 | + * 回复dao实现类 | ||
11 | + * | ||
12 | + */ | ||
13 | +public class YxyReplyInfoDaoImpl extends HibernateBaseDAOImpl<YxyReplyInfo, Long> implements YxyReplyInfoDao{ | ||
14 | + /**实体插入*/ | ||
15 | + public int addPojo(YxyReplyInfo reply)throws Exception{ | ||
16 | + return super.add(reply); | ||
17 | + } | ||
18 | + | ||
19 | + /**查询指定量数据*/ | ||
20 | + public List<YxyReplyInfo> findByHqlSet(String hql,int num)throws Exception | ||
21 | + { | ||
22 | + return super.findBySet(hql, num); | ||
23 | + } | ||
24 | + | ||
25 | + /**统计条数*/ | ||
26 | + public int count(String hql)throws Exception | ||
27 | + { | ||
28 | + return super.count(hql); | ||
29 | + } | ||
30 | + | ||
31 | + /**根据sql查询*/ | ||
32 | + public List<Object> findBySql(String sql)throws Exception | ||
33 | + { | ||
34 | + return super.findBySql(sql); | ||
35 | + } | ||
36 | + | ||
37 | + /**hql更新*/ | ||
38 | + public void updateByHql(String hql)throws Exception | ||
39 | + { | ||
40 | + super.updateorDelByHql(hql); | ||
41 | + } | ||
42 | +} |
不能预览此文件类型
不能预览此文件类型
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.GeneratedValue; | ||
7 | +import javax.persistence.GenerationType; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Table; | ||
10 | + | ||
11 | +/** | ||
12 | + * 程序名称: EspeedMail_时速邮箱 | ||
13 | + * 程序版本: V1.0 | ||
14 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
15 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
16 | + * 技术支持: Tech@21gmail.com | ||
17 | + * 单元名称: 控制参数(营销游) | ||
18 | + * 开始时间: 2013.12.09 | ||
19 | + * 程 序 员: 谢勇 | ||
20 | + * 最后修改: | ||
21 | + * 备 注: 如需修改请通知程序员 | ||
22 | + */ | ||
23 | +@Entity | ||
24 | +@Table(name="yxy_sys_paramaters") | ||
25 | +public class YxySysParamaters implements Serializable{ | ||
26 | + private static final long serialVersionUID = 1L; | ||
27 | + private int para_id; | ||
28 | + private int owner_type; | ||
29 | + private int enable_flag;//启用标识,1:启用,0:未启用 | ||
30 | + private int sort_number;//sort_number | ||
31 | + private String para_kind;//分类名称 | ||
32 | + private String para_code;//参数代码 | ||
33 | + private String para_name;//参数名称 | ||
34 | + private String para_desc;//参数描述 | ||
35 | + private String para_datatype; | ||
36 | + private String default_value;//默认值 | ||
37 | + private String list_value;//侯选值 | ||
38 | + | ||
39 | + @Id | ||
40 | + @GeneratedValue(strategy=GenerationType.AUTO) | ||
41 | + public int getPara_id() { | ||
42 | + return para_id; | ||
43 | + } | ||
44 | + public void setPara_id(int paraId) { | ||
45 | + para_id = paraId; | ||
46 | + } | ||
47 | + public int getOwner_type() { | ||
48 | + return owner_type; | ||
49 | + } | ||
50 | + public void setOwner_type(int ownerType) { | ||
51 | + owner_type = ownerType; | ||
52 | + } | ||
53 | + public int getEnable_flag() { | ||
54 | + return enable_flag; | ||
55 | + } | ||
56 | + public void setEnable_flag(int enableFlag) { | ||
57 | + enable_flag = enableFlag; | ||
58 | + } | ||
59 | + public int getSort_number() { | ||
60 | + return sort_number; | ||
61 | + } | ||
62 | + public void setSort_number(int sortNumber) { | ||
63 | + sort_number = sortNumber; | ||
64 | + } | ||
65 | + public String getPara_kind() { | ||
66 | + return para_kind; | ||
67 | + } | ||
68 | + public void setPara_kind(String paraKind) { | ||
69 | + para_kind = paraKind; | ||
70 | + } | ||
71 | + public String getPara_code() { | ||
72 | + return para_code; | ||
73 | + } | ||
74 | + public void setPara_code(String paraCode) { | ||
75 | + para_code = paraCode; | ||
76 | + } | ||
77 | + public String getPara_name() { | ||
78 | + return para_name; | ||
79 | + } | ||
80 | + public void setPara_name(String paraName) { | ||
81 | + para_name = paraName; | ||
82 | + } | ||
83 | + public String getPara_desc() { | ||
84 | + return para_desc; | ||
85 | + } | ||
86 | + public void setPara_desc(String paraDesc) { | ||
87 | + para_desc = paraDesc; | ||
88 | + } | ||
89 | + public String getPara_datatype() { | ||
90 | + return para_datatype; | ||
91 | + } | ||
92 | + public void setPara_datatype(String paraDatatype) { | ||
93 | + para_datatype = paraDatatype; | ||
94 | + } | ||
95 | + public String getDefault_value() { | ||
96 | + return default_value; | ||
97 | + } | ||
98 | + public void setDefault_value(String defaultValue) { | ||
99 | + default_value = defaultValue; | ||
100 | + } | ||
101 | + public String getList_value() { | ||
102 | + return list_value; | ||
103 | + } | ||
104 | + public void setList_value(String listValue) { | ||
105 | + list_value = listValue; | ||
106 | + } | ||
107 | + | ||
108 | + | ||
109 | +} |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<web-app version="2.5" | ||
3 | + xmlns="http://java.sun.com/xml/ns/javaee" | ||
4 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
5 | + xsi:schemaLocation="http://java.sun.com/xml/ns/javaee | ||
6 | + http://java.sun.com/xml/ns/javaee/web-app_2_5.xsd"> | ||
7 | + | ||
8 | + <filter> | ||
9 | + <filter-name>openSessionInView</filter-name> | ||
10 | + <filter-class>org.springframework.orm.hibernate3.support.OpenSessionInViewFilter</filter-class> | ||
11 | + </filter> | ||
12 | + | ||
13 | + <filter-mapping> | ||
14 | + <filter-name>openSessionInView</filter-name> | ||
15 | + <url-pattern>/*</url-pattern> | ||
16 | + </filter-mapping> | ||
17 | + | ||
18 | + | ||
19 | + <!-- 配置spring监听器 --> | ||
20 | + <context-param> | ||
21 | + <param-name>contextConfigLocation</param-name> | ||
22 | + <param-value>classpath:applicationContext.xml</param-value> | ||
23 | + </context-param> | ||
24 | + <listener> | ||
25 | + <listener-class> | ||
26 | + org.springframework.web.context.ContextLoaderListener | ||
27 | + </listener-class> | ||
28 | + </listener> | ||
29 | + | ||
30 | + <!-- Spring乱码处理 --> | ||
31 | + <filter> | ||
32 | + <filter-name>characterEncoding</filter-name> | ||
33 | + <filter-class>org.springframework.web.filter.CharacterEncodingFilter</filter-class> | ||
34 | + <init-param> | ||
35 | + <param-name>encoding</param-name> | ||
36 | + <param-value>UTF-8</param-value> | ||
37 | + </init-param> | ||
38 | + <init-param> | ||
39 | + <param-name>forceEncoding</param-name> | ||
40 | + <param-value>true</param-value> | ||
41 | + </init-param> | ||
42 | + </filter> | ||
43 | + | ||
44 | + <!-- webservice配置 --> | ||
45 | + <servlet> | ||
46 | + <servlet-name>CXFServlet</servlet-name> | ||
47 | + <servlet-class> | ||
48 | + org.apache.cxf.transport.servlet.CXFServlet | ||
49 | + </servlet-class> | ||
50 | + </servlet> | ||
51 | + | ||
52 | + <servlet-mapping> | ||
53 | + <servlet-name>CXFServlet</servlet-name> | ||
54 | + <url-pattern>/yxyTimerWebservice/*</url-pattern> | ||
55 | + </servlet-mapping> | ||
56 | +</web-app> |
不能预览此文件类型
1 | +package yxy.timer.tool; | ||
2 | + | ||
3 | +/** | ||
4 | + * UserAgent解析工具类 | ||
5 | + * @author 陈南巧 | ||
6 | + * | ||
7 | + */ | ||
8 | +public class UserAgentUtil { | ||
9 | + | ||
10 | + /** | ||
11 | + * 把UserAgent转换成具体的设备名称 | ||
12 | + */ | ||
13 | + public static String parseUserAgent(String userAgent) | ||
14 | + { | ||
15 | + String toolName = "PC设备谷歌浏览器"; | ||
16 | + | ||
17 | + try{ | ||
18 | + if(userAgent != null && userAgent.trim().length() > 0) | ||
19 | + { | ||
20 | + //转换为小写字母 | ||
21 | + userAgent = userAgent.toLowerCase(); | ||
22 | + | ||
23 | + if(userAgent.indexOf("mailmasterpc")!=-1){ | ||
24 | + toolName = "PC设备网易邮箱大师"; | ||
25 | + }else if(userAgent.indexOf("mailmaster")!=-1){ | ||
26 | + toolName = "手机设备网易邮箱大师"; | ||
27 | + }else if(userAgent.indexOf("mailapp")!=-1){ | ||
28 | + toolName = "手机设备QQ邮箱"; | ||
29 | + }else if(userAgent.indexOf("outlook")!=-1){ | ||
30 | + toolName = "PC设备Outlook"; | ||
31 | + }else if(userAgent.indexOf("mailbird")!=-1){ | ||
32 | + toolName = "PC设备Gmail"; | ||
33 | + }else if(userAgent.indexOf("firebox")!=-1){ | ||
34 | + toolName = "PC设备火狐浏览器"; | ||
35 | + }else if(userAgent.indexOf("qqbrowser")!=-1){ | ||
36 | + toolName = "PC设备QQ浏览器"; | ||
37 | + }else if(userAgent.indexOf("ubrowser")!=-1){ | ||
38 | + toolName = "PC设备UC浏览器"; | ||
39 | + }else if(userAgent.indexOf("rv:11")!=-1){ | ||
40 | + toolName = "PC设备IE11浏览器"; | ||
41 | + }else if(userAgent.indexOf("edge")!=-1){ | ||
42 | + toolName = "PC设备Edge浏览器"; | ||
43 | + }else if(userAgent.indexOf("msie 6")!=-1){ | ||
44 | + toolName = "PC设备IE6浏览器"; | ||
45 | + }else if(userAgent.indexOf("msie 7")!=-1){ | ||
46 | + toolName = "PC设备IE7浏览器"; | ||
47 | + }else if(userAgent.indexOf("msie 8")!=-1){ | ||
48 | + toolName = "PC设备IE8浏览器"; | ||
49 | + }else if(userAgent.indexOf("msie 9")!=-1){ | ||
50 | + toolName = "PC设备IE9浏览器"; | ||
51 | + }else if(userAgent.indexOf("msie 10")!=-1){ | ||
52 | + toolName = "PC设备IE10浏览器"; | ||
53 | + }else if(userAgent.indexOf("mac os x")!=-1 && userAgent.indexOf("mobile")!=-1){ | ||
54 | + toolName = "手机设备Safari浏览器"; | ||
55 | + }else if(userAgent.indexOf("mac os x")!=-1){ | ||
56 | + toolName = "PC设备Safari浏览器"; | ||
57 | + }else if(userAgent.indexOf("opr")!=-1){ | ||
58 | + toolName = "PC设备Opera浏览器"; | ||
59 | + } | ||
60 | + } | ||
61 | + }catch (Exception e) { | ||
62 | + | ||
63 | + } | ||
64 | + | ||
65 | + return toolName; | ||
66 | + } | ||
67 | +} |
不能预览此文件类型
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.GeneratedValue; | ||
7 | +import javax.persistence.GenerationType; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Table; | ||
10 | + | ||
11 | +/** | ||
12 | + * 程序名称: EspeedMail_时速邮箱 | ||
13 | + * 程序版本: V1.0 | ||
14 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
15 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
16 | + * 技术支持: Tech@21gmail.com | ||
17 | + * 单元名称: 日发量统计(营销游) | ||
18 | + * 开始时间: 2013.12.09 | ||
19 | + * 程 序 员: 谢勇 | ||
20 | + * 最后修改: | ||
21 | + * 备 注: 如需修改请通知程序员 | ||
22 | + */ | ||
23 | + | ||
24 | +@Entity | ||
25 | +@Table(name="yxy_mail_day_count") | ||
26 | +public class YxyMailDayCount implements Serializable{ | ||
27 | + private int yxy_day_count_id;//ID | ||
28 | + private String yxy_day_count_loiginid;//用户账号 | ||
29 | + private String yxy_day_count_domain;//用户所属域名 | ||
30 | + private String yxy_day_count_date;//统计日期 | ||
31 | + private int yxy_day_count_tol_num;//发送量 | ||
32 | + private int yxy_day_count_ci_num;//发送次数 | ||
33 | + private int yxy_day_count_address_num;//导入地址数 | ||
34 | + private int is_timer_count;//定时器是否统计过,0没统计,1已统计 | ||
35 | + | ||
36 | + @Id | ||
37 | + @GeneratedValue(strategy=GenerationType.AUTO) | ||
38 | + public int getYxy_day_count_id() { | ||
39 | + return yxy_day_count_id; | ||
40 | + } | ||
41 | + public void setYxy_day_count_id(int yxyDayCountId) { | ||
42 | + yxy_day_count_id = yxyDayCountId; | ||
43 | + } | ||
44 | + public String getYxy_day_count_date() { | ||
45 | + return yxy_day_count_date; | ||
46 | + } | ||
47 | + public void setYxy_day_count_date(String yxyDayCountDate) { | ||
48 | + yxy_day_count_date = yxyDayCountDate; | ||
49 | + } | ||
50 | + public int getYxy_day_count_tol_num() { | ||
51 | + return yxy_day_count_tol_num; | ||
52 | + } | ||
53 | + public void setYxy_day_count_tol_num(int yxyDayCountTolNum) { | ||
54 | + yxy_day_count_tol_num = yxyDayCountTolNum; | ||
55 | + } | ||
56 | + public int getYxy_day_count_ci_num() { | ||
57 | + return yxy_day_count_ci_num; | ||
58 | + } | ||
59 | + public void setYxy_day_count_ci_num(int yxyDayCountCiNum) { | ||
60 | + yxy_day_count_ci_num = yxyDayCountCiNum; | ||
61 | + } | ||
62 | + public int getYxy_day_count_address_num() { | ||
63 | + return yxy_day_count_address_num; | ||
64 | + } | ||
65 | + public void setYxy_day_count_address_num(int yxyDayCountAddressNum) { | ||
66 | + yxy_day_count_address_num = yxyDayCountAddressNum; | ||
67 | + } | ||
68 | + public String getYxy_day_count_loiginid() { | ||
69 | + return yxy_day_count_loiginid; | ||
70 | + } | ||
71 | + public void setYxy_day_count_loiginid(String yxyDayCountLoiginid) { | ||
72 | + yxy_day_count_loiginid = yxyDayCountLoiginid; | ||
73 | + } | ||
74 | + public String getYxy_day_count_domain() { | ||
75 | + return yxy_day_count_domain; | ||
76 | + } | ||
77 | + public void setYxy_day_count_domain(String yxyDayCountDomain) { | ||
78 | + yxy_day_count_domain = yxyDayCountDomain; | ||
79 | + } | ||
80 | + public int getIs_timer_count() { | ||
81 | + return is_timer_count; | ||
82 | + } | ||
83 | + public void setIs_timer_count(int isTimerCount) { | ||
84 | + is_timer_count = isTimerCount; | ||
85 | + } | ||
86 | +} |
1 | +package yxy.timer.dao.impl; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.dao.TimerCountYxyDao; | ||
6 | +import yxy.timer.pojo.TimerCountYxy; | ||
7 | + | ||
8 | +/** | ||
9 | + * 程序名称: EspeedMail_时速邮箱 | ||
10 | + * 程序版本: V1.0 | ||
11 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
12 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
13 | + * 技术支持: Tech@21gmail.com | ||
14 | + * 单元名称: 营销邮时间统计DAO实现类 | ||
15 | + * 开始时间: 2015.12.29 | ||
16 | + * 程 序 员: 陈南巧 | ||
17 | + * 最后修改: 2015.12.29 | ||
18 | + * 备 注: 二次修改 | ||
19 | + */ | ||
20 | +public class TimerCountYxyDaoImpl extends HibernateBaseDAOImpl<TimerCountYxy, Long> implements TimerCountYxyDao | ||
21 | +{ | ||
22 | + /**实体插入*/ | ||
23 | + public void addPojo(TimerCountYxy o) throws Exception | ||
24 | + { | ||
25 | + super.add(o); | ||
26 | + } | ||
27 | + | ||
28 | + /**批量插入实体*/ | ||
29 | + public void addPojoPI(List<TimerCountYxy> list) throws Exception | ||
30 | + { | ||
31 | + super.addPi(list); | ||
32 | + } | ||
33 | + | ||
34 | + /**HQL查询*/ | ||
35 | + public List<TimerCountYxy> findByHql(String hql) throws Exception | ||
36 | + { | ||
37 | + return super.getAll(hql); | ||
38 | + } | ||
39 | + | ||
40 | + /**SQL查询*/ | ||
41 | + public List<Object> findBySqlQuery(String sql) throws Exception | ||
42 | + { | ||
43 | + return super.findBySql(sql); | ||
44 | + } | ||
45 | + | ||
46 | + /**HQL更新*/ | ||
47 | + public void updateByHql(String hql) throws Exception | ||
48 | + { | ||
49 | + super.updateorDelByHql(hql); | ||
50 | + } | ||
51 | + | ||
52 | + /**SQL更新*/ | ||
53 | + public void updateBySql(String sql)throws Exception | ||
54 | + { | ||
55 | + super.updateorDelSql(sql); | ||
56 | + } | ||
57 | +} |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | + | ||
3 | +<!-- | ||
4 | + 共有方法,负责所有共有配置文件 | ||
5 | +--> | ||
6 | +<beans xmlns="http://www.springframework.org/schema/beans" | ||
7 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
8 | + xmlns:aop="http://www.springframework.org/schema/aop" | ||
9 | + xmlns:tx="http://www.springframework.org/schema/tx" | ||
10 | + xsi:schemaLocation=" | ||
11 | + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd | ||
12 | + http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd | ||
13 | + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> | ||
14 | + | ||
15 | + <!-- 营销邮时间统计dao --> | ||
16 | + <bean id="timercountyxydao" class="yxy.timer.dao.impl.TimerCountYxyDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
17 | + <!-- 日统计DAO --> | ||
18 | + <bean id="yxymaildaycountdao" class="yxy.timer.dao.impl.YxyMailDayCountDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
19 | + <!--点击信息DAO--> | ||
20 | + <bean id="yxyreaddao" class="yxy.timer.dao.impl.YxyReadDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
21 | + <!--日点击信息DAO--> | ||
22 | + <bean id="yxydayreaddao" class="yxy.timer.dao.impl.YxyReadingDayInfoDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
23 | + <!--退订DAO--> | ||
24 | + <bean id="yxyunsubscribedao" class="yxy.timer.dao.impl.YxyUnsubscribeDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
25 | + <!--用户设置DAO--> | ||
26 | + <bean id="yxyusersetdao" class="yxy.timer.dao.impl.YxyUserSetDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
27 | + <!--用户地址DAO--> | ||
28 | + <bean id="yxyuseraddressdao" class="yxy.timer.dao.impl.YxyUserAddressDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
29 | + <!--用户回复地址DAO--> | ||
30 | + <bean id="yxyreplyinfodao" class="yxy.timer.dao.impl.YxyReplyInfoDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
31 | + <!--用户回复地址DAO--> | ||
32 | + <bean id="yxysendmaildetaildao" class="yxy.timer.dao.impl.YxySendMailDetailDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
33 | + <!-- 待发dao --> | ||
34 | + <bean id="yxysendmailmasterdao" class="yxy.timer.dao.impl.YxySendMailMasterDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
35 | + <!-- 邮箱签名dao --> | ||
36 | + <bean id="yxywebmaildao" class="yxy.timer.dao.impl.YxyWebmailDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
37 | + <!-- 邮件基本信息dao --> | ||
38 | + <bean id="yxysendmailmasterbasedao" class="yxy.timer.dao.impl.YxySendMailMasterBaseDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
39 | + <!-- 控制参数DAO--> | ||
40 | + <bean id="yxysysparamaterdao" class="yxy.timer.dao.impl.YxySysParamaterDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
41 | + <!-- 控制参数值DAO--> | ||
42 | + <bean id="yxysysparamatersvaluedao" class="yxy.timer.dao.impl.YxySysParamatersValueDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
43 | + <!-- 链接数DAO--> | ||
44 | + <bean id="yxymailnumcountdao" class="yxy.timer.dao.impl.YxyMailNumCountDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
45 | + <!-- 链接详情DAO--> | ||
46 | + <bean id="yxylinkinfodao" class="yxy.timer.dao.impl.YxyLinkInfoDaoImpl" parent="AnnhibernateBaseDAO"></bean> | ||
47 | +</beans> |
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +/** | ||
4 | + * 营销邮部门排行 | ||
5 | + * @author 陈南巧 | ||
6 | + * | ||
7 | + */ | ||
8 | +public class YxyDeptRanking | ||
9 | +{ | ||
10 | + private String dept_name;//部门id | ||
11 | + | ||
12 | + private int sendcinums;//发送总次数 | ||
13 | + | ||
14 | + private String sendciids;//发送总次数对应的邮件id | ||
15 | + | ||
16 | + private int sendtolnums;//发送总数 | ||
17 | + | ||
18 | + private String sendtolids;//发送总数对应的邮件id | ||
19 | + | ||
20 | + private int readnums;//点读数 | ||
21 | + | ||
22 | + private String readids;//点读数对应的邮件id | ||
23 | + | ||
24 | + private int unsubnums;//退订数 | ||
25 | + | ||
26 | + private String unsubids;//退订数对应的邮件id | ||
27 | + | ||
28 | + private int replynums;//回复数 | ||
29 | + | ||
30 | + private String replyids;//回复数对应的邮件id | ||
31 | + | ||
32 | + public String getDept_name() { | ||
33 | + return dept_name; | ||
34 | + } | ||
35 | + | ||
36 | + public void setDept_name(String deptName) { | ||
37 | + dept_name = deptName; | ||
38 | + } | ||
39 | + | ||
40 | + public int getSendcinums() { | ||
41 | + return sendcinums; | ||
42 | + } | ||
43 | + | ||
44 | + public void setSendcinums(int sendcinums) { | ||
45 | + this.sendcinums = sendcinums; | ||
46 | + } | ||
47 | + | ||
48 | + public String getSendciids() { | ||
49 | + return sendciids; | ||
50 | + } | ||
51 | + | ||
52 | + public void setSendciids(String sendciids) { | ||
53 | + this.sendciids = sendciids; | ||
54 | + } | ||
55 | + | ||
56 | + public int getSendtolnums() { | ||
57 | + return sendtolnums; | ||
58 | + } | ||
59 | + | ||
60 | + public void setSendtolnums(int sendtolnums) { | ||
61 | + this.sendtolnums = sendtolnums; | ||
62 | + } | ||
63 | + | ||
64 | + public String getSendtolids() { | ||
65 | + return sendtolids; | ||
66 | + } | ||
67 | + | ||
68 | + public void setSendtolids(String sendtolids) { | ||
69 | + this.sendtolids = sendtolids; | ||
70 | + } | ||
71 | + | ||
72 | + public int getReadnums() { | ||
73 | + return readnums; | ||
74 | + } | ||
75 | + | ||
76 | + public void setReadnums(int readnums) { | ||
77 | + this.readnums = readnums; | ||
78 | + } | ||
79 | + | ||
80 | + public String getReadids() { | ||
81 | + return readids; | ||
82 | + } | ||
83 | + | ||
84 | + public void setReadids(String readids) { | ||
85 | + this.readids = readids; | ||
86 | + } | ||
87 | + | ||
88 | + public int getUnsubnums() { | ||
89 | + return unsubnums; | ||
90 | + } | ||
91 | + | ||
92 | + public void setUnsubnums(int unsubnums) { | ||
93 | + this.unsubnums = unsubnums; | ||
94 | + } | ||
95 | + | ||
96 | + public String getUnsubids() { | ||
97 | + return unsubids; | ||
98 | + } | ||
99 | + | ||
100 | + public void setUnsubids(String unsubids) { | ||
101 | + this.unsubids = unsubids; | ||
102 | + } | ||
103 | + | ||
104 | + public int getReplynums() { | ||
105 | + return replynums; | ||
106 | + } | ||
107 | + | ||
108 | + public void setReplynums(int replynums) { | ||
109 | + this.replynums = replynums; | ||
110 | + } | ||
111 | + | ||
112 | + public String getReplyids() { | ||
113 | + return replyids; | ||
114 | + } | ||
115 | + | ||
116 | + public void setReplyids(String replyids) { | ||
117 | + this.replyids = replyids; | ||
118 | + } | ||
119 | +} |
1 | +package yxy.timer.method; | ||
2 | + | ||
3 | +import java.text.SimpleDateFormat; | ||
4 | +import java.util.Date; | ||
5 | +import java.util.List; | ||
6 | + | ||
7 | +import yxy.timer.pojo.YxyUserSet; | ||
8 | +import yxy.timer.service.YxyAddressService; | ||
9 | +import yxy.timer.tool.DateFormat; | ||
10 | + | ||
11 | +/** | ||
12 | + * | ||
13 | + * 定时清理邮件地址 | ||
14 | + * | ||
15 | + */ | ||
16 | +public class AutoClearAddress { | ||
17 | + | ||
18 | + private void cleraAddress()throws Exception{ | ||
19 | +// try { | ||
20 | +// //业务修改(未分类的只清理7天之前的地址..分类的由用户自己设定) | ||
21 | +// SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
22 | +// String nowDate=df.format(new Date());//当前时间 | ||
23 | +// System.out.println(nowDate+"===开始清理地址==="); | ||
24 | +// //删除超过7天的地址 | ||
25 | +// String chaTimer=DateFormat.nDaysAfterOneDateString(nowDate, -7);//获取相差N天的时间 | ||
26 | +// //删除小于该时间的地址 | ||
27 | +// yxyaddressservice.delAddress(chaTimer); | ||
28 | +// //删除用户设置的地址(只限分类的) | ||
29 | +// List<YxyUserSet> userSet=yxyaddressservice.findAllSet(); | ||
30 | +// int cleraday=0; | ||
31 | +// String loginid="";//用户账号 | ||
32 | +// String domain="";//用户域名 | ||
33 | +// for(int i=0;i<userSet.size();i++){ | ||
34 | +// loginid=userSet.get(i).getUser_set_loginid(); | ||
35 | +// domain=userSet.get(i).getUser_companydomain(); | ||
36 | +// //判断是否开启自动清理地址功能 | ||
37 | +// if(userSet.get(i).getUser_clear_address_use()==1){//开启 | ||
38 | +// //获取的天数 | ||
39 | +// cleraday=userSet.get(i).getUser_clear_address_num(); | ||
40 | +// chaTimer=DateFormat.nDaysAfterOneDateString(nowDate, cleraday);//获取相差N天的时间 | ||
41 | +// yxyaddressservice.delAddressByUser(chaTimer, loginid, domain); | ||
42 | +// } | ||
43 | +// } | ||
44 | +// System.out.println("===清理地址完成==="); | ||
45 | +// } catch (Exception e) { | ||
46 | +// System.out.println("===清理地址出现异常==="); | ||
47 | +// e.printStackTrace(); | ||
48 | +// } | ||
49 | + | ||
50 | + //清理待发邮件地址 | ||
51 | + try { | ||
52 | + yxyaddressservice.delDetail(); | ||
53 | + } catch (Exception e) { | ||
54 | + e.printStackTrace(); | ||
55 | + } | ||
56 | + } | ||
57 | + | ||
58 | + private YxyAddressService yxyaddressservice;//地址service | ||
59 | + | ||
60 | + public YxyAddressService getYxyaddressservice() | ||
61 | + { | ||
62 | + return yxyaddressservice; | ||
63 | + } | ||
64 | + | ||
65 | + public void setYxyaddressservice(YxyAddressService yxyaddressservice) | ||
66 | + { | ||
67 | + this.yxyaddressservice = yxyaddressservice; | ||
68 | + } | ||
69 | +} |
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.GeneratedValue; | ||
7 | +import javax.persistence.GenerationType; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Table; | ||
10 | + | ||
11 | +/** | ||
12 | + * 程序名称: EspeedMail_时速邮箱 | ||
13 | + * 程序版本: V1.0 | ||
14 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
15 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
16 | + * 技术支持: Tech@21gmail.com | ||
17 | + * 单元名称: 点读统计实体(营销游) | ||
18 | + * 开始时间: 2013.12.09 | ||
19 | + * 程 序 员: 谢勇 | ||
20 | + * 最后修改: | ||
21 | + * 备 注: 如需修改请通知程序员 | ||
22 | + */ | ||
23 | +@Entity | ||
24 | +@Table(name="yxy_reading_count") | ||
25 | +public class YxyReadingCount implements Serializable{ | ||
26 | + private int reading_count_id; | ||
27 | + private String reading_count_mailuid; | ||
28 | + private String reading_count_loginid; | ||
29 | + private String reading_count_domain; | ||
30 | + private int reading_count_tol;/**点读总数*/ | ||
31 | + private int reading_count_person;/**点读人数*/ | ||
32 | + private String reading_count_date; | ||
33 | + @Id | ||
34 | + @GeneratedValue(strategy=GenerationType.AUTO) | ||
35 | + public int getReading_count_id() { | ||
36 | + return reading_count_id; | ||
37 | + } | ||
38 | + public void setReading_count_id(int readingCountId) { | ||
39 | + reading_count_id = readingCountId; | ||
40 | + } | ||
41 | + | ||
42 | + | ||
43 | + public String getReading_count_mailuid() { | ||
44 | + return reading_count_mailuid; | ||
45 | + } | ||
46 | + public void setReading_count_mailuid(String readingCountMailuid) { | ||
47 | + reading_count_mailuid = readingCountMailuid; | ||
48 | + } | ||
49 | + public int getReading_count_tol() { | ||
50 | + return reading_count_tol; | ||
51 | + } | ||
52 | + public void setReading_count_tol(int readingCountTol) { | ||
53 | + reading_count_tol = readingCountTol; | ||
54 | + } | ||
55 | + public int getReading_count_person() { | ||
56 | + return reading_count_person; | ||
57 | + } | ||
58 | + public void setReading_count_person(int readingCountPerson) { | ||
59 | + reading_count_person = readingCountPerson; | ||
60 | + } | ||
61 | + public String getReading_count_loginid() { | ||
62 | + return reading_count_loginid; | ||
63 | + } | ||
64 | + public void setReading_count_loginid(String readingCountLoginid) { | ||
65 | + reading_count_loginid = readingCountLoginid; | ||
66 | + } | ||
67 | + public String getReading_count_domain() { | ||
68 | + return reading_count_domain; | ||
69 | + } | ||
70 | + public void setReading_count_domain(String readingCountDomain) { | ||
71 | + reading_count_domain = readingCountDomain; | ||
72 | + } | ||
73 | + public String getReading_count_date() { | ||
74 | + return reading_count_date; | ||
75 | + } | ||
76 | + public void setReading_count_date(String readingCountDate) { | ||
77 | + reading_count_date = readingCountDate; | ||
78 | + } | ||
79 | + | ||
80 | + | ||
81 | +} |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<!-- | ||
3 | + sale100个人版配置文件 | ||
4 | +--> | ||
5 | +<beans xmlns="http://www.springframework.org/schema/beans" | ||
6 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
7 | + xmlns:aop="http://www.springframework.org/schema/aop" | ||
8 | + xmlns:tx="http://www.springframework.org/schema/tx" | ||
9 | + xsi:schemaLocation=" | ||
10 | + http://www.springframework.org/schema/beans http://www.springframework.org/schema/beans/spring-beans-2.5.xsd | ||
11 | + http://www.springframework.org/schema/aop http://www.springframework.org/schema/aop/spring-aop-2.5.xsd | ||
12 | + http://www.springframework.org/schema/tx http://www.springframework.org/schema/tx/spring-tx-2.5.xsd"> | ||
13 | + <bean id="dataSourceSale" class="org.apache.commons.dbcp.BasicDataSource" destroy-method="close"> | ||
14 | + <property name="driverClassName"> | ||
15 | + <value>com.mysql.jdbc.Driver</value> | ||
16 | + </property> | ||
17 | + <property name="url"> | ||
18 | + <value>jdbc:mysql://localhost:3306/yxybase?useUnicode=true&characterEncoding=utf8&autoReconnect=true</value> | ||
19 | + </property> | ||
20 | + <property name="username"> | ||
21 | + <value>root</value> | ||
22 | + </property> | ||
23 | + <property name="password"> | ||
24 | + <value>sz1234567890</value> | ||
25 | + </property> | ||
26 | + <property name="maxActive"> | ||
27 | + <value>100</value> | ||
28 | + </property> | ||
29 | + <property name="maxIdle"> | ||
30 | + <value>50</value> | ||
31 | + </property> | ||
32 | + <property name="initialSize"> | ||
33 | + <value>30</value> | ||
34 | + </property> | ||
35 | + <property name="maxWait"> | ||
36 | + <value>10000</value> | ||
37 | + </property> | ||
38 | + <property name="defaultAutoCommit"> | ||
39 | + <value>true</value> | ||
40 | + </property> | ||
41 | + <property name="removeAbandoned"> | ||
42 | + <value>true</value> | ||
43 | + </property> | ||
44 | + <property name="removeAbandonedTimeout"> | ||
45 | + <value>300</value> | ||
46 | + </property> | ||
47 | + <property name="logAbandoned"> | ||
48 | + <value>false</value> | ||
49 | + </property> | ||
50 | + <property name="validationQuery"> | ||
51 | + <value>select 1</value> | ||
52 | + </property> | ||
53 | + <property name="testOnBorrow"> | ||
54 | + <value>true</value> | ||
55 | + </property> | ||
56 | + </bean> | ||
57 | + <bean id="sessionFactorySale" class="org.springframework.orm.hibernate3.annotation.AnnotationSessionFactoryBean"> | ||
58 | + <property name="dataSource" ref="dataSourceSale" /> | ||
59 | + <property name="packagesToScan"> | ||
60 | + <list> | ||
61 | + <value>yxy.timer.sale</value> | ||
62 | + </list> | ||
63 | + </property> | ||
64 | + <property name="hibernateProperties"> | ||
65 | + <props> | ||
66 | + <prop key="hibernate.dialect">org.hibernate.dialect.MySQLDialect</prop> | ||
67 | + <prop key="hibernate.show_sql">false</prop> | ||
68 | + <prop key="hibernate.generate_statistics">true</prop> | ||
69 | + <prop key="hibernate.connetion.release_mode">auto</prop> | ||
70 | + </props> | ||
71 | + </property> | ||
72 | + </bean> | ||
73 | + <bean id="SalehibernateBaseDAO" class="yxy.timer.dao.impl.SaleHibernateBaseDAOImpl" abstract="true" scope="prototype"> | ||
74 | + <property name="sessionFactory" ref="sessionFactorySale"/> | ||
75 | + </bean> | ||
76 | + <bean id="transactionManagerSale" class="org.springframework.orm.hibernate3.HibernateTransactionManager"> | ||
77 | + <property name="sessionFactory" ref="sessionFactorySale" /> | ||
78 | + </bean> | ||
79 | + <tx:advice id="txAdviceSale" transaction-manager="transactionManagerSale"> | ||
80 | + <tx:attributes> | ||
81 | + <tx:method name="del*"/> | ||
82 | + <tx:method name="save*" /> | ||
83 | + <tx:method name="update*" /> | ||
84 | + <tx:method name="add*" /> | ||
85 | + <tx:method name="insert*" /> | ||
86 | + <tx:method name="get*" propagation="SUPPORTS" read-only="true"/> | ||
87 | + <tx:method name="load*" propagation="SUPPORTS" read-only="true"/> | ||
88 | + <tx:method name="list*" propagation="SUPPORTS" read-only="true"/> | ||
89 | + <tx:method name="*" propagation="SUPPORTS" read-only="true"/> | ||
90 | + </tx:attributes> | ||
91 | + </tx:advice> | ||
92 | + <aop:config> | ||
93 | + <aop:pointcut expression="execution(* yxy.timer.service.*.*(..))" id="allMethodSale"/> | ||
94 | + <aop:advisor pointcut-ref="allMethodSale" advice-ref="txAdviceSale"/> | ||
95 | + </aop:config> | ||
96 | + <!--点击信息DAO--> | ||
97 | + <bean id="yxyreadinfosaledao" class="yxy.timer.dao.impl.YxyReadInfoSaleDaoImpl" parent="SalehibernateBaseDAO"></bean> | ||
98 | + <!--退订DAO--> | ||
99 | + <bean id="yxyunsubscribeinfosaledao" class="yxy.timer.dao.impl.YxyUnsubscribeInfoSaleDaoImpl" parent="SalehibernateBaseDAO"></bean> | ||
100 | + <!-- 链接数DAO--> | ||
101 | + <bean id="yxymailnumcountinfosaledao" class="yxy.timer.dao.impl.YxyMailNumCountInfoSaleDaoImpl" parent="SalehibernateBaseDAO"></bean> | ||
102 | + <!-- 链接详情DAO--> | ||
103 | + <bean id="yxylinkinfosaledao" class="yxy.timer.dao.impl.YxyLinkInfoSaleDaoImpl" parent="SalehibernateBaseDAO"></bean> | ||
104 | +</beans> |
1 | +package yxy.timer.dao.impl; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.dao.YxyMailNumCountDao; | ||
6 | +import yxy.timer.pojo.YxyMailNumCount; | ||
7 | + | ||
8 | +public class YxyMailNumCountDaoImpl extends HibernateBaseDAOImpl<YxyMailNumCount, Long> implements YxyMailNumCountDao{ | ||
9 | + /**实体插入*/ | ||
10 | + public int addPojo(YxyMailNumCount o)throws Exception{ | ||
11 | + return super.add(o); | ||
12 | + } | ||
13 | + /**实体编辑*/ | ||
14 | + public void updatePojo(YxyMailNumCount o)throws Exception{ | ||
15 | + super.update(o); | ||
16 | + } | ||
17 | + /**HQL查询*/ | ||
18 | + public List<YxyMailNumCount> findByHql(String hql)throws Exception{ | ||
19 | + return super.getAll(hql); | ||
20 | + } | ||
21 | + /**指定条记录*/ | ||
22 | + public List<YxyMailNumCount> findByHqlSet(String hql,int num)throws Exception{ | ||
23 | + return super.findBySet(hql, num); | ||
24 | + } | ||
25 | + /**SQL查询*/ | ||
26 | + public List<Object> findBySqlQuery(String sql)throws Exception{ | ||
27 | + return super.findBySql(sql); | ||
28 | + } | ||
29 | + /**HQL更新*/ | ||
30 | + public void updateByHql(String hql)throws Exception{ | ||
31 | + super.updateorDelByHql(hql); | ||
32 | + } | ||
33 | +} |
1 | +package yxy.timer.dao; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | +import yxy.timer.pojo.YxyMailNumCount; | ||
5 | + | ||
6 | +public interface YxyMailNumCountDao { | ||
7 | + /**实体插入*/ | ||
8 | + public int addPojo(YxyMailNumCount o)throws Exception; | ||
9 | + /**实体编辑*/ | ||
10 | + public void updatePojo(YxyMailNumCount o)throws Exception; | ||
11 | + /**HQL查询*/ | ||
12 | + public List<YxyMailNumCount> findByHql(String hql)throws Exception; | ||
13 | + /**指定条记录*/ | ||
14 | + public List<YxyMailNumCount> findByHqlSet(String hql,int num)throws Exception; | ||
15 | + /**SQL查询*/ | ||
16 | + public List<Object> findBySqlQuery(String sql)throws Exception; | ||
17 | + /**HQL更新*/ | ||
18 | + public void updateByHql(String hql)throws Exception; | ||
19 | +} |
不能预览此文件类型
1 | +package yxy.timer.method; | ||
2 | + | ||
3 | +import org.springframework.scheduling.quartz.CronTriggerBean; | ||
4 | +import org.quartz.Scheduler; | ||
5 | + | ||
6 | + | ||
7 | +public class InitializingCronTrigger{ | ||
8 | + | ||
9 | + | ||
10 | + private static Scheduler scheduler; | ||
11 | + | ||
12 | + public void setScheduler(Scheduler scheduler){ | ||
13 | + InitializingCronTrigger.scheduler = scheduler; | ||
14 | + } | ||
15 | + //dotime 配置文件里面 - 是配置jobDetail和CronExpression的 | ||
16 | + public static void updateTime(String expression){ | ||
17 | + | ||
18 | + | ||
19 | + try { | ||
20 | + /* | ||
21 | + * 通过Scheduler.getTrigger("truggerName","GroupName")得到CronTriggerBean | ||
22 | + * 通过setCronExpression方法设置时间 | ||
23 | + * */ | ||
24 | + CronTriggerBean trigger = (CronTriggerBean) scheduler.getTrigger("dotime", Scheduler.DEFAULT_GROUP); | ||
25 | + | ||
26 | + if(! trigger.getCronExpression().equalsIgnoreCase(expression)){ | ||
27 | + | ||
28 | + trigger.setCronExpression(expression); | ||
29 | + | ||
30 | + scheduler.rescheduleJob("dotime", Scheduler.DEFAULT_GROUP, trigger); | ||
31 | + | ||
32 | + } | ||
33 | + | ||
34 | + //trigger.setCronExpression(expression); | ||
35 | + System.out.println(trigger.getName() + ":"+ trigger.getCronExpression()); | ||
36 | + | ||
37 | + } catch (Exception e) { | ||
38 | + e.printStackTrace(); | ||
39 | + } | ||
40 | + } | ||
41 | + | ||
42 | +} |
不能预览此文件类型
1 | +package yxy.timer.dao; | ||
2 | +import java.util.List; | ||
3 | + | ||
4 | +import yxy.timer.pojo.YxySysParamatersValue; | ||
5 | + | ||
6 | +/** | ||
7 | + * 程序名称: EspeedMail_时速邮箱 | ||
8 | + * 程序版本: V1.0 | ||
9 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
10 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
11 | + * 技术支持: Tech@21gmail.com | ||
12 | + * 单元名称: 控制参数值Dao(营销游) | ||
13 | + * 开始时间: 2013.12.09 | ||
14 | + * 程 序 员: 谢勇 | ||
15 | + * 最后修改: | ||
16 | + * 备 注: 如需修改请通知程序员 | ||
17 | + */ | ||
18 | +public interface YxySysParamatersValueDao { | ||
19 | + | ||
20 | + /**HQL查询*/ | ||
21 | + public List<YxySysParamatersValue> findByHql(String hql)throws Exception; | ||
22 | + /**HQL数量查询*/ | ||
23 | + public int findByHqlCount(String hql)throws Exception; | ||
24 | +} |
不能预览此文件类型
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.GeneratedValue; | ||
7 | +import javax.persistence.GenerationType; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Table; | ||
10 | + | ||
11 | +/** | ||
12 | + * | ||
13 | + * @author 谢勇 | ||
14 | + * 日点读信息 | ||
15 | + */ | ||
16 | +//@Entity | ||
17 | +//@Table(name="yxy_reading_day_info") | ||
18 | +public class YxyReadingDayInfo implements Serializable{ | ||
19 | + private static final long serialVersionUID = 1L; | ||
20 | + private int day_readid; | ||
21 | + private String day_read_loginid; | ||
22 | + private String day_read_domain; | ||
23 | + private String day_read_mailuid; | ||
24 | + private String day_read_ip; | ||
25 | + private String day_read_date; | ||
26 | + private String day_read_email; | ||
27 | + private int day_read_num; | ||
28 | + private int day_read_month; | ||
29 | + private String day_read_area; | ||
30 | + private int day_read_year; | ||
31 | + private String day_read_hh; | ||
32 | + private int day_read_day; | ||
33 | + | ||
34 | +// @Id | ||
35 | +// @GeneratedValue(strategy=GenerationType.AUTO) | ||
36 | + public int getDay_readid() { | ||
37 | + return day_readid; | ||
38 | + } | ||
39 | + public void setDay_readid(int dayReadid) { | ||
40 | + day_readid = dayReadid; | ||
41 | + } | ||
42 | + public String getDay_read_loginid() { | ||
43 | + return day_read_loginid; | ||
44 | + } | ||
45 | + public void setDay_read_loginid(String dayReadLoginid) { | ||
46 | + day_read_loginid = dayReadLoginid; | ||
47 | + } | ||
48 | + public String getDay_read_domain() { | ||
49 | + return day_read_domain; | ||
50 | + } | ||
51 | + public void setDay_read_domain(String dayReadDomain) { | ||
52 | + day_read_domain = dayReadDomain; | ||
53 | + } | ||
54 | + public String getDay_read_mailuid() { | ||
55 | + return day_read_mailuid; | ||
56 | + } | ||
57 | + public void setDay_read_mailuid(String dayReadMailuid) { | ||
58 | + day_read_mailuid = dayReadMailuid; | ||
59 | + } | ||
60 | + public String getDay_read_ip() { | ||
61 | + return day_read_ip; | ||
62 | + } | ||
63 | + public void setDay_read_ip(String dayReadIp) { | ||
64 | + day_read_ip = dayReadIp; | ||
65 | + } | ||
66 | + public String getDay_read_date() { | ||
67 | + return day_read_date; | ||
68 | + } | ||
69 | + public void setDay_read_date(String dayReadDate) { | ||
70 | + day_read_date = dayReadDate; | ||
71 | + } | ||
72 | + public String getDay_read_email() { | ||
73 | + return day_read_email; | ||
74 | + } | ||
75 | + public void setDay_read_email(String dayReadEmail) { | ||
76 | + day_read_email = dayReadEmail; | ||
77 | + } | ||
78 | + public int getDay_read_num() { | ||
79 | + return day_read_num; | ||
80 | + } | ||
81 | + public void setDay_read_num(int dayReadNum) { | ||
82 | + day_read_num = dayReadNum; | ||
83 | + } | ||
84 | + public int getDay_read_month() { | ||
85 | + return day_read_month; | ||
86 | + } | ||
87 | + public void setDay_read_month(int dayReadMonth) { | ||
88 | + day_read_month = dayReadMonth; | ||
89 | + } | ||
90 | + public String getDay_read_area() { | ||
91 | + return day_read_area; | ||
92 | + } | ||
93 | + public void setDay_read_area(String dayReadArea) { | ||
94 | + day_read_area = dayReadArea; | ||
95 | + } | ||
96 | + public int getDay_read_year() { | ||
97 | + return day_read_year; | ||
98 | + } | ||
99 | + public void setDay_read_year(int dayReadYear) { | ||
100 | + day_read_year = dayReadYear; | ||
101 | + } | ||
102 | + public String getDay_read_hh() { | ||
103 | + return day_read_hh; | ||
104 | + } | ||
105 | + public void setDay_read_hh(String dayReadHh) { | ||
106 | + day_read_hh = dayReadHh; | ||
107 | + } | ||
108 | + public int getDay_read_day() { | ||
109 | + return day_read_day; | ||
110 | + } | ||
111 | + public void setDay_read_day(int dayReadDay) { | ||
112 | + day_read_day = dayReadDay; | ||
113 | + } | ||
114 | + | ||
115 | +} |
不能预览此文件类型
1 | +package yxy.timer.tool; | ||
2 | + | ||
3 | +import java.text.ParseException; | ||
4 | +import java.text.SimpleDateFormat; | ||
5 | +import java.util.Calendar; | ||
6 | +import java.util.Date; | ||
7 | +import java.util.TimeZone; | ||
8 | +/* | ||
9 | + * 程序名称: EspeedMail_时速邮箱 | ||
10 | + * 程序版本: V1.0 | ||
11 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
12 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
13 | + * 技术支持: Tech@21gmail.com | ||
14 | + * 单元名称: 日期格式化工具类 | ||
15 | + * 开始时间: 2013.09.26 | ||
16 | + * 程 序 员: 谢勇 | ||
17 | + * 最后修改: | ||
18 | + * 备 注: 如需修改请通知程序员 | ||
19 | + */ | ||
20 | +public class DateFormat { | ||
21 | + private static SimpleDateFormat sdf = new SimpleDateFormat("yyyy年MM月dd日"); | ||
22 | + private static SimpleDateFormat sdf2 = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
23 | + | ||
24 | + // 将字符串转换日期 | ||
25 | + public static Date dateToString(String str) { | ||
26 | + | ||
27 | + Date dateNum = null; | ||
28 | + try { | ||
29 | + dateNum = sdf.parse(str); | ||
30 | + } catch (ParseException e) { | ||
31 | + e.printStackTrace(); | ||
32 | + } | ||
33 | + return dateNum; | ||
34 | + } | ||
35 | + | ||
36 | + // 将字符串转换日期 | ||
37 | + public static Date dateToString2(String str) { | ||
38 | + Date dateNum = null; | ||
39 | + try { | ||
40 | + dateNum = sdf2.parse(str); | ||
41 | + } catch (ParseException e) { | ||
42 | + e.printStackTrace(); | ||
43 | + } | ||
44 | + return dateNum; | ||
45 | + } | ||
46 | + | ||
47 | + // 将日期转换为字符串 | ||
48 | + public static String simpleDataFormat(Date date) {// yy必须小写,MM是月份,mm是分;HH是24小时制,而hh是12小时制 | ||
49 | + String str = sdf.format(date); | ||
50 | + return str; | ||
51 | + } | ||
52 | + | ||
53 | + // 给定一个日期型字符串,返回加减n天后的日期型字符串 | ||
54 | + public static String nDaysAfterOneDateString(String basicDate, int n) { | ||
55 | + //SimpleDateFormat df = new SimpleDateFormat("yyyy年MM月dd日"); | ||
56 | + Date tmpDate = null; | ||
57 | + try { | ||
58 | + tmpDate = sdf2.parse(basicDate); | ||
59 | + } catch (Exception e) { | ||
60 | + // 日期型字符串格式错误 | ||
61 | + } | ||
62 | + long nDay = (tmpDate.getTime() / (24 * 60 * 60 * 1000) + 1 + n)* (24 * 60 * 60 * 1000); | ||
63 | + tmpDate.setTime(nDay); | ||
64 | + | ||
65 | + return sdf2.format(tmpDate); | ||
66 | + } | ||
67 | + | ||
68 | + //获取当前时间加减后的日期 | ||
69 | + public static String lastDays(int n){ | ||
70 | + String resultdate=""; | ||
71 | + try { | ||
72 | + //获取几天之前的时间 | ||
73 | + SimpleDateFormat formatDate = new SimpleDateFormat("yyyy-MM-dd"); //字符串转换 | ||
74 | + Calendar c = Calendar.getInstance(); | ||
75 | + c.setTimeInMillis(new Date().getTime()); | ||
76 | + c.add(Calendar.DATE, n);//多少天后的日期 | ||
77 | + Date date= new Date(c.getTimeInMillis()); //将c转换成Date | ||
78 | + resultdate=formatDate.format(date); | ||
79 | + } catch (Exception e) { | ||
80 | + resultdate=""; | ||
81 | + e.printStackTrace(); | ||
82 | + } | ||
83 | + return resultdate; | ||
84 | + } | ||
85 | + // 给定一个日期,返回加减n天后的日期 | ||
86 | + public static Date nDaysAfterOneDate(Date basicDate, int n) { | ||
87 | + long nDay = (basicDate.getTime() / (24 * 60 * 60 * 1000) + 1 + n) | ||
88 | + * (24 * 60 * 60 * 1000); | ||
89 | + basicDate.setTime(nDay); | ||
90 | + | ||
91 | + return basicDate; | ||
92 | + } | ||
93 | + | ||
94 | + // 判断日期为星期几,0为星期天,依此类推 | ||
95 | + public static String dayOfWeek(String strdate) { | ||
96 | + SimpleDateFormat df = new SimpleDateFormat("yyyy年MM月dd日"); | ||
97 | + Date date = null; | ||
98 | + try { | ||
99 | + date = df.parse(strdate); | ||
100 | + } catch (ParseException e) { | ||
101 | + // TODO Auto-generated catch block | ||
102 | + System.out.println("字符型转日期有异常"); | ||
103 | + } | ||
104 | + // 首先定义一个calendar,必须使用getInstance()进行实例化 | ||
105 | + Calendar aCalendar = Calendar.getInstance(); | ||
106 | + // 里面野可以直接插入date类型 | ||
107 | + aCalendar.setTime(date); | ||
108 | + // 计算此日期是一周中的哪一天 | ||
109 | + int x = aCalendar.get(Calendar.DAY_OF_WEEK) - 1; | ||
110 | + String week = ""; | ||
111 | + switch (x) { | ||
112 | + case 0: | ||
113 | + week = "星期天"; | ||
114 | + break; | ||
115 | + case 1: | ||
116 | + week = "星期一"; | ||
117 | + break; | ||
118 | + case 2: | ||
119 | + week = "星期二"; | ||
120 | + break; | ||
121 | + case 3: | ||
122 | + week = "星期三"; | ||
123 | + break; | ||
124 | + case 4: | ||
125 | + week = "星期四"; | ||
126 | + break; | ||
127 | + case 5: | ||
128 | + week = "星期五"; | ||
129 | + break; | ||
130 | + case 6: | ||
131 | + week = "星期六"; | ||
132 | + break; | ||
133 | + | ||
134 | + } | ||
135 | + return week; | ||
136 | + } | ||
137 | + | ||
138 | + /* | ||
139 | + * 本应用未用到 | ||
140 | + */ | ||
141 | + // 计算两个日期相隔的天数 | ||
142 | + public static int nDaysBetweenTwoDate(Date firstDate, Date secondDate) { | ||
143 | + int nDay = (int) ((secondDate.getTime() - firstDate.getTime()) / (24 * 60 * 60 * 1000)); | ||
144 | + return nDay; | ||
145 | + } | ||
146 | + | ||
147 | + // 计算两个日期相隔的天数 | ||
148 | + public static int nDaysBetweenTwoDate(String firstString, String secondString) { | ||
149 | + SimpleDateFormat df = new SimpleDateFormat("yyyy-MM-dd"); | ||
150 | + Date firstDate = null; | ||
151 | + Date secondDate = null; | ||
152 | + try { | ||
153 | + firstDate = df.parse(firstString); | ||
154 | + secondDate = df.parse(secondString); | ||
155 | + } catch (Exception e) { | ||
156 | + // 日期型字符串格式错误 | ||
157 | + } | ||
158 | + | ||
159 | + int nDay = (int) ((secondDate.getTime() - firstDate.getTime()) / (24 * 60 * 60 * 1000)); | ||
160 | + | ||
161 | + System.out.println("相差"+nDay+"天"); | ||
162 | + return nDay; | ||
163 | + } | ||
164 | + | ||
165 | + // 某年某月有多少天 | ||
166 | + public static int yearMonthDay(int year, int month) { | ||
167 | + int day = 0; | ||
168 | + if (((month >= 1) && (month <= 12)) && (year >= 0)) { | ||
169 | + if (month == 2) { | ||
170 | + if ((((year % 4) == 0) && ((year % 100) != 0))|| ((year % 400) == 0)) | ||
171 | + day = 29; | ||
172 | + else | ||
173 | + day = 28; | ||
174 | + } else { | ||
175 | + if ((month == 1) || (month == 3) || (month == 5) | ||
176 | + || (month == 7) || (month == 8) || (month == 10) | ||
177 | + || (month == 12)) | ||
178 | + | ||
179 | + day = 31; | ||
180 | + else | ||
181 | + day = 30; | ||
182 | + } | ||
183 | + System.out.println(year + "年" + month + "月的天数为:" + day); | ||
184 | + } else { | ||
185 | + System.out.println("请输入正确的年月!"); | ||
186 | + } | ||
187 | + return day; | ||
188 | + | ||
189 | + } | ||
190 | + //判断两时间相差的分钟数 | ||
191 | + public static long minutes(String beginDate,String endDate){ | ||
192 | + | ||
193 | + Date begin = null; | ||
194 | + Date end = null; | ||
195 | + SimpleDateFormat dfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
196 | + long minute1=0; | ||
197 | + try { | ||
198 | + begin = dfs.parse(beginDate); | ||
199 | + end = dfs.parse(endDate); | ||
200 | + | ||
201 | + long between = (end.getTime() - begin.getTime()) / 1000;// 除以1000是为了转换成秒 | ||
202 | + minute1 = between / 60; | ||
203 | + | ||
204 | + } catch (Exception e) { | ||
205 | + e.printStackTrace(); | ||
206 | + } | ||
207 | + return minute1; | ||
208 | + | ||
209 | + } | ||
210 | + | ||
211 | + //获取当前时间的季度 | ||
212 | + public static String getQuarter(){ | ||
213 | + SimpleDateFormat dfs = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
214 | + String nowDate= dfs.format(new Date()); | ||
215 | + | ||
216 | + String[] str=nowDate.split("-"); | ||
217 | + int nowmonth=Integer.parseInt(str[1]); | ||
218 | + if(nowmonth<=3){ | ||
219 | + return "第一季度"; | ||
220 | + }else if(nowmonth>3&&nowmonth<=6){ | ||
221 | + return "第二季度"; | ||
222 | + }else if(nowmonth>6&&nowmonth<=9){ | ||
223 | + return "第三季度"; | ||
224 | + }else{ | ||
225 | + return "第四季度"; | ||
226 | + } | ||
227 | + } | ||
228 | + | ||
229 | + //获取当前第多少周 | ||
230 | + public static String getWeekDay(){ | ||
231 | + TimeZone zone=TimeZone.getTimeZone("Asia/Shanghai"); | ||
232 | + Calendar cal = Calendar.getInstance(zone); | ||
233 | + int c = cal.get(cal.WEEK_OF_YEAR); | ||
234 | + return c+""; | ||
235 | + } | ||
236 | + | ||
237 | + //时区换算为当前北京时间(参数:1.选择的时间,2.时区) | ||
238 | +// public static String hourdiffer(String newStrTimer,int timeZone) throws Exception{ | ||
239 | +// int hour=0;//时区相差的时间(小时) | ||
240 | +// int minutes=0;//时区相差的时间(分钟) | ||
241 | +// String marginTimer="";//各时区差 | ||
242 | +// Date tmpDate = null; | ||
243 | +// //时间格式转换 | ||
244 | +// newStrTimer=newStrTimer.replace("年", "-"); | ||
245 | +// newStrTimer=newStrTimer.replace("月", "-"); | ||
246 | +// newStrTimer=newStrTimer.replace("日", " "); | ||
247 | +// newStrTimer=newStrTimer.replace("时", ":"); | ||
248 | +// newStrTimer=newStrTimer.replace("分", ":"); | ||
249 | +// newStrTimer=newStrTimer.replace("秒", ""); | ||
250 | +// | ||
251 | +// switch (timeZone) { | ||
252 | +// case 1://北京时区 | ||
253 | +// hour=0; | ||
254 | +// minutes=0; | ||
255 | +// break; | ||
256 | +// case 2://美国时区 | ||
257 | +// marginTimer="12"; | ||
258 | +// hour=Integer.parseInt(marginTimer); | ||
259 | +// minutes=0; | ||
260 | +// //minutes=Integer.parseInt(marginTimer.split(".")[1]); | ||
261 | +// break; | ||
262 | +// case 3://英国时区 | ||
263 | +// | ||
264 | +// break; | ||
265 | +// case 4://北京时区 | ||
266 | +// | ||
267 | +// break; | ||
268 | +// case 5://北京时区 | ||
269 | +// | ||
270 | +// break; | ||
271 | +// case 6://北京时区 | ||
272 | +// | ||
273 | +// break; | ||
274 | +// case 7://北京时区 | ||
275 | +// | ||
276 | +// break; | ||
277 | +// case 8://北京时区 | ||
278 | +// | ||
279 | +// break; | ||
280 | +// case 9://北京时区 | ||
281 | +// break; | ||
282 | +// default: | ||
283 | +// break; | ||
284 | +// } | ||
285 | +// tmpDate = sdf2.parse(newStrTimer); | ||
286 | +// Calendar now = Calendar.getInstance(); | ||
287 | +// now.setTime(tmpDate); | ||
288 | +// now.set(Calendar.HOUR, now.get(Calendar.HOUR) + hour); | ||
289 | +// now.set(Calendar.MINUTE, now.get(Calendar.MINUTE) + minutes); | ||
290 | +// SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
291 | +// return sdf.format(now.getTime()); | ||
292 | +// } | ||
293 | + | ||
294 | + /**获取当前时间*/ | ||
295 | + public static String getNowDate(){ | ||
296 | + String nowdate="2000-01-01 01:00:00"; | ||
297 | + try { | ||
298 | + SimpleDateFormat df=new SimpleDateFormat("yyyy-MM-dd HH:mm:ss"); | ||
299 | + nowdate=df.format(new Date()); | ||
300 | + } catch (Exception e) { | ||
301 | + e.printStackTrace(); | ||
302 | + } | ||
303 | + return nowdate; | ||
304 | + } | ||
305 | + | ||
306 | + | ||
307 | + public static void main(String[] args) { | ||
308 | + //获取几天之前的时间 | ||
309 | + SimpleDateFormat formatDate = new SimpleDateFormat("yyyy-MM-dd"); //字符串转换 | ||
310 | + Calendar c = Calendar.getInstance(); | ||
311 | + //new Date().getTime();这个是获得当前电脑的时间,你也可以换成一个随意的时间 | ||
312 | + c.setTimeInMillis(new Date().getTime()); | ||
313 | + c.add(Calendar.DATE, -1);//5天后的日期 | ||
314 | + Date date= new Date(c.getTimeInMillis()); //将c转换成Date | ||
315 | + System.out.println("date="+formatDate.format(date)); | ||
316 | + | ||
317 | + } | ||
318 | +} |
不能预览此文件类型
不能预览此文件类型
1 | +Window |
1 | +package yxy.timer.dao; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.pojo.YxyReadingDayInfo; | ||
6 | + | ||
7 | +/** | ||
8 | + * | ||
9 | + * @author 谢勇 | ||
10 | + * 今日点读信息dao | ||
11 | + */ | ||
12 | +public interface YxyReadingDayInfoDao { | ||
13 | + | ||
14 | + /**实体插入*/ | ||
15 | + public int addPojo(YxyReadingDayInfo o)throws Exception; | ||
16 | + /**实体插入*/ | ||
17 | + public void addPojoPi(List<YxyReadingDayInfo> list)throws Exception; | ||
18 | + /**实体编辑*/ | ||
19 | + public void updatePojo(YxyReadingDayInfo o)throws Exception; | ||
20 | + /**HQL查询*/ | ||
21 | + public List<YxyReadingDayInfo> findByHql(String hql)throws Exception; | ||
22 | + /**SQL查询*/ | ||
23 | + public List<Object> findBySqlQuery(String sql)throws Exception; | ||
24 | + /**SQL更新*/ | ||
25 | + public void updateBySql(String sql)throws Exception; | ||
26 | + /**指定条记录*/ | ||
27 | + public List<YxyReadingDayInfo> findByHqlSet(String hql,int num)throws Exception; | ||
28 | + /**HQL更新*/ | ||
29 | + public void updateByHql(String hql)throws Exception; | ||
30 | +} |
不能预览此文件类型
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<classpath> | ||
3 | + <classpathentry kind="src" path="src"/> | ||
4 | + <classpathentry kind="con" path="org.eclipse.jdt.launching.JRE_CONTAINER"/> | ||
5 | + <classpathentry kind="con" path="melibrary.com.genuitec.eclipse.j2eedt.core.MYECLIPSE_JAVAEE_5_CONTAINER"/> | ||
6 | + <classpathentry exported="true" kind="lib" path="WebRoot/WEB-INF/lib/hibernate3.jar"/> | ||
7 | + <classpathentry exported="true" kind="lib" path="WebRoot/WEB-INF/lib/hibernate-jpa-2.0-api-1.0.1.Final.jar"/> | ||
8 | + <classpathentry exported="true" kind="lib" path="WebRoot/WEB-INF/lib/common-annotations.jar"/> | ||
9 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/spring-beans.jar"/> | ||
10 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/spring-web.jar"/> | ||
11 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/spring.jar"/> | ||
12 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/mysql-connector-java-5.1.6-bin.jar"/> | ||
13 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-logging-1.1.1.jar"/> | ||
14 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/aspectjweaver.jar"/> | ||
15 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/dom4j-1.6.1.jar"/> | ||
16 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/slf4j-api-1.6.1.jar"/> | ||
17 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/jta-1.1.jar"/> | ||
18 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-collections-3.1.jar"/> | ||
19 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/javassist-3.12.0.GA.jar"/> | ||
20 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/quartz.jar"/> | ||
21 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/antlr-2.7.6.jar"/> | ||
22 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-beanutils.jar"/> | ||
23 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-io-1.4.jar"/> | ||
24 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/commons-lang.jar"/> | ||
25 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cxf-2.6.2.jar"/> | ||
26 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cxf-manifest.jar"/> | ||
27 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cxf-services-sts-core-2.6.2.jar"/> | ||
28 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cxf-services-wsn-api-2.6.2.jar"/> | ||
29 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cxf-services-wsn-core-2.6.2.jar"/> | ||
30 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cxf-xjc-boolean-2.6.0.jar"/> | ||
31 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cxf-xjc-bug671-2.6.0.jar"/> | ||
32 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cxf-xjc-dv-2.6.0.jar"/> | ||
33 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cxf-xjc-runtime-2.6.0.jar"/> | ||
34 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/cxf-xjc-ts-2.6.0.jar"/> | ||
35 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/ezmorph-1.0.6.jar"/> | ||
36 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/fastjson-1.1.36.jar"/> | ||
37 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/json-lib-2.4-jdk15.jar"/> | ||
38 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/neethi-3.0.2.jar"/> | ||
39 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/wsdl4j-1.6.2.jar"/> | ||
40 | + <classpathentry kind="lib" path="WebRoot/WEB-INF/lib/xmlschema-core-2.0.3.jar"/> | ||
41 | + <classpathentry kind="output" path="WebRoot/WEB-INF/classes"/> | ||
42 | +</classpath> |
1 | +package yxy.timer.tool; | ||
2 | + | ||
3 | +import java.sql.Connection; | ||
4 | +import java.sql.ResultSet; | ||
5 | +import java.sql.SQLException; | ||
6 | +import java.sql.Statement; | ||
7 | + | ||
8 | +import javax.sql.DataSource; | ||
9 | + | ||
10 | +public class DBUtil | ||
11 | +{ | ||
12 | + private static DataSource dataSource; | ||
13 | + | ||
14 | + //获得连接 | ||
15 | + public static Connection getConnection(String datesource) throws SQLException | ||
16 | + { | ||
17 | + dataSource = (DataSource) SpringFactory.getObject(datesource); | ||
18 | + return dataSource.getConnection(); | ||
19 | + } | ||
20 | + | ||
21 | + | ||
22 | + //关闭数据库连接 | ||
23 | + public static void close(ResultSet rs,Statement st,Connection conn){ | ||
24 | + | ||
25 | + if(rs!=null){ try { | ||
26 | + rs.close(); | ||
27 | + } catch (SQLException e) { | ||
28 | + e.printStackTrace(); | ||
29 | + }finally{ | ||
30 | + if(st!=null){ | ||
31 | + try { | ||
32 | + st.close(); | ||
33 | + } catch (SQLException e) { | ||
34 | + e.printStackTrace(); | ||
35 | + }finally{ | ||
36 | + if(conn!=null){ | ||
37 | + try { | ||
38 | + conn.close(); | ||
39 | + } catch (SQLException e) { | ||
40 | + e.printStackTrace(); | ||
41 | + } | ||
42 | + } | ||
43 | + } | ||
44 | + } | ||
45 | + } | ||
46 | + } | ||
47 | + } | ||
48 | +} | ||
49 | + |
1 | +package yxy.timer.dao; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.pojo.YxyMailDayCount; | ||
6 | + | ||
7 | +/** | ||
8 | + * 程序名称: EspeedMail_时速邮箱 | ||
9 | + * 程序版本: V1.0 | ||
10 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
11 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
12 | + * 技术支持: Tech@21gmail.com | ||
13 | + * 单元名称: 日发量统计dao接口(营销游) | ||
14 | + * 开始时间: 2013.12.09 | ||
15 | + * 程 序 员: 谢勇 | ||
16 | + * 最后修改: | ||
17 | + * 备 注: 如需修改请通知程序员 | ||
18 | + */ | ||
19 | +public interface YxyMailDayCountDao { | ||
20 | + | ||
21 | + /**实体插入*/ | ||
22 | + public int addPojo(YxyMailDayCount o)throws Exception; | ||
23 | + /**实体编辑*/ | ||
24 | + public void updatePojo(YxyMailDayCount o)throws Exception; | ||
25 | + /**HQL查询*/ | ||
26 | + public List<YxyMailDayCount> findByHql(String hql)throws Exception; | ||
27 | + /**SQL查询*/ | ||
28 | + public List<Object> findBySqlQuery(String sql)throws Exception; | ||
29 | + /**指定条记录*/ | ||
30 | + public List<YxyMailDayCount> findByHqlSet(String hql,int num)throws Exception; | ||
31 | + /**HQL更新*/ | ||
32 | + public void updateByHql(String hql)throws Exception; | ||
33 | +} |
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.GeneratedValue; | ||
7 | +import javax.persistence.GenerationType; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Table; | ||
10 | + | ||
11 | +/** | ||
12 | + * 程序名称: EspeedMail_时速邮箱 | ||
13 | + * 程序版本: V1.0 | ||
14 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
15 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
16 | + * 技术支持: Tech@21gmail.com | ||
17 | + * 单元名称: 退订实体(营销游) | ||
18 | + * 开始时间: 2013.12.09 | ||
19 | + * 程 序 员: 谢勇 | ||
20 | + * 最后修改: | ||
21 | + * 备 注: 如需修改请通知程序员 | ||
22 | + */ | ||
23 | +@Entity | ||
24 | +@Table(name="yxy_unsubscribe_info") | ||
25 | +public class YxyUnsubscribeInfo implements Serializable{ | ||
26 | + private static final long serialVersionUID = 1L; | ||
27 | + private int unsubscribe_id; | ||
28 | + private String unsubscribe_loginid;//用户账号 | ||
29 | + private String unsubscribe_domain;//用户所属域名 | ||
30 | + private String unsubscribe_mail_uid;//邮件唯一码 | ||
31 | + private String unsubscribe_date;//退订时间 | ||
32 | + private String unsubscribe_body;//退订理由 | ||
33 | + private String unsubscribe_email;//退订地址 | ||
34 | + private int unsubscribe_issys;//是不是用户自己添加的 | ||
35 | + private int is_timer_count;//定时器是否统计过,0没统计,1已统计 | ||
36 | + private String ip; | ||
37 | + private String area; | ||
38 | + private String user_agent; | ||
39 | + private String user_agent_info; | ||
40 | + private int unsubscribe_year; | ||
41 | + private int unsubscribe_month; | ||
42 | + private int unsubscribe_day; | ||
43 | + @Id | ||
44 | + @GeneratedValue(strategy=GenerationType.AUTO) | ||
45 | + public int getUnsubscribe_id() { | ||
46 | + return unsubscribe_id; | ||
47 | + } | ||
48 | + public void setUnsubscribe_id(int unsubscribeId) { | ||
49 | + unsubscribe_id = unsubscribeId; | ||
50 | + } | ||
51 | + public String getUnsubscribe_loginid() { | ||
52 | + return unsubscribe_loginid; | ||
53 | + } | ||
54 | + public void setUnsubscribe_loginid(String unsubscribeLoginid) { | ||
55 | + unsubscribe_loginid = unsubscribeLoginid; | ||
56 | + } | ||
57 | + public String getUnsubscribe_domain() { | ||
58 | + return unsubscribe_domain; | ||
59 | + } | ||
60 | + public void setUnsubscribe_domain(String unsubscribeDomain) { | ||
61 | + unsubscribe_domain = unsubscribeDomain; | ||
62 | + } | ||
63 | + public String getUnsubscribe_mail_uid() { | ||
64 | + return unsubscribe_mail_uid; | ||
65 | + } | ||
66 | + public void setUnsubscribe_mail_uid(String unsubscribeMailUid) { | ||
67 | + unsubscribe_mail_uid = unsubscribeMailUid; | ||
68 | + } | ||
69 | + public String getUnsubscribe_date() { | ||
70 | + return unsubscribe_date; | ||
71 | + } | ||
72 | + public void setUnsubscribe_date(String unsubscribeDate) { | ||
73 | + unsubscribe_date = unsubscribeDate; | ||
74 | + } | ||
75 | + public String getUnsubscribe_body() { | ||
76 | + return unsubscribe_body; | ||
77 | + } | ||
78 | + public void setUnsubscribe_body(String unsubscribeBody) { | ||
79 | + unsubscribe_body = unsubscribeBody; | ||
80 | + } | ||
81 | + public String getUnsubscribe_email() { | ||
82 | + return unsubscribe_email; | ||
83 | + } | ||
84 | + public void setUnsubscribe_email(String unsubscribeEmail) { | ||
85 | + unsubscribe_email = unsubscribeEmail; | ||
86 | + } | ||
87 | + public int getUnsubscribe_issys() { | ||
88 | + return unsubscribe_issys; | ||
89 | + } | ||
90 | + public void setUnsubscribe_issys(int unsubscribeIssys) { | ||
91 | + unsubscribe_issys = unsubscribeIssys; | ||
92 | + } | ||
93 | + public int getIs_timer_count() { | ||
94 | + return is_timer_count; | ||
95 | + } | ||
96 | + public void setIs_timer_count(int isTimerCount) { | ||
97 | + is_timer_count = isTimerCount; | ||
98 | + } | ||
99 | + public String getIp() { | ||
100 | + return ip; | ||
101 | + } | ||
102 | + public void setIp(String ip) { | ||
103 | + this.ip = ip; | ||
104 | + } | ||
105 | + public String getArea() { | ||
106 | + return area; | ||
107 | + } | ||
108 | + public void setArea(String area) { | ||
109 | + this.area = area; | ||
110 | + } | ||
111 | + public String getUser_agent() { | ||
112 | + return user_agent; | ||
113 | + } | ||
114 | + public void setUser_agent(String user_agent) { | ||
115 | + this.user_agent = user_agent; | ||
116 | + } | ||
117 | + public String getUser_agent_info() { | ||
118 | + return user_agent_info; | ||
119 | + } | ||
120 | + public void setUser_agent_info(String user_agent_info) { | ||
121 | + this.user_agent_info = user_agent_info; | ||
122 | + } | ||
123 | + public int getUnsubscribe_year() { | ||
124 | + return unsubscribe_year; | ||
125 | + } | ||
126 | + public void setUnsubscribe_year(int unsubscribe_year) { | ||
127 | + this.unsubscribe_year = unsubscribe_year; | ||
128 | + } | ||
129 | + public int getUnsubscribe_month() { | ||
130 | + return unsubscribe_month; | ||
131 | + } | ||
132 | + public void setUnsubscribe_month(int unsubscribe_month) { | ||
133 | + this.unsubscribe_month = unsubscribe_month; | ||
134 | + } | ||
135 | + public int getUnsubscribe_day() { | ||
136 | + return unsubscribe_day; | ||
137 | + } | ||
138 | + public void setUnsubscribe_day(int unsubscribe_day) { | ||
139 | + this.unsubscribe_day = unsubscribe_day; | ||
140 | + } | ||
141 | +} |
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.GeneratedValue; | ||
7 | +import javax.persistence.GenerationType; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Table; | ||
10 | +/** | ||
11 | + * 程序名称: EspeedMail_时速邮箱 | ||
12 | + * 程序版本: V1.0 | ||
13 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
14 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
15 | + * 技术支持: Tech@21gmail.com | ||
16 | + * 单元名称: 用户设置(营销游) | ||
17 | + * 开始时间: 2013.12.09 | ||
18 | + * 程 序 员: 谢勇 | ||
19 | + * 最后修改: | ||
20 | + * 备 注: 如需修改请通知程序员 | ||
21 | + */ | ||
22 | + | ||
23 | +@Entity | ||
24 | +@Table(name="yxy_user_set") | ||
25 | +public class YxyUserSet implements Serializable{ | ||
26 | + | ||
27 | + private int user_set_id;/**用户设置ID*/ | ||
28 | + private String user_set_loginid;//用户账号 | ||
29 | + private String user_companydomain;//用户所属域名 | ||
30 | + private String user_defalt_send_name;//默认发件人姓名 | ||
31 | + private String user_defalt_send_email;//默认发件人地址 | ||
32 | + private String user_defalt_reply_email;//默认回复地址 | ||
33 | + private int user_not_send_repeat_use;//是否启用多少天不发送重复地址 | ||
34 | + private int user_not_send_repeat_num;//不能发送重复地址天数 | ||
35 | + private int user_not_send_repeat_context_use;//是否启用多少天不发送重复内容 | ||
36 | + private int user_not_send_repeat_context_num;//是否启用多少天不发送重复内容的天数 | ||
37 | + private int user_clear_address_use;//是否开启自动清空地址数 | ||
38 | + private int user_clear_address_num;//自动清空地址数天数 | ||
39 | + | ||
40 | + @Id | ||
41 | + @GeneratedValue(strategy=GenerationType.AUTO) | ||
42 | + public int getUser_set_id() { | ||
43 | + return user_set_id; | ||
44 | + } | ||
45 | + public void setUser_set_id(int userSetId) { | ||
46 | + user_set_id = userSetId; | ||
47 | + } | ||
48 | + public String getUser_defalt_send_name() { | ||
49 | + return user_defalt_send_name; | ||
50 | + } | ||
51 | + public void setUser_defalt_send_name(String userDefaltSendName) { | ||
52 | + user_defalt_send_name = userDefaltSendName; | ||
53 | + } | ||
54 | + public String getUser_defalt_send_email() { | ||
55 | + return user_defalt_send_email; | ||
56 | + } | ||
57 | + public void setUser_defalt_send_email(String userDefaltSendEmail) { | ||
58 | + user_defalt_send_email = userDefaltSendEmail; | ||
59 | + } | ||
60 | + public String getUser_defalt_reply_email() { | ||
61 | + return user_defalt_reply_email; | ||
62 | + } | ||
63 | + public void setUser_defalt_reply_email(String userDefaltReplyEmail) { | ||
64 | + user_defalt_reply_email = userDefaltReplyEmail; | ||
65 | + } | ||
66 | + public int getUser_not_send_repeat_use() { | ||
67 | + return user_not_send_repeat_use; | ||
68 | + } | ||
69 | + public void setUser_not_send_repeat_use(int userNotSendRepeatUse) { | ||
70 | + user_not_send_repeat_use = userNotSendRepeatUse; | ||
71 | + } | ||
72 | + public int getUser_not_send_repeat_num() { | ||
73 | + return user_not_send_repeat_num; | ||
74 | + } | ||
75 | + public void setUser_not_send_repeat_num(int userNotSendRepeatNum) { | ||
76 | + user_not_send_repeat_num = userNotSendRepeatNum; | ||
77 | + } | ||
78 | + public int getUser_not_send_repeat_context_use() { | ||
79 | + return user_not_send_repeat_context_use; | ||
80 | + } | ||
81 | + public void setUser_not_send_repeat_context_use(int userNotSendRepeatContextUse) { | ||
82 | + user_not_send_repeat_context_use = userNotSendRepeatContextUse; | ||
83 | + } | ||
84 | + public int getUser_not_send_repeat_context_num() { | ||
85 | + return user_not_send_repeat_context_num; | ||
86 | + } | ||
87 | + public void setUser_not_send_repeat_context_num(int userNotSendRepeatContextNum) { | ||
88 | + user_not_send_repeat_context_num = userNotSendRepeatContextNum; | ||
89 | + } | ||
90 | + public int getUser_clear_address_use() { | ||
91 | + return user_clear_address_use; | ||
92 | + } | ||
93 | + public void setUser_clear_address_use(int userClearAddressUse) { | ||
94 | + user_clear_address_use = userClearAddressUse; | ||
95 | + } | ||
96 | + public int getUser_clear_address_num() { | ||
97 | + return user_clear_address_num; | ||
98 | + } | ||
99 | + public void setUser_clear_address_num(int userClearAddressNum) { | ||
100 | + user_clear_address_num = userClearAddressNum; | ||
101 | + } | ||
102 | + public String getUser_set_loginid() { | ||
103 | + return user_set_loginid; | ||
104 | + } | ||
105 | + public void setUser_set_loginid(String userSetLoginid) { | ||
106 | + user_set_loginid = userSetLoginid; | ||
107 | + } | ||
108 | + public String getUser_companydomain() { | ||
109 | + return user_companydomain; | ||
110 | + } | ||
111 | + public void setUser_companydomain(String userCompanydomain) { | ||
112 | + user_companydomain = userCompanydomain; | ||
113 | + } | ||
114 | + | ||
115 | + | ||
116 | + | ||
117 | +} |
1 | +package yxy.timer.method; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import org.apache.commons.lang.StringEscapeUtils; | ||
6 | + | ||
7 | +import yxy.timer.dao.TimerCountYxyDao; | ||
8 | +import yxy.timer.dao.YxyMailDayCountDao; | ||
9 | +import yxy.timer.dao.YxyReadDao; | ||
10 | +import yxy.timer.dao.YxyReplyInfoDao; | ||
11 | +import yxy.timer.dao.YxyUnsubscribeDao; | ||
12 | +import yxy.timer.pojo.TimerCountYxy; | ||
13 | +import yxy.timer.tool.DateFormat; | ||
14 | + | ||
15 | +/** | ||
16 | + * 统计分析定时器 | ||
17 | + * @author 陈南巧 | ||
18 | + */ | ||
19 | +public class YxyCountAnalysisTime | ||
20 | +{ | ||
21 | + //定时器运行的主方法 | ||
22 | + public void counting() | ||
23 | + { | ||
24 | + try | ||
25 | + { | ||
26 | + System.out.println("营销邮统计分析定时器开始,开始时间:"+DateFormat.getNowDate()); | ||
27 | + | ||
28 | + //营销邮统计发送总次数与发送总数 | ||
29 | + yxyCountSMailInfo(); | ||
30 | + | ||
31 | + //营销邮统计点读总数yxyCoutReadMail | ||
32 | + yxyCountReadMail(); | ||
33 | + | ||
34 | + //营销邮统计退订总数 | ||
35 | + yxyCountUnsubscribeMail(); | ||
36 | + | ||
37 | + //营销邮统计回复总数 | ||
38 | + yxyCountReplyMail(); | ||
39 | + | ||
40 | + System.out.println("营销邮统计分析定时器结束,结束时间:"+DateFormat.getNowDate()); | ||
41 | + } | ||
42 | + catch (Exception e) | ||
43 | + { | ||
44 | + System.out.println("营销邮统计分析定时器异常......"); | ||
45 | + | ||
46 | + e.printStackTrace(); | ||
47 | + } | ||
48 | + } | ||
49 | + | ||
50 | + //营销邮统计发送总次数与发送总数 | ||
51 | + public void yxyCountSMailInfo() | ||
52 | + { | ||
53 | + try | ||
54 | + { | ||
55 | + System.out.println("营销邮-按时间统计发送总次数与发送总数开始,开始时间:"+DateFormat.getNowDate()); | ||
56 | + | ||
57 | + String sql = "select yxy_day_count_id,yxy_day_count_loiginid,yxy_day_count_domain,yxy_day_count_date,yxy_day_count_ci_num,yxy_day_count_tol_num " + | ||
58 | + "from yxy_mail_day_count where is_timer_count = 0 limit 0,100"; | ||
59 | + | ||
60 | + List<Object> objects = yxymaildaycountdao.findBySqlQuery(sql); | ||
61 | + | ||
62 | + if(objects.size() > 0) | ||
63 | + { | ||
64 | + String ids = ""; | ||
65 | + | ||
66 | + for(int i = 0; i < objects.size(); i++) | ||
67 | + { | ||
68 | + Object []obj=(Object[])objects.get(i); | ||
69 | + //日统计表的id | ||
70 | + int yxy_day_count_id = Integer.parseInt(obj[0].toString()); | ||
71 | + ids += yxy_day_count_id + ","; | ||
72 | + //登录帐号 | ||
73 | + String loginid = obj[1].toString(); | ||
74 | + //登录域名 | ||
75 | + String domain = obj[2].toString(); | ||
76 | + //日期 | ||
77 | + String date = obj[3].toString(); | ||
78 | + //当天发送次数 | ||
79 | + int ci_num = Integer.parseInt(obj[4].toString()); | ||
80 | + //当天发送总数 | ||
81 | + int tol_num = Integer.parseInt(obj[5].toString()); | ||
82 | + //先判断记录是否存在,不存在则添加,存在则更新 | ||
83 | + sql = "select timer_id from timer_count_yxy where count_id = 8 and count_date = '"+date+"' and login_id = '"+StringEscapeUtils.escapeSql(loginid)+"' and domain = '"+StringEscapeUtils.escapeSql(domain)+"'"; | ||
84 | + | ||
85 | + List<Object> select_objects = timercountyxydao.findBySqlQuery(sql); | ||
86 | + | ||
87 | + if(select_objects.size() > 0)//已存在,则更新记录 | ||
88 | + { | ||
89 | + int timer_id = Integer.parseInt(select_objects.get(0).toString()); | ||
90 | + | ||
91 | + String hql = "update TimerCountYxy set day_count = "+ci_num+" where timer_id = "+timer_id; | ||
92 | + | ||
93 | + timercountyxydao.updateByHql(hql); | ||
94 | + } | ||
95 | + else//不存在,则添加记录 | ||
96 | + { | ||
97 | + TimerCountYxy yxy1 = new TimerCountYxy(); | ||
98 | + yxy1.setCount_date(date); | ||
99 | + yxy1.setDay(date.split("-")[2]); | ||
100 | + yxy1.setMonth(date.split("-")[1]); | ||
101 | + yxy1.setYear(Integer.parseInt(date.split("-")[0])); | ||
102 | + yxy1.setLogin_id(loginid); | ||
103 | + yxy1.setDomain(domain); | ||
104 | + yxy1.setCount_id(8); | ||
105 | + yxy1.setDay_count(ci_num); | ||
106 | + yxy1.setRecord_id(""); | ||
107 | + timercountyxydao.addPojo(yxy1); | ||
108 | + } | ||
109 | + | ||
110 | + sql = "select timer_id from timer_count_yxy where count_id = 9 and count_date = '"+date+"' and login_id = '"+StringEscapeUtils.escapeSql(loginid)+"' and domain = '"+StringEscapeUtils.escapeSql(domain)+"'"; | ||
111 | + | ||
112 | + select_objects = timercountyxydao.findBySqlQuery(sql); | ||
113 | + | ||
114 | + if(select_objects.size() > 0)//已存在,则更新记录 | ||
115 | + { | ||
116 | + int timer_id = Integer.parseInt(select_objects.get(0).toString()); | ||
117 | + | ||
118 | + String hql = "update TimerCountYxy set day_count = "+ci_num+" where timer_id = "+timer_id; | ||
119 | + | ||
120 | + timercountyxydao.updateByHql(hql); | ||
121 | + } | ||
122 | + else//不存在,则添加记录 | ||
123 | + { | ||
124 | + TimerCountYxy yxy2 = new TimerCountYxy(); | ||
125 | + yxy2.setCount_date(date); | ||
126 | + yxy2.setDay(date.split("-")[2]); | ||
127 | + yxy2.setMonth(date.split("-")[1]); | ||
128 | + yxy2.setYear(Integer.parseInt(date.split("-")[0])); | ||
129 | + yxy2.setLogin_id(loginid); | ||
130 | + yxy2.setDomain(domain); | ||
131 | + yxy2.setCount_id(9); | ||
132 | + yxy2.setDay_count(tol_num); | ||
133 | + yxy2.setRecord_id(""); | ||
134 | + timercountyxydao.addPojo(yxy2); | ||
135 | + } | ||
136 | + } | ||
137 | + | ||
138 | + ids = ids.substring(0, ids.length()-1);//去掉最后一个分号 | ||
139 | + | ||
140 | + //操作完毕后改变该日统计表的状态为已统计 | ||
141 | + String hql = "update YxyMailDayCount set is_timer_count = 1 where yxy_day_count_id in("+ids+")"; | ||
142 | + | ||
143 | + yxymaildaycountdao.updateByHql(hql); | ||
144 | + } | ||
145 | + | ||
146 | + System.out.println("营销邮-按时间统计发送总次数与发送总数结束,结束时间:"+DateFormat.getNowDate()); | ||
147 | + } | ||
148 | + catch (Exception e) | ||
149 | + { | ||
150 | + e.printStackTrace(); | ||
151 | + | ||
152 | + System.out.println("营销邮--统计发送总次数与发送总数异常......"); | ||
153 | + } | ||
154 | + } | ||
155 | + | ||
156 | + //营销邮统计点读总数 | ||
157 | + public void yxyCountReadMail() | ||
158 | + { | ||
159 | + try | ||
160 | + { | ||
161 | + System.out.println("营销邮-按时间统计点读总数开始,开始时间:"+DateFormat.getNowDate()); | ||
162 | + | ||
163 | + String sql = "select * from yxy_reading_info where is_timer_count = 0 LIMIT 0,100"; | ||
164 | + | ||
165 | + List<Object> objects = yxyreaddao.findBySql(sql); | ||
166 | + | ||
167 | + if(objects.size() > 0) | ||
168 | + { | ||
169 | + String ids = ""; | ||
170 | + | ||
171 | + for(int i = 0; i < objects.size(); i++) | ||
172 | + { | ||
173 | + Object []obj = (Object[])objects.get(i); | ||
174 | + | ||
175 | + //点读id | ||
176 | + int yxy_reading_id = Integer.parseInt(obj[0].toString()); | ||
177 | + ids += yxy_reading_id + ","; | ||
178 | + | ||
179 | + //登录帐号 | ||
180 | + String loginid = obj[1].toString(); | ||
181 | + | ||
182 | + //登录域名 | ||
183 | + String domain = obj[2].toString(); | ||
184 | + | ||
185 | + //当天点读数量 | ||
186 | + int count = Integer.parseInt(obj[7].toString()); | ||
187 | + | ||
188 | + //日期 | ||
189 | + String date = obj[5].toString().split(" ")[0]; | ||
190 | + | ||
191 | + //先判断记录是否存在,不存在则添加,存在则更新 | ||
192 | + sql = "select timer_id,day_count from timer_count_yxy where count_id = 10 and count_date = '"+date+"' and login_id = '"+StringEscapeUtils.escapeSql(loginid)+"' and domain = '"+StringEscapeUtils.escapeSql(domain)+"'"; | ||
193 | + | ||
194 | + List<Object> select_objects = timercountyxydao.findBySqlQuery(sql); | ||
195 | + | ||
196 | + if(select_objects.size() > 0)//已存在,则更新记录 | ||
197 | + { | ||
198 | + Object []arr_select_objects = (Object[])select_objects.get(0); | ||
199 | + | ||
200 | + int timer_id = Integer.parseInt(arr_select_objects[0].toString()); | ||
201 | + | ||
202 | + int day_count = Integer.parseInt(arr_select_objects[1].toString()); | ||
203 | + | ||
204 | + day_count = day_count + count; | ||
205 | + | ||
206 | + String hql = "update TimerCountYxy set day_count = "+day_count+" where timer_id = "+timer_id; | ||
207 | + | ||
208 | + timercountyxydao.updateByHql(hql); | ||
209 | + } | ||
210 | + else//不存在,则添加记录 | ||
211 | + { | ||
212 | + TimerCountYxy yxy1 = new TimerCountYxy(); | ||
213 | + yxy1.setCount_date(date); | ||
214 | + yxy1.setDay(date.split("-")[2]); | ||
215 | + yxy1.setMonth(date.split("-")[1]); | ||
216 | + yxy1.setYear(Integer.parseInt(date.split("-")[0])); | ||
217 | + yxy1.setLogin_id(loginid); | ||
218 | + yxy1.setDomain(domain); | ||
219 | + yxy1.setCount_id(10); | ||
220 | + yxy1.setDay_count(count); | ||
221 | + yxy1.setRecord_id(""); | ||
222 | + timercountyxydao.addPojo(yxy1); | ||
223 | + } | ||
224 | + } | ||
225 | + | ||
226 | + ids = ids.substring(0, ids.length()-1);//去掉最后一个分号 | ||
227 | + | ||
228 | + //操作完毕后改变该点读表的状态为已统计 | ||
229 | + String hql = "update YxyReadingInfo set is_timer_count = 1 where yxy_reading_id in("+ids+")"; | ||
230 | + | ||
231 | + yxyreaddao.updateByHql(hql); | ||
232 | + } | ||
233 | + | ||
234 | + System.out.println("营销邮-按时间统计点读总数结束,结束时间:"+DateFormat.getNowDate()); | ||
235 | + } | ||
236 | + catch (Exception e) | ||
237 | + { | ||
238 | + e.printStackTrace(); | ||
239 | + | ||
240 | + System.out.println("营销邮--统计点读总数异常......"); | ||
241 | + } | ||
242 | + } | ||
243 | + | ||
244 | + //营销邮统计退订总数 | ||
245 | + public void yxyCountUnsubscribeMail() | ||
246 | + { | ||
247 | + try | ||
248 | + { | ||
249 | + System.out.println("营销邮-按时间统计退订总数开始,开始时间:"+DateFormat.getNowDate()); | ||
250 | + | ||
251 | + String sql = "select * from yxy_unsubscribe_info where is_timer_count = 0 LIMIT 0,100"; | ||
252 | + | ||
253 | + List<Object> objects = yxyunsubscribedao.findBySql(sql); | ||
254 | + | ||
255 | + if(objects.size() > 0) | ||
256 | + { | ||
257 | + String ids = ""; | ||
258 | + | ||
259 | + for(int i = 0; i < objects.size(); i++) | ||
260 | + { | ||
261 | + Object []obj=(Object[])objects.get(i); | ||
262 | + | ||
263 | + //退订id | ||
264 | + int unsubscribe_id = Integer.parseInt(obj[0].toString()); | ||
265 | + ids += unsubscribe_id + ","; | ||
266 | + | ||
267 | + //登录帐号 | ||
268 | + String loginid = obj[1].toString(); | ||
269 | + | ||
270 | + //登录域名 | ||
271 | + String domain = obj[2].toString(); | ||
272 | + | ||
273 | + //日期 | ||
274 | + String date = obj[4].toString().split(" ")[0]; | ||
275 | + | ||
276 | + //先判断记录是否存在,不存在则添加,存在则更新 | ||
277 | + sql = "select timer_id,day_count from timer_count_yxy where count_id = 11 and count_date = '"+date+"' and login_id = '"+StringEscapeUtils.escapeSql(loginid)+"' and domain = '"+StringEscapeUtils.escapeSql(domain)+"'"; | ||
278 | + | ||
279 | + List<Object> select_objects = timercountyxydao.findBySqlQuery(sql); | ||
280 | + | ||
281 | + if(select_objects.size() > 0)//已存在,则更新记录 | ||
282 | + { | ||
283 | + Object []arr_select_objects = (Object[])select_objects.get(0); | ||
284 | + | ||
285 | + int timer_id = Integer.parseInt(arr_select_objects[0].toString()); | ||
286 | + | ||
287 | + int day_count = Integer.parseInt(arr_select_objects[1].toString()); | ||
288 | + | ||
289 | + day_count = day_count + 1; | ||
290 | + | ||
291 | + String hql = "update TimerCountYxy set day_count = "+day_count+" where timer_id = "+timer_id; | ||
292 | + | ||
293 | + timercountyxydao.updateByHql(hql); | ||
294 | + } | ||
295 | + else//不存在,则添加记录 | ||
296 | + { | ||
297 | + TimerCountYxy yxy = new TimerCountYxy(); | ||
298 | + yxy.setCount_date(date); | ||
299 | + yxy.setDay(date.split("-")[2]); | ||
300 | + yxy.setMonth(date.split("-")[1]); | ||
301 | + yxy.setYear(Integer.parseInt(date.split("-")[0])); | ||
302 | + yxy.setLogin_id(loginid); | ||
303 | + yxy.setDomain(domain); | ||
304 | + yxy.setCount_id(11); | ||
305 | + yxy.setDay_count(1); | ||
306 | + yxy.setRecord_id(""); | ||
307 | + timercountyxydao.addPojo(yxy); | ||
308 | + } | ||
309 | + } | ||
310 | + | ||
311 | + ids = ids.substring(0, ids.length()-1);//去掉最后一个分号 | ||
312 | + | ||
313 | + //操作完毕后改变该退订表的状态为已统计 | ||
314 | + String hql = "update YxyUnsubscribeInfo set is_timer_count = 1 where unsubscribe_id in("+ids+")"; | ||
315 | + | ||
316 | + yxyunsubscribedao.updateByHql(hql); | ||
317 | + } | ||
318 | + | ||
319 | + System.out.println("营销邮-按时间统计退订总数结束,结束时间:"+DateFormat.getNowDate()); | ||
320 | + } | ||
321 | + catch (Exception e) | ||
322 | + { | ||
323 | + e.printStackTrace(); | ||
324 | + | ||
325 | + System.out.println("营销邮--统计退订总数异常......"); | ||
326 | + } | ||
327 | + } | ||
328 | + | ||
329 | + //营销邮统计回复总数 | ||
330 | + public void yxyCountReplyMail() | ||
331 | + { | ||
332 | + try | ||
333 | + { | ||
334 | + System.out.println("营销邮-按时间统计回复总数开始,开始时间:"+DateFormat.getNowDate()); | ||
335 | + | ||
336 | + String sql = "select * from yxy_reply_info where is_timer_count = 0 LIMIT 0,100"; | ||
337 | + | ||
338 | + List<Object> objects = yxyreplyinfodao.findBySql(sql); | ||
339 | + | ||
340 | + if(objects.size() > 0) | ||
341 | + { | ||
342 | + String ids = ""; | ||
343 | + | ||
344 | + for(int i = 0; i < objects.size(); i++) | ||
345 | + { | ||
346 | + Object []obj=(Object[])objects.get(i); | ||
347 | + | ||
348 | + //回复id | ||
349 | + int replyid = Integer.parseInt(obj[0].toString()); | ||
350 | + ids += replyid + ","; | ||
351 | + | ||
352 | + //登录帐号 | ||
353 | + String loginid = obj[1].toString(); | ||
354 | + | ||
355 | + //登录域名 | ||
356 | + String domain = obj[2].toString(); | ||
357 | + | ||
358 | + //日期 | ||
359 | + String date = obj[3].toString().split(" ")[0]; | ||
360 | + | ||
361 | + //先判断记录是否存在,不存在则添加,存在则更新 | ||
362 | + sql = "select timer_id,day_count from timer_count_yxy where count_id = 12 and count_date = '"+date+"' and login_id = '"+StringEscapeUtils.escapeSql(loginid)+"' and domain = '"+StringEscapeUtils.escapeSql(domain)+"'"; | ||
363 | + | ||
364 | + List<Object> select_objects = timercountyxydao.findBySqlQuery(sql); | ||
365 | + | ||
366 | + if(select_objects.size() > 0)//已存在,则更新记录 | ||
367 | + { | ||
368 | + Object []arr_select_objects = (Object[])select_objects.get(0); | ||
369 | + | ||
370 | + int timer_id = Integer.parseInt(arr_select_objects[0].toString()); | ||
371 | + | ||
372 | + int day_count = Integer.parseInt(arr_select_objects[1].toString()); | ||
373 | + | ||
374 | + day_count = day_count + 1; | ||
375 | + | ||
376 | + String hql = "update TimerCountYxy set day_count = "+day_count+" where timer_id = "+timer_id; | ||
377 | + | ||
378 | + timercountyxydao.updateByHql(hql); | ||
379 | + } | ||
380 | + else//不存在,则添加记录 | ||
381 | + { | ||
382 | + TimerCountYxy yxy = new TimerCountYxy(); | ||
383 | + yxy.setCount_date(date); | ||
384 | + yxy.setDay(date.split("-")[2]); | ||
385 | + yxy.setMonth(date.split("-")[1]); | ||
386 | + yxy.setYear(Integer.parseInt(date.split("-")[0])); | ||
387 | + yxy.setLogin_id(loginid); | ||
388 | + yxy.setDomain(domain); | ||
389 | + yxy.setCount_id(12); | ||
390 | + yxy.setDay_count(1); | ||
391 | + yxy.setRecord_id(""); | ||
392 | + timercountyxydao.addPojo(yxy); | ||
393 | + } | ||
394 | + } | ||
395 | + | ||
396 | + ids = ids.substring(0, ids.length()-1);//去掉最后一个分号 | ||
397 | + | ||
398 | + //操作完毕后改变该回复表的状态为已统计 | ||
399 | + String hql = "update YxyReplyInfo set is_timer_count = 1 where replyid in("+ids+")"; | ||
400 | + | ||
401 | + yxyreplyinfodao.updateByHql(hql); | ||
402 | + } | ||
403 | + | ||
404 | + System.out.println("营销邮-按时间统计回复总数结束,结束时间:"+DateFormat.getNowDate()); | ||
405 | + } | ||
406 | + catch (Exception e) | ||
407 | + { | ||
408 | + e.printStackTrace(); | ||
409 | + | ||
410 | + System.out.println("营销邮--统计回复总数异常......"); | ||
411 | + } | ||
412 | + } | ||
413 | + | ||
414 | + private TimerCountYxyDao timercountyxydao;//营销邮时间统计dao | ||
415 | + private YxyMailDayCountDao yxymaildaycountdao;//营销邮日总统计dao | ||
416 | + private YxyReadDao yxyreaddao;//点读dao | ||
417 | + private YxyUnsubscribeDao yxyunsubscribedao;//退订dao | ||
418 | + private YxyReplyInfoDao yxyreplyinfodao;//回复dao | ||
419 | + | ||
420 | + public TimerCountYxyDao getTimercountyxydao() { | ||
421 | + return timercountyxydao; | ||
422 | + } | ||
423 | + | ||
424 | + public void setTimercountyxydao(TimerCountYxyDao timercountyxydao) { | ||
425 | + this.timercountyxydao = timercountyxydao; | ||
426 | + } | ||
427 | + | ||
428 | + public YxyMailDayCountDao getYxymaildaycountdao() { | ||
429 | + return yxymaildaycountdao; | ||
430 | + } | ||
431 | + | ||
432 | + public void setYxymaildaycountdao(YxyMailDayCountDao yxymaildaycountdao) { | ||
433 | + this.yxymaildaycountdao = yxymaildaycountdao; | ||
434 | + } | ||
435 | + | ||
436 | + public YxyReadDao getYxyreaddao() { | ||
437 | + return yxyreaddao; | ||
438 | + } | ||
439 | + | ||
440 | + public void setYxyreaddao(YxyReadDao yxyreaddao) { | ||
441 | + this.yxyreaddao = yxyreaddao; | ||
442 | + } | ||
443 | + | ||
444 | + public YxyUnsubscribeDao getYxyunsubscribedao() { | ||
445 | + return yxyunsubscribedao; | ||
446 | + } | ||
447 | + | ||
448 | + public void setYxyunsubscribedao(YxyUnsubscribeDao yxyunsubscribedao) { | ||
449 | + this.yxyunsubscribedao = yxyunsubscribedao; | ||
450 | + } | ||
451 | + | ||
452 | + public YxyReplyInfoDao getYxyreplyinfodao() { | ||
453 | + return yxyreplyinfodao; | ||
454 | + } | ||
455 | + | ||
456 | + public void setYxyreplyinfodao(YxyReplyInfoDao yxyreplyinfodao) { | ||
457 | + this.yxyreplyinfodao = yxyreplyinfodao; | ||
458 | + } | ||
459 | +} |
1 | +package yxy.timer.webservice.interfaces; | ||
2 | + | ||
3 | +import javax.jws.WebMethod; | ||
4 | +import javax.jws.WebParam; | ||
5 | +import javax.jws.WebResult; | ||
6 | +import javax.jws.WebService; | ||
7 | + | ||
8 | +/*** | ||
9 | + * | ||
10 | + * @author 谢勇 | ||
11 | + * 获取邮件webservice接口 | ||
12 | + */ | ||
13 | +@WebService(targetNamespace="http://GetMailInterfaces.interfaces.webservice.timer.yxy/",serviceName="yxymailinfoWebservice") | ||
14 | +public interface GetMailInterfaces { | ||
15 | + | ||
16 | + /**获取邮件详细信息*/ | ||
17 | + @WebResult(name="result") | ||
18 | + @WebMethod | ||
19 | + public String getMailInfo(@WebParam(name="mailid",targetNamespace="http://GetMailInterfaces.interfaces.webservice.timer.yxy/")String mailid)throws Exception; | ||
20 | +} |
不能预览此文件类型
不能预览此文件类型
1 | +package yxy.timer.webservice.interfaces; | ||
2 | + | ||
3 | +import javax.jws.WebMethod; | ||
4 | +import javax.jws.WebParam; | ||
5 | +import javax.jws.WebResult; | ||
6 | +import javax.jws.WebService; | ||
7 | + | ||
8 | +@WebService(targetNamespace="http://LinkManWebservice.interfaces.webservice.timer.yxy/",serviceName="linkmanWebservice") | ||
9 | +public interface LinkManWebservice | ||
10 | +{ | ||
11 | + @WebResult(name="result",targetNamespace="http://LinkManWebservice.interfaces.webservice.timer.yxy/") | ||
12 | + @WebMethod | ||
13 | + public String updateLinkMan(@WebParam(name="id",targetNamespace="http://LinkManWebservice.interfaces.webservice.timer.yxy/")int id, | ||
14 | + @WebParam(name="full_name",targetNamespace="http://LinkManWebservice.interfaces.webservice.timer.yxy/")String full_name, | ||
15 | + @WebParam(name="email",targetNamespace="http://LinkManWebservice.interfaces.webservice.timer.yxy/")String email); | ||
16 | + | ||
17 | + @WebResult(name="result",targetNamespace="http://LinkManWebservice.interfaces.webservice.timer.yxy/") | ||
18 | + @WebMethod | ||
19 | + public String deleteLinkMan(@WebParam(name="id",targetNamespace="http://LinkManWebservice.interfaces.webservice.timer.yxy/")int id); | ||
20 | + | ||
21 | + @WebResult(name="result",targetNamespace="http://LinkManWebservice.interfaces.webservice.timer.yxy/") | ||
22 | + @WebMethod | ||
23 | + public String updateCustomerToPublic(@WebParam(name="customer_id",targetNamespace="http://LinkManWebservice.interfaces.webservice.timer.yxy/")String customer_id); | ||
24 | +} |
不能预览此文件类型
不能预览此文件类型
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.GeneratedValue; | ||
7 | +import javax.persistence.GenerationType; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Table; | ||
10 | +import javax.persistence.Transient; | ||
11 | +/** | ||
12 | + * 程序名称: EspeedMail_时速邮箱 | ||
13 | + * 程序版本: V1.0 | ||
14 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
15 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
16 | + * 技术支持: Tech@21gmail.com | ||
17 | + * 单元名称: 用户地址库(营销游) | ||
18 | + * 开始时间: 2013.12.09 | ||
19 | + * 程 序 员: 谢勇 | ||
20 | + * 最后修改: | ||
21 | + * 备 注: 如需修改请通知程序员 | ||
22 | + */ | ||
23 | + | ||
24 | +@Entity | ||
25 | +@Table(name="yxy_user_address") | ||
26 | +public class YxyUserAddress implements Serializable{ | ||
27 | + private int user_addr_id;//ID | ||
28 | + private int user_addr_type_id;//所属类别ID | ||
29 | + private String user_loginid;//用户账号 | ||
30 | + private String user_domain;//用户所属域名 | ||
31 | + private String user_addr_name;//姓名 | ||
32 | + private String user_addr_email;//地址 | ||
33 | + private String user_addr_add_date;//地址添加日期 | ||
34 | + private String user_addr_modify_date;//地址修改日期 | ||
35 | + private String user_addr_sex;//所属地址性别 | ||
36 | + private int isrepeat;//是否重复/ | ||
37 | + private int user_addr_status;//状态 | ||
38 | + private String user_send_time;//发送时间 | ||
39 | + private int user_send_num;//发送数 | ||
40 | + private int readingnum;//点读量 | ||
41 | + | ||
42 | + @Id | ||
43 | + @GeneratedValue(strategy=GenerationType.AUTO) | ||
44 | + public int getUser_addr_id() { | ||
45 | + return user_addr_id; | ||
46 | + } | ||
47 | + public void setUser_addr_id(int userAddrId) { | ||
48 | + user_addr_id = userAddrId; | ||
49 | + } | ||
50 | + public int getUser_addr_type_id() { | ||
51 | + return user_addr_type_id; | ||
52 | + } | ||
53 | + public void setUser_addr_type_id(int userAddrTypeId) { | ||
54 | + user_addr_type_id = userAddrTypeId; | ||
55 | + } | ||
56 | + public String getUser_addr_name() { | ||
57 | + return user_addr_name; | ||
58 | + } | ||
59 | + public void setUser_addr_name(String userAddrName) { | ||
60 | + user_addr_name = userAddrName; | ||
61 | + } | ||
62 | + public String getUser_addr_email() { | ||
63 | + return user_addr_email; | ||
64 | + } | ||
65 | + public void setUser_addr_email(String userAddrEmail) { | ||
66 | + user_addr_email = userAddrEmail; | ||
67 | + } | ||
68 | + public String getUser_addr_add_date() { | ||
69 | + return user_addr_add_date; | ||
70 | + } | ||
71 | + public void setUser_addr_add_date(String userAddrAddDate) { | ||
72 | + user_addr_add_date = userAddrAddDate; | ||
73 | + } | ||
74 | + public String getUser_addr_modify_date() { | ||
75 | + return user_addr_modify_date; | ||
76 | + } | ||
77 | + public void setUser_addr_modify_date(String userAddrModifyDate) { | ||
78 | + user_addr_modify_date = userAddrModifyDate; | ||
79 | + } | ||
80 | + public String getUser_addr_sex() { | ||
81 | + return user_addr_sex; | ||
82 | + } | ||
83 | + public void setUser_addr_sex(String userAddrSex) { | ||
84 | + user_addr_sex = userAddrSex; | ||
85 | + } | ||
86 | + @Transient | ||
87 | + public int getIsrepeat() { | ||
88 | + return isrepeat; | ||
89 | + } | ||
90 | + public void setIsrepeat(int isrepeat) { | ||
91 | + this.isrepeat = isrepeat; | ||
92 | + } | ||
93 | + public String getUser_loginid() { | ||
94 | + return user_loginid; | ||
95 | + } | ||
96 | + public void setUser_loginid(String userLoginid) { | ||
97 | + user_loginid = userLoginid; | ||
98 | + } | ||
99 | + public String getUser_domain() { | ||
100 | + return user_domain; | ||
101 | + } | ||
102 | + public void setUser_domain(String userDomain) { | ||
103 | + user_domain = userDomain; | ||
104 | + } | ||
105 | + public int getUser_addr_status() { | ||
106 | + return user_addr_status; | ||
107 | + } | ||
108 | + public void setUser_addr_status(int userAddrStatus) { | ||
109 | + user_addr_status = userAddrStatus; | ||
110 | + } | ||
111 | + public String getUser_send_time() { | ||
112 | + return user_send_time; | ||
113 | + } | ||
114 | + public void setUser_send_time(String user_send_time) { | ||
115 | + this.user_send_time = user_send_time; | ||
116 | + } | ||
117 | + public int getUser_send_num() { | ||
118 | + return user_send_num; | ||
119 | + } | ||
120 | + public void setUser_send_num(int user_send_num) { | ||
121 | + this.user_send_num = user_send_num; | ||
122 | + } | ||
123 | + public int getReadingnum() { | ||
124 | + return readingnum; | ||
125 | + } | ||
126 | + public void setReadingnum(int readingnum) { | ||
127 | + this.readingnum = readingnum; | ||
128 | + } | ||
129 | + | ||
130 | + | ||
131 | +} |
1 | +package yxy.timer.sale; | ||
2 | +import java.io.Serializable; | ||
3 | +import javax.persistence.Entity; | ||
4 | +import javax.persistence.Id; | ||
5 | +import javax.persistence.Table; | ||
6 | +/** | ||
7 | + * sale100个人版营销邮 | ||
8 | + * @author 陈南巧 | ||
9 | + * @date 2019-101-16 | ||
10 | + */ | ||
11 | +@Entity | ||
12 | +@Table(name="yxy_link_info") | ||
13 | +public class YxyLinkInfo implements Serializable{ | ||
14 | + private static final long serialVersionUID = 1L; | ||
15 | + private int id;//主键id | ||
16 | + private int user_id;//用户id | ||
17 | + private int company_id;//企业id | ||
18 | + private String link_email;//邮箱 | ||
19 | + private String mail_uid;//邮件唯一码 | ||
20 | + private String link_url;//访问url | ||
21 | + private String user_agent; | ||
22 | + private String user_agent_all; | ||
23 | + private String ip; | ||
24 | + private String area; | ||
25 | + private String create_time; | ||
26 | + private int link_year; | ||
27 | + private int link_month; | ||
28 | + private int link_day; | ||
29 | + @Id | ||
30 | + public int getId() { | ||
31 | + return id; | ||
32 | + } | ||
33 | + public void setId(int id) { | ||
34 | + this.id = id; | ||
35 | + } | ||
36 | + public int getUser_id() { | ||
37 | + return user_id; | ||
38 | + } | ||
39 | + public void setUser_id(int user_id) { | ||
40 | + this.user_id = user_id; | ||
41 | + } | ||
42 | + public int getCompany_id() { | ||
43 | + return company_id; | ||
44 | + } | ||
45 | + public void setCompany_id(int company_id) { | ||
46 | + this.company_id = company_id; | ||
47 | + } | ||
48 | + public String getLink_email() { | ||
49 | + return link_email; | ||
50 | + } | ||
51 | + public void setLink_email(String link_email) { | ||
52 | + this.link_email = link_email; | ||
53 | + } | ||
54 | + public String getMail_uid() { | ||
55 | + return mail_uid; | ||
56 | + } | ||
57 | + public void setMail_uid(String mail_uid) { | ||
58 | + this.mail_uid = mail_uid; | ||
59 | + } | ||
60 | + public String getLink_url() { | ||
61 | + return link_url; | ||
62 | + } | ||
63 | + public void setLink_url(String link_url) { | ||
64 | + this.link_url = link_url; | ||
65 | + } | ||
66 | + public String getUser_agent() { | ||
67 | + return user_agent; | ||
68 | + } | ||
69 | + public void setUser_agent(String user_agent) { | ||
70 | + this.user_agent = user_agent; | ||
71 | + } | ||
72 | + public String getUser_agent_all() { | ||
73 | + return user_agent_all; | ||
74 | + } | ||
75 | + public void setUser_agent_all(String user_agent_all) { | ||
76 | + this.user_agent_all = user_agent_all; | ||
77 | + } | ||
78 | + public String getIp() { | ||
79 | + return ip; | ||
80 | + } | ||
81 | + public void setIp(String ip) { | ||
82 | + this.ip = ip; | ||
83 | + } | ||
84 | + public String getArea() { | ||
85 | + return area; | ||
86 | + } | ||
87 | + public void setArea(String area) { | ||
88 | + this.area = area; | ||
89 | + } | ||
90 | + public String getCreate_time() { | ||
91 | + return create_time; | ||
92 | + } | ||
93 | + public void setCreate_time(String create_time) { | ||
94 | + this.create_time = create_time; | ||
95 | + } | ||
96 | + public int getLink_year() { | ||
97 | + return link_year; | ||
98 | + } | ||
99 | + public void setLink_year(int link_year) { | ||
100 | + this.link_year = link_year; | ||
101 | + } | ||
102 | + public int getLink_month() { | ||
103 | + return link_month; | ||
104 | + } | ||
105 | + public void setLink_month(int link_month) { | ||
106 | + this.link_month = link_month; | ||
107 | + } | ||
108 | + public int getLink_day() { | ||
109 | + return link_day; | ||
110 | + } | ||
111 | + public void setLink_day(int link_day) { | ||
112 | + this.link_day = link_day; | ||
113 | + } | ||
114 | + @Override | ||
115 | + public String toString() { | ||
116 | + StringBuilder builder = new StringBuilder(); | ||
117 | + builder.append("YxyLinkInfo [id="); | ||
118 | + builder.append(id); | ||
119 | + builder.append(", user_id="); | ||
120 | + builder.append(user_id); | ||
121 | + builder.append(", company_id="); | ||
122 | + builder.append(company_id); | ||
123 | + builder.append(", link_email="); | ||
124 | + builder.append(link_email); | ||
125 | + builder.append(", mail_uid="); | ||
126 | + builder.append(mail_uid); | ||
127 | + builder.append(", link_url="); | ||
128 | + builder.append(link_url); | ||
129 | + builder.append(", user_agent="); | ||
130 | + builder.append(user_agent); | ||
131 | + builder.append(", user_agent_all="); | ||
132 | + builder.append(user_agent_all); | ||
133 | + builder.append(", ip="); | ||
134 | + builder.append(ip); | ||
135 | + builder.append(", area="); | ||
136 | + builder.append(area); | ||
137 | + builder.append(", create_time="); | ||
138 | + builder.append(create_time); | ||
139 | + builder.append(", link_year="); | ||
140 | + builder.append(link_year); | ||
141 | + builder.append(", link_month="); | ||
142 | + builder.append(link_month); | ||
143 | + builder.append(", link_day="); | ||
144 | + builder.append(link_day); | ||
145 | + builder.append("]"); | ||
146 | + return builder.toString(); | ||
147 | + } | ||
148 | +} |
1 | +package yxy.timer.dao; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.pojo.YxyReadingInfo; | ||
6 | + | ||
7 | +/* | ||
8 | + * 点读DAO | ||
9 | + */ | ||
10 | +public interface YxyReadDao | ||
11 | +{ | ||
12 | + /**HQL查询*/ | ||
13 | + public List<YxyReadingInfo> findByHql(String hql)throws Exception; | ||
14 | + /**插入*/ | ||
15 | + public int insertRead(YxyReadingInfo o)throws Exception; | ||
16 | + /**批量插入*/ | ||
17 | + public void insertReadPi(List<YxyReadingInfo> o)throws Exception; | ||
18 | + /**HQL查询指定条数据*/ | ||
19 | + public List findByHqlNum(String hql)throws Exception; | ||
20 | + | ||
21 | + public int findByHqlCount(String hql)throws Exception; | ||
22 | + /**sql查询*/ | ||
23 | + public List<Object> findBySql(String sql) throws Exception; | ||
24 | + /**sql更新*/ | ||
25 | + public void updateSql(String sql) throws Exception; | ||
26 | + /**HQL更新*/ | ||
27 | + public void updateByHql(String hql)throws Exception; | ||
28 | +} |
不能预览此文件类型
1 | +package yxy.timer.dao.impl; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.List; | ||
5 | + | ||
6 | +import org.hibernate.Query; | ||
7 | +import org.hibernate.Session; | ||
8 | +import org.springframework.orm.hibernate3.support.HibernateDaoSupport; | ||
9 | + | ||
10 | +import yxy.timer.dao.HibernateBaseDAO; | ||
11 | + | ||
12 | + | ||
13 | +public abstract class HibernateBaseDAOImpl<T extends Serializable ,Pk extends Serializable> extends HibernateDaoSupport | ||
14 | + implements HibernateBaseDAO<T, Pk> | ||
15 | +{ | ||
16 | + //------------------------------常用CRUD操作----------------------------------------- | ||
17 | + | ||
18 | + /**增加记录 (返回新增加记录的主键)*/ | ||
19 | + public int add(T o) throws Exception { | ||
20 | + return (Integer) super.getHibernateTemplate().save(o); | ||
21 | + | ||
22 | + } | ||
23 | + | ||
24 | + /**增加记录(无返回�?)*/ | ||
25 | + public void adddate(T o) throws Exception | ||
26 | + { | ||
27 | + super.getHibernateTemplate().save(o); | ||
28 | + } | ||
29 | + | ||
30 | + /**修改记录*/ | ||
31 | + public void update(T o) throws Exception { | ||
32 | + super.getHibernateTemplate().update(o); | ||
33 | + } | ||
34 | + /**删除记录*/ | ||
35 | + public void del(T o) throws Exception { | ||
36 | + super.getHibernateTemplate().delete(o); | ||
37 | + } | ||
38 | + | ||
39 | + /**添加或更改*/ | ||
40 | + public void saveOrUpdate(T o) throws Exception { | ||
41 | + super.getHibernateTemplate().saveOrUpdate(o); | ||
42 | + } | ||
43 | + /**根据ID获取�?��数据*/ | ||
44 | + @SuppressWarnings("unchecked") | ||
45 | + public T get(Class<T> t,Pk pk) throws Exception { | ||
46 | + return (T) super.getHibernateTemplate().get(t, pk); | ||
47 | + } | ||
48 | + /**根据ID获取�?��数据*/ | ||
49 | + @SuppressWarnings("unchecked") | ||
50 | + public T load(Class<T> t,Pk pk) throws Exception { | ||
51 | + return (T) super.getHibernateTemplate().load(t, pk); | ||
52 | + } | ||
53 | + /**根据hql进行条件查询*/ | ||
54 | + @SuppressWarnings("unchecked") | ||
55 | + public List<T> getAll(String hql) throws Exception { | ||
56 | + return super.getHibernateTemplate().find(hql); | ||
57 | + } | ||
58 | + /**条件查询*/ | ||
59 | + @SuppressWarnings("unchecked") | ||
60 | + public List<T> getAll(String whereHql, Object... params) throws Exception { | ||
61 | + return super.getHibernateTemplate().find(whereHql,params); | ||
62 | + } | ||
63 | + | ||
64 | + /**根据条件和参数查询�?记录*/ | ||
65 | + public int count(String hql, Object... params) throws Exception { | ||
66 | + return Integer.valueOf(super.getHibernateTemplate().find(hql,params).get(0).toString()); | ||
67 | + } | ||
68 | + /**根据条件查询总记录*/ | ||
69 | + public int count(String hql) throws Exception { | ||
70 | + List result=super.getHibernateTemplate().find(hql); | ||
71 | + if(result.size()>0&&result.get(0)!=null&&!result.get(0).equals("null")){ | ||
72 | + return Integer.valueOf(result.get(0).toString()); | ||
73 | + }else{ | ||
74 | + return 0; | ||
75 | + } | ||
76 | + //return Integer.valueOf(super.getHibernateTemplate().find(hql).get(0).toString()); | ||
77 | + } | ||
78 | + | ||
79 | + /**批量插入*/ | ||
80 | + public void addPi(List<T> o)throws Exception{ | ||
81 | + Session session =null; | ||
82 | + | ||
83 | + if(o!=null){ | ||
84 | + session=super.getHibernateTemplate().getSessionFactory().openSession(); | ||
85 | + session.beginTransaction(); | ||
86 | + for(int i=0;i<o.size();i++){ | ||
87 | + session.saveOrUpdate(o.get(i)); | ||
88 | + if(i%10==0){ | ||
89 | + session.flush(); | ||
90 | + session.clear(); | ||
91 | + } | ||
92 | + } | ||
93 | + session.getTransaction().commit(); | ||
94 | + } | ||
95 | + session.close(); | ||
96 | + | ||
97 | + } | ||
98 | + | ||
99 | + /**Hql语句修改删除记录*/ | ||
100 | + public int updateorDelByHql(String hql){ | ||
101 | + Query query = null; | ||
102 | + int result=0; | ||
103 | + Session session =null; | ||
104 | + try { | ||
105 | + session=super.getHibernateTemplate().getSessionFactory().openSession(); | ||
106 | + query = session.createQuery(hql); | ||
107 | + result = query.executeUpdate(); | ||
108 | + } catch (Exception e) { | ||
109 | + e.printStackTrace(); | ||
110 | + }finally{ | ||
111 | + if(session!=null){ | ||
112 | + session.clear(); | ||
113 | + session.close(); | ||
114 | + } | ||
115 | + } | ||
116 | + | ||
117 | + return result; | ||
118 | + } | ||
119 | + | ||
120 | + /**查询设定的记录条数据*/ | ||
121 | + public List<T> findBySet(String hql,int num){ | ||
122 | + Session session = null; | ||
123 | + Query query=null; | ||
124 | + try { | ||
125 | + session=super.getHibernateTemplate().getSessionFactory().openSession(); | ||
126 | + query = session.createQuery(hql); | ||
127 | + query.setMaxResults(num); | ||
128 | + return query.list(); | ||
129 | + } catch (Exception e) { | ||
130 | + e.printStackTrace(); | ||
131 | + }finally{ | ||
132 | + if(session!=null){ | ||
133 | + session.clear(); | ||
134 | + session.close(); | ||
135 | + } | ||
136 | + } | ||
137 | + return null; | ||
138 | + } | ||
139 | + | ||
140 | + /**sql语句查询*/ | ||
141 | + public List findBySql(String sql) throws Exception{ | ||
142 | + Session session=null; | ||
143 | + try { | ||
144 | + session =super.getHibernateTemplate().getSessionFactory(). | ||
145 | + openSession(); | ||
146 | + return session.createSQLQuery(sql).list(); | ||
147 | + } catch (Exception e) { | ||
148 | + e.printStackTrace(); | ||
149 | + }finally{ | ||
150 | + if(session!=null){ | ||
151 | + session.clear(); | ||
152 | + session.close(); | ||
153 | + } | ||
154 | + } | ||
155 | + return null; | ||
156 | + } | ||
157 | + | ||
158 | + /**sql语句修改删除记录*/ | ||
159 | + public int updateorDelSql(String sql){ | ||
160 | + Query query = null; | ||
161 | + int result=0; | ||
162 | + Session session =null; | ||
163 | + try { | ||
164 | + session=super.getHibernateTemplate().getSessionFactory().openSession(); | ||
165 | + query = session.createSQLQuery(sql); | ||
166 | + result = query.executeUpdate(); | ||
167 | + } catch (Exception e) { | ||
168 | + e.printStackTrace(); | ||
169 | + }finally{ | ||
170 | + if(session!=null){ | ||
171 | + session.clear(); | ||
172 | + session.close(); | ||
173 | + } | ||
174 | + } | ||
175 | + | ||
176 | + return result; | ||
177 | + } | ||
178 | +} |
1 | +package yxy.timer.dao; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.pojo.YxySendMailMaster; | ||
6 | + | ||
7 | +/* | ||
8 | + * 邮件dao | ||
9 | + */ | ||
10 | +public interface YxySendMailMasterDao { | ||
11 | + | ||
12 | + //查询邮件 | ||
13 | + public List<YxySendMailMaster> findByHql(String hql)throws Exception; | ||
14 | + //批量更新实体 | ||
15 | + public void updateByMaster(List<YxySendMailMaster> o)throws Exception; | ||
16 | + //sql查询 | ||
17 | + public List<Object> findbysql(String sql)throws Exception; | ||
18 | + //sql更新 | ||
19 | + public void updatebysql(String sql)throws Exception; | ||
20 | +} |
不能预览此文件类型
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.Id; | ||
7 | +import javax.persistence.Table; | ||
8 | + | ||
9 | + | ||
10 | + | ||
11 | +/** | ||
12 | + * 程序名称: EspeedMail_时速邮箱 | ||
13 | + * 程序版本: V1.0 | ||
14 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
15 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
16 | + * 技术支持: Tech@21gmail.com | ||
17 | + * 单元名称: 营销中心表实体类 | ||
18 | + * 开始时间: 2015.04.07 | ||
19 | + * 程 序 员: 蒋俭 | ||
20 | + * 最后修改: | ||
21 | + * 备 注: 如需修改请通知程序员 | ||
22 | + */ | ||
23 | +@Entity | ||
24 | +@Table(name="yxy_user_signature") | ||
25 | +public class YxyUserSignature implements Serializable { | ||
26 | + private int id; | ||
27 | + private String title; | ||
28 | + private String body; | ||
29 | + private String loginid; | ||
30 | + private String domain; | ||
31 | + | ||
32 | + | ||
33 | + @Id | ||
34 | + public int getId() { | ||
35 | + return id; | ||
36 | + } | ||
37 | + public void setId(int id) { | ||
38 | + this.id = id; | ||
39 | + } | ||
40 | + public String getTitle() { | ||
41 | + return title; | ||
42 | + } | ||
43 | + public void setTitle(String title) { | ||
44 | + this.title = title; | ||
45 | + } | ||
46 | + public String getBody() { | ||
47 | + return body; | ||
48 | + } | ||
49 | + public void setBody(String body) { | ||
50 | + this.body = body; | ||
51 | + } | ||
52 | + public String getLoginid() { | ||
53 | + return loginid; | ||
54 | + } | ||
55 | + public void setLoginid(String loginid) { | ||
56 | + this.loginid = loginid; | ||
57 | + } | ||
58 | + public String getDomain() { | ||
59 | + return domain; | ||
60 | + } | ||
61 | + public void setDomain(String domain) { | ||
62 | + this.domain = domain; | ||
63 | + } | ||
64 | + @Override | ||
65 | + public String toString() { | ||
66 | + return "YxyUserSignature [body=" + body + ", domain=" + domain | ||
67 | + + ", id=" + id + ", loginid=" + loginid + ", title=" | ||
68 | + + title + "]"; | ||
69 | + } | ||
70 | + | ||
71 | + | ||
72 | +} |
不能预览此文件类型
1 | +package yxy.timer.sale; | ||
2 | +import java.io.Serializable; | ||
3 | +import javax.persistence.Entity; | ||
4 | +import javax.persistence.GeneratedValue; | ||
5 | +import javax.persistence.GenerationType; | ||
6 | +import javax.persistence.Id; | ||
7 | +import javax.persistence.Table; | ||
8 | +import javax.persistence.Transient; | ||
9 | +/** | ||
10 | + * sale100个人版营销邮 | ||
11 | + * @author 陈南巧 | ||
12 | + * @date 2019-101-16 | ||
13 | + */ | ||
14 | +@Entity | ||
15 | +@Table(name="yxy_reading_info") | ||
16 | +public class YxyReadingInfo implements Serializable{ | ||
17 | + private static final long serialVersionUID = 1L; | ||
18 | + private int yxy_reading_id; | ||
19 | + private String yxy_reading_loginid; | ||
20 | + private String yxy_reading_domain; | ||
21 | + private String yxy_reading_mailuid; | ||
22 | + private String yxy_reading_ip; | ||
23 | + private String yxy_reading_date; | ||
24 | + private String yxy_reading_email; | ||
25 | + private String yxy_reading_area; | ||
26 | + private int yxy_reading_num; | ||
27 | + private int yxy_is_export; | ||
28 | + private int yxy_reading_month; | ||
29 | + private int yxy_reading_year; | ||
30 | + private int isnew; | ||
31 | + private int is_timer_count; | ||
32 | + private String yxy_useragent; | ||
33 | + private String yxy_useragent_all; | ||
34 | + @Id | ||
35 | + @GeneratedValue(strategy=GenerationType.AUTO) | ||
36 | + public int getYxy_reading_id() { | ||
37 | + return yxy_reading_id; | ||
38 | + } | ||
39 | + public void setYxy_reading_id(int yxyReadingId) { | ||
40 | + yxy_reading_id = yxyReadingId; | ||
41 | + } | ||
42 | + public String getYxy_reading_mailuid() { | ||
43 | + return yxy_reading_mailuid; | ||
44 | + } | ||
45 | + public void setYxy_reading_mailuid(String yxyReadingMailuid) { | ||
46 | + yxy_reading_mailuid = yxyReadingMailuid; | ||
47 | + } | ||
48 | + public String getYxy_reading_ip() { | ||
49 | + return yxy_reading_ip; | ||
50 | + } | ||
51 | + public void setYxy_reading_ip(String yxyReadingIp) { | ||
52 | + yxy_reading_ip = yxyReadingIp; | ||
53 | + } | ||
54 | + public String getYxy_reading_date() { | ||
55 | + return yxy_reading_date; | ||
56 | + } | ||
57 | + public void setYxy_reading_date(String yxyReadingDate) { | ||
58 | + yxy_reading_date = yxyReadingDate; | ||
59 | + } | ||
60 | + public String getYxy_reading_email() { | ||
61 | + return yxy_reading_email; | ||
62 | + } | ||
63 | + public void setYxy_reading_email(String yxyReadingEmail) { | ||
64 | + yxy_reading_email = yxyReadingEmail; | ||
65 | + } | ||
66 | + public String getYxy_reading_loginid() { | ||
67 | + return yxy_reading_loginid; | ||
68 | + } | ||
69 | + public void setYxy_reading_loginid(String yxyReadingLoginid) { | ||
70 | + yxy_reading_loginid = yxyReadingLoginid; | ||
71 | + } | ||
72 | + public String getYxy_reading_domain() { | ||
73 | + return yxy_reading_domain; | ||
74 | + } | ||
75 | + public void setYxy_reading_domain(String yxyReadingDomain) { | ||
76 | + yxy_reading_domain = yxyReadingDomain; | ||
77 | + } | ||
78 | + public int getYxy_is_export() { | ||
79 | + return yxy_is_export; | ||
80 | + } | ||
81 | + public void setYxy_is_export(int yxyIsExport) { | ||
82 | + yxy_is_export = yxyIsExport; | ||
83 | + } | ||
84 | + public String getYxy_reading_area() { | ||
85 | + return yxy_reading_area; | ||
86 | + } | ||
87 | + public void setYxy_reading_area(String yxyReadingArea) { | ||
88 | + yxy_reading_area = yxyReadingArea; | ||
89 | + } | ||
90 | + public int getYxy_reading_num() { | ||
91 | + return yxy_reading_num; | ||
92 | + } | ||
93 | + public void setYxy_reading_num(int yxyReadingNum) { | ||
94 | + yxy_reading_num = yxyReadingNum; | ||
95 | + } | ||
96 | + public int getYxy_reading_month() { | ||
97 | + return yxy_reading_month; | ||
98 | + } | ||
99 | + public void setYxy_reading_month(int yxyReadingMonth) { | ||
100 | + yxy_reading_month = yxyReadingMonth; | ||
101 | + } | ||
102 | + public int getYxy_reading_year() { | ||
103 | + return yxy_reading_year; | ||
104 | + } | ||
105 | + public void setYxy_reading_year(int yxyReadingYear) { | ||
106 | + yxy_reading_year = yxyReadingYear; | ||
107 | + } | ||
108 | + | ||
109 | + @Transient | ||
110 | + public int getIsnew() { | ||
111 | + return isnew; | ||
112 | + } | ||
113 | + public void setIsnew(int isnew) { | ||
114 | + this.isnew = isnew; | ||
115 | + } | ||
116 | + public int getIs_timer_count() { | ||
117 | + return is_timer_count; | ||
118 | + } | ||
119 | + public void setIs_timer_count(int isTimerCount) { | ||
120 | + is_timer_count = isTimerCount; | ||
121 | + } | ||
122 | + public String getYxy_useragent() { | ||
123 | + return yxy_useragent; | ||
124 | + } | ||
125 | + public void setYxy_useragent(String yxy_useragent) { | ||
126 | + this.yxy_useragent = yxy_useragent; | ||
127 | + } | ||
128 | + public String getYxy_useragent_all() { | ||
129 | + return yxy_useragent_all; | ||
130 | + } | ||
131 | + public void setYxy_useragent_all(String yxy_useragent_all) { | ||
132 | + this.yxy_useragent_all = yxy_useragent_all; | ||
133 | + } | ||
134 | +} |
1 | +package yxy.timer.dao.impl; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.dao.YxySysParamaterDao; | ||
6 | +import yxy.timer.pojo.YxySysParamaters; | ||
7 | +/** | ||
8 | + * 程序名称: EspeedMail_时速邮箱 | ||
9 | + * 程序版本: V1.0 | ||
10 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
11 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
12 | + * 技术支持: Tech@21gmail.com | ||
13 | + * 单元名称: 控制参数DAO实现类(营销游) | ||
14 | + * 开始时间: 2013.12.09 | ||
15 | + * 程 序 员: 谢勇 | ||
16 | + * 最后修改: | ||
17 | + * 备 注: 如需修改请通知程序员 | ||
18 | + */ | ||
19 | +public class YxySysParamaterDaoImpl extends HibernateBaseDAOImpl<YxySysParamaters, Long> implements YxySysParamaterDao{ | ||
20 | + | ||
21 | + /**HQL查询*/ | ||
22 | + public List<YxySysParamaters> findByHql(String hql)throws Exception{ | ||
23 | + return super.getAll(hql); | ||
24 | + } | ||
25 | + | ||
26 | +} |
不能预览此文件类型
1 | +package yxy.timer.dao.impl; | ||
2 | + | ||
3 | +import yxy.timer.dao.YxyUserAddressDao; | ||
4 | +import yxy.timer.pojo.YxyUserAddress; | ||
5 | + | ||
6 | +/** | ||
7 | + * | ||
8 | + * 地址dao实现类 | ||
9 | + * | ||
10 | + */ | ||
11 | +public class YxyUserAddressDaoImpl extends HibernateBaseDAOImpl<YxyUserAddress, Long>implements YxyUserAddressDao{ | ||
12 | + | ||
13 | + /**HQL删除*/ | ||
14 | + public void delByHql(String hql) throws Exception { | ||
15 | + super.updateorDelByHql(hql); | ||
16 | + | ||
17 | + } | ||
18 | + | ||
19 | + | ||
20 | +} |
1 | +package yxy.timer.sale; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.GeneratedValue; | ||
7 | +import javax.persistence.GenerationType; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Table; | ||
10 | +import javax.persistence.Transient; | ||
11 | +/** | ||
12 | + * 程序名称: EspeedMail_时速邮箱 | ||
13 | + * 程序版本: V1.0 | ||
14 | + * 作 者: 深圳市科飞时速网络技术有限公司(0755-88843776) | ||
15 | + * 版权所有: 深圳市科飞时速网络技术有限公司 | ||
16 | + * 技术支持: Tech@21gmail.com | ||
17 | + * 单元名称: 邮件基本信息实体(营销游) | ||
18 | + * 开始时间: 2013.12.09 | ||
19 | + * 程 序 员: 谢勇 | ||
20 | + * 最后修改: | ||
21 | + * 备 注: 如需修改请通知程序员 | ||
22 | + */ | ||
23 | +@Entity | ||
24 | +@Table(name="yxy_send_mail_master_base") | ||
25 | +public class YxySendMailMasterBase implements Serializable{ | ||
26 | + private static final long serialVersionUID = 1L; | ||
27 | + private int send_mail_id;//发送邮件ID | ||
28 | + private String user_loginid;//创建用户账号 | ||
29 | + private String user_domain;//创建用户域名 | ||
30 | + private String create_time;//创建时间 | ||
31 | + private String mail_account;//发送邮箱账号 | ||
32 | + private String sender;//发件人 | ||
33 | + private String send_email;//发件人邮箱 | ||
34 | + private String reply_email;//回复邮箱 | ||
35 | + private String subject;//主题 | ||
36 | + private String body;//邮件正文 | ||
37 | + private int attachment_count;//包含附件数量 | ||
38 | + private String attarchment_path ;//附件保存路径 | ||
39 | + private String image_path;//图片保存路径 | ||
40 | + private String eml_file_path;//EML文件路径 | ||
41 | + private String eml_encode_key;//EML文件KEY | ||
42 | + private int mail_size;//邮件大小 | ||
43 | + private String mail_uid; //mail唯一性标识 | ||
44 | + private int un_person; | ||
45 | + private int reading_tol; | ||
46 | + private Integer reply_mail_count;//该邮件的回复量 | ||
47 | + | ||
48 | + @Id | ||
49 | + @GeneratedValue(strategy=GenerationType.AUTO) | ||
50 | + public int getSend_mail_id() { | ||
51 | + return send_mail_id; | ||
52 | + } | ||
53 | + public void setSend_mail_id(int sendMailId) { | ||
54 | + send_mail_id = sendMailId; | ||
55 | + } | ||
56 | + public String getCreate_time() { | ||
57 | + return create_time; | ||
58 | + } | ||
59 | + public void setCreate_time(String createTime) { | ||
60 | + create_time = createTime; | ||
61 | + } | ||
62 | + | ||
63 | + public String getMail_account() { | ||
64 | + return mail_account; | ||
65 | + } | ||
66 | + public void setMail_account(String mailAccount) { | ||
67 | + mail_account = mailAccount; | ||
68 | + } | ||
69 | + public String getSender() { | ||
70 | + return sender; | ||
71 | + } | ||
72 | + public void setSender(String sender) { | ||
73 | + this.sender = sender; | ||
74 | + } | ||
75 | + public String getSend_email() { | ||
76 | + return send_email; | ||
77 | + } | ||
78 | + public void setSend_email(String sendEmail) { | ||
79 | + send_email = sendEmail; | ||
80 | + } | ||
81 | + public String getReply_email() { | ||
82 | + return reply_email; | ||
83 | + } | ||
84 | + public void setReply_email(String replyEmail) { | ||
85 | + reply_email = replyEmail; | ||
86 | + } | ||
87 | + public String getSubject() { | ||
88 | + return subject; | ||
89 | + } | ||
90 | + public void setSubject(String subject) { | ||
91 | + this.subject = subject; | ||
92 | + } | ||
93 | + | ||
94 | + @Transient | ||
95 | + public String getBody() { | ||
96 | + return body; | ||
97 | + } | ||
98 | + public void setBody(String body) { | ||
99 | + this.body = body; | ||
100 | + } | ||
101 | + public int getAttachment_count() { | ||
102 | + return attachment_count; | ||
103 | + } | ||
104 | + public void setAttachment_count(int attachmentCount) { | ||
105 | + attachment_count = attachmentCount; | ||
106 | + } | ||
107 | + | ||
108 | + public String getAttarchment_path() { | ||
109 | + return attarchment_path; | ||
110 | + } | ||
111 | + public void setAttarchment_path(String attarchmentPath) { | ||
112 | + attarchment_path = attarchmentPath; | ||
113 | + } | ||
114 | + | ||
115 | + public String getImage_path() { | ||
116 | + return image_path; | ||
117 | + } | ||
118 | + public void setImage_path(String imagePath) { | ||
119 | + image_path = imagePath; | ||
120 | + } | ||
121 | + public String getEml_file_path() { | ||
122 | + return eml_file_path; | ||
123 | + } | ||
124 | + public void setEml_file_path(String emlFilePath) { | ||
125 | + eml_file_path = emlFilePath; | ||
126 | + } | ||
127 | + public String getEml_encode_key() { | ||
128 | + return eml_encode_key; | ||
129 | + } | ||
130 | + public void setEml_encode_key(String emlEncodeKey) { | ||
131 | + eml_encode_key = emlEncodeKey; | ||
132 | + } | ||
133 | + public int getMail_size() { | ||
134 | + return mail_size; | ||
135 | + } | ||
136 | + public void setMail_size(int mailSize) { | ||
137 | + mail_size = mailSize; | ||
138 | + } | ||
139 | + public String getMail_uid() { | ||
140 | + return mail_uid; | ||
141 | + } | ||
142 | + public void setMail_uid(String mailUid) { | ||
143 | + mail_uid = mailUid; | ||
144 | + } | ||
145 | + | ||
146 | + public String getUser_loginid() { | ||
147 | + return user_loginid; | ||
148 | + } | ||
149 | + public void setUser_loginid(String userLoginid) { | ||
150 | + user_loginid = userLoginid; | ||
151 | + } | ||
152 | + public String getUser_domain() { | ||
153 | + return user_domain; | ||
154 | + } | ||
155 | + public void setUser_domain(String userDomain) { | ||
156 | + user_domain = userDomain; | ||
157 | + } | ||
158 | + public int getUn_person() { | ||
159 | + return un_person; | ||
160 | + } | ||
161 | + public void setUn_person(int unPerson) { | ||
162 | + un_person = unPerson; | ||
163 | + } | ||
164 | + public int getReading_tol() { | ||
165 | + return reading_tol; | ||
166 | + } | ||
167 | + public void setReading_tol(int readingTol) { | ||
168 | + reading_tol = readingTol; | ||
169 | + } | ||
170 | + public Integer getReply_mail_count() { | ||
171 | + return reply_mail_count; | ||
172 | + } | ||
173 | + public void setReply_mail_count(Integer reply_mail_count) { | ||
174 | + this.reply_mail_count = reply_mail_count; | ||
175 | + } | ||
176 | +} |
1 | +package yxy.timer.service; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.pojo.YxyMailNumCount; | ||
6 | +import yxy.timer.pojo.YxyReplyInfo; | ||
7 | + | ||
8 | +public interface YxyReplyInfoService { | ||
9 | + /**批量插入*/ | ||
10 | + public void addReply(YxyReplyInfo reply)throws Exception; | ||
11 | + /**查询指定量数据*/ | ||
12 | + public List<YxyReplyInfo> findByHqlSet(String hql,int num)throws Exception; | ||
13 | + /**查询邮件对应的统计数据*/ | ||
14 | + public YxyMailNumCount getYxyMailNumCount(String mail_uid)throws Exception; | ||
15 | + /**添加或更新邮件对应的统计数据*/ | ||
16 | + public void addEditYxyMailNumCount(YxyMailNumCount count)throws Exception; | ||
17 | +} |
不能预览此文件类型
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.GeneratedValue; | ||
7 | +import javax.persistence.GenerationType; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Table; | ||
10 | +import javax.persistence.Transient; | ||
11 | + | ||
12 | +@Entity | ||
13 | +@Table(name="yxy_reading_info") | ||
14 | +public class YxyReadingInfo implements Serializable{ | ||
15 | + | ||
16 | + private int yxy_reading_id; | ||
17 | + private String yxy_reading_loginid; | ||
18 | + private String yxy_reading_domain; | ||
19 | + private String yxy_reading_mailuid;/**�ʼ�Ψһ��*/ | ||
20 | + private String yxy_reading_ip;/**���IP*/ | ||
21 | + private String yxy_reading_date;/**���ʱ��*/ | ||
22 | + private String yxy_reading_email; /**����ߵ�ַ*/ | ||
23 | + private String yxy_reading_area;//�������� | ||
24 | + private int yxy_reading_num;//����� | ||
25 | + private int yxy_is_export;//�Ƿ��� | ||
26 | + private int yxy_reading_month; | ||
27 | + private int yxy_reading_year; | ||
28 | + private int isnew; | ||
29 | + private int is_timer_count;//定时器是否统计过,0没统计,1已统计 | ||
30 | + private String yxy_useragent; | ||
31 | + private String yxy_useragent_all; | ||
32 | + @Id | ||
33 | + @GeneratedValue(strategy=GenerationType.AUTO) | ||
34 | + public int getYxy_reading_id() { | ||
35 | + return yxy_reading_id; | ||
36 | + } | ||
37 | + public void setYxy_reading_id(int yxyReadingId) { | ||
38 | + yxy_reading_id = yxyReadingId; | ||
39 | + } | ||
40 | + public String getYxy_reading_mailuid() { | ||
41 | + return yxy_reading_mailuid; | ||
42 | + } | ||
43 | + public void setYxy_reading_mailuid(String yxyReadingMailuid) { | ||
44 | + yxy_reading_mailuid = yxyReadingMailuid; | ||
45 | + } | ||
46 | + public String getYxy_reading_ip() { | ||
47 | + return yxy_reading_ip; | ||
48 | + } | ||
49 | + public void setYxy_reading_ip(String yxyReadingIp) { | ||
50 | + yxy_reading_ip = yxyReadingIp; | ||
51 | + } | ||
52 | + public String getYxy_reading_date() { | ||
53 | + return yxy_reading_date; | ||
54 | + } | ||
55 | + public void setYxy_reading_date(String yxyReadingDate) { | ||
56 | + yxy_reading_date = yxyReadingDate; | ||
57 | + } | ||
58 | + public String getYxy_reading_email() { | ||
59 | + return yxy_reading_email; | ||
60 | + } | ||
61 | + public void setYxy_reading_email(String yxyReadingEmail) { | ||
62 | + yxy_reading_email = yxyReadingEmail; | ||
63 | + } | ||
64 | + public String getYxy_reading_loginid() { | ||
65 | + return yxy_reading_loginid; | ||
66 | + } | ||
67 | + public void setYxy_reading_loginid(String yxyReadingLoginid) { | ||
68 | + yxy_reading_loginid = yxyReadingLoginid; | ||
69 | + } | ||
70 | + public String getYxy_reading_domain() { | ||
71 | + return yxy_reading_domain; | ||
72 | + } | ||
73 | + public void setYxy_reading_domain(String yxyReadingDomain) { | ||
74 | + yxy_reading_domain = yxyReadingDomain; | ||
75 | + } | ||
76 | + public int getYxy_is_export() { | ||
77 | + return yxy_is_export; | ||
78 | + } | ||
79 | + public void setYxy_is_export(int yxyIsExport) { | ||
80 | + yxy_is_export = yxyIsExport; | ||
81 | + } | ||
82 | + public String getYxy_reading_area() { | ||
83 | + return yxy_reading_area; | ||
84 | + } | ||
85 | + public void setYxy_reading_area(String yxyReadingArea) { | ||
86 | + yxy_reading_area = yxyReadingArea; | ||
87 | + } | ||
88 | + public int getYxy_reading_num() { | ||
89 | + return yxy_reading_num; | ||
90 | + } | ||
91 | + public void setYxy_reading_num(int yxyReadingNum) { | ||
92 | + yxy_reading_num = yxyReadingNum; | ||
93 | + } | ||
94 | + public int getYxy_reading_month() { | ||
95 | + return yxy_reading_month; | ||
96 | + } | ||
97 | + public void setYxy_reading_month(int yxyReadingMonth) { | ||
98 | + yxy_reading_month = yxyReadingMonth; | ||
99 | + } | ||
100 | + public int getYxy_reading_year() { | ||
101 | + return yxy_reading_year; | ||
102 | + } | ||
103 | + public void setYxy_reading_year(int yxyReadingYear) { | ||
104 | + yxy_reading_year = yxyReadingYear; | ||
105 | + } | ||
106 | + | ||
107 | + @Transient | ||
108 | + public int getIsnew() { | ||
109 | + return isnew; | ||
110 | + } | ||
111 | + public void setIsnew(int isnew) { | ||
112 | + this.isnew = isnew; | ||
113 | + } | ||
114 | + public int getIs_timer_count() { | ||
115 | + return is_timer_count; | ||
116 | + } | ||
117 | + public void setIs_timer_count(int isTimerCount) { | ||
118 | + is_timer_count = isTimerCount; | ||
119 | + } | ||
120 | + public String getYxy_useragent() { | ||
121 | + return yxy_useragent; | ||
122 | + } | ||
123 | + public void setYxy_useragent(String yxy_useragent) { | ||
124 | + this.yxy_useragent = yxy_useragent; | ||
125 | + } | ||
126 | + public String getYxy_useragent_all() { | ||
127 | + return yxy_useragent_all; | ||
128 | + } | ||
129 | + public void setYxy_useragent_all(String yxy_useragent_all) { | ||
130 | + this.yxy_useragent_all = yxy_useragent_all; | ||
131 | + } | ||
132 | +} |
不能预览此文件类型
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.Id; | ||
7 | +import javax.persistence.Table; | ||
8 | + | ||
9 | +@Entity | ||
10 | +@Table(name="yxy_reply_info") | ||
11 | +public class YxyReplyInfo implements Serializable{ | ||
12 | + private static final long serialVersionUID = 1L; | ||
13 | + private int replyid; | ||
14 | + private String loginid;//用户 | ||
15 | + private String domain;//所属域名 | ||
16 | + private String replydate;//回复时间 | ||
17 | + private String mailuid;//邮件唯一码 | ||
18 | + private int replymonth;//回复月份 | ||
19 | + private String replyemail;//回复地址 | ||
20 | + private String replyname;//回复都姓名 | ||
21 | + private String nowdate;//当前时间 | ||
22 | + private int is_timer_count;//定时器是否统计过,0没统计,1已统计 | ||
23 | + private String reason;//其它信息 | ||
24 | + private String ip;//ip地址 | ||
25 | + private String area;//ip所属地区 | ||
26 | + private int replyyear;//回复年份 | ||
27 | + private int replyday;//回复日份 | ||
28 | + @Id | ||
29 | + public int getReplyid() { | ||
30 | + return replyid; | ||
31 | + } | ||
32 | + public void setReplyid(int replyid) { | ||
33 | + this.replyid = replyid; | ||
34 | + } | ||
35 | + public String getLoginid() { | ||
36 | + return loginid; | ||
37 | + } | ||
38 | + public void setLoginid(String loginid) { | ||
39 | + this.loginid = loginid; | ||
40 | + } | ||
41 | + public String getDomain() { | ||
42 | + return domain; | ||
43 | + } | ||
44 | + public void setDomain(String domain) { | ||
45 | + this.domain = domain; | ||
46 | + } | ||
47 | + public String getReplydate() { | ||
48 | + return replydate; | ||
49 | + } | ||
50 | + public void setReplydate(String replydate) { | ||
51 | + this.replydate = replydate; | ||
52 | + } | ||
53 | + public String getMailuid() { | ||
54 | + return mailuid; | ||
55 | + } | ||
56 | + public void setMailuid(String mailuid) { | ||
57 | + this.mailuid = mailuid; | ||
58 | + } | ||
59 | + public int getReplymonth() { | ||
60 | + return replymonth; | ||
61 | + } | ||
62 | + public void setReplymonth(int replymonth) { | ||
63 | + this.replymonth = replymonth; | ||
64 | + } | ||
65 | + public String getReplyemail() { | ||
66 | + return replyemail; | ||
67 | + } | ||
68 | + public void setReplyemail(String replyemail) { | ||
69 | + this.replyemail = replyemail; | ||
70 | + } | ||
71 | + public String getReplyname() { | ||
72 | + return replyname; | ||
73 | + } | ||
74 | + public void setReplyname(String replyname) { | ||
75 | + this.replyname = replyname; | ||
76 | + } | ||
77 | + public String getNowdate() { | ||
78 | + return nowdate; | ||
79 | + } | ||
80 | + public void setNowdate(String nowdate) { | ||
81 | + this.nowdate = nowdate; | ||
82 | + } | ||
83 | + public int getIs_timer_count() { | ||
84 | + return is_timer_count; | ||
85 | + } | ||
86 | + public void setIs_timer_count(int isTimerCount) { | ||
87 | + is_timer_count = isTimerCount; | ||
88 | + } | ||
89 | + public String getReason() { | ||
90 | + return reason; | ||
91 | + } | ||
92 | + public void setReason(String reason) { | ||
93 | + this.reason = reason; | ||
94 | + } | ||
95 | + public String getIp() { | ||
96 | + return ip; | ||
97 | + } | ||
98 | + public void setIp(String ip) { | ||
99 | + this.ip = ip; | ||
100 | + } | ||
101 | + public String getArea() { | ||
102 | + return area; | ||
103 | + } | ||
104 | + public void setArea(String area) { | ||
105 | + this.area = area; | ||
106 | + } | ||
107 | + public int getReplyyear() { | ||
108 | + return replyyear; | ||
109 | + } | ||
110 | + public void setReplyyear(int replyyear) { | ||
111 | + this.replyyear = replyyear; | ||
112 | + } | ||
113 | + public int getReplyday() { | ||
114 | + return replyday; | ||
115 | + } | ||
116 | + public void setReplyday(int replyday) { | ||
117 | + this.replyday = replyday; | ||
118 | + } | ||
119 | +} |
1 | +package yxy.timer.dao.impl; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.dao.YxyLinkInfoDao; | ||
6 | +import yxy.timer.dao.YxyReplyInfoDao; | ||
7 | +import yxy.timer.pojo.YxyLinkInfo; | ||
8 | +import yxy.timer.pojo.YxyReplyInfo; | ||
9 | + | ||
10 | +/** | ||
11 | + * | ||
12 | + * 回复dao实现类 | ||
13 | + * | ||
14 | + */ | ||
15 | +public class YxyLinkInfoDaoImpl extends HibernateBaseDAOImpl<YxyLinkInfo, Long> implements YxyLinkInfoDao{ | ||
16 | + /**实体插入*/ | ||
17 | + public int addPojo(YxyLinkInfo reply)throws Exception{ | ||
18 | + return super.add(reply); | ||
19 | + } | ||
20 | + /**查询指定量数据*/ | ||
21 | + public List<YxyLinkInfo> findByHqlSet(String hql,int num)throws Exception | ||
22 | + { | ||
23 | + return super.findBySet(hql, num); | ||
24 | + } | ||
25 | + /**统计条数*/ | ||
26 | + public int count(String hql)throws Exception | ||
27 | + { | ||
28 | + return super.count(hql); | ||
29 | + } | ||
30 | + /**根据sql查询*/ | ||
31 | + public List<Object> findBySql(String sql)throws Exception | ||
32 | + { | ||
33 | + return super.findBySql(sql); | ||
34 | + } | ||
35 | + /**hql更新*/ | ||
36 | + public void updateByHql(String hql)throws Exception | ||
37 | + { | ||
38 | + super.updateorDelByHql(hql); | ||
39 | + } | ||
40 | + /**实体编辑*/ | ||
41 | + public void updatePojo(YxyLinkInfo o)throws Exception{ | ||
42 | + super.update(o); | ||
43 | + } | ||
44 | +} |
不能预览此文件类型
1 | +package yxy.timer.dao.impl; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.dao.YxyUnsubscribeDao; | ||
6 | +import yxy.timer.pojo.YxyUnsubscribeInfo; | ||
7 | + | ||
8 | +/** | ||
9 | + * | ||
10 | + * 退订dao实现类 | ||
11 | + * | ||
12 | + */ | ||
13 | +public class YxyUnsubscribeDaoImpl extends HibernateBaseDAOImpl<YxyUnsubscribeInfo, Long> implements YxyUnsubscribeDao{ | ||
14 | + /**HQL查询*/ | ||
15 | + public List<YxyUnsubscribeInfo> findByHql(String hql) throws Exception { | ||
16 | + return super.getAll(hql); | ||
17 | + } | ||
18 | + /**查询指定量数据*/ | ||
19 | + public List<YxyUnsubscribeInfo> findByHqlSet(String hql,int num)throws Exception{ | ||
20 | + return super.findBySet(hql, num); | ||
21 | + } | ||
22 | + /**批量插入退订信息*/ | ||
23 | + public void insertUnPi(List<YxyUnsubscribeInfo> o) throws Exception { | ||
24 | + super.addPi(o); | ||
25 | + } | ||
26 | + /**sql查询*/ | ||
27 | + public List<Object> findBySql(String sql) throws Exception | ||
28 | + { | ||
29 | + return super.findBySql(sql); | ||
30 | + } | ||
31 | + /**HQL更新*/ | ||
32 | + public void updateByHql(String hql)throws Exception | ||
33 | + { | ||
34 | + super.updateorDelByHql(hql); | ||
35 | + } | ||
36 | + | ||
37 | + public int insertUn(YxyUnsubscribeInfo o)throws Exception{ | ||
38 | + return super.add(o); | ||
39 | + } | ||
40 | + | ||
41 | + public int findByHqlCount(String hql)throws Exception{ | ||
42 | + return super.count(hql); | ||
43 | + } | ||
44 | +} |
1 | +package yxy.timer.dao; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | +import java.util.List; | ||
5 | + | ||
6 | + | ||
7 | + | ||
8 | +public interface HibernateBaseDAO<T extends Serializable ,Pk extends Serializable> { | ||
9 | + /** | ||
10 | + * ------------------------------常用CRUD操作----------------------------------------- | ||
11 | + */ | ||
12 | + /**增加记录**/ | ||
13 | + int add(T o)throws Exception; | ||
14 | + /**修改记录*/ | ||
15 | + void update(T o)throws Exception; | ||
16 | + /**删除记录*/ | ||
17 | + void del(T o)throws Exception; | ||
18 | + /**添加或更�?/ | ||
19 | + void saveOrUpdate(T o)throws Exception; | ||
20 | + /**根据ID获取�?��数据*/ | ||
21 | + T get(Class<T> t,Pk pk)throws Exception; | ||
22 | + /**根据ID获取�?��数据*/ | ||
23 | + T load(Class<T> t,Pk pk)throws Exception; | ||
24 | + /**根据hql进行条件查询*/ | ||
25 | + List<T> getAll(String hql)throws Exception; | ||
26 | + /**条件查询*/ | ||
27 | + List<T> getAll(String whereHql,Object...params)throws Exception; | ||
28 | + | ||
29 | + | ||
30 | + /* | ||
31 | + * -------------------------------查询总记录数----------------------------------------- | ||
32 | + */ | ||
33 | + /**根据条件查询总记�?/ | ||
34 | + public int count(String hql) throws Exception; | ||
35 | + /**根据条件和参数查询�?记录*/ | ||
36 | + public int count(String hql, Object... params) throws Exception; | ||
37 | + | ||
38 | +} |
1 | +package yxy.timer.pojo; | ||
2 | + | ||
3 | +import java.io.Serializable; | ||
4 | + | ||
5 | +import javax.persistence.Entity; | ||
6 | +import javax.persistence.GeneratedValue; | ||
7 | +import javax.persistence.GenerationType; | ||
8 | +import javax.persistence.Id; | ||
9 | +import javax.persistence.Table; | ||
10 | + | ||
11 | +@Entity | ||
12 | +@Table(name="yxy_mail_num_count") | ||
13 | +public class YxyMailNumCount implements Serializable{ | ||
14 | + private static final long serialVersionUID = 1L; | ||
15 | + private int id;//主键id | ||
16 | + private String mail_uid;//邮件唯一码 | ||
17 | + private int read_all;//阅读总数 | ||
18 | + private int read_person;//阅读人数 | ||
19 | + private int unsub_person;//退订人数 | ||
20 | + private int replay_person;//回复人数 | ||
21 | + private int open_url;//打开链接次数 | ||
22 | + private int open_url_all;//打开链接总数 | ||
23 | + @Id | ||
24 | + @GeneratedValue(strategy=GenerationType.AUTO) | ||
25 | + public int getId() { | ||
26 | + return id; | ||
27 | + } | ||
28 | + public void setId(int id) { | ||
29 | + this.id = id; | ||
30 | + } | ||
31 | + public String getMail_uid() { | ||
32 | + return mail_uid; | ||
33 | + } | ||
34 | + public void setMail_uid(String mail_uid) { | ||
35 | + this.mail_uid = mail_uid; | ||
36 | + } | ||
37 | + public int getRead_all() { | ||
38 | + return read_all; | ||
39 | + } | ||
40 | + public void setRead_all(int read_all) { | ||
41 | + this.read_all = read_all; | ||
42 | + } | ||
43 | + public int getRead_person() { | ||
44 | + return read_person; | ||
45 | + } | ||
46 | + public void setRead_person(int read_person) { | ||
47 | + this.read_person = read_person; | ||
48 | + } | ||
49 | + public int getUnsub_person() { | ||
50 | + return unsub_person; | ||
51 | + } | ||
52 | + public void setUnsub_person(int unsub_person) { | ||
53 | + this.unsub_person = unsub_person; | ||
54 | + } | ||
55 | + public int getReplay_person() { | ||
56 | + return replay_person; | ||
57 | + } | ||
58 | + public void setReplay_person(int replay_person) { | ||
59 | + this.replay_person = replay_person; | ||
60 | + } | ||
61 | + public int getOpen_url() { | ||
62 | + return open_url; | ||
63 | + } | ||
64 | + public void setOpen_url(int open_url) { | ||
65 | + this.open_url = open_url; | ||
66 | + } | ||
67 | + public int getOpen_url_all() { | ||
68 | + return open_url_all; | ||
69 | + } | ||
70 | + public void setOpen_url_all(int open_url_all) { | ||
71 | + this.open_url_all = open_url_all; | ||
72 | + } | ||
73 | +} |
1 | +#Wed Nov 12 15:31:05 CST 2014 | ||
2 | +eclipse.preferences.version=1 | ||
3 | +org.eclipse.jdt.core.compiler.codegen.targetPlatform=1.5 | ||
4 | +org.eclipse.jdt.core.compiler.compliance=1.5 | ||
5 | +org.eclipse.jdt.core.compiler.problem.assertIdentifier=error | ||
6 | +org.eclipse.jdt.core.compiler.problem.enumIdentifier=error | ||
7 | +org.eclipse.jdt.core.compiler.source=1.5 |
1 | +package yxy.timer.dao.impl; | ||
2 | + | ||
3 | +import java.util.List; | ||
4 | + | ||
5 | +import yxy.timer.dao.YxyUserSetDao; | ||
6 | +import yxy.timer.pojo.YxyUserSet; | ||
7 | + | ||
8 | +/** | ||
9 | + * | ||
10 | + * 用户设置dao实现类 | ||
11 | + * | ||
12 | + */ | ||
13 | +public class YxyUserSetDaoImpl extends HibernateBaseDAOImpl<YxyUserSet, Long> implements YxyUserSetDao{ | ||
14 | + | ||
15 | + /**查询所有用户设置信息*/ | ||
16 | + public List<YxyUserSet> findAllSet() throws Exception { | ||
17 | + String hql="from YxyUserSet"; | ||
18 | + return super.getAll(hql); | ||
19 | + } | ||
20 | + | ||
21 | + | ||
22 | +} |
1 | +package yxy.timer.service; | ||
2 | +import java.util.List; | ||
3 | +import yxy.timer.pojo.YxyReadingDayInfo; | ||
4 | +/** | ||
5 | + * 点读service | ||
6 | + */ | ||
7 | +public interface YxyReadService { | ||
8 | + /**查询所有点读信息*/ | ||
9 | + public List<yxy.timer.pojo.YxyReadingInfo> findAllReadinfo(String nowdate)throws Exception; | ||
10 | + /**批量插入*/ | ||
11 | + public void insertReadPi(List<yxy.timer.pojo.YxyReadingInfo> o)throws Exception; | ||
12 | + /**实体插入*/ | ||
13 | + public int insertRead(yxy.timer.pojo.YxyReadingInfo o)throws Exception; | ||
14 | + /**查询退订信息*/ | ||
15 | + public List<yxy.timer.pojo.YxyUnsubscribeInfo> findUnInfoSet(String hql,int num)throws Exception; | ||
16 | + /**批量插入退订信息*/ | ||
17 | + public void insertUnPi(List<yxy.timer.pojo.YxyUnsubscribeInfo> o)throws Exception; | ||
18 | + /**插入退订信息*/ | ||
19 | + public int insertUn(yxy.timer.pojo.YxyUnsubscribeInfo o)throws Exception; | ||
20 | + /**查询所有点读信息1000条*/ | ||
21 | + public List<yxy.timer.pojo.YxyReadingInfo> findAllRead()throws Exception; | ||
22 | + /**查询今日点读信息表*/ | ||
23 | + public List<YxyReadingDayInfo> findDayRead(int day)throws Exception; | ||
24 | + /**清除今日点读信息表*/ | ||
25 | + public void updateDayRead()throws Exception; | ||
26 | + /**今日批量插入*/ | ||
27 | + public void insertDayReadPi(List<YxyReadingDayInfo> list)throws Exception; | ||
28 | + /**sql更新*/ | ||
29 | + public void updateBySql(String sql)throws Exception; | ||
30 | + /**sql查询*/ | ||
31 | + public List<Object> findBySqlQuery(String sql)throws Exception; | ||
32 | + /**查询是否有记录*/ | ||
33 | + public int findisRecode(String hql)throws Exception; | ||
34 | + /**查询邮件对应的统计数据*/ | ||
35 | + public yxy.timer.pojo.YxyMailNumCount getYxyMailNumCount(String mail_uid)throws Exception; | ||
36 | + /**添加或更新邮件对应的统计数据*/ | ||
37 | + public void addEditYxyMailNumCount(yxy.timer.pojo.YxyMailNumCount count)throws Exception; | ||
38 | + | ||
39 | + /**查询邮件对应的统计数据(个人版sale100)*/ | ||
40 | + public yxy.timer.sale.YxyMailNumCountInfo getYxyMailNumCount2(String mail_uid)throws Exception; | ||
41 | + /**查询是否有记录(个人版sale100)*/ | ||
42 | + public int findisRecode2(String hql)throws Exception; | ||
43 | + /**实体插入(个人版sale100)*/ | ||
44 | + public int insertRead2(yxy.timer.sale.YxyReadingInfo o)throws Exception; | ||
45 | + /**添加或更新邮件对应的统计数据(个人版sale100)*/ | ||
46 | + public void addEditYxyMailNumCount2(yxy.timer.sale.YxyMailNumCountInfo count)throws Exception; | ||
47 | + /**插入退订信息*/ | ||
48 | + public int insertUn2(yxy.timer.sale.YxyUnsubscribeInfo o)throws Exception; | ||
49 | +} |
1 | +package yxy.timer.dao.impl; | ||
2 | +import java.util.List; | ||
3 | +import yxy.timer.dao.YxyMailNumCountInfoSaleDao; | ||
4 | +import yxy.timer.sale.YxyMailNumCountInfo; | ||
5 | +public class YxyMailNumCountInfoSaleDaoImpl extends SaleHibernateBaseDAOImpl<YxyMailNumCountInfo, Long> implements YxyMailNumCountInfoSaleDao{ | ||
6 | + /**实体插入*/ | ||
7 | + public int addPojo(YxyMailNumCountInfo o)throws Exception{ | ||
8 | + return super.add(o); | ||
9 | + } | ||
10 | + /**实体编辑*/ | ||
11 | + public void updatePojo(YxyMailNumCountInfo o)throws Exception{ | ||
12 | + super.update(o); | ||
13 | + } | ||
14 | + /**HQL查询*/ | ||
15 | + public List<YxyMailNumCountInfo> findByHql(String hql)throws Exception{ | ||
16 | + return super.getAll(hql); | ||
17 | + } | ||
18 | + /**指定条记录*/ | ||
19 | + public List<YxyMailNumCountInfo> findByHqlSet(String hql,int num)throws Exception{ | ||
20 | + return super.findBySet(hql, num); | ||
21 | + } | ||
22 | + /**SQL查询*/ | ||
23 | + public List<Object> findBySqlQuery(String sql)throws Exception{ | ||
24 | + return super.findBySql(sql); | ||
25 | + } | ||
26 | + /**HQL更新*/ | ||
27 | + public void updateByHql(String hql)throws Exception{ | ||
28 | + super.updateorDelByHql(hql); | ||
29 | + } | ||
30 | +} |
1 | +<?xml version="1.0" encoding="UTF-8"?> | ||
2 | +<beans xmlns="http://www.springframework.org/schema/beans" | ||
3 | + xmlns:context="http://www.springframework.org/schema/context" | ||
4 | + xmlns:jaxws="http://cxf.apache.org/jaxws" | ||
5 | + xmlns:jaxrs="http://cxf.apache.org/jaxrs" | ||
6 | + xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" | ||
7 | + xmlns:tx="http://www.springframework.org/schema/tx" | ||
8 | + xsi:schemaLocation="http://www.springframework.org/schema/beans | ||
9 | + http://www.springframework.org/schema/beans/spring-beans-3.0.xsd | ||
10 | + http://www.springframework.org/schema/context | ||
11 | + http://www.springframework.org/schema/context/spring-context-3.0.xsd | ||
12 | + http://cxf.apache.org/jaxws | ||
13 | + http://cxf.apache.org/schemas/jaxws.xsd | ||
14 | + http://cxf.apache.org/jaxrs | ||
15 | + http://cxf.apache.org/schemas/jaxrs.xsd | ||
16 | + http://www.springframework.org/schema/tx | ||
17 | + http://www.springframework.org/schema/tx/spring-tx.xsd | ||
18 | + http://www.springframework.org/schema/aop | ||
19 | + http://www.springframework.org/schema/aop/spring-aop.xsd"> | ||
20 | + | ||
21 | + <import resource="classpath:META-INF/cxf/cxf.xml"/> | ||
22 | + <import resource="classpath:META-INF/cxf/cxf-extension-soap.xml"/> | ||
23 | + <import resource="classpath:META-INF/cxf/cxf-servlet.xml"/> | ||
24 | + | ||
25 | + <!-- YxyTimer webservice Wsdl模块配置 --> | ||
26 | + <bean id="linkmanWebserviceWsdl" class="yxy.timer.webservice.interfaces.impl.LinkManWebserviceImpl" /> | ||
27 | + <!-- 客户分类 webservice wsdl 配置 --> | ||
28 | + <bean id="typeWebserviceWsdl" class="yxy.timer.webservice.interfaces.impl.CustomerTypeWebserviceImpl" /> | ||
29 | + <!-- 用户签名 webservice wsdl 配置 --> | ||
30 | + <bean id="signatureWebserviceWsdl" class="yxy.timer.webservice.interfaces.impl.UserSignatureWebserviceImpl"/> | ||
31 | + <!-- 获取邮件基本信息webservice wsdl配置 --> | ||
32 | + <bean id="getmailinfoWsdl" class="yxy.timer.webservice.interfaces.impl.GetMailInterfacesImpl"> | ||
33 | + <property name="yxysendmailmasterbasedao" ref="yxysendmailmasterbasedao"></property> | ||
34 | + <property name="yxysysparamaterservice" ref="yxysysparamaterservice"></property> | ||
35 | + </bean> | ||
36 | + | ||
37 | + <!-- webmail统计营销邮数据 wsdl 配置 --> | ||
38 | + <bean id="yxycountwebservicewsdl" class="yxy.timer.webservice.interfaces.impl.YxyCountWebserviceImpl"> | ||
39 | + <property name="timercountyxydao" ref="timercountyxydao"></property> | ||
40 | + </bean> | ||
41 | + | ||
42 | + <!--联系人 webservice Wsdl访问方式 --> | ||
43 | + <jaxws:server id="linkmanWebservice" serviceClass="yxy.timer.webservice.interfaces.impl.LinkManWebserviceImpl" address="/linkmanWebservice"> | ||
44 | + <jaxws:serviceBean> | ||
45 | + <ref bean="linkmanWebserviceWsdl" /> | ||
46 | + </jaxws:serviceBean> | ||
47 | + </jaxws:server> | ||
48 | + | ||
49 | + <!-- 客户分类 webservice Wsdl访问方式 --> | ||
50 | + <jaxws:server id="typeWebservice" serviceClass="yxy.timer.webservice.interfaces.impl.CustomerTypeWebserviceImpl" address="/typeWebservice"> | ||
51 | + <jaxws:serviceBean> | ||
52 | + <ref bean="typeWebserviceWsdl"/> | ||
53 | + </jaxws:serviceBean> | ||
54 | + </jaxws:server> | ||
55 | + | ||
56 | + <!-- 用户签名webservice Wsdl访问方式 --> | ||
57 | + <jaxws:server id="signatueWebservice" serviceClass="yxy.timer.webservice.interfaces.impl.UserSignatureWebserviceImpl" address="/signatureWebservice"> | ||
58 | + <jaxws:serviceBean> | ||
59 | + <ref bean="signatureWebserviceWsdl"/> | ||
60 | + </jaxws:serviceBean> | ||
61 | + </jaxws:server> | ||
62 | + | ||
63 | + <!-- webmail统计营销邮数据 --> | ||
64 | + <jaxws:server id="yxycountwebservice" serviceClass="yxy.timer.webservice.interfaces.impl.YxyCountWebserviceImpl" address="/yxycountWebservice"> | ||
65 | + <jaxws:serviceBean> | ||
66 | + <ref bean="yxycountwebservicewsdl"/> | ||
67 | + </jaxws:serviceBean> | ||
68 | + </jaxws:server> | ||
69 | + | ||
70 | + <!-- 获取邮件基本信息webservice wsdl配置 --> | ||
71 | + <jaxws:server id="getmailinfowebservice" serviceClass="yxy.timer.webservice.interfaces.impl.GetMailInterfacesImpl" address="/yxymailinfoWebservice"> | ||
72 | + <jaxws:serviceBean> | ||
73 | + <ref bean="getmailinfoWsdl"/> | ||
74 | + </jaxws:serviceBean> | ||
75 | + </jaxws:server> | ||
76 | + </beans> |
不能预览此文件类型
-
请 注册 或 登录 后发表评论