fix
Helius
2022-07-04 aa01829055f7711f6b46c40632997641e1a9e38d
fix
3 files modified
8 ■■■■ changed files
src/main/java/com/xcong/farmer/cms/modules/system/mapper/ColumnMapper.java 2 ●●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/ColumnServiceImpl.java 2 ●●● patch | view | raw | blame | history
src/main/resources/mapper/ColumnMapper.xml 4 ●●●● patch | view | raw | blame | history
src/main/java/com/xcong/farmer/cms/modules/system/mapper/ColumnMapper.java
@@ -14,4 +14,6 @@
    IPage<AdminColumnVo> selectAdminColumnVoInPage(Page<AdminColumnVo> page, @Param("record")ColumnEntity columnEntity);
    List<AdminColumnVo> selectColumnInListByParentId(@Param("parentId")Long parentidDefault,@Param("belongId")Long belongId);
    ColumnEntity selectByCodeAndCompanyId(@Param("code") String code, @Param("companyId") Long companyId);
}
src/main/java/com/xcong/farmer/cms/modules/system/service/Impl/ColumnServiceImpl.java
@@ -161,7 +161,7 @@
                ArticleEntity articleEntity = articleMapper.selectById(Long.parseLong(columnEntity.getTargetUrl()));
                adminSeeColumnInfoVo.setTargetName(articleEntity.getTitle());
            } else if (columnEntity.getTargetType() == 2) {
                ColumnEntity column = this.baseMapper.selectById(Long.parseLong(columnEntity.getTargetUrl()));
                ColumnEntity column = this.baseMapper.selectByCodeAndCompanyId(columnEntity.getTargetUrl(), LoginUserUtil.getCompanyId());
                adminSeeColumnInfoVo.setTargetName(column.getColumnName());
            }
        }
src/main/resources/mapper/ColumnMapper.xml
@@ -29,4 +29,8 @@
        order by a.order_num ASC,a.create_time desc
    </select>
    <select id="selectByCodeAndCompanyId" resultType="com.xcong.farmer.cms.modules.system.entity.ColumnEntity">
        select * from t_column
        where column_code=#{code} and company_id=#{companyId}
    </select>
</mapper>