From 1566c319d907bf1fa042d6d8efd5d45007183472 Mon Sep 17 00:00:00 2001 From: "litao@lymsh.com" Date: Wed, 15 Nov 2017 15:46:25 +0800 Subject: [PATCH] =?UTF-8?q?=E9=83=A8=E5=88=86=E9=80=BB=E8=BE=91?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../main/resources/mainOrm/master/CouponMapper.xml | 35 +++++++++++++------- .../web/controller/AreaCountController.java | 10 ++---- .../operate/web/controller/ReportController.java | 26 +++------------ .../operate/web/facade/AreaCountFacade.java | 35 ++++++++++++-------- .../operate/web/service/IReportService.java | 4 +-- .../web/service/impl/ReportServiceImpl.java | 37 ++-------------------- .../lyms/platform/operate/web/utils/MongoUtil.java | 14 ++++++++ 7 files changed, 70 insertions(+), 91 deletions(-) diff --git a/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml b/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml index 2b01566..93817a2 100644 --- a/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml +++ b/platform-biz-service/src/main/resources/mainOrm/master/CouponMapper.xml @@ -559,6 +559,9 @@ and area_id = #{areaId} + + and street_id = #{streetId} + select a.create_hospital_id, a.user_id, a.create_date, a.send_hospital, b.name as doctoer_name from ( - select distinct(a.create_hospital_id), a.user_id, DATE_FORMAT(a.create_date, '%Y-%m-%d') as create_date, d.name as send_hospital, a.create_user_id - from coupon_info a, coupon_template b, coupon_type c, organization d - where a.coupon_template_id = b.id and b.type_id = c.id and a.create_hospital_id = d.id - and a.create_hospital_id in - - #{hid} - - and a.user_id in - - #{uid} - + select distinct(a.create_hospital_id), a.user_id, DATE_FORMAT(a.create_date, '%Y-%m-%d') as create_date, d.name as send_hospital, a.create_user_id + from coupon_info a, coupon_template b, coupon_type c, organization d + where a.coupon_template_id = b.id and b.type_id = c.id and a.create_hospital_id = d.id + and a.create_hospital_id in + + #{hid} + + and a.user_id in + + #{uid} + + and c.type in + + #{type} + + + and a.create_date >= #{startDate} + + + and a.create_date #{endDate} + ) a left join users b on a.create_user_id = b.id