旗开得胜

This commit is contained in:
chen-xin-zhi 2025-04-24 11:49:59 +08:00
parent 2577c614d5
commit 1bad62e831
5 changed files with 162 additions and 0 deletions

View File

@ -0,0 +1,18 @@
package com.greenorange.promotion.mapper;
import com.greenorange.promotion.model.entity.UserInfo;
import com.baomidou.mybatisplus.core.mapper.BaseMapper;
/**
* @author 35880
* @description 针对表user_info(用户基本信息表)的数据库操作Mapper
* @createDate 2025-04-24 11:47:37
* @Entity com.greenorange.promotion.model.entity.UserInfo
*/
public interface UserInfoMapper extends BaseMapper<UserInfo> {
}

View File

@ -0,0 +1,81 @@
package com.greenorange.promotion.model.entity;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName;
import java.io.Serializable;
import java.util.Date;
import lombok.Data;
/**
* 用户基本信息表
* @TableName user_info
*/
@TableName(value ="user_info")
@Data
public class UserInfo implements Serializable {
/**
* 用户ID
*/
@TableId(type = IdType.AUTO)
private Long id;
/**
* 用户昵称
*/
private String nickName;
/**
* 用户头像URL
*/
private String userAvatar;
/**
* 手机号
*/
private String phoneNumber;
/**
* 密码建议加密存储
*/
private String userPassword;
/**
* 邀请码
*/
private String invitationCode;
/**
* 用户角色
*/
private Object userRole;
/**
* 上级用户id
*/
private Long parentUserId;
/**
* 上级用户列表1,2,3
*/
private String superUserList;
/**
* 是否删除
*/
private Integer isDelete;
/**
* 创建时间
*/
private Date createTime;
/**
* 更新时间
*/
private Date updateTime;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

View File

@ -0,0 +1,13 @@
package com.greenorange.promotion.service.user;
import com.greenorange.promotion.model.entity.UserInfo;
import com.baomidou.mybatisplus.extension.service.IService;
/**
* @author 35880
* @description 针对表user_info(用户基本信息表)的数据库操作Service
* @createDate 2025-04-24 11:47:37
*/
public interface UserInfoService extends IService<UserInfo> {
}

View File

@ -0,0 +1,22 @@
package com.greenorange.promotion.service.user.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.greenorange.promotion.model.entity.UserInfo;
import com.greenorange.promotion.service.user.UserInfoService;
import com.greenorange.promotion.mapper.UserInfoMapper;
import org.springframework.stereotype.Service;
/**
* @author 35880
* @description 针对表user_info(用户基本信息表)的数据库操作Service实现
* @createDate 2025-04-24 11:47:37
*/
@Service
public class UserInfoServiceImpl extends ServiceImpl<UserInfoMapper, UserInfo>
implements UserInfoService{
}

View File

@ -0,0 +1,28 @@
<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.greenorange.promotion.mapper.UserInfoMapper">
<resultMap id="BaseResultMap" type="com.greenorange.promotion.model.entity.UserInfo">
<id property="id" column="id" jdbcType="BIGINT"/>
<result property="nickName" column="nickName" jdbcType="VARCHAR"/>
<result property="userAvatar" column="userAvatar" jdbcType="VARCHAR"/>
<result property="phoneNumber" column="phoneNumber" jdbcType="VARCHAR"/>
<result property="userPassword" column="userPassword" jdbcType="VARCHAR"/>
<result property="invitationCode" column="invitationCode" jdbcType="VARCHAR"/>
<result property="userRole" column="userRole" jdbcType="OTHER"/>
<result property="parentUserId" column="parentUserId" jdbcType="BIGINT"/>
<result property="superUserList" column="superUserList" jdbcType="VARCHAR"/>
<result property="isDelete" column="isDelete" jdbcType="TINYINT"/>
<result property="createTime" column="createTime" jdbcType="TIMESTAMP"/>
<result property="updateTime" column="updateTime" jdbcType="TIMESTAMP"/>
</resultMap>
<sql id="Base_Column_List">
id,nickName,userAvatar,
phoneNumber,userPassword,invitationCode,
userRole,parentUserId,superUserList,
isDelete,createTime,updateTime
</sql>
</mapper>