From 2fcd97552d16718cc7997629fd637a73a5a4483f Mon Sep 17 00:00:00 2001
From: 郑永安 <zyazyz250@sina.com>
Date: 星期一, 19 六月 2023 14:44:19 +0800
Subject: [PATCH] 删除

---
 src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryItemServiceImpl.java |   64 ++++++++++++++++++++++++++++++++
 1 files changed, 64 insertions(+), 0 deletions(-)

diff --git a/src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryItemServiceImpl.java b/src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryItemServiceImpl.java
new file mode 100644
index 0000000..73b9093
--- /dev/null
+++ b/src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryItemServiceImpl.java
@@ -0,0 +1,64 @@
+package com.gk.firework.Service.ServiceImpl;
+
+import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
+import com.baomidou.mybatisplus.core.metadata.OrderItem;
+import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gk.firework.Domain.DictionaryItemInfo;
+import com.gk.firework.Domain.DictionaryTypeInfo;
+import com.gk.firework.Domain.Utils.PageInfo;
+import com.gk.firework.Mapper.DictionaryItemInfoMapper;
+import com.gk.firework.Service.DictionaryItemService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service("DictionaryItemService")
+public class DictionaryItemServiceImpl extends ServiceImpl<DictionaryItemInfoMapper, DictionaryItemInfo> implements DictionaryItemService {
+
+    @Autowired
+    DictionaryItemInfoMapper dictionaryItemInfoMapper;
+
+    @Override
+    public void selectDataGrid(PageInfo pageInfo) {
+        Page<DictionaryItemInfo> page = new Page<>(pageInfo.getPageIndex(), pageInfo.getPageSize());
+        List<OrderItem> orderItems = new ArrayList<>();
+        OrderItem orderItem = new OrderItem();
+        orderItem.setAsc(true);
+        orderItem.setColumn("sort");
+        orderItems.add(orderItem);
+        page.setOrders(orderItems);
+        List<DictionaryItemInfo> list = dictionaryItemInfoMapper.selectDataGrid(page,pageInfo.getCondition());
+
+        pageInfo.setResult(list);
+        pageInfo.setTotalCount(page.getTotal());
+    }
+
+    @Override
+    public DictionaryItemInfo selctByText(String text) {
+        DictionaryItemInfo dictionaryItemInfo = new DictionaryItemInfo();
+        dictionaryItemInfo.setText(text);
+        QueryWrapper<DictionaryItemInfo> queryWrapper = new QueryWrapper<>(dictionaryItemInfo);
+        return dictionaryItemInfoMapper.selectOne(queryWrapper);
+    }
+
+    @Override
+    public DictionaryItemInfo selctByValue(String value) {
+        DictionaryItemInfo dictionaryItemInfo = new DictionaryItemInfo();
+        dictionaryItemInfo.setValue(value);
+        QueryWrapper<DictionaryItemInfo> queryWrapper = new QueryWrapper<>(dictionaryItemInfo);
+        return dictionaryItemInfoMapper.selectOne(queryWrapper);
+    }
+
+    @Override
+    public List<DictionaryTypeInfo> selectExistInfo(Long id, String value, String text) {
+        return dictionaryItemInfoMapper.selectExistInfo(id,value,text);
+    }
+
+    @Override
+    public List<DictionaryItemInfo> selectByType(String dictionaryType) {
+        return dictionaryItemInfoMapper.selectByType(dictionaryType);
+    }
+}

--
Gitblit v1.9.2