|
@@ -0,0 +1,36 @@
|
|
|
+package com.management.platform.service.impl;
|
|
|
+
|
|
|
+
|
|
|
+
|
|
|
+import com.baomidou.mybatisplus.extension.service.impl.ServiceImpl;
|
|
|
+import com.management.platform.entity.UserExclude;
|
|
|
+import com.management.platform.mapper.UserExcludeMapper;
|
|
|
+import com.management.platform.service.UserExcludeService;
|
|
|
+import com.management.platform.util.HttpRespMsg;
|
|
|
+import org.apache.commons.lang3.StringUtils;
|
|
|
+import org.springframework.beans.factory.annotation.Autowired;
|
|
|
+import org.springframework.stereotype.Service;
|
|
|
+@Service
|
|
|
+public class UserExcludeServiceImpl extends ServiceImpl<UserExcludeMapper,UserExclude> implements UserExcludeService{
|
|
|
+
|
|
|
+ @Autowired
|
|
|
+ private UserExcludeMapper userExcludeMapper;
|
|
|
+ @Override
|
|
|
+ public HttpRespMsg insertUserExclude(String userId) {
|
|
|
+ HttpRespMsg msg = new HttpRespMsg();
|
|
|
+
|
|
|
+ if (StringUtils.isNotEmpty(userId)){
|
|
|
+ UserExclude one = userExcludeMapper.selectById(userId);
|
|
|
+ if (one==null){
|
|
|
+ userExcludeMapper.insert(new UserExclude(userId));
|
|
|
+ return msg;
|
|
|
+ }else {
|
|
|
+ msg.setError("已经添加过该人员了");
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+ }
|
|
|
+ msg.setError("获取参数为空");
|
|
|
+ return msg;
|
|
|
+ }
|
|
|
+}
|
|
|
+
|