| | |
| | | |
| | | 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; |
| | |
| | | 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 { |