提交 f094bb4e 作者: 925993793@qq.com

事件服务功能开发以及调试

上级 adc9b3bb
......@@ -33,6 +33,7 @@ import org.elasticsearch.search.sort.SortOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import javax.annotation.Resource;
import java.util.ArrayList;
import java.util.HashMap;
import java.util.List;
......@@ -50,7 +51,7 @@ import java.util.concurrent.atomic.AtomicInteger;
@Service
public class EsService {
@Autowired
@Resource
private RestHighLevelClient client;
......
......@@ -16,7 +16,6 @@ import com.zzsn.event.service.*;
import com.zzsn.event.util.CodeGenerateUtil;
import com.zzsn.event.util.CronUtil;
import com.zzsn.event.util.HanlpUtil;
import com.zzsn.event.util.RedisUtil;
import com.zzsn.event.vo.*;
import lombok.extern.slf4j.Slf4j;
import org.apache.commons.collections4.CollectionUtils;
......@@ -44,6 +43,7 @@ import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
import org.springframework.web.multipart.MultipartFile;
import javax.annotation.Resource;
import java.io.File;
import java.io.IOException;
import java.nio.file.Files;
......@@ -74,9 +74,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event> implements
@Autowired
private EventRegionMapService eventRegionMapService;
@Autowired
private RedisUtil redisUtil;
@Autowired
@Resource
private RestHighLevelClient client;
@Autowired
private EsService esService;
......@@ -232,6 +230,7 @@ public class EventServiceImpl extends ServiceImpl<EventMapper, Event> implements
public void updateMain(AddEventParam addEventParam) {
Event subject = new Event();
BeanUtils.copyProperties(addEventParam, subject);
subject.setEventIcon(subject.getEventIcon().replace(imgPreview,""));
String eventId = subject.getId();
baseMapper.updateById(subject);
......
......@@ -17,7 +17,6 @@ import org.elasticsearch.action.bulk.BulkResponse;
import org.elasticsearch.action.delete.DeleteRequest;
import org.elasticsearch.action.delete.DeleteResponse;
import org.elasticsearch.action.get.GetRequest;
import org.elasticsearch.action.get.GetResponse;
import org.elasticsearch.action.index.IndexRequest;
import org.elasticsearch.action.index.IndexResponse;
import org.elasticsearch.action.search.SearchRequest;
......@@ -55,9 +54,9 @@ import org.elasticsearch.search.builder.SearchSourceBuilder;
import org.elasticsearch.search.fetch.subphase.FetchSourceContext;
import org.elasticsearch.search.sort.SortBuilders;
import org.elasticsearch.search.sort.SortOrder;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import javax.annotation.Resource;
import java.io.IOException;
import java.lang.reflect.Field;
import java.util.*;
......@@ -72,7 +71,7 @@ import java.util.*;
@Component
public class EsOpUtil<T> {
@Autowired
@Resource
RestHighLevelClient client;
/**
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论