用户表增加推流鉴权KEY
parent
d7c293c867
commit
fcd79b9864
|
@ -513,6 +513,7 @@ CREATE TABLE `user` (
|
||||||
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
`username` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
`password` varchar(255) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
`roleId` int NOT NULL,
|
`roleId` int NOT NULL,
|
||||||
|
`pushKey` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci default null,
|
||||||
`createTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
`createTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
`updateTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
`updateTime` varchar(50) CHARACTER SET utf8mb4 COLLATE utf8mb4_general_ci NOT NULL,
|
||||||
PRIMARY KEY (`id`) USING BTREE,
|
PRIMARY KEY (`id`) USING BTREE,
|
||||||
|
|
|
@ -57,4 +57,8 @@ alter table stream_push
|
||||||
change createStamp createTime varchar(50) default null;
|
change createStamp createTime varchar(50) default null;
|
||||||
|
|
||||||
|
|
||||||
|
alter table user
|
||||||
|
add pushKey varchar(50) default null;
|
||||||
|
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -10,13 +10,14 @@ import java.util.List;
|
||||||
@Repository
|
@Repository
|
||||||
public interface UserMapper {
|
public interface UserMapper {
|
||||||
|
|
||||||
@Insert("INSERT INTO user (username, password, roleId, createTime, updateTime) VALUES" +
|
@Insert("INSERT INTO user (username, password, roleId, pushKey, createTime, updateTime) VALUES" +
|
||||||
"('${username}', '${password}', '${role.id}', '${createTime}', '${updateTime}')")
|
"('${username}', '${password}', '${role.id}', '${pushKey}', '${createTime}', '${updateTime}')")
|
||||||
int add(User user);
|
int add(User user);
|
||||||
|
|
||||||
@Update(value = {" <script>" +
|
@Update(value = {" <script>" +
|
||||||
"UPDATE user " +
|
"UPDATE user " +
|
||||||
"SET updateTime='${updateTime}' " +
|
"SET updateTime='${updateTime}' " +
|
||||||
|
"<if test=\"pushKey != null\">, pushKey='${pushKey}'</if>" +
|
||||||
"<if test=\"role != null\">, roleId='${role.id}'</if>" +
|
"<if test=\"role != null\">, roleId='${role.id}'</if>" +
|
||||||
"<if test=\"password != null\">, password='${password}'</if>" +
|
"<if test=\"password != null\">, password='${password}'</if>" +
|
||||||
"<if test=\"username != null\">, username='${username}'</if>" +
|
"<if test=\"username != null\">, username='${username}'</if>" +
|
||||||
|
|
|
@ -7,6 +7,7 @@ public class User {
|
||||||
private String password;
|
private String password;
|
||||||
private String createTime;
|
private String createTime;
|
||||||
private String updateTime;
|
private String updateTime;
|
||||||
|
private String pushKey;
|
||||||
private Role role;
|
private Role role;
|
||||||
|
|
||||||
public int getId() {
|
public int getId() {
|
||||||
|
@ -56,4 +57,12 @@ public class User {
|
||||||
public void setRole(Role role) {
|
public void setRole(Role role) {
|
||||||
this.role = role;
|
this.role = role;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public String getPushKey() {
|
||||||
|
return pushKey;
|
||||||
|
}
|
||||||
|
|
||||||
|
public void setPushKey(String pushKey) {
|
||||||
|
this.pushKey = pushKey;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue