智慧保安后台管理-外网
Administrator
2022-04-28 3255066de97dc0ca7086b91c214e7ae94c0af859
src/main/java/org/springblade/modules/system/mapper/UserMapper.xml
@@ -360,7 +360,7 @@
            and account like concat('%', #{user.account},'%')
        </if>
        <if test="user.roleId!=null and user.roleId != ''">
            and br.role_alias = '公安管理员'
            and (br.role_alias = '公安管理员' or br.role_alias = '民警')
        </if>
        <if test="user.realName!=null and user.realName != ''">
            and real_name like concat(concat('%', #{user.realName}),'%')
@@ -656,7 +656,14 @@
         blade_dept bd
         on
         bu.dept_id = bd.id
        where securitynumber = #{securityNumber}
        where
        1=1
        <if test="securityNumber!=null and securityNumber!=''">
            and securitynumber = #{securityNumber}
        </if>
        <if test="cardid!=null and cardid!=''">
            and cardid = #{cardid}
        </if>
        and bu.status = 1
        and bu.is_deleted = 0
    </select>
@@ -985,7 +992,12 @@
        <if test="user.cardid!=null and user.cardid != ''">
            and bu.cardid like concat('%', #{user.cardid},'%')
        </if>
        ORDER BY bu.id desc
        <if test="user.sortName!=null and user.sortName!=''">
            ORDER BY bu.${user.sortName} ${user.sort},bu.id desc
        </if>
        <if test="user.sortName==null or user.sortName==''">
            ORDER BY bu.id desc
        </if>
    </select>
    <!--查询押运人员编码不为null的保安信息-->
@@ -1056,6 +1068,36 @@
        </foreach>
    </insert>
    <!-- 批量更新用户数据 -->
    <update id="batchUpdateUserList" parameterType="java.util.List">
        <foreach collection="list" item="user" index="index" open="" close="" separator=";">
            update blade_user
          <set>
            account=${user.account}
          </set>
            <set>
            password=${user.password}
          </set>
            <set>
            real_name=${user.realName}
          </set>
            <set>
            phone=${user.phone}
          </set>
            <set>
            registered=${user.registered}
          </set>
            <set>
            securitynumber=${user.securitynumber}
          </set>
            <set>
            hold=${user.hold}
          </set>
          where id = ${user.id}
        </foreach>
    </update>
    <!--查询学历统计信息-->
    <select id="getAgeStatistics" resultType="java.lang.Integer">
        select count(*) c from (
@@ -1114,6 +1156,28 @@
        )
    </select>
    <select id="getUserById" resultType="org.springblade.modules.system.entity.User">
        select * from blade_user where id = #{id}
    </select>
    <insert id="insertUser">
        insert into blade_user
        (
            id,tenant_id,account,password,name,real_name,avatar,email,phone,sex,
            role_id,dept_id,cardid,nativePlace,nation,fingerprint,education,
            politicaloutlook,healstats,height,address,registered,rtime,
            securitynumber,hold,jurisdiction,examination_type,status,is_deleted,dispatch,guncode,create_time,cell
        )
        values
        (
            #{user.id},#{user.tenantId},#{user.account},#{user.password},#{user.name},#{user.realName},#{user.avatar},
            #{user.email},#{user.phone},#{user.sex},
            #{user.roleId},#{user.deptId},#{user.cardid},#{user.nativeplace},#{user.nation},#{user.fingerprint},#{user.education},
            #{user.politicaloutlook},#{user.healstats},#{user.height},#{user.address},#{user.registered},#{user.rtime},
            #{user.securitynumber},#{user.hold},#{user.jurisdiction},#{user.examinationType},#{user.status},#{user.isDeleted},
            #{user.dispatch},#{user.guncode},#{user.createTime},#{user.cell}
        )
    </insert>
</mapper>