URL访问量,用户地址,日志登录,附件上传,下载,配置文件上传
This commit is contained in:
@@ -17,7 +17,10 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
}
|
||||
|
||||
@Override
|
||||
public int updateConfis(Config config) {
|
||||
public int updateConfig(Config config) {
|
||||
if (configDao.selectByName(config.getName())==null){
|
||||
return 2;
|
||||
}
|
||||
return configDao.updateByName(config);
|
||||
}
|
||||
|
||||
@@ -35,5 +38,36 @@ public class ConfigServiceImpl implements ConfigService {
|
||||
}
|
||||
|
||||
}
|
||||
//获得邮箱配置的信息,若没有值则采用默认信息
|
||||
@Override
|
||||
public HashMap<String, String> selectEmailConfig() {
|
||||
HashMap<String,String> configMap= new HashMap<>();
|
||||
if (configDao.selectByName("email_sendEmail").getValue()!=null){
|
||||
configMap.put("email_sendEmail",configDao.selectByName("email_sendEmail").getValue());
|
||||
}else {
|
||||
configMap.put("email_sendEmail","482370576@qq.com");
|
||||
return configMap;
|
||||
}
|
||||
if (configDao.selectByName("email_host").getValue()!=null){
|
||||
configMap.put("email_host",configDao.selectByName("email_host").getValue());
|
||||
}else {
|
||||
configMap.put("email_host","smtp.qq.com");
|
||||
return configMap;
|
||||
}
|
||||
if (configDao.selectByName("email_password").getValue()!=null){
|
||||
configMap.put("email_password",configDao.selectByName("email_password").getValue());
|
||||
}else {
|
||||
configMap.put("email_password","ksuebkfenixhdbbh");
|
||||
return configMap;
|
||||
}
|
||||
return configMap;
|
||||
}
|
||||
|
||||
@Override
|
||||
public Config selectAlreadyExist(Config config) {
|
||||
|
||||
return configDao.selectByName(config.getName());
|
||||
}
|
||||
|
||||
|
||||
}
|
||||
|
Reference in New Issue
Block a user