From 59e91a4e9ddaf23cebb12993c774aa899ab22d16 Mon Sep 17 00:00:00 2001
From: 郑永安 <zyazyz250@sina.com>
Date: Mon, 19 Jun 2023 14:22:45 +0800
Subject: [PATCH] 描述
---
src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryTypeServiceImpl.java | 61 ++++++++++++++++++++++++++++++
1 files changed, 61 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryTypeServiceImpl.java b/src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryTypeServiceImpl.java
new file mode 100644
index 0000000..a23b9bf
--- /dev/null
+++ b/src/main/java/com/gk/firework/Service/ServiceImpl/DictionaryTypeServiceImpl.java
@@ -0,0 +1,61 @@
+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.DictionaryTypeInfo;
+import com.gk.firework.Domain.Utils.PageInfo;
+import com.gk.firework.Domain.Utils.StringUtils;
+import com.gk.firework.Mapper.DictionaryTypeInfoMapper;
+import com.gk.firework.Service.DictionaryTypeService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.ArrayList;
+import java.util.List;
+
+@Service("DictionaryTypeService")
+public class DictionaryTypeServiceImpl extends ServiceImpl<DictionaryTypeInfoMapper, DictionaryTypeInfo> implements DictionaryTypeService {
+
+ @Autowired
+ DictionaryTypeInfoMapper dictionaryTypeInfoMapper;
+
+ @Override
+ public void selectDataGrid(PageInfo pageInfo) {
+ Page<DictionaryTypeInfo> page = new Page<>(pageInfo.getPageIndex(), pageInfo.getPageSize());
+ List<OrderItem> orderItems = new ArrayList<>();
+ OrderItem orderItem = new OrderItem();
+ orderItem.setAsc(false);
+ orderItem.setColumn("createddate");
+ orderItems.add(orderItem);
+ page.setOrders(orderItems);
+ List<DictionaryTypeInfo> list = dictionaryTypeInfoMapper.selectDataGrid(page,pageInfo.getCondition());
+
+ pageInfo.setResult(list);
+ pageInfo.setTotalCount(page.getTotal());
+ }
+
+ @Override
+ public DictionaryTypeInfo selctByCode(String code) {
+ DictionaryTypeInfo dictionaryTypeInfo = new DictionaryTypeInfo();
+ dictionaryTypeInfo.setCode(code);
+ dictionaryTypeInfo.setStatus((byte)1);
+ QueryWrapper<DictionaryTypeInfo> queryWrapper = new QueryWrapper<>(dictionaryTypeInfo);
+ return dictionaryTypeInfoMapper.selectOne(queryWrapper);
+ }
+
+ @Override
+ public DictionaryTypeInfo selctByText(String text) {
+ DictionaryTypeInfo dictionaryTypeInfo = new DictionaryTypeInfo();
+ dictionaryTypeInfo.setText(text);
+ dictionaryTypeInfo.setStatus((byte)1);
+ QueryWrapper<DictionaryTypeInfo> queryWrapper = new QueryWrapper<>(dictionaryTypeInfo);
+ return dictionaryTypeInfoMapper.selectOne(queryWrapper);
+ }
+
+ @Override
+ public List<DictionaryTypeInfo> selectExistInfo(Long id, String code, String text) {
+ return dictionaryTypeInfoMapper.selectExistInfo(id, code, text);
+ }
+}
--
Gitblit v1.9.2