用户登录
用户注册

分享至

mybatis子查询

  • 作者: 给我个面子-
  • 来源: 51数据库
  • 2020-09-23
你不是已经写出来了吗?小小的修改如下:
<select id="selectByTCR" resultType="com.securityeva.model.CommonType" parameterType="Map">
SELECT we.safeTypeId,COUNT(safeTypeId) as safeTypeId,com.name
from se_weak_analysis we,se_common_type com
where riskLevel=#{riskLevel}
and we.safeTypeId=com.id
and infosysId in ( select id
from se_info_sys
where id in(
select infosysId
from se_report
where uploadTime between#{beginTime}
and #{endTime}
GROUP BY infosysId )
and netTypeId=#{netTypeId}
GROUP BY netTypeId)
GROUP BY safeTypeId
</select>
软件
前端设计
程序设计
Java相关