<?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.jeeplus.test.materialManagement.mapper.MaterialDetailedMapper">
    <select id="getByBasicId" resultType="com.jeeplus.test.materialManagement.domain.MaterialDetailed">
        select * from material_management_pruchase_request_detailed where basic_id = #{basicId} and del_flag = '0'
    </select>
    <select id="getByAttachmentId" resultType="com.jeeplus.test.workContract.service.dto.WorkAttachmentDto">
        SELECT
			id,
			url,
			attachment_name AS `name`,
			create_by AS `by`,
			create_date
		FROM
			work_attachment
		WHERE
			del_flag = 0
			AND attachment_id = #{id}
    </select>
</mapper>
