|
@@ -64,10 +64,28 @@
|
|
|
a.service_status as serviceStatus,
|
|
|
b.url as url,
|
|
|
b.access_type as accessType,
|
|
|
+ d.app_key_id as appKeyId,
|
|
|
+ d.app_key_secret as appKeySecret,
|
|
|
case when c.id is null then 0 else 1 end as renewalsStutas,
|
|
|
case when sysdate()>a.end_time then 0 else 1 end as isExpire
|
|
|
from diag_opened_products a join diag_lantone_product b on a.product_id=b.id
|
|
|
left join diag_user_renewals c on a.user_id=c.user_id and a.product_id=c.product_id and c.renewals_status=0 and c.cancel_renewals=0 and c.is_deleted='N'
|
|
|
+ left join
|
|
|
+ (SELECT
|
|
|
+ b.product_id,
|
|
|
+ c.app_key_id,
|
|
|
+ c.app_key_secret
|
|
|
+ FROM
|
|
|
+ diag_service_info a
|
|
|
+ JOIN diag_product_service b ON a.id = b.service_id
|
|
|
+ JOIN diag_service_token c ON b.id = c.product_service_id
|
|
|
+ WHERE
|
|
|
+ a.is_deleted = 'N'
|
|
|
+ AND b.is_deleted = 'N'
|
|
|
+ AND c.is_deleted = 'N'
|
|
|
+ AND a.user_id = #{userId}
|
|
|
+ AND a.type = 1
|
|
|
+ AND c.type = 1) d on b.id=d.product_id
|
|
|
where a.is_deleted='N' and b.is_deleted='N' and a.user_id=#{userId}
|
|
|
</select>
|
|
|
|