修复推流鉴权

This commit is contained in:
648540858
2023-05-23 10:34:00 +08:00
parent 061749548c
commit 807d0524a6
4 changed files with 26 additions and 15 deletions

View File

@@ -13,9 +13,9 @@ import java.util.List;
public interface StreamPushMapper {
@Insert("INSERT INTO wvp_stream_push (app, stream, total_reader_count, origin_type, origin_type_str, " +
"push_time, alive_second, media_server_id, server_id, update_time, create_time, push_ing, self) VALUES" +
"push_time, alive_second, media_server_id, update_time, create_time, push_ing, self) VALUES" +
"(#{app}, #{stream}, #{totalReaderCount}, #{originType}, #{originTypeStr}, " +
"#{pushTime}, #{aliveSecond}, #{mediaServerId} , #{serverId} , #{updateTime} , #{createTime}, " +
"#{pushTime}, #{aliveSecond}, #{mediaServerId} , #{updateTime} , #{createTime}, " +
"#{pushIng}, #{self} )")
int add(StreamPushItem streamPushItem);

View File

@@ -50,11 +50,11 @@ public interface UserMapper {
@ResultMap(value="roleMap")
List<User> selectAll();
@Select("select * from (select user.*, concat(concat(#{call_id}, '_'), push_key) as str1 from wvp_user) as u where md5(u.str1) = #{sign}")
List<User> checkPushAuthorityByCallIdAndSign(String callId, String sign);
@Select("select * from wvp_user where md5(push_key) = #{sign}")
List<User> checkPushAuthorityByCallId(String sign);
// @Select("select * from (select user.*, concat(concat(#{call_id}, '_'), push_key) as str1 from wvp_user) as u where md5(u.str1) = #{sign}")
// List<User> checkPushAuthorityByCallIdAndSign(String callId, String sign);
//
// @Select("select * from wvp_user where md5(push_key) = #{sign}")
// List<User> checkPushAuthorityByCallId(String sign);
@Select("select u.id, u.username,u.push_key,u.role_id, r.id as role_id, r.name as role_name, r.authority as role_authority , r.create_time as role_create_time , r.update_time as role_update_time from wvp_user u join wvp_user_role r on u.role_id=r.id")
@ResultMap(value="roleMap")