소스 검색

问题处理

yzc 1 년 전
부모
커밋
b168ec94a0
1개의 변경된 파일5개의 추가작업 그리고 5개의 파일을 삭제
  1. 5 5
      hx-item/src/main/resources/mapper/product/ProductInfoMapper.xml

+ 5 - 5
hx-item/src/main/resources/mapper/product/ProductInfoMapper.xml

@@ -68,13 +68,13 @@
         </where>
     </select>
     <select id="productTypeRanking" resultType="com.fjhx.item.entity.product.vo.ProductInfoVo">
-        SELECT pi.type                     type,
+        SELECT pi.type                             type,
                pi.product_classify_id,
                pic.parent_id_set,
-               ifnull(SUM(pc.amount), 0)   contractAmount,
-               ifnull(SUM(pc.quantity), 0) contractQuantity,
-               ifnull(sum(pd.amount), 0)   purchaseAmount,
-               IFNULL(SUM(pd.count), 0)    purchaseQuantity
+               ifnull(SUM(pc.amount * bc.rate), 0) contractAmount,
+               ifnull(SUM(pc.quantity), 0)         contractQuantity,
+               ifnull(sum(pd.amount), 0)           purchaseAmount,
+               IFNULL(SUM(pd.count), 0)            purchaseQuantity
         FROM product_info pi
                  LEFT JOIN bytesailing_sale.contract_product pc ON pi.id = pc.product_id
                  LEFT JOIN bytesailing_sale.contract bc ON pc.contract_id = bc.id