|  | @@ -72,6 +72,7 @@ public class TenantProxyInfoServiceImpl extends ServiceImpl<TenantProxyInfoDao,
 | 
	
		
			
				|  |  |          this.save(proxyInfo);
 | 
	
		
			
				|  |  |          //添加代理商人员关系表
 | 
	
		
			
				|  |  |          TenantProxyUserRelation userRelation = new TenantProxyUserRelation();
 | 
	
		
			
				|  |  | +        userRelation.setProxyId(proxyInfo.getId());
 | 
	
		
			
				|  |  |          userRelation.setUserId(userId);
 | 
	
		
			
				|  |  |          userRelation.setRank(0);
 | 
	
		
			
				|  |  |          userRelation.setCreateTime(now);
 | 
	
	
		
			
				|  | @@ -94,6 +95,7 @@ public class TenantProxyInfoServiceImpl extends ServiceImpl<TenantProxyInfoDao,
 | 
	
		
			
				|  |  |                  .eq(TenantProxyUserRelation::getParentId, null));
 | 
	
		
			
				|  |  |          //添加代理商人员关系表
 | 
	
		
			
				|  |  |          TenantProxyUserRelation userRelation = new TenantProxyUserRelation();
 | 
	
		
			
				|  |  | +        userRelation.setProxyId(parentProxyUser.getProxyId());
 | 
	
		
			
				|  |  |          userRelation.setParentId(parentId);
 | 
	
		
			
				|  |  |          userRelation.setUserId(userId);
 | 
	
		
			
				|  |  |          userRelation.setRank(parentProxyUser.getRank() + 1);
 | 
	
	
		
			
				|  | @@ -142,16 +144,19 @@ public class TenantProxyInfoServiceImpl extends ServiceImpl<TenantProxyInfoDao,
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 | 
	
		
			
				|  |  |      /**
 | 
	
		
			
				|  |  | -     * 冻结代理商
 | 
	
		
			
				|  |  | +     * 冻结/解冻代理商
 | 
	
		
			
				|  |  |       *
 | 
	
		
			
				|  |  |       * @param userId 代理负责人id
 | 
	
		
			
				|  |  | +     * @param state  状态 0正常 1冻结
 | 
	
		
			
				|  |  |       */
 | 
	
		
			
				|  |  | -    public void freezeProxy(Integer userId) {
 | 
	
		
			
				|  |  | +    public void freezeProxy(Integer userId, Integer state) {
 | 
	
		
			
				|  |  | +        //sysUser表 lock字段 9冻结 0解冻
 | 
	
		
			
				|  |  | +        Integer lockFlag = state == 0 ? state : 9;
 | 
	
		
			
				|  |  |          //先冻结sysUser表
 | 
	
		
			
				|  |  | -        baseMapper.updateProxySysUserLock(userId, 9);
 | 
	
		
			
				|  |  | +        baseMapper.updateProxySysUserLock(userId, lockFlag);
 | 
	
		
			
				|  |  |          //在修改代理商表
 | 
	
		
			
				|  |  |          TenantProxyInfo tenantProxyInfo = this.getOne(Wrappers.<TenantProxyInfo>lambdaUpdate().eq(TenantProxyInfo::getProxyUserId, userId));
 | 
	
		
			
				|  |  | -        tenantProxyInfo.setState(2);
 | 
	
		
			
				|  |  | +        tenantProxyInfo.setState(state);
 | 
	
		
			
				|  |  |          this.updateById(tenantProxyInfo);
 | 
	
		
			
				|  |  |      }
 | 
	
		
			
				|  |  |  
 |