|
|
@ -3,11 +3,11 @@ package com.ruoyi.framework.web.service;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
import javax.annotation.Resource;
|
|
|
|
|
|
|
|
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
import com.alibaba.fastjson.JSONObject;
|
|
|
|
|
|
|
|
import com.ruoyi.common.config.RuoYiConfig;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.core.domain.AjaxResult;
|
|
|
|
import com.ruoyi.common.enums.UserStatus;
|
|
|
|
import com.ruoyi.common.enums.UserStatus;
|
|
|
|
import com.ruoyi.common.utils.*;
|
|
|
|
import com.ruoyi.common.utils.*;
|
|
|
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
|
|
|
import com.ruoyi.common.utils.file.FileUploadUtils;
|
|
|
|
import com.ruoyi.common.utils.file.FileUtils;
|
|
|
|
|
|
|
|
import com.ruoyi.system.domain.TDoctor;
|
|
|
|
import com.ruoyi.system.domain.TDoctor;
|
|
|
|
import com.ruoyi.system.domain.req.AppRegisterReq;
|
|
|
|
import com.ruoyi.system.domain.req.AppRegisterReq;
|
|
|
|
import com.ruoyi.system.mapper.TDoctorMapper;
|
|
|
|
import com.ruoyi.system.mapper.TDoctorMapper;
|
|
|
@ -15,7 +15,6 @@ import com.ruoyi.system.service.impl.UserTokenService;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.Logger;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.slf4j.LoggerFactory;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Autowired;
|
|
|
|
import org.springframework.beans.factory.annotation.Value;
|
|
|
|
|
|
|
|
import org.springframework.security.authentication.AuthenticationManager;
|
|
|
|
import org.springframework.security.authentication.AuthenticationManager;
|
|
|
|
import org.springframework.security.authentication.BadCredentialsException;
|
|
|
|
import org.springframework.security.authentication.BadCredentialsException;
|
|
|
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
|
|
|
import org.springframework.security.authentication.UsernamePasswordAuthenticationToken;
|
|
|
@ -50,8 +49,6 @@ public class SysLoginService
|
|
|
|
{
|
|
|
|
{
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(SysLoginService.class);
|
|
|
|
private static final Logger log = LoggerFactory.getLogger(SysLoginService.class);
|
|
|
|
|
|
|
|
|
|
|
|
@Value("${ruoyi.profile}")
|
|
|
|
|
|
|
|
private String uploadFilePath;
|
|
|
|
|
|
|
|
@Autowired
|
|
|
|
@Autowired
|
|
|
|
private TokenService tokenService;
|
|
|
|
private TokenService tokenService;
|
|
|
|
|
|
|
|
|
|
|
@ -208,7 +205,7 @@ public class SysLoginService
|
|
|
|
map.put("id", tDoctor.getId());
|
|
|
|
map.put("id", tDoctor.getId());
|
|
|
|
map.put("from", "yinuo");
|
|
|
|
map.put("from", "yinuo");
|
|
|
|
String content = JSONObject.toJSONString(map);
|
|
|
|
String content = JSONObject.toJSONString(map);
|
|
|
|
String qrCode = FileUploadUtils.code(content, uploadFilePath);
|
|
|
|
String qrCode = FileUploadUtils.code(content, RuoYiConfig.getQRCodePath());
|
|
|
|
tDoctor.setQrCode(qrCode);
|
|
|
|
tDoctor.setQrCode(qrCode);
|
|
|
|
log.info("update doctor :{}", tDoctor);
|
|
|
|
log.info("update doctor :{}", tDoctor);
|
|
|
|
tDoctorMapper.updateTDoctor(tDoctor);
|
|
|
|
tDoctorMapper.updateTDoctor(tDoctor);
|
|
|
|