修改文件查询bug

master
Diyu0904 2025-02-14 17:56:35 +08:00
parent 69d3b7cdc4
commit 57fffd4e27
4 changed files with 10 additions and 4 deletions

View File

@ -91,4 +91,10 @@ public class WorkFlowVersion {
@TableField(exist = false) @TableField(exist = false)
@ApiModelProperty("解密文件秘钥") @ApiModelProperty("解密文件秘钥")
private String keyRate; private String keyRate;
/**
* (0 1)
*/
@ApiModelProperty(value = "是否加密")
private Integer isEncrypt;
} }

View File

@ -35,7 +35,7 @@ public class FileServiceImpl implements FileService {
return AjaxResult.error("文件不存在"); return AjaxResult.error("文件不存在");
} }
return AjaxResult.success(modelVersion.getKeyRate()); return AjaxResult.success(modelVersion);
}else if (type.equals("work")){ }else if (type.equals("work")){
WorkFlowVersion workFlowVersion = workFlowVersionMapper.selectByFileName(name); WorkFlowVersion workFlowVersion = workFlowVersionMapper.selectByFileName(name);
if (workFlowVersion == null) { if (workFlowVersion == null) {
@ -43,7 +43,7 @@ public class FileServiceImpl implements FileService {
return AjaxResult.error("文件不存在"); return AjaxResult.error("文件不存在");
} }
return AjaxResult.success(workFlowVersion.getKeyRate()); return AjaxResult.success(workFlowVersion);
} }
return AjaxResult.error("type不合法"); return AjaxResult.error("type不合法");

View File

@ -32,7 +32,7 @@
</update> </update>
<select id="selectByFileName" resultType="com.mcwl.resource.domain.ModelVersion"> <select id="selectByFileName" resultType="com.mcwl.resource.domain.ModelVersion">
select * from model_version where file_name = #{name} select key_rate,is_encrypt from model_version where file_name = #{name}
</select> </select>
</mapper> </mapper>

View File

@ -24,6 +24,6 @@
</update> </update>
<select id="selectByFileName" resultType="com.mcwl.resource.domain.WorkFlowVersion"> <select id="selectByFileName" resultType="com.mcwl.resource.domain.WorkFlowVersion">
select * from work_flow_version where file_name = #{name} select key_rate,is_encrypt from work_flow_version where file_name = #{name}
</select> </select>
</mapper> </mapper>