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