update 邮箱样式微调
This commit is contained in:
@@ -27,7 +27,7 @@
|
||||
style="position:relative; display:inline-flex; align-items:center; justify-content:center; margin-top:2vh; width:80%; max-width:300px; height:50px; border-radius:12px; background:#ffffff; border:3px solid #651EFE;">
|
||||
<!-- 合并 th:style 属性 -->
|
||||
<span class="code-text js-code-text" data-default-code="4MKM6AX" th:text="${code}"
|
||||
style="font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; font-weight:800; font-size:24px; letter-spacing:0.18em; color:#111827;"></span>
|
||||
style="font-family: ui-monospace, SFMono-Regular, Menlo, Monaco, Consolas, 'Liberation Mono', 'Courier New', monospace; font-weight:800; font-size:24px; letter-spacing:0.18em; color:#111827;margin:auto;"></span>
|
||||
</div>
|
||||
</section>
|
||||
|
||||
|
||||
@@ -0,0 +1,33 @@
|
||||
package com.m2pool.pool.dto;
|
||||
|
||||
import lombok.Data;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
||||
/**
|
||||
* @Description 矿机收益
|
||||
* @Date 2025/8/15 11:17
|
||||
* @Author yyb
|
||||
*/
|
||||
@Data
|
||||
public class MinerIncomeDto {
|
||||
|
||||
|
||||
/**
|
||||
* 挖矿账户
|
||||
*/
|
||||
private String user;
|
||||
|
||||
/**
|
||||
* 矿工编号
|
||||
*/
|
||||
private String miner;
|
||||
|
||||
/**
|
||||
* 一小时平均算力
|
||||
*/
|
||||
private BigDecimal avgPower;
|
||||
|
||||
|
||||
}
|
||||
@@ -121,18 +121,16 @@ public class OffLineNoticeTask {
|
||||
//执行通知
|
||||
List<String> emails = userEmails.getOrDefault(e.getUser(), null);
|
||||
if(StringUtils.isNotNull(emails)){
|
||||
String text = "您的"+Pools.NEXA.getCoin()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
e.getOffline() + "台矿机离线!\n"+
|
||||
"若您的矿机是因异常断开,请及时处理!";
|
||||
|
||||
//emails为list,实际情况下,一个miner只会对应一个邮箱
|
||||
emails.forEach(email ->{
|
||||
System.out.println("用户"+e.getUser()+"矿机离线通知到"+email);
|
||||
EmailEntity entity = new EmailEntity();
|
||||
entity.setSubject("[M2Pool] 矿机离线提示");
|
||||
entity.setEmail(email);
|
||||
entity.setText(text);
|
||||
mailService.sendTextMail(entity);
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
text.put("user",e.getUser());
|
||||
text.put("coin",Pools.NEXA.getCoin());
|
||||
text.put("offOnlineNumbers",e.getOffline());
|
||||
EmailTemplateEntity entity = new EmailTemplateEntity(email,"[M2Pool] Offline prompt for mining machine","emailoffline-en",text);
|
||||
mailService.sendHtmlMailMessage(entity);
|
||||
});
|
||||
redisService.setCacheMapValue("NEXA_USERS_OFFLINE",e.getUser(),e.getOffline());
|
||||
}else {
|
||||
@@ -216,16 +214,17 @@ public class OffLineNoticeTask {
|
||||
//执行通知
|
||||
List<String> emails = userEmails.getOrDefault(e.getUser(), null);
|
||||
if(StringUtils.isNotNull(emails)){
|
||||
String text = "您的"+Pools.NEXA.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
e.getOffline() + "台矿机离线!\n"+
|
||||
"若您的矿机是因异常断开,请及时处理!";
|
||||
//String text = "您的"+Pools.NEXA.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
// e.getOffline() + "台矿机离线!\n"+
|
||||
// "若您的矿机是因异常断开,请及时处理!";
|
||||
emails.stream().forEach(email ->{
|
||||
System.out.println("用户"+e.getUser()+"矿机离线通知到"+email);
|
||||
EmailEntity entity = new EmailEntity();
|
||||
entity.setSubject("[M2Pool] 矿机离线提示");
|
||||
entity.setEmail(email);
|
||||
entity.setText(text);
|
||||
mailService.sendTextMail(entity);
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
text.put("user",e.getUser());
|
||||
text.put("coin",Pools.GRS.getCoin());
|
||||
text.put("offOnlineNumbers",e.getOffline());
|
||||
EmailTemplateEntity entity = new EmailTemplateEntity(email,"[M2Pool] Offline prompt for mining machine","emailoffline-en",text);
|
||||
mailService.sendHtmlMailMessage(entity);
|
||||
});
|
||||
redisService.setCacheMapValue("GRS_USERS_OFFLINE",e.getUser(),e.getOffline());
|
||||
}else {
|
||||
@@ -303,16 +302,17 @@ public class OffLineNoticeTask {
|
||||
//执行通知
|
||||
List<String> emails = userEmails.getOrDefault(e.getUser(), null);
|
||||
if(StringUtils.isNotNull(emails)){
|
||||
String text = "您的"+Pools.MONA.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
e.getOffline() + "台矿机离线!\n"+
|
||||
"若您的矿机是因异常断开,请及时处理!";
|
||||
//String text = "您的"+Pools.MONA.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
// e.getOffline() + "台矿机离线!\n"+
|
||||
// "若您的矿机是因异常断开,请及时处理!";
|
||||
emails.stream().forEach(email ->{
|
||||
System.out.println("用户"+e.getUser()+"矿机离线通知到"+email);
|
||||
EmailEntity entity = new EmailEntity();
|
||||
entity.setSubject("[M2Pool] 矿机离线提示");
|
||||
entity.setEmail(email);
|
||||
entity.setText(text);
|
||||
mailService.sendTextMail(entity);
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
text.put("user",e.getUser());
|
||||
text.put("coin",Pools.MONA.getCoin());
|
||||
text.put("offOnlineNumbers",e.getOffline());
|
||||
EmailTemplateEntity entity = new EmailTemplateEntity(email,"[M2Pool] Offline prompt for mining machine","emailoffline-en",text);
|
||||
mailService.sendHtmlMailMessage(entity);
|
||||
});
|
||||
redisService.setCacheMapValue("MONA_USERS_OFFLINE",e.getUser(),e.getOffline());
|
||||
}else {
|
||||
@@ -389,16 +389,17 @@ public class OffLineNoticeTask {
|
||||
//执行通知
|
||||
List<String> emails = userEmails.getOrDefault(e.getUser(), null);
|
||||
if(StringUtils.isNotNull(emails)){
|
||||
String text = "您的"+Pools.DGBO.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
e.getOffline() + "台矿机离线!\n"+
|
||||
"若您的矿机是因异常断开,请及时处理!";
|
||||
//String text = "您的"+Pools.DGBO.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
// e.getOffline() + "台矿机离线!\n"+
|
||||
// "若您的矿机是因异常断开,请及时处理!";
|
||||
emails.stream().forEach(email ->{
|
||||
System.out.println("用户"+e.getUser()+"矿机离线通知到"+email);
|
||||
EmailEntity entity = new EmailEntity();
|
||||
entity.setSubject("[M2Pool] 矿机离线提示");
|
||||
entity.setEmail(email);
|
||||
entity.setText(text);
|
||||
mailService.sendTextMail(entity);
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
text.put("user",e.getUser());
|
||||
text.put("coin",Pools.DGBO.getCoin());
|
||||
text.put("offOnlineNumbers",e.getOffline());
|
||||
EmailTemplateEntity entity = new EmailTemplateEntity(email,"[M2Pool] Offline prompt for mining machine","emailoffline-en",text);
|
||||
mailService.sendHtmlMailMessage(entity);
|
||||
});
|
||||
redisService.setCacheMapValue("DGBO_USERS_OFFLINE",e.getUser(),e.getOffline());
|
||||
}else {
|
||||
@@ -475,16 +476,17 @@ public class OffLineNoticeTask {
|
||||
//执行通知
|
||||
List<String> emails = userEmails.getOrDefault(e.getUser(), null);
|
||||
if(StringUtils.isNotNull(emails)){
|
||||
String text = "您的"+Pools.DGBQ.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
e.getOffline() + "台矿机离线!\n"+
|
||||
"若您的矿机是因异常断开,请及时处理!";
|
||||
//String text = "您的"+Pools.DGBQ.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
// e.getOffline() + "台矿机离线!\n"+
|
||||
// "若您的矿机是因异常断开,请及时处理!";
|
||||
emails.stream().forEach(email ->{
|
||||
System.out.println("用户"+e.getUser()+"矿机离线通知到"+email);
|
||||
EmailEntity entity = new EmailEntity();
|
||||
entity.setSubject("[M2Pool] 矿机离线提示");
|
||||
entity.setEmail(email);
|
||||
entity.setText(text);
|
||||
mailService.sendTextMail(entity);
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
text.put("user",e.getUser());
|
||||
text.put("coin",Pools.DGBQ.getCoin());
|
||||
text.put("offOnlineNumbers",e.getOffline());
|
||||
EmailTemplateEntity entity = new EmailTemplateEntity(email,"[M2Pool] Offline prompt for mining machine","emailoffline-en",text);
|
||||
mailService.sendHtmlMailMessage(entity);
|
||||
});
|
||||
redisService.setCacheMapValue("DGBQ_USERS_OFFLINE",e.getUser(),e.getOffline());
|
||||
}else {
|
||||
@@ -561,16 +563,17 @@ public class OffLineNoticeTask {
|
||||
//执行通知
|
||||
List<String> emails = userEmails.getOrDefault(e.getUser(), null);
|
||||
if(StringUtils.isNotNull(emails)){
|
||||
String text = "您的"+Pools.DGBS.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
e.getOffline() + "台矿机离线!\n"+
|
||||
"若您的矿机是因异常断开,请及时处理!";
|
||||
//String text = "您的"+Pools.DGBS.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
// e.getOffline() + "台矿机离线!\n"+
|
||||
// "若您的矿机是因异常断开,请及时处理!";
|
||||
emails.stream().forEach(email ->{
|
||||
System.out.println("用户"+e.getUser()+"矿机离线通知到"+email);
|
||||
EmailEntity entity = new EmailEntity();
|
||||
entity.setSubject("[M2Pool] 矿机离线提示");
|
||||
entity.setEmail(email);
|
||||
entity.setText(text);
|
||||
mailService.sendTextMail(entity);
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
text.put("user",e.getUser());
|
||||
text.put("coin",Pools.DGBS.getCoin());
|
||||
text.put("offOnlineNumbers",e.getOffline());
|
||||
EmailTemplateEntity entity = new EmailTemplateEntity(email,"[M2Pool] Offline prompt for mining machine","emailoffline-en",text);
|
||||
mailService.sendHtmlMailMessage(entity);
|
||||
});
|
||||
redisService.setCacheMapValue("DGBS_USERS_OFFLINE",e.getUser(),e.getOffline());
|
||||
}else {
|
||||
@@ -647,16 +650,17 @@ public class OffLineNoticeTask {
|
||||
//执行通知
|
||||
List<String> emails = userEmails.getOrDefault(e.getUser(), null);
|
||||
if(StringUtils.isNotNull(emails)){
|
||||
String text = "您的"+Pools.RXD.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
e.getOffline() + "台矿机离线!\n"+
|
||||
"若您的矿机是因异常断开,请及时处理!";
|
||||
//String text = "您的"+Pools.RXD.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
// e.getOffline() + "台矿机离线!\n"+
|
||||
// "若您的矿机是因异常断开,请及时处理!";
|
||||
emails.stream().forEach(email ->{
|
||||
System.out.println("用户"+e.getUser()+"矿机离线通知到"+email);
|
||||
EmailEntity entity = new EmailEntity();
|
||||
entity.setSubject("[M2Pool] 矿机离线提示");
|
||||
entity.setEmail(email);
|
||||
entity.setText(text);
|
||||
mailService.sendTextMail(entity);
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
text.put("user",e.getUser());
|
||||
text.put("coin",Pools.RXD.getCoin());
|
||||
text.put("offOnlineNumbers",e.getOffline());
|
||||
EmailTemplateEntity entity = new EmailTemplateEntity(email,"[M2Pool] Offline prompt for mining machine","emailoffline-en",text);
|
||||
mailService.sendHtmlMailMessage(entity);
|
||||
});
|
||||
redisService.setCacheMapValue("RXD_USERS_OFFLINE",e.getUser(),e.getOffline());
|
||||
}else {
|
||||
@@ -733,16 +737,17 @@ public class OffLineNoticeTask {
|
||||
//执行通知
|
||||
List<String> emails = userEmails.getOrDefault(e.getUser(), null);
|
||||
if(StringUtils.isNotNull(emails)){
|
||||
String text = "您的"+Pools.ALPH.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
e.getOffline() + "台矿机离线!\n"+
|
||||
"若您的矿机是因异常断开,请及时处理!";
|
||||
//String text = "您的"+Pools.ALPH.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
// e.getOffline() + "台矿机离线!\n"+
|
||||
// "若您的矿机是因异常断开,请及时处理!";
|
||||
emails.stream().forEach(email ->{
|
||||
System.out.println("用户"+e.getUser()+"矿机离线通知到"+email);
|
||||
EmailEntity entity = new EmailEntity();
|
||||
entity.setSubject("[M2Pool] 矿机离线提示");
|
||||
entity.setEmail(email);
|
||||
entity.setText(text);
|
||||
mailService.sendTextMail(entity);
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
text.put("user",e.getUser());
|
||||
text.put("coin",Pools.ALPH.getCoin());
|
||||
text.put("offOnlineNumbers",e.getOffline());
|
||||
EmailTemplateEntity entity = new EmailTemplateEntity(email,"[M2Pool] Offline prompt for mining machine","emailoffline-en",text);
|
||||
mailService.sendHtmlMailMessage(entity);
|
||||
});
|
||||
redisService.setCacheMapValue("ALPH_USERS_OFFLINE",e.getUser(),e.getOffline());
|
||||
}else {
|
||||
@@ -819,16 +824,17 @@ public class OffLineNoticeTask {
|
||||
//执行通知
|
||||
List<String> emails = userEmails.getOrDefault(e.getUser(), null);
|
||||
if(StringUtils.isNotNull(emails)){
|
||||
String text = "您的"+Pools.ENX.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
e.getOffline() + "台矿机离线!\n"+
|
||||
"若您的矿机是因异常断开,请及时处理!";
|
||||
//String text = "您的"+Pools.ENX.getName()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
// e.getOffline() + "台矿机离线!\n"+
|
||||
// "若您的矿机是因异常断开,请及时处理!";
|
||||
emails.stream().forEach(email ->{
|
||||
System.out.println("用户"+e.getUser()+"矿机离线通知到"+email);
|
||||
EmailEntity entity = new EmailEntity();
|
||||
entity.setSubject("[M2Pool] 矿机离线提示");
|
||||
entity.setEmail(email);
|
||||
entity.setText(text);
|
||||
mailService.sendTextMail(entity);
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
text.put("user",e.getUser());
|
||||
text.put("coin",Pools.ENX.getCoin());
|
||||
text.put("offOnlineNumbers",e.getOffline());
|
||||
EmailTemplateEntity entity = new EmailTemplateEntity(email,"[M2Pool] Offline prompt for mining machine","emailoffline-en",text);
|
||||
mailService.sendHtmlMailMessage(entity);
|
||||
});
|
||||
redisService.setCacheMapValue("ENX_USERS_OFFLINE",e.getUser(),e.getOffline());
|
||||
}else {
|
||||
@@ -908,16 +914,17 @@ public class OffLineNoticeTask {
|
||||
//执行通知
|
||||
List<String> emails = userEmails.getOrDefault(e.getUser(), null);
|
||||
if(StringUtils.isNotNull(emails)){
|
||||
String text = "您的"+Pools.MONERO.getCoin()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
e.getOffline() + "台矿机离线!\n"+
|
||||
"若您的矿机是因异常断开,请及时处理!";
|
||||
//String text = "您的"+Pools.MONERO.getCoin()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
// e.getOffline() + "台矿机离线!\n"+
|
||||
// "若您的矿机是因异常断开,请及时处理!";
|
||||
emails.stream().forEach(email ->{
|
||||
System.out.println("用户"+e.getUser()+"矿机离线通知到"+email);
|
||||
EmailEntity entity = new EmailEntity();
|
||||
entity.setSubject("[M2Pool] 矿机离线提示");
|
||||
entity.setEmail(email);
|
||||
entity.setText(text);
|
||||
mailService.sendTextMail(entity);
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
text.put("user",e.getUser());
|
||||
text.put("coin",Pools.MONERO.getCoin());
|
||||
text.put("offOnlineNumbers",e.getOffline());
|
||||
EmailTemplateEntity entity = new EmailTemplateEntity(email,"[M2Pool] Offline prompt for mining machine","emailoffline-en",text);
|
||||
mailService.sendHtmlMailMessage(entity);
|
||||
});
|
||||
redisService.setCacheMapValue("MONERO_USERS_OFFLINE",e.getUser(),e.getOffline());
|
||||
}else {
|
||||
@@ -999,16 +1006,17 @@ public class OffLineNoticeTask {
|
||||
//执行通知
|
||||
List<String> emails = userEmails.getOrDefault(e.getUser(), null);
|
||||
if(StringUtils.isNotNull(emails)){
|
||||
String text = "您的"+Pools.SHA3X.getCoin()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
e.getOffline() + "台矿机离线!\n"+
|
||||
"若您的矿机是因异常断开,请及时处理!";
|
||||
//String text = "您的"+Pools.SHA3X.getCoin()+"下挖矿账户: "+e.getUser()+"\n有" +
|
||||
// e.getOffline() + "台矿机离线!\n"+
|
||||
// "若您的矿机是因异常断开,请及时处理!";
|
||||
emails.stream().forEach(email ->{
|
||||
System.out.println("用户"+e.getUser()+"矿机离线通知到"+email);
|
||||
EmailEntity entity = new EmailEntity();
|
||||
entity.setSubject("[M2Pool] 矿机离线提示");
|
||||
entity.setEmail(email);
|
||||
entity.setText(text);
|
||||
mailService.sendTextMail(entity);
|
||||
Map<String, Object> text = new HashMap<>();
|
||||
text.put("user",e.getUser());
|
||||
text.put("coin",Pools.SHA3X.getCoin());
|
||||
text.put("offOnlineNumbers",e.getOffline());
|
||||
EmailTemplateEntity entity = new EmailTemplateEntity(email,"[M2Pool] Offline prompt for mining machine","emailoffline-en",text);
|
||||
mailService.sendHtmlMailMessage(entity);
|
||||
});
|
||||
}else {
|
||||
System.out.println("该用户未添加离线通知 :"+userEmails.toString());
|
||||
|
||||
Reference in New Issue
Block a user