问题修复

master
shijie 4 years ago
parent 7e18a07b17
commit d93249b628
  1. 5
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerServiceImpl.java
  2. 2
      dq-financial-crms/src/main/java/com/daqing/financial/crms/service/impl/CustomerWorkbenchServiceImpl.java
  3. 7
      dq-financial-hrms-auth/src/main/java/com/daqing/financial/hrauth/service/impl/UserLoginServiceImpl.java
  4. 2
      dq-framework-model/src/main/java/com/daqing/framework/domain/hrms/request/LoginRequest.java

@ -690,10 +690,7 @@ public class CustomerServiceImpl extends ServiceImpl<CustomerDao, CustomerEntity
if (relatedList.size() > 0) {
crmsCustomerRelatedService.insertCustomerRelated(relatedList);
}
if (customer == true && company > 0) {
return true;
}
return false;
}
}

@ -301,7 +301,7 @@ public class CustomerWorkbenchServiceImpl extends ServiceImpl<CustomerWorkbenchD
@Transactional
public Boolean updateCompanyNew(CompanyCustomerRequest companyCustomerReq) {
Long userId = Long.parseLong("1");//this.getUserId()
Long userId = Long.parseLong(this.getUserId());
companyCustomerReq.setManager(userId);
return customerService.updateCompanyNew(companyCustomerReq);
}

@ -125,6 +125,7 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
public ResponseResult login(LoginRequest loginRequest) {
//判断用户登录方式
UserEntity userEntity = null;
System.out.println("type===================="+loginRequest.getType());
if(loginRequest.getType()==3){//小程序登录
userEntity = baseMapper.xcxLogin(loginRequest);
}else{
@ -395,18 +396,18 @@ public class UserLoginServiceImpl extends ServiceImpl<UserLoginDao, UserEntity>
//根据标识判断是员工还是客户登录,如果为员工登录,则直接登录,无需保存记录,如果为客户登录,则先查询是否已注册
LoginRequest loginRequest = new LoginRequest();
loginRequest.setWechatId(md5UnionId);
loginRequest.setType(3);
loginRequest.setTenDayEffective(2);
//查询员工数据
int count2 = userLoginDao.selectUserEmpCount(md5UnionId);
if(identify==0){//员工小程序登录
loginRequest.setType(2);
if(count<=0 || count2<=0){//如果微信绑定的不是员工
return ResponseResult.FAIL(60001,"您的账号没有权限,无法登录!");
}
}else{//客户小程序登录
//如果员工使用客户小程序登录的情况,关联用户表和员工表查询,如果有数据则代表是员工的数据
loginRequest.setType(3);
//如果同时为员工和客户的身份,则在客户小程序默认使用客户的身份
//或者如果仅为客户身份,则在客户小程序默认使用客户的身份
if((count==2 && count2>0) || (count==1 && count2<1)){

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

Loading…
Cancel
Save