|
@@ -23,7 +23,7 @@ import java.util.List;
|
|
* @author : Charles
|
|
* @author : Charles
|
|
* @date : 2021/7/2
|
|
* @date : 2021/7/2
|
|
*/
|
|
*/
|
|
-@Api(tags="收货地址API")
|
|
|
|
|
|
+@Api(tags = "收货地址API")
|
|
@RestController
|
|
@RestController
|
|
@RequiredArgsConstructor
|
|
@RequiredArgsConstructor
|
|
@RequestMapping("/order/address")
|
|
@RequestMapping("/order/address")
|
|
@@ -93,7 +93,7 @@ public class AddressApi {
|
|
*/
|
|
*/
|
|
@ApiOperation("保存收货地址(旧:/personalCenter/saveAddress)")
|
|
@ApiOperation("保存收货地址(旧:/personalCenter/saveAddress)")
|
|
@PostMapping("/save")
|
|
@PostMapping("/save")
|
|
- public ResponseJson<Integer> addUserAddress(AddressDto addressDto){
|
|
|
|
|
|
+ public ResponseJson<Integer> addUserAddress(AddressDto addressDto) {
|
|
if (null == addressDto.getUserId()) {
|
|
if (null == addressDto.getUserId()) {
|
|
return ResponseJson.error("用户Id不能为空!", null);
|
|
return ResponseJson.error("用户Id不能为空!", null);
|
|
}
|
|
}
|
|
@@ -121,7 +121,7 @@ public class AddressApi {
|
|
*/
|
|
*/
|
|
@ApiOperation("删除收货地址(旧:/personalCenter/deleteAddress)")
|
|
@ApiOperation("删除收货地址(旧:/personalCenter/deleteAddress)")
|
|
@PostMapping("/delete")
|
|
@PostMapping("/delete")
|
|
- public ResponseJson<Integer> deleteUserAddress(AddressDto addressDto){
|
|
|
|
|
|
+ public ResponseJson<Integer> deleteUserAddress(AddressDto addressDto) {
|
|
if (null == addressDto.getUserId()) {
|
|
if (null == addressDto.getUserId()) {
|
|
return ResponseJson.error("用户Id不能为空!", null);
|
|
return ResponseJson.error("用户Id不能为空!", null);
|
|
}
|
|
}
|
|
@@ -138,9 +138,9 @@ public class AddressApi {
|
|
* userId 用户ID
|
|
* userId 用户ID
|
|
* addressId 用户地址Id
|
|
* addressId 用户地址Id
|
|
*/
|
|
*/
|
|
- @ApiOperation("保存收货地址(旧:/personalCenter/defaultAddress)")
|
|
|
|
|
|
+ @ApiOperation("设为默认地址(旧:/personalCenter/defaultAddress)")
|
|
@PostMapping("/set/default")
|
|
@PostMapping("/set/default")
|
|
- public ResponseJson<Integer> setDefaultAddress(AddressDto addressDto){
|
|
|
|
|
|
+ public ResponseJson<Integer> setDefaultAddress(AddressDto addressDto) {
|
|
if (null == addressDto.getUserId()) {
|
|
if (null == addressDto.getUserId()) {
|
|
return ResponseJson.error("用户Id不能为空!", null);
|
|
return ResponseJson.error("用户Id不能为空!", null);
|
|
}
|
|
}
|