Compare commits
2 Commits
52e58019fc
...
3bfbebf460
| Author | SHA1 | Date |
|---|---|---|
|
|
3bfbebf460 | |
|
|
b2063c6219 |
|
|
@ -20,7 +20,7 @@ public class EdMetaObjectHandler implements MetaObjectHandler {
|
||||||
this.strictInsertFill(metaObject, "createdAt", Date.class, new Date());
|
this.strictInsertFill(metaObject, "createdAt", Date.class, new Date());
|
||||||
}
|
}
|
||||||
if (metaObject.hasGetter("createdTime")) {
|
if (metaObject.hasGetter("createdTime")) {
|
||||||
this.strictInsertFill(metaObject, "createdTime", Date.class, new Date());
|
this.setFieldValByName("createdTime", new Date(), metaObject);
|
||||||
}
|
}
|
||||||
if (metaObject.hasGetter("gmtModified")) {
|
if (metaObject.hasGetter("gmtModified")) {
|
||||||
this.strictInsertFill(metaObject, "gmtModified", Date.class, new Date());
|
this.strictInsertFill(metaObject, "gmtModified", Date.class, new Date());
|
||||||
|
|
@ -29,7 +29,7 @@ public class EdMetaObjectHandler implements MetaObjectHandler {
|
||||||
this.strictInsertFill(metaObject, "updatedAt", Date.class, new Date());
|
this.strictInsertFill(metaObject, "updatedAt", Date.class, new Date());
|
||||||
}
|
}
|
||||||
if (metaObject.hasGetter("createdBy")) {
|
if (metaObject.hasGetter("createdBy")) {
|
||||||
this.strictUpdateFill(metaObject, "createdBy", String.class, Optional.of(UserThreadLocal.getUserId()).orElse(""));
|
this.setFieldValByName("createdBy", Optional.of(UserThreadLocal.getUserId()).orElse(""), metaObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
@ -42,10 +42,10 @@ public class EdMetaObjectHandler implements MetaObjectHandler {
|
||||||
this.strictUpdateFill(metaObject, "updatedAt", Date.class, new Date());
|
this.strictUpdateFill(metaObject, "updatedAt", Date.class, new Date());
|
||||||
}
|
}
|
||||||
if (metaObject.hasGetter("updatedTime")) {
|
if (metaObject.hasGetter("updatedTime")) {
|
||||||
this.strictUpdateFill(metaObject, "updatedTime", Date.class, new Date());
|
this.setFieldValByName("updatedTime", new Date(), metaObject);
|
||||||
}
|
}
|
||||||
if (metaObject.hasGetter("updatedBy")) {
|
if (metaObject.hasGetter("updatedBy")) {
|
||||||
this.strictUpdateFill(metaObject, "updatedTime", String.class, Optional.of(UserThreadLocal.getUserId()).orElse(""));
|
this.setFieldValByName("updatedBy", Optional.of(UserThreadLocal.getUserId()).orElse(""), metaObject);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -16,7 +16,7 @@ public class FileFormatController {
|
||||||
@Resource
|
@Resource
|
||||||
private FileFormatService fileFormatService;
|
private FileFormatService fileFormatService;
|
||||||
|
|
||||||
@PostMapping("/add")
|
@GetMapping("/add")
|
||||||
@UserOperation(value = "新增文件格式", modelName = UserOperationModuleEnum.DATABASE)
|
@UserOperation(value = "新增文件格式", modelName = UserOperationModuleEnum.DATABASE)
|
||||||
public ElectromagneticResult<?> addFileFormat(@RequestParam String suffixName) {
|
public ElectromagneticResult<?> addFileFormat(@RequestParam String suffixName) {
|
||||||
return ElectromagneticResultUtil.success(fileFormatService.addFileFormat(suffixName));
|
return ElectromagneticResultUtil.success(fileFormatService.addFileFormat(suffixName));
|
||||||
|
|
|
||||||
|
|
@ -26,7 +26,7 @@ public class FileRecycleController {
|
||||||
}
|
}
|
||||||
|
|
||||||
@RequestMapping("remove")
|
@RequestMapping("remove")
|
||||||
@UserOperation(value = "物理删除", modelName = UserOperationModuleEnum.DATABASE)
|
@UserOperation(value = "彻底清除文件", modelName = UserOperationModuleEnum.DATABASE)
|
||||||
public ElectromagneticResult<?> remove(@RequestParam String fileId) {
|
public ElectromagneticResult<?> remove(@RequestParam String fileId) {
|
||||||
return fileRecycleService.remove(fileId);
|
return fileRecycleService.remove(fileId);
|
||||||
}
|
}
|
||||||
|
|
|
||||||
|
|
@ -17,7 +17,7 @@ public class FileRecycleQueryVO {
|
||||||
|
|
||||||
private String fileVersion;
|
private String fileVersion;
|
||||||
|
|
||||||
private Date updateTime;
|
private Date updatedTime;
|
||||||
|
|
||||||
private String fileNote;
|
private String fileNote;
|
||||||
|
|
||||||
|
|
|
||||||
|
|
@ -13,6 +13,7 @@ import com.electromagnetic.industry.software.manage.pojo.models.FileFormat;
|
||||||
import com.electromagnetic.industry.software.manage.pojo.resp.FileFormatVO;
|
import com.electromagnetic.industry.software.manage.pojo.resp.FileFormatVO;
|
||||||
import org.springframework.stereotype.Service;
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import java.util.Date;
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
import java.util.stream.Collectors;
|
import java.util.stream.Collectors;
|
||||||
|
|
||||||
|
|
@ -73,7 +74,7 @@ public class FileFormatServiceImpl extends ServiceImpl<FileFormatMapper, FileFor
|
||||||
*/
|
*/
|
||||||
@Override
|
@Override
|
||||||
public List<FileFormatVO> getList() {
|
public List<FileFormatVO> getList() {
|
||||||
List<FileFormat> fileFormats = this.baseMapper.selectList(Wrappers.<FileFormat>lambdaQuery().eq(FileFormat::getEffectFlag, EffectFlagEnum.EFFECT.code));
|
List<FileFormat> fileFormats = this.baseMapper.selectList(Wrappers.<FileFormat>lambdaQuery().eq(FileFormat::getEffectFlag, EffectFlagEnum.EFFECT.code).orderByDesc(FileFormat::getCreatedTime));
|
||||||
List<FileFormatVO> fileFormatVOS = BeanUtil.copyToList(fileFormats, FileFormatVO.class);
|
List<FileFormatVO> fileFormatVOS = BeanUtil.copyToList(fileFormats, FileFormatVO.class);
|
||||||
UserThreadLocal.setSuccessInfo("","", "查询了文件格式列表");
|
UserThreadLocal.setSuccessInfo("","", "查询了文件格式列表");
|
||||||
return fileFormatVOS;
|
return fileFormatVOS;
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue