Compare commits
2 Commits
2933b1961e
...
59307d612c
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
59307d612c | ||
|
|
48800adccd |
@@ -37,11 +37,11 @@ public class SaTokenConfig implements WebMvcConfigurer {
|
||||
// 排除固件查询接口(不需要登录)
|
||||
.excludePathPatterns("/firmware/**")
|
||||
// 排除系统登录页(不需要登录)
|
||||
.excludePathPatterns("/loading.html", "/admin/login.html")
|
||||
// .excludePathPatterns("/loading.html", "/admin/login.html")
|
||||
// 排除静态资源
|
||||
.excludePathPatterns("/", "/*.css", "/*.js", "/*.ico", "/static/**", "/assets/**")
|
||||
// 排除后台管理静态资源
|
||||
.excludePathPatterns("/admin/**")
|
||||
// .excludePathPatterns("/admin/**")
|
||||
// 排除 Druid 监控
|
||||
.excludePathPatterns("/druid/**")
|
||||
// 排除错误页面
|
||||
|
||||
@@ -70,6 +70,21 @@ public class ParamsCenter implements Serializable {
|
||||
*/
|
||||
private Integer downloadCount;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
private String auditErrorMsg;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
@@ -144,7 +144,7 @@ public class AppParamsCenterController {
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询所有参数列表(公开接口,支持飞控型号过滤)
|
||||
* 查询所有公共参数列表(公开接口,支持飞控型号过滤)
|
||||
*/
|
||||
@GetMapping("/all/list")
|
||||
public Result<List<ParamsCenterVO>> listAll(@RequestParam(required = false) String fcModel) {
|
||||
@@ -230,4 +230,32 @@ public class AppParamsCenterController {
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
|
||||
/**
|
||||
* 提交审核
|
||||
* @param id
|
||||
* @return
|
||||
*/
|
||||
@GetMapping("/review/{id}")
|
||||
public Result<String> review(@PathVariable Long id) {
|
||||
try {
|
||||
ParamsCenter params = paramsService.getById(id);
|
||||
if (params == null) {
|
||||
return Result.error(I18nUtil.getMessage("params.not.found"));
|
||||
}
|
||||
|
||||
// 提交审核
|
||||
ParamsCenter updateParams = new ParamsCenter();
|
||||
updateParams.setId(id);
|
||||
updateParams.setAuditStatus("1");
|
||||
updateParams.setAuditErrorMsg("");
|
||||
boolean success = paramsService.updateById(updateParams);
|
||||
if (success) {
|
||||
return Result.success(I18nUtil.getMessage("params.update.success"));
|
||||
}
|
||||
return Result.error(I18nUtil.getMessage("params.update.failed"));
|
||||
} catch (Exception e) {
|
||||
return Result.error(e.getMessage());
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@@ -65,6 +65,21 @@ public class ParamsCenterVO {
|
||||
*/
|
||||
private Integer downloadCount;
|
||||
|
||||
/**
|
||||
* 状态
|
||||
*/
|
||||
private String status;
|
||||
|
||||
/**
|
||||
* 审核状态
|
||||
*/
|
||||
private String auditStatus;
|
||||
|
||||
/**
|
||||
* 失败原因
|
||||
*/
|
||||
private String auditErrorMsg;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
|
||||
@@ -17,6 +17,9 @@
|
||||
<result column="download_count" property="downloadCount"/>
|
||||
<result column="create_time" property="createTime"/>
|
||||
<result column="update_time" property="updateTime"/>
|
||||
<result column="status" property="status"/>
|
||||
<result column="audit_status" property="auditStatus"/>
|
||||
<result column="audit_error_msg" property="auditErrorMsg"/>
|
||||
</resultMap>
|
||||
|
||||
<!-- 基础查询SQL片段 -->
|
||||
@@ -34,7 +37,10 @@
|
||||
p.param_detail,
|
||||
p.download_count,
|
||||
p.create_time,
|
||||
p.update_time
|
||||
p.update_time,
|
||||
p.status,
|
||||
p.audit_status,
|
||||
p.audit_error_msg
|
||||
FROM app_params_center p
|
||||
LEFT JOIN app_user u ON p.user_id = u.id
|
||||
</sql>
|
||||
@@ -56,10 +62,11 @@
|
||||
ORDER BY p.update_time DESC
|
||||
</select>
|
||||
|
||||
<!-- 分页查询所有参数列表(带用户名) -->
|
||||
<!-- 分页查询所有公共参数列表(带用户名) -->
|
||||
<select id="selectAllVOPage" resultMap="VOResultMap">
|
||||
<include refid="selectVOSql"/>
|
||||
<where>
|
||||
and p.status = '2'
|
||||
<if test="fcModel != null and fcModel != ''">
|
||||
AND p.fc_model = #{fcModel}
|
||||
</if>
|
||||
|
||||
Reference in New Issue
Block a user