From 257af1d1b9812aea141348a583277bc26d9ce5c4 Mon Sep 17 00:00:00 2001 From: 侯瑞军 <411269194@kidgrow.com> Date: Wed, 03 Jun 2020 09:13:27 +0800 Subject: [PATCH] Merge branch 'dev' of http://192.168.2.240:7070/r/kidgrow-microservices-platform into dev --- kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/resources/mapper/ProductOrderDetailMapper.xml | 23 +++++++++++++++++++++++ 1 files changed, 23 insertions(+), 0 deletions(-) diff --git a/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/resources/mapper/ProductOrderDetailMapper.xml b/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/resources/mapper/ProductOrderDetailMapper.xml index f2afa67..8f53461 100644 --- a/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/resources/mapper/ProductOrderDetailMapper.xml +++ b/kidgrow-business/kidgrow-opration-center/kidgrow-opration-center-biz/src/main/resources/mapper/ProductOrderDetailMapper.xml @@ -107,6 +107,12 @@ <if test="p.createTime != null and p.createTime !='' and p.updateTime != null and p.updateTime !=''"> and (DE.create_time between #{p.createTime} and #{p.updateTime}) </if> + <if test="p.startTime!= null and p.startTime !=''"> + and DE.create_time >= #{p.startTime} + </if> + <if test="p.endTime!= null and p.endTime !=''"> + and DE.create_time <= #{p.endTime} + </if> <include refid="com.kidgrow.oprationcenter.mapper.SysProductMapper.Role_Organization"></include> </where> </sql> @@ -143,4 +149,21 @@ GROUP BY DE.pro_id order by pro_count desc </select> + <select id="getTypeByUser" resultType="com.kidgrow.oprationcenter.vo.ProductOrderJoinDetail" parameterType="long"> + SELECT + pod.* + FROM + `product_order` po + INNER JOIN product_order_detail pod ON po.id = pod.order_id + WHERE + po.hospital_id = #{id} + AND NOW() >= pod.pro_begintime + AND NOW() <=pod.pro_endtime + AND pod.enabled = 1 + AND pod.is_del = 0 + AND po.enabled = 1 + AND po.is_del = 0 + ORDER BY + pod.pro_type desc,pod.pro_endtime desc + </select> </mapper> \ No newline at end of file -- Gitblit v1.8.0