- 添加 hasDefault
- 添加 Transactional 事务
This commit is contained in:
parent
6a728ff410
commit
486278e1cf
@ -46,5 +46,10 @@ public class UserAddressAddPO implements Serializable {
|
|||||||
@NotNull(message = "详细地址不能为空")
|
@NotNull(message = "详细地址不能为空")
|
||||||
@Size(min = 10, max = 100, message = "地址在 10 ~ 100 字之间!")
|
@Size(min = 10, max = 100, message = "地址在 10 ~ 100 字之间!")
|
||||||
private String address;
|
private String address;
|
||||||
|
/**
|
||||||
|
* 收件详细地址
|
||||||
|
*/
|
||||||
|
@ApiModelProperty("默认地址")
|
||||||
|
@NotNull(message = "默认地址不能为空")
|
||||||
|
private Integer hasDefault;
|
||||||
}
|
}
|
||||||
|
@ -58,6 +58,7 @@ public class UserAddressServiceImpl implements UserAddressService {
|
|||||||
}
|
}
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
|
@Transactional
|
||||||
public CommonResult updateAddress(UserAddressUpdateDTO userAddressAddDTO) {
|
public CommonResult updateAddress(UserAddressUpdateDTO userAddressAddDTO) {
|
||||||
UserAddressDO userAddress = userAddressMapper
|
UserAddressDO userAddress = userAddressMapper
|
||||||
.selectByUserIdAndId(userAddressAddDTO.getUserId(), userAddressAddDTO.getId());
|
.selectByUserIdAndId(userAddressAddDTO.getUserId(), userAddressAddDTO.getId());
|
||||||
|
Loading…
Reference in New Issue
Block a user