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/AuthorizationServiceImpl.java | 49 +++++++++++++++++++++++++++++++++++++++++++++++++
1 files changed, 49 insertions(+), 0 deletions(-)
diff --git a/src/main/java/com/gk/firework/Service/ServiceImpl/AuthorizationServiceImpl.java b/src/main/java/com/gk/firework/Service/ServiceImpl/AuthorizationServiceImpl.java
new file mode 100644
index 0000000..8a25e48
--- /dev/null
+++ b/src/main/java/com/gk/firework/Service/ServiceImpl/AuthorizationServiceImpl.java
@@ -0,0 +1,49 @@
+package com.gk.firework.Service.ServiceImpl;
+
+import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
+import com.gk.firework.Domain.AuthorizationInfo;
+import com.gk.firework.Mapper.AuthorizationInfoMapper;
+import com.gk.firework.Service.AuthorizationService;
+import org.springframework.beans.factory.annotation.Autowired;
+import org.springframework.stereotype.Service;
+
+import java.util.List;
+
+/**
+ * @author : jingjy
+ * @date : 2021/7/2 9:41
+ */
+@Service("AuthorizationService")
+public class AuthorizationServiceImpl extends ServiceImpl<AuthorizationInfoMapper, AuthorizationInfo> implements AuthorizationService {
+ @Autowired
+ AuthorizationInfoMapper authorizationInfoMapper;
+
+ @Override
+ public AuthorizationInfo selectByUser(String enterprisenumber, String authcode) {
+ return authorizationInfoMapper.selectByUser(enterprisenumber, authcode);
+ }
+
+ @Override
+ public List<AuthorizationInfo> getAuthByEnterprise(String enterpriseNumber) {
+ LambdaQueryWrapper<AuthorizationInfo>wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(AuthorizationInfo::getEnterprisenumber,enterpriseNumber);
+ return authorizationInfoMapper.selectList(wrapper);
+ }
+
+ @Override
+ public boolean checkPrefixExist(String prefix) {
+ LambdaQueryWrapper<AuthorizationInfo>wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(AuthorizationInfo::getAuthcodeprefix,prefix);
+ AuthorizationInfo authorizationInfo = authorizationInfoMapper.selectOne(wrapper);
+ return authorizationInfo != null;
+ }
+
+ @Override
+ public boolean checkCodeExist(String code) {
+ LambdaQueryWrapper<AuthorizationInfo>wrapper = new LambdaQueryWrapper<>();
+ wrapper.eq(AuthorizationInfo::getAuthcode,code);
+ AuthorizationInfo authorizationInfo = authorizationInfoMapper.selectOne(wrapper);
+ return authorizationInfo != null;
+ }
+}
--
Gitblit v1.9.2