From 94adbdfd32bf08ae40b715de4db271d084aed8ff Mon Sep 17 00:00:00 2001 From: liujie <1793218484@qq.com> Date: 星期五, 17 十月 2025 14:31:23 +0800 Subject: [PATCH] app任务 --- ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TAppUserLocationServiceImpl.java | 25 +++++++++++++++++++++---- 1 files changed, 21 insertions(+), 4 deletions(-) diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TAppUserLocationServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TAppUserLocationServiceImpl.java index 77f1a1c..5ad8a5f 100644 --- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TAppUserLocationServiceImpl.java +++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TAppUserLocationServiceImpl.java @@ -5,10 +5,8 @@ import com.ruoyi.common.basic.PageInfo; import com.ruoyi.common.utils.StringUtils; import com.ruoyi.system.mapper.TMajorMapper; -import com.ruoyi.system.model.TAppUserLocation; import com.ruoyi.system.model.TMajor; import com.ruoyi.system.query.TMajorQuery; -import com.ruoyi.system.service.TAppUserLocationService; import com.ruoyi.system.service.TMajorService; import org.springframework.stereotype.Service; @@ -16,12 +14,31 @@ /** * <p> - * 用户轨迹 服务实现类 + * 专业管理 服务实现类 * </p> * * @author xiaochen * @since 2025-09-28 */ @Service -public class TAppUserLocationServiceImpl extends ServiceImpl<TAppUserLocationMapper, TAppUserLocation> implements TAppUserLocationService { +public class TAppUserLocationServiceImpl extends ServiceImpl<TMajorMapper, TMajor> implements TMajorService { + + @Override + public PageInfo<TMajor> pageList(TMajorQuery query) { + PageInfo<TMajor> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize()); + List<TMajor> list = this.baseMapper.pageList(query,pageInfo); + pageInfo.setRecords(list); + return pageInfo; + } + + @Override + public boolean isExit(TMajor dto) { + if(StringUtils.isNotEmpty(dto.getId())){ + // 修改 + return this.count(Wrappers.lambdaQuery(TMajor.class).ne(TMajor::getId, dto.getId()).eq(TMajor::getMajorName, dto.getMajorName())) > 0; + }else { + // 新增 + return this.count(Wrappers.lambdaQuery(TMajor.class).eq(TMajor::getMajorName, dto.getMajorName())) > 0; + } + } } -- Gitblit v1.7.1