mitao
2025-02-21 31573d6180d15ef65ed0df9c2732495f40b12663
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
28
29
30
31
32
33
<?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.panzhihua.service_community.dao.ComShopFlowerOrderGoodsDAO">
  <resultMap id="BaseResultMap" type="com.panzhihua.service_community.model.dos.ComShopFlowerOrderGoodsDO">
    <!--@mbg.generated-->
    <!--@Table com_shop_flower_order_goods-->
    <id column="id" jdbcType="BIGINT" property="id" />
    <result column="store_id" jdbcType="BIGINT" property="storeId" />
    <result column="order_id" jdbcType="BIGINT" property="orderId" />
    <result column="user_id" jdbcType="BIGINT" property="userId" />
    <result column="order_no" jdbcType="VARCHAR" property="orderNo" />
    <result column="goods_id" jdbcType="BIGINT" property="goodsId" />
    <result column="goods_attr_id" jdbcType="BIGINT" property="goodsAttrId" />
    <result column="goods_attr_name" jdbcType="VARCHAR" property="goodsAttrName" />
    <result column="amount" jdbcType="INTEGER" property="amount" />
    <result column="goods_attr_price" jdbcType="DECIMAL" property="goodsAttrPrice" />
    <result column="goods_attr_pic" jdbcType="VARCHAR" property="goodsAttrPic" />
    <result column="price" jdbcType="DECIMAL" property="price" />
    <result column="free_shipping_price" jdbcType="DECIMAL" property="freeShippingPrice" />
    <result column="collate_price" jdbcType="DECIMAL" property="collatePrice" />
    <result column="goods_name" jdbcType="VARCHAR" property="goodsName" />
    <result column="create_at" jdbcType="TIMESTAMP" property="createAt" />
  </resultMap>
  <sql id="Base_Column_List">
    <!--@mbg.generated-->
    id, store_id, order_id, user_id, order_no, goods_id, goods_attr_id, goods_attr_name, 
    amount, goods_attr_price, goods_attr_pic, price, free_shipping_price, collate_price, 
    goods_name, create_at
  </sql>
    <select id="selectSumAmount" resultType="java.lang.Integer">
      SELECT sum(g.amount) FROM `com_shop_flower_order_goods` g LEFT JOIN com_shop_flower_order o ON o.id = g.order_id  WHERE g.store_id = #{storeId} and o.`status` != 0
    </select>
</mapper>