From 72aaf45389cd09c206ee1b90f0c7f5bf59782930 Mon Sep 17 00:00:00 2001
From: xuhy <3313886187@qq.com>
Date: 星期三, 22 十月 2025 18:27:49 +0800
Subject: [PATCH] Merge remote-tracking branch 'origin/master'
---
ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsTypeServiceImpl.java | 23 +++++++++++++++++++++++
1 files changed, 23 insertions(+), 0 deletions(-)
diff --git a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsTypeServiceImpl.java b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsTypeServiceImpl.java
index 8f48e2c..6ca11a2 100644
--- a/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsTypeServiceImpl.java
+++ b/ruoyi-system/src/main/java/com/ruoyi/system/service/impl/TErpGoodsTypeServiceImpl.java
@@ -1,10 +1,16 @@
package com.ruoyi.system.service.impl;
+import com.baomidou.mybatisplus.core.toolkit.Wrappers;
+import com.ruoyi.common.basic.PageInfo;
+import com.ruoyi.common.utils.StringUtils;
import com.ruoyi.system.model.TErpGoodsType;
import com.ruoyi.system.mapper.TErpGoodsTypeMapper;
+import com.ruoyi.system.query.TErpGoodsTypeQuery;
import com.ruoyi.system.service.TErpGoodsTypeService;
import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
import org.springframework.stereotype.Service;
+
+import java.util.List;
/**
* <p>
@@ -16,5 +22,22 @@
*/
@Service
public class TErpGoodsTypeServiceImpl extends ServiceImpl<TErpGoodsTypeMapper, TErpGoodsType> implements TErpGoodsTypeService {
+ @Override
+ public boolean isExit(TErpGoodsType dto) {
+ if(StringUtils.isNotEmpty(dto.getId())){
+ // 修改
+ return this.count(Wrappers.lambdaQuery(TErpGoodsType.class).ne(TErpGoodsType::getId, dto.getId()).eq(TErpGoodsType::getTypeName, dto.getTypeName())) > 0;
+ }else {
+ // 新增
+ return this.count(Wrappers.lambdaQuery(TErpGoodsType.class).eq(TErpGoodsType::getTypeName, dto.getTypeName())) > 0;
+ }
+ }
+ @Override
+ public PageInfo<TErpGoodsType> pageList(TErpGoodsTypeQuery query) {
+ PageInfo<TErpGoodsType> pageInfo = new PageInfo<>(query.getPageNum(), query.getPageSize());
+ List<TErpGoodsType> list = this.baseMapper.pageList(query,pageInfo);
+ pageInfo.setRecords(list);
+ return pageInfo;
+ }
}
--
Gitblit v1.7.1