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
6b52b963
Commit
6b52b963
authored
Dec 15, 2022
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
增加删除接口
parent
1f958e64
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
24 additions
and
4 deletions
+24
-4
IOrganizationUserService.java
...boot/module/jcs/api/service/IOrganizationUserService.java
+1
-1
OrganizationService.java
...amos/boot/module/jcs/api/service/OrganizationService.java
+1
-1
OrganizationUserController.java
...module/jcs/biz/controller/OrganizationUserController.java
+7
-0
OrganizationImpl.java
...os/boot/module/jcs/biz/service/impl/OrganizationImpl.java
+10
-2
OrganizationUserImpl.java
...oot/module/jcs/biz/service/impl/OrganizationUserImpl.java
+5
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/IOrganizationUserService.java
View file @
6b52b963
...
...
@@ -12,5 +12,5 @@ public interface IOrganizationUserService {
IPage
<
OrganizationUser
>
getListPage
(
int
pageNumber
,
int
pageSize
,
Long
id
);
int
deleteById
(
Long
id
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-jcs-api/src/main/java/com/yeejoin/amos/boot/module/jcs/api/service/OrganizationService.java
View file @
6b52b963
...
...
@@ -37,5 +37,5 @@ public interface OrganizationService {
Organization
getDetailsById
(
Long
id
);
boolean
deleteById
(
Long
id
);
int
deleteById
(
Long
id
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/OrganizationUserController.java
View file @
6b52b963
...
...
@@ -59,4 +59,11 @@ public class OrganizationUserController extends BaseController {
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
,
@RequestParam
()
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
organizationUserService
.
getListPage
(
pageNumber
,
pageSize
,
id
));
}
@GetMapping
(
value
=
"/deleteById"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"删除"
,
notes
=
"根据id删除"
)
public
ResponseModel
deleteById
(
@RequestParam
()
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
organizationUserService
.
deleteById
(
id
));
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/OrganizationImpl.java
View file @
6b52b963
...
...
@@ -14,6 +14,7 @@ import org.springframework.beans.BeanUtils;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.stereotype.Service
;
import
org.springframework.transaction.annotation.Transactional
;
import
org.springframework.util.CollectionUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
...
...
@@ -89,6 +90,7 @@ public class OrganizationImpl extends BaseService<Organization,Organization, Org
@Override
public
Organization
saveOrganization
(
Organization
organization
)
{
organization
.
setSort
(
organizationMapper
.
selectMaxSort
()
+
1
);
return
this
.
createWithModel
(
organization
);
}
...
...
@@ -149,7 +151,13 @@ public class OrganizationImpl extends BaseService<Organization,Organization, Org
}
@Override
public
boolean
deleteById
(
Long
id
)
{
return
false
;
public
int
deleteById
(
Long
id
)
{
LambdaQueryWrapper
<
OrganizationUser
>
queryWrapper
=
new
LambdaQueryWrapper
<>();
queryWrapper
.
eq
(
OrganizationUser:
:
getEmergencyTeamId
,
id
);
List
<
OrganizationUser
>
organizationUsers
=
organizationUserMapper
.
selectList
(
queryWrapper
);
if
(!
CollectionUtils
.
isEmpty
(
organizationUsers
))
{
throw
new
BadRequest
(
"该应急小组下有成员不可删除!"
);
}
return
this
.
baseMapper
.
deleteById
(
id
);
}
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/service/impl/OrganizationUserImpl.java
View file @
6b52b963
...
...
@@ -41,4 +41,9 @@ public class OrganizationUserImpl extends BaseService<OrganizationUser,Organizat
wrapper
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
return
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
}
@Override
public
int
deleteById
(
Long
id
)
{
return
this
.
baseMapper
.
deleteById
(
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