ah_jjzhgd_service/securitycontrol-model/securitycontrol-background/src/main/resources/mapper/SjEfficiencyMapper.xml

34 lines
1.4 KiB
XML
Raw Normal View History

2025-10-17 14:46:26 +08:00
<?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.securitycontrol.background.mapper.SjEfficiencyMapper">
<insert id="addData">
insert into sj_efficiency_analysis(
create_time,weather
)values (#{createTime},#{weather})
</insert>
<update id="updateData">
update sj_efficiency_analysis set create_time=#{createTime},weather=#{weather}
where id=#{id}
</update>
<delete id="delete">
delete from sj_efficiency_analysis where id=#{id}
</delete>
<select id="getList" resultType="com.securitycontrol.entity.background.vo.SjEfficiencyVo">
select id, create_time createTime,weather
from sj_efficiency_analysis
<where>
<if test="weather!=null and weather!=''">
weather like concat('%',#{weather},'%')
</if>
<if test="createTime!=null and createTime!=''">
and create_time =#{createTime}
</if>
</where>
</select>
<select id="getDetails" resultType="com.securitycontrol.entity.background.vo.SjEfficiencyVo">
select id, create_time createTime,weather
from sj_efficiency_analysis
where id=#{id}
</select>
</mapper>