diff --git a/user/user-application/src/main/java/cn/iocoder/mall/user/application/po/UserAddressAddPO.java b/user/user-application/src/main/java/cn/iocoder/mall/user/application/po/UserAddressAddPO.java index 0109e6bb..e7624717 100644 --- a/user/user-application/src/main/java/cn/iocoder/mall/user/application/po/UserAddressAddPO.java +++ b/user/user-application/src/main/java/cn/iocoder/mall/user/application/po/UserAddressAddPO.java @@ -46,5 +46,10 @@ public class UserAddressAddPO implements Serializable { @NotNull(message = "详细地址不能为空") @Size(min = 10, max = 100, message = "地址在 10 ~ 100 字之间!") private String address; - + /** + * 收件详细地址 + */ + @ApiModelProperty("默认地址") + @NotNull(message = "默认地址不能为空") + private Integer hasDefault; } diff --git a/user/user-service-impl/src/main/java/cn/iocoder/mall/user/biz/service/UserAddressServiceImpl.java b/user/user-service-impl/src/main/java/cn/iocoder/mall/user/biz/service/UserAddressServiceImpl.java index d2c4ced7..17658a04 100644 --- a/user/user-service-impl/src/main/java/cn/iocoder/mall/user/biz/service/UserAddressServiceImpl.java +++ b/user/user-service-impl/src/main/java/cn/iocoder/mall/user/biz/service/UserAddressServiceImpl.java @@ -58,6 +58,7 @@ public class UserAddressServiceImpl implements UserAddressService { } @Override + @Transactional public CommonResult updateAddress(UserAddressUpdateDTO userAddressAddDTO) { UserAddressDO userAddress = userAddressMapper .selectByUserIdAndId(userAddressAddDTO.getUserId(), userAddressAddDTO.getId());