文档库-飞书消息, 订阅领域管理

This commit is contained in:
zhn
2022-04-08 12:01:22 +08:00
parent 0d60dad75a
commit 7efae08af1
4 changed files with 57 additions and 6 deletions
@@ -38,4 +38,6 @@ public interface SysCategoryMapper extends BaseMapper<SysCategory> {
*/
@Update("update sys_category set del_flag = #{flag,jdbcType=INTEGER} where id = #{id,jdbcType=VARCHAR}")
public void updateDictDelFlag(@Param("flag") int delFlag, @Param("id") String id);
public String getFieldInfo(@Param("fieldName") String fieldName);
}
@@ -36,4 +36,11 @@
</if>
order by create_time desc
</select>
<select id="getFieldInfo" resultType="java.lang.String">
select dict_id from onl_cgform_field
where db_field_name =#{fieldName}
and is_model = 1
and is_delete = 0
</select>
</mapper>
@@ -21,6 +21,7 @@ import com.jero.modules.system.service.ISysCategoryService;
import com.jero.modules.system.util.TreeUtils;
import org.apache.commons.collections4.CollectionUtils;
import org.apache.commons.lang3.RandomUtils;
import org.apache.commons.lang3.StringUtils;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;
import org.springframework.transaction.annotation.Transactional;
@@ -234,7 +235,14 @@ public class SysCategoryServiceImpl extends ServiceImpl<SysCategoryMapper, SysCa
@Override
public List<SysCategoryTreeVO> getSysCategoryTree() {
try {
List<SysCategory> list = super.baseMapper.selectList(new QueryWrapper<>());
//只查询技术领域的technology_territory
String dictId = sysCategoryMapper.getFieldInfo("technology_territory");
List<SysCategory> list = new ArrayList<>();
if(StringUtils.isNotBlank(dictId)){
LambdaQueryWrapper<SysCategory> lambdaQueryWrapper = new LambdaQueryWrapper<>();
lambdaQueryWrapper.in(SysCategory::getSysDictId,dictId);
list = super.baseMapper.selectList(lambdaQueryWrapper);
}
List<SysCategoryTreeVO> tree = new ArrayList<>();
if(CollectionUtils.isNotEmpty(list)){
tree = TreeUtils.getSysCategoryTree(list);