manailin
2021-06-20 8f0425e065676d57a3dd813e94b869c1193d8f13
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
package com.panzhihua.service_grid.service.impl;
 
import com.alibaba.fastjson.JSONArray;
import com.alibaba.fastjson.serializer.SerializerFeature;
import com.panzhihua.common.model.vos.grid.EventDetailsVO;
import com.panzhihua.service_grid.ServiceGridApplication;
import com.panzhihua.service_grid.service.EventService;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
 
import javax.annotation.Resource;
 
import java.util.List;
 
import static org.junit.jupiter.api.Assertions.*;
@Slf4j
@SpringBootTest(classes = ServiceGridApplication.class)
class EventServiceImplTest {
 
    @Resource
    private EventService eventService;
 
    @Test
    void getUnUploadEvent() {
        List<EventDetailsVO> eventList = eventService.getUnUploadEvent();
        String pretty = JSONArray.toJSONString(eventList, SerializerFeature.PrettyFormat, SerializerFeature.WriteMapNullValue,
                SerializerFeature.WriteDateUseDateFormat);
        log.info(pretty);
    }
 
    @Test
    void updateLcUploadFlag() {
      Boolean  uploadFlag = eventService.updateLcUploadFlag(1111115L);
      log.info(uploadFlag.toString());
    }
}