| @@ -25,6 +25,9 @@ public class GlobalDefultExceptionHandler { | |||||
| @Autowired | @Autowired | ||||
| private boolean isFmException; | private boolean isFmException; | ||||
| @Autowired | |||||
| private String fmExceptionEmails; | |||||
| @Autowired | @Autowired | ||||
| private MailService mailService; | private MailService mailService; | ||||
| @@ -51,7 +54,7 @@ public class GlobalDefultExceptionHandler { | |||||
| sb.append("\n"); | sb.append("\n"); | ||||
| sb.append(sw.toString()); | sb.append(sw.toString()); | ||||
| String[] receivers = new String[] {"hupeng@iformall.com", "wuguoqiang@iformall.com", "gongbiao@iformall.com", "luozukai@iformall.com"}; | |||||
| String[] receivers = fmExceptionEmails.split(","); | |||||
| //发送邮件 | //发送邮件 | ||||
| mailService.sendSimpleMail(receivers, "请求地址:" + request.getRequestURL() + "异常", sb.toString()); | mailService.sendSimpleMail(receivers, "请求地址:" + request.getRequestURL() + "异常", sb.toString()); | ||||
| @@ -22,14 +22,30 @@ public class WechatOpenApplication { | |||||
| @Value("${fm.exception}") | @Value("${fm.exception}") | ||||
| private boolean fmException; | private boolean fmException; | ||||
| @Bean | |||||
| public boolean isFmException() { | |||||
| return fmException; | |||||
| } | |||||
| @Value("${fm.exception_emails}") | |||||
| private String fmExceptionEmails; | |||||
| @Value("${fm.audit_emails}") | |||||
| private String fmAuditEmails; | |||||
| @Value("${fm.deploy}") | @Value("${fm.deploy}") | ||||
| private Integer fmDeploy; | private Integer fmDeploy; | ||||
| @Bean | |||||
| public boolean isFmException() { | |||||
| return fmException; | |||||
| } | |||||
| @Bean | |||||
| public String fmExceptionEmails() { | |||||
| return fmExceptionEmails; | |||||
| } | |||||
| @Bean | |||||
| public String fmAuditEmails() { | |||||
| return fmAuditEmails; | |||||
| } | |||||
| @Bean | @Bean | ||||
| public Integer getFmDeploy() { return fmDeploy; } | public Integer getFmDeploy() { return fmDeploy; } | ||||
| @@ -44,6 +44,9 @@ import java.util.Date; | |||||
| public class WechatCalllbackController extends BaseController { | public class WechatCalllbackController extends BaseController { | ||||
| private final Logger logger = LoggerFactory.getLogger(this.getClass()); | private final Logger logger = LoggerFactory.getLogger(this.getClass()); | ||||
| @Autowired | |||||
| private String fmAuditEmails; | |||||
| @Autowired | @Autowired | ||||
| protected FmOpenService openService; | protected FmOpenService openService; | ||||
| @@ -350,7 +353,7 @@ public class WechatCalllbackController extends BaseController { | |||||
| sb.append("审核未通过\n").append("原因").append(reason); | sb.append("审核未通过\n").append("原因").append(reason); | ||||
| } | } | ||||
| String[] receivers = new String[]{"wangmei@iformall.com", "wuguoqiang@iformall.com", "huanghui@iformall.com", "sunmingming@iformall.com"}; | |||||
| String[] receivers = fmAuditEmails.split(","); | |||||
| //发送邮件 | //发送邮件 | ||||
| mailService.sendSimpleMail(receivers, titleSB.toString(), sb.toString()); | mailService.sendSimpleMail(receivers, titleSB.toString(), sb.toString()); | ||||
| @@ -43,14 +43,17 @@ spring: | |||||
| mail: | mail: | ||||
| host: smtp.exmail.qq.com | host: smtp.exmail.qq.com | ||||
| username: ENC(R0bER9E9OB9/YQcpNXMyYDwofNVb8/pFl4nrApS8mi0=) | |||||
| password: ENC(50YqJd0iK/2r2YnmEd5RKaki3ktU73UDapBJrVYfqmc=) # 授权密码 | |||||
| username: ENC(lknBjZsA24AaQEXuy0fFw3acd4v4Xsf3CsgDcRZgjlYnNAL9R07d/w==) | |||||
| password: ENC(gIkVPuYMmJ/EDxry8QIfGumIAk4plAwolGrfg1fiM3U=) # 授权密码 | |||||
| properties: | properties: | ||||
| mail: | mail: | ||||
| smtp: | smtp: | ||||
| auth: true | auth: true | ||||
| starttls: | starttls: | ||||
| enable: true | enable: true | ||||
| socketFactory: | |||||
| port: 465 | |||||
| class: javax.net.ssl.SSLSocketFactory | |||||
| aws: | aws: | ||||
| clientRegion: cn-northwest-1 | clientRegion: cn-northwest-1 | ||||
| bucketName: iformall-net | bucketName: iformall-net | ||||
| @@ -84,6 +87,8 @@ jasypt: | |||||
| fm: | fm: | ||||
| exception: false | exception: false | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||||
| audit_emails: wangmei@iformall.com,wuguoqiang@iformall.com,huanghui@iformall.com,sunmingming@iformall.com | |||||
| deploy: 1 | deploy: 1 | ||||
| logging: | logging: | ||||
| @@ -40,14 +40,17 @@ spring: | |||||
| mail: | mail: | ||||
| host: smtp.exmail.qq.com | host: smtp.exmail.qq.com | ||||
| username: ENC(I2YKxnRVPY7J1r/bwzwHOhQCjj3nVqCWEbVTJvBq7y0=) | |||||
| password: ENC(APQMO9XQRzMKd0eap+oSSOYH9MQe/r5K0YFF9A9mizU=) # 授权密码 | |||||
| username: ENC(IiL/PHP9wCkpibWHRH/Mts8K9fh4izYqaiaF66bDrqtEHP+KUcJRRg==) | |||||
| password: ENC(m7L57m8mk6tApVoa4XIDQnXF0VxnYjKe4LVdzcgb+xY=) # 授权密码 | |||||
| properties: | properties: | ||||
| mail: | mail: | ||||
| smtp: | smtp: | ||||
| auth: true | auth: true | ||||
| starttls: | starttls: | ||||
| enable: true | enable: true | ||||
| socketFactory: | |||||
| port: 465 | |||||
| class: javax.net.ssl.SSLSocketFactory | |||||
| aws: | aws: | ||||
| clientRegion: cn-northwest-1 | clientRegion: cn-northwest-1 | ||||
| @@ -78,6 +81,8 @@ wechat: | |||||
| fm: | fm: | ||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||||
| audit_emails: wangmei@iformall.com,wuguoqiang@iformall.com,huanghui@iformall.com,sunmingming@iformall.com | |||||
| deploy: 3 | deploy: 3 | ||||
| logging: | logging: | ||||
| @@ -40,8 +40,8 @@ spring: | |||||
| mail: | mail: | ||||
| host: smtp.exmail.qq.com | host: smtp.exmail.qq.com | ||||
| username: ENC(HFbRXtAFVxU36Hk0yT3reyvRuLrw3RhMlbxFj9Ev/VY=) | |||||
| password: ENC(pk4+/3C5n2hMYmgi+VTqI4P1m77DllW8y4KElMXXmIo=) # 授权密码 | |||||
| username: ENC(TtJQE2C4cWo8CpVGMMl5hiy5eykepd96J5XjsW3Kj5fgP+6+5ctDNQ==) | |||||
| password: ENC(Zh6A6kRtA2ABtH6nzdvsqQSO1/8p3mparJr8neI2BLU=) # 授权密码 | |||||
| properties: | properties: | ||||
| mail: | mail: | ||||
| smtp: | smtp: | ||||
| @@ -91,6 +91,8 @@ wechat: | |||||
| fm: | fm: | ||||
| exception: true | exception: true | ||||
| exception_emails: hupeng@iformall.com,wuguoqiang@iformall.com,gongbiao@iformall.com,luozukai@iformall.com,hanxueda@iformall.com | |||||
| audit_emails: wangmei@iformall.com,wuguoqiang@iformall.com,huanghui@iformall.com,sunmingming@iformall.com | |||||
| deploy: 2 | deploy: 2 | ||||
| ueditor: | ueditor: | ||||