|
|
|
@ -6,12 +6,15 @@ import cn.jyjz.xiaoyao.admin.service.TenantService;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.controller.BaseController;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.vo.ResultVo;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.base.vo.ResultVoUtil;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.redis.cache.ICacheManager;
|
|
|
|
|
import cn.jyjz.xiaoyao.common.redis.cache.constants.CacheConstants;
|
|
|
|
|
import cn.jyjz.xiaoyao.framework.security.service.SmsLoginService;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.dataobject.OcrSUserT;
|
|
|
|
|
import cn.jyjz.xiaoyao.ocr.service.OcrISUserTService;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.query.QueryWrapper;
|
|
|
|
|
import com.baomidou.mybatisplus.core.conditions.update.UpdateWrapper;
|
|
|
|
|
import io.swagger.annotations.ApiOperation;
|
|
|
|
|
import org.apache.commons.lang3.StringUtils;
|
|
|
|
|
import org.springframework.security.crypto.bcrypt.BCryptPasswordEncoder;
|
|
|
|
|
import org.springframework.web.bind.annotation.RequestMapping;
|
|
|
|
|
import org.springframework.web.bind.annotation.PathVariable;
|
|
|
|
@ -48,6 +51,9 @@ public class OcrSUserTController {
|
|
|
|
|
@Resource
|
|
|
|
|
private SmsLoginService smsLoginService;
|
|
|
|
|
|
|
|
|
|
@Resource
|
|
|
|
|
ICacheManager iCacheManager;
|
|
|
|
|
|
|
|
|
|
/** 忘记密码
|
|
|
|
|
*/
|
|
|
|
|
@ApiOperation(value = "重置密码", notes = "重置密码")
|
|
|
|
@ -116,7 +122,12 @@ public class OcrSUserTController {
|
|
|
|
|
phonewrapper.eq("MOBILE", map.get("phone").toString()).eq("LOGINNAME", map.get("loginname").toString());
|
|
|
|
|
OcrSUserT phoneone = sUserTService.getOne(phonewrapper);
|
|
|
|
|
if(null!=phoneone){
|
|
|
|
|
ResultVo phone = smsLoginService.sendCode(map.get("phone").toString());
|
|
|
|
|
String sysCode = iCacheManager.get(CacheConstants.USER_PHONE_MODEL_NAME,map.get("phone").toString());
|
|
|
|
|
if(!StringUtils.isBlank(sysCode) && !sysCode.equals(map.get("phone").toString())){
|
|
|
|
|
return new ResponseEntity<Object>("通过",HttpStatus.OK);
|
|
|
|
|
}else {
|
|
|
|
|
return new ResponseEntity<Object>("验证码错误!",HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
|
}else {
|
|
|
|
|
return new ResponseEntity<Object>("手机号错误!",HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
@ -147,7 +158,6 @@ public class OcrSUserTController {
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
return new ResponseEntity<Object>(HttpStatus.OK);
|
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|