| | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "获取用户地址",tags = {"获取用户地址"}) |
| | | @ApiOperation(value = "获取用户地址",tags = {"用户地址模块"}) |
| | | @GetMapping("/getAddressList") |
| | | public R<?> getAddressList() { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "添加修改用户地址",tags = {"添加修改用户地址"}) |
| | | @ApiOperation(value = "添加修改用户地址",tags = {"用户地址模块"}) |
| | | @PostMapping("/updateUserAddress") |
| | | public R<?> updateUserAddress(@RequestBody @Valid TbAddress tbAddress) { |
| | | LoginUser loginUser = tokenService.getLoginUser(); |
| | | Long userId = loginUser.getUserId(); |
| | | tbAddress.setUserId(userId.toString()); |
| | | tbAddress.setIsDelete(0); |
| | | addressService.saveOrUpdate(tbAddress); |
| | | return R.ok(); |
| | | } |
| | | |
| | | |
| | | |
| | | @ApiOperation(value = "账号注销",tags = {"账号注销"}) |
| | | @ApiOperation(value = "删除地址",tags = {"用户地址模块"}) |
| | | @DeleteMapping("/deleteAddress/{id}") |
| | | public R<?> deleteAddress(@PathVariable("id")String id) { |
| | | TbAddress address = addressService.getById(id); |