组态添加全局的概念

This commit is contained in:
2025-12-25 20:09:33 +08:00
parent 27aebf2ca4
commit b38d3bad1b
2 changed files with 9 additions and 6 deletions

View File

@@ -25,11 +25,14 @@
<foreach collection="list" index="index" item="item" open="(" separator="," close=")">
#{item}
</foreach>
AND (a.scope = 1
<if test="userId != null and userId != ''">
OR (a.scope = 0 AND a.create_by = #{userId})
</if>
)
<choose>
<when test="userId != null and userId != ''">
AND (a.scope = 1 OR (a.scope = 0 AND a.create_by = #{userId}))
</when>
<otherwise>
AND (a.scope = 1 OR a.scope = 0)
</otherwise>
</choose>
<if test="temp!=null and temp.searchValue != null and temp.searchValue !=''">
AND a.name like concat(concat("%",#{temp.searchValue}),"%")
</if>

View File

@@ -125,7 +125,7 @@ public class CsConfigurationServiceImpl extends ServiceImpl<CsConfigurationMappe
data1.add(DataParam.WIRELESS_PROJECT_ID);
String userId = csConfigurationQueryParam.getCurrentUserId();
String roleCode = csConfigurationQueryParam.getRoleCode();
if (roleCode.indexOf("operation_manager") > 0) {
if (roleCode.contains("operation_manager")) {
userId = null;
}
Page<CsConfigurationPO> csConfigurationPOPage = this.getBaseMapper().queryPage(temppage, csConfigurationQueryParam, data1, userId);