Commit 561916a6 by sdif

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

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