diff --git a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketMaterial.java b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketMaterial.java index e9fd213..438f6e9 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketMaterial.java +++ b/bonus-modules/bonus-smart-canteen/src/main/java/com/bonus/canteen/core/supermarket/domain/SupermarketMaterial.java @@ -27,6 +27,8 @@ public class SupermarketMaterial extends BaseEntity { @ApiModelProperty(value = "区域id") private Long areaId; + private String areaName; + /** 原料名称 */ @Excel(name = "原料名称") @ApiModelProperty(value = "原料名称") @@ -47,6 +49,8 @@ public class SupermarketMaterial extends BaseEntity { @ApiModelProperty(value = "类别id") private Long materialTypeId; + private String materialTypeName; + /** 类别ids */ @Excel(name = "类别ids") @ApiModelProperty(value = "类别ids") @@ -62,6 +66,8 @@ public class SupermarketMaterial extends BaseEntity { @ApiModelProperty(value = "单位") private Long unitId; + private String unitName; + /** 销售价 */ @Excel(name = "销售价") @ApiModelProperty(value = "销售价") diff --git a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialMapper.xml b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialMapper.xml index c81f43b..4426e41 100644 --- a/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialMapper.xml +++ b/bonus-modules/bonus-smart-canteen/src/main/resources/mapper/supermarket/SupermarketMaterialMapper.xml @@ -6,12 +6,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" + + + @@ -28,43 +31,47 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" - select material_id, area_id, material_name, material_code, img_url, material_type_id, - bar_code, unit_id, sale_price, unit_price, sales_mode, shelf_life_type, - shelf_life_days, pur_price_ceiling, big_category_id, `size`, description, - create_by, create_time, update_by, update_time - from supermarket_material + select sm.material_id, sm.area_id, sm.material_name, sm.material_code, sm.img_url, sm.material_type_id, + sm.bar_code, sm.unit_id, sm.sale_price, sm.unit_price, sm.sales_mode, sm.shelf_life_type, + sm.shelf_life_days, sm.pur_price_ceiling, sm.big_category_id, sm.`size`, sm.description, + sm.create_by, sm.create_time, sm.update_by, sm.update_time, + ba.area_name, smt.material_type_name, spu.unit_name + from supermarket_material sm + left join basic_area ba on ba.area_id = sm.area_id + left join supermarket_material_type smt on smt.material_type_id = sm.material_type_id + left join supply_product_unit spu on spu.unit_id = sm.unit_id