Commit 13294a90 by kk

刷数据:根据文件指定sku刷A+产品的上传人

parent 48337d47
package cn.kk.spring_simple_operation.model.dto;
import cn.kk.spring_simple_operation.utils.Excel;
import lombok.Data;
/**
* @author kk
* @date 2025/3/18
*/
@Data
public class SkuPeopleNameDto {
@Excel(name = "SKU")
private String sku;
@Excel(name = "上传人")
private String peopleName;
}
package cn.kk.spring_simple_operation;
import cn.kk.spring_simple_operation.mapper.VisualVideoPlanMapper;
import cn.kk.spring_simple_operation.model.dto.SkuPeopleNameDto;
import cn.kk.spring_simple_operation.model.dto.SkuSiteDTO;
import cn.kk.spring_simple_operation.service.PhotoProgressService;
import cn.kk.spring_simple_operation.service.VideoProductService;
import cn.kk.spring_simple_operation.service.VisualPhotographerAPlusService;
import cn.kk.spring_simple_operation.service.VisualVideoPlanService;
import cn.kk.spring_simple_operation.service.*;
import cn.kk.spring_simple_operation.utils.ExcelUtil;
import org.junit.jupiter.api.Test;
import org.springframework.boot.test.context.SpringBootTest;
......@@ -14,6 +12,7 @@ import javax.annotation.Resource;
import java.io.File;
import java.io.FileInputStream;
import java.io.FileNotFoundException;
import java.io.IOException;
import java.nio.file.Files;
import java.util.LinkedList;
import java.util.List;
......@@ -34,12 +33,16 @@ public class ApplicationTest {
@Resource
private PhotoProgressService photoProgressService;
@Resource
private APlusProductService aPlusProductService;
@Test
void contextLoads() throws Exception {
//visualPhotographerAPlusService.brushDataForExecutor();
setUploadStatusIsDeleted();
//setUploadStatusIsDeleted();
setAPlusProductUploadInfo();
}
private void setUploadStatusIsDeleted() throws Exception {
......@@ -50,4 +53,13 @@ public class ApplicationTest {
list = util.importExcel("简易视频", Files.newInputStream(file.toPath()));
photoProgressService.setUploadStatusIsDeleted(list);
}
private void setAPlusProductUploadInfo() throws Exception {
File file = new File("简版A+ AB测试.xlsx");
ExcelUtil<SkuPeopleNameDto> util = new ExcelUtil<>(SkuPeopleNameDto.class);
List<SkuPeopleNameDto> list = util.importExcel(Files.newInputStream(file.toPath()));
aPlusProductService.setAPlusProductUploadInfo(list);
}
}
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment