From b30c39764dda33f80420b05380b4b13702e2e98e Mon Sep 17 00:00:00 2001 From: yong <1218306717@qq.com> Date: Sun, 8 May 2022 21:20:47 +0800 Subject: [PATCH 1/2] =?UTF-8?q?=E7=94=A8=E6=88=B7=E4=BF=A1=E6=81=AF?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/user/UserController.java | 29 +++++++ .../dal/dataobject/user/MemberUser.java | 79 +++++++++++++++++++ 2 files changed, 108 insertions(+) create mode 100644 yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUser.java diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/UserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/UserController.java index ce5667d32..0e881de28 100644 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/UserController.java +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/UserController.java @@ -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 queryInfo(@PathVariable String mobile) { + if (StringUtils.isBlank(mobile)) { + return CommonResult.error(GlobalErrorCodeConstants.BAD_REQUEST.getCode(),"手机号不能为空"); + } + return CommonResult.success(memberUserService.getUserByMobile(mobile)); + } } diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUser.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUser.java new file mode 100644 index 000000000..e24e99e10 --- /dev/null +++ b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUser.java @@ -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; + +/** + *

+ * 用户 + *

+ * + * @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; + + +} From 8505873e1bd840834595e510e52e25c8a52bd95b Mon Sep 17 00:00:00 2001 From: YunaiV Date: Mon, 9 May 2022 13:31:39 +0800 Subject: [PATCH 2/2] =?UTF-8?q?=E8=A7=A3=E5=86=B3=20UserController=20?= =?UTF-8?q?=E5=86=B2=E7=AA=81=E9=97=AE=E9=A2=98?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../controller/admin/user/UserController.java | 33 -------- .../dal/dataobject/user/MemberUser.java | 79 ------------------- 2 files changed, 112 deletions(-) delete mode 100644 yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/UserController.java delete mode 100644 yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUser.java diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/UserController.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/UserController.java deleted file mode 100644 index 0e881de28..000000000 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/controller/admin/user/UserController.java +++ /dev/null @@ -1,33 +0,0 @@ -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 queryInfo(@PathVariable String mobile) { - if (StringUtils.isBlank(mobile)) { - return CommonResult.error(GlobalErrorCodeConstants.BAD_REQUEST.getCode(),"手机号不能为空"); - } - return CommonResult.success(memberUserService.getUserByMobile(mobile)); - } -} diff --git a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUser.java b/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUser.java deleted file mode 100644 index e24e99e10..000000000 --- a/yudao-module-member/yudao-module-member-biz/src/main/java/cn/iocoder/yudao/module/member/dal/dataobject/user/MemberUser.java +++ /dev/null @@ -1,79 +0,0 @@ -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; - -/** - *

- * 用户 - *

- * - * @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; - - -}