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