no message
This commit is contained in:
parent
7afe847942
commit
fa616c8de6
|
|
@ -28,6 +28,9 @@ public class Goods extends BaseEntity {
|
|||
@Excel(name = "部门id")
|
||||
private Long deptId;
|
||||
|
||||
@Excel(name = "店铺id")
|
||||
private Long shopId;
|
||||
|
||||
@Excel(name = "名称")
|
||||
private String goodsName;
|
||||
|
||||
|
|
|
|||
|
|
@ -7,6 +7,7 @@
|
|||
<id property="goodsId" column="goods_id" />
|
||||
<result property="goodsCode" column="goods_code" />
|
||||
<result property="deptId" column="dept_id" />
|
||||
<result property="shopId" column="shop_id" />
|
||||
<result property="goodsName" column="goods_name" />
|
||||
<result property="goodsDesc" column="goods_desc" />
|
||||
<result property="goodsUnit" column="goods_unit" />
|
||||
|
|
@ -30,13 +31,13 @@
|
|||
</resultMap>
|
||||
|
||||
<sql id="selectGoods">
|
||||
SELECT goods_id, goods_code, dept_id, goods_name, goods_desc, warranty_period, serv_activity, goods_unit, expect_duration, goods_sort, worker_id,
|
||||
SELECT goods_id, goods_code, dept_id, shop_id, goods_name, goods_desc, warranty_period, serv_activity, goods_unit, expect_duration, goods_sort, worker_id,
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark, area_desc, keyword
|
||||
FROM goods
|
||||
</sql>
|
||||
|
||||
<sql id="selectGoodsWithArea">
|
||||
SELECT DISTINCT g.goods_id, goods_code, dept_id, goods_name, goods_desc, goods_sort, worker_id, goods_unit, warranty_period, serv_activity, expect_duration,
|
||||
SELECT DISTINCT g.goods_id, goods_code, dept_id, shop_id, goods_name, goods_desc, goods_sort, worker_id, goods_unit, warranty_period, serv_activity, expect_duration,
|
||||
dept_goods_category_id, goods_img_url, goods_video_url, status, g.create_by, g.create_time, g.remark, g.area_desc, g.keyword
|
||||
FROM goods g
|
||||
LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id
|
||||
|
|
@ -60,6 +61,7 @@
|
|||
<if test="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
|
||||
<if test="areaDesc != null and areaDesc != ''">area_desc = #{areaDesc},</if>
|
||||
<if test="type != null">type = #{type},</if>
|
||||
<if test="shopId != null">shop_id = #{shopId},</if>
|
||||
update_time = sysdate()
|
||||
</set>
|
||||
WHERE goods_id = #{goodsId}
|
||||
|
|
@ -75,6 +77,7 @@
|
|||
insert into goods(
|
||||
<if test="goodsCode != null and goodsCode != ''">goods_code,</if>
|
||||
<if test="deptId != null and deptId != ''">dept_id,</if>
|
||||
<if test="shopId != null">shop_id,</if>
|
||||
<if test="goodsName != null and goodsName != ''">goods_name,</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''">goods_unit,</if>
|
||||
|
|
@ -95,6 +98,7 @@
|
|||
)values(
|
||||
<if test="goodsCode != null and goodsCode != ''">#{goodsCode},</if>
|
||||
<if test="deptId != null and deptId != ''">#{deptId},</if>
|
||||
<if test="shopId != null">#{shopId},</if>
|
||||
<if test="goodsName != null and goodsName != ''">#{goodsName},</if>
|
||||
<if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if>
|
||||
<if test="goodsUnit != null and goodsUnit != ''">#{goodsUnit},</if>
|
||||
|
|
@ -159,6 +163,9 @@
|
|||
<if test="goodsId != null">
|
||||
AND g.goods_id = #{goodsId}
|
||||
</if>
|
||||
<if test="shopId != null">
|
||||
AND g.shop_id = #{shopId}
|
||||
</if>
|
||||
</where>
|
||||
/* 默认生成时间排序 */
|
||||
order by create_time
|
||||
|
|
|
|||
Loading…
Reference in New Issue