dev798
parent
7e2fe90b96
commit
135b8ca24a
|
@ -12,4 +12,9 @@ import org.springframework.web.bind.annotation.RestController;
|
|||
@RequestMapping("/classify")
|
||||
public class ProductClassifyController {
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -9,4 +9,7 @@ import org.apache.ibatis.annotations.Mapper;
|
|||
@Mapper
|
||||
public interface ProductSkuAttrMapper {
|
||||
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
|
|
@ -35,20 +35,37 @@
|
|||
</resultMap>
|
||||
|
||||
<insert id="insertProcuduct">
|
||||
|
||||
INSERT INTO t_product (product_name, product_number, product_examine, brand_id, type_id,
|
||||
product_subheading, product_information, product_unit, product_weight, product_sort,
|
||||
promotion_id, product_points, product_growth, product_max_points, product_foreknow,
|
||||
product_status, product_new, product_recommended, details_title, details_information,
|
||||
details_key_word, details_remark, method_type, method_id, move_information, pc_information)
|
||||
VALUES (#{productName}, #{productNumber}, #{productExamine}, #{brandId}, #{typeId}, #{productSubheading},
|
||||
#{productInformation}, #{productUnit}, #{productWeight}, #{productSort}, #{promotionId},
|
||||
#{productPoints}, #{productGrowth}, #{productMaxPoints}, #{productForeknow}, #{productStatus},
|
||||
#{productNew}, #{productRecommended}, #{detailsTitle}, #{detailsInformation}, #{detailsKeyWord},
|
||||
#{detailsRemark}, #{methodType}, #{methodId}, #{moveInformation}, #{pcInformation})
|
||||
</insert>
|
||||
|
||||
|
||||
<select id="selectProductById" resultMap="ProductResultMap">
|
||||
SELECT id, product_name, product_number, product_examine, brand_id, type_id, product_subheading,
|
||||
product_information, product_unit, product_weight, product_sort, promotion_id, product_points,
|
||||
product_growth, product_max_points, product_foreknow, product_status, product_new, product_recommended,
|
||||
details_title, details_information, details_key_word, details_remark, method_type, method_id,
|
||||
move_information, pc_information
|
||||
FROM product_table
|
||||
FROM t_product
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
<select id="findProductNumber" resultType="java.lang.Integer">
|
||||
|
||||
<select id="findProductNumber" resultType="java.lang.Integer">
|
||||
SELECT id, product_name, product_number, product_examine, brand_id, type_id, product_subheading,
|
||||
product_information, product_unit, product_weight, product_sort, promotion_id, product_points,
|
||||
product_growth, product_max_points, product_foreknow, product_status, product_new, product_recommended,
|
||||
details_title, details_information, details_key_word, details_remark, method_type, method_id,
|
||||
move_information, pc_information
|
||||
FROM t_product
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 添加其他操作方法如插入、更新、删除等 -->
|
||||
|
|
|
@ -1,24 +1,30 @@
|
|||
<?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">
|
||||
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
||||
"http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||
|
||||
<mapper namespace="com.muyu.product.mapper.ProductSkuAttrMapper">
|
||||
|
||||
|
||||
<resultMap type="com.muyu.product.domain.Product" id="ProductResult">
|
||||
<id property="id" column="id" />
|
||||
<result property="productClassifyId" column="product_classify_id" />
|
||||
<result property="productName" column="product_name" />
|
||||
<result property="productSubhead" column="product_subhead" />
|
||||
<result property="productBrandId" column="product_brand_id" />
|
||||
<result property="productIntroduce" column="product_introduce" />
|
||||
<result property="productNo" column="product_no" />
|
||||
<result property="productUnit" column="product_unit" />
|
||||
<result property="productWeight" column="product_weight" />
|
||||
<resultMap id="BaseResultMap" type="com.muyu.product.domain.ProductSkuAttr">
|
||||
<id column="id" property="id"/>
|
||||
<result column="sku_id" property="skuId"/>
|
||||
<result column="attr_id" property="attrId"/>
|
||||
<result column="attr_value_id" property="attrValueId"/>
|
||||
<result column="attr_value" property="attrValue"/>
|
||||
<result column="flag" property="flag"/>
|
||||
<result column="is_delete" property="isDelete"/>
|
||||
</resultMap>
|
||||
|
||||
<select id="selectProduct" resultType="com.muyu.product.domain.Product">
|
||||
select id, product_classify_id, product_name, product_subhead, product_brand_id, product_introduce, product_no, product_unit, product_weight from t_product
|
||||
<sql id="Base_Column_List">
|
||||
id, sku_id, attr_id, attr_value_id, attr_value, flag, is_delete
|
||||
</sql>
|
||||
|
||||
<select id="selectById" resultMap="BaseResultMap">
|
||||
SELECT
|
||||
<include refid="Base_Column_List"/>
|
||||
FROM t_product_sku_attr
|
||||
WHERE id = #{id}
|
||||
</select>
|
||||
|
||||
<!-- 可以根据需要定义更多的 SQL 查询、插入、更新、删除等操作 -->
|
||||
|
||||
</mapper>
|
||||
|
|
Loading…
Reference in New Issue