123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144145146147148149150151152153154155156157158159160161162163164165166167168169170171172173174175176177178179 |
- <?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.yh.saas.plugin.yiliangyiyun.mapper.HyReleaseGoodsInfoMapper">
- <select id="getCountByCondition" parameterType="Map" resultType="java.lang.Integer">
- SELECT
- COUNT(id)
- FROM hy_release_goods_info
- WHERE 1=1
- <if test="commonId != null and commonId != ''">
- AND common_id = #{commonId}
- </if>
- <if test="loadingPlaceCity != null and loadingPlaceCity != ''">
- AND (lower(send_city) like lower(CONCAT('%',#{loadingPlaceCity},'%')))
- </if>
- <if test="unLoadingPlaceCity != null and unLoadingPlaceCity != ''">
- AND (lower(unload_city) like lower(CONCAT('%',#{unLoadingPlaceCity},'%')))
- </if>
- <if test="loadingPlace != null and loadingPlace != ''">
- AND send_area in (${loadingPlace})
- </if>
- <if test="unLoadingPlace != null and unLoadingPlace != ''">
- AND unload_area in (${unLoadingPlace})
- </if>
- <if test="searchType != null and searchType != ''">
- <if test="searchType == 1">
- AND status!='已下架' and delete_flag = '0'
- </if>
- <if test="searchType == 2">
- AND delete_flag = '0'
- </if>
- <if test="searchType == 3">
- AND often_flag = '1'
- </if>
- </if>
- </select>
- <select id="getListByCondition" parameterType="Map" resultType="com.yh.saas.plugin.yiliangyiyun.entity.HyReleaseGoodsInfo">
- SELECT
- id,
- common_id as commonId,
- send_private as sendPrivate,
- send_city as sendCity,
- send_area as sendArea,
- send_detailed_address as sendDetailedAddress,
- send_longitude as sendLongitude,
- send_latitude as sendLatitude,
- unsend_longitude as unsendLongitude,
- unsend_latitude as unsendLatitude,
- unload_private as unloadPrivate,
- unload_city as unloadCity,
- unload_area as unloadArea,
- unload_detailed_address as unloadDetailedAddress,
- cargo_distance as cargoDistance,
- goods_name as goodsName,
- package_type as packageType,
- measuring_method as measuringMethod,
- weight,
- volume,
- expected_num as expectedNum,
- billing_method as billingMethod,
- freight_price as freightPrice,
- contacts,
- contacts_phone as contactsPhone,
- freight_station_name as freightStationName,
- period_of_time as periodOfTime,
- loading_date as loadingDate,
- car_length as carLength,
- remark,
- station_fee as stationFee,
- often_flag as oftenFlag,
- car_model as carModel,
- status,
- create_date as createDate,
- update_date as updateDate
- FROM hy_release_goods_info
- WHERE 1=1
- <if test="commonId != null and commonId != ''">
- AND common_id = #{commonId}
- </if>
- <if test="loadingPlaceCity != null and loadingPlaceCity != ''">
- AND (lower(send_city) like lower(CONCAT('%',#{loadingPlaceCity},'%')))
- </if>
- <if test="unLoadingPlaceCity != null and unLoadingPlaceCity != ''">
- AND (lower(unload_city) like lower(CONCAT('%',#{unLoadingPlaceCity},'%')))
- </if>
- <if test="loadingPlace != null and loadingPlace != ''">
- AND send_area in (${loadingPlace})
- </if>
- <if test="unLoadingPlace != null and unLoadingPlace != ''">
- AND unload_area in (${unLoadingPlace})
- </if>
- <if test="searchType != null and searchType != ''">
- <if test="searchType == 1">
- AND status!='已下架' and delete_flag = '0'
- </if>
- <if test="searchType == 2">
- AND delete_flag = '0'
- </if>
- <if test="searchType == 3">
- AND often_flag = '1'
- </if>
- </if>
- ORDER BY update_date DESC
- <if test="currentPage != null and currentPage != ''">
- LIMIT ${startRecord}, ${pageSize}
- </if>
- </select>
- <select id="getAllListsByCondition" parameterType="Map" resultType="com.yh.saas.plugin.yiliangyiyun.entity.HyReleaseGoodsInfo">
- SELECT
- id,
- common_id as commonId,
- send_private as sendPrivate,
- send_city as sendCity,
- send_area as sendArea,
- send_detailed_address as sendDetailedAddress,
- send_longitude as sendLongitude,
- send_latitude as sendLatitude,
- unsend_longitude as unsendLongitude,
- unsend_latitude as unsendLatitude,
- unload_private as unloadPrivate,
- unload_city as unloadCity,
- unload_area as unloadArea,
- unload_detailed_address as unloadDetailedAddress,
- cargo_distance as cargoDistance,
- goods_name as goodsName,
- package_type as packageType,
- measuring_method as measuringMethod,
- weight,
- volume,
- expected_num as expectedNum,
- billing_method as billingMethod,
- freight_price as freightPrice,
- contacts,
- contacts_phone as contactsPhone,
- freight_station_name as freightStationName,
- period_of_time as periodOfTime,
- loading_date as loadingDate,
- car_length as carLength,
- remark,
- station_fee as stationFee,
- often_flag as oftenFlag,
- car_model as carModel,
- status,
- create_date as createDate,
- update_date as updateDate
- FROM hy_release_goods_info
- WHERE 1=1
- <if test="commonId != null and commonId != ''">
- AND common_id = #{commonId}
- </if>
- <if test="loadingPlaceCity != null and loadingPlaceCity != '' and loadingPlace == null and loadingPlace == ''">
- AND (lower(send_city) not like lower(CONCAT('%',#{loadingPlaceCity},'%')))
- </if>
- <if test="unLoadingPlaceCity != null and unLoadingPlaceCity != '' and unLoadingPlace == null and unLoadingPlace == ''">
- AND (lower(unload_city) not like lower(CONCAT('%',#{unLoadingPlaceCity},'%')))
- </if>
- <if test="loadingPlace != null and loadingPlace != ''">
- AND send_area not in (${loadingPlace})
- </if>
- <if test="unLoadingPlace != null and unLoadingPlace != ''">
- AND unload_area not in (${unLoadingPlace})
- </if>
- <if test="searchType != null and searchType != ''">
- <if test="searchType == 1">
- AND status!='已下架' and delete_flag = '0'
- </if>
- <if test="searchType == 2">
- AND delete_flag = '0'
- </if>
- <if test="searchType == 3">
- AND often_flag = '1'
- </if>
- </if>
- ORDER BY update_date DESC
- <if test="currentPage != null and currentPage != ''">
- LIMIT ${startRecord}, ${pageSize}
- </if>
- </select>
- </mapper>
|