fix add orgmanager Role

master
eason.qian 7 years ago
parent 9abd9b36ed
commit f1f1a62e31

@ -24,6 +24,7 @@ public class SendWechatMessage {
private boolean bdleader; private boolean bdleader;
private boolean riskmanager; private boolean riskmanager;
private boolean guest; private boolean guest;
private boolean orgmanager;
public JSONObject insertObject() { public JSONObject insertObject() {
JSONObject res = (JSONObject) JSON.toJSON(this); JSONObject res = (JSONObject) JSON.toJSON(this);
@ -157,4 +158,12 @@ public class SendWechatMessage {
public void setGuest(boolean guest) { public void setGuest(boolean guest) {
this.guest = guest; this.guest = guest;
} }
public boolean isOrgmanager() {
return orgmanager;
}
public void setOrgmanager(boolean orgmanager) {
this.orgmanager = orgmanager;
}
} }

@ -117,6 +117,9 @@ public class WechatMessageServiceImpl implements WechatMessageService {
if(sendWechatMessage.isDirector()){ if(sendWechatMessage.isDirector()){
set = getOpenIdSet(set, ManagerRole.DIRECTOR.getMask()); set = getOpenIdSet(set, ManagerRole.DIRECTOR.getMask());
} }
if(sendWechatMessage.isOrgmanager()){
set = getOpenIdSet(set, ManagerRole.ORG_MANAGER.getMask());
}
for(String open_id : set){ for(String open_id : set){
object.put("open_id",open_id); object.put("open_id",open_id);
sendWecharMessageByOpenId(object); sendWecharMessageByOpenId(object);

@ -37,6 +37,7 @@ public class ManagerInfo {
private boolean bdleader; private boolean bdleader;
private boolean riskmanager; private boolean riskmanager;
private boolean guest; private boolean guest;
private boolean orgmanager;
@JSONField(name = "org_id") @JSONField(name = "org_id")
private Integer orgId; private Integer orgId;
@ -101,6 +102,9 @@ public class ManagerInfo {
if (guest){ if (guest){
role |= ManagerRole.GUEST.getMask(); role |= ManagerRole.GUEST.getMask();
} }
if (orgmanager){
role |= ManagerRole.ORG_MANAGER.getMask();
}
account.put("role", role); account.put("role", role);
if (insert) { if (insert) {
account.put("username", getUsername()); account.put("username", getUsername());
@ -260,4 +264,12 @@ public class ManagerInfo {
public void setGuest(boolean guest) { public void setGuest(boolean guest) {
this.guest = guest; this.guest = guest;
} }
public boolean isOrgmanager() {
return orgmanager;
}
public void setOrgmanager(boolean orgmanager) {
this.orgmanager = orgmanager;
}
} }

@ -51,6 +51,7 @@ public class ManagerAccountServiceImpl implements ManagerAccountsService {
manager.put("bdleader", ManagerRole.BD_LEADER.hasRole(role)); manager.put("bdleader", ManagerRole.BD_LEADER.hasRole(role));
manager.put("riskmanager", ManagerRole.RISK_MANAGER.hasRole(role)); manager.put("riskmanager", ManagerRole.RISK_MANAGER.hasRole(role));
manager.put("guest", ManagerRole.GUEST.hasRole(role)); manager.put("guest", ManagerRole.GUEST.hasRole(role));
manager.put("orgmanager", ManagerRole.ORG_MANAGER.hasRole(role));
} }
return managers; return managers;
} }

@ -83,6 +83,9 @@
<div class="checkbox-inline"> <div class="checkbox-inline">
<label><input type="checkbox" ng-model="params.guest" name="params.guest">GUEST:观察员</label> <label><input type="checkbox" ng-model="params.guest" name="params.guest">GUEST:观察员</label>
</div> </div>
<div class="checkbox-inline">
<label><input type="checkbox" ng-model="params.orgmanager" name="params.orgmanager">ORG_MANAGER:代理商管理</label>
</div>
<div class="form-group"> <div class="form-group">
<label>Title</label> <label>Title</label>
<input ng-model="params.r_title" class="form-control" type="text" required/> <input ng-model="params.r_title" class="form-control" type="text" required/>

@ -95,6 +95,7 @@
<i class="fa fa-male" title="BD Leader" ng-class="{'text-green':manager.bdleader,'text-gray':!manager.bdleader}"></i> <i class="fa fa-male" title="BD Leader" ng-class="{'text-green':manager.bdleader,'text-gray':!manager.bdleader}"></i>
<i class="fa fa-user" title="Risk Manager" ng-class="{'text-green':manager.riskmanager,'text-gray':!manager.riskmanager}"></i> <i class="fa fa-user" title="Risk Manager" ng-class="{'text-green':manager.riskmanager,'text-gray':!manager.riskmanager}"></i>
<i class="fa fa-tripadvisor" title="GUEST" ng-class="{'text-green':manager.guest,'text-gray':!manager.guest}"></i> <i class="fa fa-tripadvisor" title="GUEST" ng-class="{'text-green':manager.guest,'text-gray':!manager.guest}"></i>
<i class="fa fa-user-plus" title="Org Manager" ng-class="{'text-green':manager.orgmanager,'text-gray':!manager.orgmanager}"></i>
</td> </td>
<td> <td>
<a role="button" class="text-bold text-primary" ng-click="modifyManager(manager)">Modify</a> <a role="button" class="text-bold text-primary" ng-click="modifyManager(manager)">Modify</a>

@ -81,6 +81,9 @@
<label ng-if="('00001'|withRole)"> <label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.riskmanager" name="riskmanager">Risk Manager <input type="checkbox" ng-model="manager.riskmanager" name="riskmanager">Risk Manager
</label> </label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.orgmanager" name="orgmanager">Org Manager
</label>
</p> </p>
</div> </div>
<div class="form-group" ng-if="('1'|withRole) && !manager.admin && !manager.operator && !manager.sitemanager && orgs!=null"> <div class="form-group" ng-if="('1'|withRole) && !manager.admin && !manager.operator && !manager.sitemanager && orgs!=null">

@ -90,6 +90,9 @@
<label ng-if="('00001'|withRole)"> <label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.guest" name="guest">Guest <input type="checkbox" ng-model="manager.guest" name="guest">Guest
</label> </label>
<label ng-if="('00001'|withRole)">
<input type="checkbox" ng-model="manager.orgmanager" name="guest">Org Manager
</label>
</p> </p>
</div> </div>
<div class="form-group" ng-if="('1'|withRole) && !manager.admin && !manager.operator && orgs != null"> <div class="form-group" ng-if="('1'|withRole) && !manager.admin && !manager.operator && orgs != null">

Loading…
Cancel
Save