From 486278e1cf33498ea1f0f99e1aabd5979cea7c93 Mon Sep 17 00:00:00 2001 From: sin <2943460818@qq.com> Date: Thu, 11 Apr 2019 23:09:21 +0800 Subject: [PATCH] =?UTF-8?q?-=20=E6=B7=BB=E5=8A=A0=20hasDefault=20-=20?= =?UTF-8?q?=E6=B7=BB=E5=8A=A0=20Transactional=20=E4=BA=8B=E5=8A=A1?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../iocoder/mall/user/application/po/UserAddressAddPO.java | 7 ++++++- .../mall/user/biz/service/UserAddressServiceImpl.java | 1 + 2 files changed, 7 insertions(+), 1 deletion(-) 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 0109e6bb9..e76247174 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 d2c4ced7e..17658a040 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());