| | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.service.all.FileService; |
| | | import com.lf.server.service.data.UploaderService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | @RequestMapping("/uploader") |
| | | public class UploaderController extends BaseController { |
| | | @Autowired |
| | | FileService fileService; |
| | | UploaderService uploaderService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "上传数据") |
| | |
| | | @PostMapping({"/uploadData"}) |
| | | public ResponseMsg<Object> uploadData(HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | | fileService.uploadData(req, res); |
| | | Object obj = uploaderService.uploadData(req, res); |
| | | |
| | | return success(""); |
| | | return success(obj); |
| | | } catch (Exception ex) { |
| | | return fail(ex.getMessage(), null); |
| | | } |