- 用户地址 添加 hasDefault
This commit is contained in:
@@ -1,6 +1,7 @@
|
||||
package cn.iocoder.mall.user.application.controller.users;
|
||||
|
||||
import cn.iocoder.common.framework.vo.CommonResult;
|
||||
import cn.iocoder.mall.user.api.bo.UserAddressBO;
|
||||
import cn.iocoder.mall.user.application.convert.UserAddressConvert;
|
||||
import cn.iocoder.mall.user.application.po.UserAddressAddPO;
|
||||
import cn.iocoder.mall.user.application.po.UserAddressUpdatePO;
|
||||
@@ -14,6 +15,8 @@ import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.validation.annotation.Validated;
|
||||
import org.springframework.web.bind.annotation.*;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
* 用户地址
|
||||
*
|
||||
@@ -55,7 +58,7 @@ public class UserAddressController {
|
||||
|
||||
@GetMapping("list")
|
||||
@ApiOperation(value = "用户地址列表")
|
||||
public CommonResult addressList() {
|
||||
public CommonResult<List<UserAddressBO>> addressList() {
|
||||
Integer userId = UserSecurityContextHolder.getContext().getUserId();
|
||||
return userAddressService.addressList(userId);
|
||||
}
|
||||
|
||||
@@ -20,7 +20,6 @@ import java.io.Serializable;
|
||||
@Accessors(chain = true)
|
||||
public class UserAddressUpdatePO implements Serializable {
|
||||
|
||||
|
||||
/**
|
||||
* 收件区域编号
|
||||
*/
|
||||
@@ -53,5 +52,10 @@ public class UserAddressUpdatePO implements Serializable {
|
||||
@NotNull(message = "详细地址不能为空")
|
||||
@Size(min = 10, max = 100, message = "地址在 10 ~ 100 字之间!")
|
||||
private String address;
|
||||
|
||||
/**
|
||||
* 是否设置默认
|
||||
*/
|
||||
@ApiModelProperty("是否设置默认")
|
||||
@NotNull(message = "是否设置默认不能为空")
|
||||
private Integer hasDefault;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user