feat:全局人脸
This commit is contained in:
1 parent
f9c6d9f193
commit
62a4eac910
5 files changed
+11
-4
No files matched your search
+2
@@ -16,4 +16,6 @@ public class SysUserFaceDto extends SysUserFaceEntity {
|
||||
|
||||
private String isGlobalFace;
|
||||
|
||||
private Long merchantDeptIdOrGlobal;
|
||||
|
||||
}
|
||||
+1
-1
@@ -88,7 +88,7 @@ public class SysUserFaceController {
|
||||
public R adFinFace(@ParameterObject Page page, @RequestParam(required = false) Long userId, @RequestParam(required = false) Long merchantDeptId) {
|
||||
SysUserFaceDto dto = new SysUserFaceDto();
|
||||
dto.setUserId(userId);
|
||||
dto.setMerchantDeptId(merchantDeptId);
|
||||
dto.setMerchantDeptIdOrGlobal(merchantDeptId);
|
||||
return R.ok(sysUserFaceService.pageJoin(page, dto).getRecords());
|
||||
}
|
||||
/* ************************************* start android start ************************************* */
|
||||
|
||||
+3
@@ -46,6 +46,9 @@ public interface SysUserFaceMapper extends PjcloudBaseMapper<SysUserFaceEntity>
|
||||
.eq(ObjectUtil.isNotEmpty(dto.getUserId()), SysUserFaceEntity::getUserId, dto.getUserId())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getUserIds()), SysUserFaceEntity::getUserId, dto.getUserIds())
|
||||
.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), SysUser::getDeptId, dto.getDeptIds());
|
||||
if (ObjectUtil.isNotEmpty(dto.getMerchantDeptIdOrGlobal()) && ObjectUtil.isNotEmpty(dto.getDeptIds())) {
|
||||
wrapper.and(v -> v.in(ObjectUtil.isNotEmpty(dto.getDeptIds()), SysUser::getDeptId, dto.getDeptIds()).or().eq(SysUser::getIsGlobalFace, true));
|
||||
}
|
||||
return selectJoinPage(page, SysUserFaceVo.class, wrapper);
|
||||
}
|
||||
}
|
||||
+2
-2
@@ -101,8 +101,8 @@ public class SysUserFaceServiceImpl extends ServiceImpl<SysUserFaceMapper, SysUs
|
||||
|
||||
@Override
|
||||
public Page<SysUserFaceVo> pageJoin(Page page, SysUserFaceDto dto) {
|
||||
if (ObjectUtil.isNotEmpty(dto.getMerchantDeptId())) {
|
||||
List<SysDept> deptList = sysDeptService.listDescendant(dto.getMerchantDeptId());
|
||||
if (ObjectUtil.isNotEmpty(dto.getMerchantDeptIdOrGlobal())) {
|
||||
List<SysDept> deptList = sysDeptService.listDescendant(dto.getMerchantDeptIdOrGlobal());
|
||||
if (ObjectUtil.isNotEmpty(deptList)) {
|
||||
List<Long> deptIds = deptList.stream().map(SysDept::getDeptId).toList();
|
||||
dto.setDeptIds(deptIds);
|
||||
|
||||
@@ -29,11 +29,13 @@
|
||||
<if test="pa.userId != null">
|
||||
and a.user_id = #{pa.userId}
|
||||
</if>
|
||||
<if test="pa.userId != null">
|
||||
</if>
|
||||
</sql>
|
||||
|
||||
<select id="scopePageList" resultType="com.bsd.pjcloud.admin.api.vo.SysUserFaceVo">
|
||||
<include refid="selectA"/>
|
||||
u.username,
|
||||
u.name as username,
|
||||
u.avatar as userAvatar,
|
||||
u.phone as userMobile
|
||||
from sys_user_face a
|
||||
|
||||
Reference in new issue
Block a user