UnionDepartmentUrlMapper.xml 1.65 KB
<?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="com.yoho.unions.dal.IUnionDepartmentUrlDAO" >
  <resultMap id="BaseResultMap" type="com.yoho.unions.dal.model.UnionDepartmentUrl" >
    <id column="id" property="id" jdbcType="INTEGER" />
    <result column="union_type" property="unionType" jdbcType="VARCHAR" />
    <result column="division_code" property="divisionCode" jdbcType="INTEGER" />
    <result column="channel_code" property="channelCode" jdbcType="INTEGER" />
    <result column="dept_id" property="deptId" jdbcType="VARCHAR" />
    <result column="create_id" property="createId" jdbcType="VARCHAR" />
    <result column="name" property="name" jdbcType="VARCHAR" />
    <result column="src_url" property="srcUrl" jdbcType="VARCHAR" />
    <result column="dest_url" property="destUrl" jdbcType="VARCHAR" />
    <result column="status" property="status" jdbcType="INTEGER" />
    <result column="create_time" property="createTime" jdbcType="INTEGER" />
  </resultMap>
  <sql id="Base_Column_List" >
    id, union_type, division_code, channel_code, dept_id, create_id, name, src_url, dest_url, 
    status, create_time
  </sql>
  <select id="selectByPrimaryKey" resultMap="BaseResultMap" parameterType="java.lang.Integer" >
    select 
    <include refid="Base_Column_List" />
    from union_department_url
    where id = #{id,jdbcType=INTEGER}
  </select>
  <select id="selectByUnionType" resultMap="BaseResultMap">
    select  <include refid="Base_Column_List" />
    from union_department_url
    where union_type = #{union_type} limit 1
  </select>

</mapper>