|
|
@@ -312,6 +312,33 @@ public class AuthAccessTokenServiceImpl extends ServiceImpl<AuthAccessTokenMappe
|
|
|
|
|
|
}
|
|
|
|
|
|
+ /**
|
|
|
+ * @desc :离职时候更新 用户的openid current_cp , "joined_cps" 缩减相应的cpid
|
|
|
+ * @author : 姜永辉
|
|
|
+ * @date : 2024-02-20 13:55
|
|
|
+ */
|
|
|
+ @Transactional(rollbackFor = Exception.class)
|
|
|
+ public ResponseResultVO<?> updateClearOpenidFeign(Map<String, Object> map) {
|
|
|
+ String userId = map.get("userId") + "";
|
|
|
+ Integer cpId = Integer.parseInt(map.get("cpId")+"") ;
|
|
|
+ UserLogin userLogin = userMapper.selectById(userId);
|
|
|
+ Integer cpIdNew = null;
|
|
|
+ if (userLogin != null) {
|
|
|
+ List<Integer> joinedCps = new ArrayList<>();
|
|
|
+ joinedCps = userLogin.getJoinedCps();
|
|
|
+ if (joinedCps != null) {
|
|
|
+ List<Integer> joinedCpsNew = new ArrayList<>();
|
|
|
+ joinedCpsNew.add(cpId);
|
|
|
+ joinedCps.removeAll(joinedCpsNew);
|
|
|
+ if (joinedCps != null && joinedCps.size() > 0) {
|
|
|
+ cpIdNew = joinedCps.get(0);
|
|
|
+ }
|
|
|
+ }
|
|
|
+ userMapper.updateClearOpenidFeign(userId, cpIdNew, joinedCps);
|
|
|
+ }
|
|
|
+
|
|
|
+ return ResponseResultUtil.success();
|
|
|
+ }
|
|
|
|
|
|
/**
|
|
|
* @desc : 注册
|