提交 0c919b14 作者: zhenjie

添加加盟审批角色分配功能

上级 b8ab2459
...@@ -80,7 +80,7 @@ public enum ResultEnum implements BaseErrorInfoInterface { ...@@ -80,7 +80,7 @@ public enum ResultEnum implements BaseErrorInfoInterface {
CAN_NOT_CHANGE_THE_APPLICATION_OF_OTHERS("36776", "不能变更其他人申请的飞手执照及电子认证"), CAN_NOT_CHANGE_THE_APPLICATION_OF_OTHERS("36776", "不能变更其他人申请的飞手执照及电子认证"),
WX_NOT_SEND_MSG_PARAM_ERROR("5029", "userId和openId至少一个不为空"), WX_NOT_SEND_MSG_PARAM_ERROR("5029", "userId和openId至少一个不为空"),
APPLET_USER_ACCESS_TOKE_ERROR("5031", "获取accessToken签名校验失败"), APPLET_USER_ACCESS_TOKE_ERROR("5031", "获取accessToken签名校验失败"),
WX_NOT_REL_ERROR("5028", "获取微信公众号用户信息失败");; WX_NOT_REL_ERROR("5028", "获取微信公众号用户信息失败");
/** /**
* 错误码 * 错误码
......
...@@ -8,8 +8,10 @@ public enum RoleEnums { ...@@ -8,8 +8,10 @@ public enum RoleEnums {
ADMIN(1, "超级管理员"), ADMIN(1, "超级管理员"),
OPERATOR(2, "运营管理员"), OPERATOR(2, "运营管理员"),
FINANCIAL(3, "财务"), FINANCIAL(3, "财务管理员"),
FRANCHISEE(4, "加盟商"); FRANCHISEE(4, "加盟商"),
SERVICE_FRANCHISEE(5, "服务管理员"),
LEASE_FRANCHISEE(6, "租赁供应商");
RoleEnums(Integer id, String roleName) { RoleEnums(Integer id, String roleName) {
this.id = id; this.id = id;
......
...@@ -212,7 +212,14 @@ public class CooperationServiceImpl implements CooperationService { ...@@ -212,7 +212,14 @@ public class CooperationServiceImpl implements CooperationService {
bUserAccountVO.setPassWord(userAccountVO.getPhoneNum()); bUserAccountVO.setPassWord(userAccountVO.getPhoneNum());
bUserAccountVO.setAlertPwd(userAccountVO.getPhoneNum()); bUserAccountVO.setAlertPwd(userAccountVO.getPhoneNum());
bUserAccountVO.setAccountStatus(1); bUserAccountVO.setAccountStatus(1);
bUserAccountVO.setRoleId(RoleEnums.FRANCHISEE.getId()); // 根据加盟类型分配角色
if (userApplyTagDO.getCooperationTagId().equals(3)) {
bUserAccountVO.setRoleId(RoleEnums.LEASE_FRANCHISEE.getId());
} else if (userApplyTagDO.getCooperationTagId().equals(5)) {
bUserAccountVO.setRoleId(RoleEnums.SERVICE_FRANCHISEE.getId());
} else {
bUserAccountVO.setRoleId(RoleEnums.FRANCHISEE.getId());
}
// 添加单位id // 添加单位id
CompanyInfoDO companyInfo = this.getCompanyInfo(userApplyTagDO); CompanyInfoDO companyInfo = this.getCompanyInfo(userApplyTagDO);
bUserAccountVO.setCompanyId(companyInfo.getId()); bUserAccountVO.setCompanyId(companyInfo.getId());
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论