|
@@ -187,6 +187,7 @@ public class LoginAction implements IMINAction {
|
|
|
VmPersonInfExample personex = new VmPersonInfExample();
|
|
|
personex.createCriteria().andChannelEqualTo(channel).andTypeEqualTo(type).andOpenidEqualTo(result.get("openId"));
|
|
|
List<VmPersonInf> perLst = Service.lookup(IMINDataBaseService.class).getMybatisMapper(VmPersonInfMapper.class).selectByExample(personex);
|
|
|
+ String role = "";
|
|
|
if(perLst.size() == 0) {
|
|
|
//获取用户主键
|
|
|
String perId = Service.lookup(IMINDataBaseService.class).getMybatisMapper(SequenceMapper.class).getSequence("VM_PERSON_INF_NO");
|
|
@@ -225,14 +226,14 @@ public class LoginAction implements IMINAction {
|
|
|
VmPersonRoleInfExample vmPersonRoleInfExample = new VmPersonRoleInfExample();
|
|
|
vmPersonRoleInfExample.createCriteria().andBranchIdEqualTo(branchid).andStateEqualTo("00").andPersonIdEqualTo(personId);
|
|
|
List<VmPersonRoleInf> vmPersonRoleInfList = Service.lookup(IMINDataBaseService.class).getMybatisMapper(VmPersonRoleInfMapper.class).selectByExample(vmPersonRoleInfExample);
|
|
|
- String role = "";
|
|
|
+
|
|
|
for (int i = 0; i < vmPersonRoleInfList.size(); i++) {
|
|
|
role += vmPersonRoleInfList.get(i).getRole().concat(",");
|
|
|
}
|
|
|
if(vmPersonRoleInfList.size() != 0){
|
|
|
res.set("isMerchants","1"); //是本机器的商户(是否管理员)
|
|
|
}
|
|
|
- res.set("role",role);
|
|
|
+
|
|
|
//查询是否有所属机器是否有账户
|
|
|
VmAccountExample vmAccountExample = new VmAccountExample();
|
|
|
vmAccountExample.createCriteria().andEquipmentIdEqualTo(equNo).andUsridEqualTo(person.getId()).andChannelEqualTo(person.getChannel());
|
|
@@ -263,6 +264,7 @@ public class LoginAction implements IMINAction {
|
|
|
res.set("equType", vmEquipmentInf.getEquType());
|
|
|
res.set("payment", vmEquipmentInf.getPayment());
|
|
|
res.set("branchName", imBranch.getName()); //商户名称
|
|
|
+ res.set("role",role);
|
|
|
return res;
|
|
|
}
|
|
|
|