Authored by kun

新增mapper

package com.yohoufo.dal.order;
import com.yohoufo.dal.order.model.ExpressCompany;
import java.util.List;
/**
* @author kun.wang
* @date 2018/9/25
*/
public interface ExpressCompanyMapper {
/**
* 查询全部的快递公司信息
* @return
*/
List<ExpressCompany> queryAllExpressCompany();
}
... ...
<?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.yohoufo.dal.order.ExpressCompanyMapper">
<resultMap id="expressCompany" type="com.yohoufo.dal.order.model.ExpressCompany">
<id property="id" column="id"/>
<result property="companyName" column="company_name"/>
</resultMap>
<select id="queryAllExpressCompany" resultMap="expressCompany">
select id, company_name
from express_company
</select>
</mapper>
\ No newline at end of file
... ...