lidongdong
2022-10-08 bf4334107a6a46c46ef3e13582598bbcbbdd7f35
修改组织架构新增  编辑接口
2个文件已修改
28 ■■■■■ 已修改文件
flower_city/src/main/resources/mapper/OrganizationChartMapper.xml 18 ●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/SysUserMapper.xml 10 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
flower_city/src/main/resources/mapper/OrganizationChartMapper.xml
@@ -33,7 +33,7 @@
            update_time,
            parent_id,
            update_user_id,
            (select  user_name from automessage_sys_user where user_id=automessage_organization_chart.update_user_id)updateUserName,
            (select  user_name from automessage_sys_user where user_id=automessage_organization_chart.update_user_id) as updateUserName,
            (select organization_name from automessage_organization_chart as oc where oc.id=automessage_organization_chart.parent_id) as parentName,
            city,
            district,
@@ -43,7 +43,7 @@
            (select name from area_code_2022 where village=area_code_2022.code) as villageName,
            detailed_address,
            grade,
            resume,contact_number,area_list
            area_list
        FROM
            automessage_organization_chart
    </sql>
@@ -91,8 +91,6 @@
        or resume like concat('%', #{keyWord}, '%') or #{keyWord} like concat('%', resume, '%')
    </select>
    <insert id="insertConfig" parameterType="com.dg.core.db.gen.entity.OrganizationChartEntity">
        insert into automessage_organization_chart (
        <if test="id != null">id,</if>
@@ -104,6 +102,10 @@
        <if test="detailedAddress != null and detailedAddress != '' ">detailed_address,</if>
        <if test="grade != null and grade != '' ">grade,</if>
        <if test="areaList != null and areaList != '' ">area_list,</if>
        <if test="contactNumber != null and contactNumber != '' ">contact_number,</if>
        <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application,</if>
        <if test="updateUserId != null and updateUserId != '' ">update_user_id,</if>
        <if test="resume != null and resume != '' ">resume,</if>
        update_time,
        create_time
        )values(
@@ -116,6 +118,10 @@
        <if test="detailedAddress != null and detailedAddress != '' ">#{detailedAddress},</if>
        <if test="grade != null and grade != '' ">#{grade},</if>
        <if test="areaList != null and areaList != '' ">#{areaList},</if>
        <if test="contactNumber != null and contactNumber != '' ">#{contactNumber},</if>
        <if test="departmentalApplication != null and departmentalApplication != '' ">#{departmentalApplication},</if>
        <if test="updateUserId != null and updateUserId != '' ">#{updateUserId},</if>
        <if test="resume != null and resume != '' ">#{resume},</if>
        sysdate(),
        sysdate()
        )
@@ -135,6 +141,10 @@
            <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application=#{departmentalApplication},</if>
            <if test="updateUserId != null">update_user_id=#{updateUserId},</if>
            <if test="areaList != null and areaList != '' ">area_list=#{areaList},</if>
            <if test="contactNumber != null and contactNumber != '' ">contact_number=#{contactNumber},</if>
            <if test="departmentalApplication != null and departmentalApplication != '' ">departmental_application=#{departmentalApplication},</if>
            <if test="updateUserId != null and updateUserId != '' ">update_user_id=#{updateUserId},</if>
            <if test="resume != null and resume != '' ">resume=#{resume},</if>
            update_time=sysdate()
        </set>
        where  id= #{id}
flower_city/src/main/resources/mapper/SysUserMapper.xml
@@ -1,7 +1,6 @@
<?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.dg.core.db.gen.mapper.SysUserMapper">
    <resultMap type="com.dg.core.db.gen.entity.SysUser" id="SysUserResult">
        <id     property="id"      column="id"      />
        <id     property="userId"      column="user_id"      />
@@ -75,7 +74,6 @@
            automessage_sys_user
    </sql>
    <select id="selectNum" parameterType="string" resultType="integer">
        select count(user_id) from automessage_sys_user
        <where>
@@ -114,10 +112,10 @@
        <include refid="selectSysUserVo"/>
         <where>
        <if test="list!=null">
           department_id in
        <foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
            #{id}
        </foreach>
            department_id in
            <foreach collection="list" item="id" index="index" open="(" close=")" separator=",">
                #{id}
            </foreach>
         </if>
         and (master_ids like concat('%',#{classifyIdFront}, '%') or master_ids like concat('%',#{classifyIdAfter}, '%'))
         </where>