no message

This commit is contained in:
cb 2025-06-18 15:46:13 +08:00
parent 7afe847942
commit fa616c8de6
2 changed files with 12 additions and 2 deletions

View File

@ -28,6 +28,9 @@ public class Goods extends BaseEntity {
@Excel(name = "部门id") @Excel(name = "部门id")
private Long deptId; private Long deptId;
@Excel(name = "店铺id")
private Long shopId;
@Excel(name = "名称") @Excel(name = "名称")
private String goodsName; private String goodsName;

View File

@ -7,6 +7,7 @@
<id property="goodsId" column="goods_id" /> <id property="goodsId" column="goods_id" />
<result property="goodsCode" column="goods_code" /> <result property="goodsCode" column="goods_code" />
<result property="deptId" column="dept_id" /> <result property="deptId" column="dept_id" />
<result property="shopId" column="shop_id" />
<result property="goodsName" column="goods_name" /> <result property="goodsName" column="goods_name" />
<result property="goodsDesc" column="goods_desc" /> <result property="goodsDesc" column="goods_desc" />
<result property="goodsUnit" column="goods_unit" /> <result property="goodsUnit" column="goods_unit" />
@ -30,13 +31,13 @@
</resultMap> </resultMap>
<sql id="selectGoods"> <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 dept_goods_category_id, goods_img_url, goods_video_url, status, create_by, create_time, remark, area_desc, keyword
FROM goods FROM goods
</sql> </sql>
<sql id="selectGoodsWithArea"> <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 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 FROM goods g
LEFT JOIN goods_area ga ON g.goods_id = ga.goods_id 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="updateBy != null and updateBy != ''">update_by = #{updateBy},</if>
<if test="areaDesc != null and areaDesc != ''">area_desc = #{areaDesc},</if> <if test="areaDesc != null and areaDesc != ''">area_desc = #{areaDesc},</if>
<if test="type != null">type = #{type},</if> <if test="type != null">type = #{type},</if>
<if test="shopId != null">shop_id = #{shopId},</if>
update_time = sysdate() update_time = sysdate()
</set> </set>
WHERE goods_id = #{goodsId} WHERE goods_id = #{goodsId}
@ -75,6 +77,7 @@
insert into goods( insert into goods(
<if test="goodsCode != null and goodsCode != ''">goods_code,</if> <if test="goodsCode != null and goodsCode != ''">goods_code,</if>
<if test="deptId != null and deptId != ''">dept_id,</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="goodsName != null and goodsName != ''">goods_name,</if>
<if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if> <if test="goodsDesc != null and goodsDesc != ''">goods_desc,</if>
<if test="goodsUnit != null and goodsUnit != ''">goods_unit,</if> <if test="goodsUnit != null and goodsUnit != ''">goods_unit,</if>
@ -95,6 +98,7 @@
)values( )values(
<if test="goodsCode != null and goodsCode != ''">#{goodsCode},</if> <if test="goodsCode != null and goodsCode != ''">#{goodsCode},</if>
<if test="deptId != null and deptId != ''">#{deptId},</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="goodsName != null and goodsName != ''">#{goodsName},</if>
<if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if> <if test="goodsDesc != null and goodsDesc != ''">#{goodsDesc},</if>
<if test="goodsUnit != null and goodsUnit != ''">#{goodsUnit},</if> <if test="goodsUnit != null and goodsUnit != ''">#{goodsUnit},</if>
@ -159,6 +163,9 @@
<if test="goodsId != null"> <if test="goodsId != null">
AND g.goods_id = #{goodsId} AND g.goods_id = #{goodsId}
</if> </if>
<if test="shopId != null">
AND g.shop_id = #{shopId}
</if>
</where> </where>
/* 默认生成时间排序 */ /* 默认生成时间排序 */
order by create_time order by create_time