1-21 ------
This commit is contained in:
File diff suppressed because it is too large
Load Diff
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinda.iot.mapper.DeviceModelMapper">
|
||||
|
||||
|
||||
<resultMap type="DeviceModel" id="DeviceModelResult">
|
||||
<result property="id" column="id" />
|
||||
<result property="productModel" column="product_model" />
|
||||
@@ -18,19 +18,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectDeviceModelList" parameterType="DeviceModel" resultMap="DeviceModelResult">
|
||||
<include refid="selectDeviceModelVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="productModel != null and productModel != ''"> and product_model = #{productModel}</if>
|
||||
<if test="displayOrder != null "> and display_order = #{displayOrder}</if>
|
||||
<if test="createdAt != null "> and created_at = #{createdAt}</if>
|
||||
<if test="remarks != null and remarks != ''"> and remarks = #{remarks}</if>
|
||||
</where>
|
||||
order by display_order asc
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectDeviceModelById" parameterType="Long" resultMap="DeviceModelResult">
|
||||
<include refid="selectDeviceModelVo"/>
|
||||
where id = #{id}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertDeviceModel" parameterType="DeviceModel" useGeneratedKeys="true" keyProperty="id">
|
||||
insert into iot_device_model
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -63,9 +64,9 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteDeviceModelByIds" parameterType="String">
|
||||
delete from iot_device_model where id in
|
||||
delete from iot_device_model where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
||||
@@ -3,7 +3,7 @@
|
||||
PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
<mapper namespace="com.xinda.iot.mapper.GroupMapper">
|
||||
|
||||
|
||||
<resultMap type="com.xinda.iot.domain.Group" id="GroupResult">
|
||||
<result property="groupId" column="group_id" />
|
||||
<result property="groupName" column="group_name" />
|
||||
@@ -25,14 +25,14 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
|
||||
<select id="selectGroupList" parameterType="com.xinda.iot.domain.Group" resultMap="GroupResult">
|
||||
<include refid="selectGroupVo"/>
|
||||
<where>
|
||||
<where>
|
||||
<if test="groupName != null and groupName != ''"> and group_name like concat('%', #{groupName}, '%')</if>
|
||||
<if test="userName != null and userName != ''"> and user_name like concat('%', #{userName}, '%')</if>
|
||||
<if test="userId != null "> and user_id = #{userId}</if>
|
||||
</where>
|
||||
order by group_order
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectGroupByGroupId" parameterType="Long" resultMap="GroupResult">
|
||||
<include refid="selectGroupVo"/>
|
||||
where group_id = #{groupId}
|
||||
@@ -41,7 +41,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
<select id="selectDeviceIdsByGroupId" parameterType="Long" resultMap="IdsResult">
|
||||
select device_id from iot_device_group where group_id=#{groupId}
|
||||
</select>
|
||||
|
||||
|
||||
<insert id="insertGroup" parameterType="com.xinda.iot.domain.Group" useGeneratedKeys="true" keyProperty="groupId">
|
||||
insert into iot_group
|
||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||
@@ -102,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</delete>
|
||||
|
||||
<delete id="deleteGroupByGroupIds" parameterType="String">
|
||||
delete from iot_group where group_id in
|
||||
delete from iot_group where group_id in
|
||||
<foreach item="groupId" collection="array" open="(" separator="," close=")">
|
||||
#{groupId}
|
||||
</foreach>
|
||||
@@ -133,4 +133,5 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
</where>
|
||||
order by group_order
|
||||
</select>
|
||||
</mapper>
|
||||
|
||||
</mapper>
|
||||
|
||||
@@ -71,6 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
and p.tenant_id = #{tenantId}
|
||||
</if>
|
||||
<if test="productName != null and productName != ''"> and p.product_name like concat('%', #{productName}, '%')</if>
|
||||
<if test="productNameExclude != null and productNameExclude != ''"> and p.product_name != #{productNameExclude}</if>
|
||||
<if test="categoryName != null and categoryName != ''"> and p.category_name like concat('%', #{categoryName}, '%')</if>
|
||||
<if test="status != null "> and p.status = #{status}</if>
|
||||
<if test="deviceType != null "> and device_type = #{deviceType}</if>
|
||||
|
||||
Reference in New Issue
Block a user