|
@ -22,7 +22,7 @@ import java.util.List; |
|
|
* 收货地址控制器 |
|
|
* 收货地址控制器 |
|
|
* |
|
|
* |
|
|
* @author 科技小王子 |
|
|
* @author 科技小王子 |
|
|
* @since 2025-01-11 10:45:13 |
|
|
|
|
|
|
|
|
* @since 2025-07-22 23:06:40 |
|
|
*/ |
|
|
*/ |
|
|
@Api(tags = "收货地址管理") |
|
|
@Api(tags = "收货地址管理") |
|
|
@RestController |
|
|
@RestController |
|
@ -31,6 +31,7 @@ public class ShopUserAddressController extends BaseController { |
|
|
@Resource |
|
|
@Resource |
|
|
private ShopUserAddressService shopUserAddressService; |
|
|
private ShopUserAddressService shopUserAddressService; |
|
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('shop:shopUserAddress:list')") |
|
|
@ApiOperation("分页查询收货地址") |
|
|
@ApiOperation("分页查询收货地址") |
|
|
@GetMapping("/page") |
|
|
@GetMapping("/page") |
|
|
public ApiResult<PageResult<ShopUserAddress>> page(ShopUserAddressParam param) { |
|
|
public ApiResult<PageResult<ShopUserAddress>> page(ShopUserAddressParam param) { |
|
@ -38,6 +39,7 @@ public class ShopUserAddressController extends BaseController { |
|
|
return success(shopUserAddressService.pageRel(param)); |
|
|
return success(shopUserAddressService.pageRel(param)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('shop:shopUserAddress:list')") |
|
|
@ApiOperation("查询全部收货地址") |
|
|
@ApiOperation("查询全部收货地址") |
|
|
@GetMapping() |
|
|
@GetMapping() |
|
|
public ApiResult<List<ShopUserAddress>> list(ShopUserAddressParam param) { |
|
|
public ApiResult<List<ShopUserAddress>> list(ShopUserAddressParam param) { |
|
@ -53,6 +55,8 @@ public class ShopUserAddressController extends BaseController { |
|
|
return success(shopUserAddressService.getByIdRel(id)); |
|
|
return success(shopUserAddressService.getByIdRel(id)); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('shop:shopUserAddress:save')") |
|
|
|
|
|
@OperationLog |
|
|
@ApiOperation("添加收货地址") |
|
|
@ApiOperation("添加收货地址") |
|
|
@PostMapping() |
|
|
@PostMapping() |
|
|
public ApiResult<?> save(@RequestBody ShopUserAddress shopUserAddress) { |
|
|
public ApiResult<?> save(@RequestBody ShopUserAddress shopUserAddress) { |
|
@ -67,6 +71,8 @@ public class ShopUserAddressController extends BaseController { |
|
|
return fail("添加失败"); |
|
|
return fail("添加失败"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('shop:shopUserAddress:update')") |
|
|
|
|
|
@OperationLog |
|
|
@ApiOperation("修改收货地址") |
|
|
@ApiOperation("修改收货地址") |
|
|
@PutMapping() |
|
|
@PutMapping() |
|
|
public ApiResult<?> update(@RequestBody ShopUserAddress shopUserAddress) { |
|
|
public ApiResult<?> update(@RequestBody ShopUserAddress shopUserAddress) { |
|
@ -76,6 +82,8 @@ public class ShopUserAddressController extends BaseController { |
|
|
return fail("修改失败"); |
|
|
return fail("修改失败"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('shop:shopUserAddress:remove')") |
|
|
|
|
|
@OperationLog |
|
|
@ApiOperation("删除收货地址") |
|
|
@ApiOperation("删除收货地址") |
|
|
@DeleteMapping("/{id}") |
|
|
@DeleteMapping("/{id}") |
|
|
public ApiResult<?> remove(@PathVariable("id") Integer id) { |
|
|
public ApiResult<?> remove(@PathVariable("id") Integer id) { |
|
@ -85,6 +93,8 @@ public class ShopUserAddressController extends BaseController { |
|
|
return fail("删除失败"); |
|
|
return fail("删除失败"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('shop:shopUserAddress:save')") |
|
|
|
|
|
@OperationLog |
|
|
@ApiOperation("批量添加收货地址") |
|
|
@ApiOperation("批量添加收货地址") |
|
|
@PostMapping("/batch") |
|
|
@PostMapping("/batch") |
|
|
public ApiResult<?> saveBatch(@RequestBody List<ShopUserAddress> list) { |
|
|
public ApiResult<?> saveBatch(@RequestBody List<ShopUserAddress> list) { |
|
@ -94,6 +104,8 @@ public class ShopUserAddressController extends BaseController { |
|
|
return fail("添加失败"); |
|
|
return fail("添加失败"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('shop:shopUserAddress:update')") |
|
|
|
|
|
@OperationLog |
|
|
@ApiOperation("批量修改收货地址") |
|
|
@ApiOperation("批量修改收货地址") |
|
|
@PutMapping("/batch") |
|
|
@PutMapping("/batch") |
|
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<ShopUserAddress> batchParam) { |
|
|
public ApiResult<?> removeBatch(@RequestBody BatchParam<ShopUserAddress> batchParam) { |
|
@ -103,6 +115,8 @@ public class ShopUserAddressController extends BaseController { |
|
|
return fail("修改失败"); |
|
|
return fail("修改失败"); |
|
|
} |
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
@PreAuthorize("hasAuthority('shop:shopUserAddress:remove')") |
|
|
|
|
|
@OperationLog |
|
|
@ApiOperation("批量删除收货地址") |
|
|
@ApiOperation("批量删除收货地址") |
|
|
@DeleteMapping("/batch") |
|
|
@DeleteMapping("/batch") |
|
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) { |
|
|
public ApiResult<?> removeBatch(@RequestBody List<Integer> ids) { |
|
|