|
@@ -1,7 +1,52 @@
|
|
|
<?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">
|
|
|
+ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
|
|
|
+ "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
|
<mapper namespace="org.dromara.commodityManagement.mapper.DaHuoNumberMapper">
|
|
|
|
|
|
+ <resultMap id="DaHuoNumberResultMap" type="org.dromara.commodityManagement.domain.vo.DaHuoNumberVo">
|
|
|
+ <id property="id" column="id"/>
|
|
|
+ <result property="name" column="name"/>
|
|
|
+ <result property="type" column="type"/>
|
|
|
+ <result property="kuanhao" column="kuanhao"/>
|
|
|
+ <result property="huaxinghao" column="huaxinghao"/>
|
|
|
+ <result property="dibu" column="dibu"/>
|
|
|
+ <result property="dibu_price" column="dibu_price"/>
|
|
|
+ <result property="customer_name" column="customer_name"/>
|
|
|
+ <result property="machine" column="machine"/>
|
|
|
+ <collection property="template" ofType="org.dromara.commodityManagement.domain.Template">
|
|
|
+ <id property="id" column="template_id"/>
|
|
|
+ <result property="item_id" column="item_id"/>
|
|
|
+ <result property="name" column="template_name"/>
|
|
|
+ <result property="image" column="template_image"/>
|
|
|
+ </collection>
|
|
|
+ </resultMap>
|
|
|
+
|
|
|
+ <select id="selectVoPageWithTemplate" resultMap="DaHuoNumberResultMap">
|
|
|
+ SELECT
|
|
|
+ dh.id,
|
|
|
+ dh.name,
|
|
|
+ dh.type,
|
|
|
+ dh.kuanhao,
|
|
|
+ dh.huaxinghao,
|
|
|
+ dh.dibu,
|
|
|
+ dh.dibu_price,
|
|
|
+ dh.customer_name,
|
|
|
+ dh.machine,
|
|
|
+ t.id AS template_id,
|
|
|
+ t.name AS template_name,
|
|
|
+ t.image AS template_image
|
|
|
+ FROM
|
|
|
+ fa_kuyou_item_name dh
|
|
|
+ LEFT JOIN
|
|
|
+ fa_kuyou_item_name_template t ON dh.id = t.item_id
|
|
|
+ WHERE
|
|
|
+ dh.type = #{ew.eq('type', '1')}
|
|
|
+ <if test="ew.getCustomSqlSegment() != null">
|
|
|
+ ${ew.getCustomSqlSegment()}
|
|
|
+ </if>
|
|
|
+ ORDER BY
|
|
|
+ dh.id
|
|
|
+ </select>
|
|
|
+
|
|
|
</mapper>
|