对比新文件 |
| | |
| | | <?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.SaleProductInfoMapper" > |
| | | <resultMap id="BaseResultMap" type="com.gk.firework.Domain.SaleProductInfo" > |
| | | <!-- --> |
| | | <id column="id" property="id" jdbcType="BIGINT" /> |
| | | <result column="itemcode" property="itemcode" jdbcType="VARCHAR" /> |
| | | <result column="itemname" property="itemname" jdbcType="VARCHAR" /> |
| | | <result column="directioncode" property="directioncode" jdbcType="VARCHAR" /> |
| | | <result column="price" property="price" jdbcType="DECIMAL" /> |
| | | <result column="specification" property="specification" jdbcType="VARCHAR" /> |
| | | <result column="createdby" property="createdby" jdbcType="VARCHAR" /> |
| | | <result column="createdat" property="createdat" jdbcType="TIMESTAMP" /> |
| | | <result column="isuse" property="isuse" jdbcType="TINYINT" /> |
| | | </resultMap> |
| | | <sql id="Base_Column_List" > |
| | | id, itemcode, itemname, directioncode, price, specification, createdby, createdat,isuse |
| | | </sql> |
| | | <select id="selectRandom" resultType="com.gk.firework.Domain.SaleProductInfo"> |
| | | SELECT *from saleproduct |
| | | where isuse = 0 |
| | | ORDER BY RAND() |
| | | limit #{n} |
| | | </select> |
| | | |
| | | |
| | | </mapper> |