From 6a0518935f27b0ffb4d52a19165eb4663131d18d Mon Sep 17 00:00:00 2001
From: xiaoyong931011 <15274802129@163.com>
Date: Tue, 15 Aug 2023 14:26:54 +0800
Subject: [PATCH] 后台修改
---
src/main/resources/mapper/dapp/MallGoodsMapper.xml | 4 +++-
src/main/java/cc/mrbird/febs/dapp/entity/MallGoods.java | 4 ++++
src/main/resources/templates/febs/views/goods/goodsList.html | 1 +
3 files changed, 8 insertions(+), 1 deletions(-)
diff --git a/src/main/java/cc/mrbird/febs/dapp/entity/MallGoods.java b/src/main/java/cc/mrbird/febs/dapp/entity/MallGoods.java
index 35afe09..b434c21 100644
--- a/src/main/java/cc/mrbird/febs/dapp/entity/MallGoods.java
+++ b/src/main/java/cc/mrbird/febs/dapp/entity/MallGoods.java
@@ -1,6 +1,7 @@
package cc.mrbird.febs.dapp.entity;
import cc.mrbird.febs.common.entity.BaseEntity;
+import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import lombok.Data;
@@ -47,4 +48,7 @@
*/
private Long categoryId;
+ @TableField(exist = false)
+ private String categoryName;
+
}
diff --git a/src/main/resources/mapper/dapp/MallGoodsMapper.xml b/src/main/resources/mapper/dapp/MallGoodsMapper.xml
index a14017c..6f7b79d 100644
--- a/src/main/resources/mapper/dapp/MallGoodsMapper.xml
+++ b/src/main/resources/mapper/dapp/MallGoodsMapper.xml
@@ -4,8 +4,10 @@
<select id="selectMallGoodsInPage" resultType="cc.mrbird.febs.dapp.entity.MallGoods">
select
- a.*
+ a.*,
+ b.name categoryName
from mall_goods a
+ left join mall_goods_category b on a.category_id = b.id
<where>
<if test="record != null">
<if test="record.goodsName != null and record.goodsName != ''">
diff --git a/src/main/resources/templates/febs/views/goods/goodsList.html b/src/main/resources/templates/febs/views/goods/goodsList.html
index 987a049..eb774ea 100644
--- a/src/main/resources/templates/febs/views/goods/goodsList.html
+++ b/src/main/resources/templates/febs/views/goods/goodsList.html
@@ -189,6 +189,7 @@
cols: [[
{field: 'sortCnt', title: '序号', minWidth: 80,align:'left'},
{field: 'goodsNo', title: '商品编号', minWidth: 100,align:'left'},
+ {field: 'categoryName', title: '商品分类', minWidth: 140,align:'left'},
{field: 'goodsName', title: '商品名称', minWidth: 140,align:'left'},
{field: 'thumb', title: '缩略图',
templet: function (d) {
--
Gitblit v1.9.1