first commit

This commit is contained in:
2026-01-16 14:13:44 +08:00
commit 903ff8d495
34603 changed files with 8585054 additions and 0 deletions

View File

@ -0,0 +1,199 @@
<?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="user.CompanyMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.Company" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="address" property="address" jdbcType="VARCHAR" />
<result column="tel" property="tel" jdbcType="VARCHAR" />
<result column="website" property="website" jdbcType="VARCHAR" />
<result column="taskid" property="taskid" jdbcType="VARCHAR" />
<result column="post" property="post" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="version" property="version" jdbcType="INTEGER" />
<result column="morder" property="morder" jdbcType="INTEGER" />
<result column="sname" property="sname" jdbcType="VARCHAR" />
<result column="active" property="active" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, name, pid, address, tel, website, taskid, post, insdt, insuser, version, morder,
sname, active
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_company
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_company
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.user.Company" >
insert into tb_company (id, name, pid,
address, tel, website,
taskid, post, insdt,
insuser, version, morder,
sname, active)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
#{address,jdbcType=VARCHAR}, #{tel,jdbcType=VARCHAR}, #{website,jdbcType=VARCHAR},
#{taskid,jdbcType=VARCHAR}, #{post,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{insuser,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER}, #{morder,jdbcType=INTEGER},
#{sname,jdbcType=VARCHAR}, #{active,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.user.Company" >
insert into tb_company
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="name != null" >
name,
</if>
<if test="pid != null" >
pid,
</if>
<if test="address != null" >
address,
</if>
<if test="tel != null" >
tel,
</if>
<if test="website != null" >
website,
</if>
<if test="taskid != null" >
taskid,
</if>
<if test="post != null" >
post,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="version != null" >
version,
</if>
<if test="morder != null" >
morder,
</if>
<if test="sname != null" >
sname,
</if>
<if test="active != null" >
active,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
<if test="address != null" >
#{address,jdbcType=VARCHAR},
</if>
<if test="tel != null" >
#{tel,jdbcType=VARCHAR},
</if>
<if test="website != null" >
#{website,jdbcType=VARCHAR},
</if>
<if test="taskid != null" >
#{taskid,jdbcType=VARCHAR},
</if>
<if test="post != null" >
#{post,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="version != null" >
#{version,jdbcType=INTEGER},
</if>
<if test="morder != null" >
#{morder,jdbcType=INTEGER},
</if>
<if test="sname != null" >
#{sname,jdbcType=VARCHAR},
</if>
<if test="active != null" >
#{active,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.user.Company" >
update tb_company
<set >
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="address != null" >
address = #{address,jdbcType=VARCHAR},
</if>
<if test="tel != null" >
tel = #{tel,jdbcType=VARCHAR},
</if>
<if test="website != null" >
website = #{website,jdbcType=VARCHAR},
</if>
<if test="taskid != null" >
taskid = #{taskid,jdbcType=VARCHAR},
</if>
<if test="post != null" >
post = #{post,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="version != null" >
version = #{version,jdbcType=INTEGER},
</if>
<if test="morder != null" >
morder = #{morder,jdbcType=INTEGER},
</if>
<if test="sname != null" >
sname = #{sname,jdbcType=VARCHAR},
</if>
<if test="active != null" >
active = #{active,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.user.Company" >
update tb_company
set name = #{name,jdbcType=VARCHAR},
pid = #{pid,jdbcType=VARCHAR},
address = #{address,jdbcType=VARCHAR},
tel = #{tel,jdbcType=VARCHAR},
website = #{website,jdbcType=VARCHAR},
taskid = #{taskid,jdbcType=VARCHAR},
post = #{post,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
insuser = #{insuser,jdbcType=VARCHAR},
version = #{version,jdbcType=INTEGER},
morder = #{morder,jdbcType=INTEGER},
sname = #{sname,jdbcType=VARCHAR},
active = #{active,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -0,0 +1,223 @@
<?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="user.DeptMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.Dept" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="RoleID" property="roleid" jdbcType="VARCHAR" />
<result column="offtel" property="offtel" jdbcType="VARCHAR" />
<result column="telout" property="telout" jdbcType="VARCHAR" />
<result column="telin" property="telin" jdbcType="VARCHAR" />
<result column="fax" property="fax" jdbcType="VARCHAR" />
<result column="office" property="office" jdbcType="VARCHAR" />
<result column="logopic" property="logopic" jdbcType="VARCHAR" />
<result column="taskid" property="taskid" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="version" property="version" jdbcType="INTEGER" />
<result column="morder" property="morder" jdbcType="INTEGER" />
<result column="sname" property="sname" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, name, pid, RoleID, offtel, telout, telin, fax, office, logopic, taskid, insdt,
insuser, version, morder, sname
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_dept
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_dept
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.user.Dept" >
insert into tb_dept (id, name, pid,
RoleID, offtel, telout,
telin, fax, office,
logopic, taskid, insdt,
insuser, version, morder,
sname)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{pid,jdbcType=VARCHAR},
#{roleid,jdbcType=VARCHAR}, #{offtel,jdbcType=VARCHAR}, #{telout,jdbcType=VARCHAR},
#{telin,jdbcType=VARCHAR}, #{fax,jdbcType=VARCHAR}, #{office,jdbcType=VARCHAR},
#{logopic,jdbcType=VARCHAR}, #{taskid,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP},
#{insuser,jdbcType=VARCHAR}, #{version,jdbcType=INTEGER}, #{morder,jdbcType=INTEGER},
#{sname,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.user.Dept" >
insert into tb_dept
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="name != null" >
name,
</if>
<if test="pid != null" >
pid,
</if>
<if test="roleid != null" >
RoleID,
</if>
<if test="offtel != null" >
offtel,
</if>
<if test="telout != null" >
telout,
</if>
<if test="telin != null" >
telin,
</if>
<if test="fax != null" >
fax,
</if>
<if test="office != null" >
office,
</if>
<if test="logopic != null" >
logopic,
</if>
<if test="taskid != null" >
taskid,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="version != null" >
version,
</if>
<if test="morder != null" >
morder,
</if>
<if test="sname != null" >
sname,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
<if test="roleid != null" >
#{roleid,jdbcType=VARCHAR},
</if>
<if test="offtel != null" >
#{offtel,jdbcType=VARCHAR},
</if>
<if test="telout != null" >
#{telout,jdbcType=VARCHAR},
</if>
<if test="telin != null" >
#{telin,jdbcType=VARCHAR},
</if>
<if test="fax != null" >
#{fax,jdbcType=VARCHAR},
</if>
<if test="office != null" >
#{office,jdbcType=VARCHAR},
</if>
<if test="logopic != null" >
#{logopic,jdbcType=VARCHAR},
</if>
<if test="taskid != null" >
#{taskid,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="version != null" >
#{version,jdbcType=INTEGER},
</if>
<if test="morder != null" >
#{morder,jdbcType=INTEGER},
</if>
<if test="sname != null" >
#{sname,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.user.Dept" >
update tb_dept
<set >
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="roleid != null" >
RoleID = #{roleid,jdbcType=VARCHAR},
</if>
<if test="offtel != null" >
offtel = #{offtel,jdbcType=VARCHAR},
</if>
<if test="telout != null" >
telout = #{telout,jdbcType=VARCHAR},
</if>
<if test="telin != null" >
telin = #{telin,jdbcType=VARCHAR},
</if>
<if test="fax != null" >
fax = #{fax,jdbcType=VARCHAR},
</if>
<if test="office != null" >
office = #{office,jdbcType=VARCHAR},
</if>
<if test="logopic != null" >
logopic = #{logopic,jdbcType=VARCHAR},
</if>
<if test="taskid != null" >
taskid = #{taskid,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="version != null" >
version = #{version,jdbcType=INTEGER},
</if>
<if test="morder != null" >
morder = #{morder,jdbcType=INTEGER},
</if>
<if test="sname != null" >
sname = #{sname,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.user.Dept" >
update tb_dept
set name = #{name,jdbcType=VARCHAR},
pid = #{pid,jdbcType=VARCHAR},
RoleID = #{roleid,jdbcType=VARCHAR},
offtel = #{offtel,jdbcType=VARCHAR},
telout = #{telout,jdbcType=VARCHAR},
telin = #{telin,jdbcType=VARCHAR},
fax = #{fax,jdbcType=VARCHAR},
office = #{office,jdbcType=VARCHAR},
logopic = #{logopic,jdbcType=VARCHAR},
taskid = #{taskid,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=TIMESTAMP},
insuser = #{insuser,jdbcType=VARCHAR},
version = #{version,jdbcType=INTEGER},
morder = #{morder,jdbcType=INTEGER},
sname = #{sname,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
</mapper>

