| | |
| | | import com.lf.server.entity.all.ResponseMsg; |
| | | import com.lf.server.entity.data.StyleEntity; |
| | | import com.lf.server.entity.sys.UserEntity; |
| | | import com.lf.server.service.data.UploaderService; |
| | | import com.lf.server.service.all.UploadService; |
| | | import com.lf.server.service.data.StyleService; |
| | | import com.lf.server.service.sys.TokenService; |
| | | import io.swagger.annotations.Api; |
| | |
| | | */ |
| | | @Api(tags = "数据管理\\样式管理") |
| | | @RestController |
| | | @RequestMapping("/Style") |
| | | @RequestMapping("/style") |
| | | public class StyleController extends BaseController { |
| | | @Autowired |
| | | StyleService styleService; |
| | |
| | | TokenService tokenService; |
| | | |
| | | @Autowired |
| | | UploaderService uploaderService; |
| | | UploadService uploadService; |
| | | |
| | | private final static String TAB_NAME = "sys_style"; |
| | | |
| | |
| | | public ResponseMsg<String> upload(@RequestParam("file") MultipartFile file, HttpServletRequest req) { |
| | | UserEntity ue = tokenService.getCurrentUser(req); |
| | | |
| | | return uploaderService.upload(ue, TAB_NAME, file, this); |
| | | return uploadService.upload(ue, TAB_NAME, file, this); |
| | | } |
| | | |
| | | @SysLog() |
| | |
| | | @ApiImplicitParam(name = "guid", value = "附件Guid", dataType = "String", paramType = "body") |
| | | }) |
| | | @GetMapping(value = "/download") |
| | | public void download(String guid, HttpServletRequest req, HttpServletResponse res) { |
| | | uploaderService.download(guid, req, res, this); |
| | | public void download(String guid, HttpServletResponse res) { |
| | | uploadService.download(guid, res); |
| | | } |
| | | } |