个人中心优化,增加上传头像接口
This commit is contained in:
@@ -22,6 +22,14 @@ public interface IShopUserService
|
||||
*/
|
||||
public ShopUser selectShopUserById(String id);
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户信息
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户信息
|
||||
*/
|
||||
public ShopUser selectShopUserByUserId(Long userId);
|
||||
|
||||
/**
|
||||
* 查询用户管理列表
|
||||
*
|
||||
@@ -77,4 +85,4 @@ public interface IShopUserService
|
||||
* @return 用户标签列表(以分号分隔的字符串)
|
||||
*/
|
||||
public String getUserTags(String userId);
|
||||
}
|
||||
}
|
||||
@@ -38,6 +38,18 @@ public class ShopUserServiceImpl implements IShopUserService
|
||||
return shopUserMapper.selectShopUserById(id);
|
||||
}
|
||||
|
||||
/**
|
||||
* 根据用户ID查询用户信息
|
||||
*
|
||||
* @param userId 用户ID
|
||||
* @return 用户信息
|
||||
*/
|
||||
@Override
|
||||
public ShopUser selectShopUserByUserId(Long userId)
|
||||
{
|
||||
return shopUserMapper.selectShopUserByUserId(userId);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询用户管理列表
|
||||
*
|
||||
@@ -190,4 +202,4 @@ public class ShopUserServiceImpl implements IShopUserService
|
||||
|
||||
return tags.toString();
|
||||
}
|
||||
}
|
||||
}
|
||||
@@ -24,6 +24,7 @@
|
||||
<if test="headImg != null">head_img,</if>
|
||||
<if test="vipStartTime != null">vip_start_time,</if>
|
||||
<if test="vipEndTime != null">vip_end_time,</if>
|
||||
<if test="descinfo != null">descinfo,</if>
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
@@ -43,6 +44,7 @@
|
||||
<if test="headImg != null">#{headImg},</if>
|
||||
<if test="vipStartTime != null">#{vipStartTime},</if>
|
||||
<if test="vipEndTime != null">#{vipEndTime},</if>
|
||||
<if test="descinfo != null">#{descinfo},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -66,10 +68,11 @@
|
||||
<result property="createTime" column="create_time" />
|
||||
<result property="updateTime" column="update_time" />
|
||||
<result property="isDel" column="is_del" />
|
||||
<result property="descinfo" column="descinfo" />
|
||||
</resultMap>
|
||||
|
||||
<sql id="selectShopUserVo">
|
||||
select id, user_id, username, password,device_type,device_id, phone, nickname, sex, birthday, addr, register_time, status, vip, online, create_time, update_time, is_del,head_img,vip_end_time,vip_start_time from shop_user
|
||||
select id, user_id, `descinfo`,username, password,device_type,device_id, phone, nickname, sex, birthday, addr, register_time, status, vip, online, create_time, update_time, is_del,head_img,vip_end_time,vip_start_time from shop_user
|
||||
</sql>
|
||||
|
||||
<select id="selectShopUserList" parameterType="ShopUser" resultMap="ShopUserResult">
|
||||
@@ -90,6 +93,8 @@
|
||||
<if test="isDel != null "> and is_del = #{isDel}</if>
|
||||
<if test="vipStartTime != null"> and #{vipStartTime},</if>
|
||||
<if test="vipEndTime != null"> and #{vipEndTime},</if>
|
||||
<if test="descinfo != null"> and #{descinfo},</if>
|
||||
|
||||
</where>
|
||||
</select>
|
||||
|
||||
@@ -130,6 +135,8 @@
|
||||
<if test="createTime != null">create_time,</if>
|
||||
<if test="updateTime != null">update_time,</if>
|
||||
<if test="isDel != null">is_del,</if>
|
||||
<if test="descinfo != null">descinfo,</if>
|
||||
|
||||
</trim>
|
||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||
<if test="userId != null">#{userId},</if>
|
||||
@@ -147,6 +154,7 @@
|
||||
<if test="createTime != null">#{createTime},</if>
|
||||
<if test="updateTime != null">#{updateTime},</if>
|
||||
<if test="isDel != null">#{isDel},</if>
|
||||
<if test="descinfo != null">#{descinfo},</if>
|
||||
</trim>
|
||||
</insert>
|
||||
|
||||
@@ -170,6 +178,7 @@
|
||||
<if test="isDel != null">is_del = #{isDel},</if>
|
||||
<if test="vipStartTime != null"> vip_start_time = #{vipStartTime},</if>
|
||||
<if test="vipEndTime != null"> vip_end_time = #{vipEndTime},</if>
|
||||
<if test="descinfo != null"> vip_end_time = #{descinfo},</if>
|
||||
</trim>
|
||||
where shop_user.user_id = #{userId}
|
||||
</update>
|
||||
|
||||
Reference in New Issue
Block a user