资源详情返回 是否加入申购车

This commit is contained in:
wangliwen 2022-07-22 17:11:21 +08:00
parent 676a1d2e17
commit aad23ca5ee
2 changed files with 5 additions and 2 deletions

View File

@ -128,7 +128,7 @@ public class DataCenterListenerV2 implements TaskListener, ExecutionListener, Ac
if (resourceDTOOptional.isPresent()) {
return !StringUtils.contains(resourceDTOOptional.get().getShareCondition(), "免批"); // 存在非免批
} else {
return false;
return true; // 摄像头非免批
}
}).findAny();
if (!tAbilityApplicationDTO.isPresent()) { // 全是免批

View File

@ -293,7 +293,8 @@
IFNULL( trc.collectCount, 0 ) AS "collectCount",
sd.NAME AS "deptName",
IFNULL( trc2.isCollect, 'false' ) AS "isCollect",
IF( IFNULL(taa2.approve_status, 0) < 1, '未申请', '已申请' ) AS "applyState"
IF( IFNULL(taa2.approve_status, 0) < 1, '未申请', '已申请' ) AS "applyState",
IF ( IFNULL( trcar.car, 0 ) > 0, TRUE, FALSE ) AS "isInShoppingCart"
FROM
tb_data_resource tdr
LEFT JOIN ( SELECT resource_id, AVG( score ) AS "score" FROM tb_resource_score WHERE 1 = 1 AND del_flag = 0
@ -302,6 +303,8 @@
= 0 GROUP BY resource_id ) taa ON tdr.id = taa.resource_id
LEFT JOIN ( SELECT resource_id, COUNT( id ) AS "collectCount" FROM tb_resource_collection WHERE 1 = 1 AND
del_flag = 0 GROUP BY resource_id ) trc ON tdr.id = trc.resource_id
LEFT JOIN ( SELECT resource_id, COUNT( id ) AS "car" FROM tb_resource_car WHERE 1 = 1 AND del_flag = 0 AND user_id = #{dto.creator} GROUP BY resource_id ) trcar
ON tdr.id = trcar.resource_id
LEFT JOIN (
SELECT
resource_id,