generated from root/miduo_server
白名单
parent
cb3ba613c9
commit
14aa8271e6
|
|
@ -128,27 +128,24 @@ public class UserInfoController {
|
|||
String userIds = parameterMap.get("userIds");
|
||||
int type = Integer.parseInt(parameterMap.get("type"));
|
||||
String[] split = userIds.split("#");
|
||||
for (String uid : split){
|
||||
CUserInfo cUserInfo = userInfoDao.findUserInfoByUserId(Integer.parseInt(uid));
|
||||
if (cUserInfo == null){
|
||||
System.out.println("addWhiteList== uid={},cUserInfo is null"+uid);
|
||||
continue;
|
||||
}
|
||||
for (String openid : split){
|
||||
|
||||
if (type == 0){
|
||||
WhiteList whiteList = userInfoDao.findWhiteListInfo(cUserInfo.getOpenId());
|
||||
WhiteList whiteList = userInfoDao.findWhiteListInfo(openid);
|
||||
if (whiteList != null){
|
||||
continue;
|
||||
}
|
||||
whiteList = new WhiteList();
|
||||
whiteList.setWhite_openid(cUserInfo.getOpenId());
|
||||
whiteList.setId(openid);
|
||||
whiteList.setWhite_openid(openid);
|
||||
whiteList.setServerid(0);
|
||||
userInfoDao.addWhiteList(whiteList);
|
||||
}else{
|
||||
WhiteList whiteList = userInfoDao.findWhiteListInfo(cUserInfo.getOpenId());
|
||||
WhiteList whiteList = userInfoDao.findWhiteListInfo(openid);
|
||||
if (whiteList == null){
|
||||
continue;
|
||||
}
|
||||
userInfoDao.delWhiteList(cUserInfo.getOpenId());
|
||||
userInfoDao.delWhiteList(openid);
|
||||
}
|
||||
}
|
||||
return 0;
|
||||
|
|
|
|||
Loading…
Reference in New Issue