From aa11f5dc00d905769cd34a3cad84a074957148ed Mon Sep 17 00:00:00 2001 From: wzy <wzy19931122ai@163.com> Date: Thu, 14 Jan 2021 23:28:40 +0800 Subject: [PATCH] modify --- zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml | 86 +++++++++++++++++++++++++++++++++++++++++++ 1 files changed, 86 insertions(+), 0 deletions(-) diff --git a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml index e608194..736e68d 100644 --- a/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml +++ b/zq-erp/src/main/resources/mybatis/mapper/hive/SysProjServicesDao.xml @@ -458,4 +458,90 @@ </if> </select> + <resultMap id="ServiceOrderListVoMap" type="com.matrix.system.app.vo.ServiceOrderListVo"> + <id column="id" property="id" /> + <result column="serviceNo" property="serviceNo"/> + <result property="time" column="time"/> + <result property="bed" column="bed" /> + <result property="vipName" column="vipName" /> + <result property="vipId" column="vipId" /> + <result property="timeLength" column="timeLength" /> + <result property="status" column="status" /> + <result property="createStaffId" column="createStaffId" /> + <collection property="projs" ofType="com.matrix.system.app.vo.ServiceOrderListProjVo"> + <result property="projName" column="projName" /> + <result property="beautyName" column="beautyName" /> + <result property="id" column="staffId" /> + </collection> + </resultMap> + + + <select id="selectApiServiceOrderListInPage" resultMap="ServiceOrderListVoMap"> + select + a.id id, + a.SERVICE_NO serviceNo, + a.YY_TIME time, + a.TOTAL_TIME timeLength, + a.state status, + a.create_staff_id createStaffId, + d.BED_NAME bed, + e.VIP_NAME vipName, + e.id vipId, + b.staff_id staffId, + f.su_name beautyName, + g.proj_name projName + from sys_proj_services a + left join sys_beautician_state b on a.ID=b.SERVICES_ID + left join sys_bed_state c on a.ID = c.SERVICE_ID + left join sys_bed_info d on c.BED_ID=d.ID + left join sys_vip_info e on a.VIP_ID=e.ID + left join sys_users f on f.su_id=b.STAFF_ID + left join sys_proj_use g on b.puse_id=g.ID + <where> + <if test="record.queryKey != null and record.queryKey != ''"> + and (instr(a.SERVICE_NO, #{record.queryKey}) or instr(e.phone, #{record.queryKey}) or instr(e.vip_name, #{record.queryKey}) ) + </if> + <if test="record.status != null and record.status != ''"> + and a.state = #{record.status} + </if> + <if test="record.shopId != null"> + and a.shop_id=#{record.shopId} + </if> + <if test="record.userId!=null"> + and (a.create_staff_id=#{record.userId} or b.staff_id=#{record.userId}) + </if> + </where> + <if test="pageVo !=null"><!-- 判断pageVo对象是否为空 --> + order by a.yy_time desc + <if test="pageVo.offset >=0 and pageVo.limit >0"> + limit + #{pageVo.offset},#{pageVo.limit} + </if> + </if> + </select> + + <select id="selectApiServiceOrderListTotal" resultType="java.lang.Integer"> + select count(1) + from sys_proj_services a + left join sys_beautician_state b on a.ID=b.SERVICES_ID + left join sys_bed_state c on a.ID = c.SERVICE_ID + left join sys_bed_info d on c.BED_ID=d.ID + left join sys_vip_info e on a.VIP_ID=e.ID + left join sys_users f on f.su_id=b.STAFF_ID + left join sys_proj_use g on b.puse_id=g.ID + <where> + <if test="record.queryKey != null and record.queryKey != ''"> + and (instr(a.SERVICE_NO, #{record.queryKey}) or instr(e.phone, #{record.queryKey}) or instr(e.vip_name, #{record.queryKey}) ) + </if> + <if test="record.status != null and record.status != ''"> + and a.state = #{record.status} + </if> + <if test="record.shopId != null"> + and a.shop_id=#{record.shopId} + </if> + <if test="record.userId!=null"> + and (a.create_staff_id=#{record.userId} or b.staff_id=#{record.userId}) + </if> + </where> + </select> </mapper> -- Gitblit v1.9.1