Commit 47fc091e authored by huyuchen's avatar huyuchen

Merge remote-tracking branch 'origin/MVP1.5.8' into MVP1.5.8

parents 1f6492d9 89c58c3f
...@@ -29,7 +29,7 @@ public class EkpPermissionTask { ...@@ -29,7 +29,7 @@ public class EkpPermissionTask {
* @Date 2023-9-5 09:45:22 * @Date 2023-9-5 09:45:22
* @Param * @Param
**/ **/
public void doStatisticsTaxDeclarer() throws Exception { public void doRefreshEkpUser() throws Exception {
log.info("-------------刷新EKP权限里的账号信息-定时任务开始------------"); log.info("-------------刷新EKP权限里的账号信息-定时任务开始------------");
HttpDaprUtil.invokeMethodPost(daprEkpPermissionProperties.getAppUrl(), daprEkpPermissionProperties.getAppId(), HttpDaprUtil.invokeMethodPost(daprEkpPermissionProperties.getAppUrl(), daprEkpPermissionProperties.getAppId(),
"/sysuserinfo/inner/doRefreshEkpUser", "", Object.class, "/sysuserinfo/inner/doRefreshEkpUser", "", Object.class,
......
...@@ -20,10 +20,8 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -20,10 +20,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
...@@ -36,9 +34,8 @@ import javax.validation.constraints.NotBlank; ...@@ -36,9 +34,8 @@ import javax.validation.constraints.NotBlank;
*/ */
@Data @Data
@TableName("sys_role_menu_res") @TableName("sys_role_menu_res")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "新权限-角色-菜单-关联表") @Schema(description = "新权限-角色-菜单-关联表")
public class SysRoleMenuRes extends BaseEntity { public class SysRoleMenuRes {
/** /**
* 主键 * 主键
......
...@@ -20,10 +20,8 @@ import com.baomidou.mybatisplus.annotation.IdType; ...@@ -20,10 +20,8 @@ import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.annotation.TableId; import com.baomidou.mybatisplus.annotation.TableId;
import com.baomidou.mybatisplus.annotation.TableName; import com.baomidou.mybatisplus.annotation.TableName;
import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute; import com.yifu.cloud.plus.v1.yifu.common.core.constant.ExcelAttribute;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.media.Schema;
import lombok.Data; import lombok.Data;
import lombok.EqualsAndHashCode;
import org.hibernate.validator.constraints.Length; import org.hibernate.validator.constraints.Length;
import javax.validation.constraints.NotBlank; import javax.validation.constraints.NotBlank;
...@@ -36,9 +34,8 @@ import javax.validation.constraints.NotBlank; ...@@ -36,9 +34,8 @@ import javax.validation.constraints.NotBlank;
*/ */
@Data @Data
@TableName("sys_user_role_res") @TableName("sys_user_role_res")
@EqualsAndHashCode(callSuper = true)
@Schema(description = "新权限-账号-角色关联表") @Schema(description = "新权限-账号-角色关联表")
public class SysUserRoleRes extends BaseEntity { public class SysUserRoleRes {
/** /**
* 主键 * 主键
......
...@@ -114,6 +114,20 @@ public class SysUserInfoController { ...@@ -114,6 +114,20 @@ public class SysUserInfoController {
return R.ok(sysUserInfoService.removeById(fdId)); return R.ok(sysUserInfoService.removeById(fdId));
} }
/**
* @Description: 手动同步并更新账号信息
* @Author: hgw
* @Date: 2023/9/5 16:14
* @return: com.yifu.cloud.plus.v1.yifu.common.core.util.R<java.lang.String>
**/
@Operation(summary = "手动同步并更新账号信息", description = "手动同步并更新账号信息")
@SysLog("手动同步并更新账号信息")
@PostMapping("/startRefreshEkpUser")
public R<String> startRefreshEkpUser() {
sysUserInfoService.doRefreshEkpUser();
return R.ok();
}
/** /**
* @param * @param
* @Description: 定时任务-自动同步并更新账号信息 * @Description: 定时任务-自动同步并更新账号信息
......
...@@ -111,6 +111,9 @@ public class SysRoleInfoServiceImpl extends ServiceImpl<SysRoleInfoMapper, SysRo ...@@ -111,6 +111,9 @@ public class SysRoleInfoServiceImpl extends ServiceImpl<SysRoleInfoMapper, SysRo
return R.failed("名称已存在"); return R.failed("名称已存在");
} }
this.saveOrUpdate(role); this.saveOrUpdate(role);
for (SysRoleMenuRes res : resList) {
res.setRoleId(role.getFdId());
}
sysRoleMenuResService.saveBatch(resList); sysRoleMenuResService.saveBatch(resList);
return R.ok("保存成功"); return R.ok("保存成功");
} }
......
...@@ -15,7 +15,6 @@ package com.yifu.cloud.plus.v1.permission.service.impl;/* ...@@ -15,7 +15,6 @@ package com.yifu.cloud.plus.v1.permission.service.impl;/*
* Author: lengleng (wangiegie@gmail.com) * Author: lengleng (wangiegie@gmail.com)
*/ */
import cn.hutool.core.util.ArrayUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...@@ -24,7 +23,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -24,7 +23,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.permission.mapper.SysRoleMenuResMapper; import com.yifu.cloud.plus.v1.permission.mapper.SysRoleMenuResMapper;
import com.yifu.cloud.plus.v1.permission.service.SysRoleMenuResService; import com.yifu.cloud.plus.v1.permission.service.SysRoleMenuResService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysRoleMenuRes; import com.yifu.cloud.plus.v1.yifu.permission.entity.SysRoleMenuRes;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysRoleMenuResSearchVo; import com.yifu.cloud.plus.v1.yifu.permission.vo.SysRoleMenuResSearchVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
...@@ -62,7 +60,6 @@ public class SysRoleMenuResServiceImpl extends ServiceImpl<SysRoleMenuResMapper, ...@@ -62,7 +60,6 @@ public class SysRoleMenuResServiceImpl extends ServiceImpl<SysRoleMenuResMapper,
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) { if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd()); wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
} }
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectList(wrapper); return baseMapper.selectList(wrapper);
} }
...@@ -80,14 +77,6 @@ public class SysRoleMenuResServiceImpl extends ServiceImpl<SysRoleMenuResMapper, ...@@ -80,14 +77,6 @@ public class SysRoleMenuResServiceImpl extends ServiceImpl<SysRoleMenuResMapper,
private LambdaQueryWrapper buildQueryWrapper(SysRoleMenuResSearchVo entity) { private LambdaQueryWrapper buildQueryWrapper(SysRoleMenuResSearchVo entity) {
LambdaQueryWrapper<SysRoleMenuRes> wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<SysRoleMenuRes> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(SysRoleMenuRes::getCreateTime, entity.getCreateTimes()[0])
.le(SysRoleMenuRes::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(SysRoleMenuRes::getCreateName, entity.getCreateName());
}
return wrapper; return wrapper;
} }
......
...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.permission.service.SysUserRoleResService; ...@@ -28,6 +28,7 @@ import com.yifu.cloud.plus.v1.permission.service.SysUserRoleResService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.core.util.R; import com.yifu.cloud.plus.v1.yifu.common.core.util.R;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity; import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysRoleMenuRes;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserInfo; import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserInfo;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes; import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserInfoSaveVo; import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserInfoSaveVo;
...@@ -148,6 +149,9 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs ...@@ -148,6 +149,9 @@ public class SysUserInfoServiceImpl extends ServiceImpl<SysUserInfoMapper, SysUs
sysUserRoleResService.deleteByUserId(user.getFdId()); sysUserRoleResService.deleteByUserId(user.getFdId());
} }
this.saveOrUpdate(user); this.saveOrUpdate(user);
for (SysUserRoleRes res : resList) {
res.setUserId(user.getFdId());
}
sysUserRoleResService.saveBatch(resList); sysUserRoleResService.saveBatch(resList);
return R.ok("保存成功"); return R.ok("保存成功");
} }
......
...@@ -15,7 +15,6 @@ package com.yifu.cloud.plus.v1.permission.service.impl;/* ...@@ -15,7 +15,6 @@ package com.yifu.cloud.plus.v1.permission.service.impl;/*
* Author: lengleng (wangiegie@gmail.com) * Author: lengleng (wangiegie@gmail.com)
*/ */
import cn.hutool.core.util.ArrayUtil;
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper; import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
import com.baomidou.mybatisplus.core.metadata.IPage; import com.baomidou.mybatisplus.core.metadata.IPage;
import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.core.toolkit.Wrappers;
...@@ -24,7 +23,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; ...@@ -24,7 +23,6 @@ import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.yifu.cloud.plus.v1.permission.mapper.SysUserRoleResMapper; import com.yifu.cloud.plus.v1.permission.mapper.SysUserRoleResMapper;
import com.yifu.cloud.plus.v1.permission.service.SysUserRoleResService; import com.yifu.cloud.plus.v1.permission.service.SysUserRoleResService;
import com.yifu.cloud.plus.v1.yifu.common.core.util.Common; import com.yifu.cloud.plus.v1.yifu.common.core.util.Common;
import com.yifu.cloud.plus.v1.yifu.common.mybatis.base.BaseEntity;
import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes; import com.yifu.cloud.plus.v1.yifu.permission.entity.SysUserRoleRes;
import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserRoleResSearchVo; import com.yifu.cloud.plus.v1.yifu.permission.vo.SysUserRoleResSearchVo;
import lombok.extern.log4j.Log4j2; import lombok.extern.log4j.Log4j2;
...@@ -62,7 +60,6 @@ public class SysUserRoleResServiceImpl extends ServiceImpl<SysUserRoleResMapper, ...@@ -62,7 +60,6 @@ public class SysUserRoleResServiceImpl extends ServiceImpl<SysUserRoleResMapper,
if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) { if (searchVo.getLimitStart() >= 0 && searchVo.getLimitEnd() > 0) {
wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd()); wrapper.last(" limit " + searchVo.getLimitStart() + "," + searchVo.getLimitEnd());
} }
wrapper.orderByDesc(BaseEntity::getCreateTime);
return baseMapper.selectList(wrapper); return baseMapper.selectList(wrapper);
} }
...@@ -78,14 +75,6 @@ public class SysUserRoleResServiceImpl extends ServiceImpl<SysUserRoleResMapper, ...@@ -78,14 +75,6 @@ public class SysUserRoleResServiceImpl extends ServiceImpl<SysUserRoleResMapper,
private LambdaQueryWrapper buildQueryWrapper(SysUserRoleResSearchVo entity) { private LambdaQueryWrapper buildQueryWrapper(SysUserRoleResSearchVo entity) {
LambdaQueryWrapper<SysUserRoleRes> wrapper = Wrappers.lambdaQuery(); LambdaQueryWrapper<SysUserRoleRes> wrapper = Wrappers.lambdaQuery();
if (ArrayUtil.isNotEmpty(entity.getCreateTimes())) {
wrapper.ge(SysUserRoleRes::getCreateTime, entity.getCreateTimes()[0])
.le(SysUserRoleRes::getCreateTime,
entity.getCreateTimes()[1]);
}
if (Common.isNotNull(entity.getCreateName())) {
wrapper.eq(SysUserRoleRes::getCreateName, entity.getCreateName());
}
return wrapper; return wrapper;
} }
......
...@@ -123,6 +123,7 @@ ...@@ -123,6 +123,7 @@
,SUBSTRING_INDEX(SUBSTRING_INDEX(e.fd_ldap_dn,',ou', 2),',ou=', -1) AS fd_dept_name ,SUBSTRING_INDEX(SUBSTRING_INDEX(e.fd_ldap_dn,',ou', 2),',ou=', -1) AS fd_dept_name
,p.fd_mobile_no,p.fd_email ,p.fd_mobile_no,p.fd_email
from sys_org_element e JOIN sys_org_person p on e.fd_id=p.fd_id from sys_org_element e JOIN sys_org_person p on e.fd_id=p.fd_id
where e.fd_is_available = '1'
</select> </select>
</mapper> </mapper>
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment