Commit 4e02e46c by guojuxing

账号分组接口

parent 9b496dd6
......@@ -33,4 +33,16 @@ public enum AccountGroupMemberTypeEnum {
public void setMessage(String message) {
this.message = message;
}
public static String getNameByCode(Integer code) {
if (code == null) {
return "--";
}
for (AccountGroupMemberTypeEnum accountGroupMemberTypeEnum : values()) {
if (code.intValue() == accountGroupMemberTypeEnum.getCode()) {
return accountGroupMemberTypeEnum.getMessage();
}
}
return "--";
}
}
package com.gic.auth.dto;
import com.gic.auth.constant.AccountGroupMemberTypeEnum;
import java.io.Serializable;
/**
* 账号分组组员
* @ClassName: AccountGroupMemberDTO

* @Description: 

* @author guojuxing

* @date 2019/10/31 4:46 PM

*/
public class AccountGroupMemberDTO implements Serializable{
private static final long serialVersionUID = 907070727294627065L;
/**
* 管理员/协作人
*/
private Integer userId;
/**
* 手机号码
*/
private String phone;
/**
* 组员名称
*/
private String memberName;
/**
* 1:管理员2:协作人
*/
private Integer type;
private String typeName;
private Integer accountGroupId;
private Integer enterpriseId;
public Integer getUserId() {
return userId;
}
public void setUserId(Integer userId) {
this.userId = userId;
}
public String getPhone() {
return phone;
}
public void setPhone(String phone) {
this.phone = phone;
}
public String getMemberName() {
return memberName;
}
public void setMemberName(String memberName) {
this.memberName = memberName;
}
public Integer getType() {
return type;
}
public void setType(Integer type) {
this.type = type;
}
public String getTypeName() {
return AccountGroupMemberTypeEnum.getNameByCode(type);
}
public Integer getAccountGroupId() {
return accountGroupId;
}
public void setAccountGroupId(Integer accountGroupId) {
this.accountGroupId = accountGroupId;
}
public Integer getEnterpriseId() {
return enterpriseId;
}
public void setEnterpriseId(Integer enterpriseId) {
this.enterpriseId = enterpriseId;
}
}
......@@ -2,6 +2,7 @@ package com.gic.auth.service;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.dto.AccountGroupDTO;
import com.gic.auth.dto.AccountGroupMemberDTO;
import java.util.List;
......@@ -64,4 +65,56 @@ public interface AccountGroupApiService {
* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> sort(Integer accountGroupId, Integer sort);
/**
* 查询不在对应账号分组内的所有组员
* @Title: listNotInAccountGroupByAccountGroupId

* @Description:

 * @author guojuxing
* @param accountGroupId

* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.UserListDTO>>


 */
ServiceResponse<List<AccountGroupMemberDTO>> listNotInAccountGroupByAccountGroupId(Integer accountGroupId);
/**
* 查询在对应账号分组内的所有组员
* @Title: listNotInAccountGroupByAccountGroupId

* @Description:

 * @author guojuxing
* @param accountGroupId

* @return com.gic.api.base.commons.ServiceResponse<java.util.List<com.gic.auth.dto.UserListDTO>>


 */
ServiceResponse<List<AccountGroupMemberDTO>> listInAccountGroupByAccountGroupId(Integer accountGroupId);
/**
* 批量保存分组组员,必须有分组ID、管理员/协作人ID、类型
* @Title: saveAccountGroupRelFetch

* @Description:

 * @author guojuxing
* @param list

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> saveAccountGroupRelFetch(List<AccountGroupMemberDTO> list);
/**
* 管理员批量分组
* @Title: groupingOfUser

* @Description:

 * @author guojuxing
* @param userIdList
* @param accountGroupId

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> groupingOfUser(List<Integer> userIdList, List<Integer> accountGroupId, Integer enterpriseId);
/**
* 协作人批量分组
* @Title: groupingOfCollaborator

* @Description:

 * @author guojuxing
* @param collaboratorIdList
* @param accountGroupId

* @return com.gic.api.base.commons.ServiceResponse<java.lang.Void>


 */
ServiceResponse<Void> groupingOfCollaborator(List<Integer> collaboratorIdList, List<Integer> accountGroupId, Integer enterpriseId);
}
......@@ -2,6 +2,7 @@ package com.gic.auth.service;
import com.gic.api.base.commons.Page;
import com.gic.api.base.commons.ServiceResponse;
import com.gic.auth.dto.AccountGroupMemberDTO;
import com.gic.auth.dto.UserDTO;
import com.gic.auth.dto.UserListDTO;
import com.gic.auth.qo.UserListQO;
......
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