merge:冲突处理
This commit is contained in:
@@ -1,75 +0,0 @@
|
||||
///*
|
||||
// * 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 org.nl.modules.tools.domain;
|
||||
//
|
||||
//import cn.hutool.core.bean.BeanUtil;
|
||||
//import cn.hutool.core.bean.copier.CopyOptions;
|
||||
//import lombok.Getter;
|
||||
//import lombok.NoArgsConstructor;
|
||||
//import lombok.Setter;
|
||||
//import org.nl.modules.common.base.BaseEntity;
|
||||
//
|
||||
//import javax.persistence.*;
|
||||
//import java.io.Serializable;
|
||||
//
|
||||
///**
|
||||
// * @author Zheng Jie
|
||||
// * @date 2019-09-05
|
||||
// */
|
||||
//@Getter
|
||||
//@Setter
|
||||
//@Entity
|
||||
//@Table(name = "tool_local_storage")
|
||||
//@NoArgsConstructor
|
||||
//public class LocalStorage extends BaseEntity implements Serializable {
|
||||
//
|
||||
// @Id
|
||||
// @Column(name = "storage_id")
|
||||
//
|
||||
// @GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||
// private Long id;
|
||||
//
|
||||
//
|
||||
// private String realName;
|
||||
//
|
||||
//
|
||||
// private String name;
|
||||
//
|
||||
//
|
||||
// private String suffix;
|
||||
//
|
||||
//
|
||||
// private String path;
|
||||
//
|
||||
//
|
||||
// private String type;
|
||||
//
|
||||
//
|
||||
// private String size;
|
||||
//
|
||||
// public LocalStorage(String realName, String name, String suffix, String path, String type, String size) {
|
||||
// this.realName = realName;
|
||||
// this.name = name;
|
||||
// this.suffix = suffix;
|
||||
// this.path = path;
|
||||
// this.type = type;
|
||||
// this.size = size;
|
||||
// }
|
||||
//
|
||||
// public void copy(LocalStorage source) {
|
||||
// BeanUtil.copyProperties(source, this, CopyOptions.create().setIgnoreNullValue(true));
|
||||
// }
|
||||
//}
|
||||
@@ -1,31 +0,0 @@
|
||||
/*
|
||||
* 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 org.nl.modules.tools.repository;
|
||||
|
||||
import org.nl.modules.tools.domain.LocalStorage;
|
||||
import org.springframework.data.jpa.repository.JpaRepository;
|
||||
import org.springframework.data.jpa.repository.JpaSpecificationExecutor;
|
||||
import org.springframework.data.jpa.repository.Query;
|
||||
|
||||
/**
|
||||
* @author Zheng Jie
|
||||
* @date 2019-09-05
|
||||
*/
|
||||
public interface LocalStorageRepository extends JpaRepository<LocalStorage, Long>, JpaSpecificationExecutor<LocalStorage> {
|
||||
|
||||
@Query(value = "select a from LocalStorage a where a.name = ?1")
|
||||
LocalStorage findByName(String name);
|
||||
}
|
||||
@@ -21,7 +21,7 @@
|
||||
//import org.nl.modules.common.exception.BadRequestException;
|
||||
//import org.nl.modules.common.utils.FileUtil;
|
||||
//import org.nl.modules.logging.annotation.Log;
|
||||
//import org.nl.modules.tools.domain.LocalStorage;
|
||||
//
|
||||
//import org.nl.modules.tools.service.LocalStorageService;
|
||||
//import org.nl.modules.tools.service.dto.LocalStorageQueryCriteria;
|
||||
//import org.springframework.data.domain.Pageable;
|
||||
|
||||
@@ -16,7 +16,7 @@
|
||||
//package org.nl.modules.tools.service;
|
||||
//
|
||||
//
|
||||
//import org.nl.modules.tools.domain.LocalStorage;
|
||||
//
|
||||
//import org.nl.modules.tools.service.dto.LocalStorageDto;
|
||||
//import org.nl.modules.tools.service.dto.LocalStorageQueryCriteria;
|
||||
//import org.springframework.data.domain.Pageable;
|
||||
|
||||
@@ -29,8 +29,8 @@
|
||||
//import org.nl.modules.common.utils.PageUtil;
|
||||
//import org.nl.modules.common.utils.QueryHelp;
|
||||
//import org.nl.modules.common.utils.ValidationUtil;
|
||||
//import org.nl.modules.tools.domain.LocalStorage;
|
||||
//import org.nl.modules.tools.repository.LocalStorageRepository;
|
||||
//
|
||||
//
|
||||
//import org.nl.modules.tools.service.LocalStorageService;
|
||||
//import org.nl.modules.tools.service.dto.LocalStorageDto;
|
||||
//import org.nl.modules.tools.service.dto.LocalStorageQueryCriteria;
|
||||
@@ -56,24 +56,24 @@
|
||||
//@RequiredArgsConstructor
|
||||
//public class LocalStorageServiceImpl implements LocalStorageService {
|
||||
//
|
||||
// private final LocalStorageRepository localStorageRepository;
|
||||
// private final IToolLocalStorageService IToolLocalStorageService;
|
||||
// private final LocalStorageMapper localStorageMapper;
|
||||
// private final FileProperties properties;
|
||||
//
|
||||
// @Override
|
||||
// public Object queryAll(LocalStorageQueryCriteria criteria, Pageable pageable) {
|
||||
// Page<LocalStorage> page = localStorageRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder), pageable);
|
||||
// Page<LocalStorage> page = IToolLocalStorageService.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder), pageable);
|
||||
// return PageUtil.toPage(page.map(localStorageMapper::toDto));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public List<LocalStorageDto> queryAll(LocalStorageQueryCriteria criteria) {
|
||||
// return localStorageMapper.toDto(localStorageRepository.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder)));
|
||||
// return localStorageMapper.toDto(IToolLocalStorageService.findAll((root, criteriaQuery, criteriaBuilder) -> QueryHelp.getPredicate(root, criteria, criteriaBuilder)));
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// public LocalStorageDto findById(Long id) {
|
||||
// LocalStorage localStorage = localStorageRepository.findById(id).orElseGet(LocalStorage::new);
|
||||
// LocalStorage localStorage = IToolLocalStorageService.findById(id).orElseGet(LocalStorage::new);
|
||||
// ValidationUtil.isNull(localStorage.getId(), "LocalStorage", "id", id);
|
||||
// return localStorageMapper.toDto(localStorage);
|
||||
// }
|
||||
@@ -98,7 +98,7 @@
|
||||
// type,
|
||||
// FileUtil.getSize(multipartFile.getSize())
|
||||
// );
|
||||
// return localStorageRepository.save(localStorage);
|
||||
// return IToolLocalStorageService.save(localStorage);
|
||||
// } catch (Exception e) {
|
||||
// FileUtil.del(file);
|
||||
// throw e;
|
||||
@@ -108,19 +108,19 @@
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public void update(LocalStorage resources) {
|
||||
// LocalStorage localStorage = localStorageRepository.findById(resources.getId()).orElseGet(LocalStorage::new);
|
||||
// LocalStorage localStorage = IToolLocalStorageService.findById(resources.getId()).orElseGet(LocalStorage::new);
|
||||
// ValidationUtil.isNull(localStorage.getId(), "LocalStorage", "id", resources.getId());
|
||||
// localStorage.copy(resources);
|
||||
// localStorageRepository.save(localStorage);
|
||||
// IToolLocalStorageService.save(localStorage);
|
||||
// }
|
||||
//
|
||||
// @Override
|
||||
// @Transactional(rollbackFor = Exception.class)
|
||||
// public void deleteAll(Long[] ids) {
|
||||
// for (Long id : ids) {
|
||||
// LocalStorage storage = localStorageRepository.findById(id).orElseGet(LocalStorage::new);
|
||||
// LocalStorage storage = IToolLocalStorageService.findById(id).orElseGet(LocalStorage::new);
|
||||
// FileUtil.del(storage.getPath());
|
||||
// localStorageRepository.delete(storage);
|
||||
// IToolLocalStorageService.delete(storage);
|
||||
// }
|
||||
// }
|
||||
//
|
||||
|
||||
@@ -19,7 +19,7 @@
|
||||
//import org.mapstruct.Mapper;
|
||||
//import org.mapstruct.ReportingPolicy;
|
||||
//import org.nl.modules.common.base.BaseMapper;
|
||||
//import org.nl.modules.tools.domain.LocalStorage;
|
||||
//
|
||||
//import org.nl.modules.tools.service.dto.LocalStorageDto;
|
||||
//
|
||||
///**
|
||||
|
||||
Reference in New Issue
Block a user