|
|
|
@ -2,6 +2,7 @@ package cn.estsh.i3plus.core.apiservice.controller.busi;
|
|
|
|
|
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysDictionaryService;
|
|
|
|
|
import cn.estsh.i3plus.core.api.iservice.busi.ISysFileService;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.exception.ImppExceptionEnum;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.tool.StringTool;
|
|
|
|
|
import cn.estsh.i3plus.platform.common.util.PlatformConstWords;
|
|
|
|
|
import cn.estsh.i3plus.pojo.base.bean.BaseConstWords;
|
|
|
|
@ -14,7 +15,6 @@ import cn.estsh.i3plus.pojo.platform.bean.SysFile;
|
|
|
|
|
import cn.estsh.impp.framework.base.controller.CoreBaseController;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppBusiException;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionBuilder;
|
|
|
|
|
import cn.estsh.impp.framework.boot.exception.ImppExceptionEnum;
|
|
|
|
|
import cn.estsh.impp.framework.boot.fastdfs.FastDFSClient;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ResultBean;
|
|
|
|
|
import cn.estsh.impp.framework.boot.util.ValidatorBean;
|
|
|
|
@ -61,7 +61,7 @@ public class SysFileController extends CoreBaseController{
|
|
|
|
|
*/
|
|
|
|
|
@PutMapping(value = "/update")
|
|
|
|
|
@ApiOperation(value = "修改文件资源", notes = "修改文件资源")
|
|
|
|
|
public ResultBean updateSysFile(SysFile sysFile){
|
|
|
|
|
public ResultBean<SysFile> updateSysFile(SysFile sysFile){
|
|
|
|
|
try {
|
|
|
|
|
// 条件验证
|
|
|
|
|
ValidatorBean.beginValid(sysFile)
|
|
|
|
@ -112,7 +112,7 @@ public class SysFileController extends CoreBaseController{
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(value = "/list")
|
|
|
|
|
@ApiOperation(value = "查询全部文件资源", notes = "查询全部文件资源")
|
|
|
|
|
public ResultBean findSysFileAll(){
|
|
|
|
|
public ResultBean<SysFile> findSysFileAll(){
|
|
|
|
|
try {
|
|
|
|
|
List<SysFile> sysFileList = sysFileService.listSysFile();
|
|
|
|
|
return ResultBean.success("操作成功")
|
|
|
|
@ -132,7 +132,7 @@ public class SysFileController extends CoreBaseController{
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(value = "/get/{id}")
|
|
|
|
|
@ApiOperation(value = "根据id查询文件资源", notes = "根据id查询文件资源")
|
|
|
|
|
public ResultBean getSysFileById(@PathVariable("id") String id){
|
|
|
|
|
public ResultBean<SysFile> getSysFileById(@PathVariable("id") String id){
|
|
|
|
|
try {
|
|
|
|
|
ValidatorBean.checkIsNumber(id, "id必须为数字[" + id + "]");
|
|
|
|
|
|
|
|
|
@ -157,7 +157,7 @@ public class SysFileController extends CoreBaseController{
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping(value = "/query")
|
|
|
|
|
@ApiOperation(value = "文件资源复杂查询,分页,排序", notes = "文件资源复杂查询,分页,排序")
|
|
|
|
|
public ResultBean querySysFileByPager(SysFile sysFile, Pager pager){
|
|
|
|
|
public ResultBean<SysFile> querySysFileByPager(SysFile sysFile, Pager pager){
|
|
|
|
|
try {
|
|
|
|
|
ListPager sysFileListPager = sysFileService.querySysFileByPager(sysFile, pager);
|
|
|
|
|
return ResultBean.success("操作成功").setListPager(sysFileListPager).setCode(ResourceEnumUtil.MESSAGE.SUCCESS.getCode());
|
|
|
|
@ -201,7 +201,7 @@ public class SysFileController extends CoreBaseController{
|
|
|
|
|
*/
|
|
|
|
|
@PostMapping("/upload")
|
|
|
|
|
@ApiOperation(value = "文件上传", notes = "文件上传")
|
|
|
|
|
public ResultBean singleFileUpload(@RequestParam("file") MultipartFile file) {
|
|
|
|
|
public ResultBean<SysFile> singleFileUpload(@RequestParam("file") MultipartFile file) {
|
|
|
|
|
try {
|
|
|
|
|
startMultiService();
|
|
|
|
|
|
|
|
|
@ -353,7 +353,7 @@ public class SysFileController extends CoreBaseController{
|
|
|
|
|
*/
|
|
|
|
|
@GetMapping("/get-file-code/{code}")
|
|
|
|
|
@ApiOperation(value = "根据文件代码查询文件信息")
|
|
|
|
|
public ResultBean getSysFileByFileCode(@PathVariable("code") String fileCode) {
|
|
|
|
|
public ResultBean<SysFile> getSysFileByFileCode(@PathVariable("code") String fileCode) {
|
|
|
|
|
try {
|
|
|
|
|
// 条件验证
|
|
|
|
|
ValidatorBean.checkNotNull(fileCode, "文件代码不能为空");
|
|
|
|
|