| 123456789101112131415161718192021222324252627282930313233343536 |
- <?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.example.position.infrastructure.mapper.PositionMapper">
- <resultMap id="BaseResultMap" type="com.example.position.domain.entity.Position">
- <id column="ID" property="id"/>
- <result column="POSITION_CODE" property="positionCode"/>
- <result column="POSITION_NAME" property="positionName"/>
- <result column="POSITION_TYPE" property="positionType"/>
- <result column="DIRECTION" property="direction"/>
- <result column="QUANTITY" property="quantity"/>
- <result column="PRICE" property="price"/>
- <result column="MARKET_VALUE" property="marketValue"/>
- <result column="ACCOUNT_CODE" property="accountCode"/>
- <result column="PRODUCT_CODE" property="productCode"/>
- <result column="STATUS" property="status"/>
- <result column="VERSION" property="version"/>
- <result column="DELETED" property="deleted"/>
- <result column="CREATE_TIME" property="createTime"/>
- <result column="UPDATE_TIME" property="updateTime"/>
- </resultMap>
- <sql id="Base_Column_List">
- ID, POSITION_CODE, POSITION_NAME, POSITION_TYPE, DIRECTION,
- QUANTITY, PRICE, MARKET_VALUE, ACCOUNT_CODE, PRODUCT_CODE,
- STATUS, VERSION, DELETED, CREATE_TIME, UPDATE_TIME
- </sql>
- <select id="findByCode" resultMap="BaseResultMap">
- SELECT <include refid="Base_Column_List"/>
- FROM T_POSITION
- WHERE POSITION_CODE = #{positionCode}
- AND DELETED = 0
- </select>
- </mapper>
|