gunshi-project-ss/src/test/java/com/gunshi/project/xyt/service/StAdcdServiceTest.java

40 lines
1.4 KiB
Java

package com.gunshi.project.xyt.service;
import com.gunshi.project.xyt.Main;
import com.gunshi.project.xyt.entity.basedata.GeneralSearch;
import lombok.extern.slf4j.Slf4j;
import org.junit.jupiter.api.Test;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.test.context.SpringBootTest;
import org.springframework.test.context.ContextConfiguration;
import ru.olegcherednik.jackson_utils.JacksonUtils;
@SpringBootTest
@ContextConfiguration(classes = Main.class)
@Slf4j
class StAdcdServiceTest {
@Autowired
private StAdcdService stAdcdService;
@Test
void queryBySearch() {
GeneralSearch addvcdSearch = new GeneralSearch();
addvcdSearch.setKeyword("麻城");
log.info("{}", JacksonUtils.writeValue(stAdcdService.queryBySearch(addvcdSearch)));
}
@Test
void test(){
log.info("{}",stAdcdService.getParentAddvcd("420000000000000"));
log.info("{}",stAdcdService.getParentAddvcd("421100000000000"));
log.info("{}",stAdcdService.getParentAddvcd("421212000000000"));
log.info("{}",stAdcdService.getParentAddvcd("421312101000000"));
log.info("{}",stAdcdService.getParentAddvcd("421413102101000"));
log.info("{}",stAdcdService.getParentAddvcd("421514112201123"));
}
@Test
void queryTree() {
log.info("{}", JacksonUtils.writeValue(stAdcdService.queryTree("420116001")));
}
}