Commit 5b84472b authored by wdy's avatar wdy

Merge branch 'dev' into 'master'

dev - master 34

See merge request !391
parents 46e23921 c2ae76e3
......@@ -40,6 +40,10 @@ public class UserPhotoStorage
@ApiModelProperty("用户账号")
private String username;
/** 图片名称 */
@ApiModelProperty("图片名称")
private String name;
/** 图片路径 */
@ApiModelProperty("图片路径")
private String path;
......
......@@ -88,6 +88,7 @@ public class UserPhotoStorageServiceImpl extends ServiceImpl<UserPhotoStorageMap
UserPhotoStorage userPhotoStorage = UserPhotoStorage.builder()
.userId(loginUser.getUserId())
.username(loginUser.getUsername())
.name(request.getName())
.path(request.getPath())
.createTime(DateUtils.getNowDate())
.build();
......
......@@ -21,4 +21,7 @@ public class UserPhotoStorageCreateRequest {
@NotNull(message = "图片路径不能为空")
private String path;
@ApiModelProperty("图片名称")
private String name;
}
......@@ -8,13 +8,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<result property="id" column="id" />
<result property="userId" column="user_id" />
<result property="username" column="username" />
<result property="name" column="name" />
<result property="path" column="path" />
<result property="createTime" column="create_time" />
<result property="deleted" column="deleted" />
</resultMap>
<sql id="selectUserPhotoStorageVo">
select id, user_id, username, path, create_time, deleted from t_user_photo_storage
select id, user_id, username, name, path, create_time, deleted from t_user_photo_storage
</sql>
<select id="selectUserPhotoStorageList" parameterType="com.ruoyi.domain.UserPhotoStorage" resultMap="UserPhotoStorageResult">
......@@ -32,6 +33,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">id,</if>
<if test="userId != null">user_id,</if>
<if test="username != null">username,</if>
<if test="name != null">name,</if>
<if test="path != null">path,</if>
<if test="createTime != null">create_time,</if>
<if test="deleted != null">deleted,</if>
......@@ -40,6 +42,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="id != null">#{id},</if>
<if test="userId != null">#{userId},</if>
<if test="username != null">#{username},</if>
<if test="name != null">#{name},</if>
<if test="path != null">#{path},</if>
<if test="createTime != null">#{createTime},</if>
<if test="deleted != null">#{deleted},</if>
......@@ -51,6 +54,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<trim prefix="SET" suffixOverrides=",">
<if test="userId != null">user_id = #{userId},</if>
<if test="username != null">username = #{username},</if>
<if test="name != null">name = #{name},</if>
<if test="path != null">path = #{path},</if>
<if test="createTime != null">create_time = #{createTime},</if>
<if test="deleted != null">deleted = #{deleted},</if>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment