Helius
2021-06-16 4e51778362c2130598a4c73ec4cebe6629dbc53f
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
<?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.xzx.gc.system.mapper.SysItemPriceMapper">
  <resultMap id="BaseResultMap" type="com.xzx.gc.entity.SysItemPrice">
    <!--
      WARNING - @mbg.generated
    -->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="item_id" jdbcType="BIGINT" property="itemId" />
    <result column="min_weight" jdbcType="DECIMAL" property="minWeight" />
    <result column="max_weight" jdbcType="DECIMAL" property="maxWeight" />
    <result column="price" jdbcType="DECIMAL" property="price" />
    <result column="del_flag" jdbcType="SMALLINT" property="delFlag" />
    <result column="create_time" jdbcType="VARCHAR" property="createTime" />
    <result column="item_type" jdbcType="VARCHAR" property="itemType" />
  </resultMap>
 
    <select id="findPriceByUserId" resultMap="BaseResultMap">
        SELECT b.*,a.item_type from xzx_sys_item_user a
            inner join xzx_sys_item_price b on a.id=b.item_id
        WHERE a.user_id=#{userId}  and a.del_flag=0
              and b.del_flag=0 and b.price is not null
    </select>
</mapper>