Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
E
easy-affair-show
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
赵啸非
easy-affair-show
Commits
fa057b85
Commit
fa057b85
authored
Jun 17, 2022
by
廖旭伟
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
修改素材分组bug
parent
bd9d0c0d
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
20 additions
and
9 deletions
+20
-9
eas-manager/src/main/java/com/mortals/xhx/module/picture/web/PictureGroupController.java
...ortals/xhx/module/picture/web/PictureGroupController.java
+20
-9
No files found.
eas-manager/src/main/java/com/mortals/xhx/module/picture/web/PictureGroupController.java
View file @
fa057b85
...
@@ -6,6 +6,7 @@ import com.mortals.framework.exception.AppException;
...
@@ -6,6 +6,7 @@ import com.mortals.framework.exception.AppException;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.Context
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.PageInfo
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.model.Result
;
import
com.mortals.framework.util.DataUtil
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.framework.web.BaseCRUDJsonBodyMappingController
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
com.mortals.xhx.base.system.param.model.ParamEntity
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
import
com.mortals.xhx.base.system.param.service.ParamService
;
...
@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestBody;
...
@@ -21,6 +22,7 @@ import org.springframework.web.bind.annotation.RequestBody;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.RestController
;
import
java.util.Comparator
;
import
java.util.HashMap
;
import
java.util.HashMap
;
import
java.util.List
;
import
java.util.List
;
import
java.util.Map
;
import
java.util.Map
;
...
@@ -41,16 +43,25 @@ public class PictureGroupController extends BaseCRUDJsonBodyMappingController<Pa
...
@@ -41,16 +43,25 @@ public class PictureGroupController extends BaseCRUDJsonBodyMappingController<Pa
if
(
StringUtils
.
isEmpty
(
entity
.
getPictureGroupName
())){
if
(
StringUtils
.
isEmpty
(
entity
.
getPictureGroupName
())){
throw
new
AppException
(
"分组名称不能为空"
);
throw
new
AppException
(
"分组名称不能为空"
);
}
}
ParamEntity
query
=
new
ParamEntity
();
if
(
entity
.
getId
()==
null
){
query
.
setFirstOrganize
(
"PictureMaterial"
);
ParamEntity
query
=
new
ParamEntity
();
query
.
setSecondOrganize
(
"pictureGroupId"
);
query
.
setFirstOrganize
(
"PictureMaterial"
);
List
<
ParamEntity
>
paramEntities
=
this
.
service
.
find
(
query
);
query
.
setSecondOrganize
(
"pictureGroupId"
);
int
size
=
(
paramEntities
==
null
?
0
:
paramEntities
.
size
())
+
1
;
List
<
ParamEntity
>
paramEntities
=
this
.
service
.
find
(
query
);
entity
.
setParamKey
(
size
+
""
);
int
max
=
0
;
entity
.
setName
(
"素材分组"
);
if
(
paramEntities
.
isEmpty
()){
max
=
1
;
}
else
{
ParamEntity
maxEntity
=
paramEntities
.
stream
().
max
(
Comparator
.
comparing
(
ParamEntity:
:
getParamKey
)).
get
();
max
=
DataUtil
.
converStr2Int
(
maxEntity
.
getParamKey
(),
paramEntities
.
size
())+
1
;
}
entity
.
setParamKey
(
max
+
""
);
entity
.
setName
(
"素材分组"
);
entity
.
setFirstOrganize
(
"PictureMaterial"
);
entity
.
setSecondOrganize
(
"pictureGroupId"
);
}
entity
.
setParamValue
(
entity
.
getPictureGroupName
());
entity
.
setParamValue
(
entity
.
getPictureGroupName
());
entity
.
setFirstOrganize
(
"PictureMaterial"
);
entity
.
setSecondOrganize
(
"pictureGroupId"
);
}
}
@Override
@Override
...
...
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