commit
f2b68eb6ea
@ -28,7 +28,7 @@ public class OperationLogBean {
|
|||||||
/**
|
/**
|
||||||
* 用户id
|
* 用户id
|
||||||
*/
|
*/
|
||||||
@Column(columnDefinition="bigint(20) comment '用户id'")
|
@Column(columnDefinition="varchar(20) comment '用户id'")
|
||||||
private String userId;
|
private String userId;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
|
@ -16,6 +16,6 @@ public class UserRole {
|
|||||||
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
@GeneratedValue(strategy = GenerationType.IDENTITY)
|
||||||
@TableId(type = IdType.AUTO)
|
@TableId(type = IdType.AUTO)
|
||||||
private Long userRoleId;
|
private Long userRoleId;
|
||||||
private Long userId;
|
private String userId;
|
||||||
private Long roleId;
|
private Long roleId;
|
||||||
}
|
}
|
||||||
|
@ -10,7 +10,7 @@ import java.util.List;
|
|||||||
public interface UserMapper extends BaseMapper<UserBean> {
|
public interface UserMapper extends BaseMapper<UserBean> {
|
||||||
int insertUser(UserBean userBean);
|
int insertUser(UserBean userBean);
|
||||||
|
|
||||||
int insertUserRole(String userId, long roleId);
|
int insertUserRole(@Param("userId") String userId, @Param("roleId") long roleId);
|
||||||
|
|
||||||
List<Role> selectRoleListByUserId(@Param("userId") String userId);
|
List<Role> selectRoleListByUserId(@Param("userId") String userId);
|
||||||
|
|
||||||
|
@ -11,9 +11,9 @@
|
|||||||
VALUES (#{userId}, #{username},#{salt}, #{password}, #{telephone}, #{sex}, #{imageUrl}, #{registerTime}, 1);
|
VALUES (#{userId}, #{username},#{salt}, #{password}, #{telephone}, #{sex}, #{imageUrl}, #{registerTime}, 1);
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<insert id="insertUserRole" parameterType="Long">
|
<insert id="insertUserRole">
|
||||||
INSERT INTO user_role (userId, roleId)
|
INSERT INTO user_role (userId, roleId)
|
||||||
VALUES (#{param1}, #{param2});
|
VALUES (#{userId}, #{roleId});
|
||||||
</insert>
|
</insert>
|
||||||
|
|
||||||
<select id="selectRoleListByUserId" resultType="com.qiwenshare.file.domain.user.Role">
|
<select id="selectRoleListByUserId" resultType="com.qiwenshare.file.domain.user.Role">
|
||||||
|
Loading…
Reference in New Issue
Block a user