From 2e89bb115815ca329c6fd54d6d987779791c657c Mon Sep 17 00:00:00 2001
From: value <z1292839451@163.com>
Date: 星期四, 30 五月 2024 22:35:37 +0800
Subject: [PATCH] 大改用户和客户

---
 user-server/src/main/java/com/yuanchu/mom/service/impl/CustomServiceImpl.java |   25 +++++++++++++++++--------
 1 files changed, 17 insertions(+), 8 deletions(-)

diff --git a/user-server/src/main/java/com/yuanchu/mom/service/impl/CustomServiceImpl.java b/user-server/src/main/java/com/yuanchu/mom/service/impl/CustomServiceImpl.java
index ed73a53..acc4995 100644
--- a/user-server/src/main/java/com/yuanchu/mom/service/impl/CustomServiceImpl.java
+++ b/user-server/src/main/java/com/yuanchu/mom/service/impl/CustomServiceImpl.java
@@ -5,14 +5,9 @@
 import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
 import com.yuanchu.mom.common.GetLook;
 import com.yuanchu.mom.common.PrintChina;
-import com.yuanchu.mom.dto.Custom;
-import com.yuanchu.mom.dto.UserPageDto;
+import com.yuanchu.mom.pojo.Custom;
 import com.yuanchu.mom.mapper.CustomMapper;
-import com.yuanchu.mom.mapper.PowerMapper;
-import com.yuanchu.mom.mapper.UserMapper;
-import com.yuanchu.mom.pojo.Power;
 import com.yuanchu.mom.service.CustomService;
-import com.yuanchu.mom.service.PowerService;
 import com.yuanchu.mom.utils.QueryWrappers;
 import lombok.AllArgsConstructor;
 import org.springframework.stereotype.Service;
@@ -47,14 +42,28 @@
 
     @Override
     public int delCustomById(Integer id) {
-        return customMapper.delCustomById(id);
+        return customMapper.deleteById(id);
     }
 
     @Override
     public int addCustom(Custom custom) {
-        custom.setIsCustom(1);
+        return customMapper.insert(custom);
+    }
+
+    @Override
+    public int upCustom(Custom custom) {
         return customMapper.updateById(custom);
     }
+
+    @Override
+    public List<Custom> selectCustomEnum() {
+        return customMapper.selectList(Wrappers.<Custom>lambdaQuery().select(Custom::getId,Custom::getCompany));
+    }
+
+    @Override
+    public Custom getCustomId(String company) {
+        return customMapper.selectOne(Wrappers.<Custom>lambdaQuery().eq(Custom::getCompany, company).last("limit 1"));
+    }
 }
 
 

--
Gitblit v1.9.3