mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-04-22 12:05:05 +08:00
update 查询站点列表接口
This commit is contained in:
@@ -309,64 +309,61 @@
|
||||
where id = #{id}
|
||||
</update>
|
||||
|
||||
<delete id="deletePileStationInfoByIds" parameterType="String">
|
||||
delete from pile_station_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="queryStationInfos" parameterType="com.jsowell.pile.dto.QueryStationDTO" resultType="com.jsowell.pile.vo.web.PileStationVO">
|
||||
SELECT
|
||||
t1.id as id,
|
||||
t1.dept_id as deptId,
|
||||
t1.parking_id as parkingId,
|
||||
t1.station_name as stationName,
|
||||
count(t2.id) as pileNum,
|
||||
t1.area_code as areaCode,
|
||||
t1.address as address,
|
||||
t1.qrcode_prefix as qrcodePrefix,
|
||||
t1.station_type as stationType,
|
||||
t1.station_status as stationStatus,
|
||||
t1.create_time as createTime,
|
||||
t1.pictures as pictures,
|
||||
t1.park_fee_describe as parkFeeDescribe,
|
||||
t2.merchant_id as merchantId,
|
||||
t3.merchant_name as merchantName,
|
||||
t1.station_admin_name as stationAdminName,
|
||||
t3.manager_name as merchantAdminName,
|
||||
t3.manager_phone as managerPhone,
|
||||
t1.station_tel as stationTel,
|
||||
t1.match_cars as matchCars,
|
||||
t1.station_lng as stationLng,
|
||||
t1.station_lat as stationLat,
|
||||
t1.construction,
|
||||
t1.business_hours as businessHours,
|
||||
t3.organization_code as organizationCode,
|
||||
t1.public_flag as publicFlag,
|
||||
t1.amap_flag as aMapFlag,
|
||||
t1.open_flag as openFlag
|
||||
t1.id as id,
|
||||
t1.dept_id as deptId,
|
||||
t1.parking_id as parkingId,
|
||||
t1.station_name as stationName,
|
||||
count(t2.id) as pileNum,
|
||||
t1.area_code as areaCode,
|
||||
t1.address as address,
|
||||
t1.qrcode_prefix as qrcodePrefix,
|
||||
t1.station_type as stationType,
|
||||
t1.station_status as stationStatus,
|
||||
t1.create_time as createTime,
|
||||
t1.pictures as pictures,
|
||||
t1.park_fee_describe as parkFeeDescribe,
|
||||
t2.merchant_id as merchantId,
|
||||
t3.merchant_name as merchantName,
|
||||
t1.station_admin_name as stationAdminName,
|
||||
t3.manager_name as merchantAdminName,
|
||||
t3.manager_phone as managerPhone,
|
||||
t1.station_tel as stationTel,
|
||||
t1.match_cars as matchCars,
|
||||
t1.station_lng as stationLng,
|
||||
t1.station_lat as stationLat,
|
||||
<if test="stationDTO.stationLng != null and stationDTO.stationLng != ''">
|
||||
st_distance_sphere (POINT (#{stationDTO.stationLng} , #{stationDTO.stationLat}),POINT ( t1.station_lng, t1.station_lat )) distance,
|
||||
IF(t1.station_lng IS NULL OR t1.station_lat IS NULL, 1, 0) AS is_missing,
|
||||
</if>
|
||||
t1.construction,
|
||||
t1.business_hours as businessHours,
|
||||
t3.organization_code as organizationCode,
|
||||
t1.public_flag as publicFlag,
|
||||
t1.amap_flag as aMapFlag,
|
||||
t1.open_flag as openFlag
|
||||
FROM
|
||||
pile_station_info t1
|
||||
pile_station_info t1
|
||||
left JOIN pile_basic_info t2 ON t1.id = t2.station_id and t2.del_flag = '0'
|
||||
left JOIN pile_merchant_info t3 ON t3.id = t1.merchant_id and t3.del_flag = '0'
|
||||
where
|
||||
t1.del_flag = '0'
|
||||
<if test="stationDTO.stationName != null and stationDTO.stationName != ''">
|
||||
and t1.station_name LIKE '%${stationDTO.stationName}%'
|
||||
</if>
|
||||
<if test="stationDTO.stationAddress != null and stationDTO.stationAddress != ''">
|
||||
and t1.address LIKE '%${stationDTO.stationAddress}%'
|
||||
</if>
|
||||
<if test="stationDTO.areaCode != null and stationDTO.areaCode != ''">
|
||||
and t1.area_code LIKE '%${stationDTO.areaCode}%'
|
||||
</if>
|
||||
<if test="stationDTO.publicFlag != null and stationDTO.publicFlag != ''">
|
||||
and t1.public_flag = #{stationDTO.publicFlag,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="stationDTO.merchantId != null and stationDTO.merchantId != ''">
|
||||
and t1.merchant_id = #{stationDTO.merchantId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
t1.del_flag = '0'
|
||||
<if test="stationDTO.stationName != null and stationDTO.stationName != ''">
|
||||
and t1.station_name LIKE '%${stationDTO.stationName}%'
|
||||
</if>
|
||||
<if test="stationDTO.stationAddress != null and stationDTO.stationAddress != ''">
|
||||
and t1.address LIKE '%${stationDTO.stationAddress}%'
|
||||
</if>
|
||||
<if test="stationDTO.areaCode != null and stationDTO.areaCode != ''">
|
||||
and t1.area_code LIKE '%${stationDTO.areaCode}%'
|
||||
</if>
|
||||
<if test="stationDTO.publicFlag != null and stationDTO.publicFlag != ''">
|
||||
and t1.public_flag = #{stationDTO.publicFlag,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="stationDTO.merchantId != null and stationDTO.merchantId != ''">
|
||||
and t1.merchant_id = #{stationDTO.merchantId,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<if test="stationDTO.stationAdminName != null and stationDTO.stationAdminName != ''">
|
||||
and t1.station_admin_name = #{stationDTO.stationAdminName,jdbcType=VARCHAR}
|
||||
</if>
|
||||
@@ -376,41 +373,53 @@
|
||||
<if test="stationDTO.stationTel != null and stationDTO.stationTel != ''">
|
||||
and t1.station_tel = #{stationDTO.stationTel,jdbcType=VARCHAR}
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
<if test="stationDTO.merchantDeptIds != null and stationDTO.merchantDeptIds.size() != 0">
|
||||
and t3.dept_id in
|
||||
<foreach collection="stationDTO.merchantDeptIds" item="merchantDeptId" open="(" separator="," close=")">
|
||||
#{merchantDeptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="stationDTO.stationDeptIds != null and stationDTO.stationDeptIds.size() != 0">
|
||||
and t1.dept_id in
|
||||
<foreach collection="stationDTO.stationDeptIds" item="stationDeptId" open="(" separator="," close=")">
|
||||
#{stationDeptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<!-- 数据范围过滤 -->
|
||||
<if test="stationDTO.merchantDeptIds != null and stationDTO.merchantDeptIds.size() != 0">
|
||||
and t3.dept_id in
|
||||
<foreach collection="stationDTO.merchantDeptIds" item="merchantDeptId" open="(" separator="," close=")">
|
||||
#{merchantDeptId}
|
||||
</foreach>
|
||||
</if>
|
||||
<if test="stationDTO.stationDeptIds != null and stationDTO.stationDeptIds.size() != 0">
|
||||
and t1.dept_id in
|
||||
<foreach collection="stationDTO.stationDeptIds" item="stationDeptId" open="(" separator="," close=")">
|
||||
#{stationDeptId}
|
||||
</foreach>
|
||||
</if>
|
||||
GROUP BY
|
||||
t1.id,
|
||||
t1.station_name,
|
||||
t1.area_code,
|
||||
t1.address,
|
||||
t1.station_type,
|
||||
t1.station_status,
|
||||
t1.create_time,
|
||||
t1.pictures,
|
||||
t2.merchant_id,
|
||||
t3.merchant_name,
|
||||
t3.manager_name,
|
||||
t1.station_tel,
|
||||
t1.match_cars,
|
||||
t1.station_lng,
|
||||
t1.station_lat,
|
||||
t1.construction,
|
||||
t1.business_hours,
|
||||
t3.organization_code,
|
||||
t1.public_flag,
|
||||
t1.open_flag
|
||||
</select>
|
||||
t1.id,
|
||||
t1.station_name,
|
||||
t1.area_code,
|
||||
t1.address,
|
||||
t1.station_type,
|
||||
t1.station_status,
|
||||
t1.create_time,
|
||||
t1.pictures,
|
||||
t2.merchant_id,
|
||||
t3.merchant_name,
|
||||
t3.manager_name,
|
||||
t1.station_tel,
|
||||
t1.match_cars,
|
||||
t1.station_lng,
|
||||
t1.station_lat,
|
||||
t1.construction,
|
||||
t1.business_hours,
|
||||
t3.organization_code,
|
||||
t1.public_flag,
|
||||
t1.open_flag
|
||||
<if test="stationDTO.stationLng != null and stationDTO.stationLng != ''">
|
||||
ORDER BY
|
||||
is_missing ASC,
|
||||
distance ASC
|
||||
</if>
|
||||
</select>`
|
||||
|
||||
<delete id="deletePileStationInfoByIds" parameterType="String">
|
||||
delete from pile_station_info where id in
|
||||
<foreach item="id" collection="array" open="(" separator="," close=")">
|
||||
#{id}
|
||||
</foreach>
|
||||
</delete>
|
||||
|
||||
<select id="selectStationListByMerchantId" resultMap="PileStationInfoResult">
|
||||
<include refid="selectPileStationInfoVo"/>
|
||||
|
||||
Reference in New Issue
Block a user