智慧保安后台管理-外网项目备份
zhongrj
2023-09-17 8853292babb2ad94de4a3207966f1e83b767cd2d
src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml
@@ -3,16 +3,17 @@
<mapper namespace="org.springblade.modules.zc.mapper.ZcMapper">
    <!-- 通用查询映射结果 -->
    <resultMap id="zcResultMap" type="org.springblade.modules.zc.entity.Zc">
    <resultMap id="zcResultMap" type="org.springblade.modules.zc.vo.ZcVO">
        <id column="id" property="id"/>
        <result column="username" property="username"/>
        <result column="password" property="password"/>
        <result column="sname" property="sname"/>
        <result column="sex" property="sex"/>
        <result column="phone" property="phone"/>
        <result column="cardid" property="cardid"/>
        <result column="zctime" property="zctime"/>
        <result column="type" property="type"/>
        <result column="deptid" property="deptid"/>
        <result column="parentId" property="parentId"/>
    </resultMap>
@@ -23,12 +24,23 @@
        z.sname,
        z.cardid,
        z.type,
        d.dept_name AS deptid
        z.deptid
        FROM
        act_zc z
        LEFT JOIN blade_dept d ON d.id = z.deptid where 1=1
        act_zc z where 1=1
        <if test="zc.type!=null and zc.type!=''">
            and z.type=#{zc.type}
        </if>
        <if test="zc.sname!=null and zc.sname!=''">
            and z.sname like concat(concat('%', #{zc.sname}),'%')
        </if>
        <if test="zc.username!=null and zc.username!=''">
            and z.username like concat(concat('%', #{zc.username}),'%')
        </if>
        <if test="zc.cardid!=null and zc.cardid!=''">
            and z.cardid like concat(concat('%', #{zc.cardid}),'%')
        </if>
        <if test="zc.deptid!=null and zc.deptid!=''">
            and z.deptid = #{zc.deptid}
        </if>
    </select>
@@ -39,10 +51,17 @@
        values (#{username}, #{password}, #{sname}, #{cardid}, #{zctime}, #{deptid})
    </insert>
    <!--根据用户名用户注册信息-->
    <select id="selectType" resultType="String">
        select type
        from act_zc
        where username = #{param1}
    </select>
    <!--根据用户名查询注册用户注册信息-->
    <select id="getAuditSuccessInfo" resultType="org.springblade.modules.zc.entity.Zc">
        select * from act_zc
        where username = #{param1}
    </select>
</mapper>