fix
This commit is contained in:
parent
a5e2c3b12a
commit
714a04e54d
|
|
@ -42,11 +42,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</sql>
|
</sql>
|
||||||
|
|
||||||
<select id="selectDevInfoList" parameterType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">
|
<select id="selectDevInfoList" parameterType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">
|
||||||
select d.*,t.type_name as device_name,t.parent_name as group_name,c.company_name
|
select d.*,t.type_name,c.company_name
|
||||||
from ma_dev_info d
|
from ma_dev_info d
|
||||||
left join (select t.*, p.type_name as parent_name
|
left join ma_type_info t on d.type_id = t.type_id
|
||||||
from ma_type_info t
|
|
||||||
left join ma_type_info p on t.parent_id=p.type_id) t on d.type_id = t.type_id
|
|
||||||
left join bm_company_info c on d.own_co = c.company_id
|
left join bm_company_info c on d.own_co = c.company_id
|
||||||
<where>
|
<where>
|
||||||
<if test="maId != null "> and d.ma_id = #{maId}</if>
|
<if test="maId != null "> and d.ma_id = #{maId}</if>
|
||||||
|
|
@ -88,33 +86,43 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
<select id="selectDevInfoHotList" parameterType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">
|
<select id="selectDevInfoHotList" parameterType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">
|
||||||
select d.*,t.type_name as device_name,t.parent_name as group_name,c.company_name,search_num
|
select d.*,c.company_name,search_num,t.type_name
|
||||||
from ma_dev_info d
|
from ma_dev_info d
|
||||||
left join (select t.*, p.type_name as parent_name
|
left join bm_company_info c on d.own_co = c.company_id
|
||||||
from ma_type_info t
|
left join ma_hot_search h on d.ma_id = h.ma_id
|
||||||
left join ma_type_info p on t.parent_id=p.type_id) t on d.type_id = t.type_id
|
left join ma_type_info t on d.type_id = t.type_id
|
||||||
left join bm_company_info c on d.own_co = c.company_id
|
|
||||||
left join ma_hot_search h on d.ma_id = h.ma_id
|
|
||||||
order by h.search_num
|
order by h.search_num
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<!-- <select id="selectDevInfoByMaId" parameterType="Long" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">-->
|
||||||
|
<!-- select d.*,c.company_name,c.create_time as company_create_time,c.logo_url as company_logo_url,-->
|
||||||
|
<!-- c.auth_phone,ty.type_name as device_name,-->
|
||||||
|
<!-- ty.parent_name as group_name,ty.grandpa_name as type_name,-->
|
||||||
|
<!-- col.id as collect_id, up.status as is_audit,h.search_num-->
|
||||||
|
<!-- from ma_dev_info d-->
|
||||||
|
<!-- left join bm_company_info c on d.own_co = c.company_id-->
|
||||||
|
<!-- left join ma_user_collect col on d.ma_id = col.ma_id-->
|
||||||
|
<!-- left join ma_up_off up on d.ma_id = up.ma_id-->
|
||||||
|
<!-- left join ma_hot_search h on d.ma_id = h.ma_id-->
|
||||||
|
<!-- left join (-->
|
||||||
|
<!-- select tt.*, pp.type_name as grandpa_name from-->
|
||||||
|
<!-- (select t.*, p.type_name as parent_name,p.type_id as p_type_id, p.parent_id as p_parent_id-->
|
||||||
|
<!-- from ma_type_info t-->
|
||||||
|
<!-- left join ma_type_info p on t.parent_id=p.type_id) tt-->
|
||||||
|
<!-- left join ma_type_info pp on tt.p_parent_id = pp.type_id-->
|
||||||
|
<!-- ) ty on d.type_id=ty.type_id-->
|
||||||
|
<!-- where d.ma_id = #{maId}-->
|
||||||
|
<!-- </select>-->
|
||||||
<select id="selectDevInfoByMaId" parameterType="Long" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">
|
<select id="selectDevInfoByMaId" parameterType="Long" resultType="com.bonus.zlpt.equip.api.domain.vo.DevInfoVo">
|
||||||
select d.*,c.company_name,c.create_time as company_create_time,c.logo_url as company_logo_url,
|
select d.*,c.company_name,c.create_time as company_create_time,c.logo_url as company_logo_url,
|
||||||
c.auth_phone,ty.type_name as device_name,
|
c.auth_phone,t.type_name,
|
||||||
ty.parent_name as group_name,ty.grandpa_name as type_name,
|
|
||||||
col.id as collect_id, up.status as is_audit,h.search_num
|
col.id as collect_id, up.status as is_audit,h.search_num
|
||||||
from ma_dev_info d
|
from ma_dev_info d
|
||||||
left join bm_company_info c on d.own_co = c.company_id
|
left join bm_company_info c on d.own_co = c.company_id
|
||||||
left join ma_user_collect col on d.ma_id = col.ma_id
|
left join ma_user_collect col on d.ma_id = col.ma_id
|
||||||
left join ma_up_off up on d.ma_id = up.ma_id
|
left join ma_up_off up on d.ma_id = up.ma_id
|
||||||
left join ma_hot_search h on d.ma_id = h.ma_id
|
left join ma_hot_search h on d.ma_id = h.ma_id
|
||||||
left join (
|
left join ma_type_info t on d.type_id = t.type_id
|
||||||
select tt.*, pp.type_name as grandpa_name from
|
|
||||||
(select t.*, p.type_name as parent_name,p.type_id as p_type_id, p.parent_id as p_parent_id
|
|
||||||
from ma_type_info t
|
|
||||||
left join ma_type_info p on t.parent_id=p.type_id) tt
|
|
||||||
left join ma_type_info pp on tt.p_parent_id = pp.type_id
|
|
||||||
) ty on d.type_id=ty.type_id
|
|
||||||
where d.ma_id = #{maId}
|
where d.ma_id = #{maId}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
|
|
||||||
Loading…
Reference in New Issue