Commit 472f5fa7 by guojuxing

联合商户账号分组组件

parent f202e2d8
......@@ -12,9 +12,12 @@ import com.gic.auth.service.AccountGroupApiService;
import com.gic.auth.service.CollaboratorApiService;
import com.gic.auth.service.UserApiService;
import com.gic.auth.web.vo.AccountGroupListVO;
import com.gic.auth.web.vo.UnionEnterpriseAccountGroupListVO;
import com.gic.commons.util.EntityUtil;
import com.gic.commons.webapi.reponse.RestResponse;
import com.gic.download.utils.OperationResultUtils;
import com.gic.enterprise.error.ErrorCode;
import com.gic.enterprise.service.UnionEnterpriseAuthApiService;
import com.gic.enterprise.utils.ResultControllerUtils;
import com.gic.enterprise.utils.UserDetailUtils;
import org.apache.commons.collections.CollectionUtils;
......@@ -49,6 +52,8 @@ public class AccountGroupController {
private CollaboratorApiService collaboratorApiService;
@Autowired
private UserApiService userApiService;
@Autowired
private UnionEnterpriseAuthApiService unionEnterpriseAuthApiService;
/**
* 新增账号分组
......@@ -85,6 +90,21 @@ public class AccountGroupController {
AccountGroupListVO.class);
}
@RequestMapping("/list-union-enterprise")
public RestResponse listUnionEnterprise(Integer ownEnterpriseId) {
UnionEnterpriseAccountGroupListVO vo = new UnionEnterpriseAccountGroupListVO();
ServiceResponse<List<AccountGroupDTO>> ownResponse = accountGroupApiService.listNoMemberByEnterpriseId(ownEnterpriseId);
if (ownResponse.isSuccess()) {
vo.setOwnEnterpriseAccountGroup(EntityUtil.changeEntityListNew(AccountGroupListVO.class, ownResponse.getResult()));
}
ServiceResponse<List<AccountGroupDTO>> currentResponse = accountGroupApiService
.listNoMemberByEnterpriseId(UserDetailUtils.getUserDetail().getEnterpriseId());
if (currentResponse.isSuccess()) {
vo.setCurrentEnterpriseAccountGroup(EntityUtil.changeEntityListNew(AccountGroupListVO.class, currentResponse.getResult()));
}
return RestResponse.success(vo);
}
@RequestMapping("/delete")
public RestResponse deleteAccountGroup(Integer accountGroupId) {
ServiceResponse<AccountGroupDTO> result = accountGroupApiService.deleteByAccountGroupId(accountGroupId);
......
......@@ -263,7 +263,6 @@ public class LoginController {
if (response.isSuccess()) {
List<MenuDTO> list = response.getResult();
//gic平台的菜单数据塞本地缓存
RedisUtil.delLocalCache(MENU_LOCAL_CACHE_KEY);
RedisUtil.setLocalCache(MENU_LOCAL_CACHE_KEY, EntityUtil.changeEntityListNew(MenuInfo.class, list), null);
}
}
......
package com.gic.auth.web.vo;
import java.io.Serializable;
import java.util.List;
/**
* 联合商户账号分组组件
* @ClassName:
* @Description: 

* @author guojuxing

* @date 2021/2/25 1:53 PM

*/
public class UnionEnterpriseAccountGroupListVO implements Serializable{
private static final long serialVersionUID = 6530622928732661742L;
/**
* 自有商户
*/
private List<AccountGroupListVO> ownEnterpriseAccountGroup;
/**
* 当前本商户
*/
private List<AccountGroupListVO> currentEnterpriseAccountGroup;
public List<AccountGroupListVO> getOwnEnterpriseAccountGroup() {
return ownEnterpriseAccountGroup;
}
public UnionEnterpriseAccountGroupListVO setOwnEnterpriseAccountGroup(List<AccountGroupListVO> ownEnterpriseAccountGroup) {
this.ownEnterpriseAccountGroup = ownEnterpriseAccountGroup;
return this;
}
public List<AccountGroupListVO> getCurrentEnterpriseAccountGroup() {
return currentEnterpriseAccountGroup;
}
public UnionEnterpriseAccountGroupListVO setCurrentEnterpriseAccountGroup(List<AccountGroupListVO> currentEnterpriseAccountGroup) {
this.currentEnterpriseAccountGroup = currentEnterpriseAccountGroup;
return this;
}
@Override
public String toString() {
return "UnionEnterpriseAccountGroupListVO{" +
"ownEnterpriseAccountGroup=" + ownEnterpriseAccountGroup +
", currentEnterpriseAccountGroup=" + currentEnterpriseAccountGroup +
'}';
}
}
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