style(代码优化): userId由Long类型改为String类型
This commit is contained in:
parent
c31053087a
commit
6bc4b2dd94
@ -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