|
@@ -1,6 +1,7 @@
|
|
|
package com.fdkankan.manage.service.impl;
|
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.LambdaQueryWrapper;
|
|
|
+import com.baomidou.mybatisplus.core.conditions.update.LambdaUpdateWrapper;
|
|
|
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
|
|
|
import com.fdkankan.manage.common.PageInfo;
|
|
|
import com.fdkankan.manage.common.ResultCode;
|
|
@@ -19,8 +20,11 @@ import org.springframework.beans.BeanUtils;
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
import org.springframework.stereotype.Service;
|
|
|
|
|
|
+import java.util.ArrayList;
|
|
|
import java.util.List;
|
|
|
import java.util.UUID;
|
|
|
+import java.util.WeakHashMap;
|
|
|
+import java.util.stream.Collectors;
|
|
|
|
|
|
/**
|
|
|
* <p>
|
|
@@ -132,7 +136,14 @@ public class JyPlatformServiceImpl extends ServiceImpl<IJyPlatformMapper, JyPlat
|
|
|
JyUserPlatform jyUserPlatform = jyUserPlatformService.getByIdCard(jyPlatform.getIdCard());
|
|
|
JyUser jyUser = jyUserService.getById(jyUserPlatform.getJyUserId());
|
|
|
sysUserService.updateRoleId(jyUser.getSysUserId(),48);
|
|
|
+ this.updateStatus(jyPlatform.getId(),0);
|
|
|
+ }
|
|
|
|
|
|
+ private void updateStatus(Integer id, Integer status) {
|
|
|
+ LambdaUpdateWrapper<JyPlatform> wrapper = new LambdaUpdateWrapper<>();
|
|
|
+ wrapper.eq(JyPlatform::getId,id);
|
|
|
+ wrapper.set(JyPlatform::getStatus,status);
|
|
|
+ this.update(wrapper);
|
|
|
}
|
|
|
|
|
|
@Override
|
|
@@ -150,7 +161,19 @@ public class JyPlatformServiceImpl extends ServiceImpl<IJyPlatformMapper, JyPlat
|
|
|
sysUserService.updateRoleId(jyUser.getSysUserId(),47);
|
|
|
|
|
|
jyUserPlatformService.updatePlatformId(param.getId(),param.getToPlatformId());
|
|
|
+ this.updateStatus(jyPlatform.getId(),1);
|
|
|
+
|
|
|
|
|
|
+ }
|
|
|
|
|
|
+ @Override
|
|
|
+ public List<String> getIds() {
|
|
|
+ LambdaQueryWrapper<JyPlatform > wrapper = new LambdaQueryWrapper<>();
|
|
|
+ wrapper.eq(JyPlatform::getStatus,0);
|
|
|
+ List<JyPlatform> list = this.list();
|
|
|
+ if(list.isEmpty()){
|
|
|
+ return new ArrayList<>();
|
|
|
+ }
|
|
|
+ return list.stream().map(JyPlatform::getIdCard).collect(Collectors.toList());
|
|
|
}
|
|
|
}
|