View File

@ -0,0 +1,164 @@
<?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="user.ExtSystemMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.ExtSystem" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="TIMESTAMP" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="VARCHAR" />
<result column="status" property="status" jdbcType="BIT" />
<result column="mode" property="mode" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="url" property="url" jdbcType="VARCHAR" />
<result column="namespace" property="namespace" jdbcType="VARCHAR" />
<result column="workShopId" property="workshopid" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, insdt, insuser, type, status, mode, name, url, namespace, workShopId
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_extsystem
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_extsystem
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.user.ExtSystem" >
insert into tb_extsystem (id, insdt, insuser,
type, status, mode, name,
url, namespace, workShopId
)
values (#{id,jdbcType=VARCHAR}, #{insdt,jdbcType=TIMESTAMP}, #{insuser,jdbcType=VARCHAR},
#{type,jdbcType=VARCHAR}, #{status,jdbcType=BIT}, #{mode,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR},
#{url,jdbcType=VARCHAR}, #{namespace,jdbcType=VARCHAR}, #{workshopid,jdbcType=VARCHAR}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.user.ExtSystem" >
insert into tb_extsystem
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="type != null" >
type,
</if>
<if test="status != null" >
status,
</if>
<if test="mode != null" >
mode,
</if>
<if test="name != null" >
name,
</if>
<if test="url != null" >
url,
</if>
<if test="namespace != null" >
namespace,
</if>
<if test="workshopid != null" >
workShopId,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="type != null" >
#{type,jdbcType=VARCHAR},
</if>
<if test="status != null" >
#{status,jdbcType=BIT},
</if>
<if test="mode != null" >
#{mode,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="url != null" >
#{url,jdbcType=VARCHAR},
</if>
<if test="namespace != null" >
#{namespace,jdbcType=VARCHAR},
</if>
<if test="workshopid != null" >
#{workshopid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.user.ExtSystem" >
update tb_extsystem
<set >
<if test="insdt != null" >
insdt = #{insdt,jdbcType=TIMESTAMP},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="type != null" >
type = #{type,jdbcType=VARCHAR},
</if>
<if test="status != null" >
status = #{status,jdbcType=BIT},
</if>
<if test="mode != null" >
mode = #{mode,jdbcType=VARCHAR},
</if>
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="url != null" >
url = #{url,jdbcType=VARCHAR},
</if>
<if test="namespace != null" >
namespace = #{namespace,jdbcType=VARCHAR},
</if>
<if test="workshopid != null" >
workShopId = #{workshopid,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.user.ExtSystem" >
update tb_extsystem
set insdt = #{insdt,jdbcType=TIMESTAMP},
insuser = #{insuser,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
status = #{status,jdbcType=BIT},
mode = #{mode,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
url = #{url,jdbcType=VARCHAR},
namespace = #{namespace,jdbcType=VARCHAR},
workShopId = #{workshopid,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap"
parameterType="java.lang.String">
select
<include refid="Base_Column_List" />
from tb_extsystem
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from
tb_extsystem
${where}
</delete>
</mapper>

View File

@ -0,0 +1,107 @@
<?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="user.JobMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.Job" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="taskid" property="taskid" jdbcType="VARCHAR" />
<result column="pri" property="pri" jdbcType="INTEGER" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List" >
id, name, taskid, pri, pid
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_job
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_job
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.user.Job" >
insert into tb_job (id, name, taskid,
pri, pid)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{taskid,jdbcType=VARCHAR},
#{pri,jdbcType=INTEGER}, #{pid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.user.Job" >
insert into tb_job
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="name != null" >
name,
</if>
<if test="taskid != null" >
taskid,
</if>
<if test="pri != null" >
pri,
</if>
<if test="pid != null" >
pid,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="taskid != null" >
#{taskid,jdbcType=VARCHAR},
</if>
<if test="pri != null" >
#{pri,jdbcType=INTEGER},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.user.Job" >
update tb_job
<set >
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="taskid != null" >
taskid = #{taskid,jdbcType=VARCHAR},
</if>
<if test="pri != null" >
pri = #{pri,jdbcType=INTEGER},
</if>
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.user.Job" >
update tb_job
set name = #{name,jdbcType=VARCHAR},
taskid = #{taskid,jdbcType=VARCHAR},
pri = #{pri,jdbcType=INTEGER},
pid = #{pid,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_job
${where}
</select>
<select id="selectListByUnitid" resultMap="BaseResultMap" parameterType="java.lang.String" >
select distinct tb_job.*
from tb_user_job
left join tb_job on tb_user_job.jobid=tb_job.id
left join uv_unit on tb_user_job.unitid=uv_unit.id
where tb_user_job.unitid=#{unitid}
order by tb_job.pri asc
</select>
</mapper>

View File

@ -0,0 +1,364 @@
<?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="user.MenuMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.Menu" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="PowerID" property="powerid" jdbcType="VARCHAR" />
<result column="caption" property="caption" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="description" property="description" jdbcType="VARCHAR" />
<result column="location" property="location" jdbcType="VARCHAR" />
<result column="target" property="target" jdbcType="VARCHAR" />
<result column="onclick" property="onclick" jdbcType="VARCHAR" />
<result column="onmouseover" property="onmouseover" jdbcType="VARCHAR" />
<result column="onmouseout" property="onmouseout" jdbcType="VARCHAR" />
<result column="image" property="image" jdbcType="VARCHAR" />
<result column="altImage" property="altimage" jdbcType="VARCHAR" />
<result column="tooltip" property="tooltip" jdbcType="VARCHAR" />
<result column="roles" property="roles" jdbcType="VARCHAR" />
<result column="page" property="page" jdbcType="VARCHAR" />
<result column="width" property="width" jdbcType="VARCHAR" />
<result column="height" property="height" jdbcType="VARCHAR" />
<result column="forward" property="forward" jdbcType="VARCHAR" />
<result column="action" property="action" jdbcType="VARCHAR" />
<result column="morder" property="morder" jdbcType="INTEGER" />
<result column="lvl" property="lvl" jdbcType="VARCHAR" />
<result column="active" property="active" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="VARCHAR" />
<result column="mainpage" property="mainpage" jdbcType="VARCHAR" />
<result column="count" property="count" jdbcType="INTEGER" />
<association column="pid" property="_pname" jdbcType="VARCHAR" select="selectPname"></association>
</resultMap>
<select id="selectPname" parameterType="String" resultType="String">
select name from tb_menuitem where id = #{pid}
</select>
<sql id="Base_Column_List" >
id, pid, PowerID, caption, name, description, location, target, onclick, onmouseover,
onmouseout, image, altImage, tooltip, roles, page, width, height, forward, action,
morder, lvl, active, type, mainpage, count
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_menuitem
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_menuitem
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.user.Menu">
insert into tb_menuitem (id,pid, PowerID,
caption, name, description,
location, target, onclick,
onmouseover, onmouseout, image,
altImage, tooltip, roles,
page, width, height,
forward, action, morder,
lvl, active, type,
mainpage, count)
values (#{id,jdbcType=VARCHAR},#{pid,jdbcType=VARCHAR}, #{powerid,jdbcType=VARCHAR},
#{caption,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{description,jdbcType=VARCHAR},
#{location,jdbcType=VARCHAR}, #{target,jdbcType=VARCHAR}, #{onclick,jdbcType=VARCHAR},
#{onmouseover,jdbcType=VARCHAR}, #{onmouseout,jdbcType=VARCHAR}, #{image,jdbcType=VARCHAR},
#{altimage,jdbcType=VARCHAR}, #{tooltip,jdbcType=VARCHAR}, #{roles,jdbcType=VARCHAR},
#{page,jdbcType=VARCHAR}, #{width,jdbcType=VARCHAR}, #{height,jdbcType=VARCHAR},
#{forward,jdbcType=VARCHAR}, #{action,jdbcType=VARCHAR}, #{morder,jdbcType=INTEGER},
#{lvl,jdbcType=VARCHAR}, #{active,jdbcType=VARCHAR}, #{type,jdbcType=VARCHAR},
#{mainpage,jdbcType=VARCHAR}, #{count,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.user.Menu" >
insert into tb_menuitem
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="pid != null" >
pid,
</if>
<if test="powerid != null" >
PowerID,
</if>
<if test="caption != null" >
caption,
</if>
<if test="name != null" >
name,
</if>
<if test="description != null" >
description,
</if>
<if test="location != null" >
location,
</if>
<if test="target != null" >
target,
</if>
<if test="onclick != null" >
onclick,
</if>
<if test="onmouseover != null" >
onmouseover,
</if>
<if test="onmouseout != null" >
onmouseout,
</if>
<if test="image != null" >
image,
</if>
<if test="altimage != null" >
altImage,
</if>
<if test="tooltip != null" >
tooltip,
</if>
<if test="roles != null" >
roles,
</if>
<if test="page != null" >
page,
</if>
<if test="width != null" >
width,
</if>
<if test="height != null" >
height,
</if>
<if test="forward != null" >
forward,
</if>
<if test="action != null" >
action,
</if>
<if test="morder != null" >
morder,
</if>
<if test="lvl != null" >
lvl,
</if>
<if test="active != null" >
active,
</if>
<if test="type != null" >
type,
</if>
<if test="mainpage != null" >
mainpage,
</if>
<if test="count != null" >
count,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
<if test="powerid != null" >
#{powerid,jdbcType=VARCHAR},
</if>
<if test="caption != null" >
#{caption,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="description != null" >
#{description,jdbcType=VARCHAR},
</if>
<if test="location != null" >
#{location,jdbcType=VARCHAR},
</if>
<if test="target != null" >
#{target,jdbcType=VARCHAR},
</if>
<if test="onclick != null" >
#{onclick,jdbcType=VARCHAR},
</if>
<if test="onmouseover != null" >
#{onmouseover,jdbcType=VARCHAR},
</if>
<if test="onmouseout != null" >
#{onmouseout,jdbcType=VARCHAR},
</if>
<if test="image != null" >
#{image,jdbcType=VARCHAR},
</if>
<if test="altimage != null" >
#{altimage,jdbcType=VARCHAR},
</if>
<if test="tooltip != null" >
#{tooltip,jdbcType=VARCHAR},
</if>
<if test="roles != null" >
#{roles,jdbcType=VARCHAR},
</if>
<if test="page != null" >
#{page,jdbcType=VARCHAR},
</if>
<if test="width != null" >
#{width,jdbcType=VARCHAR},
</if>
<if test="height != null" >
#{height,jdbcType=VARCHAR},
</if>
<if test="forward != null" >
#{forward,jdbcType=VARCHAR},
</if>
<if test="action != null" >
#{action,jdbcType=VARCHAR},
</if>
<if test="morder != null" >
#{morder,jdbcType=INTEGER},
</if>
<if test="lvl != null" >
#{lvl,jdbcType=VARCHAR},
</if>
<if test="active != null" >
#{active,jdbcType=VARCHAR},
</if>
<if test="type != null" >
#{type,jdbcType=VARCHAR},
</if>
<if test="mainpage != null" >
#{mainpage,jdbcType=VARCHAR},
</if>
<if test="count != null" >
#{count,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.user.Menu" >
update tb_menuitem
<set >
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="powerid != null" >
PowerID = #{powerid,jdbcType=VARCHAR},
</if>
<if test="caption != null" >
caption = #{caption,jdbcType=VARCHAR},
</if>
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="description != null" >
description = #{description,jdbcType=VARCHAR},
</if>
<if test="location != null" >
location = #{location,jdbcType=VARCHAR},
</if>
<if test="target != null" >
target = #{target,jdbcType=VARCHAR},
</if>
<if test="onclick != null" >
onclick = #{onclick,jdbcType=VARCHAR},
</if>
<if test="onmouseover != null" >
onmouseover = #{onmouseover,jdbcType=VARCHAR},
</if>
<if test="onmouseout != null" >
onmouseout = #{onmouseout,jdbcType=VARCHAR},
</if>
<if test="image != null" >
image = #{image,jdbcType=VARCHAR},
</if>
<if test="altimage != null" >
altImage = #{altimage,jdbcType=VARCHAR},
</if>
<if test="tooltip != null" >
tooltip = #{tooltip,jdbcType=VARCHAR},
</if>
<if test="roles != null" >
roles = #{roles,jdbcType=VARCHAR},
</if>
<if test="page != null" >
page = #{page,jdbcType=VARCHAR},
</if>
<if test="width != null" >
width = #{width,jdbcType=VARCHAR},
</if>
<if test="height != null" >
height = #{height,jdbcType=VARCHAR},
</if>
<if test="forward != null" >
forward = #{forward,jdbcType=VARCHAR},
</if>
<if test="action != null" >
action = #{action,jdbcType=VARCHAR},
</if>
<if test="morder != null" >
morder = #{morder,jdbcType=INTEGER},
</if>
<if test="lvl != null" >
lvl = #{lvl,jdbcType=VARCHAR},
</if>
<if test="active != null" >
active = #{active,jdbcType=VARCHAR},
</if>
<if test="type != null" >
type = #{type,jdbcType=VARCHAR},
</if>
<if test="mainpage != null" >
mainpage = #{mainpage,jdbcType=VARCHAR},
</if>
<if test="count != null" >
count = #{count,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.user.Menu" >
update tb_menuitem
set pid = #{pid,jdbcType=VARCHAR},
PowerID = #{powerid,jdbcType=VARCHAR},
caption = #{caption,jdbcType=VARCHAR},
name = #{name,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
location = #{location,jdbcType=VARCHAR},
target = #{target,jdbcType=VARCHAR},
onclick = #{onclick,jdbcType=VARCHAR},
onmouseover = #{onmouseover,jdbcType=VARCHAR},
onmouseout = #{onmouseout,jdbcType=VARCHAR},
image = #{image,jdbcType=VARCHAR},
altImage = #{altimage,jdbcType=VARCHAR},
tooltip = #{tooltip,jdbcType=VARCHAR},
roles = #{roles,jdbcType=VARCHAR},
page = #{page,jdbcType=VARCHAR},
width = #{width,jdbcType=VARCHAR},
height = #{height,jdbcType=VARCHAR},
forward = #{forward,jdbcType=VARCHAR},
action = #{action,jdbcType=VARCHAR},
morder = #{morder,jdbcType=INTEGER},
lvl = #{lvl,jdbcType=VARCHAR},
active = #{active,jdbcType=VARCHAR},
type = #{type,jdbcType=VARCHAR},
mainpage = #{mainpage,jdbcType=VARCHAR},
count = #{count,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectList" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_menuitem
order by morder
</select>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_menuitem
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from
tb_menuitem
${where}
</delete>
</mapper>

View File

@ -0,0 +1,99 @@
<?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="user.RoleMapper">
<resultMap id="BaseResultMap" type="com.sipai.entity.user.Role">
<id column="id" jdbcType="VARCHAR" property="id" />
<result column="name" jdbcType="VARCHAR" property="name" />
<result column="serial" jdbcType="VARCHAR" property="serial" />
<result column="description" jdbcType="VARCHAR" property="description" />
<result column="morder" jdbcType="INTEGER" property="morder" />
</resultMap>
<sql id="Base_Column_List">
id, name, serial, description, morder
</sql>
<select id="selectByPrimaryKey" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_role
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String">
delete from tb_role
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.user.Role">
insert into tb_role (id, name, serial,
description, morder)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{serial,jdbcType=VARCHAR},
#{description,jdbcType=VARCHAR}, #{morder,jdbcType=INTEGER})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.user.Role">
insert into tb_role
<trim prefix="(" suffix=")" suffixOverrides=",">
<if test="id != null">
id,
</if>
<if test="name != null">
name,
</if>
<if test="serial != null">
serial,
</if>
<if test="description != null">
description,
</if>
<if test="morder != null">
morder,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides=",">
<if test="id != null">
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null">
#{name,jdbcType=VARCHAR},
</if>
<if test="serial != null">
#{serial,jdbcType=VARCHAR},
</if>
<if test="description != null">
#{description,jdbcType=VARCHAR},
</if>
<if test="morder != null">
#{morder,jdbcType=INTEGER},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.user.Role">
update tb_role
<set>
<if test="name != null">
name = #{name,jdbcType=VARCHAR},
</if>
<if test="serial != null">
serial = #{serial,jdbcType=VARCHAR},
</if>
<if test="description != null">
description = #{description,jdbcType=VARCHAR},
</if>
<if test="morder != null">
morder = #{morder,jdbcType=INTEGER},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.user.Role">
update tb_role
set name = #{name,jdbcType=VARCHAR},
serial = #{serial,jdbcType=VARCHAR},
description = #{description,jdbcType=VARCHAR},
morder = #{morder,jdbcType=INTEGER}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectListByWhere" parameterType="java.lang.String" resultMap="BaseResultMap">
select
<include refid="Base_Column_List" />
from tb_role
${where}
</select>
</mapper>

View File

@ -0,0 +1,73 @@
<?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="user.RoleMenuMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.RoleMenu" >
<result column="roleID" property="roleid" jdbcType="VARCHAR" />
<result column="menuID" property="menuid" jdbcType="VARCHAR" />
<association column="menuID" property="menu" jdbcType="VARCHAR" select="selectMenu"/>
</resultMap>
<select id="selectMenu" parameterType="String" resultType="com.sipai.entity.user.Menu">
select * from tb_menuitem where id = #{menuID}
</select>
<insert id="insert" parameterType="com.sipai.entity.user.RoleMenu" >
insert into tb_role_menu (roleID, menuID)
values (#{roleid,jdbcType=VARCHAR}, #{menuid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.user.RoleMenu" >
insert into tb_role_menu
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="roleid != null" >
roleID,
</if>
<if test="menuid != null" >
menuID,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="roleid != null" >
#{roleid,jdbcType=VARCHAR},
</if>
<if test="menuid != null" >
#{menuid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="selectListByRole" parameterType="java.lang.String" resultMap="BaseResultMap">
select * from tb_role_menu where roleId = #{roleid,jdbcType=VARCHAR}
</select>
<select id="selectMenuListByRole" parameterType="java.lang.String" resultMap="BaseResultMap">
select tb_role_menu.* from tb_role_menu
left join tb_menuitem on tb_role_menu.menuid= tb_menuitem.id
where roleId = #{roleid,jdbcType=VARCHAR} and tb_menuitem.type='menu'
</select>
<select id="selectFuncListByRole" parameterType="java.lang.String" resultMap="BaseResultMap">
select tb_role_menu.* from tb_role_menu
left join tb_menuitem on tb_role_menu.menuid= tb_menuitem.id
where roleId = #{roleid,jdbcType=VARCHAR} and tb_menuitem.type='func'
</select>
<delete id="deleteByRole" parameterType="java.lang.String" >
delete from tb_role_menu
where roleID = #{roleid,jdbcType=VARCHAR}
</delete>
<delete id="deleteMenuByRole" parameterType="java.lang.String" >
delete tb_role_menu from tb_role_menu
left join tb_menuitem on tb_role_menu.menuid= tb_menuitem.id
where roleID = #{roleid,jdbcType=VARCHAR} and tb_menuitem.type='menu'
</delete>
<delete id="deleteFuncByRole" parameterType="java.lang.String" >
delete tb_role_menu from tb_role_menu
left join tb_menuitem on tb_role_menu.menuid= tb_menuitem.id
where roleID = #{roleid,jdbcType=VARCHAR} and tb_menuitem.type='func'
</delete>
<delete id="deleteFuncByRoleMenu" parameterType="java.util.Map" >
delete tb_role_menu from tb_role_menu
left join tb_menuitem on tb_role_menu.menuid= tb_menuitem.id
where roleID = #{roleid1} and tb_menuitem.pid= #{menuid1} and tb_menuitem.type='func'
</delete>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_role_menu
${where}
</delete>
</mapper>

View File

@ -0,0 +1,35 @@
<?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="user.UnitMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.Unit" >
<result column="id" property="id" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="sname" property="sname" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="taskid" property="taskid" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="VARCHAR" />
<result column="active" property="active" jdbcType="VARCHAR" />
<result column="morder" property="morder" jdbcType="INTEGER" />
</resultMap>
<select id="getUnitById" resultMap="BaseResultMap" parameterType="java.lang.String" >
select id,name,sname,pid,taskid,type,active,morder
from uv_unit
where id=#{id,jdbcType=VARCHAR}
</select>
<select id="selectList" resultMap="BaseResultMap" parameterType="java.lang.String" >
select id,name,sname,pid,taskid,type,active,morder
from uv_unit
where type in ('D','C')
order by morder
</select>
<select id="selectListAll" resultMap="BaseResultMap" parameterType="java.lang.String" >
select id,name,sname,pid,taskid,type,active,morder
from uv_unit
order by morder
</select>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select id,name,sname,pid,taskid,type,active,morder
from uv_unit
${where}
</select>
</mapper>

View File

@ -0,0 +1,24 @@
<?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="user.UserJobMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.UserJob" >
<result column="userid" property="userid" jdbcType="VARCHAR" />
<result column="jobid" property="jobid" jdbcType="VARCHAR" />
<result column="unitid" property="unitid" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.sipai.entity.user.UserJob" >
insert into tb_user_job (userid, jobid, unitid
)
values (#{userid,jdbcType=VARCHAR}, #{jobid,jdbcType=VARCHAR}, #{unitid,jdbcType=VARCHAR}
)
</insert>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select *
from tb_user_job
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String">
delete from tb_user_job
${where}
</delete>
</mapper>

View File

@ -0,0 +1,308 @@
<?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="user.UserMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.User" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="password" property="password" jdbcType="VARCHAR" />
<result column="active" property="active" jdbcType="CHAR" />
<result column="caption" property="caption" jdbcType="VARCHAR" />
<result column="sex" property="sex" jdbcType="VARCHAR" />
<result column="officeroom" property="officeroom" jdbcType="VARCHAR" />
<result column="officephone" property="officephone" jdbcType="VARCHAR" />
<result column="useremail" property="useremail" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="lgnum" property="lgnum" jdbcType="INTEGER" />
<result column="totaltime" property="totaltime" jdbcType="DOUBLE" />
<result column="morder" property="morder" jdbcType="INTEGER" />
<result column="serial" property="serial" jdbcType="VARCHAR" />
<result column="cardid" property="cardid" jdbcType="VARCHAR" />
<result column="insuser" property="insuser" jdbcType="VARCHAR" />
<result column="insdt" property="insdt" jdbcType="VARCHAR" />
<result column="mobile" property="mobile" jdbcType="VARCHAR" />
<association column="pid" property="_pname" jdbcType="VARCHAR" select="selectDept"/>
<collection column="id" property="jobs" ofType="com.sipai.entity.user.Job" select="selectJobs"/>
<collection column="id" property="roles" ofType="com.sipai.entity.user.Role" select="getRoles"/>
</resultMap>
<select id="selectDept" parameterType="String" resultType="String">
select name from uv_unit where id = #{pid}
</select>
<select id="selectJobs" parameterType="String" resultType="com.sipai.entity.user.Job">
select distinct tb_job.*
from tb_user_job
left join tb_job on tb_user_job.jobid=tb_job.id
where tb_user_job.userid=#{id}
order by tb_job.pri asc
</select>
<select id="getRoles" parameterType="String" resultType="com.sipai.entity.user.Role">
select tb_role.* from tb_role left outer join tb_user_role on tb_role.id=tb_user_role.roleid where empid = #{id}
</select>
<sql id="Base_Column_List" >
id, name, password, active, caption, sex, officeroom, officephone, useremail, pid,
lgnum, totaltime, morder, serial, cardid, insuser, insdt, mobile
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_user
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_user
where id = #{id,jdbcType=VARCHAR} and id !='emp01'
</delete>
<insert id="insert" parameterType="com.sipai.entity.user.User" >
insert into tb_user (id, name, password,
active, caption, sex,
officeroom, officephone, useremail,
pid, lgnum, totaltime,
morder, serial,
cardid, insuser, insdt, mobile)
values (#{id,jdbcType=VARCHAR}, #{name,jdbcType=VARCHAR}, #{password,jdbcType=VARCHAR},
#{active,jdbcType=CHAR}, #{caption,jdbcType=VARCHAR}, #{sex,jdbcType=VARCHAR},
#{officeroom,jdbcType=VARCHAR}, #{officephone,jdbcType=VARCHAR}, #{useremail,jdbcType=VARCHAR},
#{pid,jdbcType=VARCHAR}, #{lgnum,jdbcType=INTEGER}, #{totaltime,jdbcType=DOUBLE},
#{morder,jdbcType=INTEGER}, #{serial,jdbcType=VARCHAR},
#{cardid,jdbcType=VARCHAR}, #{insuser,jdbcType=VARCHAR}, #{insdt,jdbcType=VARCHAR},#{mobile,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.user.User" >
insert into tb_user
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="name != null" >
name,
</if>
<if test="password != null" >
password,
</if>
<if test="active != null" >
active,
</if>
<if test="caption != null" >
caption,
</if>
<if test="sex != null" >
sex,
</if>
<if test="officeroom != null" >
officeroom,
</if>
<if test="officephone != null" >
officephone,
</if>
<if test="useremail != null" >
useremail,
</if>
<if test="pid != null" >
pid,
</if>
<if test="lgnum != null" >
lgnum,
</if>
<if test="totaltime != null" >
totaltime,
</if>
<if test="morder != null" >
morder,
</if>
<if test="serial != null" >
serial,
</if>
<if test="cardid != null" >
cardid,
</if>
<if test="insuser != null" >
insuser,
</if>
<if test="insdt != null" >
insdt,
</if>
<if test="mobile != null" >
mobile,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="name != null" >
#{name,jdbcType=VARCHAR},
</if>
<if test="password != null" >
#{password,jdbcType=VARCHAR},
</if>
<if test="active != null" >
#{active,jdbcType=CHAR},
</if>
<if test="caption != null" >
#{caption,jdbcType=VARCHAR},
</if>
<if test="sex != null" >
#{sex,jdbcType=VARCHAR},
</if>
<if test="officeroom != null" >
#{officeroom,jdbcType=VARCHAR},
</if>
<if test="officephone != null" >
#{officephone,jdbcType=VARCHAR},
</if>
<if test="useremail != null" >
#{useremail,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
#{pid,jdbcType=VARCHAR},
</if>
<if test="lgnum != null" >
#{lgnum,jdbcType=INTEGER},
</if>
<if test="totaltime != null" >
#{totaltime,jdbcType=DOUBLE},
</if>
<if test="morder != null" >
#{morder,jdbcType=INTEGER},
</if>
<if test="serial != null" >
#{serial,jdbcType=VARCHAR},
</if>
<if test="cardid != null" >
#{cardid,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
#{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
#{insdt,jdbcType=VARCHAR},
</if>
<if test="mobile != null" >
#{mobile,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.user.User" >
update tb_user
<set >
<if test="name != null" >
name = #{name,jdbcType=VARCHAR},
</if>
<if test="password != null" >
password = #{password,jdbcType=VARCHAR},
</if>
<if test="active != null" >
active = #{active,jdbcType=CHAR},
</if>
<if test="caption != null" >
caption = #{caption,jdbcType=VARCHAR},
</if>
<if test="sex != null" >
sex = #{sex,jdbcType=VARCHAR},
</if>
<if test="officeroom != null" >
officeroom = #{officeroom,jdbcType=VARCHAR},
</if>
<if test="officephone != null" >
officephone = #{officephone,jdbcType=VARCHAR},
</if>
<if test="useremail != null" >
useremail = #{useremail,jdbcType=VARCHAR},
</if>
<if test="pid != null" >
pid = #{pid,jdbcType=VARCHAR},
</if>
<if test="lgnum != null" >
lgnum = #{lgnum,jdbcType=INTEGER},
</if>
<if test="totaltime != null" >
totaltime = #{totaltime,jdbcType=DOUBLE},
</if>
<if test="morder != null" >
morder = #{morder,jdbcType=INTEGER},
</if>
<if test="serial != null" >
serial = #{serial,jdbcType=VARCHAR},
</if>
<if test="cardid != null" >
cardid = #{cardid,jdbcType=VARCHAR},
</if>
<if test="insuser != null" >
insuser = #{insuser,jdbcType=VARCHAR},
</if>
<if test="insdt != null" >
insdt = #{insdt,jdbcType=VARCHAR},
</if>
<if test="mobile != null" >
mobile = #{mobile,jdbcType=VARCHAR},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.user.User" >
update tb_user
set name = #{name,jdbcType=VARCHAR},
password = #{password,jdbcType=VARCHAR},
active = #{active,jdbcType=CHAR},
caption = #{caption,jdbcType=VARCHAR},
sex = #{sex,jdbcType=VARCHAR},
officeroom = #{officeroom,jdbcType=VARCHAR},
officephone = #{officephone,jdbcType=VARCHAR},
useremail = #{useremail,jdbcType=VARCHAR},
pid = #{pid,jdbcType=VARCHAR},
lgnum = #{lgnum,jdbcType=INTEGER},
totaltime = #{totaltime,jdbcType=DOUBLE},
morder = #{morder,jdbcType=INTEGER},
serial = #{serial,jdbcType=VARCHAR},
cardid = #{cardid,jdbcType=VARCHAR},
insuser = #{insuser,jdbcType=VARCHAR},
insdt = #{insdt,jdbcType=VARCHAR},
mobile = #{mobile,jdbcType=VARCHAR}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="selectList" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_user
order by morder
</select>
<select id="getUserByName" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_user
where name = #{name,jdbcType=VARCHAR}
</select>
<select id="getListBySerial" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_user
where serial = #{serial,jdbcType=VARCHAR}
</select>
<select id="getListByCardid" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_user
where cardid = #{cardid,jdbcType=VARCHAR}
</select>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_user
${where}
</select>
<select id="selectListBySql" resultMap="BaseResultMap" parameterType="java.lang.String" >
${sql}
</select>
<select id="selectByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_user
${where}
</select>
<delete id="deleteByWhere" parameterType="java.lang.String" >
delete from tb_user
${where} and id !='emp01'
</delete>
</mapper>

View File

@ -0,0 +1,48 @@
<?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="user.UserPowerMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.UserPower" >
<result column="EmpID" property="empid" jdbcType="VARCHAR" />
<result column="id" property="id" jdbcType="VARCHAR" />
<result column="name" property="name" jdbcType="VARCHAR" />
<result column="pid" property="pid" jdbcType="VARCHAR" />
<result column="caption" property="caption" jdbcType="VARCHAR" />
<result column="location" property="location" jdbcType="VARCHAR" />
<result column="target" property="target" jdbcType="VARCHAR" />
<result column="type" property="type" jdbcType="VARCHAR" />
<result column="active" property="active" jdbcType="VARCHAR" />
<result column="lvl" property="lvl" jdbcType="VARCHAR" />
<result column="morder" property="morder" jdbcType="INTEGER" />
</resultMap>
<select id="selectListByUserId" resultMap="BaseResultMap" parameterType="java.lang.String" >
<!-- select EmpID, id, name, pid, caption, location, target, type, active, lvl, morder
from uv_user_power
where EmpID = #{empid,jdbcType=VARCHAR}
order by morder -->
select EmpID, id, name, pid, caption, location, target, type, active, lvl, morder
from uv_user_power
where EmpID = #{empid,jdbcType=VARCHAR} and
pid in(select id from uv_user_power where EmpID = #{empid,jdbcType=VARCHAR} and type ='menu')
order by morder
</select>
<select id="selectMenuByUserId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select EmpID, id, name, pid, caption, location, target, type, active, lvl, morder
from uv_user_power
where EmpID = #{empid,jdbcType=VARCHAR} and type='menu'
order by morder
</select>
<select id="selectFuncByUserId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select EmpID, id, name, pid, caption, location, target, type, active, lvl, morder
from uv_user_power
where EmpID = #{empid,jdbcType=VARCHAR} and type='func'
order by morder
</select>
<select id="selectListByWhere" resultMap="BaseResultMap" parameterType="java.lang.String" >
select EmpID, id, name, pid, caption, location, target, type, active, lvl, morder
from uv_user_power
#{where}
order by morder
</select>
</mapper>

View File

@ -0,0 +1,40 @@
<?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="user.UserRoleMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.UserRole" >
<result column="EmpID" property="empid" jdbcType="VARCHAR" />
<result column="RoleID" property="roleid" jdbcType="VARCHAR" />
</resultMap>
<insert id="insert" parameterType="com.sipai.entity.user.UserRole" >
insert into tb_user_role (EmpID, RoleID)
values (#{empid,jdbcType=VARCHAR}, #{roleid,jdbcType=VARCHAR})
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.user.UserRole" >
insert into tb_user_role
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="empid != null" >
EmpID,
</if>
<if test="roleid != null" >
RoleID,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="empid != null" >
#{empid,jdbcType=VARCHAR},
</if>
<if test="roleid != null" >
#{roleid,jdbcType=VARCHAR},
</if>
</trim>
</insert>
<select id="selectListByRole" parameterType="java.lang.String" resultMap="BaseResultMap">
select * from tb_user_role where roleId = #{roleid,jdbcType=VARCHAR}
</select>
<delete id="deleteByRole" parameterType="java.lang.String" >
delete from tb_user_role where roleID = #{roleid,jdbcType=VARCHAR}
</delete>
<delete id="deleteByUser" parameterType="java.lang.String" >
delete from tb_user_role where EmpID = #{EmpID,jdbcType=VARCHAR}
</delete>
</mapper>

View File

@ -0,0 +1,111 @@
<?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="user.UserTimeMapper" >
<resultMap id="BaseResultMap" type="com.sipai.entity.user.UserTime" >
<id column="id" property="id" jdbcType="VARCHAR" />
<result column="userid" property="userid" jdbcType="VARCHAR" />
<result column="ip" property="ip" jdbcType="VARCHAR" />
<result column="sdate" property="sdate" jdbcType="TIMESTAMP" />
<result column="edate" property="edate" jdbcType="TIMESTAMP" />
<result column="logintime" property="logintime" jdbcType="DOUBLE" />
</resultMap>
<sql id="Base_Column_List" >
id, userid, ip, sdate, edate, logintime
</sql>
<select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.String" >
select
<include refid="Base_Column_List" />
from tb_user_time
where id = #{id,jdbcType=VARCHAR}
</select>
<delete id="deleteByPrimaryKey" parameterType="java.lang.String" >
delete from tb_user_time
where id = #{id,jdbcType=VARCHAR}
</delete>
<insert id="insert" parameterType="com.sipai.entity.user.UserTime" >
insert into tb_user_time (id, userid, ip,
sdate, edate, logintime
)
values (#{id,jdbcType=VARCHAR}, #{userid,jdbcType=VARCHAR}, #{ip,jdbcType=VARCHAR},
#{sdate,jdbcType=TIMESTAMP}, #{edate,jdbcType=TIMESTAMP}, #{logintime,jdbcType=DOUBLE}
)
</insert>
<insert id="insertSelective" parameterType="com.sipai.entity.user.UserTime" >
insert into tb_user_time
<trim prefix="(" suffix=")" suffixOverrides="," >
<if test="id != null" >
id,
</if>
<if test="userid != null" >
userid,
</if>
<if test="ip != null" >
ip,
</if>
<if test="sdate != null" >
sdate,
</if>
<if test="edate != null" >
edate,
</if>
<if test="logintime != null" >
logintime,
</if>
</trim>
<trim prefix="values (" suffix=")" suffixOverrides="," >
<if test="id != null" >
#{id,jdbcType=VARCHAR},
</if>
<if test="userid != null" >
#{userid,jdbcType=VARCHAR},
</if>
<if test="ip != null" >
#{ip,jdbcType=VARCHAR},
</if>
<if test="sdate != null" >
#{sdate,jdbcType=TIMESTAMP},
</if>
<if test="edate != null" >
#{edate,jdbcType=TIMESTAMP},
</if>
<if test="logintime != null" >
#{logintime,jdbcType=DOUBLE},
</if>
</trim>
</insert>
<update id="updateByPrimaryKeySelective" parameterType="com.sipai.entity.user.UserTime" >
update tb_user_time
<set >
<if test="userid != null" >
userid = #{userid,jdbcType=VARCHAR},
</if>
<if test="ip != null" >
ip = #{ip,jdbcType=VARCHAR},
</if>
<if test="sdate != null" >
sdate = #{sdate,jdbcType=TIMESTAMP},
</if>
<if test="edate != null" >
edate = #{edate,jdbcType=TIMESTAMP},
</if>
<if test="logintime != null" >
logintime = #{logintime,jdbcType=DOUBLE},
</if>
</set>
where id = #{id,jdbcType=VARCHAR}
</update>
<update id="updateByPrimaryKey" parameterType="com.sipai.entity.user.UserTime" >
update tb_user_time
set userid = #{userid,jdbcType=VARCHAR},
ip = #{ip,jdbcType=VARCHAR},
sdate = #{sdate,jdbcType=TIMESTAMP},
edate = #{edate,jdbcType=TIMESTAMP},
logintime = #{logintime,jdbcType=DOUBLE}
where id = #{id,jdbcType=VARCHAR}
</update>
<select id="getTotaltimeByUserId" resultMap="BaseResultMap" parameterType="java.lang.String" >
select sum(logintime) as logintime
from tb_user_time
where userid = #{userid,jdbcType=VARCHAR}
</select>
</mapper>