| <?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.zy.crm.manager.mapper.ContractSalesMapper"> | 
|   | 
|     <!-- 通用查询映射结果 --> | 
|     <resultMap id="BaseResultMap" type="com.zy.crm.manager.entity.ContractSales"> | 
|         <id column="id" property="id" /> | 
|         <result column="name" property="name" /> | 
|         <result column="num" property="num" /> | 
|         <result column="unit" property="unit" /> | 
|         <result column="unit_price" property="unitPrice" /> | 
|         <result column="total_price" property="totalPrice" /> | 
|         <result column="memo" property="memo" /> | 
|         <result column="contract_id" property="contractId" /> | 
|   | 
|     </resultMap> | 
|   | 
|     <select id="selectByContractId" resultMap="BaseResultMap"> | 
|         select * from man_contract_sales | 
|         where contract_id = #{contractId} | 
|     </select> | 
|   | 
| </mapper> |