|
@ -19,6 +19,8 @@ import org.jfw.util.exception.JfwBaseException;
|
19
|
19
|
import com.ekexiu.portal.dao.OrgDao;
|
20
|
20
|
import com.ekexiu.portal.mail.MailService;
|
21
|
21
|
import com.ekexiu.portal.po.Organization;
|
|
22
|
import com.ekexiu.portal.pojo.EditOrganization;
|
|
23
|
import com.ekexiu.portal.service.ImageService;
|
22
|
24
|
|
23
|
25
|
@Path()
|
24
|
26
|
public class SysMailService {
|
|
@ -35,7 +37,19 @@ public class SysMailService {
|
35
|
37
|
@Autowrie
|
36
|
38
|
private OrgInviteLogDao orgInviteLogDao;
|
37
|
39
|
|
|
40
|
@Autowrie
|
|
41
|
private ImageService imageService;
|
|
42
|
|
38
|
43
|
|
|
44
|
|
|
45
|
|
|
46
|
public ImageService getImageService() {
|
|
47
|
return imageService;
|
|
48
|
}
|
|
49
|
|
|
50
|
public void setImageService(ImageService imageService) {
|
|
51
|
this.imageService = imageService;
|
|
52
|
}
|
39
|
53
|
|
40
|
54
|
public long getTimeoutOfOrgInviteLog() {
|
41
|
55
|
return timeoutOfOrgInviteLog;
|
|
@ -134,12 +148,16 @@ public class SysMailService {
|
134
|
148
|
|
135
|
149
|
@Get
|
136
|
150
|
@Path("/queryOrgByOrgInviteLogId")
|
137
|
|
public Organization queryOrgByOrgInviteLogId(@JdbcConn Connection con,String code)throws SQLException{
|
|
151
|
public EditOrganization queryOrgByOrgInviteLogId(@JdbcConn Connection con,String code)throws SQLException{
|
138
|
152
|
OrgInviteLog log = this.orgInviteLogDao.query(con,code);
|
139
|
153
|
if(log!=null){
|
140
|
154
|
String time = DateUtil.formatDateTime(System.currentTimeMillis()-this.timeoutOfOrgInviteLog);
|
141
|
155
|
if(time.compareTo(log.getCreateTime())<=0){
|
142
|
|
return this.orgDao.query(con,log.getOid());
|
|
156
|
EditOrganization eo = this.orgDao.queryEditOrg(con,log.getOid());
|
|
157
|
if(eo!=null){
|
|
158
|
eo.setHasOrgLogo(this.imageService.hasOrgLogo(eo.getId()));
|
|
159
|
return eo;
|
|
160
|
}
|
143
|
161
|
}
|
144
|
162
|
}
|
145
|
163
|
return null;
|