标签改成数组
This commit is contained in:
parent
faad52ed32
commit
67b76d75f4
|
|
@ -62,15 +62,15 @@ public class AdminUserService {
|
||||||
}
|
}
|
||||||
jedis.expire(redisLockKey, 3L);
|
jedis.expire(redisLockKey, 3L);
|
||||||
|
|
||||||
String redisCaptchaKey = getRedisCaptchaKey(phone);
|
// String redisCaptchaKey = getRedisCaptchaKey(phone);
|
||||||
incrResult = jedis.incr(redisCaptchaKey);
|
// incrResult = jedis.incr(redisCaptchaKey);
|
||||||
if (incrResult > 1) {
|
// if (incrResult > 1) {
|
||||||
log.warn("手机号{}在一分钟内已发送过短信,请勿重复发送!", phone);
|
// log.warn("手机号{}在一分钟内已发送过短信,请勿重复发送!", phone);
|
||||||
jedis.decr(redisLockKey);
|
// jedis.decr(redisLockKey);
|
||||||
jedis.decr(redisCaptchaKey);
|
// jedis.decr(redisCaptchaKey);
|
||||||
return ResultObject.failed("该手机号一分钟内已发送过短信,请勿重复发送!");
|
// return ResultObject.failed("该手机号一分钟内已发送过短信,请勿重复发送!");
|
||||||
}
|
// }
|
||||||
jedis.expire(redisCaptchaKey, 60L);
|
// jedis.expire(redisCaptchaKey, 60L);
|
||||||
|
|
||||||
AdminUser adminUser = adminUserMapper.getAdminUserByPhone(phone);
|
AdminUser adminUser = adminUserMapper.getAdminUserByPhone(phone);
|
||||||
if (adminUser == null) {
|
if (adminUser == null) {
|
||||||
|
|
|
||||||
|
|
@ -1,5 +1,9 @@
|
||||||
server:
|
server:
|
||||||
port: 13579
|
port: 13579
|
||||||
|
compression:
|
||||||
|
enabled: true
|
||||||
|
servlet:
|
||||||
|
context-path: /admin
|
||||||
oss:
|
oss:
|
||||||
ak: LTAI5t8z9QNdCG6b54mDgx8p
|
ak: LTAI5t8z9QNdCG6b54mDgx8p
|
||||||
sk: F3M41hTgH8g99ZgVWyelj42825YbZM
|
sk: F3M41hTgH8g99ZgVWyelj42825YbZM
|
||||||
|
|
@ -10,3 +14,15 @@ oss:
|
||||||
baseUrl: https://lengfeng-test.oss-cn-hangzhou.aliyuncs.com
|
baseUrl: https://lengfeng-test.oss-cn-hangzhou.aliyuncs.com
|
||||||
sts:
|
sts:
|
||||||
endPoint: sts.cn-hangzhou.aliyuncs.com
|
endPoint: sts.cn-hangzhou.aliyuncs.com
|
||||||
|
|
||||||
|
spring:
|
||||||
|
datasource:
|
||||||
|
type: com.zaxxer.hikari.HikariDataSource
|
||||||
|
driver-class-name: com.mysql.cj.jdbc.Driver
|
||||||
|
url: jdbc:mysql://121.37.185.246:3306/reference?autoReconnect=true&useUnicode=true&useSSL=false&allowMultiQueries=true&characterEncoding=utf8&serverTimezone=Asia/Shanghai
|
||||||
|
username: root
|
||||||
|
password: Xgf_8000
|
||||||
|
redis:
|
||||||
|
host: 123.60.153.169
|
||||||
|
port: 6379
|
||||||
|
password: Xgf_redis
|
||||||
|
|
|
||||||
|
|
@ -92,7 +92,7 @@ public interface NewsMapper {
|
||||||
"</if>" +
|
"</if>" +
|
||||||
"<where>" +
|
"<where>" +
|
||||||
"<if test=\"keyword != null and !keyword.isEmpty()\">" +
|
"<if test=\"keyword != null and !keyword.isEmpty()\">" +
|
||||||
"news.keyword like concat('%', #{keyword}, '%') " +
|
"news.title like concat('%', #{keyword}, '%') " +
|
||||||
"</if>" +
|
"</if>" +
|
||||||
"<if test=\"column != null\">" +
|
"<if test=\"column != null\">" +
|
||||||
"and news_column_rel.column_id = #{column} " +
|
"and news_column_rel.column_id = #{column} " +
|
||||||
|
|
@ -126,7 +126,7 @@ public interface NewsMapper {
|
||||||
"</if>" +
|
"</if>" +
|
||||||
"<where>" +
|
"<where>" +
|
||||||
"<if test=\"keyword != null and !keyword.isEmpty()\">" +
|
"<if test=\"keyword != null and !keyword.isEmpty()\">" +
|
||||||
"news.keyword like concat('%', #{keyword}, '%') " +
|
"news.title like concat('%', #{keyword}, '%') " +
|
||||||
"</if>" +
|
"</if>" +
|
||||||
"<if test=\"column != null\">" +
|
"<if test=\"column != null\">" +
|
||||||
"and news_column_rel.column_id = #{column} " +
|
"and news_column_rel.column_id = #{column} " +
|
||||||
|
|
|
||||||
|
|
@ -3,6 +3,7 @@ package com.jinrui.reference.core.model.dto.news;
|
||||||
import com.jinrui.reference.core.model.vo.news.NewsDetailTag;
|
import com.jinrui.reference.core.model.vo.news.NewsDetailTag;
|
||||||
import com.jinrui.reference.core.model.vo.news.NewsDetailTagItem;
|
import com.jinrui.reference.core.model.vo.news.NewsDetailTagItem;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
|
|
||||||
@SuppressWarnings("unused")
|
@SuppressWarnings("unused")
|
||||||
|
|
@ -13,17 +14,22 @@ public class SaveDraftTag {
|
||||||
private Long field;
|
private Long field;
|
||||||
private List<Long> fieldArr;
|
private List<Long> fieldArr;
|
||||||
|
|
||||||
public SaveDraftTag() {}
|
public SaveDraftTag() {
|
||||||
|
}
|
||||||
|
|
||||||
public SaveDraftTag(NewsDetailTag newsDetailTag) {
|
public SaveDraftTag(NewsDetailTag newsDetailTag) {
|
||||||
NewsDetailTagItem sourceItem = newsDetailTag.getSource();
|
NewsDetailTagItem sourceItem = newsDetailTag.getSource();
|
||||||
if (sourceItem != null) {
|
if (sourceItem != null) {
|
||||||
this.source = sourceItem.getId();
|
this.source = sourceItem.getId();
|
||||||
}
|
}
|
||||||
NewsDetailTagItem fieldItem = newsDetailTag.getField();
|
this.fieldArr = new ArrayList<>();
|
||||||
if (fieldItem != null) {
|
for (NewsDetailTagItem item : newsDetailTag.getFieldArr()) {
|
||||||
this.field = fieldItem.getId();
|
this.fieldArr.add(item.getId());
|
||||||
}
|
}
|
||||||
|
// NewsDetailTagItem fieldItem = newsDetailTag.getField();
|
||||||
|
// if (fieldItem != null) {
|
||||||
|
// this.field = fieldItem.getId();
|
||||||
|
// }
|
||||||
}
|
}
|
||||||
|
|
||||||
public Long getSource() {
|
public Long getSource() {
|
||||||
|
|
|
||||||
|
|
@ -235,6 +235,7 @@ public class NewsService {
|
||||||
NewsDetailTag newsDetailTag = new NewsDetailTag();
|
NewsDetailTag newsDetailTag = new NewsDetailTag();
|
||||||
newsDetailVO.setTag(newsDetailTag);
|
newsDetailVO.setTag(newsDetailTag);
|
||||||
if (!CollectionUtils.isEmpty(tagRelList)) {
|
if (!CollectionUtils.isEmpty(tagRelList)) {
|
||||||
|
List<NewsDetailTagItem> arr = new ArrayList<>();
|
||||||
for (NewsTagRel rel : tagRelList) {
|
for (NewsTagRel rel : tagRelList) {
|
||||||
Long tagId = rel.getTagId();
|
Long tagId = rel.getTagId();
|
||||||
Tag tag = tagMap.get(tagId);
|
Tag tag = tagMap.get(tagId);
|
||||||
|
|
@ -245,9 +246,12 @@ public class NewsService {
|
||||||
if (parentId != null && parentId == 1) {
|
if (parentId != null && parentId == 1) {
|
||||||
newsDetailTag.setSource(tagItem);
|
newsDetailTag.setSource(tagItem);
|
||||||
} else {
|
} else {
|
||||||
|
// newsDetailTag.setField(tagItem);
|
||||||
newsDetailTag.setField(tagItem);
|
newsDetailTag.setField(tagItem);
|
||||||
|
arr.add(tagItem);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
newsDetailTag.setFieldArr(arr);
|
||||||
}
|
}
|
||||||
return ResultObject.success(newsDetailVO);
|
return ResultObject.success(newsDetailVO);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue