You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
ocr/jyjz-system/jyjz-system-admin/target/classes/mapper/admin/DistionarygroupMapper.xml

117 lines
4.9 KiB

<?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="cn.jyjz.xiaoyao.admin.dataDao.DistionarygroupMybatisDao">
<resultMap id="BaseResultMap" type="cn.jyjz.xiaoyao.admin.dataobject.Distionarygroup">
<id column="ID" property="id" jdbcType="BIGINT"/>
<result column="CODENO" property="codeno" jdbcType="VARCHAR"/>
<result column="DISTIONARYTYPEID" property="distionarytypeid" jdbcType="BIGINT"/>
<result column="GROUPNAME" property="groupname" jdbcType="VARCHAR"/>
<result column="USEMODE" property="usemode" jdbcType="INTEGER"/>
<result column="ENABLED" property="enabled" jdbcType="INTEGER"/>
<result column="SORTING" property="sorting" jdbcType="INTEGER"/>
<result column="CREATEUSER" property="createuser" jdbcType="VARCHAR"/>
<result column="CREATEDATE" property="createdate" jdbcType="BIGINT"/>
<result column="UPDATEUSER" property="updateuser" jdbcType="VARCHAR"/>
<result column="UPDATETIME" property="updatetime" jdbcType="BIGINT"/>
<association property="distionarytype" column="DISTIONARYTYPEID" select="cn.jyjz.xiaoyao.admin.dataDao.DistionarytypeMybatisDao.selectDistionarytypeByid"/>
<collection property="distionaryList" column="ID" select="cn.jyjz.xiaoyao.admin.dataDao.DistionaryMybatisDao.listByGroupId"/>
</resultMap>
<sql id="Base_Column_List">
ID AS id,
CODENO AS codeno,
DISTIONARYTYPEID AS distionarytypeid,
GROUPNAME AS groupname,
USEMODE AS usemode,
ENABLED AS enabled,
SORTING AS sorting,
CREATEUSER AS createuser,
CREATEDATE AS createdate,
UPDATEUSER AS updateuser,
UPDATETIME AS updatetime
</sql>
<sql id="Base_Where">
<where>
<trim prefixOverrides="and|or">
<if test="id != null"> and ID ${id.dataOp} ${id.likestar}#{id.value}${id.likeend}</if>
<if test="codeno != null"> and CODENO ${codeno.dataOp} ${codeno.likestar}#{codeno.value}${codeno.likeend}</if>
<if test="distionarytypeid != null"> and DISTIONARYTYPEID ${distionarytypeid.dataOp} ${distionarytypeid.likestar}#{distionarytypeid.value}${distionarytypeid.likeend}</if>
<if test="groupname != null"> and GROUPNAME ${groupname.dataOp} ${groupname.likestar}#{groupname.value}${groupname.likeend}</if>
<if test="usemode != null"> and USEMODE ${usemode.dataOp} ${usemode.likestar}#{usemode.value}${usemode.likeend}</if>
<if test="enabled != null"> and ENABLED ${enabled.dataOp} ${enabled.likestar}#{enabled.value}${enabled.likeend}</if>
<if test="sorting != null"> and SORTING ${sorting.dataOp} ${sorting.likestar}#{sorting.value}${sorting.likeend}</if>
<if test="createuser != null"> and CREATEUSER ${createuser.dataOp} ${createuser.likestar}#{createuser.value}${createuser.likeend}</if>
<if test="createdate != null"> and CREATEDATE ${createdate.dataOp} ${createdate.likestar}#{createdate.value}${createdate.likeend}</if>
<if test="updateuser != null"> and UPDATEUSER ${updateuser.dataOp} ${updateuser.likestar}#{updateuser.value}${updateuser.likeend}</if>
<if test="updatetime != null"> and UPDATETIME ${updatetime.dataOp} ${updatetime.likestar}#{updatetime.value}${updatetime.likeend}</if>
<if test="userid != null"> and USERID ${userid.dataOp} ${userid.likestar}#{userid.value}${userid.likeend}</if>
<if test="listdept != null">
and DEPARTID in
<foreach collection="listdept.value" item="item" index="index" open="(" separator="," close=")" >
#{item}
</foreach>
</if>
</trim>
</where>
<if test="page != null">
<if test="page.sortname != null"> order by ${page.sortname} ${page.sortorder}</if>
limit ${page.start}, ${page.Pagesize}
</if>
</sql>
<select id="selectList" resultMap="BaseResultMap" >
select
ID AS id,
CODENO AS codeno,
DISTIONARYTYPEID AS distionarytypeid,
GROUPNAME AS groupname,
USEMODE AS usemode,
ENABLED AS enabled,
SORTING AS sorting,
CREATEUSER AS createuser,
CREATEDATE AS createdate,
UPDATEUSER AS updateuser,
UPDATETIME AS updatetime
from
S_DISTIONARYGROUP_T
${ew.customSqlSegment}
</select>
<!-- 角色分页 -->
<select id="selectTypeList" resultMap="BaseResultMap" >
select
ID AS id,
CODENO AS codeno,
DISTIONARYTYPEID AS distionarytypeid,
GROUPNAME AS groupname,
USEMODE AS usemode,
ENABLED AS enabled,
SORTING AS sorting,
CREATEUSER AS createuser,
CREATEDATE AS createdate,
UPDATEUSER AS updateuser,
UPDATETIME AS updatetime
from
S_DISTIONARYGROUP_T
${ew.customSqlSegment}
</select>
<!-- 角色分页 -->
<select id="listByTypeId" resultMap="BaseResultMap" parameterType="java.lang.Long">
select
ID AS id,
CODENO AS codeno,
DISTIONARYTYPEID AS distionarytypeid,
GROUPNAME AS groupname,
USEMODE AS usemode,
ENABLED AS enabled,
SORTING AS sorting,
CREATEUSER AS createuser,
CREATEDATE AS createdate,
UPDATEUSER AS updateuser,
UPDATETIME AS updatetime
from
S_DISTIONARYGROUP_T WHERE DISTIONARYTYPEID = #{id}
</select>
</mapper>