From d9dfe81a9e819d9da2d41cb57d674eff894c6605 Mon Sep 17 00:00:00 2001 From: 44323 <443237572@qq.com> Date: 星期二, 05 九月 2023 11:36:21 +0800 Subject: [PATCH] 场地类型管理、场地管理、课包类型管理、教练管理、教练类型管理、福利视频分类管理、体测预约 --- cloud-server-other/src/main/resources/mapper/SiteMapper.xml | 72 +++++++++++++++++++++++++++++++++++ 1 files changed, 71 insertions(+), 1 deletions(-) diff --git a/cloud-server-other/src/main/resources/mapper/SiteMapper.xml b/cloud-server-other/src/main/resources/mapper/SiteMapper.xml index 592245c..87454da 100644 --- a/cloud-server-other/src/main/resources/mapper/SiteMapper.xml +++ b/cloud-server-other/src/main/resources/mapper/SiteMapper.xml @@ -1,7 +1,18 @@ <?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"> <mapper namespace="com.dsh.other.mapper.SiteMapper"> - + <update id="changeState"> + update t_site set + state = #{type} + <where> + <if test="siteIds != null and siteIds.size()>0"> + AND t_site.id IN + <foreach collection="siteIds" separator="," item="id" open="(" close=")"> + #{id} + </foreach> + </if> + </where> + </update> <select id="querySiteList" resultType="com.dsh.other.model.QuerySiteListVo"> select @@ -61,4 +72,63 @@ </if> order by a.insertTime desc limit #{pageNo}, #{pageSize} </select> + <select id="listAll" resultType="com.dsh.other.model.dto.siteDto.TSiteDTO"> + select t1.*,t2.name storeName,t3.name siteTypeName from t_site t1 + inner join t_store t2 on t1.storeId = t2.id + left join t_site_type t3 on t1.siteTypeId = t3.id + <where> + <if test="query.objectType == 2"> + and t1.cityManagerId = #{query.objectId} + </if> + <if test="query.objectType == 3"> + and t2.storeStaffId = #{query.objectId} + </if> + <if test="query.city!=null and query.city!= ''"> + and t1.city = #{query.city} + </if> + <if test="query.province!=null and query.province!= ''"> + and t1.province = #{query.province} + </if> + <if test="query.siteTypeId!=null and query.siteTypeId!= ''"> + and t1.siteTypeId = #{query.siteTypeId} + </if> + <if test="query.storeName!=null and query.storeName!= ''"> + and t2.name like concat('%',#{query.storeName},'%') + </if> + <if test="query.name!=null and query.name!= ''"> + and t1.name like concat('%',#{query.name},'%') + </if> + and t1.state != 3 + </where> + </select> + <select id="listExipre" resultType="com.dsh.other.model.dto.siteDto.TSiteDTO"> + select t1.*,t2.name storeName,t3.name siteTypeName from t_site t1 + inner join t_store t2 on t1.storeId = t2.id + left join t_site_type t3 on t1.siteTypeId = t3.id + <where> + <if test="query.objectType == 2"> + and t1.cityManagerId = #{query.objectId} + </if> + <if test="query.objectType == 3"> + and t2.storeStaffId = #{query.objectId} + </if> + <if test="query.city!=null and query.city!= ''"> + and t1.city = #{query.city} + </if> + <if test="query.province!=null and query.province!= ''"> + and t1.province = #{query.province} + </if> + <if test="query.siteTypeId!=null and query.siteTypeId!= ''"> + and t1.siteTypeId = #{query.siteTypeId} + </if> + <if test="query.storeName!=null and query.storeName!= ''"> + and t2.name like concat('%',#{query.storeName},'%') + </if> + <if test="query.name!=null and query.name!= ''"> + and t1.name like concat('%',#{query.name},'%') + </if> + and t1.state != 3 + and t1.insuranceEndTime <= DATE_ADD(CURDATE(), INTERVAL 2 MONTH); + </where> + </select> </mapper> -- Gitblit v1.7.1