123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116 |
- <?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.ruoyi.demo.mapper.StoreWdOpcloseDao">
- <select id="selectWdOpenTimes" resultType="com.ruoyi.demo.entity.vo.OpcloseTimeVo">
- SELECT
- start_time time,
- COUNT(*) count
- FROM
- `bl_store_wd_opclose`
- <trim prefix="where" prefixOverrides="and">
- <if test="addrCodes != null">
- <foreach collection="addrCodes" item="code" open="and addr_code in (" separator="," close=")">
- #{code,jdbcType=VARCHAR}
- </foreach>
- </if>
- <if test="typeCodeBys != null">
- <foreach collection="typeCodeBys" item="code" open="and type_code_by in (" separator="," close=")">
- #{code,jdbcType=VARCHAR}
- </foreach>
- </if>
- </trim>
- GROUP BY
- start_time
- ORDER BY
- count DESC;
- </select>
- <select id="selectWdCloseTimes" resultType="com.ruoyi.demo.entity.vo.OpcloseTimeVo">
- SELECT
- end_time time,
- COUNT(*) count
- FROM
- `bl_store_wd_opclose`
- <trim prefix="where" prefixOverrides="and">
- <if test="addrCodes != null">
- <foreach collection="addrCodes" item="code" open="and addr_code in (" separator="," close=")">
- #{code,jdbcType=VARCHAR}
- </foreach>
- </if>
- <if test="typeCodeBys != null">
- <foreach collection="typeCodeBys" item="code" open="and type_code_by in (" separator="," close=")">
- #{code,jdbcType=VARCHAR}
- </foreach>
- </if>
- </trim>
- GROUP BY
- end_time
- ORDER BY
- count DESC;
- </select>
- <select id="selectBrandOpenTimes" resultType="com.ruoyi.demo.entity.vo.OpcloseTimeVo">
- SELECT
- brand_id,
- brand_name,
- start_time time,
- COUNT(*) count
- FROM
- `bl_store_wd_opclose`
- <trim prefix="where" prefixOverrides="and">
- <if test="brandIds != null">
- <foreach collection="brandIds" item="id" open="and brand_id in (" separator="," close=")">
- #{id,jdbcType=VARCHAR}
- </foreach>
- </if>
- <if test="addrCodes != null">
- <foreach collection="addrCodes" item="code" open="and addr_code in (" separator="," close=")">
- #{code,jdbcType=VARCHAR}
- </foreach>
- </if>
- <if test="typeCodeBys != null">
- <foreach collection="typeCodeBys" item="code" open="and type_code_by in (" separator="," close=")">
- #{code,jdbcType=VARCHAR}
- </foreach>
- </if>
- </trim>
- GROUP BY
- brand_id,
- brand_name,
- start_time
- ORDER BY
- count DESC;
- </select>
- <select id="selectBrandCloseTimes" resultType="com.ruoyi.demo.entity.vo.OpcloseTimeVo">
- SELECT
- brand_id,
- brand_name,
- end_time time,
- COUNT(*) count
- FROM
- `bl_store_wd_opclose`
- <trim prefix="where" prefixOverrides="and">
- <if test="brandIds != null">
- <foreach collection="brandIds" item="id" open="and brand_id in (" separator="," close=")">
- #{id,jdbcType=VARCHAR}
- </foreach>
- </if>
- <if test="addrCodes != null">
- <foreach collection="addrCodes" item="code" open="and addr_code in (" separator="," close=")">
- #{code,jdbcType=VARCHAR}
- </foreach>
- </if>
- <if test="typeCodeBys != null">
- <foreach collection="typeCodeBys" item="code" open="and type_code_by in (" separator="," close=")">
- #{code,jdbcType=VARCHAR}
- </foreach>
- </if>
- </trim>
- GROUP BY
- brand_id,
- brand_name,
- end_time
- ORDER BY
- count DESC;
- </select>
- </mapper>
|