mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
用户信息
This commit is contained in:
parent
7f5788aed1
commit
b30c39764d
@ -1,4 +1,33 @@
|
||||
package cn.iocoder.yudao.module.member.controller.admin.user;
|
||||
|
||||
import cn.iocoder.yudao.framework.common.exception.enums.GlobalErrorCodeConstants;
|
||||
import cn.iocoder.yudao.framework.common.pojo.CommonResult;
|
||||
import cn.iocoder.yudao.module.member.dal.dataobject.user.MemberUserDO;
|
||||
import cn.iocoder.yudao.module.member.service.user.MemberUserService;
|
||||
import io.swagger.annotations.Api;
|
||||
import io.swagger.annotations.ApiOperation;
|
||||
import org.apache.commons.lang3.StringUtils;
|
||||
import org.springframework.web.bind.annotation.GetMapping;
|
||||
import org.springframework.web.bind.annotation.PathVariable;
|
||||
import org.springframework.web.bind.annotation.RequestMapping;
|
||||
import org.springframework.web.bind.annotation.RestController;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
|
||||
@Api(tags = "用户管理 - 用户管理")
|
||||
@RestController
|
||||
@RequestMapping("/member-user")
|
||||
public class UserController {
|
||||
|
||||
@Resource
|
||||
private MemberUserService memberUserService;
|
||||
|
||||
@ApiOperation("获取用户信息")
|
||||
@GetMapping("/query-info")
|
||||
public CommonResult<MemberUserDO> queryInfo(@PathVariable String mobile) {
|
||||
if (StringUtils.isBlank(mobile)) {
|
||||
return CommonResult.error(GlobalErrorCodeConstants.BAD_REQUEST.getCode(),"手机号不能为空");
|
||||
}
|
||||
return CommonResult.success(memberUserService.getUserByMobile(mobile));
|
||||
}
|
||||
}
|
||||
|
@ -0,0 +1,79 @@
|
||||
package cn.iocoder.yudao.module.member.dal.dataobject.user;
|
||||
|
||||
import com.baomidou.mybatisplus.annotation.IdType;
|
||||
import com.baomidou.mybatisplus.annotation.TableId;
|
||||
import com.baomidou.mybatisplus.annotation.TableName;
|
||||
import io.swagger.annotations.ApiModel;
|
||||
import io.swagger.annotations.ApiModelProperty;
|
||||
import lombok.Data;
|
||||
import lombok.EqualsAndHashCode;
|
||||
import lombok.experimental.Accessors;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.time.LocalDateTime;
|
||||
|
||||
/**
|
||||
* <p>
|
||||
* 用户
|
||||
* </p>
|
||||
*
|
||||
* @author author
|
||||
* @since 2022-05-07
|
||||
*/
|
||||
@Data
|
||||
@EqualsAndHashCode(callSuper = false)
|
||||
@Accessors(chain = true)
|
||||
@TableName("member_user")
|
||||
@ApiModel(value="MemberUser对象", description="用户")
|
||||
public class MemberUser implements Serializable {
|
||||
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
@ApiModelProperty(value = "编号")
|
||||
@TableId(value = "id", type = IdType.AUTO)
|
||||
private Long id;
|
||||
|
||||
@ApiModelProperty(value = "用户昵称")
|
||||
private String nickname;
|
||||
|
||||
@ApiModelProperty(value = "头像")
|
||||
private String avatar;
|
||||
|
||||
@ApiModelProperty(value = "状态")
|
||||
private Integer status;
|
||||
|
||||
@ApiModelProperty(value = "手机号")
|
||||
private String mobile;
|
||||
|
||||
@ApiModelProperty(value = "密码")
|
||||
private String password;
|
||||
|
||||
@ApiModelProperty(value = "注册 IP")
|
||||
private String registerIp;
|
||||
|
||||
@ApiModelProperty(value = "最后登录IP")
|
||||
private String loginIp;
|
||||
|
||||
@ApiModelProperty(value = "最后登录时间")
|
||||
private LocalDateTime loginDate;
|
||||
|
||||
@ApiModelProperty(value = "创建者")
|
||||
private String creator;
|
||||
|
||||
@ApiModelProperty(value = "创建时间")
|
||||
private LocalDateTime createTime;
|
||||
|
||||
@ApiModelProperty(value = "更新者")
|
||||
private String updater;
|
||||
|
||||
@ApiModelProperty(value = "更新时间")
|
||||
private LocalDateTime updateTime;
|
||||
|
||||
@ApiModelProperty(value = "是否删除")
|
||||
private Boolean deleted;
|
||||
|
||||
@ApiModelProperty(value = "租户编号")
|
||||
private Long tenantId;
|
||||
|
||||
|
||||
}
|
Loading…
Reference in New Issue
Block a user