SmartDeviceOrderMapper.xml 1.3 KB
<?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="cn.com.glsx.smart.modules.mapper.SmartDeviceOrderMapper">
    <resultMap id="BaseResultMap" type="cn.com.glsx.smart.modules.entity.SmartDeviceOrder">
        <!--@Table smart_device_order-->
        <id column="id" jdbcType="INTEGER" property="id"/>
        <result column="product_id" jdbcType="VARCHAR" property="productId"/>
        <result column="order_code" jdbcType="VARCHAR" property="orderCode"/>
        <result column="order_value" jdbcType="VARCHAR" property="orderValue"/>
        <result column="order_type" jdbcType="VARCHAR" property="orderType"/>
        <result column="order_value_type" jdbcType="VARCHAR" property="orderValueType"/>
        <result column="status" jdbcType="TINYINT" property="status"/>
    </resultMap>
    <sql id="Base_Column_List">
        id, product_id, order_code, order_value, order_type, order_value_type, `status`
    </sql>

    <select id="getListByProductId" parameterType="java.lang.String" resultMap="BaseResultMap">
        select
        <include refid="Base_Column_List" />
        from smart_device_order t where t.`status` = 1 and t.product_id = #{productId,jdbcType=VARCHAR}
    </select>
</mapper>