feat(examine): 考核用户列表添加数据权限控制
- 将 ExamineUser 类继承自 BaseEntity - 在 ExamineUserMapper.xml 中添加数据范围参数 - 在 ExamineUserServiceImpl 中添加数据权限注解dev_1.1.0
parent
ab2844e5bd
commit
1c2fc2bcc0
pms-business/src/main
java/tech/unissense/pms/business/examine/user
domain
service/impl
resources/mapper/business/examine
|
@ -1,6 +1,7 @@
|
|||
package tech.unissense.pms.business.examine.user.domain;
|
||||
|
||||
import lombok.Data;
|
||||
import tech.unissense.pms.common.core.domain.BaseEntity;
|
||||
|
||||
import java.io.Serializable;
|
||||
import java.math.BigDecimal;
|
||||
|
@ -12,7 +13,7 @@ import java.math.BigDecimal;
|
|||
* @since 2025-01-02 10:18:52
|
||||
*/
|
||||
@Data
|
||||
public class ExamineUser implements Serializable {
|
||||
public class ExamineUser extends BaseEntity {
|
||||
private static final long serialVersionUID = -48380572616355554L;
|
||||
|
||||
private Integer id;
|
||||
|
|
|
@ -9,6 +9,7 @@ import tech.unissense.pms.business.examine.user.domain.ExamineUser;
|
|||
import tech.unissense.pms.business.examine.user.mapper.ExamineUserMapper;
|
||||
import tech.unissense.pms.business.examine.user.service.ExamineUserService;
|
||||
import org.springframework.stereotype.Service;
|
||||
import tech.unissense.pms.common.annotation.DataScope;
|
||||
|
||||
import javax.annotation.Resource;
|
||||
import java.math.BigDecimal;
|
||||
|
@ -80,6 +81,7 @@ public class ExamineUserServiceImpl implements ExamineUserService {
|
|||
}
|
||||
|
||||
@Override
|
||||
@DataScope(deptAlias = "t2", userAlias = "t2")
|
||||
public List<ExamineUser> list(ExamineUser examineUser) {
|
||||
return examineUserMapper.list(examineUser);
|
||||
}
|
||||
|
|
|
@ -97,6 +97,7 @@
|
|||
<if test="deptId != null and deptId != ''">
|
||||
and t2.dept_id = #{deptId}
|
||||
</if>
|
||||
${params.dataScope}
|
||||
</where>
|
||||
order by ifnull(manage_score,-1) ${isAsc}
|
||||
</select>
|
||||
|
|
Loading…
Reference in New Issue