KKSU
2024-01-09 cf68ee0531ebadbc7b27b8e6e56b9f3c4e893e05
src/main/java/com/xcong/farmer/cms/core/handler/FriendlyDataParserHandler.java
@@ -2,6 +2,7 @@
import cn.hutool.core.bean.BeanUtil;
import cn.hutool.core.collection.CollUtil;
import cn.hutool.core.util.StrUtil;
import com.xcong.farmer.cms.core.node.AttrNode;
import com.xcong.farmer.cms.core.tag.data.FriendlyData;
import com.xcong.farmer.cms.core.tag.model.Ad;
@@ -26,7 +27,13 @@
        Long companyId = (Long) attrNode.getSystemDataValue("companyId");
        Friendly param = (Friendly) attrNode.getParam();
        List<CmsFriendlyLinkEntity> friendlies = cmsFriendlyLinkMapper.selectByGroupIdAndCompanyId(Long.parseLong(param.getGroupId()), companyId);
        List<CmsFriendlyLinkEntity> friendlies = null;
        if (StrUtil.isNotBlank(param.getGroupId())) {
            friendlies = cmsFriendlyLinkMapper.selectByGroupIdAndCompanyId(Long.parseLong(param.getGroupId()), companyId);
        } else {
            friendlies = cmsFriendlyLinkMapper.selectByGroupCodeAndCompanyId(param.getCode(), companyId);
        }
        if (CollUtil.isEmpty(friendlies)) {
            attrNode.setData(new FriendlyData());
        } else {