package com.wgb.system.service.domain.mapper;

import com.baomidou.mybatisplus.core.mapper.BaseMapper;
import com.wgb.system.service.domain.model.BusinessCategory;
import org.apache.ibatis.annotations.Insert;
import org.apache.ibatis.annotations.Mapper;
import org.apache.ibatis.annotations.Options;

@Mapper
public interface BusinessCategoryMapper extends BaseMapper<BusinessCategory> {
    @Insert(" INSERT INTO business_category ( name, state, parent_id, market_price, retail_price, simple_maintenance, medium_maintenance, severe_maintenance, open_hole, create_time) " +
            "VALUES (  #{name},   #{state},   #{parentId},   #{marketPrice},   #{retailPrice},   #{simpleMaintenance},   #{mediumMaintenance},   #{severeMaintenance},   #{openHole},  NOW() ); ")
    @Options(useGeneratedKeys = true, keyProperty = "id", keyColumn = "id")
    Integer insertMapper(BusinessCategory businessCategory);
}
