【新增】参数审核提交接口

This commit is contained in:
MichaelWin
2025-12-17 18:04:21 +08:00
parent 48800adccd
commit 59307d612c
4 changed files with 68 additions and 3 deletions

View File

@@ -70,6 +70,21 @@ public class ParamsCenter implements Serializable {
*/ */
private Integer downloadCount; private Integer downloadCount;
/**
* 状态
*/
private String status;
/**
* 审核状态
*/
private String auditStatus;
/**
* 失败原因
*/
private String auditErrorMsg;
/** /**
* 创建时间 * 创建时间
*/ */

View File

@@ -144,7 +144,7 @@ public class AppParamsCenterController {
} }
/** /**
* 查询所有参数列表(公开接口,支持飞控型号过滤) * 查询所有公共参数列表(公开接口,支持飞控型号过滤)
*/ */
@GetMapping("/all/list") @GetMapping("/all/list")
public Result<List<ParamsCenterVO>> listAll(@RequestParam(required = false) String fcModel) { public Result<List<ParamsCenterVO>> listAll(@RequestParam(required = false) String fcModel) {
@@ -230,4 +230,32 @@ public class AppParamsCenterController {
return Result.error(e.getMessage()); 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());
}
}
} }

View File

@@ -65,6 +65,21 @@ public class ParamsCenterVO {
*/ */
private Integer downloadCount; private Integer downloadCount;
/**
* 状态
*/
private String status;
/**
* 审核状态
*/
private String auditStatus;
/**
* 失败原因
*/
private String auditErrorMsg;
/** /**
* 创建时间 * 创建时间
*/ */

View File

@@ -17,6 +17,9 @@
<result column="download_count" property="downloadCount"/> <result column="download_count" property="downloadCount"/>
<result column="create_time" property="createTime"/> <result column="create_time" property="createTime"/>
<result column="update_time" property="updateTime"/> <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> </resultMap>
<!-- 基础查询SQL片段 --> <!-- 基础查询SQL片段 -->
@@ -34,7 +37,10 @@
p.param_detail, p.param_detail,
p.download_count, p.download_count,
p.create_time, p.create_time,
p.update_time p.update_time,
p.status,
p.audit_status,
p.audit_error_msg
FROM app_params_center p FROM app_params_center p
LEFT JOIN app_user u ON p.user_id = u.id LEFT JOIN app_user u ON p.user_id = u.id
</sql> </sql>
@@ -56,10 +62,11 @@
ORDER BY p.update_time DESC ORDER BY p.update_time DESC
</select> </select>
<!-- 分页查询所有参数列表(带用户名) --> <!-- 分页查询所有公共参数列表(带用户名) -->
<select id="selectAllVOPage" resultMap="VOResultMap"> <select id="selectAllVOPage" resultMap="VOResultMap">
<include refid="selectVOSql"/> <include refid="selectVOSql"/>
<where> <where>
and p.status = '2'
<if test="fcModel != null and fcModel != ''"> <if test="fcModel != null and fcModel != ''">
AND p.fc_model = #{fcModel} AND p.fc_model = #{fcModel}
</if> </if>