客户提单人默认,PC和小程序登录区分

master
shijie 4 years ago
parent 1ea8de62a8
commit 6781c145b2
  1. 2
      dq-financial-guarantee/src/main/java/com/daqing/financial/guarantee/controller/DgApplyAmountInfoController.java
  2. 8
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java
  3. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java

@ -212,6 +212,8 @@ public class DgApplyAmountInfoController implements DgApplyAmountInfoControllerA
if(response.getPresenterId().equals(res.get("id"))){//如果提单人id相同情况下,就往对象里面赋值
response.setAccount(JSONObject.toJSONString(res.get("account")).replace("\"",""));
response.setDeptName(JSONObject.toJSONString(res.get("deptName")).replace("\"",""));
}else{
response.setAccount("客户");
}
}
}

@ -241,7 +241,11 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
}
recordsLog.setAccount(userEntity.getAccount());
recordsLog.setName(name);
recordsLog.setType(0);//用户端类型:0->PC;1->小程序;
if(loginRequest.getType()==3 || loginRequest.getType()==4){//小程序登录
recordsLog.setType(1);//用户端类型:0->PC;1->小程序;
}else{
recordsLog.setType(0);
}
recordsLog.setLoginTime(new Date());
recordsLog.setUserId(userEntity.getId().intValue());
hrmsAccessRecordsLogMapper.insert(recordsLog);
@ -401,7 +405,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
//查询员工数据
int count2 = userLoginDao.selectUserEmpCount(md5UnionId);
if(identify==0){//员工小程序登录
loginRequest.setType(2);
loginRequest.setType(4);
if(count<=0 || count2<=0){//如果微信绑定的不是员工
return ResponseResult.FAIL(60001,"您的账号没有权限,无法登录!");
}

@ -11,7 +11,7 @@ public class LoginRequest {
@ApiModelProperty(value = "手机号码/账号")
private String phone;
@ApiModelProperty(value = "登录类型(1:手机号 2:微信登录 3:客户小程序登录)")
@ApiModelProperty(value = "登录类型(1:手机号 2:微信扫码登录 3:客户小程序登录 4:企业小程序登录)")
private int type;
@ApiModelProperty(value = "微信唯一编号(unionId)")

Loading…
Cancel
Save