| | |
| | | import org.springframework.beans.factory.annotation.Autowired; |
| | | import org.springframework.http.HttpStatus; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.web.bind.annotation.PathVariable; |
| | | import org.springframework.web.bind.annotation.RequestMapping; |
| | | import org.springframework.web.bind.annotation.RequestParam; |
| | | import org.springframework.web.bind.annotation.RestController; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.client.RestTemplate; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | | import org.springframework.web.multipart.support.StandardMultipartHttpServletRequest; |
| | | |
| | | import javax.servlet.http.HttpServletRequest; |
| | | import javax.servlet.http.HttpServletResponse; |
| | |
| | | public ResponseEntity<String> callComponentUploadFile( |
| | | @PathVariable String componentCode, |
| | | @PathVariable String componentMethod, |
| | | @RequestParam("uploadFile") MultipartFile uploadFile, |
| | | //@RequestBody String info, |
| | | @RequestParam(value = "uploadFile", required = false) MultipartFile uploadFile, |
| | | @RequestParam(value = "userId", required = false) String userId, |
| | | HttpServletRequest request) { |
| | | ResponseEntity<String> responseEntity = null; |
| | | Map formParam = null; |
| | |
| | | Assert.hasLength(componentMethod, "参数错误,未传入调用组件方法"); |
| | | |
| | | pd = freshPageDate(request); |
| | | |
| | | //权限校验 |
| | | hasPrivilege(restTemplate, pd, "/callComponent/" + componentCode + "/" + componentMethod); |
| | | |
| | |
| | | * @param request HttpServletRequest 对象 |
| | | * @return pd 对象 |
| | | */ |
| | | private IPageData freshPageDate(HttpServletRequest request) { |
| | | public IPageData freshPageDate(HttpServletRequest request) { |
| | | Map<String, String[]> params = request.getParameterMap(); |
| | | IPageData pd = (IPageData) request.getAttribute(CommonConstant.CONTEXT_PAGE_DATA); |
| | | String reqData = ""; |