Selaa lähdekoodia

Merge branch 'dev' of trick9191/patient-co-management into dev

trick9191 7 vuotta sitten
vanhempi
commit
c1c0e04fce

+ 7 - 3
patient-co/patient-co-doctor-assistant/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java

@ -69,6 +69,8 @@ public class LoginController extends BaseController {
    private RoleService roleService;
    @Autowired
    private LoginLogService loginLogService;
    @Autowired
    private RSAUtils rsaUtils;
    /**
     * 公钥生成并返回接口
@ -79,8 +81,9 @@ public class LoginController extends BaseController {
    @ResponseBody
    public String publicKey() {
        try {
            String modulus = RSAUtils.getInstance(smsService).getModulus();
            String exponent = RSAUtils.getInstance(smsService).getExponent();
            rsaUtils.setBaseService(smsService);
            String modulus = rsaUtils.getModulus();
            String exponent = rsaUtils.getExponent();
            if (StringUtils.isEmpty(modulus) || StringUtils.isEmpty(exponent)) {
                return error(-1, "公钥获取失败!");
            } else {
@ -130,7 +133,8 @@ public class LoginController extends BaseController {
            }
            //身份证登录
            if (StringUtils.isNoneEmpty(mobile) && StringUtils.isNoneEmpty(password)) {
                password = RSAUtils.getInstance(doctorService).decryptString(password);
                rsaUtils.setBaseService(doctorService);
                password = rsaUtils.decryptString(password);
                password = StringUtils.reverse(password);
                Doctor doctor = doctorService.findDoctorByMobile(mobile);
                loginLog.setLoginType("2");

+ 4 - 2
patient-co/patient-co-wlyy/src/main/java/com/yihu/wlyy/web/common/account/LoginController.java

@ -114,7 +114,7 @@ public class LoginController extends BaseController {
                         @ApiParam(required = false, name = "captcha", value = "短信验证码") @RequestParam(required = false) String captcha,
                         @ApiParam(required = false, name = "platform", value = "医生端pc,取药系统 或者对外系统") @RequestParam(required = false) Integer platform,
                         @ApiParam(required = false, name = "password", value = "密码") @RequestParam(required = false) String password,
                         @ApiParam(required = false, name = "password", value = "openid") @RequestParam(required = false) String openid) {
                         @ApiParam(required = false, name = "openid", value = "openid") @RequestParam(required = false) String openid) {
        String errorMessage;
        LoginLog loginLog = new LoginLog();
        loginLog.setCreateTime(new Date());
@ -134,7 +134,9 @@ public class LoginController extends BaseController {
            }
            //身份证登录
            if (StringUtils.isNoneEmpty(mobile) && StringUtils.isNoneEmpty(password)) {
                password = RSAUtils.getInstance(doctorService).decryptString(password);
                rsaUtils.setBaseService(doctorService);
                password = rsaUtils.decryptString(password);
                password = StringUtils.reverse(password);
                Doctor doctor = doctorService.findDoctorByMobile(mobile);
                loginLog.setLoginType("2");