商品接口修改
This commit is contained in:
parent
a97a2fe7bc
commit
2b0372f46d
@ -1,10 +1,5 @@
|
|||||||
package com.macro.mall.dto;
|
package com.macro.mall.dto;
|
||||||
|
|
||||||
import com.macro.mall.model.CmsPrefrenceArea;
|
|
||||||
import com.macro.mall.model.CmsSubject;
|
|
||||||
|
|
||||||
import java.util.List;
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询单个产品进行修改时返回的结果
|
* 查询单个产品进行修改时返回的结果
|
||||||
* Created by macro on 2018/4/26.
|
* Created by macro on 2018/4/26.
|
||||||
@ -12,33 +7,6 @@ import java.util.List;
|
|||||||
public class PmsProductResult extends PmsProductParam {
|
public class PmsProductResult extends PmsProductParam {
|
||||||
//商品所选分类的父id
|
//商品所选分类的父id
|
||||||
private Long cateParentId;
|
private Long cateParentId;
|
||||||
private String productAttributeCategoryName;
|
|
||||||
private List<CmsSubject> subjectList;
|
|
||||||
private List<CmsPrefrenceArea> prefrenceAreaList;
|
|
||||||
|
|
||||||
public String getProductAttributeCategoryName() {
|
|
||||||
return productAttributeCategoryName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setProductAttributeCategoryName(String productAttributeCategoryName) {
|
|
||||||
this.productAttributeCategoryName = productAttributeCategoryName;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<CmsSubject> getSubjectList() {
|
|
||||||
return subjectList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setSubjectList(List<CmsSubject> subjectList) {
|
|
||||||
this.subjectList = subjectList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public List<CmsPrefrenceArea> getPrefrenceAreaList() {
|
|
||||||
return prefrenceAreaList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public void setPrefrenceAreaList(List<CmsPrefrenceArea> prefrenceAreaList) {
|
|
||||||
this.prefrenceAreaList = prefrenceAreaList;
|
|
||||||
}
|
|
||||||
|
|
||||||
public Long getCateParentId() {
|
public Long getCateParentId() {
|
||||||
return cateParentId;
|
return cateParentId;
|
||||||
|
@ -13,17 +13,14 @@
|
|||||||
</collection>
|
</collection>
|
||||||
<collection property="productAttributeValueList" columnPrefix="attribute_" resultMap="com.macro.mall.mapper.PmsProductAttributeValueMapper.BaseResultMap">
|
<collection property="productAttributeValueList" columnPrefix="attribute_" resultMap="com.macro.mall.mapper.PmsProductAttributeValueMapper.BaseResultMap">
|
||||||
</collection>
|
</collection>
|
||||||
<collection property="subjectList" column="{productId=id}" select="selectSubjectByProductId">
|
<collection property="subjectProductRelationList" column="{productId=id}" select="selectSubjectProductRelationByProductId"/>
|
||||||
</collection>
|
<collection property="prefrenceAreaProductRelationList" column="{productId=id}" select="selectPrefrenceAreaProductRelationByProductId"/>
|
||||||
<collection property="prefrenceAreaList" column="{productId=id}" select="selectPrefrenceAreaByProductId">
|
|
||||||
</collection>
|
|
||||||
|
|
||||||
</resultMap>
|
</resultMap>
|
||||||
|
|
||||||
<select id="getUpdateInfo" resultMap="updateInfoMap">
|
<select id="getUpdateInfo" resultMap="updateInfoMap">
|
||||||
SELECT *,
|
SELECT *,
|
||||||
pc.parent_id cateParentId,
|
pc.parent_id cateParentId,
|
||||||
ac.name productAttributeCategoryName,
|
|
||||||
l.id ladder_id,l.product_id ladder_product_id,l.discount ladder_discount,l.count ladder_count,l.price ladder_price,
|
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,
|
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,
|
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,
|
||||||
@ -31,7 +28,6 @@
|
|||||||
a.id attribute_id,a.product_id attribute_product_id,a.product_attribute_id attribute_product_attribute_id,a.value attribute_value
|
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
|
FROM pms_product p
|
||||||
LEFT JOIN pms_product_category pc on pc.id = p.product_category_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_ladder l ON p.id = l.product_id
|
||||||
LEFT JOIN pms_product_full_reduction pf ON pf.product_id=p.id
|
LEFT JOIN pms_product_full_reduction pf ON pf.product_id=p.id
|
||||||
LEFT JOIN pms_member_price m ON m.product_id = p.id
|
LEFT JOIN pms_member_price m ON m.product_id = p.id
|
||||||
@ -39,16 +35,11 @@
|
|||||||
LEFT JOIN pms_product_attribute_value a ON a.product_id=p.id
|
LEFT JOIN pms_product_attribute_value a ON a.product_id=p.id
|
||||||
WHERE p.id=#{id};
|
WHERE p.id=#{id};
|
||||||
</select>
|
</select>
|
||||||
<select id="selectSubjectByProductId" resultMap="com.macro.mall.mapper.CmsSubjectMapper.BaseResultMap">
|
<select id="selectSubjectProductRelationByProductId" resultMap="com.macro.mall.mapper.CmsSubjectProductRelationMapper.BaseResultMap">
|
||||||
SELECT s.*
|
select * from cms_subject_product_relation where product_id=#{productId}
|
||||||
FROM cms_subject_product_relation spr
|
|
||||||
LEFT JOIN cms_subject s ON spr.subject_id = s.id
|
|
||||||
WHERE spr.product_id = #{productId}
|
|
||||||
</select>
|
</select>
|
||||||
<select id="selectPrefrenceAreaByProductId" resultMap="com.macro.mall.mapper.CmsPrefrenceAreaMapper.BaseResultMap">
|
<select id="selectPrefrenceAreaProductRelationByProductId" resultMap="com.macro.mall.mapper.CmsPrefrenceAreaProductRelationMapper.BaseResultMap">
|
||||||
SELECT p.*
|
select * from cms_prefrence_area_product_relation where product_id=#{productId}
|
||||||
FROM cms_prefrence_area_product_relation ppr
|
|
||||||
LEFT JOIN cms_prefrence_area p ON ppr.prefrence_area_id=p.id
|
|
||||||
WHERE ppr.product_id=#{productId}
|
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
</mapper>
|
</mapper>
|
Loading…
x
Reference in New Issue
Block a user