Commit 9ef4e90b by Water Wang

optimize

parent 7bf12e23
package com.yd.api.practitioner; package com.yd.api.practitioner;
import com.test.web.vo.TestRequestVO;
import com.yd.api.practitioner.service.PractitionerBasicInfoService; import com.yd.api.practitioner.service.PractitionerBasicInfoService;
import com.yd.api.practitioner.service.PractitionerService; import com.yd.api.practitioner.service.PractitionerService;
import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO; import com.yd.api.practitioner.vo.login.PractitionerLoginRequestVO;
...@@ -8,7 +7,6 @@ import com.yd.api.practitioner.vo.login.PractitionerLoginResponseVO; ...@@ -8,7 +7,6 @@ import com.yd.api.practitioner.vo.login.PractitionerLoginResponseVO;
import com.yd.api.practitioner.vo.media.MediaGetReqVO; import com.yd.api.practitioner.vo.media.MediaGetReqVO;
import com.yd.api.practitioner.vo.media.MediaGetRespVO; import com.yd.api.practitioner.vo.media.MediaGetRespVO;
import com.yd.api.practitioner.vo.opportunity.*; import com.yd.api.practitioner.vo.opportunity.*;
import com.yd.api.practitioner.vo.payscale.PayScalePdfResponseVO;
import com.yd.api.practitioner.vo.payscale.PayScaleQueryRequestVO; import com.yd.api.practitioner.vo.payscale.PayScaleQueryRequestVO;
import com.yd.api.practitioner.vo.payscale.PayScaleQueryResponseVO; import com.yd.api.practitioner.vo.payscale.PayScaleQueryResponseVO;
import com.yd.api.practitioner.vo.policy.PolicyListQueryRequestVO; import com.yd.api.practitioner.vo.policy.PolicyListQueryRequestVO;
...@@ -27,11 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired; ...@@ -27,11 +25,7 @@ import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.http.MediaType; import org.springframework.http.MediaType;
import org.springframework.stereotype.Controller; import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.*; import org.springframework.web.bind.annotation.*;
import javax.servlet.http.HttpServletRequest;
import javax.servlet.http.HttpServletResponse; import javax.servlet.http.HttpServletResponse;
import java.io.*;
import java.net.URLEncoder;
@Controller @Controller
@RestController @RestController
......
...@@ -174,6 +174,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -174,6 +174,7 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
isSpecial = mobileSpecials.contains(mobileNo); isSpecial = mobileSpecials.contains(mobileNo);
} }
if(28L == practitionerType || isSpecial){//只有寿险的经纪人和注册为经纪人的员工才能登录 if(28L == practitionerType || isSpecial){//只有寿险的经纪人和注册为经纪人的员工才能登录
PractitionerBasicInfo practitionerBasicInfo = aclPractitionerDALService.findByMobileNoE(mobileNo);
Long practitionerId = practitionerInfo.getPractitionerId(); Long practitionerId = practitionerInfo.getPractitionerId();
Long customerId = practitionerInfo.getCustomerId(); Long customerId = practitionerInfo.getCustomerId();
AclCustomer customer = aclCustomerDALService.findById(customerId); AclCustomer customer = aclCustomerDALService.findById(customerId);
...@@ -193,6 +194,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -193,6 +194,9 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
basicInfo.setSubordinateLeader(subordinateInfo.getSubordinateLeader()); basicInfo.setSubordinateLeader(subordinateInfo.getSubordinateLeader());
} }
} }
if(practitionerBasicInfo != null){
responseVO.setPractitionerIdEG(practitionerBasicInfo.getPractitionerId());
}
//获取用户的登录次数 //获取用户的登录次数
List<AclCustomerLog> customerLogList = aclCustomerLogDALService.findLogInfoByCustomerId(customerId); List<AclCustomerLog> customerLogList = aclCustomerLogDALService.findLogInfoByCustomerId(customerId);
int logTimes = (customerLogList.isEmpty()) ? 0 : customerLogList.size(); int logTimes = (customerLogList.isEmpty()) ? 0 : customerLogList.size();
...@@ -225,7 +229,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service. ...@@ -225,7 +229,6 @@ public class PractitionerServiceImpl implements com.yd.api.practitioner.service.
+ "appid=" + appId + "appid=" + appId
+ "&redirect_uri=" + redirectUri + "&redirect_uri=" + redirectUri
+ "&response_type=code&scope=snsapi_base&state=123#wechat_redirect"; + "&response_type=code&scope=snsapi_base&state=123#wechat_redirect";
System.out.println(">>>>>url>>>>>>>:" + url);
responseVO.setGetOpenIdUrl(url); responseVO.setGetOpenIdUrl(url);
} catch (UnsupportedEncodingException e) { } catch (UnsupportedEncodingException e) {
e.printStackTrace(); e.printStackTrace();
......
...@@ -6,6 +6,7 @@ import com.yd.api.result.CommonResult; ...@@ -6,6 +6,7 @@ import com.yd.api.result.CommonResult;
public class PractitionerLoginResponseVO { public class PractitionerLoginResponseVO {
private Long customerId; private Long customerId;
private Long practitionerId; private Long practitionerId;
private String practitionerIdEG;
private Integer loginTimes; private Integer loginTimes;
private String getOpenIdUrl; private String getOpenIdUrl;
private PractitionerLoginBasicInfo practitionerBasicInfo; private PractitionerLoginBasicInfo practitionerBasicInfo;
...@@ -43,6 +44,14 @@ public class PractitionerLoginResponseVO { ...@@ -43,6 +44,14 @@ public class PractitionerLoginResponseVO {
this.practitionerBasicInfo = practitionerBasicInfo; this.practitionerBasicInfo = practitionerBasicInfo;
} }
public String getPractitionerIdEG() {
return practitionerIdEG;
}
public void setPractitionerIdEG(String practitionerIdEG) {
this.practitionerIdEG = practitionerIdEG;
}
public String getGetOpenIdUrl() { public String getGetOpenIdUrl() {
return getOpenIdUrl; return getOpenIdUrl;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment