Merge pull request #7 from rymcu/wx-dev

💬 添加代码注释和方法名变更
This commit is contained in:
ronger 2020-03-31 10:02:57 +08:00 committed by GitHub
commit 630a075470
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 5 deletions

View File

@ -100,7 +100,7 @@ public class ArticleServiceImpl extends AbstractService<Article> implements Arti
} }
@Override @Override
@Transactional(rollbackFor = { UnsupportedEncodingException.class,BaseApiException.class }) @Transactional(rollbackFor = { UnsupportedEncodingException.class, BaseApiException.class })
public Map postArticle(ArticleDTO article, HttpServletRequest request) throws UnsupportedEncodingException, BaseApiException { public Map postArticle(ArticleDTO article, HttpServletRequest request) throws UnsupportedEncodingException, BaseApiException {
Map map = new HashMap(1); Map map = new HashMap(1);
if(StringUtils.isBlank(article.getArticleTitle())){ if(StringUtils.isBlank(article.getArticleTitle())){
@ -263,7 +263,7 @@ public class ArticleServiceImpl extends AbstractService<Article> implements Arti
return list; return list;
} }
private ArticleDTO genArticle(ArticleDTO article,Integer type) { private ArticleDTO genArticle(ArticleDTO article, Integer type) {
Author author = articleMapper.selectAuthor(article.getArticleAuthorId()); Author author = articleMapper.selectAuthor(article.getArticleAuthorId());
article.setArticleAuthor(author); article.setArticleAuthor(author);
article.setTimeAgo(Utils.getTimeAgo(article.getUpdatedTime())); article.setTimeAgo(Utils.getTimeAgo(article.getUpdatedTime()));

View File

@ -48,7 +48,8 @@ public class JavaMailServiceImpl implements JavaMailService {
private String USERNAME; private String USERNAME;
@Value("${spring.mail.password}") @Value("${spring.mail.password}")
private String PASSWORD; private String PASSWORD;
private final static String BASE_URL = "https://rymcu.com"; @Value("${resource.domain}")
private String BASE_URL;
@Override @Override
public Integer sendEmailCode(String email) throws MessagingException { public Integer sendEmailCode(String email) throws MessagingException {

View File

@ -11,8 +11,9 @@ import java.util.concurrent.*;
*/ */
public class BaiDuUtils { public class BaiDuUtils {
private static String token = "9cdKR6bVCJzxDEJS"; private final static String token = "9cdKR6bVCJzxDEJS";
private static String site = "https://rymcu.com";
private final static String site = "https://rymcu.com";
public static void sendSEOData(String permalink) { public static void sendSEOData(String permalink) {
if (StringUtils.isBlank(permalink) || StringUtils.isBlank(token)) { if (StringUtils.isBlank(permalink) || StringUtils.isBlank(token)) {