From 844e522620dc9db9e675b96fc1e6a34f7d2d2593 Mon Sep 17 00:00:00 2001 From: qyx <565485304@qq.com> Date: Thu, 7 Jan 2021 14:26:24 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=E4=BA=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../buildrecord/task/ProduceBigDataTask.java | 24 ++-- .../remoterec/domain/RemoteRecord.java | 76 ++++++++++++ .../repository/RemoteRecordRepository.java | 28 +++++ .../rest/RemoteRecordController.java | 87 ++++++++++++++ .../service/RemoteRecordService.java | 83 +++++++++++++ .../service/dto/RemoteRecordDto.java | 51 ++++++++ .../dto/RemoteRecordQueryCriteria.java | 41 +++++++ .../service/impl/RemoteRecordServiceImpl.java | 109 ++++++++++++++++++ .../service/mapstruct/RemoteRecordMapper.java | 32 +++++ .../taskrecord/rest/TaskRecordController.java | 1 - eladmin-system/src/main/resources/logback.xml | 4 +- .../src/test/java/me/zhengjie/StreamTest.java | 4 + 12 files changed, 525 insertions(+), 15 deletions(-) create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/remoterec/domain/RemoteRecord.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/remoterec/repository/RemoteRecordRepository.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/remoterec/rest/RemoteRecordController.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/RemoteRecordService.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/dto/RemoteRecordDto.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/dto/RemoteRecordQueryCriteria.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/impl/RemoteRecordServiceImpl.java create mode 100644 eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/mapstruct/RemoteRecordMapper.java diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/task/ProduceBigDataTask.java b/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/task/ProduceBigDataTask.java index 6199a10..25ecc38 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/task/ProduceBigDataTask.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/buildrecord/task/ProduceBigDataTask.java @@ -58,7 +58,7 @@ public class ProduceBigDataTask { @Async(value = "ProduceBigDataTaskExecutor") - public void doRunTask(BuildRecord task){ + public void doRunTask(BuildRecord task) { Long satrtMilliSecond = LocalDateTime.now().toInstant(ZoneOffset.of("+8")).toEpochMilli(); log.info("====== [ task start running, task name is {} ] ======", "ProduceBigDataTask"); runTask(task); @@ -69,26 +69,26 @@ public class ProduceBigDataTask { private void runTask(BuildRecord task) { // 先对任务表进行记录 BuildRecordDto buildRecordDto = buildRecordService.create(task); - if (buildRecordDto == null){ + if (buildRecordDto == null) { log.error("============ [create build rec is fail, please check it. ] ============"); return; } // 解析需要的查询参数 String params = task.getParams(); - if (StringUtils.isBlank(params)){ + if (StringUtils.isBlank(params)) { return; } - JSONObject jsonObject1 = JSONUtil.parseObj(params,true); + JSONObject jsonObject1 = JSONUtil.parseObj(params, true); // 构建解析类对Json进行解析 BuildTaskQueryParamJsonConvert convert = JSONUtil.toBean(jsonObject1, BuildTaskQueryParamJsonConvert.class); // 地图点进行计算,获取选点范围 String localCode = convert.getLocalCode(); Integer range = convert.getRange(); Rectangle rectangle = null; - if (StringUtils.isNotBlank(localCode) && range != null){ + if (StringUtils.isNotBlank(localCode) && range != null) { rectangle = calculateLocalPoint(localCode, range); } - if (rectangle == null && StringUtils.isNotBlank(localCode)){ + if (rectangle == null && StringUtils.isNotBlank(localCode)) { log.error(" ====================== {please check localPoint calculate is ok ! } =========================="); return; } @@ -154,16 +154,16 @@ public class ProduceBigDataTask { * @param buildRecordDto * @param buildRecord */ - private void updateBuildRec(BuildRecordDto buildRecordDto, BuildRecord buildRecord){ + private void updateBuildRec(BuildRecordDto buildRecordDto, BuildRecord buildRecord) { // 生成完成后,对记录进行更新 Integer id = buildRecordDto.getId(); buildRecord.setIsBuild(SUCCESS_BUILD_TAG); - if (id != null && id >= 0){ + if (id != null && id >= 0) { buildRecord.setId(id); - try{ + try { buildRecordService.update(buildRecord); - }catch (Exception e){ - log.error("==== [ update buildRecord fail, please check ] ====",e); + } catch (Exception e) { + log.error("==== [ update buildRecord fail, please check ] ====", e); } } } @@ -172,7 +172,7 @@ public class ProduceBigDataTask { private Rectangle calculateLocalPoint(String localCode, Integer range) { // 处理切割横纵坐标字符串 String[] split = StringUtils.split(localCode.trim(), SPLIT_TAG); - if (split.length != 2){ + if (split.length != 2) { return null; } // 转换类型 diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/domain/RemoteRecord.java b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/domain/RemoteRecord.java new file mode 100644 index 0000000..c125f2f --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/domain/RemoteRecord.java @@ -0,0 +1,76 @@ +/* +* Copyright 2019-2020 Zheng Jie +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package me.zhengjie.modules.remoterec.domain; + +import lombok.Data; +import cn.hutool.core.bean.BeanUtil; +import io.swagger.annotations.ApiModelProperty; +import cn.hutool.core.bean.copier.CopyOptions; +import javax.persistence.*; +import javax.validation.constraints.*; +import java.sql.Timestamp; +import java.io.Serializable; + +/** +* @website https://el-admin.vip +* @description / +* @author x +* @date 2021-01-07 +**/ +@Entity +@Data +@Table(name="tb_remote_record") +public class RemoteRecord implements Serializable { + + @Id + @GeneratedValue(strategy = GenerationType.IDENTITY) + @Column(name = "id") + @ApiModelProperty(value = "id") + private Integer id; + + @Column(name = "upload_time",nullable = false) + @NotNull + @ApiModelProperty(value = "上传时间") + private Timestamp uploadTime; + + @Column(name = "operation",nullable = false) + @NotBlank + @ApiModelProperty(value = "上传人/公司") + private String operation; + + @Column(name = "file_trans_success_count",nullable = false) + @NotNull + @ApiModelProperty(value = "成功保存数量") + private Integer fileTransSuccessCount; + + @Column(name = "tag") + @ApiModelProperty(value = "发送状态标识") + private Integer tag; + + @Column(name = "localSavePath",nullable = false) + @NotBlank + @ApiModelProperty(value = "文件上传保存路径") + private String localsavepath; + + @Column(name = "weight",nullable = false) + @NotNull + @ApiModelProperty(value = "权重值") + private Integer weight; + + public void copy(RemoteRecord source){ + BeanUtil.copyProperties(source,this, CopyOptions.create().setIgnoreNullValue(true)); + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/repository/RemoteRecordRepository.java b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/repository/RemoteRecordRepository.java new file mode 100644 index 0000000..7da4cc7 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/repository/RemoteRecordRepository.java @@ -0,0 +1,28 @@ +/* +* Copyright 2019-2020 Zheng Jie +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package me.zhengjie.modules.remoterec.repository; + +import me.zhengjie.modules.remoterec.domain.RemoteRecord; +import org.springframework.data.jpa.repository.JpaRepository; +import org.springframework.data.jpa.repository.JpaSpecificationExecutor; + +/** +* @website https://el-admin.vip +* @author x +* @date 2021-01-07 +**/ +public interface RemoteRecordRepository extends JpaRepository, JpaSpecificationExecutor { +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/rest/RemoteRecordController.java b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/rest/RemoteRecordController.java new file mode 100644 index 0000000..8b78968 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/rest/RemoteRecordController.java @@ -0,0 +1,87 @@ +/* +* Copyright 2019-2020 Zheng Jie +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package me.zhengjie.modules.remoterec.rest; + +import me.zhengjie.annotation.Log; +import me.zhengjie.modules.remoterec.domain.RemoteRecord; +import me.zhengjie.modules.remoterec.service.RemoteRecordService; +import me.zhengjie.modules.remoterec.service.dto.RemoteRecordQueryCriteria; +import org.springframework.data.domain.Pageable; +import lombok.RequiredArgsConstructor; +import org.springframework.http.HttpStatus; +import org.springframework.http.ResponseEntity; +import org.springframework.security.access.prepost.PreAuthorize; +import org.springframework.validation.annotation.Validated; +import org.springframework.web.bind.annotation.*; +import io.swagger.annotations.*; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** +* @website https://el-admin.vip +* @author x +* @date 2021-01-07 +**/ +@RestController +@RequiredArgsConstructor +@Api(tags = "远程上传记录管理") +@RequestMapping("/api/remoteRecord") +public class RemoteRecordController { + + private final RemoteRecordService remoteRecordService; + + @Log("导出数据") + @ApiOperation("导出数据") + @GetMapping(value = "/download") + @PreAuthorize("@el.check('remoteRecord:list')") + public void download(HttpServletResponse response, RemoteRecordQueryCriteria criteria) throws IOException { + remoteRecordService.download(remoteRecordService.queryAll(criteria), response); + } + + @GetMapping + @Log("查询远程上传记录") + @ApiOperation("查询远程上传记录") + @PreAuthorize("@el.check('remoteRecord:list')") + public ResponseEntity query(RemoteRecordQueryCriteria criteria, Pageable pageable){ + return new ResponseEntity<>(remoteRecordService.queryAll(criteria,pageable),HttpStatus.OK); + } + + @PostMapping + @Log("新增远程上传记录") + @ApiOperation("新增远程上传记录") + @PreAuthorize("@el.check('remoteRecord:add')") + public ResponseEntity create(@Validated @RequestBody RemoteRecord resources){ + return new ResponseEntity<>(remoteRecordService.create(resources),HttpStatus.CREATED); + } + + @PutMapping + @Log("修改远程上传记录") + @ApiOperation("修改远程上传记录") + @PreAuthorize("@el.check('remoteRecord:edit')") + public ResponseEntity update(@Validated @RequestBody RemoteRecord resources){ + remoteRecordService.update(resources); + return new ResponseEntity<>(HttpStatus.NO_CONTENT); + } + + @Log("删除远程上传记录") + @ApiOperation("删除远程上传记录") + @PreAuthorize("@el.check('remoteRecord:del')") + @DeleteMapping + public ResponseEntity delete(@RequestBody Integer[] ids) { + remoteRecordService.deleteAll(ids); + return new ResponseEntity<>(HttpStatus.OK); + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/RemoteRecordService.java b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/RemoteRecordService.java new file mode 100644 index 0000000..34e644f --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/RemoteRecordService.java @@ -0,0 +1,83 @@ +/* +* Copyright 2019-2020 Zheng Jie +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package me.zhengjie.modules.remoterec.service; + +import me.zhengjie.modules.remoterec.domain.RemoteRecord; +import me.zhengjie.modules.remoterec.service.dto.RemoteRecordDto; +import me.zhengjie.modules.remoterec.service.dto.RemoteRecordQueryCriteria; +import org.springframework.data.domain.Pageable; +import java.util.Map; +import java.util.List; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; + +/** +* @website https://el-admin.vip +* @description 服务接口 +* @author x +* @date 2021-01-07 +**/ +public interface RemoteRecordService { + + /** + * 查询数据分页 + * @param criteria 条件 + * @param pageable 分页参数 + * @return Map + */ + Map queryAll(RemoteRecordQueryCriteria criteria, Pageable pageable); + + /** + * 查询所有数据不分页 + * @param criteria 条件参数 + * @return List + */ + List queryAll(RemoteRecordQueryCriteria criteria); + + /** + * 根据ID查询 + * @param id ID + * @return RemoteRecordDto + */ + RemoteRecordDto findById(Integer id); + + /** + * 创建 + * @param resources / + * @return RemoteRecordDto + */ + RemoteRecordDto create(RemoteRecord resources); + + /** + * 编辑 + * @param resources / + */ + void update(RemoteRecord resources); + + /** + * 多选删除 + * @param ids / + */ + void deleteAll(Integer[] ids); + + /** + * 导出数据 + * @param all 待导出的数据 + * @param response / + * @throws IOException / + */ + void download(List all, HttpServletResponse response) throws IOException; +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/dto/RemoteRecordDto.java b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/dto/RemoteRecordDto.java new file mode 100644 index 0000000..927063e --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/dto/RemoteRecordDto.java @@ -0,0 +1,51 @@ +/* +* Copyright 2019-2020 Zheng Jie +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package me.zhengjie.modules.remoterec.service.dto; + +import lombok.Data; +import java.sql.Timestamp; +import java.io.Serializable; + +/** +* @website https://el-admin.vip +* @description / +* @author x +* @date 2021-01-07 +**/ +@Data +public class RemoteRecordDto implements Serializable { + + /** id */ + private Integer id; + + /** 上传时间 */ + private Timestamp uploadTime; + + /** 上传人/公司 */ + private String operation; + + /** 成功保存数量 */ + private Integer fileTransSuccessCount; + + /** 发送状态标识 */ + private Integer tag; + + /** 文件上传保存路径 */ + private String localsavepath; + + /** 权重值 */ + private Integer weight; +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/dto/RemoteRecordQueryCriteria.java b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/dto/RemoteRecordQueryCriteria.java new file mode 100644 index 0000000..b1c4d65 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/dto/RemoteRecordQueryCriteria.java @@ -0,0 +1,41 @@ +/* +* Copyright 2019-2020 Zheng Jie +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package me.zhengjie.modules.remoterec.service.dto; + +import lombok.Data; +import java.sql.Timestamp; +import java.util.List; +import me.zhengjie.annotation.Query; + +/** +* @website https://el-admin.vip +* @author x +* @date 2021-01-07 +**/ +@Data +public class RemoteRecordQueryCriteria{ + + /** 模糊 */ + @Query(type = Query.Type.INNER_LIKE) + private String operation; + + /** 精确 */ + @Query + private Integer tag; + /** BETWEEN */ + @Query(type = Query.Type.BETWEEN) + private List uploadTime; +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/impl/RemoteRecordServiceImpl.java b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/impl/RemoteRecordServiceImpl.java new file mode 100644 index 0000000..1e70f8e --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/impl/RemoteRecordServiceImpl.java @@ -0,0 +1,109 @@ +/* +* Copyright 2019-2020 Zheng Jie +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package me.zhengjie.modules.remoterec.service.impl; + +import me.zhengjie.modules.remoterec.domain.RemoteRecord; +import me.zhengjie.utils.ValidationUtil; +import me.zhengjie.utils.FileUtil; +import lombok.RequiredArgsConstructor; +import me.zhengjie.modules.remoterec.repository.RemoteRecordRepository; +import me.zhengjie.modules.remoterec.service.RemoteRecordService; +import me.zhengjie.modules.remoterec.service.dto.RemoteRecordDto; +import me.zhengjie.modules.remoterec.service.dto.RemoteRecordQueryCriteria; +import me.zhengjie.modules.remoterec.service.mapstruct.RemoteRecordMapper; +import org.springframework.stereotype.Service; +import org.springframework.transaction.annotation.Transactional; +import org.springframework.data.domain.Page; +import org.springframework.data.domain.Pageable; +import me.zhengjie.utils.PageUtil; +import me.zhengjie.utils.QueryHelp; +import java.util.List; +import java.util.Map; +import java.io.IOException; +import javax.servlet.http.HttpServletResponse; +import java.util.ArrayList; +import java.util.LinkedHashMap; + +/** +* @website https://el-admin.vip +* @description 服务实现 +* @author x +* @date 2021-01-07 +**/ +@Service +@RequiredArgsConstructor +public class RemoteRecordServiceImpl implements RemoteRecordService { + + private final RemoteRecordRepository remoteRecordRepository; + private final RemoteRecordMapper remoteRecordMapper; + + @Override + public Map queryAll(RemoteRecordQueryCriteria criteria, Pageable pageable){ + Page page = remoteRecordRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder),pageable); + return PageUtil.toPage(page.map(remoteRecordMapper::toDto)); + } + + @Override + public List queryAll(RemoteRecordQueryCriteria criteria){ + return remoteRecordMapper.toDto(remoteRecordRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root,criteria,criteriaBuilder))); + } + + @Override + @Transactional + public RemoteRecordDto findById(Integer id) { + RemoteRecord remoteRecord = remoteRecordRepository.findById(id).orElseGet(RemoteRecord::new); + ValidationUtil.isNull(remoteRecord.getId(),"RemoteRecord","id",id); + return remoteRecordMapper.toDto(remoteRecord); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public RemoteRecordDto create(RemoteRecord resources) { + return remoteRecordMapper.toDto(remoteRecordRepository.save(resources)); + } + + @Override + @Transactional(rollbackFor = Exception.class) + public void update(RemoteRecord resources) { + RemoteRecord remoteRecord = remoteRecordRepository.findById(resources.getId()).orElseGet(RemoteRecord::new); + ValidationUtil.isNull( remoteRecord.getId(),"RemoteRecord","id",resources.getId()); + remoteRecord.copy(resources); + remoteRecordRepository.save(remoteRecord); + } + + @Override + public void deleteAll(Integer[] ids) { + for (Integer id : ids) { + remoteRecordRepository.deleteById(id); + } + } + + @Override + public void download(List all, HttpServletResponse response) throws IOException { + List> list = new ArrayList<>(); + for (RemoteRecordDto remoteRecord : all) { + Map map = new LinkedHashMap<>(); + map.put("上传时间", remoteRecord.getUploadTime()); + map.put("上传人/公司", remoteRecord.getOperation()); + map.put("成功保存数量", remoteRecord.getFileTransSuccessCount()); + map.put("发送状态标识", remoteRecord.getTag()); + map.put("文件上传保存路径", remoteRecord.getLocalsavepath()); + map.put("权重值", remoteRecord.getWeight()); + list.add(map); + } + FileUtil.downloadExcel(list, response); + } +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/mapstruct/RemoteRecordMapper.java b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/mapstruct/RemoteRecordMapper.java new file mode 100644 index 0000000..aa9ac47 --- /dev/null +++ b/eladmin-system/src/main/java/me/zhengjie/modules/remoterec/service/mapstruct/RemoteRecordMapper.java @@ -0,0 +1,32 @@ +/* +* Copyright 2019-2020 Zheng Jie +* +* Licensed under the Apache License, Version 2.0 (the "License"); +* you may not use this file except in compliance with the License. +* You may obtain a copy of the License at +* +* http://www.apache.org/licenses/LICENSE-2.0 +* +* Unless required by applicable law or agreed to in writing, software +* distributed under the License is distributed on an "AS IS" BASIS, +* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +* See the License for the specific language governing permissions and +* limitations under the License. +*/ +package me.zhengjie.modules.remoterec.service.mapstruct; + +import me.zhengjie.base.BaseMapper; +import me.zhengjie.modules.remoterec.domain.RemoteRecord; +import me.zhengjie.modules.remoterec.service.dto.RemoteRecordDto; +import org.mapstruct.Mapper; +import org.mapstruct.ReportingPolicy; + +/** +* @website https://el-admin.vip +* @author x +* @date 2021-01-07 +**/ +@Mapper(componentModel = "spring", unmappedTargetPolicy = ReportingPolicy.IGNORE) +public interface RemoteRecordMapper extends BaseMapper { + +} \ No newline at end of file diff --git a/eladmin-system/src/main/java/me/zhengjie/modules/taskrecord/rest/TaskRecordController.java b/eladmin-system/src/main/java/me/zhengjie/modules/taskrecord/rest/TaskRecordController.java index 26ca73e..6f1c913 100644 --- a/eladmin-system/src/main/java/me/zhengjie/modules/taskrecord/rest/TaskRecordController.java +++ b/eladmin-system/src/main/java/me/zhengjie/modules/taskrecord/rest/TaskRecordController.java @@ -20,7 +20,6 @@ import me.zhengjie.annotation.AnonymousAccess; import me.zhengjie.annotation.Log; import me.zhengjie.common.http.CommonResponse; import me.zhengjie.common.http.ResponseCode; -import me.zhengjie.modules.buildrecord.task.dto.SendBigDataDTO; import me.zhengjie.modules.taskrecord.domain.TaskRecord; import me.zhengjie.modules.taskrecord.rest.vo.TaskBuildRecordVO; import me.zhengjie.modules.taskrecord.rest.vo.TaskRecordMergeVO; diff --git a/eladmin-system/src/main/resources/logback.xml b/eladmin-system/src/main/resources/logback.xml index 30ccc85..dcf1306 100644 --- a/eladmin-system/src/main/resources/logback.xml +++ b/eladmin-system/src/main/resources/logback.xml @@ -77,7 +77,7 @@ - - + + \ No newline at end of file diff --git a/eladmin-system/src/test/java/me/zhengjie/StreamTest.java b/eladmin-system/src/test/java/me/zhengjie/StreamTest.java index 6fb9b37..8a89676 100644 --- a/eladmin-system/src/test/java/me/zhengjie/StreamTest.java +++ b/eladmin-system/src/test/java/me/zhengjie/StreamTest.java @@ -20,15 +20,19 @@ public class StreamTest { static { uids = new HashSet<>(50_0000); uids.add("111111111111111111111111"); + uids.add("111111111111111111111112"); for (int i = 0; i < 500000; i++) { uids.add(RandomUtil.randomString(24)); } + uids.add("111111111111111111111113"); base = new ArrayList<>(2000_0000); base.add("111111111111111111111111"); + base.add("111111111111111111111112"); for (int i = 0; i < 2000_0000; i++) { base.add(RandomUtil.randomString(24)); } + base.add("111111111111111111111113"); } /**