Commit 9d846158 by wnb0128

车家智能数据服务开发 获取图片列表--think.wang

1 parent 52d2ed89
package com.glsx.smart.controller;
import com.alibaba.fastjson.JSONObject;
import com.glsx.plat.core.web.R;
import com.glsx.smart.pojo.FileDTO;
import com.glsx.smart.service.SmartSysFileService;
......@@ -8,11 +7,7 @@ import io.swagger.annotations.Api;
import io.swagger.annotations.ApiOperation;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.web.bind.annotation.RequestBody;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RequestMethod;
import org.springframework.web.bind.annotation.RequestParam;
import org.springframework.web.bind.annotation.RestController;
import org.springframework.web.bind.annotation.*;
import java.util.List;
......@@ -35,8 +30,7 @@ public class SysFileController {
@RequestMapping(value = "/findAll", method = {RequestMethod.GET})
@ApiOperation(value = "查询图片")
public R findAll(@RequestParam("type") Byte type) {
List<FileDTO> fileDTOS = sysFileService.findByType(type);
return R.ok(JSONObject.toJSONString(fileDTOS));
return R.ok().data(sysFileService.findByType(type));
}
@RequestMapping(value = "/saveFile", method = {RequestMethod.POST})
......
Markdown is supported
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!