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
3461eec3
Commit
3461eec3
authored
Apr 23, 2021
by
jiawei
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
提交修改 mac 地址格式校验
parent
13a3dcb0
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletion
+6
-1
TBoxOperation.java
src/main/java/cn/chnmuseum/party/model/TBoxOperation.java
+2
-0
TBoxOperationController.java
...nmuseum/party/web/controller/TBoxOperationController.java
+4
-1
No files found.
src/main/java/cn/chnmuseum/party/model/TBoxOperation.java
View file @
3461eec3
...
...
@@ -9,6 +9,7 @@ import lombok.*;
import
lombok.experimental.Accessors
;
import
javax.validation.constraints.NotNull
;
import
javax.validation.constraints.Pattern
;
import
java.io.Serializable
;
import
java.time.LocalDate
;
import
java.time.LocalDateTime
;
...
...
@@ -42,6 +43,7 @@ public class TBoxOperation implements Serializable {
private
String
organId
;
@ApiModelProperty
(
"mac地址"
)
@Pattern
(
regexp
=
"^([0-9A-Fa-f]{2}[:]){5}([0-9A-Fa-f]{2})$"
,
message
=
"mac地址不正确"
,
groups
=
Update
.
class
)
@TableField
(
value
=
"mac"
,
updateStrategy
=
FieldStrategy
.
IGNORED
)
private
String
mac
;
...
...
src/main/java/cn/chnmuseum/party/web/controller/TBoxOperationController.java
View file @
3461eec3
...
...
@@ -4,6 +4,7 @@ import cn.chnmuseum.party.common.log.MethodLog;
import
cn.chnmuseum.party.common.log.OperModule
;
import
cn.chnmuseum.party.common.log.OperType
;
import
cn.chnmuseum.party.common.util.RSAUtils
;
import
cn.chnmuseum.party.common.validator.groups.Update
;
import
cn.chnmuseum.party.model.TBoxOperation
;
import
cn.chnmuseum.party.model.TUser
;
import
cn.chnmuseum.party.service.TBoxOperationService
;
...
...
@@ -20,6 +21,7 @@ import org.apache.commons.lang3.StringUtils;
import
org.apache.shiro.authz.annotation.RequiresAuthentication
;
import
org.springframework.data.redis.core.StringRedisTemplate
;
import
org.springframework.data.redis.core.ValueOperations
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
...
...
@@ -37,6 +39,7 @@ import java.util.*;
@RestController
@RequestMapping
(
"/boxOperation"
)
@Api
(
tags
=
{
"机顶盒运维信息操作接口"
})
@Validated
public
class
TBoxOperationController
extends
BaseController
{
@Resource
...
...
@@ -117,7 +120,7 @@ public class TBoxOperationController extends BaseController {
@RequiresAuthentication
//@RequiresPermissions("/boxOperation/update")
@ApiOperation
(
value
=
"修改机顶盒运维信息"
,
notes
=
"修改机顶盒运维信息"
)
@MethodLog
(
operModule
=
OperModule
.
STBOPERATION
,
operType
=
OperType
.
ACTIVATION
)
public
Map
<
String
,
Object
>
updateTBoxOperation
(
TBoxOperation
tBoxOperation
)
{
public
Map
<
String
,
Object
>
updateTBoxOperation
(
@Validated
(
value
=
Update
.
class
)
TBoxOperation
tBoxOperation
)
{
Map
<
String
,
Object
>
resultMap
=
new
LinkedHashMap
<
String
,
Object
>();
try
{
if
(
tBoxOperation
!=
null
&&
StringUtils
.
isNotBlank
(
tBoxOperation
.
getMac
()))
{
...
...
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