tangzy
2021-09-02 74b4f898106c8d61e10518c6e6277223fe9a98e4
src/main/java/org/springblade/modules/zc/mapper/ZcMapper.xml
@@ -13,22 +13,36 @@
        <result column="zctime" property="zctime"/>
        <result column="type" property="type"/>
        <result column="deptid" property="deptid"/>
        <result column="parentId" property="parentId"/>
    </resultMap>
    <select id="selectZcPage" resultMap="zcResultMap">
        select * from act_zc where is_deleted = 0
        SELECT
        z.id,
        z.username,
        z.sname,
        z.cardid,
        z.type,
        d.dept_name AS deptid
        FROM
        act_zc z
        LEFT JOIN blade_dept d ON d.id = z.deptid where 1=1
        <if test="zc.type!=null and zc.type!=''">
            and z.type=#{zc.type}
        </if>
    </select>
    <!--注册新增-->
   <insert id="inster">
       insert  into act_zc(username,password,sname,sex,phone,zctime,deptid) values(#{username},#{password},#{sname},#{sex},#{phone},#{zctime},#{deptid})
   </insert>
    <insert id="inster">
        insert into act_zc(username, password, sname, cardid, zctime, deptid)
        values (#{username}, #{password}, #{sname}, #{cardid}, #{zctime}, #{deptid})
    </insert>
    <select id="selectType" resultType="String">
        select type from act_zc where username=#{param1}
        select type
        from act_zc
        where username = #{param1}
    </select>
</mapper>