添加登录获取验证码接口,添加服务指令包字段及修改对应的sql语句
This commit is contained in:
parent
e65106edf7
commit
4f3bde6f95
|
@ -87,6 +87,7 @@ public class ShiroConfig {
|
||||||
filterChainDefinitionMap.put("/iot/tq/api/waterMeter/**", "anon"); //水表回调
|
filterChainDefinitionMap.put("/iot/tq/api/waterMeter/**", "anon"); //水表回调
|
||||||
filterChainDefinitionMap.put("/sys/cas/client/validateLogin", "anon"); //cas验证登录
|
filterChainDefinitionMap.put("/sys/cas/client/validateLogin", "anon"); //cas验证登录
|
||||||
filterChainDefinitionMap.put("/sys/randomImage/**", "anon"); //登录验证码接口排除
|
filterChainDefinitionMap.put("/sys/randomImage/**", "anon"); //登录验证码接口排除
|
||||||
|
filterChainDefinitionMap.put("/sys/randomCode/**", "anon"); //登录验证码接口排除
|
||||||
filterChainDefinitionMap.put("/sys/checkCaptcha", "anon"); //登录验证码接口排除
|
filterChainDefinitionMap.put("/sys/checkCaptcha", "anon"); //登录验证码接口排除
|
||||||
filterChainDefinitionMap.put("/sys/smsCheckCaptcha", "anon"); //短信次数发送太多验证码排除
|
filterChainDefinitionMap.put("/sys/smsCheckCaptcha", "anon"); //短信次数发送太多验证码排除
|
||||||
filterChainDefinitionMap.put("/sys/login", "anon"); //登录接口排除
|
filterChainDefinitionMap.put("/sys/login", "anon"); //登录接口排除
|
||||||
|
|
|
@ -76,6 +76,16 @@ public class DirectivePackage implements Serializable {
|
||||||
@ApiModelProperty(value = "更新日期")
|
@ApiModelProperty(value = "更新日期")
|
||||||
private java.util.Date updateTime;
|
private java.util.Date updateTime;
|
||||||
|
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "开始时间")
|
||||||
|
private java.lang.String startTimeStr;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "结束时间")
|
||||||
|
private java.lang.String endTimeStr;
|
||||||
|
|
||||||
|
@ApiModelProperty(value = "分类标签")
|
||||||
|
private java.lang.String instructionTagId;
|
||||||
|
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private List<ConfigServiceDirective> directives;
|
private List<ConfigServiceDirective> directives;
|
||||||
|
|
||||||
|
|
|
@ -14,6 +14,9 @@
|
||||||
<result property="createTime" column="create_time" />
|
<result property="createTime" column="create_time" />
|
||||||
<result property="updateBy" column="update_by" />
|
<result property="updateBy" column="update_by" />
|
||||||
<result property="updateTime" column="update_time" />
|
<result property="updateTime" column="update_time" />
|
||||||
|
<result property="startTimeStr" column="start_time_str" />
|
||||||
|
<result property="endTimeStr" column="end_time_str" />
|
||||||
|
<result property="instructionTagId" column="instruction_tag_id" />
|
||||||
<!-- 关联的指令列表 -->
|
<!-- 关联的指令列表 -->
|
||||||
<collection property="directives" ofType="com.nu.modules.servicedirective.entity.ConfigServiceDirective">
|
<collection property="directives" ofType="com.nu.modules.servicedirective.entity.ConfigServiceDirective">
|
||||||
<id property="id" column="directive_id" />
|
<id property="id" column="directive_id" />
|
||||||
|
@ -21,6 +24,7 @@
|
||||||
<result property="categoryId" column="category_id" />
|
<result property="categoryId" column="category_id" />
|
||||||
<result property="typeId" column="type_id" />
|
<result property="typeId" column="type_id" />
|
||||||
<result property="instructionTagId" column="instruction_tag_id" />
|
<result property="instructionTagId" column="instruction_tag_id" />
|
||||||
|
<result property="instructionTagName" column="instruction_name" />
|
||||||
<result property="tollPrice" column="toll_price" />
|
<result property="tollPrice" column="toll_price" />
|
||||||
<result property="comPrice" column="com_price" />
|
<result property="comPrice" column="com_price" />
|
||||||
<result property="izReimbursement" column="iz_reimbursement" />
|
<result property="izReimbursement" column="iz_reimbursement" />
|
||||||
|
@ -87,6 +91,9 @@
|
||||||
dp.create_time,
|
dp.create_time,
|
||||||
dp.update_by,
|
dp.update_by,
|
||||||
dp.update_time,
|
dp.update_time,
|
||||||
|
dp.start_time_str,
|
||||||
|
dp.end_time_str,
|
||||||
|
dp.instruction_tag_id,
|
||||||
csd.id AS directive_id,
|
csd.id AS directive_id,
|
||||||
csd.directive_name,
|
csd.directive_name,
|
||||||
csd.category_id,
|
csd.category_id,
|
||||||
|
@ -132,7 +139,8 @@
|
||||||
cdet.update_time AS emotag_update_time,
|
cdet.update_time AS emotag_update_time,
|
||||||
cdet.sys_org_code AS emotag_sys_org_code,
|
cdet.sys_org_code AS emotag_sys_org_code,
|
||||||
csc.category_name AS csc_category_name,
|
csc.category_name AS csc_category_name,
|
||||||
cst.type_name AS cst_type_name
|
cst.type_name AS cst_type_name,
|
||||||
|
insTag.instruction_name AS instruction_name
|
||||||
FROM
|
FROM
|
||||||
(SELECT * FROM nu_directive_package
|
(SELECT * FROM nu_directive_package
|
||||||
<where>
|
<where>
|
||||||
|
@ -149,6 +157,7 @@
|
||||||
LEFT JOIN nu_config_emotion_tag cdet ON edt.tag_id = cdet.id
|
LEFT JOIN nu_config_emotion_tag cdet ON edt.tag_id = cdet.id
|
||||||
LEFT JOIN nu_config_service_category csc ON csd.category_id = csc.id
|
LEFT JOIN nu_config_service_category csc ON csd.category_id = csc.id
|
||||||
LEFT JOIN nu_config_service_type cst ON csd.type_id = cst.id
|
LEFT JOIN nu_config_service_type cst ON csd.type_id = cst.id
|
||||||
|
left join nu_config_service_instruction_tag insTag on csd.instruction_tag_id = insTag.id
|
||||||
order by dp.create_time desc
|
order by dp.create_time desc
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
@ -193,4 +193,9 @@ public class ConfigServiceDirective implements Serializable {
|
||||||
//媒体资源存储路径名
|
//媒体资源存储路径名
|
||||||
@TableField(exist = false)
|
@TableField(exist = false)
|
||||||
private String mediaFileSavePath;
|
private String mediaFileSavePath;
|
||||||
|
//护理分类名称
|
||||||
|
@TableField(exist = false)
|
||||||
|
private String instructionTagName;
|
||||||
|
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
|
@ -550,6 +550,43 @@ public class LoginController {
|
||||||
return res;
|
return res;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 后台生成图形验证码 :有效
|
||||||
|
* @param response
|
||||||
|
* @param key
|
||||||
|
*/
|
||||||
|
@ApiOperation("获取验证码")
|
||||||
|
@GetMapping(value = "/randomCode/{key}")
|
||||||
|
public Result<String> randomCode(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);
|
||||||
|
//返回前端
|
||||||
|
String base64 = RandImageUtil.generate(code);
|
||||||
|
res.setSuccess(true);
|
||||||
|
res.setResult(base64);
|
||||||
|
res.setMessage(code);
|
||||||
|
} catch (Exception e) {
|
||||||
|
log.error(e.getMessage(), e);
|
||||||
|
res.error500("获取验证码失败,请检查redis配置!");
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
return res;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 切换菜单表为vue3的表
|
* 切换菜单表为vue3的表
|
||||||
*/
|
*/
|
||||||
|
|
Loading…
Reference in New Issue