| | |
| | | AND ts.shop_type = #{param.shopType} |
| | | </if> |
| | | <if test="param.shopProvinceCode!=null and param.shopProvinceCode!=''"> |
| | | AND ts.shop_province_code = #{param.shopProvinceCode} |
| | | AND ( |
| | | ts.shop_province_code = #{param.shopProvinceCode} |
| | | OR ts.shop_province_code LIKE CONCAT(#{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopCityCode!=null and param.shopCityCode!=''"> |
| | | AND ts.shop_city_code = #{param.shopCityCode} |
| | | AND ( |
| | | ts.shop_city_code = #{param.shopCityCode} |
| | | OR ts.shop_city_code LIKE CONCAT(#{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and param.shopAreaCode!=''"> |
| | | AND ts.shop_area_code = #{param.shopAreaCode} |
| | | AND ( |
| | | ts.shop_area_code = #{param.shopAreaCode} |
| | | OR ts.shop_area_code LIKE CONCAT(#{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.signStartTime!=null and param.signStartTime!=''"> |
| | | AND Date(ts.sign_time) >= #{param.signStartTime} |
| | |
| | | AND ts.shop_name LIKE CONCAT('%',#{param.shopName},'%') |
| | | </if> |
| | | <if test="param.shopProvinceCode!=null and param.shopProvinceCode!=''"> |
| | | AND ts.shop_province_code = #{param.shopProvinceCode} |
| | | AND ( |
| | | ts.shop_province_code = #{param.shopProvinceCode} |
| | | OR ts.shop_province_code LIKE CONCAT(#{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopCityCode!=null and param.shopCityCode!=''"> |
| | | AND ts.shop_city_code = #{param.shopCityCode} |
| | | AND ( |
| | | ts.shop_city_code = #{param.shopCityCode} |
| | | OR ts.shop_city_code LIKE CONCAT(#{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and param.shopAreaCode!=''"> |
| | | AND ts.shop_area_code = #{param.shopAreaCode} |
| | | AND ( |
| | | ts.shop_area_code = #{param.shopAreaCode} |
| | | OR ts.shop_area_code LIKE CONCAT(#{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.belongUserId!=null and param.belongUserId!=''"> |
| | | AND ts.belong_user_id = #{param.belongUserId} |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.shopProvinceCode!=null and param.shopProvinceCode!=''"> |
| | | AND ts.shop_province_code = #{param.shopProvinceCode} |
| | | AND ( |
| | | ts.shop_province_code = #{param.shopProvinceCode} |
| | | OR ts.shop_province_code LIKE CONCAT(#{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopCityCode!=null and param.shopCityCode!=''"> |
| | | AND ts.shop_city_code = #{param.shopCityCode} |
| | | AND ( |
| | | ts.shop_city_code = #{param.shopCityCode} |
| | | OR ts.shop_city_code LIKE CONCAT(#{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and param.shopAreaCode!=''"> |
| | | AND ts.shop_area_code = #{param.shopAreaCode} |
| | | AND ( |
| | | ts.shop_area_code = #{param.shopAreaCode} |
| | | OR ts.shop_area_code LIKE CONCAT(#{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND Date(ts.create_time) >= #{param.startDate} |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.shopProvinceCode!=null and param.shopProvinceCode!=''"> |
| | | AND ts.shop_province_code = #{param.shopProvinceCode} |
| | | AND ( |
| | | ts.shop_province_code = #{param.shopProvinceCode} |
| | | OR ts.shop_province_code LIKE CONCAT(#{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopCityCode!=null and param.shopCityCode!=''"> |
| | | AND ts.shop_city_code = #{param.shopCityCode} |
| | | AND ( |
| | | ts.shop_city_code = #{param.shopCityCode} |
| | | OR ts.shop_city_code LIKE CONCAT(#{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and param.shopAreaCode!=''"> |
| | | AND ts.shop_area_code = #{param.shopAreaCode} |
| | | AND ( |
| | | ts.shop_area_code = #{param.shopAreaCode} |
| | | OR ts.shop_area_code LIKE CONCAT(#{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}) |
| | | ) |
| | | </if> |
| | | </select> |
| | | |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.shopProvinceCode!=null and param.shopProvinceCode!=''"> |
| | | AND ts.shop_province_code = #{param.shopProvinceCode} |
| | | AND ( |
| | | ts.shop_province_code = #{param.shopProvinceCode} |
| | | OR ts.shop_province_code LIKE CONCAT(#{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopCityCode!=null and param.shopCityCode!=''"> |
| | | AND ts.shop_city_code = #{param.shopCityCode} |
| | | AND ( |
| | | ts.shop_city_code = #{param.shopCityCode} |
| | | OR ts.shop_city_code LIKE CONCAT(#{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and param.shopAreaCode!=''"> |
| | | AND ts.shop_area_code = #{param.shopAreaCode} |
| | | AND ( |
| | | ts.shop_area_code = #{param.shopAreaCode} |
| | | OR ts.shop_area_code LIKE CONCAT(#{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND Date(ts.create_time) >= #{param.startDate} |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.shopProvinceCode!=null and param.shopProvinceCode!=''"> |
| | | AND ts.shop_province_code = #{param.shopProvinceCode} |
| | | AND ( |
| | | ts.shop_province_code = #{param.shopProvinceCode} |
| | | OR ts.shop_province_code LIKE CONCAT(#{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopCityCode!=null and param.shopCityCode!=''"> |
| | | AND ts.shop_city_code = #{param.shopCityCode} |
| | | AND ( |
| | | ts.shop_city_code = #{param.shopCityCode} |
| | | OR ts.shop_city_code LIKE CONCAT(#{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and param.shopAreaCode!=''"> |
| | | AND ts.shop_area_code = #{param.shopAreaCode} |
| | | AND ( |
| | | ts.shop_area_code = #{param.shopAreaCode} |
| | | OR ts.shop_area_code LIKE CONCAT(#{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND Date(ts.create_time) >= #{param.startDate} |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.shopProvinceCode!=null and param.shopProvinceCode!=''"> |
| | | AND ts.shop_province_code = #{param.shopProvinceCode} |
| | | AND ( |
| | | ts.shop_province_code = #{param.shopProvinceCode} |
| | | OR ts.shop_province_code LIKE CONCAT(#{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopCityCode!=null and param.shopCityCode!=''"> |
| | | AND ts.shop_city_code = #{param.shopCityCode} |
| | | AND ( |
| | | ts.shop_city_code = #{param.shopCityCode} |
| | | OR ts.shop_city_code LIKE CONCAT(#{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and param.shopAreaCode!=''"> |
| | | AND ts.shop_area_code = #{param.shopAreaCode} |
| | | AND ( |
| | | ts.shop_area_code = #{param.shopAreaCode} |
| | | OR ts.shop_area_code LIKE CONCAT(#{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND Date(ts.create_time) >= #{param.startDate} |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.shopProvinceCode!=null and param.shopProvinceCode!=''"> |
| | | AND ts.shop_province_code = #{param.shopProvinceCode} |
| | | AND ( |
| | | ts.shop_province_code = #{param.shopProvinceCode} |
| | | OR ts.shop_province_code LIKE CONCAT(#{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopCityCode!=null and param.shopCityCode!=''"> |
| | | AND ts.shop_city_code = #{param.shopCityCode} |
| | | AND ( |
| | | ts.shop_city_code = #{param.shopCityCode} |
| | | OR ts.shop_city_code LIKE CONCAT(#{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and param.shopAreaCode!=''"> |
| | | AND ts.shop_area_code = #{param.shopAreaCode} |
| | | AND ( |
| | | ts.shop_area_code = #{param.shopAreaCode} |
| | | OR ts.shop_area_code LIKE CONCAT(#{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND Date(ts.create_time) >= #{param.startDate} |
| | |
| | | </foreach> |
| | | </if> |
| | | <if test="param.shopProvinceCode!=null and param.shopProvinceCode!=''"> |
| | | AND ts.shop_province_code = #{param.shopProvinceCode} |
| | | AND ( |
| | | ts.shop_province_code = #{param.shopProvinceCode} |
| | | OR ts.shop_province_code LIKE CONCAT(#{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}, ';%') |
| | | OR ts.shop_province_code LIKE CONCAT('%;', #{param.shopProvinceCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopCityCode!=null and param.shopCityCode!=''"> |
| | | AND ts.shop_city_code = #{param.shopCityCode} |
| | | AND ( |
| | | ts.shop_city_code = #{param.shopCityCode} |
| | | OR ts.shop_city_code LIKE CONCAT(#{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{param.shopCityCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and param.shopAreaCode!=''"> |
| | | AND ts.shop_area_code = #{param.shopAreaCode} |
| | | AND ( |
| | | ts.shop_area_code = #{param.shopAreaCode} |
| | | OR ts.shop_area_code LIKE CONCAT(#{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}, ';%') |
| | | OR ts.shop_area_code LIKE CONCAT('%;', #{param.shopAreaCode}) |
| | | ) |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND Date(ts.create_time) >= #{param.startDate} |
| | |
| | | SELECT shop_id |
| | | FROM t_shop |
| | | WHERE del_flag = 0 |
| | | AND shop_city_code IN |
| | | <foreach item="id" collection="cityCodes" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | <if test="cityCodes != null and cityCodes.size() > 0"> |
| | | AND ( |
| | | <foreach item="code" collection="cityCodes" separator=" OR "> |
| | | ts.shop_city_code = #{code} |
| | | OR ts.shop_city_code LIKE CONCAT(#{code}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{code}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{code}) |
| | | </foreach> |
| | | ) |
| | | </if> |
| | | </select> |
| | | |
| | | |
| | |
| | | <select id="listShopByCityCode" resultMap="ShopResult"> |
| | | <include refid="selectShopVo"/> |
| | | WHERE del_flag = 0 and shop_status = 1 |
| | | AND shop_city_code IN |
| | | <foreach item="id" collection="cityCodes" open="(" separator="," close=")"> |
| | | #{id} |
| | | </foreach> |
| | | <if test="cityCodes != null and cityCodes.size() > 0"> |
| | | AND ( |
| | | <foreach item="code" collection="cityCodes" separator=" OR "> |
| | | ts.shop_city_code = #{code} |
| | | OR ts.shop_city_code LIKE CONCAT(#{code}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{code}, ';%') |
| | | OR ts.shop_city_code LIKE CONCAT('%;', #{code}) |
| | | </foreach> |
| | | ) |
| | | </if> |
| | | </select> |
| | | |
| | | |