创建商品功能完善

This commit is contained in:
zhh
2018-04-25 17:22:32 +08:00
parent bc3c569616
commit a41633a9b7
19 changed files with 17839 additions and 6 deletions

View File

@@ -5,7 +5,7 @@ spring.datasource.password=root
#===datasource end===
#===mybatis start===
mybatis.mapper-locations=classpath:mapper/*.xml,classpath*:com/**/mapper/*.xml
mybatis.mapper-locations=classpath:dao/*.xml,classpath*:com/**/mapper/*.xml
#===mybatis end===
#===log start===

View File

@@ -0,0 +1,13 @@
<?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.PmsMemberPriceDao">
<!--批量新增回写主键支持-->
<insert id="insertList">
INSERT INTO pms_member_price (product_id, member_level_id, member_price) VALUES
<foreach collection="list" separator="," item="item" index="index">
(#{item.productId,jdbcType=BIGINT},
#{item.memberLevelId,jdbcType=BIGINT},
#{item.memberPrice,jdbcType=DECIMAL})
</foreach>
</insert>
</mapper>

View File

@@ -0,0 +1,12 @@
<?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.PmsMemberPriceDao">
<insert id="insertList">
INSERT INTO pms_product_full_reduction (product_id, full_price, reduce_price) VALUES
<foreach collection="list" separator="," item="item" index="index">
(#{item.productId,jdbcType=BIGINT},
#{item.fullPrice,jdbcType=DECIMAL},
#{item.reducePrice,jdbcType=DECIMAL})
</foreach>
</insert>
</mapper>

View File

@@ -0,0 +1,13 @@
<?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.PmsProductLadderDao">
<insert id="insertList">
INSERT INTO pms_product_ladder (product_id, count, discount, price) VALUES
<foreach collection="list" item="item" index="index" separator=",">
(#{item.productId,jdbcType=BIGINT},
#{item.count,jdbcType=INTEGER},
#{item.discount,jdbcType=DECIMAL},
#{item.price,jdbcType=DECIMAL})
</foreach>
</insert>
</mapper>