Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Menu
Open sidebar
邬吉朋
relation
Commits
f3d7a839
Commit
f3d7a839
authored
Aug 10, 2025
by
wujipeng
Browse files
优化
parent
47a35197
Changes
2
Show whitespace changes
Inline
Side-by-side
src/main/java/com/platform/controller/CaseRuleConfigController.java
View file @
f3d7a839
...
...
@@ -3,6 +3,7 @@ package com.platform.controller;
import
com.platform.model.entity.CaseRuleConfigEntity
;
import
com.platform.model.resp.Result
;
import
com.platform.service.CaseRuleConfigService
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.*
;
import
javax.annotation.Resource
;
...
...
@@ -16,7 +17,12 @@ public class CaseRuleConfigController extends BaseController {
@PostMapping
(
"/saveOrUpdate"
)
public
Result
saveOrUpdate
(
@RequestBody
CaseRuleConfigEntity
caseRuleConfigEntity
)
{
return
toAjax
(
caseRuleConfigService
.
saveOrUpdate
(
caseRuleConfigEntity
));
if
(
ObjectUtils
.
isEmpty
(
caseRuleConfigEntity
.
getId
())){
return
toAjax
(
caseRuleConfigService
.
save
(
caseRuleConfigEntity
));
}
else
{
caseRuleConfigService
.
removeById
(
caseRuleConfigEntity
.
getId
());
return
toAjax
(
caseRuleConfigService
.
save
(
caseRuleConfigEntity
));
}
}
@GetMapping
(
"/data/{caseId}"
)
...
...
src/main/java/com/platform/model/entity/CaseRuleConfigEntity.java
View file @
f3d7a839
...
...
@@ -3,6 +3,7 @@ package com.platform.model.entity;
import
com.baomidou.mybatisplus.annotation.IdType
;
import
com.baomidou.mybatisplus.annotation.TableId
;
import
com.baomidou.mybatisplus.annotation.TableName
;
import
com.fasterxml.jackson.annotation.JsonFormat
;
import
lombok.Data
;
import
java.util.Date
;
...
...
@@ -26,8 +27,10 @@ public class CaseRuleConfigEntity {
private
Integer
maxTransaction
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
startTime
;
@JsonFormat
(
pattern
=
"yyyy-MM-dd HH:mm:ss"
,
timezone
=
"GMT+8"
)
private
Date
endTime
;
private
Integer
principal
;
...
...
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