parent
ef36122845
commit
fca80acccb
|
@ -157,10 +157,21 @@ public class ModelVersionServiceImpl extends ServiceImpl< ModelVersionMapper,Mo
|
||||||
|
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"该模型加密未完成,请稍后再试");
|
return R.fail(HttpStatus.SHOW_ERROR_MSG,"该模型加密未完成,请稍后再试");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
updateModel(modelProduct);
|
||||||
return R.ok(modelVersion.getEncryptionFilePath(),modelVersion.getEncryptionFileName());
|
return R.ok(modelVersion.getEncryptionFilePath(),modelVersion.getEncryptionFileName());
|
||||||
}
|
}
|
||||||
|
updateModel(modelProduct);
|
||||||
return R.ok(modelVersion.getFilePath(),modelVersion.getFileName());
|
return R.ok(modelVersion.getFilePath(),modelVersion.getFileName());
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改下载次数
|
||||||
|
* @param modelProduct
|
||||||
|
*/
|
||||||
|
private void updateModel(ModelProduct modelProduct){
|
||||||
|
|
||||||
|
modelProduct.setNumbers(modelProduct.getNumbers()+1);
|
||||||
|
modelMapper.updateById(modelProduct);
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -117,6 +117,8 @@ public class SysUserAttentionServiceImpl extends ServiceImpl<SysUserAttentionMap
|
||||||
// 模型下载数
|
// 模型下载数
|
||||||
Long modelDownloadNum = modelMapper.sumNumber(userId);
|
Long modelDownloadNum = modelMapper.sumNumber(userId);
|
||||||
|
|
||||||
|
//
|
||||||
|
|
||||||
// 模型运行次数
|
// 模型运行次数
|
||||||
Long modelRunNum = modelMapper.sumRunNumber(userId);
|
Long modelRunNum = modelMapper.sumRunNumber(userId);
|
||||||
|
|
||||||
|
|
|
@ -76,6 +76,10 @@ public class WorkFlowVersionServiceImpl implements WorkFlowVersionService {
|
||||||
return R.fail(HttpStatus.SHOW_ERROR_MSG,"该文件不允许下载");
|
return R.fail(HttpStatus.SHOW_ERROR_MSG,"该文件不允许下载");
|
||||||
}
|
}
|
||||||
|
|
||||||
|
//更新下载次数
|
||||||
|
workFlow.setDownloadNumber(workFlow.getDownloadNumber()+1);
|
||||||
|
workFlowMapper.updateById(workFlow);
|
||||||
|
|
||||||
return R.ok(workFlowVersion.getFilePath(), workFlowVersion.getFileName());
|
return R.ok(workFlowVersion.getFilePath(), workFlowVersion.getFileName());
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -25,6 +25,6 @@
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectModelLikeById" resultType="com.mcwl.resource.domain.WorkFlowLike">
|
<select id="selectModelLikeById" resultType="com.mcwl.resource.domain.WorkFlowLike">
|
||||||
select * from model_like where user_id = #{userId} and model_id = #{id}
|
select * from model_like where user_id = #{userId} and model_id = #{id} and del_flag = 0
|
||||||
</select>
|
</select>
|
||||||
</mapper>
|
</mapper>
|
||||||
|
|
Loading…
Reference in New Issue