<?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.panzhihua.service_community.dao.McsOrderDao">
|
|
<resultMap type="com.panzhihua.service_community.entity.McsOrder" id="McsOrderBaseResultMap">
|
<result property="id" column="id"/>
|
<result property="orderNo" column="order_no"/>
|
<result property="configId" column="config_id"/>
|
<result property="num" column="num"/>
|
<result property="status" column="status"/>
|
<result property="money" column="money"/>
|
<result property="payTime" column="pay_time"/>
|
<result property="merchantId" column="merchant_id"/>
|
<result property="payNo" column="pay_no"/>
|
<result property="userId" column="user_id"/>
|
<result property="paymentMethod" column="payment_method"/>
|
<result property="address" column="address"/>
|
<result property="lat" column="lat"/>
|
<result property="lon" column="lon"/>
|
</resultMap>
|
|
<select id="pageList" resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsOrderVO">
|
select t.*,t1.`name` as payName,t2.name as merchantName,t2.account as merchantAccount from mcs_order t
|
left join mcs_config t1 on t.config_id = t1.id
|
left join mcs_merchant t2 on t.merchant_id = t2.id
|
<where>
|
<if test="commonPage.status !=null">
|
and t.status = #{commonPage.status}
|
</if>
|
<if test="commonPage.keyword !=null and commonPage.keyword !=''">
|
and t.order_no like concat('%',#{commonPage.keyword},'%')
|
</if>
|
<if test="commonPage.userId !=null">
|
and t.user_id = #{commonPage.userId}
|
</if>
|
<if test="commonPage.merchantId !=null">
|
and t.merchant_id = #{commonPage.merchantId}
|
</if>
|
</where>
|
order by t.create_time desc
|
</select>
|
|
<select id="detail" resultType="com.panzhihua.common.model.vos.community.microCommercialStreet.McsOrderVO">
|
select t.*,t1.`name` as payName,t2.name as merchantName,t2.account as merchantAccount from mcs_order t
|
left join mcs_config t1 on t.config_id = t1.id
|
left join mcs_merchant t2 on t.merchant_id = t2.id
|
where t.id =#{id}
|
</select>
|
|
<select id="selectPhone" resultType="string">
|
select t1.phone from mcs_order t left join mcs_merchant t1 on t.merchant_id = t1.id where t.id=#{id}
|
</select>
|
|
</mapper>
|