123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172 |
- package cn.cslg.pas.service;
- import cn.cslg.pas.common.dto.QueryScratchWordsDTO;
- import cn.cslg.pas.common.dto.business.UpdateScratchWordsDTO;
- import cn.cslg.pas.domain.business.ScratchWords;
- import cn.cslg.pas.domain.es.Marking;
- import cn.cslg.pas.domain.es.Patent;
- import cn.cslg.pas.service.business.es.EsScratchWordsService;
- import cn.cslg.pas.service.business.es.EsService;
- import org.apache.ibatis.annotations.Update;
- import org.joda.time.DateTime;
- import org.junit.Test;
- import org.junit.runner.RunWith;
- import org.springframework.beans.BeanUtils;
- import org.springframework.beans.factory.annotation.Autowired;
- import org.springframework.boot.test.context.SpringBootTest;
- import org.springframework.test.context.junit4.SpringRunner;
- import java.util.Date;
- /**
- * @author chenyu
- * @date 2023/9/6
- */
- @SpringBootTest
- @RunWith(SpringRunner.class)
- public class EsScratchWordsServiceTest {
- @Autowired
- private EsScratchWordsService esScratchWordsService;
- @Autowired
- private EsService esService;
- @Test
- public void addPatent() throws Exception {
- ScratchWords scratchWords = new ScratchWords();
- scratchWords.setPatentNo("CN201721042063.9");
- scratchWords.setPublicTenantId(1);
- scratchWords.setMarkUserId("1");
- scratchWords.setIsPublic(true);
- scratchWords.setMarkColor("#qeqrqr");
- scratchWords.setMarkNoteText("测试标引");
- scratchWords.setMarkSite(10);
- scratchWords.setMarkTime(new Date());
- scratchWords.setPublicScope(1);
- esScratchWordsService.addScratchWords(scratchWords);
- }
- @Test
- public void getPatent() throws Exception {
- }
- @Test
- public void test() throws Exception {
- UpdateScratchWordsDTO updateScratchWordsDTO =new UpdateScratchWordsDTO();
- updateScratchWordsDTO.setIsPublic(true);
- Marking marking =new Marking();
- BeanUtils.copyProperties(updateScratchWordsDTO,marking);
- System.out.println(marking);
- }
- @Test
- public void remove() throws Exception{
- esScratchWordsService.removeById("noU2_YwBmzIo81_4JOrU");
- }
- @Test
- public void group() throws Exception{
- }
- }
|