Commit 561916a6 by sdif

Merge remote-tracking branch 'origin/dev' into dev

parents 76720341 e921fe41
package com.pz.merchant.domain.bo;
import com.pz.common.core.validate.AddGroup;
import com.pz.common.core.validate.EditGroup;
import lombok.Data;
import javax.validation.constraints.NotBlank;
......
......@@ -58,8 +58,9 @@
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
and yyod.create_time &lt; NOW()
</where>
order by yyod.visit_time desc
order by yyod.create_time desc
</select>
<select id="selectSonOrderInfoByTotalId" resultType="com.pz.merchant.domain.vo.SonOrderVo">
......
<?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="com.pz.system.mapper.DbmyOrderMapper">
<resultMap type="com.pz.system.domain.DbmyOrder" id="DbmyOrderResult">
......@@ -33,23 +33,24 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</resultMap>
<select id="findDbmyOrderVoPage" resultType="com.pz.system.domain.vo.DbmyOrderVo">
SELECT
tlo.order_sn AS orderSn,
tlo.pay_money AS PayMoney,
s.`name` AS serviceName,
c.`name` AS cityName,
e.`name` AS eName,
tlo.remark AS remark,
yyod.`status` AS yStatus,
tlo.`status` AS tStatus,
tlo.is_satisfaction AS isSatisfaction,
tlo.evaluation_content AS evaluationContent,
yyod.create_time as createTime
FROM
dbmy_order AS yyod
LEFT JOIN total_order AS tlo ON yyod.order_id = tlo.id
LEFT JOIN city AS c ON c.id = tlo.city_id
LEFT JOIN services AS s ON s.id = tlo.service_id
LEFT JOIN employees AS e ON e.id = tlo.em_id
tlo.order_sn AS orderSn,
tlo.pay_money AS PayMoney,
s.`name` AS serviceName,
c.`name` AS cityName,
e.`name` AS eName,
tlo.remark AS remark,
yyod.`status` AS yStatus,
tlo.`status` AS tStatus,
tlo.is_satisfaction AS isSatisfaction,
tlo.evaluation_content AS evaluationContent,
yyod.create_time as createTime,
yyod.is_refrigerate as isRefrigerate
FROM
dbmy_order AS yyod
LEFT JOIN total_order AS tlo ON yyod.order_id = tlo.id
LEFT JOIN city AS c ON c.id = tlo.city_id
LEFT JOIN services AS s ON s.id = tlo.service_id
LEFT JOIN employees AS e ON e.id = tlo.em_id
LEFT JOIN company AS co ON co.id = e.company_id
<where>
<if test="bo.orderSn != null and bo.orderSn != ''">
......@@ -61,6 +62,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
and yyod.create_time &lt; NOW()
</where>
order by yyod.create_time desc
</select>
......@@ -69,7 +71,7 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
select dbmy_order.status as orderStatus,
sys_user.nick_name as userName,
sys_user.avatar,
dbmy_order.id as sonOrderId
dbmy_order.id as sonOrderId
from dbmy_order
left join total_order on total_order.id = dbmy_order.order_id
left join sys_user on sys_user.user_id = total_order.uid
......@@ -77,15 +79,15 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectDbmyOrderDetailDataByTotalId" resultType="com.pz.system.domain.vo.DbmyOrderItemVo">
select total_order.id as orderId,
dbmy_order.id as serviceOrderId,
select total_order.id as orderId,
dbmy_order.id as serviceOrderId,
total_order.business_id,
total_order.status as orderStatus,
dbmy_order.status as serviceStatus,
services.name as project,
business.name as businessName,
CONVERT((1 - services.fenmo / 100), decimal(10, 2)) *
CONVERT(services.price, decimal(10, 2)) as commission,
total_order.status as orderStatus,
dbmy_order.status as serviceStatus,
services.name as project,
business.name as businessName,
CONVERT((1 - services.fenmo / 100), decimal (10, 2)) *
CONVERT(services.price, decimal (10, 2)) as commission,
dbmy_order.yp_name,
dbmy_order.yd_address,
dbmy_order.way,
......@@ -93,16 +95,16 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
dbmy_order.prescription_attachment,
dbmy_order.phone,
dbmy_order.recipient,
dbmy_order.address as address,
dbmy_order.address as address,
dbmy_order.address_info,
dbmy_order.is_refrigerate,
total_order.remark as description,
total_order.remark as description,
dbmy_order.remark,
dbmy_order.voucher,
total_order.evaluation_content,
total_order.is_satisfaction as evaluation_flag,
total_order.uid as userId,
employees.uid as euserId
total_order.is_satisfaction as evaluation_flag,
total_order.uid as userId,
employees.uid as euserId
from total_order
left join business on total_order.business_id = business.id
left join employees on total_order.em_id = employees.id
......@@ -112,8 +114,10 @@ PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN"
</select>
<select id="selectFinishTime" resultType="java.lang.String">
select over_time
from total_order t left join dbmy_order d on d.order_id = t.id
where d.status = 2 and t.id = #{id}
from total_order t
left join dbmy_order d on d.order_id = t.id
where d.status = 2
and t.id = #{id}
</select>
......
......@@ -62,8 +62,9 @@
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
and yyod.create_time &lt; NOW()
</where>
order by yyod.visit_time desc
order by yyod.create_time desc
</select>
<select id="selectSonOrderInfoByTotalId" resultType="com.pz.merchant.domain.vo.SonOrderVo">
......
......@@ -19,11 +19,12 @@
</resultMap>
<select id="selectLastTenRecord" resultType="com.pz.system.domain.vo.AppletOrderMessageVo">
select ifnull(order_message.user_name, '') as userName,
ifnull(user.avatar, '') as avatar
select distinct ifnull(order_message.user_name, '') as userName,
ifnull(user.avatar, '') as avatar
from order_message
join total_order on total_order.id = order_message.total_order_id
left join sys_user as user on user.user_id = total_order.uid
join total_order on total_order.id = order_message.total_order_id
left join sys_user as user on user.user_id = total_order.uid
<!-- where order_message.city_id = #{city} -->
order by order_message.id desc
limit 10
</select>
......
......@@ -60,8 +60,9 @@
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
yyod.create_time &lt; NOW()
</where>
order by yyod.visit_time desc
order by yyod.create_time desc
</select>
<select id="selectSonOrderInfoByTotalId" resultType="com.pz.merchant.domain.vo.SonOrderVo">
......
......@@ -48,12 +48,15 @@
LEFT JOIN department AS d ON d.id = yyod.did
LEFT JOIN doctor AS s ON s.id = yyod.doctor_id
LEFT JOIN sys_user as su on su.user_id = tlo.uid
<if test="bo.orderSn != null and bo.orderSn != ''">
where tlo.order_sn LIKE CONCAT('%', #{bo.orderSn}, '%')
</if>
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
<where>
<if test="bo.orderSn != null and bo.orderSn != ''">
and tlo.order_sn LIKE CONCAT('%', #{bo.orderSn}, '%')
</if>
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
and yyod.create_time &lt; NOW()
</where>
order by tlo.create_time desc
</select>
......
......@@ -64,6 +64,7 @@
<if test="bo.startTime != null and bo.startTime != '' and bo.endTime != null and bo.endTime != ''">
and yyod.create_time &gt; = #{bo.startTime} and yyod.create_time &lt; = #{bo.endTime}
</if>
and yyod.create_time &lt; NOW()
</where>
order by yyod.create_time desc
</select>
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment