| | |
| | | public Result updateSaleById(@RequestHeader("token") String token, Integer id, String str) throws Exception { |
| | | SaleVo saleVo = JackSonUtil.unmarshal(str, SaleVo.class); |
| | | Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class); |
| | | saleService.updateSaleById(data.get("name").replaceAll("\"", ""), id, saleVo); |
| | | return Result.success("修改成功!"); |
| | | return Result.success(saleService.updateSaleById(data.get("name").replaceAll("\"", ""), id, saleVo)); |
| | | } |
| | | |
| | | @ApiOperation(value = "根据销售单id删除") |
| | |
| | | return Result.success("审核成功"); |
| | | } |
| | | |
| | | @ApiOperation(value = "同步") |
| | | @PostMapping("/synchronization") |
| | | public Result synchronization(){ |
| | | return Result.success(saleService.synchronization()); |
| | | } |
| | | |
| | | @ApiOperation(value = "下载附件") |
| | | @ApiImplicitParams(value = { |
| | | @ApiImplicitParam(name = "id", value = "销售单id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/download") |
| | | public Result download(Integer id){ |
| | | return Result.success(saleService.download(id)); |
| | | } |
| | | |
| | | } |