2025-04-10 14:07:11 +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.dite.znpt.mapper.ProjectMapper">
|
|
|
|
|
|
|
|
<sql id="Base_Column_List">
|
|
|
|
a.project_id, a.project_name, a.farm_name, a.farm_address,
|
2025-04-11 23:17:53 +08:00
|
|
|
a.method_id, a.scale, a.turbine_model, a.status
|
2025-04-10 14:07:11 +08:00
|
|
|
</sql>
|
|
|
|
|
|
|
|
<select id="queryBySelective" resultType="com.dite.znpt.domain.vo.ProjectResp">
|
|
|
|
select
|
|
|
|
<include refid="Base_Column_List"/>
|
|
|
|
from project a
|
|
|
|
<where>
|
|
|
|
<if test="keyword != null and keyword != ''">
|
|
|
|
# and (a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%') or a.TODO like concat('%', #{keyword,jdbcType=VARCHAR}, '%'))
|
|
|
|
</if>
|
|
|
|
<if test="projectId != null and projectId != ''">
|
|
|
|
and a.project_id like concat ('%', #{projectId}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="projectName != null and projectName != ''">
|
|
|
|
and a.project_name like concat ('%', #{projectName}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="farmName != null and farmName != ''">
|
|
|
|
and a.farm_name like concat ('%', #{farmName}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="farmAddress != null and farmAddress != ''">
|
|
|
|
and a.farm_address like concat ('%', #{farmAddress}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="methodId != null and methodId != ''">
|
|
|
|
and a.method_id like concat ('%', #{methodId}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="scale != null and scale != ''">
|
|
|
|
and a.scale like concat ('%', #{scale}, '%')
|
|
|
|
</if>
|
|
|
|
<if test="turbineModel != null and turbineModel != ''">
|
|
|
|
and a.turbine_model like concat ('%', #{turbineModel}, '%')
|
|
|
|
</if>
|
2025-04-11 23:17:53 +08:00
|
|
|
<if test="status != null and status != ''">
|
|
|
|
and a.status like concat ('%', #{status}, '%')
|
|
|
|
</if>
|
2025-04-10 14:07:11 +08:00
|
|
|
</where>
|
|
|
|
</select>
|
|
|
|
</mapper>
|
|
|
|
|