|
@@ -2,4 +2,93 @@
|
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
|
<!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">
|
|
<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 delete_flag = '0'
|
|
|
|
+ <if test="commonId != null and commonId != ''">
|
|
|
|
+ AND common_id = #{commonId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
|
+ AND (lower(send_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(send_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(send_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(unload_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(unload_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(unload_city) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND status!='已下架'
|
|
|
|
+ </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 delete_flag = '0'
|
|
|
|
+ <if test="commonId != null and commonId != ''">
|
|
|
|
+ AND common_id = #{commonId}
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchKeyWord != null and searchKeyWord != ''">
|
|
|
|
+ AND (lower(send_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(send_city) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(send_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(unload_private) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(unload_area) like lower(CONCAT('%',#{searchKeyWord},'%'))
|
|
|
|
+ OR lower(unload_city) like lower(CONCAT('%',#{searchKeyWord},'%')))
|
|
|
|
+ </if>
|
|
|
|
+ <if test="searchType != null and searchType != ''">
|
|
|
|
+ <if test="searchType == 1">
|
|
|
|
+ AND status!='已下架'
|
|
|
|
+ </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>
|
|
</mapper>
|