package com.ruoyi.system.service.impl; import com.baomidou.mybatisplus.core.toolkit.Wrappers; import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl; import com.ruoyi.common.basic.PageInfo; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.mapper.TLargeOrganizationMapper; import com.ruoyi.system.model.TAppUser; import com.ruoyi.system.model.TLargeOrganization; import com.ruoyi.system.model.TLargeOrganization; import com.ruoyi.system.query.TLargeOrganizationQuery; import com.ruoyi.system.service.TLargeOrganizationService; import org.springframework.stereotype.Service; import java.util.List; /** *

* 大屏-社会组织 服务实现类 *

* * @author xiaochen * @since 2025-11-11 */ @Service public class TLargeOrganizationServiceImpl extends ServiceImpl implements TLargeOrganizationService { @Override public boolean isExit(TLargeOrganization dto) { if(StringUtils.isNotEmpty(dto.getId())){ // 修改 return this.count(Wrappers.lambdaQuery(TLargeOrganization.class).ne(TLargeOrganization::getId, dto.getId()).eq(TLargeOrganization::getOrganizationName, dto.getOrganizationName())) > 0; }else { // 新增 return this.count(Wrappers.lambdaQuery(TLargeOrganization.class).eq(TLargeOrganization::getOrganizationName, dto.getOrganizationName())) > 0; } } @Override public PageInfo pageList(TLargeOrganizationQuery query) { PageInfo pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); List list = this.baseMapper.pageList(query,pageInfo); pageInfo.setRecords( list); return pageInfo; } }