兼容mysql5低版本
parent
1dbb559b38
commit
5c2d27f75d
|
@ -397,13 +397,13 @@ LOCK TABLES `platform_gb_stream` WRITE;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Table structure for table `role`
|
-- Table structure for table `user_role`
|
||||||
--
|
--
|
||||||
|
|
||||||
DROP TABLE IF EXISTS `role`;
|
DROP TABLE IF EXISTS `user_role`;
|
||||||
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
/*!40101 SET @saved_cs_client = @@character_set_client */;
|
||||||
/*!50503 SET character_set_client = utf8mb4 */;
|
/*!50503 SET character_set_client = utf8mb4 */;
|
||||||
CREATE TABLE `role` (
|
CREATE TABLE `user_role` (
|
||||||
`id` int(11) NOT NULL AUTO_INCREMENT,
|
`id` int(11) NOT NULL AUTO_INCREMENT,
|
||||||
`name` varchar(50) NOT NULL,
|
`name` varchar(50) NOT NULL,
|
||||||
`authority` varchar(50) NOT NULL,
|
`authority` varchar(50) NOT NULL,
|
||||||
|
@ -414,13 +414,13 @@ CREATE TABLE `role` (
|
||||||
/*!40101 SET character_set_client = @saved_cs_client */;
|
/*!40101 SET character_set_client = @saved_cs_client */;
|
||||||
|
|
||||||
--
|
--
|
||||||
-- Dumping data for table `role`
|
-- Dumping data for table `user_role`
|
||||||
--
|
--
|
||||||
|
|
||||||
LOCK TABLES `role` WRITE;
|
LOCK TABLES `user_role` WRITE;
|
||||||
/*!40000 ALTER TABLE `role` DISABLE KEYS */;
|
/*!40000 ALTER TABLE `user_role` DISABLE KEYS */;
|
||||||
INSERT INTO `role` VALUES (1,'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57');
|
INSERT INTO `user_role` VALUES (1,'admin','0','2021-04-13 14:14:57','2021-04-13 14:14:57');
|
||||||
/*!40000 ALTER TABLE `role` ENABLE KEYS */;
|
/*!40000 ALTER TABLE `user_role` ENABLE KEYS */;
|
||||||
UNLOCK TABLES;
|
UNLOCK TABLES;
|
||||||
|
|
||||||
--
|
--
|
||||||
|
|
|
@ -27,7 +27,7 @@ public interface UserMapper {
|
||||||
@Delete("DELETE FROM user WHERE id != 1 and id=#{id}")
|
@Delete("DELETE FROM user WHERE id != 1 and id=#{id}")
|
||||||
int delete(int id);
|
int delete(int id);
|
||||||
|
|
||||||
@Select("select user.*, role.id roleID, role.name roleName, role.authority roleAuthority , role.createTime roleCreateTime , role.updateTime roleUpdateTime FROM user, role WHERE user.roleId=role.id and user.username=#{username} AND user.password=#{password}")
|
@Select("select u.*, r.id as roleID, r.name as roleName, r.authority as roleAuthority , r.createTime as roleCreateTime , r.updateTime as roleUpdateTime FROM user u, user_role r WHERE u.roleId=r.id and u.username=#{username} AND u.password=#{password}")
|
||||||
@Results(id = "roleMap", value = {
|
@Results(id = "roleMap", value = {
|
||||||
@Result(column = "roleID", property = "role.id"),
|
@Result(column = "roleID", property = "role.id"),
|
||||||
@Result(column = "roleName", property = "role.name"),
|
@Result(column = "roleName", property = "role.name"),
|
||||||
|
@ -37,15 +37,15 @@ public interface UserMapper {
|
||||||
})
|
})
|
||||||
User select(String username, String password);
|
User select(String username, String password);
|
||||||
|
|
||||||
@Select("select user.*, role.id roleID, role.name roleName, role.authority roleAuthority, role.createTime roleCreateTime , role.updateTime roleUpdateTime FROM user, role WHERE user.roleId=role.id and user.id=#{id}")
|
@Select("select u.*, r.id as roleID, r.name as roleName, r.authority as roleAuthority , r.createTime as roleCreateTime , r.updateTime as roleUpdateTime FROM user u, user_role r WHERE u.roleId=r.id and u.id=#{id}")
|
||||||
@ResultMap(value="roleMap")
|
@ResultMap(value="roleMap")
|
||||||
User selectById(int id);
|
User selectById(int id);
|
||||||
|
|
||||||
@Select("select user.*, role.id roleID, role.name roleName, role.authority roleAuthority, role.createTime roleCreateTime , role.updateTime roleUpdateTime FROM user, role WHERE user.roleId=role.id and username=#{username}")
|
@Select("select u.*, r.id as roleID, r.name as roleName, r.authority as roleAuthority , r.createTime as roleCreateTime , r.updateTime as roleUpdateTime FROM user u, user_role r WHERE u.roleId=r.id and u.username=#{username}")
|
||||||
@ResultMap(value="roleMap")
|
@ResultMap(value="roleMap")
|
||||||
User getUserByUsername(String username);
|
User getUserByUsername(String username);
|
||||||
|
|
||||||
@Select("select user.*, role.id roleID, role.name roleName, role.authority roleAuthority, role.createTime roleCreateTime , role.updateTime roleUpdateTime FROM user, role WHERE user.roleId=role.id")
|
@Select("select u.*, r.id as roleID, r.name as roleName, r.authority as roleAuthority , r.createTime as roleCreateTime , r.updateTime as roleUpdateTime FROM user u, user_role r WHERE u.roleId=r.id")
|
||||||
@ResultMap(value="roleMap")
|
@ResultMap(value="roleMap")
|
||||||
List<User> selectAll();
|
List<User> selectAll();
|
||||||
}
|
}
|
||||||
|
|
|
@ -123,7 +123,7 @@ public class StreamPushController {
|
||||||
// 录像查询以channelId作为deviceId查询
|
// 录像查询以channelId作为deviceId查询
|
||||||
String key = DeferredResultHolder.UPLOAD_FILE_CHANNEL;
|
String key = DeferredResultHolder.UPLOAD_FILE_CHANNEL;
|
||||||
String uuid = UUID.randomUUID().toString();
|
String uuid = UUID.randomUUID().toString();
|
||||||
logger.warn("通道导入文件类型: {}",file.getContentType() );
|
logger.info("通道导入文件类型: {}",file.getContentType() );
|
||||||
if (file.isEmpty()) {
|
if (file.isEmpty()) {
|
||||||
logger.warn("通道导入文件为空");
|
logger.warn("通道导入文件为空");
|
||||||
WVPResult<Object> wvpResult = new WVPResult<>();
|
WVPResult<Object> wvpResult = new WVPResult<>();
|
||||||
|
|
Loading…
Reference in New Issue