fix(测试跟踪): 测试计划实时报告分享有效期跟应用配置不匹配
--bug=1042569 --user=陈建星 【测试计划】github#30061,设置测试计划报告分享有效期为30天,从测试计划列表的报告中点击分享链接,第二天访问该链接链接失效 https://www.tapd.cn/55049933/s/1531995
This commit is contained in:
parent
0911a02805
commit
f1aad6bc36
|
@ -13,4 +13,6 @@ public interface ExtTestPlanApiScenarioMapper {
|
|||
List<TestPlanApiScenario> selectByScenarioIds(@Param("ids") List<String> ids);
|
||||
|
||||
String selectPlanIdByTestPlanId(@Param("id") String id);
|
||||
|
||||
String getProjectIdByPlanId(@Param("id") String id);
|
||||
}
|
||||
|
|
|
@ -43,4 +43,7 @@
|
|||
test_plan_report report on plan.id = report.test_plan_id
|
||||
where report.id =#{id}
|
||||
</select>
|
||||
<select id="getProjectIdByPlanId" resultType="java.lang.String">
|
||||
SELECT project_id from test_plan where id =#{id}
|
||||
</select>
|
||||
</mapper>
|
||||
|
|
|
@ -644,6 +644,9 @@ public class ShareInfoService extends BaseShareInfoService {
|
|||
ShareInfo shareInfo = shareInfoMapper.selectByPrimaryKey(shareId);
|
||||
if (ObjectUtils.isNotEmpty(shareInfo)) {
|
||||
String projectId = extTestPlanApiScenarioMapper.selectPlanIdByTestPlanId(shareInfo.getCustomData());
|
||||
if (StringUtils.isBlank(projectId)) {
|
||||
projectId = extTestPlanApiScenarioMapper.getProjectIdByPlanId(shareInfo.getCustomData());
|
||||
}
|
||||
validateExpiredTestPlan(shareInfo, projectId);
|
||||
}
|
||||
if (shareInfo == null) {
|
||||
|
@ -651,7 +654,6 @@ public class ShareInfoService extends BaseShareInfoService {
|
|||
}
|
||||
}
|
||||
|
||||
|
||||
public void render(Pager<List<ApiDocumentInfoDTO>> listPager, HttpServletResponse response) throws
|
||||
UnsupportedEncodingException {
|
||||
response.reset();
|
||||
|
|
Loading…
Reference in New Issue