Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
G
gk
Project
Project
Details
Activity
Releases
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
micro_app
gk
Commits
36fe2b51
Commit
36fe2b51
authored
Jul 29, 2025
by
Administrator
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
反馈分类存在提示
parent
7fd6e933
Show whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
15 additions
and
4 deletions
+15
-4
FeedbackCategoryMapper.java
.../jadp/plugins/cmpt/dao/mapper/FeedbackCategoryMapper.java
+3
-0
FeedbackCategoryMapper.xml
...e/jadp/plugins/cmpt/dao/mapper/FeedbackCategoryMapper.xml
+4
-0
FeedbackCategoryService.java
...ge/jadp/plugins/cmpt/service/FeedbackCategoryService.java
+7
-2
FeedbackCategoryController.java
...dge/jadp/plugins/cmpt/web/FeedbackCategoryController.java
+1
-2
No files found.
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/FeedbackCategoryMapper.java
View file @
36fe2b51
...
@@ -2,6 +2,7 @@ package com.dlbridge.jadp.plugins.cmpt.dao.mapper;
...
@@ -2,6 +2,7 @@ package com.dlbridge.jadp.plugins.cmpt.dao.mapper;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.FeedbackCategory
;
import
com.dlbridge.jadp.plugins.cmpt.dao.model.FeedbackCategory
;
import
com.dlbridge.jadp.plugins.cmpt.dto.FeedbackCategoryQueryDTO
;
import
com.dlbridge.jadp.plugins.cmpt.dto.FeedbackCategoryQueryDTO
;
import
org.apache.ibatis.annotations.Param
;
import
java.util.List
;
import
java.util.List
;
...
@@ -10,6 +11,8 @@ public interface FeedbackCategoryMapper {
...
@@ -10,6 +11,8 @@ public interface FeedbackCategoryMapper {
int
update
(
FeedbackCategory
category
);
int
update
(
FeedbackCategory
category
);
int
delete
(
Integer
id
);
int
delete
(
Integer
id
);
FeedbackCategory
selectById
(
Integer
id
);
FeedbackCategory
selectById
(
Integer
id
);
FeedbackCategory
selectByName
(
@Param
(
"cmptId"
)
Integer
cmptId
,
@Param
(
"name"
)
String
name
);
List
<
FeedbackCategory
>
selectByPage
(
FeedbackCategoryQueryDTO
queryDTO
);
List
<
FeedbackCategory
>
selectByPage
(
FeedbackCategoryQueryDTO
queryDTO
);
int
selectCount
(
FeedbackCategoryQueryDTO
queryDTO
);
int
selectCount
(
FeedbackCategoryQueryDTO
queryDTO
);
}
}
src/main/java/com/dlbridge/jadp/plugins/cmpt/dao/mapper/FeedbackCategoryMapper.xml
View file @
36fe2b51
...
@@ -38,6 +38,10 @@
...
@@ -38,6 +38,10 @@
SELECT * FROM feedback_category WHERE id = #{id}
SELECT * FROM feedback_category WHERE id = #{id}
</select>
</select>
<select
id=
"selectByName"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.FeedbackCategory"
>
SELECT * FROM feedback_category WHERE del_flag = 0 and cmpt_id = #{cmptId} and name = #{name}
</select>
<select
id=
"selectByPage"
parameterType=
"com.dlbridge.jadp.plugins.cmpt.dto.FeedbackCategoryQueryDTO"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.FeedbackCategory"
>
<select
id=
"selectByPage"
parameterType=
"com.dlbridge.jadp.plugins.cmpt.dto.FeedbackCategoryQueryDTO"
resultType=
"com.dlbridge.jadp.plugins.cmpt.dao.model.FeedbackCategory"
>
SELECT * FROM feedback_category
SELECT * FROM feedback_category
<where>
<where>
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/service/FeedbackCategoryService.java
View file @
36fe2b51
...
@@ -4,6 +4,7 @@ import com.dlbridge.jadp.plugins.cmpt.dao.model.FeedbackCategory;
...
@@ -4,6 +4,7 @@ import com.dlbridge.jadp.plugins.cmpt.dao.model.FeedbackCategory;
import
com.dlbridge.jadp.plugins.cmpt.dto.FeedbackCategoryQueryDTO
;
import
com.dlbridge.jadp.plugins.cmpt.dto.FeedbackCategoryQueryDTO
;
import
com.dlbridge.jadp.plugins.cmpt.utils.Page
;
import
com.dlbridge.jadp.plugins.cmpt.utils.Page
;
import
com.github.pagehelper.PageHelper
;
import
com.github.pagehelper.PageHelper
;
import
com.neusoft.www.utils.web.Result
;
import
org.springframework.stereotype.Service
;
import
org.springframework.stereotype.Service
;
import
javax.annotation.Resource
;
import
javax.annotation.Resource
;
...
@@ -14,9 +15,13 @@ public class FeedbackCategoryService {
...
@@ -14,9 +15,13 @@ public class FeedbackCategoryService {
@Resource
@Resource
private
FeedbackCategoryMapper
feedbackCategoryMapper
;
private
FeedbackCategoryMapper
feedbackCategoryMapper
;
public
FeedbackCategory
createCategory
(
FeedbackCategory
category
)
{
public
Result
<
FeedbackCategory
>
createCategory
(
FeedbackCategory
category
)
{
FeedbackCategory
cat
=
feedbackCategoryMapper
.
selectByName
(
category
.
getCmptId
(),
category
.
getName
());
if
(
cat
!=
null
){
return
Result
.
fail
().
setMsg
(
"反馈分类名称已存在"
);
}
feedbackCategoryMapper
.
insert
(
category
);
feedbackCategoryMapper
.
insert
(
category
);
return
category
;
return
Result
.
success
().
setContent
(
category
)
;
}
}
public
FeedbackCategory
getCategory
(
Integer
id
)
{
public
FeedbackCategory
getCategory
(
Integer
id
)
{
...
...
src/main/java/com/dlbridge/jadp/plugins/cmpt/web/FeedbackCategoryController.java
View file @
36fe2b51
...
@@ -23,8 +23,7 @@ public class FeedbackCategoryController {
...
@@ -23,8 +23,7 @@ public class FeedbackCategoryController {
@PostMapping
@PostMapping
@ApiOperation
(
value
=
"创建反馈分类"
,
notes
=
"创建新的反馈分类"
)
@ApiOperation
(
value
=
"创建反馈分类"
,
notes
=
"创建新的反馈分类"
)
public
Result
<
FeedbackCategory
>
createCategory
(
@RequestBody
FeedbackCategory
category
)
{
public
Result
<
FeedbackCategory
>
createCategory
(
@RequestBody
FeedbackCategory
category
)
{
FeedbackCategory
result
=
feedbackCategoryService
.
createCategory
(
category
);
return
feedbackCategoryService
.
createCategory
(
category
);
return
Result
.
success
().
setContent
(
result
);
}
}
@GetMapping
(
"/{id}"
)
@GetMapping
(
"/{id}"
)
...
...
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