Merge branch 'master' of http://47.109.37.87:3000/by2025/SmartParks
This commit is contained in:
@@ -3,5 +3,36 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.property.mapper.PlantsPlanProductMapper">
|
||||
<resultMap id="planProductMap" type="org.dromara.property.domain.vo.PlantsPlanProductVo">
|
||||
<result property="id" column="pid"/>
|
||||
<result property="planId" column="plan_id"/>
|
||||
<result property="productId" column="product_id"/>
|
||||
<association property="product" javaType="org.dromara.property.domain.vo.PlantsProductVo">
|
||||
<id property="id" column="id"/>
|
||||
<result property="plantCode" column="plant_code"/>
|
||||
<result property="plantName" column="plant_name"/>
|
||||
<result property="plantType" column="plant_type"/>
|
||||
<result property="imgPath" column="img_path"/>
|
||||
<result property="specification" column="specification"/>
|
||||
<result property="rent" column="rent"/>
|
||||
<result property="inventory" column="inventory"/>
|
||||
<result property="state" column="state"/>
|
||||
<result property="remark" column="remark"/>
|
||||
</association>
|
||||
</resultMap>
|
||||
|
||||
<delete id="deleteByPlanId" parameterType="Long">
|
||||
delete from plants_plan_product p where p.plan_id=#{planId}
|
||||
</delete>
|
||||
|
||||
<select id="queryProductsInfo" resultMap="planProductMap">
|
||||
select
|
||||
c.id pid,
|
||||
c.plan_id,
|
||||
c.product_id,
|
||||
p.*
|
||||
from plants_plan_product c
|
||||
left join plants_product p on c.product_id = p.id
|
||||
where c.plan_id = #{planId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
@@ -4,4 +4,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="org.dromara.property.mapper.TbRoomMapper">
|
||||
|
||||
<select id="queryRoomName" resultType="java.lang.String">
|
||||
select
|
||||
concat(c.community_name,b.building_name,u.unit_name,f.floor_name,r.room_number)
|
||||
from tb_room r
|
||||
inner join tb_floor f on r.floor_id=f.id
|
||||
inner join tb_unit u on r.unit_id=u.id
|
||||
inner join tb_building b on r.building_id=b.id
|
||||
inner join tb_community c on r.community_id=c.id
|
||||
where r.id=#{roomId}
|
||||
</select>
|
||||
</mapper>
|
||||
|
Reference in New Issue
Block a user