Commit d6973de7 authored by 赵啸非's avatar 赵啸非

添加删除站点后通知门户服务更新

parent 2569982a
...@@ -81,6 +81,8 @@ public class UserEntity extends UserEntityExt implements IUser { ...@@ -81,6 +81,8 @@ public class UserEntity extends UserEntityExt implements IUser {
*/ */
private Long siteId; private Long siteId;
private String siteIds;
/** /**
* 用户状态,0:停用,1:正常,2:冻结,3:销户,4:离职,默认1 * 用户状态,0:停用,1:正常,2:冻结,3:销户,4:离职,默认1
*/ */
...@@ -130,6 +132,7 @@ public class UserEntity extends UserEntityExt implements IUser { ...@@ -130,6 +132,7 @@ public class UserEntity extends UserEntityExt implements IUser {
} }
/** /**
* 获取 登录名 * 获取 登录名
* @return loginName * @return loginName
...@@ -329,7 +332,11 @@ public class UserEntity extends UserEntityExt implements IUser { ...@@ -329,7 +332,11 @@ public class UserEntity extends UserEntityExt implements IUser {
@Override @Override
public String getSiteIds() { public String getSiteIds() {
return ""; return this.siteIds;
}
public void setSiteIds(String siteIds) {
this.siteIds = siteIds;
} }
/** /**
......
...@@ -9,6 +9,7 @@ import com.mortals.xhx.base.system.user.model.UserEntity; ...@@ -9,6 +9,7 @@ import com.mortals.xhx.base.system.user.model.UserEntity;
import com.mortals.xhx.base.system.user.model.UserQuery; import com.mortals.xhx.base.system.user.model.UserQuery;
import com.mortals.xhx.base.system.user.service.UserService; import com.mortals.xhx.base.system.user.service.UserService;
import com.mortals.xhx.common.pdu.user.UserPdu; import com.mortals.xhx.common.pdu.user.UserPdu;
import com.mortals.xhx.common.utils.BeanUtil;
import com.mortals.xhx.common.utils.SyncTreeSiteThread; import com.mortals.xhx.common.utils.SyncTreeSiteThread;
import com.mortals.xhx.feign.user.IUserFeign; import com.mortals.xhx.feign.user.IUserFeign;
import com.mortals.xhx.module.site.model.SiteTreeSelect; import com.mortals.xhx.module.site.model.SiteTreeSelect;
...@@ -16,6 +17,7 @@ import com.mortals.xhx.module.site.service.SiteService; ...@@ -16,6 +17,7 @@ import com.mortals.xhx.module.site.service.SiteService;
import lombok.extern.slf4j.Slf4j; import lombok.extern.slf4j.Slf4j;
import org.apache.commons.logging.Log; import org.apache.commons.logging.Log;
import org.apache.commons.logging.LogFactory; import org.apache.commons.logging.LogFactory;
import org.springframework.beans.BeanUtils;
import org.springframework.beans.factory.annotation.Autowired; import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty; import org.springframework.boot.autoconfigure.condition.ConditionalOnProperty;
import org.springframework.stereotype.Component; import org.springframework.stereotype.Component;
...@@ -61,7 +63,9 @@ public class DemoStartedService implements IApplicationStartedService { ...@@ -61,7 +63,9 @@ public class DemoStartedService implements IApplicationStartedService {
userFeign.list(new UserPdu()).getData().getData().stream().forEach(userPdu->{ userFeign.list(new UserPdu()).getData().getData().stream().forEach(userPdu->{
Context context = new Context(); Context context = new Context();
IUser user = new IUser() {
/* IUser user = new IUser() {
@Override @Override
public Long getId() { public Long getId() {
return userPdu.getId(); return userPdu.getId();
...@@ -156,9 +160,12 @@ public class DemoStartedService implements IApplicationStartedService { ...@@ -156,9 +160,12 @@ public class DemoStartedService implements IApplicationStartedService {
public String getMenuUrl() { public String getMenuUrl() {
return null; return null;
} }
}; };*/
UserEntity entity = new UserEntity();
entity.initAttrValue();
BeanUtils.copyProperties(userPdu, entity, BeanUtil.getNullPropertyNames(userPdu));
context.setUser(user); context.setUser(entity);
ThreadPool.getInstance().execute(new SyncTreeSiteThread(siteService,context)); ThreadPool.getInstance().execute(new SyncTreeSiteThread(siteService,context));
}); });
} }
......
...@@ -74,7 +74,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -74,7 +74,7 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
userService.save(entity); userService.save(entity);
Context context = new Context(); Context context = new Context();
IUser iUser = new IUser() { /* IUser iUser = new IUser() {
@Override @Override
public Long getId() { public Long getId() {
return userPdu.getId(); return userPdu.getId();
...@@ -169,8 +169,8 @@ public class SyncUserTaskImpl implements ITaskExcuteService { ...@@ -169,8 +169,8 @@ public class SyncUserTaskImpl implements ITaskExcuteService {
public String getMenuUrl() { public String getMenuUrl() {
return null; return null;
} }
}; };*/
context.setUser(iUser); context.setUser(entity);
new Thread(new SyncTreeSiteThread(siteService, context)).start(); new Thread(new SyncTreeSiteThread(siteService, context)).start();
} }
}); });
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment