|
@@ -19,15 +19,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<result property="address" column="address" />
|
|
<result property="address" column="address" />
|
|
<result property="contactUser" column="contact_user" />
|
|
<result property="contactUser" column="contact_user" />
|
|
<result property="contactPhone" column="contact_phone" />
|
|
<result property="contactPhone" column="contact_phone" />
|
|
|
|
+ <result property="deptId" column="dept_id" />
|
|
|
|
+ <result property="deptName" column="dept_name" />
|
|
|
|
+ <result property="createUserId" column="create_user_id" />
|
|
</resultMap>
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectTResStationweatherVo">
|
|
<sql id="selectTResStationweatherVo">
|
|
- select id, status, remark, del_flag, create_by, create_time, update_by, update_time, name, longitude, latitude, address, contact_user, contact_phone from t_res_stationweather
|
|
|
|
|
|
+ select t.dept_id,
|
|
|
|
+ (select dept_name from sys_dept where dept_id=t.dept_id) dept_name,
|
|
|
|
+ t.create_user_id, t.id, t.status, t.remark, t.del_flag, t.create_by, t.create_time, t.update_by, t.update_time, t.name, t.longitude, t.latitude, t.address, t.contact_user, t.contact_phone from t_res_stationweather t
|
|
</sql>
|
|
</sql>
|
|
|
|
|
|
<select id="selectTResStationweatherList" parameterType="TResStationweather" resultMap="TResStationweatherResult">
|
|
<select id="selectTResStationweatherList" parameterType="TResStationweather" resultMap="TResStationweatherResult">
|
|
<include refid="selectTResStationweatherVo"/>
|
|
<include refid="selectTResStationweatherVo"/>
|
|
- <where>
|
|
|
|
|
|
+ <where>
|
|
|
|
+ 1=1
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="status != null and status != ''"> and status = #{status}</if>
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
<if test="name != null and name != ''"> and name like concat('%', #{name}, '%')</if>
|
|
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
|
|
<if test="longitude != null and longitude != ''"> and longitude = #{longitude}</if>
|
|
@@ -35,7 +41,11 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="address != null and address != ''"> and address = #{address}</if>
|
|
<if test="address != null and address != ''"> and address = #{address}</if>
|
|
<if test="contactUser != null and contactUser != ''"> and contact_user = #{contactUser}</if>
|
|
<if test="contactUser != null and contactUser != ''"> and contact_user = #{contactUser}</if>
|
|
<if test="contactPhone != null and contactPhone != ''"> and contact_phone = #{contactPhone}</if>
|
|
<if test="contactPhone != null and contactPhone != ''"> and contact_phone = #{contactPhone}</if>
|
|
|
|
+ <if test="deptId != null and deptId != ''"> and dept_id = #{deptId}</if>
|
|
|
|
+ <if test="createUserId != null and createUserId != ''"> and create_user_id = #{createUserId}</if>
|
|
</where>
|
|
</where>
|
|
|
|
+ <!-- 数据范围过滤 -->
|
|
|
|
+ ${params.dataScope}
|
|
</select>
|
|
</select>
|
|
|
|
|
|
<select id="selectTResStationweatherById" parameterType="String" resultMap="TResStationweatherResult">
|
|
<select id="selectTResStationweatherById" parameterType="String" resultMap="TResStationweatherResult">
|
|
@@ -60,6 +70,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="address != null">address,</if>
|
|
<if test="address != null">address,</if>
|
|
<if test="contactUser != null">contact_user,</if>
|
|
<if test="contactUser != null">contact_user,</if>
|
|
<if test="contactPhone != null">contact_phone,</if>
|
|
<if test="contactPhone != null">contact_phone,</if>
|
|
|
|
+ <if test="deptId != null">dept_id,</if>
|
|
|
|
+ <if test="createUserId != null">create_user_id,</if>
|
|
</trim>
|
|
</trim>
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
|
<if test="id != null and id != ''">#{id},</if>
|
|
<if test="id != null and id != ''">#{id},</if>
|
|
@@ -76,6 +88,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="address != null">#{address},</if>
|
|
<if test="address != null">#{address},</if>
|
|
<if test="contactUser != null">#{contactUser},</if>
|
|
<if test="contactUser != null">#{contactUser},</if>
|
|
<if test="contactPhone != null">#{contactPhone},</if>
|
|
<if test="contactPhone != null">#{contactPhone},</if>
|
|
|
|
+ <if test="deptId != null">#{deptId},</if>
|
|
|
|
+ <if test="createUserId != null">#{createUserId},</if>
|
|
</trim>
|
|
</trim>
|
|
</insert>
|
|
</insert>
|
|
|
|
|
|
@@ -95,6 +109,8 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
<if test="address != null">address = #{address},</if>
|
|
<if test="address != null">address = #{address},</if>
|
|
<if test="contactUser != null">contact_user = #{contactUser},</if>
|
|
<if test="contactUser != null">contact_user = #{contactUser},</if>
|
|
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
|
|
<if test="contactPhone != null">contact_phone = #{contactPhone},</if>
|
|
|
|
+ <if test="deptId != null">dept_id = #{deptId},</if>
|
|
|
|
+ <if test="createUserId != null">create_user_id = #{createUserId},</if>
|
|
</trim>
|
|
</trim>
|
|
where id = #{id}
|
|
where id = #{id}
|
|
</update>
|
|
</update>
|