<?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="org.springblade.modules.zc.mapper.ZcMapper">
|
|
<!-- 通用查询映射结果 -->
|
<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="zctime" property="zctime"/>
|
<result column="type" property="type"/>
|
<result column="deptid" property="deptid"/>
|
<result column="parent_id" property="parentId"/>
|
<result column="jurisdiction" property="jurisdiction"/>
|
</resultMap>
|
|
|
<select id="selectZcPage" resultMap="zcResultMap">
|
select * from act_zc where
|
1 = 1
|
<if test="zc.username != null and zc.username != '' ">
|
and username like CONCAT('%',#{zc.username},'%')
|
</if>
|
<if test="zc.sname != null and zc.sname != '' ">
|
and sname like CONCAT('%',#{zc.sname},'%')
|
</if>
|
<if test="zc.sex != null and zc.sex != '' ">
|
and sex like CONCAT('%',#{zc.sex},'%')
|
</if>
|
<if test="zc.type != null and zc.type != '' ">
|
and type like CONCAT('%',#{zc.type},'%')
|
</if>
|
and type != 1
|
</select>
|
|
|
<!--注册新增-->
|
<insert id="inster">
|
insert into act_zc(username,password,sname,sex,phone,zctime,deptid,parent_id,jurisdiction) values(#{username},#{password},#{sname},#{sex},#{phone},#{zctime},#{deptid},#{parentId},#{jurisdiction})
|
</insert>
|
|
<select id="selectType" resultType="String">
|
select type from act_zc where username=#{param1}
|
</select>
|
|
</mapper>
|