部分接口修改

This commit is contained in:
zhh
2018-06-05 17:07:49 +08:00
parent a4d7212510
commit a97a2fe7bc
7 changed files with 936 additions and 825 deletions

View File

@@ -1,7 +1,8 @@
<?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.macro.mall.dao.PmsProductDao">
<resultMap id="updateInfoMap" type="com.macro.mall.dto.PmsProductResult" extends="com.macro.mall.mapper.PmsProductMapper.BaseResultMap">
<resultMap id="updateInfoMap" type="com.macro.mall.dto.PmsProductResult" extends="com.macro.mall.mapper.PmsProductMapper.ResultMapWithBLOBs">
<result column="cateParentId" jdbcType="BIGINT" property="cateParentId" />
<collection property="productLadderList" columnPrefix="ladder_" resultMap="com.macro.mall.mapper.PmsProductLadderMapper.BaseResultMap">
</collection>
<collection property="productFullReductionList" columnPrefix="full_" resultMap="com.macro.mall.mapper.PmsProductFullReductionMapper.BaseResultMap">
@@ -16,19 +17,20 @@
</collection>
<collection property="prefrenceAreaList" column="{productId=id}" select="selectPrefrenceAreaByProductId">
</collection>
</resultMap>
<select id="getUpdateInfo" resultMap="updateInfoMap">
SELECT *,
f.name feightTemplateName,
pc.parent_id cateParentId,
ac.name productAttributeCategoryName,
l.id ladder_id,l.discount ladder_discount,l.count ladder_count,l.price ladder_price,
pf.id full_id,pf.full_price full_full_price,pf.reduce_price full_reduce_price,
m.id member_id,m.member_level_id member_member_level_id,m.member_price member_member_price,
s.id sku_id,s.price sku_price,s.low_stock sku_low_stock,s.pic sku_pic,s.sale sku_sale,s.sku_code sku_sku_code,s.sp1 sku_sp1,s.sp2 sku_sp2,s.sp3 sku_sp3,s.stock sku_stock,
a.id attribute_id,a.product_attribute_id attribute_product_attribute_id,a.value attribute_value
l.id ladder_id,l.product_id ladder_product_id,l.discount ladder_discount,l.count ladder_count,l.price ladder_price,
pf.id full_id,pf.product_id full_product_id,pf.full_price full_full_price,pf.reduce_price full_reduce_price,
m.id member_id,m.product_id member_product_id,m.member_level_id member_member_level_id,m.member_price member_member_price,m.member_level_name member_member_level_name,
s.id sku_id,s.product_id sku_product_id,s.price sku_price,s.low_stock sku_low_stock,s.pic sku_pic,s.sale sku_sale,s.sku_code sku_sku_code,s.sp1 sku_sp1,s.sp2 sku_sp2,s.sp3 sku_sp3,s.stock sku_stock,
a.id attribute_id,a.product_id attribute_product_id,a.product_attribute_id attribute_product_attribute_id,a.value attribute_value
FROM pms_product p
LEFT JOIN pms_feight_template f ON p.feight_template_id = f.id
LEFT JOIN pms_product_category pc on pc.id = p.product_category_id
LEFT JOIN pms_product_attribute_category ac ON p.product_attribute_category_id= ac.id
LEFT JOIN pms_product_ladder l ON p.id = l.product_id
LEFT JOIN pms_product_full_reduction pf ON pf.product_id=p.id