Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
S
szpt
Project overview
Project overview
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
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
以墨为白
szpt
Commits
0e76d24b
Commit
0e76d24b
authored
Jan 16, 2025
by
以墨为白
🎧
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
分组校验
parent
189f62d7
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
23 additions
and
17 deletions
+23
-17
src/main/java/com/zksy/szpt/controller/AppStoreController.java
...ain/java/com/zksy/szpt/controller/AppStoreController.java
+4
-4
src/main/java/com/zksy/szpt/domain/ValidationGroups.java
src/main/java/com/zksy/szpt/domain/ValidationGroups.java
+13
-0
src/main/java/com/zksy/szpt/domain/dto/AppStoreDTO.java
src/main/java/com/zksy/szpt/domain/dto/AppStoreDTO.java
+6
-13
No files found.
src/main/java/com/zksy/szpt/controller/AppStoreController.java
View file @
0e76d24b
package
com
.
zksy
.
szpt
.
controller
;
import
com.zksy.szpt.domain.ValidationGroups
;
import
com.zksy.szpt.domain.dto.AppStoreDTO
;
import
com.zksy.szpt.service.AppStoreService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.validation.annotation.Validated
;
import
org.springframework.web.bind.annotation.PostMapping
;
import
org.springframework.web.bind.annotation.RequestBody
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
javax.validation.Valid
;
@Api
(
tags
=
"appKey管理"
)
@RequestMapping
(
"/rest/appStore"
)
@RestController
...
...
@@ -29,13 +29,13 @@ public class AppStoreController {
@ApiOperation
(
value
=
"新增appKey"
,
notes
=
"新增appKey"
)
@PostMapping
(
"/insertAppStore"
)
public
Integer
insertAppStore
(
@RequestBody
@Valid
AppStoreDTO
appStoreDTO
)
{
public
Integer
insertAppStore
(
@RequestBody
@Valid
ated
({
ValidationGroups
.
Create
.
class
})
AppStoreDTO
appStoreDTO
)
{
return
appStoreService
.
insertAppStore
(
appStoreDTO
);
}
@ApiOperation
(
value
=
"更新appKey"
,
notes
=
"更新appKey"
)
@PostMapping
(
"/updateAppIdSecret"
)
public
Integer
updateAppStore
(
@RequestBody
@Valid
AppStoreDTO
appStoreDTO
)
{
public
Integer
updateAppStore
(
@RequestBody
@Valid
ated
({
ValidationGroups
.
Update
.
class
})
AppStoreDTO
appStoreDTO
)
{
return
appStoreService
.
updateAppStore
(
appStoreDTO
);
}
}
src/main/java/com/zksy/szpt/domain/ValidationGroups.java
0 → 100644
View file @
0e76d24b
package
com
.
zksy
.
szpt
.
domain
;
public
interface
ValidationGroups
{
interface
Create
{
}
interface
Update
{
}
interface
Query
{
}
}
src/main/java/com/zksy/szpt/domain/dto/AppStoreDTO.java
View file @
0e76d24b
package
com
.
zksy
.
szpt
.
domain
.
dto
;
import
com.zksy.szpt.domain.ValidationGroups
;
import
io.swagger.annotations.ApiModel
;
import
io.swagger.annotations.ApiModelProperty
;
...
...
@@ -8,16 +9,15 @@ import javax.validation.constraints.NotBlank;
@ApiModel
(
value
=
"AppStoreDTO"
,
description
=
"应用商店信息"
)
public
class
AppStoreDTO
{
private
Long
id
;
@ApiModelProperty
(
value
=
"应用Key"
,
required
=
true
)
@NotBlank
@NotBlank
(
groups
=
{
ValidationGroups
.
Update
.
class
},
message
=
"应用Key不能为空"
)
private
String
appKey
;
@NotBlank
@NotBlank
(
message
=
"密钥不能为空"
)
@ApiModelProperty
(
value
=
"密钥"
,
required
=
true
)
private
String
appSecret
;
@ApiModelProperty
(
value
=
"单位"
,
required
=
tru
e
)
@ApiModelProperty
(
value
=
"单位"
,
required
=
fals
e
)
private
String
deptCode
;
public
String
getDeptCode
()
{
...
...
@@ -28,13 +28,6 @@ public class AppStoreDTO {
this
.
deptCode
=
deptCode
;
}
public
Long
getId
()
{
return
id
;
}
public
void
setId
(
Long
id
)
{
this
.
id
=
id
;
}
public
String
getAppKey
()
{
return
appKey
;
...
...
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