<?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.entity.Zc">
|
<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"/>
|
</resultMap>
|
|
|
<select id="selectZcPage" resultMap="zcResultMap">
|
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, 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>
|
|
</mapper>
|