liujie
2025-09-01 2d466a8a8318130189f1513acc8c385a939e680f
供应商商品
2个文件已修改
32 ■■■■■ 已修改文件
ruoyi-system/src/main/java/com/ruoyi/system/model/TErpGoods.java 8 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/resources/mapper/system/TErpGoodsMapper.xml 24 ●●●●● 补丁 | 查看 | 原始文档 | blame | 历史
ruoyi-system/src/main/java/com/ruoyi/system/model/TErpGoods.java
@@ -117,5 +117,13 @@
    @TableField("platform_commission_price")
    private Double platformCommissionPrice;
    @ApiModelProperty(value = "1启用 2禁用")
    private Integer state;
    @ApiModelProperty(value = "商品类型名称")
    @TableField(exist = false)
    private String typeName;
}
ruoyi-system/src/main/resources/mapper/system/TErpGoodsMapper.xml
@@ -36,7 +36,29 @@
    <!-- 通用查询结果列 -->
    <sql id="Base_Column_List">
        id, supplier_id, clinic_id, goods_name, goods_id_code, quasi_number, manufacturer, formulation_spec, packing_spec, type_id, goods_yards, maintenance_interval, low_purchase_quantity, low_unit_id, is_prescription_drug, goods_spec, warning_inventory, sales_amount, packing_unit_id, instructions_use, side_effect, clinic_purchase_price, platform_commission_price, create_time, update_time, create_by, update_by, disabled
        id, supplier_id, clinic_id, goods_name, goods_id_code, quasi_number, manufacturer, formulation_spec, packing_spec, type_id, goods_yards, maintenance_interval, low_purchase_quantity, low_unit_id, is_prescription_drug, goods_spec, warning_inventory, sales_amount, packing_unit_id, instructions_use, side_effect, clinic_purchase_price, platform_commission_price, create_time, update_time, create_by,`state`, update_by, disabled
    </sql>
    <select id="pageList" resultType="com.ruoyi.system.vo.TErpGoodsVO">
        select <include refid="Base_Column_List"/>
            from t_erp_goods where disabled = 0
        <if test="query.goodsName != null and query.goodsName != ''">
            and goods_name like concat('%',#{query.goodsName},'%')
        </if>
        <if test="query.goodsIdCode != null and query.goodsIdCode != ''">
            and goods_id_code like concat('%',#{query.goodsIdCode},'%')
        </if>
        <if test="query.typeId != null and query.typeId != ''">
            and type_id = #{query.typeId}
        </if>
        <if test="query.quasiNumber != null and query.quasiNumber != ''">
            and quasi_number like concat('%',#{query.quasiNumber},'%')
        </if>
        <if test="query.state != null ">
            and state = #{query.state}
        </if>
        <if test="user.roleType == null or user.roleType != 1 ">
            and create_id =#{user.userId}
        </if>
    </select>
</mapper>