<?xml version="1.0" encoding="UTF-8"?>
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
<mapper namespace="org.springblade.modules.pl.goods.mapper.GoodsMapper">

    <!-- 通用查询映射结果 -->
    <resultMap id="goodsResultMap" type="org.springblade.modules.pl.goods.entity.GoodsEntity">
        <result column="id" property="id"/>
        <result column="tenant_id" property="tenantId"/>
        <result column="factory_id" property="factoryId"/>
        <result column="goods_name" property="goodsName"/>
        <result column="goods_code" property="goodsCode"/>
        <result column="goods_model" property="goodsModel"/>
        <result column="weight" property="weight"/>
        <result column="specification" property="specification"/>
        <result column="customer_address" property="customerAddress"/>
        <result column="create_user" property="createUser"/>
        <result column="create_dept" property="createDept"/>
        <result column="create_time" property="createTime"/>
        <result column="update_user" property="updateUser"/>
        <result column="update_time" property="updateTime"/>
        <result column="status" property="status"/>
        <result column="is_deleted" property="isDeleted"/>
    </resultMap>


    <select id="selectGoodsPage" resultMap="goodsResultMap">
        select * from pl_goods where is_deleted = 0
    </select>


    <select id="exportGoods" resultType="org.springblade.modules.pl.goods.excel.GoodsExcel">
        SELECT * FROM pl_goods ${ew.customSqlSegment}
    </select>

</mapper>
