Merge branch 'master' into report
This commit is contained in:
commit
02d617667c
|
|
@ -56,7 +56,7 @@ public class SupermarketProductController extends BaseController {
|
|||
@GetMapping("/getAddList")
|
||||
public TableDataInfo getAddList(SupermarketProduct supermarketProduct) {
|
||||
startPage();
|
||||
List<SupermarketProduct> list = supermarketProductService.selectSupermarketProductList(supermarketProduct);
|
||||
List<SupermarketProduct> list = supermarketProductService.selectSupermarketAddProductList(supermarketProduct);
|
||||
return getDataTable(list);
|
||||
}
|
||||
/**
|
||||
|
|
|
|||
|
|
@ -20,7 +20,7 @@ import com.bonus.common.core.web.domain.BaseEntity;
|
|||
@ToString
|
||||
public class SupermarketProduct extends BaseEntity {
|
||||
private static final long serialVersionUID = 1L;
|
||||
|
||||
|
||||
/** 商城商品明细id */
|
||||
private Long productId;
|
||||
|
||||
|
|
@ -76,6 +76,14 @@ public class SupermarketProduct extends BaseEntity {
|
|||
|
||||
private String materialName;
|
||||
|
||||
private String materialType;
|
||||
|
||||
private String materialTypeName;
|
||||
|
||||
private String areaId;
|
||||
|
||||
private String areaName;
|
||||
|
||||
private String unitName;
|
||||
|
||||
public String getImgUrl() {
|
||||
|
|
|
|||
|
|
@ -28,6 +28,7 @@ public interface SupermarketProductMapper {
|
|||
*/
|
||||
public List<SupermarketProduct> selectSupermarketProductList(SupermarketProduct supermarketProduct);
|
||||
|
||||
public List<SupermarketProduct> selectSupermarketAddProductList(SupermarketProduct supermarketProduct);
|
||||
/**
|
||||
* 新增超市商城商品
|
||||
*
|
||||
|
|
|
|||
|
|
@ -26,6 +26,8 @@ public interface ISupermarketProductService {
|
|||
*/
|
||||
public List<SupermarketProduct> selectSupermarketProductList(SupermarketProduct supermarketProduct);
|
||||
|
||||
public List<SupermarketProduct> selectSupermarketAddProductList(SupermarketProduct supermarketProduct);
|
||||
|
||||
/**
|
||||
* 新增超市商城商品
|
||||
*
|
||||
|
|
|
|||
|
|
@ -43,6 +43,10 @@ public class SupermarketProductServiceImpl implements ISupermarketProductService
|
|||
return supermarketProductMapper.selectSupermarketProductList(supermarketProduct);
|
||||
}
|
||||
|
||||
@Override
|
||||
public List<SupermarketProduct> selectSupermarketAddProductList(SupermarketProduct supermarketProduct) {
|
||||
return supermarketProductMapper.selectSupermarketAddProductList(supermarketProduct);
|
||||
}
|
||||
/**
|
||||
* 新增超市商城商品
|
||||
*
|
||||
|
|
|
|||
|
|
@ -48,6 +48,22 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|||
</where>
|
||||
</select>
|
||||
|
||||
|
||||
<select id="selectSupermarketAddProductList" parameterType="com.bonus.canteen.core.supermarket.domain.SupermarketProduct" resultType="com.bonus.canteen.core.supermarket.domain.SupermarketProduct">
|
||||
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
|
||||
left join supermarket_product sp on sm.material_id=sp.material_id
|
||||
where sp.material_id is null
|
||||
<if test="areaId != null and areaId != ''"> and sm.area_id = #{areaId}</if>
|
||||
</select>
|
||||
|
||||
<select id="selectSupermarketProductByProductId" parameterType="Long" resultMap="SupermarketProductResult">
|
||||
<include refid="selectSupermarketProductVo"/>
|
||||
where sp.product_id = #{productId}
|
||||
|
|
|
|||
Loading…
Reference in New Issue