添加验证码功能,主要用于滑块功能
This commit is contained in:
parent
ee9edabe63
commit
7d2fff5a00
|
@ -34,9 +34,9 @@
|
|||
o.org_building_number,
|
||||
o.org_property_type,
|
||||
o.org_building_area,
|
||||
o.org_province,
|
||||
o.org_city,
|
||||
o.org_district,
|
||||
(select a.`name` from sys_category a where o.org_province = a.id ) as org_province,
|
||||
(select a.`name` from sys_category a where o.org_city = a.id ) as org_city,
|
||||
(select a.`name` from sys_category a where o.org_district = a.id ) as org_district,
|
||||
o.contract,
|
||||
o.contract_note,
|
||||
o.franchise_Time,
|
||||
|
|
|
@ -101,7 +101,7 @@ public class WorkOrderController extends JeecgController<WorkOrder, IWorkOrderSe
|
|||
@RequestMapping(value = "/edit", method = {RequestMethod.PUT,RequestMethod.POST})
|
||||
public Result<String> edit(@RequestBody WorkOrder workOrder) {
|
||||
workOrderService.updateMqById(workOrder);
|
||||
return Result.OK("编辑成功!");
|
||||
return Result.OK("提交成功!");
|
||||
}
|
||||
|
||||
/**
|
||||
|
|
|
@ -87,6 +87,7 @@ public class ShiroConfig {
|
|||
filterChainDefinitionMap.put("/iot/tq/api/waterMeter/**", "anon"); //水表回调
|
||||
filterChainDefinitionMap.put("/sys/cas/client/validateLogin", "anon"); //cas验证登录
|
||||
filterChainDefinitionMap.put("/sys/randomImage/**", "anon"); //登录验证码接口排除
|
||||
filterChainDefinitionMap.put("/sys/randomInputCode/**", "anon"); //登录验证码接口排除
|
||||
filterChainDefinitionMap.put("/sys/checkCaptcha", "anon"); //登录验证码接口排除
|
||||
filterChainDefinitionMap.put("/sys/smsCheckCaptcha", "anon"); //短信次数发送太多验证码排除
|
||||
filterChainDefinitionMap.put("/sys/login", "anon"); //登录接口排除
|
||||
|
|
|
@ -554,6 +554,39 @@ public class LoginController {
|
|||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 后台生成图形验证码 :有效
|
||||
* @param response
|
||||
* @param key
|
||||
*/
|
||||
@ApiOperation("获取验证码")
|
||||
@GetMapping(value = "/randomInputCode/{key}")
|
||||
public Result<String> randomInputCode(HttpServletResponse response,@PathVariable("key") String key){
|
||||
Result<String> res = new Result<String>();
|
||||
try {
|
||||
//生成验证码
|
||||
String code = RandomUtil.randomString(BASE_CHECK_CODES,4);
|
||||
//存到redis中
|
||||
String lowerCaseCode = code.toLowerCase();
|
||||
|
||||
//update-begin-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||
// 加入密钥作为混淆,避免简单的拼接,被外部利用,用户自定义该密钥即可
|
||||
String origin = lowerCaseCode+key+jeecgBaseConfig.getSignatureSecret();
|
||||
String realKey = Md5Util.md5Encode(origin, "utf-8");
|
||||
//update-end-author:taoyan date:2022-9-13 for: VUEN-2245 【漏洞】发现新漏洞待处理20220906
|
||||
|
||||
redisUtil.set(realKey, lowerCaseCode, 60);
|
||||
log.info("获取验证码,Redis key = {},checkCode = {}", realKey, code);
|
||||
res.setSuccess(true);
|
||||
res.setResult(code);
|
||||
} catch (Exception e) {
|
||||
log.error(e.getMessage(), e);
|
||||
res.error500("获取验证码失败,请检查redis配置!");
|
||||
return res;
|
||||
}
|
||||
return res;
|
||||
}
|
||||
|
||||
/**
|
||||
* 切换菜单表为vue3的表
|
||||
*/
|
||||
|
|
Loading…
Reference in New Issue