ExpressCompanyMapper.xml
970 Bytes
<?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.order.dal.ExpressCompanyMapper">
<resultMap id="BaseResultMap" type="com.yoho.order.model.ExpressCompany">
<result column="id" property="id" jdbcType="INTEGER" />
<result column="company_name" property="companyName" jdbcType="VARCHAR" />
</resultMap>
<sql id="Base_Column_List">
id, company_name
</sql>
<select id="selectAll" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from express_company
</select>
<select id="selectByIdList" resultMap="BaseResultMap">
select <include refid="Base_Column_List" />
from express_company where id in
<foreach collection="idList" item="id" open="(" close=")" separator=",">
#{id}
</foreach>
</select>
</mapper>