feat:定密管理添加数据权限

hangao
wangxy 5 months ago
parent 9d796da45f
commit 31b3387f73

@ -40,6 +40,7 @@ public class SecretManager {
tdSecreting.setCreateBy(ShiroUtils.getSysUser().getLoginName());
tdSecreting.setCreateTime(new Date());
}
tdSecreting.setDeptId(ShiroUtils.getSysUser().getDeptId());
return secretingService.saveOrUpdate(tdSecreting);
}

@ -63,6 +63,8 @@ public class TdSecreting extends BaseEntity {
*/
private String keyPoint;
private Long deptId;
@TableField(exist = false)
private static final long serialVersionUID = 1L;
}

@ -1,6 +1,7 @@
package com.ruoyi.system.service.secreting.impl;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import com.ruoyi.common.annotation.DataScope;
import com.ruoyi.system.domain.secreting.TdSecreting;
import com.ruoyi.system.mapper.secreting.TdSecretingMapper;
import com.ruoyi.system.service.secreting.TdSecretingService;
@ -22,6 +23,7 @@ public class TdSecretingServiceImpl extends ServiceImpl<TdSecretingMapper, TdSec
private TdSecretingMapper tdSecretingMapper;
@Override
@DataScope(deptAlias = "d")
public List<TdSecreting> selectSecretList(TdSecreting tdSecreting) {
return tdSecretingMapper.selectSecretList(tdSecreting);
}

@ -19,6 +19,7 @@
<result property="secretDegree" column="secret_degree" jdbcType="VARCHAR"/>
<result property="term" column="term" jdbcType="VARCHAR"/>
<result property="keyPoint" column="key_point" jdbcType="VARCHAR"/>
<result property="deptId" column="dept_id" jdbcType="BIGINT"/>
</resultMap>
<sql id="Base_Column_List">
@ -30,7 +31,7 @@
</sql>
<select id="selectSecretList" resultType="com.ruoyi.system.domain.secreting.TdSecreting">
select <include refid="Base_Column_List"/> from td_secreting
select <include refid="Base_Column_List"/> from td_secreting d
<trim prefix="where" prefixOverrides="and|or">
<if test="secretDegree!=null and secretDegree!=''">
AND secret_degree = #{secretDegree}
@ -38,6 +39,8 @@
<if test="responsible!=null and responsible!=''">
AND responsible = #{responsible}
</if>
<!-- 数据范围过滤 -->
${params.dataScope}
</trim>
</select>
</mapper>

Loading…
Cancel
Save