|
@@ -12,19 +12,20 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
<result property="createTime" column="create_time" />
|
|
|
<result property="updateBy" column="update_by" />
|
|
|
<result property="updateTime" column="update_time" />
|
|
|
- <result property="appOrg" column="app_org" />
|
|
|
- <result property="appName" column="app_name" />
|
|
|
+ <result property="unitCode" column="unit_code" />
|
|
|
+ <result property="unitName" column="unit_name" />
|
|
|
+ <result property="parentUnitCode" column="parent_unit_code" />
|
|
|
</resultMap>
|
|
|
|
|
|
<sql id="selectLargeUnitVo">
|
|
|
- select id, del_flag, create_by, create_time, update_by, update_time, app_org, app_name from large_plat_app_org
|
|
|
+ select id, del_flag, connect_flag, create_by, create_time, update_by, update_time, unit_name, unit_code, parent_unit_code from large_unit
|
|
|
</sql>
|
|
|
|
|
|
<select id="selectLargeUnitList" parameterType="LargeUnit" resultMap="LargeUnitResult">
|
|
|
<include refid="selectLargeUnitVo"/>
|
|
|
<where>
|
|
|
- <if test="appOrg != null and appOrg != ''"> and app_org = #{appOrg}</if>
|
|
|
- <if test="appName != null and appName != ''"> and app_name like concat('%', #{appName}, '%')</if>
|
|
|
+ <if test="unitCode != null and unitCode != ''"> and unit_code = #{unitCode}</if>
|
|
|
+ <if test="unitName != null and unitName != ''"> and unit_name like concat('%', #{unitName}, '%')</if>
|
|
|
</where>
|
|
|
</select>
|
|
|
|
|
@@ -34,7 +35,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</select>
|
|
|
|
|
|
<insert id="insertLargeUnit" parameterType="LargeUnit" useGeneratedKeys="true" keyProperty="id">
|
|
|
- insert into large_plat_app_org
|
|
|
+ insert into large_unit
|
|
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
|
<if test="delFlag != null">del_flag,</if>
|
|
|
<if test="createBy != null">create_by,</if>
|
|
@@ -56,7 +57,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</insert>
|
|
|
|
|
|
<update id="updateLargeUnit" parameterType="LargeUnit">
|
|
|
- update large_plat_app_org
|
|
|
+ update large_unit
|
|
|
<trim prefix="SET" suffixOverrides=",">
|
|
|
<if test="delFlag != null">del_flag = #{delFlag},</if>
|
|
|
<if test="createBy != null">create_by = #{createBy},</if>
|
|
@@ -70,21 +71,21 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
</update>
|
|
|
|
|
|
<delete id="deleteLargeUnitById" parameterType="Long">
|
|
|
- delete from large_plat_app_org where id = #{id}
|
|
|
+ delete from large_unit where id = #{id}
|
|
|
</delete>
|
|
|
|
|
|
<delete id="deleteLargeUnitByIds" parameterType="String">
|
|
|
- delete from large_plat_app_org where id in
|
|
|
+ delete from large_unit where id in
|
|
|
<foreach item="id" collection="array" open="(" separator="," close=")">
|
|
|
#{id}
|
|
|
</foreach>
|
|
|
</delete>
|
|
|
<delete id="reallyDeleteByWrapper">
|
|
|
- DELETE FROM large_plat_app_org ${ew.customSqlSegment}
|
|
|
+ DELETE FROM large_unit ${ew.customSqlSegment}
|
|
|
</delete>
|
|
|
|
|
|
<select id="getConnectUnitNum" resultType="int">
|
|
|
- select count(*) from large_plat_app_org
|
|
|
+ select count(*) from large_unit
|
|
|
where connect_flag = '0' and del_flag = '0'
|
|
|
</select>
|
|
|
|
|
@@ -101,7 +102,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM
|
|
|
`large_camera` a
|
|
|
LEFT JOIN large_project b ON a.project_id = b.id
|
|
|
- LEFT JOIN large_plat_app_org c ON b.unit_id = c.app_org
|
|
|
+ LEFT JOIN large_unit c ON b.unit_id = c.app_org
|
|
|
GROUP BY
|
|
|
c.app_org
|
|
|
</select>
|
|
@@ -119,7 +120,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
FROM
|
|
|
`large_camera` a
|
|
|
LEFT JOIN large_project b ON a.project_id = b.id
|
|
|
- LEFT JOIN large_plat_app_org c ON b.unit_id = c.app_org
|
|
|
+ LEFT JOIN large_unit c ON b.unit_id = c.app_org
|
|
|
WHERE
|
|
|
c.app_org = #{appOrg}
|
|
|
</select>
|