对比新文件 |
| | |
| | | <?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.gk.firework.Mapper.CustomerInfoMapper" > |
| | | <resultMap id="BaseResultMap" type="com.gk.firework.Domain.CustomerInfo" > |
| | | <!-- --> |
| | | <id column="id" property="id" jdbcType="BIGINT" /> |
| | | <result column="name" property="name" jdbcType="VARCHAR" /> |
| | | <result column="gender" property="gender" jdbcType="TINYINT" /> |
| | | <result column="idcardnum" property="idcardnum" jdbcType="VARCHAR" /> |
| | | <result column="nation" property="nation" jdbcType="VARCHAR" /> |
| | | <result column="bornday" property="bornday" jdbcType="DATE" /> |
| | | <result column="address" property="address" jdbcType="VARCHAR" /> |
| | | <result column="frequency" property="frequency" jdbcType="INTEGER" /> |
| | | <result column="num" property="num" jdbcType="INTEGER" /> |
| | | <result column="lasttime" property="lasttime" jdbcType="TIMESTAMP" /> |
| | | <result column="lastnum" property="lastnum" jdbcType="INTEGER" /> |
| | | <result column="createddate" property="createddate" jdbcType="TIMESTAMP" /> |
| | | <result column="modifieddate" property="modifieddate" jdbcType="TIMESTAMP" /> |
| | | <result column="path" property="path" jdbcType="VARCHAR" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List" > |
| | | <!-- --> |
| | | id, `name`, gender, idcardnum, nation, bornday, address, frequency, num, lasttime, |
| | | lastnum, createddate, modifieddate,path |
| | | </sql> |
| | | <select id="selectCustomerByIdCardNum" resultMap="BaseResultMap"> |
| | | select |
| | | <include refid="Base_Column_List"/> |
| | | from customer |
| | | <where> |
| | | idcardnum = #{idCardNumber} |
| | | </where> |
| | | </select> |
| | | <select id="getCustomerBySaleOrder" resultMap="BaseResultMap"> |
| | | select |
| | | customer.id, |
| | | customer.`name`, |
| | | customer.gender, |
| | | customer.idcardnum, |
| | | customer.nation, |
| | | customer.bornday, |
| | | customer.address, |
| | | customer.frequency, |
| | | customer.num, |
| | | customer.lasttime, |
| | | customer.lastnum, |
| | | customer.createddate, |
| | | customer.modifieddate, |
| | | customer.path |
| | | from customer as customer |
| | | left join saleorder as so on so.customer = customer.id |
| | | <where> |
| | | so.`code` = #{orderCode} |
| | | </where> |
| | | </select> |
| | | |
| | | </mapper> |