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
c1571580
Commit
c1571580
authored
Dec 15, 2022
by
xixinzhao
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
组织机构相关
parent
d85435bb
Hide whitespace changes
Inline
Side-by-side
Showing
11 changed files
with
336 additions
and
5 deletions
+336
-5
OrgUsrMapper.java
...join/amos/boot/module/common/api/mapper/OrgUsrMapper.java
+2
-0
IOrgUsrService.java
...n/amos/boot/module/common/api/service/IOrgUsrService.java
+3
-0
OrgUsrMapper.xml
...ule-common-api/src/main/resources/mapper/OrgUsrMapper.xml
+11
-0
IOrganizationUserService.java
...boot/module/jcs/api/service/IOrganizationUserService.java
+16
-0
OrganizationService.java
...amos/boot/module/jcs/api/service/OrganizationService.java
+19
-0
OrgUsrController.java
...s/boot/module/common/biz/controller/OrgUsrController.java
+30
-0
OrgUsrServiceImpl.java
...oot/module/common/biz/service/impl/OrgUsrServiceImpl.java
+19
-0
OrganizationController.java
...oot/module/jcs/biz/controller/OrganizationController.java
+58
-4
OrganizationUserController.java
...module/jcs/biz/controller/OrganizationUserController.java
+62
-0
OrganizationImpl.java
...os/boot/module/jcs/biz/service/impl/OrganizationImpl.java
+72
-1
OrganizationUserImpl.java
...oot/module/jcs/biz/service/impl/OrganizationUserImpl.java
+44
-0
No files found.
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/mapper/OrgUsrMapper.java
View file @
c1571580
...
...
@@ -135,4 +135,6 @@ public interface OrgUsrMapper extends BaseMapper<OrgUsr> {
OrgUsr
queryByCompanyCode
(
@Param
(
"companyCode"
)
String
companyCode
);
List
<
OrgUsrSyncDto
>
getOrgUsrSyncDataList
(
Map
<
String
,
Object
>
map
);
List
<
OrgUsr
>
companyUserTreeByUserAndType
(
Map
<
String
,
Object
>
param
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/java/com/yeejoin/amos/boot/module/common/api/service/IOrgUsrService.java
View file @
c1571580
...
...
@@ -372,4 +372,7 @@ public interface IOrgUsrService {
OrgUsr
selectParentOrgUsr
(
OrgUsr
orgUsr
);
List
<
OrgMenuDto
>
companyUserTreeByUserAndType
(
ReginParams
reginParams
);
List
<
DynamicFormInstance
>
selectTelById
(
List
<
String
>
ids
,
String
type
);
}
amos-boot-module/amos-boot-module-api/amos-boot-module-common-api/src/main/resources/mapper/OrgUsrMapper.xml
View file @
c1571580
...
...
@@ -1140,4 +1140,15 @@ LEFT JOIN (
GROUP BY
u.sequence_nbr
</select>
<select
id=
"companyUserTreeByUserAndType"
resultType=
"com.yeejoin.amos.boot.module.common.api.entity.OrgUsr"
>
SELECT
usr.*
FROM
cb_org_usr usr
where
usr.is_delete = false
and usr.biz_org_code like CONCAT(#{bizOrgCode},'%')
</select>
</mapper>
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
0 → 100644
View file @
c1571580
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
api
.
service
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrganizationUser
;
public
interface
IOrganizationUserService
{
OrganizationUser
saveOrganization
(
OrganizationUser
organizationUser
);
OrganizationUser
updateModelById
(
OrganizationUser
organizationUser
);
OrganizationUser
getDetailsById
(
Long
id
);
IPage
<
OrganizationUser
>
getListPage
(
int
pageNumber
,
int
pageSize
,
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 @
c1571580
...
...
@@ -3,6 +3,7 @@ package com.yeejoin.amos.boot.module.jcs.api.service;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationExportDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationUserExportDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Organization
;
import
java.util.List
;
import
java.util.Map
;
...
...
@@ -19,4 +20,22 @@ public interface OrganizationService {
List
<
OrganizationUserExportDto
>
selectOrganizationUserList
(
String
bizOrgCode
);
void
saveOrganization
(
List
<
OrganizationExportDto
>
data
,
List
<
OrganizationUserExportDto
>
userData
,
String
bizOrgCode
);
/**
* 保存应急小组
* @param organization
* @return
*/
Organization
saveOrganization
(
Organization
organization
);
Organization
updateModelById
(
Organization
organization
);
boolean
moveTeam
(
String
method
,
Long
id
);
List
<
Organization
>
getList
();
Organization
getDetailsById
(
Long
id
);
boolean
deleteById
(
Long
id
);
}
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/controller/OrgUsrController.java
View file @
c1571580
...
...
@@ -10,6 +10,7 @@ import java.util.stream.Collectors;
import
javax.servlet.http.HttpServletRequest
;
import
com.yeejoin.amos.boot.module.common.api.entity.DynamicFormInstance
;
import
org.apache.commons.lang3.StringUtils
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.beans.factory.annotation.Value
;
...
...
@@ -1023,4 +1024,32 @@ public class OrgUsrController extends BaseController {
}
/**
* 获取单位部门用户树
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/companyUserTreeByUserAndType"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据登陆人获取单位部门用户树"
,
notes
=
"根据登陆人获取单位部门用户树"
)
public
ResponseModel
<
List
<
OrgMenuDto
>>
companyUserTreeByUserAndType
()
{
// 获取登陆人角色
ReginParams
reginParams
=
getSelectedOrgInfo
();
List
<
OrgMenuDto
>
menus
=
iOrgUsrService
.
companyUserTreeByUserAndType
(
reginParams
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
/**
* 获取人员电话
* @param
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/selectTelById"
,
method
=
RequestMethod
.
GET
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"根据id获取用户电话"
,
notes
=
"根据id获取用户电话"
)
public
ResponseModel
<
List
<
DynamicFormInstance
>>
selectTelById
(
@RequestParam
List
<
String
>
ids
,
@RequestParam
String
type
)
{
List
<
DynamicFormInstance
>
menus
=
iOrgUsrService
.
selectTelById
(
ids
,
type
);
return
ResponseHelper
.
buildResponse
(
menus
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-common-biz/src/main/java/com/yeejoin/amos/boot/module/common/biz/service/impl/OrgUsrServiceImpl.java
View file @
c1571580
...
...
@@ -3461,4 +3461,22 @@ public class OrgUsrServiceImpl extends BaseService<OrgUsrDto, OrgUsr, OrgUsrMapp
return
baseMapper
.
selectList
(
wrapper
);
}
@Override
public
List
<
OrgMenuDto
>
companyUserTreeByUserAndType
(
ReginParams
reginParams
)
{
Map
<
String
,
Object
>
param
=
new
HashMap
<>();
// 权限处理
PermissionInterceptorContext
.
setDataAuthRule
(
authKey
);
param
.
put
(
"bizOrgCode"
,
reginParams
.
getPersonIdentity
().
getBizOrgCode
());
List
<
OrgUsr
>
list
=
orgUsrMapper
.
companyUserTreeByUserAndType
(
param
);
return
buildTreeParallel
(
list
);
}
@Override
public
List
<
DynamicFormInstance
>
selectTelById
(
List
<
String
>
ids
,
String
type
)
{
LambdaQueryWrapper
<
DynamicFormInstance
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
eq
(
DynamicFormInstance:
:
getFieldCode
,
type
);
wrapper
.
in
(
DynamicFormInstance:
:
getInstanceId
,
ids
);
return
dynamicFormInstanceService
.
list
(
wrapper
);
}
}
\ No newline at end of file
amos-boot-module/amos-boot-module-biz/amos-boot-module-jcs-biz/src/main/java/com/yeejoin/amos/boot/module/jcs/biz/controller/OrganizationController.java
View file @
c1571580
...
...
@@ -16,6 +16,7 @@ import com.yeejoin.amos.boot.biz.common.utils.RedisUtils;
import
com.yeejoin.amos.boot.module.common.api.core.framework.PersonIdentify
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationExportDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationUserExportDto
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Organization
;
import
com.yeejoin.amos.boot.module.jcs.api.service.OrganizationService
;
import
com.yeejoin.amos.boot.module.common.biz.utils.CommonResponseUtil
;
import
io.swagger.annotations.Api
;
...
...
@@ -24,14 +25,12 @@ import org.apache.commons.lang3.StringUtils;
import
org.apache.poi.ss.formula.functions.T
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.util.ObjectUtils
;
import
org.springframework.web.bind.annotation.GetMapping
;
import
org.springframework.web.bind.annotation.RequestMapping
;
import
org.springframework.web.bind.annotation.RequestParam
;
import
org.springframework.web.bind.annotation.RestController
;
import
org.springframework.web.bind.annotation.*
;
import
org.springframework.web.multipart.MultipartFile
;
import
org.typroject.tyboot.core.foundation.context.RequestContext
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
import
javax.servlet.http.HttpServletResponse
;
...
...
@@ -176,4 +175,59 @@ public class OrganizationController extends BaseController {
return
CommonResponseUtil
.
success
();
}
/**
* 新增应急小组信息
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增应急小组信息"
,
notes
=
"新增应急小组信息"
)
public
ResponseModel
<
Organization
>
save
(
@RequestBody
Organization
organization
)
{
return
ResponseHelper
.
buildResponse
(
organizationService
.
saveOrganization
(
organization
));
}
/**
* 编辑应急小组信息
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑应急小组信息"
,
notes
=
"编辑应急小组信息"
)
public
ResponseModel
<
Organization
>
updateByIdDeviceServicing
(
@RequestBody
Organization
organization
){
return
ResponseHelper
.
buildResponse
(
organizationService
.
updateModelById
(
organization
));
}
/**
* 上移下移
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@GetMapping
(
value
=
"/moveTeam"
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"上移下移"
,
notes
=
"上移下移"
)
public
ResponseModel
<
Boolean
>
moveTeam
(
@RequestParam
()
String
method
,
@RequestParam
Long
id
){
return
ResponseHelper
.
buildResponse
(
organizationService
.
moveTeam
(
method
,
id
));
}
@GetMapping
(
value
=
"/getList"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取列表"
,
notes
=
"获取列表"
)
public
ResponseModel
<
List
<
Organization
>>
getList
()
{
return
ResponseHelper
.
buildResponse
(
organizationService
.
getList
());
}
@GetMapping
(
value
=
"/getDetailsById"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取详情"
,
notes
=
"获取详情"
)
public
ResponseModel
<
Organization
>
getDetailsById
(
@RequestParam
()
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
organizationService
.
getDetailsById
(
id
));
}
@GetMapping
(
value
=
"/deleteById"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"删除"
,
notes
=
"根据id删除"
)
public
ResponseModel
deleteById
(
@RequestParam
()
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
organizationService
.
deleteById
(
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
0 → 100644
View file @
c1571580
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
controller
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.yeejoin.amos.boot.biz.common.controller.BaseController
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.Organization
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrganizationUser
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IOrganizationUserService
;
import
com.yeejoin.amos.boot.module.jcs.api.service.OrganizationService
;
import
io.swagger.annotations.Api
;
import
io.swagger.annotations.ApiOperation
;
import
org.springframework.beans.factory.annotation.Autowired
;
import
org.springframework.web.bind.annotation.*
;
import
org.typroject.tyboot.core.foundation.enumeration.UserType
;
import
org.typroject.tyboot.core.restful.doc.TycloudOperation
;
import
org.typroject.tyboot.core.restful.utils.ResponseHelper
;
import
org.typroject.tyboot.core.restful.utils.ResponseModel
;
@RestController
@Api
(
tags
=
"组织机构"
)
@RequestMapping
(
value
=
"/organization-user"
)
public
class
OrganizationUserController
extends
BaseController
{
@Autowired
private
IOrganizationUserService
organizationUserService
;
/**
* 新增应急小组成员
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@PostMapping
(
value
=
"/save"
)
@ApiOperation
(
httpMethod
=
"POST"
,
value
=
"新增应急小组用户"
,
notes
=
"新增应急小组用户"
)
public
ResponseModel
<
OrganizationUser
>
save
(
@RequestBody
OrganizationUser
organizationUser
)
{
return
ResponseHelper
.
buildResponse
(
organizationUserService
.
saveOrganization
(
organizationUser
));
}
/**
* 编辑应急小组成员
* @return
*/
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@RequestMapping
(
value
=
"/updateById"
,
method
=
RequestMethod
.
PUT
)
@ApiOperation
(
httpMethod
=
"PUT"
,
value
=
"编辑应急小组成员"
,
notes
=
"编辑应急小组成员"
)
public
ResponseModel
<
OrganizationUser
>
updateByIdDeviceServicing
(
@RequestBody
OrganizationUser
organizationUser
){
return
ResponseHelper
.
buildResponse
(
organizationUserService
.
updateModelById
(
organizationUser
));
}
@GetMapping
(
value
=
"/getDetailsById"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"获取详情"
,
notes
=
"获取详情"
)
public
ResponseModel
<
OrganizationUser
>
getDetailsById
(
@RequestParam
()
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
organizationUserService
.
getDetailsById
(
id
));
}
@GetMapping
(
value
=
"/getListPage"
)
@TycloudOperation
(
ApiLevel
=
UserType
.
AGENCY
)
@ApiOperation
(
httpMethod
=
"GET"
,
value
=
"删除"
,
notes
=
"根据id删除"
)
public
ResponseModel
<
IPage
<
OrganizationUser
>>
getListPage
(
@RequestParam
(
value
=
"pageNumber"
)
int
pageNumber
,
@RequestParam
(
value
=
"pageSize"
)
int
pageSize
,
@RequestParam
()
Long
id
)
{
return
ResponseHelper
.
buildResponse
(
organizationUserService
.
getListPage
(
pageNumber
,
pageSize
,
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 @
c1571580
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationExportDto
;
import
com.yeejoin.amos.boot.module.jcs.api.dto.OrganizationUserExportDto
;
...
...
@@ -8,10 +9,13 @@ import com.yeejoin.amos.boot.module.jcs.api.entity.OrganizationUser;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.OrganizationMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.OrganizationUserMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.OrganizationService
;
import
org.apache.commons.lang3.ObjectUtils
;
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.typroject.tyboot.core.rdbms.service.BaseService
;
import
org.typroject.tyboot.core.restful.exception.instance.BadRequest
;
import
java.util.ArrayList
;
import
java.util.List
;
...
...
@@ -20,7 +24,7 @@ import java.util.stream.Collectors;
@Service
public
class
OrganizationImpl
implements
OrganizationService
{
public
class
OrganizationImpl
extends
BaseService
<
Organization
,
Organization
,
OrganizationMapper
>
implements
OrganizationService
{
@Autowired
private
OrganizationMapper
organizationMapper
;
...
...
@@ -81,4 +85,71 @@ public class OrganizationImpl implements OrganizationService {
}
}
}
@Override
public
Organization
saveOrganization
(
Organization
organization
)
{
return
this
.
createWithModel
(
organization
);
}
@Override
public
Organization
updateModelById
(
Organization
organization
)
{
return
this
.
updateWithModel
(
organization
);
}
@Override
public
boolean
moveTeam
(
String
method
,
Long
id
)
{
Organization
organization
=
this
.
baseMapper
.
selectById
(
id
);
if
(
"up"
.
equals
(
method
))
{
// 获取需要移动数据
// 上移,查询上一条数据
LambdaQueryWrapper
<
Organization
>
wrapper
=
new
LambdaQueryWrapper
<>();
int
sort
=
organization
.
getSort
();
wrapper
.
lt
(
Organization:
:
getSort
,
sort
);
wrapper
.
orderByDesc
(
Organization:
:
getSort
);
wrapper
.
last
(
" limit 1"
);
Organization
upOrganization
=
this
.
baseMapper
.
selectOne
(
wrapper
);
if
(
ObjectUtils
.
isEmpty
(
upOrganization
))
{
throw
new
BadRequest
(
"最顶层数据不可上移"
);
}
organization
.
setSort
(
upOrganization
.
getSort
());
this
.
updateById
(
organization
);
upOrganization
.
setSort
(
sort
);
this
.
updateById
(
upOrganization
);
return
true
;
}
else
{
// 下移,查询下一条数据
LambdaQueryWrapper
<
Organization
>
wrapper
=
new
LambdaQueryWrapper
<>();
int
sort
=
organization
.
getSort
();
wrapper
.
gt
(
Organization:
:
getSort
,
sort
);
wrapper
.
orderByAsc
(
Organization:
:
getSort
);
wrapper
.
last
(
" limit 1"
);
Organization
downOrganization
=
this
.
baseMapper
.
selectOne
(
wrapper
);
if
(
ObjectUtils
.
isEmpty
(
downOrganization
))
{
throw
new
BadRequest
(
"最底层数据不可上移"
);
}
organization
.
setSort
(
downOrganization
.
getSort
());
this
.
updateById
(
organization
);
downOrganization
.
setSort
(
sort
);
this
.
updateById
(
downOrganization
);
return
true
;
}
}
@Override
public
List
<
Organization
>
getList
()
{
LambdaQueryWrapper
<
Organization
>
wrapper
=
new
LambdaQueryWrapper
<>();
wrapper
.
orderByAsc
(
Organization:
:
getSort
);
return
this
.
baseMapper
.
selectList
(
wrapper
);
}
@Override
public
Organization
getDetailsById
(
Long
id
)
{
return
this
.
baseMapper
.
selectById
(
id
);
}
@Override
public
boolean
deleteById
(
Long
id
)
{
return
false
;
}
}
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
0 → 100644
View file @
c1571580
package
com
.
yeejoin
.
amos
.
boot
.
module
.
jcs
.
biz
.
service
.
impl
;
import
com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper
;
import
com.baomidou.mybatisplus.core.metadata.IPage
;
import
com.baomidou.mybatisplus.extension.plugins.pagination.Page
;
import
com.yeejoin.amos.boot.biz.common.entity.BaseEntity
;
import
com.yeejoin.amos.boot.module.jcs.api.entity.OrganizationUser
;
import
com.yeejoin.amos.boot.module.jcs.api.mapper.OrganizationUserMapper
;
import
com.yeejoin.amos.boot.module.jcs.api.service.IOrganizationUserService
;
import
org.springframework.stereotype.Service
;
import
org.springframework.util.ObjectUtils
;
import
org.typroject.tyboot.core.rdbms.service.BaseService
;
@Service
public
class
OrganizationUserImpl
extends
BaseService
<
OrganizationUser
,
OrganizationUser
,
OrganizationUserMapper
>
implements
IOrganizationUserService
{
@Override
public
OrganizationUser
saveOrganization
(
OrganizationUser
organizationUser
)
{
return
this
.
createWithModel
(
organizationUser
);
}
@Override
public
OrganizationUser
updateModelById
(
OrganizationUser
organizationUser
)
{
return
this
.
updateWithModel
(
organizationUser
);
}
@Override
public
OrganizationUser
getDetailsById
(
Long
id
)
{
return
this
.
baseMapper
.
selectById
(
id
);
}
@Override
public
IPage
<
OrganizationUser
>
getListPage
(
int
pageNumber
,
int
pageSize
,
Long
id
)
{
Page
<
OrganizationUser
>
page
=
new
Page
<>();
page
.
setSize
(
pageSize
);
page
.
setCurrent
(
pageNumber
);
LambdaQueryWrapper
<
OrganizationUser
>
wrapper
=
new
LambdaQueryWrapper
<>();
if
(!
ObjectUtils
.
isEmpty
(
id
)
&&
id
!=
0
)
{
wrapper
.
eq
(
OrganizationUser:
:
getEmergencyTeamId
,
id
);
}
wrapper
.
orderByDesc
(
BaseEntity:
:
getRecDate
);
return
this
.
baseMapper
.
selectPage
(
page
,
wrapper
);
}
}
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