PensionOrderDao.xml 2.44 KB
Newer Older
mengmeng's avatar
mengmeng committed
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30
<?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="io.hmit.modules.serviceOrder.dao.PensionOrderDao">

    <resultMap type="io.hmit.modules.serviceOrder.entity.PensionOrderEntity" id="pensionOrderMap">
        <result property="id" column="id"/>
        <result property="orderNum" column="order_num"/>
        <result property="status" column="status"/>
        <result property="statusName" column="status_name"/>
        <result property="address" column="address"/>
        <result property="serviceId" column="service_id"/>
        <result property="serviceName" column="service_name"/>
        <result property="appointmentPerson" column="appointment_person"/>
        <result property="appointmentPhone" column="appointment_phone"/>
        <result property="appointmentTime" column="appointment_time"/>
        <result property="remark" column="remark"/>
        <result property="orderRecipientId" column="order_recipient_id"/>
        <result property="orderRecipientName" column="order_recipient_name"/>
        <result property="orderRecipientTime" column="order_recipient_time"/>
        <result property="orderRecipientPhone" column="order_recipient_phone"/>
        <result property="deptId" column="dept_id"/>
        <result property="creator" column="creator"/>
        <result property="creatorName" column="creator_name"/>
        <result property="creatorTel" column="creator_tel"/>
        <result property="createDate" column="create_date"/>
        <result property="updater" column="updater"/>
        <result property="updateDate" column="update_date"/>
    </resultMap>

31 32 33 34 35 36 37 38 39 40 41 42 43
    <select id="getAllOrderByServiceId" resultType="io.hmit.modules.serviceOrder.dto.PensionOrderDTO">
        SELECT po.id, po.order_num, po.status, po.status_name, po.address, po.service_id, po.service_name,
        po.appointment_person, po.appointment_phone, po.appointment_time, po.remark,
        po.order_recipient_id, po.order_recipient_name, po.order_recipient_time, po.order_recipient_phone,
        po.act_price, po.community_name, po.community_id, po.dept_id,
        po.creator, po.creator_name, po.creator_tel, po.create_date,
        ps.icon
        FROM pension_order po, pension_service ps
        WHERE po.service_id = ps.id AND po.service_id = #{serviceId}
        <if test="status != null">
            AND po.status = #{status}
        </if>
    </select>
mengmeng's avatar
mengmeng committed
44
</mapper>