fix:文件格式主键id改为字符串类型
This commit is contained in:
parent
2ea2a156ca
commit
12e45cf7d1
|
|
@ -25,7 +25,7 @@ public class FileFormatController {
|
|||
|
||||
@GetMapping("/delete/{id}")
|
||||
@UserOperation(value = "删除文件格式", modelName = UserOperationModuleEnum.DATABASE)
|
||||
public ElectromagneticResult<?> deleteFileFormat(@PathVariable Long id) {
|
||||
public ElectromagneticResult<?> deleteFileFormat(@PathVariable String id) {
|
||||
return ElectromagneticResultUtil.success(fileFormatService.deleteFileFormat(id));
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -9,8 +9,8 @@ import java.util.Date;
|
|||
@TableName("ed_file_format")
|
||||
public class FileFormat {
|
||||
|
||||
@TableId(type = IdType.AUTO)
|
||||
private Long id;
|
||||
@TableId(type = IdType.ASSIGN_UUID)
|
||||
private String id;
|
||||
|
||||
private String fileSuffix;
|
||||
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ import lombok.Data;
|
|||
|
||||
@Data
|
||||
public class FileFormatVO {
|
||||
private Long id;
|
||||
private String id;
|
||||
|
||||
private String fileSuffix;
|
||||
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ public interface FileFormatService extends IService<FileFormat> {
|
|||
* @param id
|
||||
* @return
|
||||
*/
|
||||
boolean deleteFileFormat(Long id);
|
||||
boolean deleteFileFormat(String id);
|
||||
|
||||
/**
|
||||
* 查询文件格式列表
|
||||
|
|
|
|||
|
|
@ -2,7 +2,6 @@ package com.electromagnetic.industry.software.manage.service.serviceimpl;
|
|||
|
||||
import cn.hutool.core.lang.Assert;
|
||||
import cn.hutool.core.text.StrFormatter;
|
||||
import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
||||
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
||||
import com.electromagnetic.industry.software.common.util.UserThreadLocal;
|
||||
import com.electromagnetic.industry.software.manage.mapper.FileFormatMapper;
|
||||
|
|
@ -11,7 +10,6 @@ import com.electromagnetic.industry.software.manage.pojo.resp.FileFormatVO;
|
|||
import org.springframework.beans.BeanUtils;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.File;
|
||||
import java.util.ArrayList;
|
||||
import java.util.List;
|
||||
|
||||
|
|
@ -40,7 +38,7 @@ public class FileFormatServiceImpl extends ServiceImpl<FileFormatMapper, FileFor
|
|||
* @return
|
||||
*/
|
||||
@Override
|
||||
public boolean deleteFileFormat(Long id) {
|
||||
public boolean deleteFileFormat(String id) {
|
||||
FileFormat fileFormat = getById(id);
|
||||
UserThreadLocal.setSuccessInfo("","", StrFormatter.format("删除了文件格式 {} ", fileFormat.getFileSuffix()));
|
||||
return removeById(id);
|
||||
|
|
|
|||
Loading…
Reference in New Issue