增加商品描述字段
This commit is contained in:
parent
0c89bf08a8
commit
9b50c84449
|
|
@ -30,6 +30,8 @@ public class Goods extends BaseEntity {
|
|||
@Excel(name = "名称")
|
||||
private String goodsName;
|
||||
|
||||
private String goodsDesc;
|
||||
|
||||
@Excel(name = "商品排序", cellType = Excel.ColumnType.NUMERIC)
|
||||
private Integer goodsSort;
|
||||
|
||||
|
|
|
|||
|
|
@ -32,6 +32,8 @@ public class GoodsStandard extends BaseEntity {
|
|||
@Excel(name = "库存")
|
||||
private Integer goodsNum;
|
||||
|
||||
private String goodsUnit;
|
||||
|
||||
private Integer saleNum;
|
||||
|
||||
private Integer status;
|
||||
|
|
|
|||
|
|
@ -8,6 +8,7 @@
|
|||
<result property="goodsCode" column="goods_code" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="goodsName" column="goods_name" />
|
||||
<result property="goodsDesc" column="goods_desc" />
|
||||
<result property="goodsSort" column="goods_sort"/>
|
||||
<result property="workerId" column="worker_id"/>
|
||||
<result property="deptGoodsCategoryId" column="dept_goods_category_id"/>
|
||||
|
|
@ -22,12 +23,12 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectGoods">
|
||||
SELECT goods_id, goods_code, dept_id, goods_name, goods_sort, worker_id,
|
||||
SELECT goods_id, goods_code, dept_id, goods_name, goods_desc, goods_sort, worker_id,
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark
|
||||
FROM goods
|
||||
</sql>
|
||||
<sql id="selectGoodsWithArea">
|
||||
SELECT DISTINCT g.goods_id, goods_code, dept_id, goods_name, goods_sort, worker_id,
|
||||
SELECT DISTINCT g.goods_id, goods_code, dept_id, goods_name, goods_desc, goods_sort, worker_id,
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark
|
||||
FROM goods g
|
||||
LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id
|
||||
|
|
@ -60,6 +61,7 @@
|
|||
<if test="goodsCode != null and goodsCode != ''">goods_code,</if>
|
||||
<if test="deptId != null and deptId != ''">dept_id,</if>
|
||||
<if test="goodsName != null and goodsName != ''">goods_name,</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if>
|
||||
<if test="goodsSort != null and goodsSort != ''">goods_sort,</if>
|
||||
<if test="workerId != null and workerId != ''">worker_id,</if>
|
||||
<if test="deptGoodsCategoryId != null and deptGoodsCategoryId != 0">dept_goods_category_id,</if>
|
||||
|
|
@ -73,6 +75,7 @@
|
|||
<if test="goodsCode != null and goodsCode != ''">#{goodsCode},</if>
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<if test="goodsName != null and goodsName != ''">#{goodsName},</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if>
|
||||
<if test="goodsSort != null and goodsSort != ''">#{goodsSort},</if>
|
||||
<if test="workerId != null and workerId != ''">#{workerId},</if>
|
||||
<if test="deptGoodsCategoryId != null and deptGoodsCategoryId != 0">#{deptGoodsCategoryId},</if>
|
||||
|
|
|
|||
|
|
@ -11,6 +11,7 @@
|
|||
<result property="discountPrice" column="discount_price"/>
|
||||
<result property="groupPrice" column="group_price"/>
|
||||
<result property="goodsNum" column="goods_num"/>
|
||||
<result property="goodsUnit" column="goods_unit"/>
|
||||
<result property="saleNum" column="sale_num"/>
|
||||
<result property="status" column="status"/>
|
||||
<result property="createBy" column="create_by"/>
|
||||
|
|
@ -30,6 +31,7 @@
|
|||
discount_price,
|
||||
group_price,
|
||||
goods_num,
|
||||
goods_unit,
|
||||
create_by,
|
||||
create_time,
|
||||
sale_num,
|
||||
|
|
@ -77,13 +79,13 @@
|
|||
|
||||
<insert id="batchInsert" parameterType="list">
|
||||
INSERT INTO goods_standard (
|
||||
goods_standard_name, goods_id, dept_goods_category_id, goods_price, discount_price, group_price, goods_num,
|
||||
goods_standard_name, goods_id, dept_goods_category_id, goods_price, discount_price, group_price, goods_unit, goods_num,
|
||||
sale_num, status, remark, create_by, create_time )
|
||||
VALUES
|
||||
<foreach collection="goodsStandards" separator="," item="goodsStandard">
|
||||
(
|
||||
#{goodsStandard.goodsStandardName}, #{goodsStandard.goodsId}, #{goodsStandard.deptGoodsCategoryId}, #{goodsStandard.goodsPrice}, #{goodsStandard.discountPrice},
|
||||
#{goodsStandard.groupPrice}, 100, 0, #{goodsStandard.status}, #{goodsStandard.remark}, #{goodsStandard.createBy}, sysdate()
|
||||
#{goodsStandard.groupPrice}, #{goodsStandard.goodsUnit}, 100, 0, #{goodsStandard.status}, #{goodsStandard.remark}, #{goodsStandard.createBy}, sysdate()
|
||||
)
|
||||
</foreach>
|
||||
</insert>
|
||||
|
|
@ -98,4 +100,4 @@
|
|||
DELETE FROM goods_standard
|
||||
WHERE goods_id = #{goodsId}
|
||||
</delete>
|
||||
</mapper>
|
||||
</mapper>
|
||||
|
|
|
|||
Loading…
Reference in New Issue