mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-05 02:20:12 +08:00
新增 绑定停车平台接口
This commit is contained in:
@@ -1,5 +1,6 @@
|
|||||||
package com.jsowell.web.controller.pile;
|
package com.jsowell.web.controller.pile;
|
||||||
|
|
||||||
|
import com.alibaba.fastjson2.JSON;
|
||||||
import com.alibaba.fastjson2.JSONObject;
|
import com.alibaba.fastjson2.JSONObject;
|
||||||
import com.jsowell.common.annotation.Log;
|
import com.jsowell.common.annotation.Log;
|
||||||
import com.jsowell.common.core.controller.BaseController;
|
import com.jsowell.common.core.controller.BaseController;
|
||||||
@@ -19,7 +20,9 @@ import com.jsowell.pile.dto.FastCreateStationDTO;
|
|||||||
import com.jsowell.pile.dto.LianLianPushStationInfoDTO;
|
import com.jsowell.pile.dto.LianLianPushStationInfoDTO;
|
||||||
import com.jsowell.pile.dto.QueryStationDTO;
|
import com.jsowell.pile.dto.QueryStationDTO;
|
||||||
import com.jsowell.pile.dto.amap.EditAmapFlagDTO;
|
import com.jsowell.pile.dto.amap.EditAmapFlagDTO;
|
||||||
|
import com.jsowell.pile.dto.lutongyunting.BindParkingPlatformDTO;
|
||||||
import com.jsowell.pile.service.IPileStationInfoService;
|
import com.jsowell.pile.service.IPileStationInfoService;
|
||||||
|
import com.jsowell.pile.service.IThirdPartyParkingConfigService;
|
||||||
import com.jsowell.pile.service.IThirdPartyStationRelationService;
|
import com.jsowell.pile.service.IThirdPartyStationRelationService;
|
||||||
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
import com.jsowell.pile.service.IThirdPartySettingInfoService;
|
||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
@@ -56,6 +59,9 @@ public class PileStationInfoController extends BaseController {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IThirdPartyStationRelationService thirdPartyStationRelationService;
|
private IThirdPartyStationRelationService thirdPartyStationRelationService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IThirdPartyParkingConfigService parkingConfigService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 查询充电站信息列表NEW
|
* 查询充电站信息列表NEW
|
||||||
@@ -280,4 +286,43 @@ public class PileStationInfoController extends BaseController {
|
|||||||
return response;
|
return response;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定停车平台(停车充电下发优惠券)
|
||||||
|
* @param dto
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@PostMapping("/bindParkingPlatform")
|
||||||
|
public RestApiResponse<?> bindParkingPlatform(BindParkingPlatformDTO dto) {
|
||||||
|
logger.info("绑定停车平台 params:{}", JSON.toJSONString(dto));
|
||||||
|
RestApiResponse<?> response = null;
|
||||||
|
try {
|
||||||
|
pileStationInfoService.bindParkingPlatform(dto);
|
||||||
|
}catch (BusinessException e) {
|
||||||
|
logger.error("绑定停车平台 error,", e);
|
||||||
|
response = new RestApiResponse<>(e.getCode(), e.getMessage());
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("绑定停车平台 error", e);
|
||||||
|
response = new RestApiResponse<>(e);
|
||||||
|
}
|
||||||
|
logger.info("绑定停车平台 result:{}", response);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 获取停车平台列表
|
||||||
|
* @return
|
||||||
|
*/
|
||||||
|
@GetMapping("/getParkingInfoList")
|
||||||
|
public RestApiResponse<?> getParkingInfoList() {
|
||||||
|
logger.info("获取停车平台列表");
|
||||||
|
RestApiResponse<?> response = null;
|
||||||
|
try {
|
||||||
|
|
||||||
|
} catch (Exception e) {
|
||||||
|
logger.error("获取停车平台列表 error,", e);
|
||||||
|
response = new RestApiResponse<>(e);
|
||||||
|
}
|
||||||
|
logger.info("获取停车平台列表 result:{}", response);
|
||||||
|
return response;
|
||||||
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -118,6 +118,8 @@ public enum ReturnCodeEnum {
|
|||||||
|
|
||||||
CODE_QUERY_WECHAT_APP_ID_IS_NULL("00100056", "未查询到商户的微信小程序id"),
|
CODE_QUERY_WECHAT_APP_ID_IS_NULL("00100056", "未查询到商户的微信小程序id"),
|
||||||
|
|
||||||
|
CODE_QUERY_PARKING_INFO_IS_NULL("00100057", "未查到停车平台信息"),
|
||||||
|
|
||||||
/* 个人桩 start */
|
/* 个人桩 start */
|
||||||
|
|
||||||
CODE_PILE_HAS_BEEN_BINDING_ERROR("00400001", "此桩已被绑定,请联系管理员!"),
|
CODE_PILE_HAS_BEEN_BINDING_ERROR("00400001", "此桩已被绑定,请联系管理员!"),
|
||||||
|
|||||||
@@ -0,0 +1,16 @@
|
|||||||
|
package com.jsowell.pile.dto.lutongyunting;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定停车平台DTO
|
||||||
|
*
|
||||||
|
* @author Lemon
|
||||||
|
* @Date 2023/8/25 13:34
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class BindParkingPlatformDTO {
|
||||||
|
private String stationId;
|
||||||
|
|
||||||
|
private String parkingId;
|
||||||
|
}
|
||||||
@@ -88,4 +88,10 @@ public interface PileStationInfoMapper {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<String> getIdsByDeptId(String deptId);
|
List<String> getIdsByDeptId(String deptId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 修改绑定停车平台
|
||||||
|
* @param stationId
|
||||||
|
*/
|
||||||
|
int updateParkingPlatform(@Param("parkingId") String parkingId, @Param("stationId") String stationId);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -1,6 +1,8 @@
|
|||||||
package com.jsowell.pile.mapper;
|
package com.jsowell.pile.mapper;
|
||||||
|
|
||||||
|
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
||||||
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
||||||
|
import org.springframework.stereotype.Repository;
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* TODO
|
* TODO
|
||||||
@@ -8,6 +10,7 @@ import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
|||||||
* @Date 2023/8/24 16:50
|
* @Date 2023/8/24 16:50
|
||||||
* @author Lemon
|
* @author Lemon
|
||||||
*/
|
*/
|
||||||
|
@Repository
|
||||||
public interface ThirdpartyParkingConfigMapper {
|
public interface ThirdpartyParkingConfigMapper {
|
||||||
/**
|
/**
|
||||||
* delete by primary key
|
* delete by primary key
|
||||||
|
|||||||
@@ -4,6 +4,7 @@ import com.jsowell.common.core.page.PageResponse;
|
|||||||
import com.jsowell.pile.domain.PileStationInfo;
|
import com.jsowell.pile.domain.PileStationInfo;
|
||||||
import com.jsowell.pile.dto.FastCreateStationDTO;
|
import com.jsowell.pile.dto.FastCreateStationDTO;
|
||||||
import com.jsowell.pile.dto.QueryStationDTO;
|
import com.jsowell.pile.dto.QueryStationDTO;
|
||||||
|
import com.jsowell.pile.dto.lutongyunting.BindParkingPlatformDTO;
|
||||||
import com.jsowell.pile.vo.web.PileStationVO;
|
import com.jsowell.pile.vo.web.PileStationVO;
|
||||||
|
|
||||||
import java.util.List;
|
import java.util.List;
|
||||||
@@ -105,4 +106,10 @@ public interface IPileStationInfoService {
|
|||||||
* @return
|
* @return
|
||||||
*/
|
*/
|
||||||
List<String> getIdsByDeptId(String deptId);
|
List<String> getIdsByDeptId(String deptId);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定停车系统平台
|
||||||
|
* @param dto
|
||||||
|
*/
|
||||||
|
int bindParkingPlatform(BindParkingPlatformDTO dto);
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -0,0 +1,53 @@
|
|||||||
|
package com.jsowell.pile.service;
|
||||||
|
|
||||||
|
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 第三方停车平台Service
|
||||||
|
*
|
||||||
|
* @author Lemon
|
||||||
|
* @Date 2023/8/25 13:42
|
||||||
|
*/
|
||||||
|
public interface IThirdPartyParkingConfigService {
|
||||||
|
/**
|
||||||
|
* delete by primary key
|
||||||
|
* @param id primaryKey
|
||||||
|
* @return deleteCount
|
||||||
|
*/
|
||||||
|
int deleteByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* insert record to table
|
||||||
|
* @param record the record
|
||||||
|
* @return insert count
|
||||||
|
*/
|
||||||
|
int insert(ThirdpartyParkingConfig record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* insert record to table selective
|
||||||
|
* @param record the record
|
||||||
|
* @return insert count
|
||||||
|
*/
|
||||||
|
int insertSelective(ThirdpartyParkingConfig record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* select by primary key
|
||||||
|
* @param id primary key
|
||||||
|
* @return object by primary key
|
||||||
|
*/
|
||||||
|
ThirdpartyParkingConfig selectByPrimaryKey(Integer id);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update record selective
|
||||||
|
* @param record the updated record
|
||||||
|
* @return update count
|
||||||
|
*/
|
||||||
|
int updateByPrimaryKeySelective(ThirdpartyParkingConfig record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* update record
|
||||||
|
* @param record the updated record
|
||||||
|
* @return update count
|
||||||
|
*/
|
||||||
|
int updateByPrimaryKey(ThirdpartyParkingConfig record);
|
||||||
|
}
|
||||||
@@ -9,6 +9,8 @@ import com.jsowell.common.core.domain.entity.SysUser;
|
|||||||
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
import com.jsowell.common.core.domain.vo.AuthorizedDeptVO;
|
||||||
import com.jsowell.common.core.page.PageResponse;
|
import com.jsowell.common.core.page.PageResponse;
|
||||||
import com.jsowell.common.core.redis.RedisCache;
|
import com.jsowell.common.core.redis.RedisCache;
|
||||||
|
import com.jsowell.common.enums.ykc.ReturnCodeEnum;
|
||||||
|
import com.jsowell.common.exception.BusinessException;
|
||||||
import com.jsowell.common.util.DateUtils;
|
import com.jsowell.common.util.DateUtils;
|
||||||
import com.jsowell.common.util.DistanceUtils;
|
import com.jsowell.common.util.DistanceUtils;
|
||||||
import com.jsowell.common.util.SecurityUtils;
|
import com.jsowell.common.util.SecurityUtils;
|
||||||
@@ -16,8 +18,11 @@ import com.jsowell.common.util.StringUtils;
|
|||||||
import com.jsowell.common.util.ip.AddressUtils;
|
import com.jsowell.common.util.ip.AddressUtils;
|
||||||
import com.jsowell.pile.domain.PileBasicInfo;
|
import com.jsowell.pile.domain.PileBasicInfo;
|
||||||
import com.jsowell.pile.domain.PileStationInfo;
|
import com.jsowell.pile.domain.PileStationInfo;
|
||||||
|
import com.jsowell.pile.domain.ThirdPartyPlatformConfig;
|
||||||
|
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
||||||
import com.jsowell.pile.dto.FastCreateStationDTO;
|
import com.jsowell.pile.dto.FastCreateStationDTO;
|
||||||
import com.jsowell.pile.dto.QueryStationDTO;
|
import com.jsowell.pile.dto.QueryStationDTO;
|
||||||
|
import com.jsowell.pile.dto.lutongyunting.BindParkingPlatformDTO;
|
||||||
import com.jsowell.pile.mapper.PileStationInfoMapper;
|
import com.jsowell.pile.mapper.PileStationInfoMapper;
|
||||||
import com.jsowell.pile.service.*;
|
import com.jsowell.pile.service.*;
|
||||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||||
@@ -73,6 +78,8 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
|||||||
@Autowired
|
@Autowired
|
||||||
private SysUserService userService;
|
private SysUserService userService;
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private IThirdPartyParkingConfigService parkingConfigService;
|
||||||
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@@ -486,5 +493,25 @@ public class PileStationInfoServiceImpl implements IPileStationInfoService {
|
|||||||
return pileStationInfoMapper.getIdsByDeptId(deptId);
|
return pileStationInfoMapper.getIdsByDeptId(deptId);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 绑定停车系统平台
|
||||||
|
* @param dto
|
||||||
|
*/
|
||||||
|
@Override
|
||||||
|
public int bindParkingPlatform(BindParkingPlatformDTO dto) {
|
||||||
|
String parkingId = dto.getParkingId();
|
||||||
|
String stationId = dto.getStationId();
|
||||||
|
// 先根据停车系统平台查询一下是否有数据
|
||||||
|
ThirdpartyParkingConfig basicInfo = parkingConfigService.selectByPrimaryKey(Integer.parseInt(parkingId));
|
||||||
|
if (basicInfo == null) {
|
||||||
|
throw new BusinessException(ReturnCodeEnum.CODE_QUERY_PARKING_INFO_IS_NULL);
|
||||||
|
}
|
||||||
|
// 先删除缓存
|
||||||
|
String redisKey = CacheConstants.SELECT_PILE_STATION_INFO_BY_ID + stationId;
|
||||||
|
redisCache.deleteObject(redisKey);
|
||||||
|
// 再将站点信息表中绑定上parkingId
|
||||||
|
return pileStationInfoMapper.updateParkingPlatform(parkingId, stationId);
|
||||||
|
}
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -0,0 +1,52 @@
|
|||||||
|
package com.jsowell.pile.service.impl;
|
||||||
|
|
||||||
|
import com.jsowell.pile.domain.ThirdpartyParkingConfig;
|
||||||
|
import com.jsowell.pile.mapper.ThirdpartyParkingConfigMapper;
|
||||||
|
import com.jsowell.pile.service.IThirdPartyParkingConfigService;
|
||||||
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* TODO
|
||||||
|
*
|
||||||
|
* @author Lemon
|
||||||
|
* @Date 2023/8/25 13:43
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class ThirdPartyParkingConfigServiceImpl implements IThirdPartyParkingConfigService {
|
||||||
|
|
||||||
|
@Autowired
|
||||||
|
private ThirdpartyParkingConfigMapper thirdpartyParkingConfigMapper;
|
||||||
|
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int deleteByPrimaryKey(Integer id) {
|
||||||
|
return thirdpartyParkingConfigMapper.deleteByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insert(ThirdpartyParkingConfig record) {
|
||||||
|
return thirdpartyParkingConfigMapper.insert(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int insertSelective(ThirdpartyParkingConfig record) {
|
||||||
|
return thirdpartyParkingConfigMapper.insertSelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public ThirdpartyParkingConfig selectByPrimaryKey(Integer id) {
|
||||||
|
return thirdpartyParkingConfigMapper.selectByPrimaryKey(id);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateByPrimaryKeySelective(ThirdpartyParkingConfig record) {
|
||||||
|
return thirdpartyParkingConfigMapper.updateByPrimaryKeySelective(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public int updateByPrimaryKey(ThirdpartyParkingConfig record) {
|
||||||
|
return thirdpartyParkingConfigMapper.updateByPrimaryKey(record);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@@ -421,4 +421,13 @@
|
|||||||
where
|
where
|
||||||
dept_id = #{deptId,jdbcType=VARCHAR}
|
dept_id = #{deptId,jdbcType=VARCHAR}
|
||||||
</select>
|
</select>
|
||||||
|
|
||||||
|
<update id="updateParkingPlatform">
|
||||||
|
update
|
||||||
|
pile_station_info
|
||||||
|
set
|
||||||
|
parking_id = #{parkingId,jdbcType=VARCHAR}
|
||||||
|
where
|
||||||
|
id = #{stationId,jdbcType=VARCHAR}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -1,173 +1,190 @@
|
|||||||
<?xml version="1.0" encoding="UTF-8"?>
|
<?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">
|
<!DOCTYPE mapper PUBLIC "-//mybatis.org//DTD Mapper 3.0//EN" "http://mybatis.org/dtd/mybatis-3-mapper.dtd">
|
||||||
<mapper namespace="com.jsowell.pile.mapper.ThirdpartyParkingConfigMapper">
|
<mapper namespace="com.jsowell.pile.mapper.ThirdpartyParkingConfigMapper">
|
||||||
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.ThirdpartyParkingConfig">
|
<resultMap id="BaseResultMap" type="com.jsowell.pile.domain.ThirdpartyParkingConfig">
|
||||||
<!--@mbg.generated-->
|
<!--@mbg.generated-->
|
||||||
<!--@Table thirdparty_parking_config-->
|
<!--@Table thirdparty_parking_config-->
|
||||||
<id column="id" jdbcType="INTEGER" property="id" />
|
<id column="id" jdbcType="INTEGER" property="id"/>
|
||||||
<result column="parking_name" jdbcType="VARCHAR" property="parkingName" />
|
<result column="parking_name" jdbcType="VARCHAR" property="parkingName"/>
|
||||||
<result column="app_id" jdbcType="VARCHAR" property="appId" />
|
<result column="app_id" jdbcType="VARCHAR" property="appId"/>
|
||||||
<result column="secret_key" jdbcType="VARCHAR" property="secretKey" />
|
<result column="secret_key" jdbcType="VARCHAR" property="secretKey"/>
|
||||||
<result column="parking_merchant_id" jdbcType="VARCHAR" property="parkingMerchantId" />
|
<result column="parking_merchant_id" jdbcType="VARCHAR" property="parkingMerchantId"/>
|
||||||
<result column="coupon_id" jdbcType="VARCHAR" property="couponId" />
|
<result column="coupon_id" jdbcType="VARCHAR" property="couponId"/>
|
||||||
<result column="create_time" jdbcType="TIMESTAMP" property="createTime" />
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
<result column="create_by" jdbcType="VARCHAR" property="createBy" />
|
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
|
||||||
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime" />
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||||
<result column="update_by" jdbcType="VARCHAR" property="updateBy" />
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
||||||
<result column="del_flag" jdbcType="VARCHAR" property="delFlag" />
|
<result column="del_flag" jdbcType="VARCHAR" property="delFlag"/>
|
||||||
</resultMap>
|
</resultMap>
|
||||||
<sql id="Base_Column_List">
|
|
||||||
<!--@mbg.generated-->
|
<sql id="Base_Column_List">
|
||||||
id, parking_name, app_id, secret_key, parking_merchant_id, coupon_id, create_time,
|
<!--@mbg.generated-->
|
||||||
create_by, update_time, update_by, del_flag
|
|
||||||
</sql>
|
|
||||||
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
|
||||||
<!--@mbg.generated-->
|
|
||||||
select
|
|
||||||
<include refid="Base_Column_List" />
|
|
||||||
from thirdparty_parking_config
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</select>
|
|
||||||
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
|
||||||
<!--@mbg.generated-->
|
|
||||||
delete from thirdparty_parking_config
|
|
||||||
where id = #{id,jdbcType=INTEGER}
|
|
||||||
</delete>
|
|
||||||
<insert id="insert" parameterType="com.jsowell.pile.domain.ThirdpartyParkingConfig">
|
|
||||||
<!--@mbg.generated-->
|
|
||||||
insert into thirdparty_parking_config (id, parking_name, app_id,
|
|
||||||
secret_key, parking_merchant_id, coupon_id,
|
|
||||||
create_time, create_by, update_time,
|
|
||||||
update_by, del_flag)
|
|
||||||
values (#{id,jdbcType=INTEGER}, #{parkingName,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR},
|
|
||||||
#{secretKey,jdbcType=VARCHAR}, #{parkingMerchantId,jdbcType=VARCHAR}, #{couponId,jdbcType=VARCHAR},
|
|
||||||
#{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
|
||||||
#{updateBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR})
|
|
||||||
</insert>
|
|
||||||
<insert id="insertSelective" parameterType="com.jsowell.pile.domain.ThirdpartyParkingConfig">
|
|
||||||
<!--@mbg.generated-->
|
|
||||||
insert into thirdparty_parking_config
|
|
||||||
<trim prefix="(" suffix=")" suffixOverrides=",">
|
|
||||||
<if test="id != null">
|
|
||||||
id,
|
id,
|
||||||
</if>
|
|
||||||
<if test="parkingName != null">
|
|
||||||
parking_name,
|
parking_name,
|
||||||
</if>
|
|
||||||
<if test="appId != null">
|
|
||||||
app_id,
|
app_id,
|
||||||
</if>
|
|
||||||
<if test="secretKey != null">
|
|
||||||
secret_key,
|
secret_key,
|
||||||
</if>
|
|
||||||
<if test="parkingMerchantId != null">
|
|
||||||
parking_merchant_id,
|
parking_merchant_id,
|
||||||
</if>
|
|
||||||
<if test="couponId != null">
|
|
||||||
coupon_id,
|
coupon_id,
|
||||||
</if>
|
|
||||||
<if test="createTime != null">
|
|
||||||
create_time,
|
create_time,
|
||||||
</if>
|
|
||||||
<if test="createBy != null">
|
|
||||||
create_by,
|
create_by,
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
|
||||||
update_time,
|
update_time,
|
||||||
</if>
|
|
||||||
<if test="updateBy != null">
|
|
||||||
update_by,
|
update_by,
|
||||||
</if>
|
del_flag
|
||||||
<if test="delFlag != null">
|
</sql>
|
||||||
del_flag,
|
|
||||||
</if>
|
<select id="selectByPrimaryKey" parameterType="java.lang.Integer" resultMap="BaseResultMap">
|
||||||
</trim>
|
<!--@mbg.generated-->
|
||||||
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
select
|
||||||
<if test="id != null">
|
<include refid="Base_Column_List"/>
|
||||||
#{id,jdbcType=INTEGER},
|
from thirdparty_parking_config
|
||||||
</if>
|
where id = #{id,jdbcType=INTEGER}
|
||||||
<if test="parkingName != null">
|
</select>
|
||||||
#{parkingName,jdbcType=VARCHAR},
|
|
||||||
</if>
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Integer">
|
||||||
<if test="appId != null">
|
<!--@mbg.generated-->
|
||||||
#{appId,jdbcType=VARCHAR},
|
delete
|
||||||
</if>
|
from thirdparty_parking_config
|
||||||
<if test="secretKey != null">
|
where id = #{id,jdbcType=INTEGER}
|
||||||
#{secretKey,jdbcType=VARCHAR},
|
</delete>
|
||||||
</if>
|
|
||||||
<if test="parkingMerchantId != null">
|
<insert id="insert" parameterType="com.jsowell.pile.domain.ThirdpartyParkingConfig">
|
||||||
#{parkingMerchantId,jdbcType=VARCHAR},
|
<!--@mbg.generated-->
|
||||||
</if>
|
insert into thirdparty_parking_config (id, parking_name, app_id,
|
||||||
<if test="couponId != null">
|
secret_key, parking_merchant_id, coupon_id,
|
||||||
#{couponId,jdbcType=VARCHAR},
|
create_time, create_by, update_time,
|
||||||
</if>
|
update_by, del_flag)
|
||||||
<if test="createTime != null">
|
values (#{id,jdbcType=INTEGER}, #{parkingName,jdbcType=VARCHAR}, #{appId,jdbcType=VARCHAR},
|
||||||
#{createTime,jdbcType=TIMESTAMP},
|
#{secretKey,jdbcType=VARCHAR}, #{parkingMerchantId,jdbcType=VARCHAR}, #{couponId,jdbcType=VARCHAR},
|
||||||
</if>
|
#{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP},
|
||||||
<if test="createBy != null">
|
#{updateBy,jdbcType=VARCHAR}, #{delFlag,jdbcType=VARCHAR})
|
||||||
#{createBy,jdbcType=VARCHAR},
|
</insert>
|
||||||
</if>
|
|
||||||
<if test="updateTime != null">
|
<insert id="insertSelective" parameterType="com.jsowell.pile.domain.ThirdpartyParkingConfig">
|
||||||
#{updateTime,jdbcType=TIMESTAMP},
|
<!--@mbg.generated-->
|
||||||
</if>
|
insert into thirdparty_parking_config
|
||||||
<if test="updateBy != null">
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
#{updateBy,jdbcType=VARCHAR},
|
<if test="id != null">
|
||||||
</if>
|
id,
|
||||||
<if test="delFlag != null">
|
</if>
|
||||||
#{delFlag,jdbcType=VARCHAR},
|
<if test="parkingName != null">
|
||||||
</if>
|
parking_name,
|
||||||
</trim>
|
</if>
|
||||||
</insert>
|
<if test="appId != null">
|
||||||
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.ThirdpartyParkingConfig">
|
app_id,
|
||||||
<!--@mbg.generated-->
|
</if>
|
||||||
update thirdparty_parking_config
|
<if test="secretKey != null">
|
||||||
<set>
|
secret_key,
|
||||||
<if test="parkingName != null">
|
</if>
|
||||||
parking_name = #{parkingName,jdbcType=VARCHAR},
|
<if test="parkingMerchantId != null">
|
||||||
</if>
|
parking_merchant_id,
|
||||||
<if test="appId != null">
|
</if>
|
||||||
app_id = #{appId,jdbcType=VARCHAR},
|
<if test="couponId != null">
|
||||||
</if>
|
coupon_id,
|
||||||
<if test="secretKey != null">
|
</if>
|
||||||
secret_key = #{secretKey,jdbcType=VARCHAR},
|
<if test="createTime != null">
|
||||||
</if>
|
create_time,
|
||||||
<if test="parkingMerchantId != null">
|
</if>
|
||||||
parking_merchant_id = #{parkingMerchantId,jdbcType=VARCHAR},
|
<if test="createBy != null">
|
||||||
</if>
|
create_by,
|
||||||
<if test="couponId != null">
|
</if>
|
||||||
coupon_id = #{couponId,jdbcType=VARCHAR},
|
<if test="updateTime != null">
|
||||||
</if>
|
update_time,
|
||||||
<if test="createTime != null">
|
</if>
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
<if test="updateBy != null">
|
||||||
</if>
|
update_by,
|
||||||
<if test="createBy != null">
|
</if>
|
||||||
create_by = #{createBy,jdbcType=VARCHAR},
|
<if test="delFlag != null">
|
||||||
</if>
|
del_flag,
|
||||||
<if test="updateTime != null">
|
</if>
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
</trim>
|
||||||
</if>
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
<if test="updateBy != null">
|
<if test="id != null">
|
||||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
#{id,jdbcType=INTEGER},
|
||||||
</if>
|
</if>
|
||||||
<if test="delFlag != null">
|
<if test="parkingName != null">
|
||||||
del_flag = #{delFlag,jdbcType=VARCHAR},
|
#{parkingName,jdbcType=VARCHAR},
|
||||||
</if>
|
</if>
|
||||||
</set>
|
<if test="appId != null">
|
||||||
where id = #{id,jdbcType=INTEGER}
|
#{appId,jdbcType=VARCHAR},
|
||||||
</update>
|
</if>
|
||||||
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.ThirdpartyParkingConfig">
|
<if test="secretKey != null">
|
||||||
<!--@mbg.generated-->
|
#{secretKey,jdbcType=VARCHAR},
|
||||||
update thirdparty_parking_config
|
</if>
|
||||||
set parking_name = #{parkingName,jdbcType=VARCHAR},
|
<if test="parkingMerchantId != null">
|
||||||
app_id = #{appId,jdbcType=VARCHAR},
|
#{parkingMerchantId,jdbcType=VARCHAR},
|
||||||
secret_key = #{secretKey,jdbcType=VARCHAR},
|
</if>
|
||||||
parking_merchant_id = #{parkingMerchantId,jdbcType=VARCHAR},
|
<if test="couponId != null">
|
||||||
coupon_id = #{couponId,jdbcType=VARCHAR},
|
#{couponId,jdbcType=VARCHAR},
|
||||||
create_time = #{createTime,jdbcType=TIMESTAMP},
|
</if>
|
||||||
create_by = #{createBy,jdbcType=VARCHAR},
|
<if test="createTime != null">
|
||||||
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
update_by = #{updateBy,jdbcType=VARCHAR},
|
</if>
|
||||||
del_flag = #{delFlag,jdbcType=VARCHAR}
|
<if test="createBy != null">
|
||||||
where id = #{id,jdbcType=INTEGER}
|
#{createBy,jdbcType=VARCHAR},
|
||||||
</update>
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">
|
||||||
|
#{updateBy,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="delFlag != null">
|
||||||
|
#{delFlag,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.jsowell.pile.domain.ThirdpartyParkingConfig">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update thirdparty_parking_config
|
||||||
|
<set>
|
||||||
|
<if test="parkingName != null">
|
||||||
|
parking_name = #{parkingName,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="appId != null">
|
||||||
|
app_id = #{appId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="secretKey != null">
|
||||||
|
secret_key = #{secretKey,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parkingMerchantId != null">
|
||||||
|
parking_merchant_id = #{parkingMerchantId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="couponId != null">
|
||||||
|
coupon_id = #{couponId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">
|
||||||
|
create_by = #{createBy,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">
|
||||||
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="delFlag != null">
|
||||||
|
del_flag = #{delFlag,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
|
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.jsowell.pile.domain.ThirdpartyParkingConfig">
|
||||||
|
<!--@mbg.generated-->
|
||||||
|
update thirdparty_parking_config
|
||||||
|
set parking_name = #{parkingName,jdbcType=VARCHAR},
|
||||||
|
app_id = #{appId,jdbcType=VARCHAR},
|
||||||
|
secret_key = #{secretKey,jdbcType=VARCHAR},
|
||||||
|
parking_merchant_id = #{parkingMerchantId,jdbcType=VARCHAR},
|
||||||
|
coupon_id = #{couponId,jdbcType=VARCHAR},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
create_by = #{createBy,jdbcType=VARCHAR},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||||
|
del_flag = #{delFlag,jdbcType=VARCHAR}
|
||||||
|
where id = #{id,jdbcType=INTEGER}
|
||||||
|
</update>
|
||||||
</mapper>
|
</mapper>
|
||||||
@@ -130,6 +130,7 @@ export function updateSettingByStationId(data) {
|
|||||||
// })
|
// })
|
||||||
// }
|
// }
|
||||||
|
|
||||||
|
// 推送充电站信息到联联平台
|
||||||
export function pushStationInfo(data) {
|
export function pushStationInfo(data) {
|
||||||
return request({
|
return request({
|
||||||
url: "/pile/station/pushStationInfo",
|
url: "/pile/station/pushStationInfo",
|
||||||
@@ -138,3 +139,12 @@ export function pushStationInfo(data) {
|
|||||||
})
|
})
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 绑定停车平台
|
||||||
|
export function bindParkingPlatform(data) {
|
||||||
|
return request({
|
||||||
|
url: '/pile/station/bindParkingPlatform',
|
||||||
|
method: 'post',
|
||||||
|
data: data,
|
||||||
|
})
|
||||||
|
}
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user