Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
A
amos-boot-biz
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
项目统一框架
amos-boot-biz
Commits
08b72011
Commit
08b72011
authored
Mar 24, 2023
by
lisong
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
更新
parent
761c71e6
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
0 deletions
+15
-0
HouseholdPvDistrictServiceImpl.java
...xiop/biz/service/impl/HouseholdPvDistrictServiceImpl.java
+15
-0
No files found.
amos-boot-system-jxiop/amos-boot-module-jxiop-biz/src/main/java/com/yeejoin/amos/boot/module/jxiop/biz/service/impl/HouseholdPvDistrictServiceImpl.java
View file @
08b72011
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jxiop
.
biz
.
service
.
impl
;
import
com.alibaba.fastjson.JSON
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.conditions.query.QueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.bo.ReginParams
;
import
com.yeejoin.amos.boot.biz.common.utils.RedisKey
;
...
...
@@ -61,6 +63,12 @@ public class HouseholdPvDistrictServiceImpl extends BaseService<HouseholdPvDistr
@Override
public
HouseholdPvDistrict
treeAdd
(
Long
parentId
,
String
name
)
{
LambdaQueryWrapper
<
HouseholdPvDistrict
>
lambda
=
new
QueryWrapper
<
HouseholdPvDistrict
>().
lambda
();
lambda
.
eq
(
HouseholdPvDistrict
::
getName
,
name
);
Integer
integer
=
householdPvDistrictMapper
.
selectCount
(
lambda
);
if
(
integer
>
0
){
throw
new
BadRequest
(
"名称重复!"
);
}
String
random
=
""
+
Math
.
random
();
String
substring
=
random
.
substring
(
random
.
length
()
-
4
);
HouseholdPvDistrict
householdPvDistrict
=
new
HouseholdPvDistrict
();
...
...
@@ -83,6 +91,13 @@ public class HouseholdPvDistrictServiceImpl extends BaseService<HouseholdPvDistr
@Override
public
HouseholdPvDistrict
treeUpdate
(
Long
id
,
String
name
)
{
LambdaQueryWrapper
<
HouseholdPvDistrict
>
lambda
=
new
QueryWrapper
<
HouseholdPvDistrict
>().
lambda
();
lambda
.
eq
(
HouseholdPvDistrict
::
getName
,
name
);
lambda
.
ne
(
HouseholdPvDistrict
::
getSequenceNbr
,
id
);
Integer
integer
=
householdPvDistrictMapper
.
selectCount
(
lambda
);
if
(
integer
>
0
){
throw
new
BadRequest
(
"名称重复!"
);
}
HouseholdPvDistrict
householdPvDistrict
=
new
HouseholdPvDistrict
();
householdPvDistrict
.
setSequenceNbr
(
id
);
householdPvDistrict
.
setName
(
name
);
...
...
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