|
@@ -6,6 +6,7 @@
|
|
<resultMap id="AlarmConfigMap" type="com.jpsoft.smart.modules.base.entity.AlarmConfig">
|
|
<resultMap id="AlarmConfigMap" type="com.jpsoft.smart.modules.base.entity.AlarmConfig">
|
|
<result property="id" column="id_"/>
|
|
<result property="id" column="id_"/>
|
|
<result property="companyId" column="company_id"/>
|
|
<result property="companyId" column="company_id"/>
|
|
|
|
+ <result property="companyName" column="company_name"/>
|
|
<result property="weekdays" column="weekdays_"/>
|
|
<result property="weekdays" column="weekdays_"/>
|
|
<result property="startTime" column="start_time"/>
|
|
<result property="startTime" column="start_time"/>
|
|
<result property="endTime" column="end_time"/>
|
|
<result property="endTime" column="end_time"/>
|
|
@@ -40,7 +41,7 @@
|
|
]]>
|
|
]]>
|
|
</insert>
|
|
</insert>
|
|
<delete id="delete" parameterType="string">
|
|
<delete id="delete" parameterType="string">
|
|
- delete from base_alarm_config where ${pkField.columnName}=#{$pkFieldName,jdbcType=VARCHAR}
|
|
|
|
|
|
+ delete from base_alarm_config where id_=#{id,jdbcType=VARCHAR}
|
|
</delete>
|
|
</delete>
|
|
<update id="update" parameterType="com.jpsoft.smart.modules.base.entity.AlarmConfig">
|
|
<update id="update" parameterType="com.jpsoft.smart.modules.base.entity.AlarmConfig">
|
|
update base_alarm_config
|
|
update base_alarm_config
|
|
@@ -76,26 +77,29 @@
|
|
update_time=#{updateTime,jdbcType= TIMESTAMP },
|
|
update_time=#{updateTime,jdbcType= TIMESTAMP },
|
|
</if>
|
|
</if>
|
|
</set>
|
|
</set>
|
|
- where ${pkField.ColumnName}=#{$pkFieldName}
|
|
|
|
|
|
+ where id_=#{id}
|
|
</update>
|
|
</update>
|
|
<select id="get" parameterType="string" resultMap="AlarmConfigMap">
|
|
<select id="get" parameterType="string" resultMap="AlarmConfigMap">
|
|
- select
|
|
|
|
- id_,company_id,weekdays_,start_time,end_time,del_flag,create_by,create_time,update_by,update_time from
|
|
|
|
- base_alarm_config where ${pkField.ColumnName}=#{0}
|
|
|
|
|
|
+ select * from base_alarm_config where id_=#{0} and del_flag=0
|
|
</select>
|
|
</select>
|
|
<select id="exist" parameterType="string" resultType="int">
|
|
<select id="exist" parameterType="string" resultType="int">
|
|
- select count(*) from base_alarm_config where ${pkField.ColumnName}=#{0}
|
|
|
|
|
|
+ select count(*) from base_alarm_config where id_=#{0} and del_flag=0
|
|
</select>
|
|
</select>
|
|
<select id="list" resultMap="AlarmConfigMap">
|
|
<select id="list" resultMap="AlarmConfigMap">
|
|
select * from base_alarm_config where del_flag=0
|
|
select * from base_alarm_config where del_flag=0
|
|
</select>
|
|
</select>
|
|
<select id="search" parameterType="hashmap" resultMap="AlarmConfigMap">
|
|
<select id="search" parameterType="hashmap" resultMap="AlarmConfigMap">
|
|
<![CDATA[
|
|
<![CDATA[
|
|
- select * from base_alarm_config
|
|
|
|
|
|
+ select a.*,b.name_ as company_name from base_alarm_config a left join base_company_info b
|
|
|
|
+ on a.company_id = b.id_
|
|
]]>
|
|
]]>
|
|
<where>
|
|
<where>
|
|
|
|
+ a.del_flag = 0
|
|
<if test="searchParams.id != null">
|
|
<if test="searchParams.id != null">
|
|
- and ID_ like #{searchParams.id}
|
|
|
|
|
|
+ and a.ID_ like #{searchParams.id}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchParams.companyId != null">
|
|
|
|
+ and a.company_id = #{searchParams.companyId}
|
|
</if>
|
|
</if>
|
|
</where>
|
|
</where>
|
|
<foreach item="sort" collection="sortList" open="order by" separator=",">
|
|
<foreach item="sort" collection="sortList" open="order by" separator=",">
|