Browse Source

--add bindOrgMailReplaceContentTempalte config;

zzy.zhiyuan.foxmail 8 years ago
parent
commit
5564606798

+ 32 - 4
src/main/java/com/ekexiu/portal/service/SysService.java

@ -65,6 +65,10 @@ public class SysService {
65 65
	private String bindMailReplaceKey;
66 66
	private String bindMailReplaceContentTempalte;
67 67
	private long timeLimitWithBindMail = 10 * 60 * 1000;
68
	
69
	private String bindOrgMailReplaceKey;
70
	private String bindOrgMailReplaceContentTempalte;
71
	private long timeLimitWithBindOrgMail = 10 * 60 * 1000;
68 72
69 73
	private String regMailSubject = "注册[科袖网]用户";
70 74
	private String regMailReplaceKey;
@ -294,6 +298,30 @@ public class SysService {
294 298
		this.bindMailReplaceKey = bindMailReplaceKey;
295 299
	}
296 300
301
	public String getBindOrgMailReplaceKey() {
302
		return bindOrgMailReplaceKey;
303
	}
304
305
	public void setBindOrgMailReplaceKey(String bindOrgMailReplaceKey) {
306
		this.bindOrgMailReplaceKey = bindOrgMailReplaceKey;
307
	}
308
309
	public String getBindOrgMailReplaceContentTempalte() {
310
		return bindOrgMailReplaceContentTempalte;
311
	}
312
313
	public void setBindOrgMailReplaceContentTempalte(String bindOrgMailReplaceContentTempalte) {
314
		this.bindOrgMailReplaceContentTempalte = bindOrgMailReplaceContentTempalte;
315
	}
316
317
	public long getTimeLimitWithBindOrgMail() {
318
		return timeLimitWithBindOrgMail;
319
	}
320
321
	public void setTimeLimitWithBindOrgMail(long timeLimitWithBindOrgMail) {
322
		this.timeLimitWithBindOrgMail = timeLimitWithBindOrgMail;
323
	}
324
297 325
	public String getMailRetrievePasswordContentTemplate() {
298 326
		return mailRetrievePasswordContentTemplate;
299 327
	}
@ -940,11 +968,11 @@ public class SysService {
940 968
		final String key = JfwAppContext.cacheObjectAndGenKey(sc);
941 969
942 970
		Map<String, String> map = new HashMap<String, String>();
943
		map.put(this.bindMailReplaceKey, key);
971
		map.put(this.bindOrgMailReplaceKey, key);
944 972
		try {
945
			mailservice.sendSimpleMail(mail, this.bindMailReplaceContentTempalte, map, this.bindMailSubject);
973
			mailservice.sendSimpleMail(mail, this.bindOrgMailReplaceContentTempalte, map, this.bindMailSubject);
946 974
			long ct = System.currentTimeMillis();
947
			long et = ct + this.timeLimitWithBindMail + 10000;
975
			long et = ct + this.timeLimitWithBindOrgMail + 10000;
948 976
			sc.setBuildTime(ct);
949 977
			sc.setExpiredTime(et);
950 978
			JfwAppContext.getScheduledExecutorService().schedule(new Runnable() {
@ -952,7 +980,7 @@ public class SysService {
952 980
				public void run() {
953 981
					JfwAppContext.removeCachedObject(key);
954 982
				}
955
			}, this.timeLimitWithBindMail + 20000, TimeUnit.MILLISECONDS);
983
			}, this.timeLimitWithBindOrgMail + 20000, TimeUnit.MILLISECONDS);
956 984
		} catch (Exception e) {
957 985
			JfwAppContext.removeCachedObject(key);
958 986
			throw new JfwBaseException(10011, "send mail to " + mail + " error", e);

+ 4 - 1
src/main/resources/project-test-dev.properties

@ -55,10 +55,13 @@ com_ekexiu_portal_service_ImageService.defaultHeadPhoto::java.io.File=/kexiu/www
55 55
com_ekexiu_portal_service_ImageService.defaultOrgLogo::java.io.File=/kexiu/www/html1/images/default-icon.jpg
56 56
#资源默认图片保存路径
57 57
com_ekexiu_portal_service_ImageService.defaultResourcePhoto::java.io.File=/kexiu/www/html1/images/default-icon.jpg
58
#邮箱验证-绑定邮箱
58
#个人邮箱验证-绑定个人邮箱
59 59
com_ekexiu_portal_service_SysService.bindMailSubject=\u8BF7\u6C42\u7ED1\u5B9A\u90AE\u7BB1
60 60
com_ekexiu_portal_service_SysService.bindMailReplaceKey=stateCode
61 61
com_ekexiu_portal_service_SysService.bindMailReplaceContentTempalte=<html style\="height\:auto;"><head><meta name\="viewport" content\="width\=device-width, initial-scale\=1" /><meta http-equiv\="Content-Type" content\="text/html;charset\=UTF-8"><style type\="text/css">html,body {font\: 14px/1.666 Tahoma, Arial;border\: 0;margin\: 0;padding\: 0;color\: \#000000;scrollbar-base-color\: \#dddddd;scrollbar-3dlight-color\: \#ffffff;scrollbar-highlight-color\: \#dddddd;scrollbar-shadow-color\: \#ffffff;scrollbar-darkshadow-color\: \#ffffff;scrollbar-track-color\: \#ffffff;scrollbar-arrow-color\: \#999999;} div,form,input,textarea,span,img,iframe {margin\: 0;padding\: 0;border\: 0;outline\: 0;} input {cursor\: pointer;} blockquote { margin-left\: 30px;margin-right\: 0; padding\: 0; border\: 0;} blockquote blockquote { margin-left\: 0px;} pre { white-space\: pre-wrap;white-space\: -moz-pre-wrap;white-space\: -pre-wrap;white-space\: -o-pre-wrap;} @media only screen and (max-width\: 600px) { div[class\="img-responsive"]{ text-align\:center\!important;} } </style></head><body style\="height\:auto;padding\:0;margin\:0;border\:0;overflow\:hidden;background\:\#d9dfe2;"> <div class\="img-responsive" style\="margin-top\:40px;padding\:20px;background\:\#ECF0F5;width\:100%;"> <img src\="http\://192.168.3.233/images/logo4.png"> </div><div style\="width\:100.0%;"><div class\="wrapper" style\="width\: auto; margin\: auto; background\: rgb(255, 255, 255);" _ow\="600px"><div style\="margin\:auto">                <div class\="row" style\="text-align\:left;"></div><div class\="row"><div style\="position\:relative;padding\:15.0px 50.0px 10.0px 50.0px;"><p class\="start" style\="color\:\#555555;font-size\:14.0px;line-height\:24.0px;padding-top\:10.0px;text-justify\:inter-ideograph;text-align\:justify;">\u5C0A\u656C\u7684\u7528\u6237\uFF1A</p><p class\="start" style\="color\:\#555555;font-size\:14.0px;line-height\:24.0px;padding-top\:10.0px;text-justify\:inter-ideograph;text-align\:justify;">\u60A8\u597D\uFF01</p><p class\="start" style\="color\:\#555555;font-size\:14.0px;line-height\:24.0px;padding-top\:10.0px;text-justify\:inter-ideograph;text-align\:justify;">\u60A8\u6B63\u5728\u901A\u8FC7\u90AE\u7BB1\u7ED1\u5B9A [\u79D1\u8896] \u8D26\u6237\uFF0C\u8BF7\u8BBF\u95EE\u4E0B\u9762\u7684\u7F51\u5740\u5B8C\u6210\u90AE\u7BB1\u8D26\u6237\u7ED1\u5B9A\u3002</p><p><a style\="color\:\#ff9900" href\="http\://localhost/account-binding.html?sc\=stateCode" target\="_blank">http\://localhost/account-binding.html?sc\=stateCode</a></p><p style\="margin-top\:30.0px;margin-bottom\:0;font-size\:14.0px;line-height\:24.0px;color\:\#555555;border-top\:1.0px solid \#eeeded;padding-top\:15.0px;">\u7CFB\u7EDF\u53D1\u4FE1\uFF0C\u8BF7\u52FF\u56DE\u590D</p><p style\="margin-top\:0;margin-bottom\:0;font-size\:14.0px;line-height\:24.0px;color\:\#555555;">\u7535\u8BDD\: 010-62343359</p><p style\="margin-top\:0;margin-bottom\:0;font-size\:14.0px;line-height\:24.0px;color\:\#555555;">\u90AE\u7BB1\: service@ekexiu.com</p><p style\="margin-top\:0;margin-bottom\:30.0px;font-size\:14.0px;line-height\:24.0px;color\:\#555555;">\u5B98\u7F51\: <a style\="color\:\#ff9900" href\="http\://localhost/" target\="_blank">www.ekexiu.com</a></p></div></div></div><div style\="background\:\#ECF0F5;width\:100.0%;color\:\#999999;padding\:10px 20px;font-size\:12.0px;"><p style\="padding-bottom\:0;margin-bottom\:0;">&copy; 2016 \u5317\u4EAC\u79D1\u8896\u79D1\u6280\u6709\u9650\u516C\u53F8 &nbsp; | &nbsp; \u4EACICP\u590716042588\u53F7-1 &nbsp; | &nbsp;<a class\="beianbox" style\="color\:\#399A9B;" target\="_black" rel\="nofollow" href\="http\://www.beian.gov.cn/portal/registerSystemInfo?recordcode\=11010802022306"><span class\="beian-icon"></span> \u4EAC\u516C\u7F51\u5B89\u590711010802022306\u53F7</a></p><p style\="padding-top\:0;margin-top\:0;">\u610F\u89C1\u5EFA\u8BAE\uFF1A<strong><a style\="color\:\#399A9B;" rel\="nofollow" href\="mailto\:service@ekexiu.com">service@ekexiu.com</a></strong>&nbsp;&nbsp;&nbsp; \u5BA2\u670D\u7535\u8BDD\uFF1A  010-62343359\uFF089\:00-17\:00\uFF09 </p></div></div></div></body></html>
62
#企业邮箱验证-绑定企业邮箱
63
com_ekexiu_portal_service_SysService.bindMailReplaceKey=stateCode
64
com_ekexiu_portal_service_SysService.bindMailReplaceContentTempalte=<html style\="height\:auto;"><head><meta name\="viewport" content\="width\=device-width, initial-scale\=1" /><meta http-equiv\="Content-Type" content\="text/html;charset\=UTF-8"><style type\="text/css">html,body {font\: 14px/1.666 Tahoma, Arial;border\: 0;margin\: 0;padding\: 0;color\: \#000000;scrollbar-base-color\: \#dddddd;scrollbar-3dlight-color\: \#ffffff;scrollbar-highlight-color\: \#dddddd;scrollbar-shadow-color\: \#ffffff;scrollbar-darkshadow-color\: \#ffffff;scrollbar-track-color\: \#ffffff;scrollbar-arrow-color\: \#999999;} div,form,input,textarea,span,img,iframe {margin\: 0;padding\: 0;border\: 0;outline\: 0;} input {cursor\: pointer;} blockquote { margin-left\: 30px;margin-right\: 0; padding\: 0; border\: 0;} blockquote blockquote { margin-left\: 0px;} pre { white-space\: pre-wrap;white-space\: -moz-pre-wrap;white-space\: -pre-wrap;white-space\: -o-pre-wrap;} @media only screen and (max-width\: 600px) { div[class\="img-responsive"]{ text-align\:center\!important;} } </style></head><body style\="height\:auto;padding\:0;margin\:0;border\:0;overflow\:hidden;background\:\#d9dfe2;"> <div class\="img-responsive" style\="margin-top\:40px;padding\:20px;background\:\#ECF0F5;width\:100%;"> <img src\="http\://192.168.3.233/images/logo4.png"> </div><div style\="width\:100.0%;"><div class\="wrapper" style\="width\: auto; margin\: auto; background\: rgb(255, 255, 255);" _ow\="600px"><div style\="margin\:auto">                <div class\="row" style\="text-align\:left;"></div><div class\="row"><div style\="position\:relative;padding\:15.0px 50.0px 10.0px 50.0px;"><p class\="start" style\="color\:\#555555;font-size\:14.0px;line-height\:24.0px;padding-top\:10.0px;text-justify\:inter-ideograph;text-align\:justify;">\u5C0A\u656C\u7684\u7528\u6237\uFF1A</p><p class\="start" style\="color\:\#555555;font-size\:14.0px;line-height\:24.0px;padding-top\:10.0px;text-justify\:inter-ideograph;text-align\:justify;">\u60A8\u597D\uFF01</p><p class\="start" style\="color\:\#555555;font-size\:14.0px;line-height\:24.0px;padding-top\:10.0px;text-justify\:inter-ideograph;text-align\:justify;">\u60A8\u6B63\u5728\u901A\u8FC7\u90AE\u7BB1\u7ED1\u5B9A [\u79D1\u8896] \u8D26\u6237\uFF0C\u8BF7\u8BBF\u95EE\u4E0B\u9762\u7684\u7F51\u5740\u5B8C\u6210\u90AE\u7BB1\u8D26\u6237\u7ED1\u5B9A\u3002</p><p><a style\="color\:\#ff9900" href\="http\://localhost/cmp-portal/cmp-mailOk.html?sc\=stateCode" target\="_blank">http\://localhost/cmp-portal/cmp-mailOk.html?sc\=stateCode</a></p><p style\="margin-top\:30.0px;margin-bottom\:0;font-size\:14.0px;line-height\:24.0px;color\:\#555555;border-top\:1.0px solid \#eeeded;padding-top\:15.0px;">\u7CFB\u7EDF\u53D1\u4FE1\uFF0C\u8BF7\u52FF\u56DE\u590D</p><p style\="margin-top\:0;margin-bottom\:0;font-size\:14.0px;line-height\:24.0px;color\:\#555555;">\u7535\u8BDD\: 010-62343359</p><p style\="margin-top\:0;margin-bottom\:0;font-size\:14.0px;line-height\:24.0px;color\:\#555555;">\u90AE\u7BB1\: service@ekexiu.com</p><p style\="margin-top\:0;margin-bottom\:30.0px;font-size\:14.0px;line-height\:24.0px;color\:\#555555;">\u5B98\u7F51\: <a style\="color\:\#ff9900" href\="http\://localhost/" target\="_blank">www.ekexiu.com</a></p></div></div></div><div style\="background\:\#ECF0F5;width\:100.0%;color\:\#999999;padding\:10px 20px;font-size\:12.0px;"><p style\="padding-bottom\:0;margin-bottom\:0;">&copy; 2016 \u5317\u4EAC\u79D1\u8896\u79D1\u6280\u6709\u9650\u516C\u53F8 &nbsp; | &nbsp; \u4EACICP\u590716042588\u53F7-1 &nbsp; | &nbsp;<a class\="beianbox" style\="color\:\#399A9B;" target\="_black" rel\="nofollow" href\="http\://www.beian.gov.cn/portal/registerSystemInfo?recordcode\=11010802022306"><span class\="beian-icon"></span> \u4EAC\u516C\u7F51\u5B89\u590711010802022306\u53F7</a></p><p style\="padding-top\:0;margin-top\:0;">\u610F\u89C1\u5EFA\u8BAE\uFF1A<strong><a style\="color\:\#399A9B;" rel\="nofollow" href\="mailto\:service@ekexiu.com">service@ekexiu.com</a></strong>&nbsp;&nbsp;&nbsp; \u5BA2\u670D\u7535\u8BDD\uFF1A  010-62343359\uFF089\:00-17\:00\uFF09 </p></div></div></div></body></html>
62 65
#邮箱验证-注册个人用户
63 66
com_ekexiu_portal_service_SysService.regMailReplaceKey=stateCode
64 67
com_ekexiu_portal_service_SysService.regMailReplaceContentTempalte=<html style\="height\:auto;"><head><meta name\="viewport" content\="width\=device-width, initial-scale\=1" /><meta http-equiv\="Content-Type" content\="text/html;charset\=UTF-8"><style type\="text/css">html,body {font\: 14px/1.666 Tahoma, Arial;border\: 0;margin\: 0;padding\: 0;color\: \#000000;scrollbar-base-color\: \#dddddd;scrollbar-3dlight-color\: \#ffffff;scrollbar-highlight-color\: \#dddddd;scrollbar-shadow-color\: \#ffffff;scrollbar-darkshadow-color\: \#ffffff;scrollbar-track-color\: \#ffffff;scrollbar-arrow-color\: \#999999;} div,form,input,textarea,span,img,iframe {margin\: 0;padding\: 0;border\: 0;outline\: 0;} input {cursor\: pointer;} blockquote { margin-left\: 30px;margin-right\: 0; padding\: 0; border\: 0;} blockquote blockquote { margin-left\: 0px;} pre { white-space\: pre-wrap;white-space\: -moz-pre-wrap;white-space\: -pre-wrap;white-space\: -o-pre-wrap;} @media only screen and (max-width\: 600px) { div[class\="img-responsive"]{ text-align\:center\!important;} } </style></head><body style\="height\:auto;padding\:0;margin\:0;border\:0;overflow\:hidden;background\:\#d9dfe2;"> <div class\="img-responsive" style\="margin-top\:40px;padding\:20px;background\:\#ECF0F5;width\:100%;"> <img src\="http\://192.168.3.233/images/logo4.png"> </div><div style\="width\:100.0%;"><div class\="wrapper" style\="width\: auto; margin\: auto; background\: rgb(255, 255, 255);" _ow\="600px"><div style\="margin\:auto">                <div class\="row" style\="text-align\:left;"></div><div class\="row"><div style\="position\:relative;padding\:15.0px 50.0px 10.0px 50.0px;"><p class\="start" style\="color\:\#555555;font-size\:14.0px;line-height\:24.0px;padding-top\:10.0px;text-justify\:inter-ideograph;text-align\:justify;">\u5C0A\u656C\u7684\u7528\u6237\uFF1A</p><p class\="start" style\="color\:\#555555;font-size\:14.0px;line-height\:24.0px;padding-top\:10.0px;text-justify\:inter-ideograph;text-align\:justify;">\u60A8\u597D\uFF01</p><p class\="start" style\="color\:\#555555;font-size\:14.0px;line-height\:24.0px;padding-top\:10.0px;text-justify\:inter-ideograph;text-align\:justify;">\u60A8\u6B63\u5728\u901A\u8FC7\u90AE\u7BB1\u6CE8\u518C [\u79D1\u8896] \uFF0C\u8BF7\u8BBF\u95EE\u4E0B\u9762\u7684\u7F51\u5740\u5B8C\u6210\u90AE\u7BB1\u6CE8\u518C\u3002</p><p><a style\="color\:\#ff9900" href\="http\://localhost/bind-mail.html?sc\=stateCode" target\="_blank">http\://localhost/bind-mail.html?sc\=stateCode</a></p><p style\="margin-top\:30.0px;margin-bottom\:0;font-size\:14.0px;line-height\:24.0px;color\:\#555555;border-top\:1.0px solid \#eeeded;padding-top\:15.0px;">\u7CFB\u7EDF\u53D1\u4FE1\uFF0C\u8BF7\u52FF\u56DE\u590D</p><p style\="margin-top\:0;margin-bottom\:0;font-size\:14.0px;line-height\:24.0px;color\:\#555555;">\u7535\u8BDD\: 010-62343359</p><p style\="margin-top\:0;margin-bottom\:0;font-size\:14.0px;line-height\:24.0px;color\:\#555555;">\u90AE\u7BB1\: service@ekexiu.com</p><p style\="margin-top\:0;margin-bottom\:30.0px;font-size\:14.0px;line-height\:24.0px;color\:\#555555;">\u5B98\u7F51\: <a style\="color\:\#ff9900" href\="http\://localhost/" target\="_blank">www.ekexiu.com</a></p></div></div></div><div style\="background\:\#ECF0F5;width\:100.0%;color\:\#999999;padding\:10px 20px;font-size\:12.0px;"><p style\="padding-bottom\:0;margin-bottom\:0;">&copy; 2016 \u5317\u4EAC\u79D1\u8896\u79D1\u6280\u6709\u9650\u516C\u53F8 &nbsp; | &nbsp; \u4EACICP\u590716042588\u53F7-1 &nbsp; | &nbsp;<a class\="beianbox" style\="color\:\#399A9B;" target\="_black" rel\="nofollow" href\="http\://www.beian.gov.cn/portal/registerSystemInfo?recordcode\=11010802022306"><span class\="beian-icon"></span> \u4EAC\u516C\u7F51\u5B89\u590711010802022306\u53F7</a></p><p style\="padding-top\:0;margin-top\:0;">\u610F\u89C1\u5EFA\u8BAE\uFF1A<strong><a style\="color\:\#399A9B;" rel\="nofollow" href\="mailto\:service@ekexiu.com">service@ekexiu.com</a></strong>&nbsp;&nbsp;&nbsp; \u5BA2\u670D\u7535\u8BDD\uFF1A 010-62343359\uFF089\:00-17\:00\uFF09 </p></div></div></div></body></html>