Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
C
chnmuseum-party
Project
Project
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
liqin
chnmuseum-party
Commits
ee0d7ec9
Commit
ee0d7ec9
authored
Mar 31, 2021
by
liqin
💬
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
bug fixed
parent
2511fbdd
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
64 additions
and
45 deletions
+64
-45
ExhibitionBoard.java
...a/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
+4
-0
ChinaMobileRestApiController.java
...um/party/web/controller/ChinaMobileRestApiController.java
+25
-7
ExhibitionBoardController.java
...useum/party/web/controller/ExhibitionBoardController.java
+1
-0
LearningContentController.java
...useum/party/web/controller/LearningContentController.java
+1
-0
TBoxOperationController.java
...nmuseum/party/web/controller/TBoxOperationController.java
+33
-38
No files found.
src/main/java/cn/wisenergy/chnmuseum/party/model/ExhibitionBoard.java
View file @
ee0d7ec9
...
@@ -124,6 +124,10 @@ public class ExhibitionBoard implements Serializable {
...
@@ -124,6 +124,10 @@ public class ExhibitionBoard implements Serializable {
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
String
assetName
;
private
String
assetName
;
@ApiModelProperty
(
"展板视频URL"
)
@TableField
(
exist
=
false
)
private
String
videoUrl
;
@ApiModelProperty
(
"展板视频URL列表"
)
@ApiModelProperty
(
"展板视频URL列表"
)
@TableField
(
exist
=
false
)
@TableField
(
exist
=
false
)
private
List
<
String
>
videoUrlList
;
private
List
<
String
>
videoUrlList
;
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ChinaMobileRestApiController.java
View file @
ee0d7ec9
...
@@ -3,7 +3,6 @@ package cn.wisenergy.chnmuseum.party.web.controller;
...
@@ -3,7 +3,6 @@ package cn.wisenergy.chnmuseum.party.web.controller;
import
cn.wisenergy.chnmuseum.party.auth.SHA256PasswordEncryptionService
;
import
cn.wisenergy.chnmuseum.party.auth.SHA256PasswordEncryptionService
;
import
cn.wisenergy.chnmuseum.party.auth.util.JwtTokenUtil
;
import
cn.wisenergy.chnmuseum.party.auth.util.JwtTokenUtil
;
import
cn.wisenergy.chnmuseum.party.common.enums.LanguageEnum
;
import
cn.wisenergy.chnmuseum.party.common.enums.LanguageEnum
;
import
cn.wisenergy.chnmuseum.party.common.util.DateUtil
;
import
cn.wisenergy.chnmuseum.party.common.util.TimeUtils
;
import
cn.wisenergy.chnmuseum.party.common.util.TimeUtils
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.validator.groups.Add
;
import
cn.wisenergy.chnmuseum.party.common.vo.AudioVo
;
import
cn.wisenergy.chnmuseum.party.common.vo.AudioVo
;
...
@@ -61,9 +60,6 @@ public class ChinaMobileRestApiController extends BaseController {
...
@@ -61,9 +60,6 @@ public class ChinaMobileRestApiController extends BaseController {
@Resource
@Resource
private
StringRedisTemplate
stringRedisTemplate
;
private
StringRedisTemplate
stringRedisTemplate
;
@Resource
private
EmployeeServiceImpl
employeeService
;
@Resource
@Resource
private
TUserServiceImpl
userService
;
private
TUserServiceImpl
userService
;
...
@@ -73,9 +69,6 @@ public class ChinaMobileRestApiController extends BaseController {
...
@@ -73,9 +69,6 @@ public class ChinaMobileRestApiController extends BaseController {
@Resource
@Resource
private
RunLogServiceImpl
runLogService
;
private
RunLogServiceImpl
runLogService
;
@Resource
private
SysLogController
sysLogController
;
@Resource
@Resource
private
TAreaServiceImpl
areaService
;
private
TAreaServiceImpl
areaService
;
...
@@ -121,6 +114,31 @@ public class ChinaMobileRestApiController extends BaseController {
...
@@ -121,6 +114,31 @@ public class ChinaMobileRestApiController extends BaseController {
//用户登录是否被锁定 一小时 redisKey 前缀
//用户登录是否被锁定 一小时 redisKey 前缀
private
static
final
String
SHIRO_IS_LOCK
=
"shiro_is_lock_"
;
private
static
final
String
SHIRO_IS_LOCK
=
"shiro_is_lock_"
;
/**
* 机顶盒激活状态查询
*
* @param
* @return
*/
@ApiOperation
(
value
=
"获取机顶盒密钥"
,
notes
=
"获取机顶盒密钥"
)
@GetMapping
(
"/equitment/key"
)
@RequiresPermissions
(
"equitment:key"
)
public
Map
<
String
,
Object
>
getBoxPrivateKey
(
@RequestParam
(
value
=
"mac"
)
String
mac
)
{
try
{
final
LambdaQueryWrapper
<
TBoxOperation
>
queryWrapper
=
Wrappers
.<
TBoxOperation
>
lambdaQuery
().
eq
(
TBoxOperation:
:
getMac
,
mac
.
trim
().
toUpperCase
());
final
TBoxOperation
tBoxOperation
=
this
.
boxOperationService
.
getOne
(
queryWrapper
);
if
(
tBoxOperation
!=
null
)
{
final
String
organId
=
tBoxOperation
.
getOrganId
();
}
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
}
return
getFailResult
();
}
/**
/**
* 机顶盒激活状态查询
* 机顶盒激活状态查询
*
*
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/ExhibitionBoardController.java
View file @
ee0d7ec9
...
@@ -347,6 +347,7 @@ public class ExhibitionBoardController extends BaseController {
...
@@ -347,6 +347,7 @@ public class ExhibitionBoardController extends BaseController {
final
String
videoUrl
=
asset
.
getVideoUrl
();
final
String
videoUrl
=
asset
.
getVideoUrl
();
final
List
<
VideoVo
>
videoVoList
=
JSONObject
.
parseObject
(
videoUrl
,
new
TypeReference
<
List
<
VideoVo
>>()
{
final
List
<
VideoVo
>
videoVoList
=
JSONObject
.
parseObject
(
videoUrl
,
new
TypeReference
<
List
<
VideoVo
>>()
{
},
Feature
.
OrderedField
);
},
Feature
.
OrderedField
);
exhibitionBoard
.
setVideoUrl
(
videoUrl
);
exhibitionBoard
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
exhibitionBoard
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
}
}
return
getResult
(
exhibitionBoard
);
return
getResult
(
exhibitionBoard
);
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/LearningContentController.java
View file @
ee0d7ec9
...
@@ -357,6 +357,7 @@ public class LearningContentController extends BaseController {
...
@@ -357,6 +357,7 @@ public class LearningContentController extends BaseController {
final
String
videoUrl
=
asset
.
getVideoUrl
();
final
String
videoUrl
=
asset
.
getVideoUrl
();
final
List
<
VideoVo
>
videoVoList
=
JSONObject
.
parseObject
(
videoUrl
,
new
TypeReference
<
List
<
VideoVo
>>()
{
final
List
<
VideoVo
>
videoVoList
=
JSONObject
.
parseObject
(
videoUrl
,
new
TypeReference
<
List
<
VideoVo
>>()
{
},
Feature
.
OrderedField
);
},
Feature
.
OrderedField
);
exhibitionBoard
.
setVideoUrl
(
videoUrl
);
exhibitionBoard
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
exhibitionBoard
.
setVideoUrlList
(
videoVoList
.
stream
().
map
(
VideoVo:
:
getFileUrl
).
collect
(
Collectors
.
toList
()));
}
}
}
}
...
...
src/main/java/cn/wisenergy/chnmuseum/party/web/controller/TBoxOperationController.java
View file @
ee0d7ec9
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
package
cn
.
wisenergy
.
chnmuseum
.
party
.
web
.
controller
;
import
cn.wisenergy.chnmuseum.party.model.TBoxOperation
;
import
cn.wisenergy.chnmuseum.party.model.TUser
;
import
cn.wisenergy.chnmuseum.party.model.TUser
;
import
cn.wisenergy.chnmuseum.party.service.TBoxOperationService
;
import
cn.wisenergy.chnmuseum.party.service.impl.TUserServiceImpl
;
import
cn.wisenergy.chnmuseum.party.service.impl.TUserServiceImpl
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
cn.wisenergy.chnmuseum.party.web.controller.base.BaseController
;
import
cn.wisenergy.chnmuseum.party.model.TBoxOperation
;
import
cn.wisenergy.chnmuseum.party.service.TBoxOperationService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParam
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiImplicitParams
;
import
io.swagger.annotations.ApiOperation
;
import
io.swagger.annotations.ApiOperation
;
import
lombok.extern.slf4j.Slf4j
;
import
lombok.extern.slf4j.Slf4j
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.commons.lang3.StringUtils
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.apache.shiro.authz.annotation.RequiresPermissions
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
import
java.time.LocalDateTime
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -44,7 +40,6 @@ public class TBoxOperationController extends BaseController {
...
@@ -44,7 +40,6 @@ public class TBoxOperationController extends BaseController {
@Resource
@Resource
private
TUserServiceImpl
userService
;
private
TUserServiceImpl
userService
;
@ApiImplicitParams
(
value
=
{
@ApiImplicitParams
(
value
=
{
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_index"
,
value
=
"分页起始偏移量"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
@ApiImplicitParam
(
name
=
"_size"
,
value
=
"返回条数"
,
paramType
=
"query"
,
dataType
=
"Integer"
),
...
@@ -55,7 +50,7 @@ public class TBoxOperationController extends BaseController {
...
@@ -55,7 +50,7 @@ public class TBoxOperationController extends BaseController {
@PostMapping
(
"/selectPageList"
)
@PostMapping
(
"/selectPageList"
)
@RequiresPermissions
(
"/boxOperation/selectPageList"
)
@RequiresPermissions
(
"/boxOperation/selectPageList"
)
@ApiOperation
(
value
=
"获取机顶盒基础信息分页列表"
,
notes
=
"获取机顶盒基础信息分页列表"
)
@ApiOperation
(
value
=
"获取机顶盒基础信息分页列表"
,
notes
=
"获取机顶盒基础信息分页列表"
)
public
Map
<
String
,
Object
>
selectPageList
(
String
organId
,
String
areaId
)
{
public
Map
<
String
,
Object
>
selectPageList
(
String
organId
,
String
areaId
)
{
TUser
user1
=
getcurUser
();
TUser
user1
=
getcurUser
();
TUser
user
=
new
TUser
();
TUser
user
=
new
TUser
();
if
(
StringUtils
.
isNotBlank
(
organId
))
{
if
(
StringUtils
.
isNotBlank
(
organId
))
{
...
@@ -67,9 +62,8 @@ public class TBoxOperationController extends BaseController {
...
@@ -67,9 +62,8 @@ public class TBoxOperationController extends BaseController {
}
}
//设置数据权限
//设置数据权限
user
.
setOrgCode
(
user1
.
getOrgCode
());
user
.
setOrgCode
(
user1
.
getOrgCode
());
Page
<
TBoxOperation
>
page
=
null
;
try
{
try
{
page
=
tBoxOperationService
.
selectBoxPage
(
getPage
(),
user
);
Page
<
TBoxOperation
>
page
=
tBoxOperationService
.
selectBoxPage
(
getPage
(),
user
);
return
getResult
(
page
);
return
getResult
(
page
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -82,10 +76,11 @@ public class TBoxOperationController extends BaseController {
...
@@ -82,10 +76,11 @@ public class TBoxOperationController extends BaseController {
@ApiOperation
(
value
=
"添加机顶盒运维信息"
,
notes
=
"添加机顶盒运维信息"
)
@ApiOperation
(
value
=
"添加机顶盒运维信息"
,
notes
=
"添加机顶盒运维信息"
)
public
Map
<
String
,
Object
>
saveTBoxOperation
(
TBoxOperation
tBoxOperation
)
{
public
Map
<
String
,
Object
>
saveTBoxOperation
(
TBoxOperation
tBoxOperation
)
{
// 保存业务节点信息
// 保存业务节点信息
tBoxOperation
.
setCreateTime
(
LocalDateTime
.
now
());
boolean
result
;
tBoxOperation
.
setUpdateTime
(
LocalDateTime
.
now
());
boolean
result
=
false
;
try
{
try
{
if
(
tBoxOperation
!=
null
&&
StringUtils
.
isNotBlank
(
tBoxOperation
.
getMac
()))
{
tBoxOperation
.
setMac
(
tBoxOperation
.
getMac
().
toUpperCase
());
}
result
=
tBoxOperationService
.
save
(
tBoxOperation
);
result
=
tBoxOperationService
.
save
(
tBoxOperation
);
if
(!
result
)
{
if
(!
result
)
{
return
getFailResult
();
return
getFailResult
();
...
@@ -102,16 +97,17 @@ public class TBoxOperationController extends BaseController {
...
@@ -102,16 +97,17 @@ public class TBoxOperationController extends BaseController {
@RequiresPermissions
(
"/boxOperation/update"
)
@RequiresPermissions
(
"/boxOperation/update"
)
@ApiOperation
(
value
=
"修改机顶盒运维信息信息"
,
notes
=
"修改机顶盒运维信息信息"
)
@ApiOperation
(
value
=
"修改机顶盒运维信息信息"
,
notes
=
"修改机顶盒运维信息信息"
)
public
Map
<
String
,
Object
>
updateTBoxOperation
(
TBoxOperation
tBoxOperation
)
{
public
Map
<
String
,
Object
>
updateTBoxOperation
(
TBoxOperation
tBoxOperation
)
{
try
{
try
{
tBoxOperation
.
setUpdateTime
(
LocalDateTime
.
now
());
if
(
tBoxOperation
!=
null
&&
StringUtils
.
isNotBlank
(
tBoxOperation
.
getMac
()))
{
tBoxOperation
.
setMac
(
tBoxOperation
.
getMac
().
toUpperCase
());
}
boolean
flag
=
tBoxOperationService
.
updateById
(
tBoxOperation
);
boolean
flag
=
tBoxOperationService
.
updateById
(
tBoxOperation
);
UpdateWrapper
<
TUser
>
wrapper
=
new
UpdateWrapper
<>();
UpdateWrapper
<
TUser
>
wrapper
=
new
UpdateWrapper
<>();
wrapper
.
eq
(
"org_id"
,
tBoxOperation
.
getOrganId
());
wrapper
.
eq
(
"org_id"
,
tBoxOperation
.
getOrganId
());
wrapper
.
eq
(
"type"
,
"3"
);
wrapper
.
eq
(
"type"
,
"3"
);
TUser
user
=
userService
.
getOne
(
wrapper
);
TUser
user
=
userService
.
getOne
(
wrapper
);
String
password
=
user
.
getPassword
();
String
password
=
user
.
getPassword
();
if
(
flag
&&
user
!=
null
)
{
if
(
flag
)
{
return
getResult
(
password
);
return
getResult
(
password
);
}
}
return
getFailResult
();
return
getFailResult
();
...
@@ -127,7 +123,7 @@ public class TBoxOperationController extends BaseController {
...
@@ -127,7 +123,7 @@ public class TBoxOperationController extends BaseController {
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"query"
,
dataType
=
"String"
)
@ApiImplicitParam
(
name
=
"id"
,
value
=
"标识ID"
,
paramType
=
"query"
,
dataType
=
"String"
)
})
})
public
Map
<
String
,
Object
>
deleteTBoxOperation
(
String
id
)
{
public
Map
<
String
,
Object
>
deleteTBoxOperation
(
String
id
)
{
boolean
result
=
false
;
boolean
result
;
try
{
try
{
result
=
tBoxOperationService
.
removeById
(
id
);
result
=
tBoxOperationService
.
removeById
(
id
);
if
(!
result
)
{
if
(!
result
)
{
...
@@ -149,7 +145,7 @@ public class TBoxOperationController extends BaseController {
...
@@ -149,7 +145,7 @@ public class TBoxOperationController extends BaseController {
//设置数据权限
//设置数据权限
String
areaId
=
user
.
getAreaId
();
String
areaId
=
user
.
getAreaId
();
try
{
try
{
tBoxOperationList
=
tBoxOperationService
.
getList
(
status
,
getAreaId
(
areaId
));
tBoxOperationList
=
tBoxOperationService
.
getList
(
status
,
getAreaId
(
areaId
));
return
getResult
(
tBoxOperationList
);
return
getResult
(
tBoxOperationList
);
}
catch
(
Exception
e
)
{
}
catch
(
Exception
e
)
{
e
.
printStackTrace
();
e
.
printStackTrace
();
...
@@ -209,11 +205,10 @@ public class TBoxOperationController extends BaseController {
...
@@ -209,11 +205,10 @@ public class TBoxOperationController extends BaseController {
}
}
public
String
getAreaId
(
String
areaId
)
{
public
String
getAreaId
(
String
areaId
){
if
(
"0000"
.
equals
(
areaId
.
substring
(
2
)))
{
if
(
"0000"
.
equals
(
areaId
.
substring
(
2
)))
{
areaId
=
areaId
.
substring
(
0
,
2
);
areaId
=
areaId
.
substring
(
0
,
2
);
}
else
if
(
"00"
.
equals
(
areaId
.
substring
(
4
)))
{
}
else
if
(
"00"
.
equals
(
areaId
.
substring
(
4
)))
{
areaId
=
areaId
.
substring
(
0
,
4
);
areaId
=
areaId
.
substring
(
0
,
4
);
}
}
return
areaId
;
return
areaId
;
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment