Zlpt-Cloud/zlpt-modules/zlpt-bigScreen/src/main/resources/mapper/MaDevInfoMapper.xml

69 lines
2.7 KiB
XML
Raw Normal View History

2023-12-02 14:15:17 +08:00
<?xml version="1.0" encoding="UTF-8" ?>
<!DOCTYPE mapper
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="com.bonus.zlpt.bigscreen.mapper.MaDevInfoMapper">
<select id="selectMaDevInfoList" resultType="com.bonus.zlpt.bigscreen.domain.vo.CoTypeVo">
2023-12-03 11:19:05 +08:00
SELECT bc.company_ltd AS coType, COUNT(*) AS Count
2023-12-02 14:15:17 +08:00
FROM ma_dev_info md
2023-12-02 14:53:57 +08:00
JOIN bm_company_info bc ON md.own_co = bc.company_id
2023-12-08 11:02:38 +08:00
WHERE md.ma_status = '自有' and md.is_active = '1'
2023-12-02 14:53:57 +08:00
GROUP BY bc.company_ltd
2023-12-02 14:15:17 +08:00
</select>
<select id="selectmaList" resultType="com.bonus.zlpt.bigscreen.domain.vo.CompanyInfoVo">
2023-12-03 11:19:05 +08:00
SELECT mti.type_name as ownCo, COUNT(*) as count
2023-12-02 14:15:17 +08:00
FROM ma_type_info mti
INNER JOIN ma_dev_info mdi ON mti.type_id = mdi.type_id
2023-12-08 11:02:38 +08:00
WHERE mdi.ma_status = '在租' and mdi.is_active = '1'
2023-12-02 14:15:17 +08:00
GROUP BY mti.type_name
ORDER BY count DESC
</select>
<select id="selectList" resultType="java.lang.Integer">
2023-12-08 11:02:38 +08:00
SELECT COUNT(*) AS count FROM ma_dev_info m
WHERE m.is_active = '1'
2023-12-02 14:15:17 +08:00
</select>
<select id="selectTypeList" resultType="com.bonus.zlpt.bigscreen.domain.vo.TypeVo">
SELECT ma_status as maStatus, COUNT(*) AS count
FROM ma_dev_info
2023-12-08 11:02:38 +08:00
WHERE ma_status IN ('自有', '待租') and is_active = '1'
2023-12-02 14:15:17 +08:00
GROUP BY ma_status
</select>
<select id="selectMaTypeList" resultType="com.bonus.zlpt.bigscreen.domain.vo.TypeVo">
SELECT ma_status as maStatus, COUNT(*) AS count
FROM ma_dev_info
2023-12-08 11:02:38 +08:00
WHERE ma_status IN ('在租', '待租') and is_active = '1'
2023-12-02 14:15:17 +08:00
GROUP BY ma_status
</select>
<select id="selecthotList" resultType="com.bonus.zlpt.bigscreen.domain.vo.CompanyInfoVo">
2023-12-03 11:19:05 +08:00
SELECT bc.company_name AS ownCo, COUNT(*) AS count
2023-12-02 14:15:17 +08:00
FROM ma_hot_search hs
2023-12-02 14:53:57 +08:00
LEFT JOIN ma_dev_info md ON hs.ma_id = md.ma_id
2023-12-03 11:19:05 +08:00
LEFT JOIN bm_company_info bc ON md.own_co = bc.company_id
2023-12-08 11:02:38 +08:00
WHERE md.is_active = '1'
2023-12-03 11:19:05 +08:00
GROUP BY bc.company_name
2023-12-02 14:15:17 +08:00
ORDER BY count DESC
</select>
2023-12-03 15:29:52 +08:00
<select id="selectListById" resultType="com.bonus.zlpt.bigscreen.domain.vo.MaIdVo">
SELECT mt.type_name AS maName,
md.ma_status AS maStatus,
mo.need_company AS needCompany,
mo.plan_start_time AS planStartTime,
mo.duration AS duration
FROM ma_dev_info md
LEFT JOIN ma_type_info mt ON md.type_id = mt.type_id
LEFT JOIN ma_order_details mo ON md.ma_id = mo.ma_id
2023-12-08 11:02:38 +08:00
where md.ma_id = #{maId} and md.is_active = '1'
2023-12-03 15:29:52 +08:00
GROUP BY maName,maStatus,needCompany,planStartTime,duration
</select>
2023-12-02 14:15:17 +08:00
</mapper>