| | |
| | | import com.lf.server.aspect.SysLog; |
| | | import com.lf.server.controller.all.BaseController; |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.MetaEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.data.UploaderService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | | import io.swagger.annotations.ApiOperation; |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | |
| | | /** |
| | | * 数据上传 |
| | | * @author WWW |
| | | * @date 2022-10.17 |
| | | * @date 2022-10-17 |
| | | */ |
| | | @Api(tags = "数据管理\\数据上传") |
| | | @RestController |
| | |
| | | @Autowired |
| | | UploaderService uploaderService; |
| | | |
| | | @Autowired |
| | | TokenService tokenService; |
| | | |
| | | @SysLog() |
| | | @ApiOperation(value = "上传数据") |
| | | @ResponseBody |
| | | @PostMapping({"/uploadData"}) |
| | | @PostMapping(value = "/uploadData") |
| | | public ResponseMsg<Object> uploadData(HttpServletRequest req, HttpServletResponse res) { |
| | | try { |
| | | Object obj = uploaderService.uploadData(req, res); |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | if (ue == null) { |
| | | return fail("用户未登录", null); |
| | | } |
| | | |
| | | Object obj = uploaderService.uploadData(ue, req, res); |
| | | |
| | | return success(obj); |
| | | } catch (Exception ex) { |