| | |
| | | import com.ruoyi.account.api.model.UserAddress; |
| | | import com.ruoyi.common.core.domain.R; |
| | | import com.ruoyi.common.core.utils.StringUtils; |
| | | import com.ruoyi.common.core.utils.poi.ExcelUtil; |
| | | import com.ruoyi.common.core.web.controller.BaseController; |
| | | import com.ruoyi.common.core.web.page.PageInfo; |
| | | import com.ruoyi.common.core.web.page.TableDataInfo; |
| | |
| | | import com.ruoyi.system.api.feignClient.SysUserClient; |
| | | import com.ruoyi.system.api.model.LoginUser; |
| | | import io.swagger.annotations.*; |
| | | import org.springframework.core.io.InputStreamResource; |
| | | import org.springframework.http.HttpHeaders; |
| | | import org.springframework.http.MediaType; |
| | | import org.springframework.http.ResponseEntity; |
| | | import org.springframework.validation.annotation.Validated; |
| | | import org.springframework.web.bind.annotation.*; |
| | | import org.springframework.web.multipart.MultipartFile; |
| | |
| | | import javax.servlet.http.HttpServletResponse; |
| | | import javax.validation.constraints.NotBlank; |
| | | import java.io.IOException; |
| | | import java.io.InputStream; |
| | | import java.io.PrintWriter; |
| | | import java.math.BigDecimal; |
| | | import java.net.URL; |
| | | import java.text.ParseException; |
| | | import java.text.SimpleDateFormat; |
| | | import java.time.LocalDateTime; |
| | |
| | | /** |
| | | * 导入物流信息 |
| | | */ |
| | | @PostMapping("/importExpress") |
| | | public R importExpress(@RequestParam("file") MultipartFile file){ |
| | | @GetMapping("/importExpress") |
| | | public R importExpress(@RequestBody String url){ |
| | | JSONObject jsonObject = JSONObject.parseObject(url); |
| | | String url2 = jsonObject.getString("url"); |
| | | orderService.importExpress(url2); |
| | | return R.ok(); |
| | | } |
| | | |
| | | /** |
| | | * 导出订单信息 |
| | | */ |
| | | @GetMapping("/exportExpress") |
| | | public void exportExpress(HttpServletResponse response,OrderPageList orderPage){ |
| | | PageInfo<OrderPageListVo> orderPageList = orderService.getOrderPageList(orderPage); |
| | | List<OrderPageListVo> list = orderPageList.getRecords(); |
| | | ExcelUtil<OrderPageListVo> util = new ExcelUtil<OrderPageListVo>(OrderPageListVo.class); |
| | | util.exportExcel(response, list, "订单数据"); |
| | | } |
| | | |
| | | } |
| | | |