Administrator
2023-06-19 49588f5a462ae7425e7eb030438a35fd80c246fa
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
<?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>