|
|
@@ -1,36 +1,100 @@
|
|
|
<?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.middle.platform.manage.biz.mapper.IotProjectMapper">
|
|
|
- <resultMap id="BaseResultMap" type="com.middle.platform.manage.biz.entity.IotProject">
|
|
|
- <!--@mbg.generated-->
|
|
|
- <!--@Table iot_project-->
|
|
|
- <id column="id" jdbcType="BIGINT" property="id" />
|
|
|
- <result column="company_id" jdbcType="BIGINT" property="companyId" />
|
|
|
- <result column="code" jdbcType="VARCHAR" property="code" />
|
|
|
- <result column="title" jdbcType="VARCHAR" property="title" />
|
|
|
- <result column="remark" jdbcType="VARCHAR" property="remark" />
|
|
|
- <result column="status" jdbcType="TINYINT" property="status" />
|
|
|
- <result column="create_by" jdbcType="BIGINT" property="createBy" />
|
|
|
- <result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
|
|
- <result column="update_by" jdbcType="BIGINT" property="updateBy" />
|
|
|
- <result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
|
|
- <result column="delete_time" jdbcType="TIMESTAMP" property="deleteTime" />
|
|
|
- <result column="del_flag" jdbcType="TINYINT" property="delFlag" />
|
|
|
- </resultMap>
|
|
|
- <sql id="Base_Column_List">
|
|
|
- <!--@mbg.generated-->
|
|
|
- id, company_id, code, title, remark, `status`, create_by, create_time, update_by,
|
|
|
- update_time, delete_time, del_flag
|
|
|
- </sql>
|
|
|
+ <resultMap id="BaseResultMap" type="com.middle.platform.manage.biz.entity.IotProject">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ <!--@Table iot_project-->
|
|
|
+ <id column="id" jdbcType="BIGINT" property="id"/>
|
|
|
+ <result column="company_id" jdbcType="BIGINT" property="companyId"/>
|
|
|
+ <result column="code" jdbcType="VARCHAR" property="code"/>
|
|
|
+ <result column="title" jdbcType="VARCHAR" property="title"/>
|
|
|
+ <result column="remark" jdbcType="VARCHAR" property="remark"/>
|
|
|
+ <result column="status" jdbcType="TINYINT" property="status"/>
|
|
|
+ <result column="create_by" jdbcType="BIGINT" property="createBy"/>
|
|
|
+ <result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
|
|
+ <result column="update_by" jdbcType="BIGINT" property="updateBy"/>
|
|
|
+ <result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
|
|
+ <result column="delete_time" jdbcType="TIMESTAMP" property="deleteTime"/>
|
|
|
+ <result column="del_flag" jdbcType="TINYINT" property="delFlag"/>
|
|
|
+ </resultMap>
|
|
|
+ <sql id="Base_Column_List">
|
|
|
+ <!--@mbg.generated-->
|
|
|
+ id,
|
|
|
+ company_id,
|
|
|
+ code,
|
|
|
+ title,
|
|
|
+ remark,
|
|
|
+ `status`,
|
|
|
+ create_by,
|
|
|
+ create_time,
|
|
|
+ update_by,
|
|
|
+ update_time,
|
|
|
+ delete_time,
|
|
|
+ del_flag
|
|
|
+ </sql>
|
|
|
|
|
|
- <select id="pageQuery" resultType="com.middle.platform.manage.biz.domain.vo.IotProjectVo">
|
|
|
- select *
|
|
|
- from iot_project
|
|
|
- <where>
|
|
|
- del_flag = 0
|
|
|
- <if test="keywords != null and keywords != ''">
|
|
|
- and title like concat('%', #{keywords,jdbcType=VARCHAR}, '%')
|
|
|
- </if>
|
|
|
- </where>
|
|
|
- </select>
|
|
|
+ <select id="pageQuery" resultType="com.middle.platform.manage.biz.domain.vo.IotProjectVo">
|
|
|
+ select ipr.id,
|
|
|
+ ipr.company_id,
|
|
|
+ ipr.code,
|
|
|
+ ipr.title,
|
|
|
+ ipr.remark,
|
|
|
+ ipr.`status`,
|
|
|
+ ipr.create_by,
|
|
|
+ ipr.create_time,
|
|
|
+ ipr.update_by,
|
|
|
+ ipr.update_time,
|
|
|
+ ipr.delete_time,
|
|
|
+ ipr.del_flag,
|
|
|
+ sdi.label companyName
|
|
|
+ from iot_project ipr
|
|
|
+ left join sys_dict_item sdi on ipr.company_id = sdi.value
|
|
|
+ <where>
|
|
|
+ ipr.del_flag = 0
|
|
|
+ and sdi.type = 'company_msg'
|
|
|
+ <if test="keywords != null and keywords != ''">
|
|
|
+ and ipr.title like concat('%', #{keywords,jdbcType=VARCHAR}, '%')
|
|
|
+ </if>
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+
|
|
|
+ <delete id="delete">
|
|
|
+ update iot_project
|
|
|
+ set del_flag = 1
|
|
|
+ <where>
|
|
|
+ id = #{id,jdbcType=BIGINT}
|
|
|
+ </where>
|
|
|
+ </delete>
|
|
|
+
|
|
|
+ <select id="detail" resultType="com.middle.platform.manage.biz.domain.vo.IotProjectVo">
|
|
|
+ select ipr.id,
|
|
|
+ ipr.company_id,
|
|
|
+ ipr.code,
|
|
|
+ ipr.title,
|
|
|
+ ipr.remark,
|
|
|
+ ipr.`status`,
|
|
|
+ ipr.create_by,
|
|
|
+ ipr.create_time,
|
|
|
+ ipr.update_by,
|
|
|
+ ipr.update_time,
|
|
|
+ ipr.delete_time,
|
|
|
+ ipr.del_flag,
|
|
|
+ sdi.label companyName
|
|
|
+ from iot_project ipr
|
|
|
+ left join sys_dict_item sdi on ipr.company_id = sdi.value
|
|
|
+ <where>
|
|
|
+ ipr.del_flag = 0
|
|
|
+ and sdi.type = 'company_msg'
|
|
|
+ and ipr.id = #{id,jdbcType=BIGINT}
|
|
|
+ </where>
|
|
|
+ </select>
|
|
|
+
|
|
|
+ <update id="changeStatus">
|
|
|
+ update iot_project
|
|
|
+ set status = #{changeStatus.status,jdbcType=INTEGER}
|
|
|
+ <where>
|
|
|
+ id = #{changeStatus.id,jdbcType=BIGINT}
|
|
|
+ </where>
|
|
|
+ </update>
|
|
|
</mapper>
|