新建用户个人信息表 user_info,在注册时(/register)自动添加数据。

This commit is contained in:
haotianmingyue 2024-10-14 16:36:17 +08:00
parent 6c1d77d0c5
commit ad44abc341
7 changed files with 863 additions and 6 deletions

View File

@ -1,6 +1,9 @@
package com.ruoyi.framework.web.service;
import java.util.Date;
import com.ruoyi.common.core.domain.model.AppRegisterUser;
import com.ruoyi.system.domain.UserInfo;
import com.ruoyi.system.service.IUserInfoService;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Component;
import com.ruoyi.common.constant.CacheConstants;
@ -30,6 +33,9 @@ public class SysRegisterService
@Autowired
private ISysUserService userService;
@Autowired
private IUserInfoService userInfoService;
@Autowired
private ISysConfigService configService;
@ -119,12 +125,16 @@ public class SysRegisterService
SysUser sysUser = new SysUser();
sysUser.setUserName(username);
// 验证码开关
boolean captchaEnabled = configService.selectCaptchaEnabled();
if (captchaEnabled)
{
appRegistervalidateCaptcha(username, registerBody.getCode());
}
UserInfo userInfo = new UserInfo();
// //------------------------ 验证码开关 开发环境先关闭----------------------------------
// boolean captchaEnabled = configService.selectCaptchaEnabled();
// if (captchaEnabled)
// {
// appRegistervalidateCaptcha(username, registerBody.getCode());
// }
// //----------------------end 验证码开关-------------------------------------------
if (StringUtils.isEmpty(username))
{
@ -152,13 +162,35 @@ public class SysRegisterService
{
sysUser.setNickName(registerBody.getNickname());
sysUser.setPassword(SecurityUtils.encryptPassword(password));
// 注册账号
boolean regFlag = userService.registerUser(sysUser);
if (!regFlag)
{
msg = "注册失败,请联系系统管理人员";
}
else
{
// 查询数据库中的用户账号信息
SysUser newSysUser = userService.selectUserByUserName(username);
//---------------------------- 新建用户个人信息--------------------------------------------
userInfo.setUserId(newSysUser.getUserId());
userInfo.setPhonenumber(username);
// 获取当前时间的毫秒值
long currentTimeMillis = System.currentTimeMillis();
// 利用毫秒值构造Date对象
Date currentDate = new Date(currentTimeMillis);
userInfo.setUpdateTime(currentDate);
int infoFlag = userInfoService.insertUserInfo(userInfo);
if (infoFlag == 0) {
msg = "个人信息注册失败,请联系系统管理人员";
return msg;
}
System.out.println(infoFlag);
AsyncManager.me().execute(AsyncFactory.recordLogininfor(username, Constants.REGISTER, MessageUtils.message("user.register.success")));
}
}

View File

@ -0,0 +1,104 @@
//package com.ruoyi.system.controller;
//
//import java.util.List;
//import javax.servlet.http.HttpServletResponse;
//import org.springframework.security.access.prepost.PreAuthorize;
//import org.springframework.beans.factory.annotation.Autowired;
//import org.springframework.web.bind.annotation.GetMapping;
//import org.springframework.web.bind.annotation.PostMapping;
//import org.springframework.web.bind.annotation.PutMapping;
//import org.springframework.web.bind.annotation.DeleteMapping;
//import org.springframework.web.bind.annotation.PathVariable;
//import org.springframework.web.bind.annotation.RequestBody;
//import org.springframework.web.bind.annotation.RequestMapping;
//import org.springframework.web.bind.annotation.RestController;
//import com.ruoyi.common.annotation.Log;
//import com.ruoyi.common.core.controller.BaseController;
//import com.ruoyi.common.core.domain.AjaxResult;
//import com.ruoyi.common.enums.BusinessType;
//import com.ruoyi.system.domain.UserInfo;
//import com.ruoyi.system.service.IUserInfoService;
//import com.ruoyi.common.utils.poi.ExcelUtil;
//import com.ruoyi.common.core.page.TableDataInfo;
//
///**
// * 用户个人信息Controller
// *
// * @author haotian
// * @date 2024-10-14
// */
//@RestController
//@RequestMapping("/system/user_info")
//public class UserInfoController extends BaseController
//{
// @Autowired
// private IUserInfoService userInfoService;
//
// /**
// * 查询用户个人信息列表
// */
// @PreAuthorize("@ss.hasPermi('system:user_info:list')")
// @GetMapping("/list")
// public TableDataInfo list(UserInfo userInfo)
// {
// startPage();
// List<UserInfo> list = userInfoService.selectUserInfoList(userInfo);
// return getDataTable(list);
// }
//
// /**
// * 导出用户个人信息列表
// */
// @PreAuthorize("@ss.hasPermi('system:user_info:export')")
// @Log(title = "用户个人信息", businessType = BusinessType.EXPORT)
// @PostMapping("/export")
// public void export(HttpServletResponse response, UserInfo userInfo)
// {
// List<UserInfo> list = userInfoService.selectUserInfoList(userInfo);
// ExcelUtil<UserInfo> util = new ExcelUtil<UserInfo>(UserInfo.class);
// util.exportExcel(response, list, "用户个人信息数据");
// }
//
// /**
// * 获取用户个人信息详细信息
// */
// @PreAuthorize("@ss.hasPermi('system:user_info:query')")
// @GetMapping(value = "/{userId}")
// public AjaxResult getInfo(@PathVariable("userId") Long userId)
// {
// return success(userInfoService.selectUserInfoByUserId(userId));
// }
//
// /**
// * 新增用户个人信息
// */
// @PreAuthorize("@ss.hasPermi('system:user_info:add')")
// @Log(title = "用户个人信息", businessType = BusinessType.INSERT)
// @PostMapping
// public AjaxResult add(@RequestBody UserInfo userInfo)
// {
// return toAjax(userInfoService.insertUserInfo(userInfo));
// }
//
// /**
// * 修改用户个人信息
// */
// @PreAuthorize("@ss.hasPermi('system:user_info:edit')")
// @Log(title = "用户个人信息", businessType = BusinessType.UPDATE)
// @PutMapping
// public AjaxResult edit(@RequestBody UserInfo userInfo)
// {
// return toAjax(userInfoService.updateUserInfo(userInfo));
// }
//
// /**
// * 删除用户个人信息
// */
// @PreAuthorize("@ss.hasPermi('system:user_info:remove')")
// @Log(title = "用户个人信息", businessType = BusinessType.DELETE)
// @DeleteMapping("/{userIds}")
// public AjaxResult remove(@PathVariable Long[] userIds)
// {
// return toAjax(userInfoService.deleteUserInfoByUserIds(userIds));
// }
//}

View File

@ -0,0 +1,345 @@
package com.ruoyi.system.domain;
import java.util.Date;
import org.apache.commons.lang3.builder.ToStringBuilder;
import org.apache.commons.lang3.builder.ToStringStyle;
import com.ruoyi.common.annotation.Excel;
import com.ruoyi.common.core.domain.BaseEntity;
/**
* 用户个人信息对象 user_info
*
* @author haotian
* @date 2024-10-14
*/
public class UserInfo extends BaseEntity
{
private static final long serialVersionUID = 1L;
/** 用户id */
private Long userId;
/** 实名认证状态0 */
@Excel(name = "实名认证状态0")
private String authenticationStatus;
/** 姓名 */
@Excel(name = "姓名")
private String realName;
/** 身份证号唯一值 */
@Excel(name = "身份证号唯一值")
private String idCard;
/** 用户性别0 */
@Excel(name = "用户性别0")
private String sex;
/** 个性签名 */
@Excel(name = "个性签名")
private String signature;
/** 头像地址 */
@Excel(name = "头像地址")
private String avatar;
/** 身份证正面地址 */
@Excel(name = "身份证正面地址")
private String cardFront;
/** 身份证背面地址 */
@Excel(name = "身份证背面地址")
private String cardBack;
/** 用户邮箱 */
@Excel(name = "用户邮箱")
private String email;
/** 收到火箭数 */
@Excel(name = "收到火箭数")
private Long receiveRockets;
/** 发出火箭数 */
@Excel(name = "发出火箭数")
private Long sendRockets;
/** 分享次数 */
@Excel(name = "分享次数")
private Long shares;
/** 被关注数 */
@Excel(name = "被关注数")
private Long followers;
/** 7天在线时长通过在线时长表来计算 */
@Excel(name = "7天在线时长", readConverterExp = "通=过在线时长表来计算")
private Long sOnlineTime;
/** 7天MR在线时长通过在线时长表来计算 */
@Excel(name = "7天MR在线时长", readConverterExp = "通=过在线时长表来计算")
private Long sMrTime;
/** 7天消费额通过订单来计算 */
@Excel(name = "7天消费额", readConverterExp = "通=过订单来计算")
private Long sConsumption;
/** 30天消费额通过订单来计算 */
@Excel(name = "30天消费额", readConverterExp = "通=过订单来计算")
private Long thConsumption;
/** 手机号 */
@Excel(name = "手机号")
private String phonenumber;
/** MR在线总长单位分钟 */
@Excel(name = "MR在线总长", readConverterExp = "单=位分钟")
private Long tMrTime;
/** 在线总时长(单位分钟) */
@Excel(name = "在线总时长", readConverterExp = "单=位分钟")
private Long tOnlineTime;
/** 消费总额 */
@Excel(name = "消费总额")
private Long tConsumption;
@Excel(name = "更新时间")
private Date updateTime;
public void setUserId(Long userId)
{
this.userId = userId;
}
public Long getUserId()
{
return userId;
}
public void setAuthenticationStatus(String authenticationStatus)
{
this.authenticationStatus = authenticationStatus;
}
public String getAuthenticationStatus()
{
return authenticationStatus;
}
public void setRealName(String realName)
{
this.realName = realName;
}
public String getRealName()
{
return realName;
}
public void setIdCard(String idCard)
{
this.idCard = idCard;
}
public String getIdCard()
{
return idCard;
}
public void setSex(String sex)
{
this.sex = sex;
}
public String getSex()
{
return sex;
}
public void setSignature(String signature)
{
this.signature = signature;
}
public String getSignature()
{
return signature;
}
public void setAvatar(String avatar)
{
this.avatar = avatar;
}
public String getAvatar()
{
return avatar;
}
public void setCardFront(String cardFront)
{
this.cardFront = cardFront;
}
public String getCardFront()
{
return cardFront;
}
public void setCardBack(String cardBack)
{
this.cardBack = cardBack;
}
public String getCardBack()
{
return cardBack;
}
public void setEmail(String email)
{
this.email = email;
}
public String getEmail()
{
return email;
}
public void setReceiveRockets(Long receiveRockets)
{
this.receiveRockets = receiveRockets;
}
public Long getReceiveRockets()
{
return receiveRockets;
}
public void setSendRockets(Long sendRockets)
{
this.sendRockets = sendRockets;
}
public Long getSendRockets()
{
return sendRockets;
}
public void setShares(Long shares)
{
this.shares = shares;
}
public Long getShares()
{
return shares;
}
public void setFollowers(Long followers)
{
this.followers = followers;
}
public Long getFollowers()
{
return followers;
}
public void setsOnlineTime(Long sOnlineTime)
{
this.sOnlineTime = sOnlineTime;
}
public Long getsOnlineTime()
{
return sOnlineTime;
}
public void setsMrTime(Long sMrTime)
{
this.sMrTime = sMrTime;
}
public Long getsMrTime()
{
return sMrTime;
}
public void setsConsumption(Long sConsumption)
{
this.sConsumption = sConsumption;
}
public Long getsConsumption()
{
return sConsumption;
}
public void setThConsumption(Long thConsumption)
{
this.thConsumption = thConsumption;
}
public Long getThConsumption()
{
return thConsumption;
}
public void setPhonenumber(String phonenumber)
{
this.phonenumber = phonenumber;
}
public String getPhonenumber()
{
return phonenumber;
}
public void settMrTime(Long tMrTime)
{
this.tMrTime = tMrTime;
}
public Long gettMrTime()
{
return tMrTime;
}
public void settOnlineTime(Long tOnlineTime)
{
this.tOnlineTime = tOnlineTime;
}
public Long gettOnlineTime()
{
return tOnlineTime;
}
public void settConsumption(Long tConsumption)
{
this.tConsumption = tConsumption;
}
public Long gettConsumption()
{
return tConsumption;
}
public Date getUpdateTime()
{
return updateTime;
}
public void setUpdateTime(Date updateTime){
this.updateTime = updateTime;
}
@Override
public String toString() {
return new ToStringBuilder(this,ToStringStyle.MULTI_LINE_STYLE)
.append("userId", getUserId())
.append("authenticationStatus", getAuthenticationStatus())
.append("realName", getRealName())
.append("idCard", getIdCard())
.append("sex", getSex())
.append("signature", getSignature())
.append("avatar", getAvatar())
.append("cardFront", getCardFront())
.append("cardBack", getCardBack())
.append("email", getEmail())
.append("receiveRockets", getReceiveRockets())
.append("sendRockets", getSendRockets())
.append("shares", getShares())
.append("followers", getFollowers())
.append("sOnlineTime", getsOnlineTime())
.append("sMrTime", getsMrTime())
.append("sConsumption", getsConsumption())
.append("thConsumption", getThConsumption())
.append("phonenumber", getPhonenumber())
.append("tMrTime", gettMrTime())
.append("tOnlineTime", gettOnlineTime())
.append("tConsumption", gettConsumption())
.append("updateTime", getUpdateTime())
.toString();
}
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.mapper;
import java.util.List;
import com.ruoyi.system.domain.UserInfo;
/**
* 用户个人信息Mapper接口
*
* @author haotian
* @date 2024-10-14
*/
public interface UserInfoMapper
{
/**
* 查询用户个人信息
*
* @param userId 用户个人信息主键
* @return 用户个人信息
*/
public UserInfo selectUserInfoByUserId(Long userId);
/**
* 查询用户个人信息列表
*
* @param userInfo 用户个人信息
* @return 用户个人信息集合
*/
public List<UserInfo> selectUserInfoList(UserInfo userInfo);
/**
* 新增用户个人信息
*
* @param userInfo 用户个人信息
* @return 结果
*/
public int insertUserInfo(UserInfo userInfo);
/**
* 修改用户个人信息
*
* @param userInfo 用户个人信息
* @return 结果
*/
public int updateUserInfo(UserInfo userInfo);
/**
* 删除用户个人信息
*
* @param userId 用户个人信息主键
* @return 结果
*/
public int deleteUserInfoByUserId(Long userId);
/**
* 批量删除用户个人信息
*
* @param userIds 需要删除的数据主键集合
* @return 结果
*/
public int deleteUserInfoByUserIds(Long[] userIds);
}

View File

@ -0,0 +1,61 @@
package com.ruoyi.system.service;
import java.util.List;
import com.ruoyi.system.domain.UserInfo;
/**
* 用户个人信息Service接口
*
* @author haotian
* @date 2024-10-14
*/
public interface IUserInfoService
{
/**
* 查询用户个人信息
*
* @param userId 用户个人信息主键
* @return 用户个人信息
*/
public UserInfo selectUserInfoByUserId(Long userId);
/**
* 查询用户个人信息列表
*
* @param userInfo 用户个人信息
* @return 用户个人信息集合
*/
public List<UserInfo> selectUserInfoList(UserInfo userInfo);
/**
* 新增用户个人信息
*
* @param userInfo 用户个人信息
* @return 结果
*/
public int insertUserInfo(UserInfo userInfo);
/**
* 修改用户个人信息
*
* @param userInfo 用户个人信息
* @return 结果
*/
public int updateUserInfo(UserInfo userInfo);
/**
* 批量删除用户个人信息
*
* @param userIds 需要删除的用户个人信息主键集合
* @return 结果
*/
public int deleteUserInfoByUserIds(Long[] userIds);
/**
* 删除用户个人信息信息
*
* @param userId 用户个人信息主键
* @return 结果
*/
public int deleteUserInfoByUserId(Long userId);
}

View File

@ -0,0 +1,93 @@
package com.ruoyi.system.service.impl;
import java.util.List;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import com.ruoyi.system.mapper.UserInfoMapper;
import com.ruoyi.system.domain.UserInfo;
import com.ruoyi.system.service.IUserInfoService;
/**
* 用户个人信息Service业务层处理
*
* @author haotian
* @date 2024-10-14
*/
@Service
public class UserInfoServiceImpl implements IUserInfoService
{
@Autowired
private UserInfoMapper userInfoMapper;
/**
* 查询用户个人信息
*
* @param userId 用户个人信息主键
* @return 用户个人信息
*/
@Override
public UserInfo selectUserInfoByUserId(Long userId)
{
return userInfoMapper.selectUserInfoByUserId(userId);
}
/**
* 查询用户个人信息列表
*
* @param userInfo 用户个人信息
* @return 用户个人信息
*/
@Override
public List<UserInfo> selectUserInfoList(UserInfo userInfo)
{
return userInfoMapper.selectUserInfoList(userInfo);
}
/**
* 新增用户个人信息
*
* @param userInfo 用户个人信息
* @return 结果
*/
@Override
public int insertUserInfo(UserInfo userInfo)
{
return userInfoMapper.insertUserInfo(userInfo);
}
/**
* 修改用户个人信息
*
* @param userInfo 用户个人信息
* @return 结果
*/
@Override
public int updateUserInfo(UserInfo userInfo)
{
return userInfoMapper.updateUserInfo(userInfo);
}
/**
* 批量删除用户个人信息
*
* @param userIds 需要删除的用户个人信息主键
* @return 结果
*/
@Override
public int deleteUserInfoByUserIds(Long[] userIds)
{
return userInfoMapper.deleteUserInfoByUserIds(userIds);
}
/**
* 删除用户个人信息信息
*
* @param userId 用户个人信息主键
* @return 结果
*/
@Override
public int deleteUserInfoByUserId(Long userId)
{
return userInfoMapper.deleteUserInfoByUserId(userId);
}
}

View File

@ -0,0 +1,161 @@
<?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.ruoyi.system.mapper.UserInfoMapper">
<resultMap type="UserInfo" id="UserInfoResult">
<result property="userId" column="user_id" />
<result property="authenticationStatus" column="authentication_status" />
<result property="realName" column="real_name" />
<result property="idCard" column="id_card" />
<result property="sex" column="sex" />
<result property="signature" column="signature" />
<result property="avatar" column="avatar" />
<result property="cardFront" column="card_front" />
<result property="cardBack" column="card_back" />
<result property="email" column="email" />
<result property="receiveRockets" column="receive_rockets" />
<result property="sendRockets" column="send_rockets" />
<result property="shares" column="shares" />
<result property="followers" column="followers" />
<result property="sOnlineTime" column="s_online_time" />
<result property="sMrTime" column="s_mr_time" />
<result property="sConsumption" column="s_consumption" />
<result property="thConsumption" column="th_consumption" />
<result property="phonenumber" column="phonenumber" />
<result property="tMrTime" column="t_mr_time" />
<result property="tOnlineTime" column="t_online_time" />
<result property="tConsumption" column="t_consumption" />
</resultMap>
<sql id="selectUserInfoVo">
select user_id, authentication_status, real_name, id_card, sex, signature, avatar, card_front, card_back, email, receive_rockets, send_rockets, shares, followers, s_online_time, s_mr_time, s_consumption, th_consumption, phonenumber, t_mr_time, t_online_time, t_consumption from user_info
</sql>
<select id="selectUserInfoList" parameterType="UserInfo" resultMap="UserInfoResult">
<include refid="selectUserInfoVo"/>
<where>
<if test="authenticationStatus != null and authenticationStatus != ''"> and authentication_status = #{authenticationStatus}</if>
<if test="realName != null and realName != ''"> and real_name like concat('%', #{realName}, '%')</if>
<if test="idCard != null and idCard != ''"> and id_card = #{idCard}</if>
<if test="sex != null and sex != ''"> and sex = #{sex}</if>
<if test="signature != null and signature != ''"> and signature = #{signature}</if>
<if test="avatar != null and avatar != ''"> and avatar = #{avatar}</if>
<if test="cardFront != null and cardFront != ''"> and card_front = #{cardFront}</if>
<if test="cardBack != null and cardBack != ''"> and card_back = #{cardBack}</if>
<if test="email != null and email != ''"> and email = #{email}</if>
<if test="receiveRockets != null "> and receive_rockets = #{receiveRockets}</if>
<if test="sendRockets != null "> and send_rockets = #{sendRockets}</if>
<if test="shares != null "> and shares = #{shares}</if>
<if test="followers != null "> and followers = #{followers}</if>
<if test="sOnlineTime != null "> and s_online_time = #{sOnlineTime}</if>
<if test="sMrTime != null "> and s_mr_time = #{sMrTime}</if>
<if test="sConsumption != null "> and s_consumption = #{sConsumption}</if>
<if test="thConsumption != null "> and th_consumption = #{thConsumption}</if>
<if test="phonenumber != null and phonenumber != ''"> and phonenumber = #{phonenumber}</if>
<if test="tMrTime != null "> and t_mr_time = #{tMrTime}</if>
<if test="tOnlineTime != null "> and t_online_time = #{tOnlineTime}</if>
<if test="tConsumption != null "> and t_consumption = #{tConsumption}</if>
</where>
</select>
<select id="selectUserInfoByUserId" parameterType="Long" resultMap="UserInfoResult">
<include refid="selectUserInfoVo"/>
where user_id = #{userId}
</select>
<insert id="insertUserInfo" parameterType="UserInfo">
insert into user_info
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="userId != null">user_id,</if>
<if test="authenticationStatus != null">authentication_status,</if>
<if test="realName != null">real_name,</if>
<if test="idCard != null">id_card,</if>
<if test="sex != null">sex,</if>
<if test="signature != null">signature,</if>
<if test="avatar != null">avatar,</if>
<if test="cardFront != null">card_front,</if>
<if test="cardBack != null">card_back,</if>
<if test="email != null">email,</if>
<if test="receiveRockets != null">receive_rockets,</if>
<if test="sendRockets != null">send_rockets,</if>
<if test="shares != null">shares,</if>
<if test="followers != null">followers,</if>
<if test="sOnlineTime != null">s_online_time,</if>
<if test="sMrTime != null">s_mr_time,</if>
<if test="sConsumption != null">s_consumption,</if>
<if test="thConsumption != null">th_consumption,</if>
<if test="phonenumber != null">phonenumber,</if>
<if test="tMrTime != null">t_mr_time,</if>
<if test="tOnlineTime != null">t_online_time,</if>
<if test="tConsumption != null">t_consumption,</if>
<if test="updateTime != null">update_time</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="userId != null">#{userId},</if>
<if test="authenticationStatus != null">#{authenticationStatus},</if>
<if test="realName != null">#{realName},</if>
<if test="idCard != null">#{idCard},</if>
<if test="sex != null">#{sex},</if>
<if test="signature != null">#{signature},</if>
<if test="avatar != null">#{avatar},</if>
<if test="cardFront != null">#{cardFront},</if>
<if test="cardBack != null">#{cardBack},</if>
<if test="email != null">#{email},</if>
<if test="receiveRockets != null">#{receiveRockets},</if>
<if test="sendRockets != null">#{sendRockets},</if>
<if test="shares != null">#{shares},</if>
<if test="followers != null">#{followers},</if>
<if test="sOnlineTime != null">#{sOnlineTime},</if>
<if test="sMrTime != null">#{sMrTime},</if>
<if test="sConsumption != null">#{sConsumption},</if>
<if test="thConsumption != null">#{thConsumption},</if>
<if test="phonenumber != null">#{phonenumber},</if>
<if test="tMrTime != null">#{tMrTime},</if>
<if test="tOnlineTime != null">#{tOnlineTime},</if>
<if test="tConsumption != null">#{tConsumption},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
</insert>
<update id="updateUserInfo" parameterType="UserInfo">
update user_info
<trim prefix="SET" suffixOverrides=",">
<if test="authenticationStatus != null">authentication_status = #{authenticationStatus},</if>
<if test="realName != null">real_name = #{realName},</if>
<if test="idCard != null">id_card = #{idCard},</if>
<if test="sex != null">sex = #{sex},</if>
<if test="signature != null">signature = #{signature},</if>
<if test="avatar != null">avatar = #{avatar},</if>
<if test="cardFront != null">card_front = #{cardFront},</if>
<if test="cardBack != null">card_back = #{cardBack},</if>
<if test="email != null">email = #{email},</if>
<if test="receiveRockets != null">receive_rockets = #{receiveRockets},</if>
<if test="sendRockets != null">send_rockets = #{sendRockets},</if>
<if test="shares != null">shares = #{shares},</if>
<if test="followers != null">followers = #{followers},</if>
<if test="sOnlineTime != null">s_online_time = #{sOnlineTime},</if>
<if test="sMrTime != null">s_mr_time = #{sMrTime},</if>
<if test="sConsumption != null">s_consumption = #{sConsumption},</if>
<if test="thConsumption != null">th_consumption = #{thConsumption},</if>
<if test="phonenumber != null">phonenumber = #{phonenumber},</if>
<if test="tMrTime != null">t_mr_time = #{tMrTime},</if>
<if test="tOnlineTime != null">t_online_time = #{tOnlineTime},</if>
<if test="tConsumption != null">t_consumption = #{tConsumption},</if>
<if test="updateTime != null">#{updateTime},</if>
</trim>
where user_id = #{userId}
</update>
<delete id="deleteUserInfoByUserId" parameterType="Long">
delete from user_info where user_id = #{userId}
</delete>
<delete id="deleteUserInfoByUserIds" parameterType="String">
delete from user_info where user_id in
<foreach item="userId" collection="array" open="(" separator="," close=")">
#{userId}
</foreach>
</delete>
</mapper>