| | |
| | | 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 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 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 like CONCAT('%', #{param.shopAreaCode}, '%') |
| | | </if> |
| | | <if test="param.signStartTime!=null and param.signStartTime!=''"> |
| | | AND Date(ts.sign_time) >= #{param.signStartTime} |
| | |
| | | AND Date(ts.sign_time) <= #{param.signEndTime} |
| | | </if> |
| | | <if test="param.signProvinceCode!=null and param.signProvinceCode!=''"> |
| | | AND ts.sign_province_code = #{param.signProvinceCode} |
| | | AND ts.sign_province_code like CONCAT('%', #{param.signProvinceCode}, '%') |
| | | </if> |
| | | <if test="param.signCityCode!=null and param.signCityCode!=''"> |
| | | AND ts.sign_city_code = #{param.signCityCode} |
| | | AND ts.sign_city_code like CONCAT('%', #{param.signCityCode}, '%') |
| | | </if> |
| | | <if test="param.signAreaCode!=null and param.signAreaCode!=''"> |
| | | AND ts.sign_area_code = #{param.signAreaCode} |
| | | AND ts.sign_area_code like CONCAT('%', #{param.signAreaCode}, '%') |
| | | </if> |
| | | <if test="param.shopStatus!=null and param.shopStatus==0"> |
| | | AND ts.frozen_flag = 1 |
| | |
| | | AND ts.shop_name LIKE CONCAT('%',#{param.shopName},'%') |
| | | </if> |
| | | <if test="param.shopProvinceCode!=null and 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}) |
| | | ) |
| | | AND ts.shop_province_code LIKE CONCAT('%', #{param.shopProvinceCode}, '%') |
| | | </if> |
| | | <if test="param.shopCityCode!=null and 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}) |
| | | ) |
| | | AND ts.shop_city_code LIKE CONCAT('%', #{param.shopCityCode}, '%') |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and 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}) |
| | | ) |
| | | AND 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} |
| | | 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}) |
| | | ) |
| | | AND ts.shop_province_code LIKE CONCAT('%', #{param.shopProvinceCode}, '%') |
| | | </if> |
| | | <if test="param.shopCityCode!=null and 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}) |
| | | ) |
| | | AND ts.shop_city_code LIKE CONCAT('%', #{param.shopCityCode}, '%') |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and 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}) |
| | | ) |
| | | AND 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} |
| | | 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}) |
| | | ) |
| | | AND ts.shop_province_code LIKE CONCAT('%', #{param.shopProvinceCode}, '%') |
| | | </if> |
| | | <if test="param.shopCityCode!=null and 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}) |
| | | ) |
| | | AND ts.shop_city_code LIKE CONCAT('%', #{param.shopCityCode}, '%') |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and 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}) |
| | | ) |
| | | AND 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} |
| | | 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}) |
| | | ) |
| | | AND ts.shop_province_code LIKE CONCAT('%', #{param.shopProvinceCode}, '%') |
| | | </if> |
| | | <if test="param.shopCityCode!=null and 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}) |
| | | ) |
| | | AND ts.shop_city_code LIKE CONCAT('%', #{param.shopCityCode}, '%') |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and 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}) |
| | | ) |
| | | AND 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} |
| | | 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}) |
| | | ) |
| | | AND ts.shop_province_code LIKE CONCAT('%', #{param.shopProvinceCode}, '%') |
| | | </if> |
| | | <if test="param.shopCityCode!=null and 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}) |
| | | ) |
| | | AND ts.shop_city_code LIKE CONCAT('%', #{param.shopCityCode}, '%') |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and 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}) |
| | | ) |
| | | AND 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} |
| | | 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}) |
| | | ) |
| | | AND ts.shop_province_code LIKE CONCAT('%', #{param.shopProvinceCode}, '%') |
| | | </if> |
| | | <if test="param.shopCityCode!=null and 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}) |
| | | ) |
| | | AND ts.shop_city_code LIKE CONCAT('%', #{param.shopCityCode}, '%') |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and 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}) |
| | | ) |
| | | AND 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} |
| | | 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}) |
| | | ) |
| | | AND ts.shop_province_code LIKE CONCAT('%', #{param.shopProvinceCode}, '%') |
| | | </if> |
| | | <if test="param.shopCityCode!=null and 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}) |
| | | ) |
| | | AND ts.shop_city_code LIKE CONCAT('%', #{param.shopCityCode}, '%') |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and 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}) |
| | | ) |
| | | AND 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} |
| | | 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}) |
| | | ) |
| | | AND ts.shop_province_code LIKE CONCAT('%', #{param.shopProvinceCode}, '%') |
| | | </if> |
| | | <if test="param.shopCityCode!=null and 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}) |
| | | ) |
| | | AND ts.shop_city_code LIKE CONCAT('%', #{param.shopCityCode}, '%') |
| | | </if> |
| | | <if test="param.shopAreaCode!=null and 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}) |
| | | ) |
| | | AND ts.shop_area_code LIKE CONCAT('%', #{param.shopAreaCode}, '%') |
| | | </if> |
| | | <if test="param.startDate!=null and param.startDate!=''"> |
| | | AND Date(ts.create_time) >= #{param.startDate} |
| | |
| | | AND Date(ts.sign_time) <= #{param.signEndTime} |
| | | </if> |
| | | <if test="param.signProvinceCode!=null and param.signProvinceCode!=''"> |
| | | AND ts.sign_province_code = REGEXP CONCAT('(^|;)' ,#{param.signProvinceCode}, '(;|$)') |
| | | AND ts.sign_province_code LIKE CONCAT('%' ,#{param.signProvinceCode}, '%') |
| | | </if> |
| | | <if test="param.signCityCode!=null and param.signCityCode!=''"> |
| | | AND ts.sign_city_code = REGEXP CONCAT('(^|;)' ,#{param.signCityCode}, '(;|$)') |
| | | AND ts.sign_city_code LIKE CONCAT('%' ,#{param.signCityCode}, '%') |
| | | </if> |
| | | <if test="param.signAreaCode!=null and param.signAreaCode!=''"> |
| | | AND ts.sign_area_code = REGEXP CONCAT('(^|;)' ,#{param.signAreaCode}, '(;|$)') |
| | | AND ts.sign_area_code LIKE CONCAT('%' ,#{param.signAreaCode}, '%') |
| | | </if> |
| | | <if test="param.recommendPerson!=null and param.recommendPerson!=''"> |
| | | AND ts.recommend_person = #{param.recommendPerson} |
| | |
| | | <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}) |
| | | ts.shop_city_code LIKE CONCAT('%', #{code}, '%') |
| | | </foreach> |
| | | ) |
| | | </if> |
| | |
| | | <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}) |
| | | ts.shop_city_code LIKE CONCAT('%', #{code}, '%') |
| | | </foreach> |
| | | ) |
| | | </if> |
| | |
| | | <if test="list != null and list.size() > 0"> |
| | | AND ( |
| | | <foreach collection="list" item="code" separator=" OR "> |
| | | sign_area_code = #{code} |
| | | OR sign_area_code LIKE CONCAT(#{code}, ';%') |
| | | OR sign_area_code LIKE CONCAT('%;', #{code}, ';%') |
| | | OR sign_area_code LIKE CONCAT('%;', #{code}) |
| | | sign_area_code LIKE CONCAT('%', #{code}, '%') |
| | | </foreach> |
| | | ) |
| | | </if> |