<?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="com.cf.imes.module.executor.dal.mysql.plate.PlateGoodMapper">
    <select id="selectOneById" resultType="com.cf.imes.module.executor.dal.dataobject.plate.PlateGoodDO">
        SELECT
            id,
            goods_id,
            organ_id,
            goods_name,
            material,
            color,
            price,
            width,
            height,
            texture,
            thickness,
            brand,
            spec,
            remark,
            creator,
            create_time,
            updater,
            update_time,
            deleted
        FROM
            plate
        where organ_id = #{organId} and id = #{id} and deleted = 0
    </select>

    <select id="getOrgAttrGroup" resultType="java.util.LinkedHashMap">
        select goods_name, material, color, thickness, brand
        from plate
        where organ_id = #{organId}
          and deleted = false
        group by goods_name, material, color, thickness, brand;
    </select>
</mapper>