[Bug修复](master): 修复了一些问题

修复了一些问题
master
土豆兄弟 3 years ago
parent 5bb891194d
commit fb7f66ac4e

@ -30,6 +30,7 @@ import me.zhengjie.exception.BadRequestException;
import me.zhengjie.modules.constant.DefaultConstant; import me.zhengjie.modules.constant.DefaultConstant;
import me.zhengjie.modules.formdata.service.FormdataService; import me.zhengjie.modules.formdata.service.FormdataService;
import me.zhengjie.modules.formdata.service.dto.FormdataDto; import me.zhengjie.modules.formdata.service.dto.FormdataDto;
import me.zhengjie.modules.upload.consts.SysConst;
import me.zhengjie.modules.uploadnew.domain.TbUploadFileNew; import me.zhengjie.modules.uploadnew.domain.TbUploadFileNew;
import me.zhengjie.modules.uploadnew.redis.RedisParentDao; import me.zhengjie.modules.uploadnew.redis.RedisParentDao;
import me.zhengjie.modules.uploadnew.service.TbUploadFileNewService; import me.zhengjie.modules.uploadnew.service.TbUploadFileNewService;
@ -60,6 +61,7 @@ import java.util.Objects;
import static me.zhengjie.modules.constant.FileConstant.*; import static me.zhengjie.modules.constant.FileConstant.*;
import static me.zhengjie.modules.upload.consts.UploadFileConst.FILE_PATH_SPLIT; import static me.zhengjie.modules.upload.consts.UploadFileConst.FILE_PATH_SPLIT;
import static me.zhengjie.modules.upload.consts.UploadFileConst.WHITE_LIST;
import static me.zhengjie.modules.uploadnew.consts.SysConstNew.*; import static me.zhengjie.modules.uploadnew.consts.SysConstNew.*;
@ -105,9 +107,29 @@ public class TbUploadFileNewController {
@ApiOperation("查询文件上传接口") @ApiOperation("查询文件上传接口")
@PreAuthorize("@el.check('tbUploadFileNew:list')") @PreAuthorize("@el.check('tbUploadFileNew:list')")
public ResponseEntity<Object> query(TbUploadFileNewQueryCriteria criteria, Pageable pageable) { public ResponseEntity<Object> query(TbUploadFileNewQueryCriteria criteria, Pageable pageable) {
filterOfWriteList(criteria);
log.info("======= [ criteria is {} ] =======", criteria.toString());
return new ResponseEntity<>(tbUploadFileNewService.queryAll(criteria, pageable), HttpStatus.OK); return new ResponseEntity<>(tbUploadFileNewService.queryAll(criteria, pageable), HttpStatus.OK);
} }
/**
* ,,
*
* @param criteria
*
* @return
*/
private void filterOfWriteList(TbUploadFileNewQueryCriteria criteria) {
if (!SysConst.sysDebug){
if (!CollectionUtil.contains(WHITE_LIST, SecurityUtils.getCurrentUsername())){
criteria.setOperation(SecurityUtils.getCurrentUsername());
log.info("======= [TbUploadFileNewController|filterOfWriteList, userName is {} ] =======", SecurityUtils.getCurrentUsername());
}
}
}
@PostMapping @PostMapping
@Log("新增文件上传接口") @Log("新增文件上传接口")
@ApiOperation("新增文件上传接口") @ApiOperation("新增文件上传接口")

Loading…
Cancel
Save