| | |
| | | @ApiImplicitParam(name = "id", value = "销售单id", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/updateSaleById") |
| | | public Result updateSaleById(@RequestHeader("token") String token, Integer id, @RequestBody SaleVo saleVo) throws JSONException { |
| | | Map<String, String> map = jwt.readJWT(token); |
| | | String data = map.get("data"); |
| | | JSONObject jsonObject = new JSONObject(data); |
| | | String saleman = jsonObject.getString("name"); |
| | | saleService.updateSaleById(saleman,id, saleVo); |
| | | public Result updateSaleById(@RequestHeader("token") String token, Integer id, @RequestBody SaleVo saleVo) throws Exception { |
| | | Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class); |
| | | saleService.updateSaleById(data.get("name").replaceAll("\"", ""),id, saleVo); |
| | | return Result.success("修改成功!"); |
| | | } |
| | | |
| | |
| | | @ApiImplicitParam(name = "type", value = "状态", dataTypeClass = Integer.class, required = true) |
| | | }) |
| | | @PostMapping("/check") |
| | | public Result check(@RequestHeader("token") String token,Integer id,Integer type) throws JSONException { |
| | | Map<String, String> map = jwt.readJWT(token); |
| | | String data = map.get("data"); |
| | | JSONObject jsonObject = new JSONObject(data); |
| | | String checkname = jsonObject.getString("name"); |
| | | saleService.check(checkname,id,type); |
| | | public Result check(@RequestHeader("token") String token,Integer id,Integer type) throws Exception { |
| | | Map<String, String> data = JackSonUtil.unmarshal(jwt.readJWT(token).get("data"), Map.class); |
| | | saleService.check(data.get("name").replaceAll("\"", ""),id,type); |
| | | return Result.success("审核成功"); |
| | | } |
| | | |