21 lines
784 B
XML
21 lines
784 B
XML
<?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.cnbm.basic.mapper.ProductWorkingprocedureRelationMapper">
|
|
|
|
<select id="getWorkingprocedureByProductId" resultType="com.cnbm.basic.dto.ProductWorkingprocedureRelationDTO">
|
|
select pwr.*, wp.name as workingProcedureName, wp.code as workingProcedureCode
|
|
from product_workingprocedure_relation pwr
|
|
LEFT JOIN working_procedure wp ON pwr.working_procedure_id=wp.id
|
|
<where>
|
|
pwr.valid = 1
|
|
<if test="productId != null">
|
|
and pwr.product_id=#{productId}
|
|
</if>
|
|
</where>
|
|
|
|
order by pwr.sequence asc
|
|
|
|
</select>
|
|
|
|
</mapper>
|