完成数据大屏核心接口按租户查找
This commit is contained in:
parent
bdd9789374
commit
21c5754d06
@ -155,7 +155,7 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
} else if (UserTypeUtil.SYS_USER_TYPE_ZERO.equals(loginUserType)) {
|
} else if (UserTypeUtil.SYS_USER_TYPE_ZERO.equals(loginUserType)) {
|
||||||
//平台可能会选中多个授权运营商
|
//平台可能会选中多个授权运营商
|
||||||
String grantOperatorIds = (String) queryConditions.getGrantOperatorIds();
|
String grantOperatorIds = (String) queryConditions.getGrantOperatorIds();
|
||||||
if (!"".equals(grantOperatorIds)) {
|
if (!"".equals(grantOperatorIds) && grantOperatorIds != null) {
|
||||||
String[] splitGrantOperatorIds = grantOperatorIds.split(",");
|
String[] splitGrantOperatorIds = grantOperatorIds.split(",");
|
||||||
List<String> idsList = Arrays.asList(splitGrantOperatorIds);
|
List<String> idsList = Arrays.asList(splitGrantOperatorIds);
|
||||||
queryConditions.setGrantOperatorIds(idsList);
|
queryConditions.setGrantOperatorIds(idsList);
|
||||||
@ -623,7 +623,7 @@ public class XhpcCardServiceImpl implements IXhpcCardService {
|
|||||||
xhpcIcCardInfo.setDelFlag(1L);
|
xhpcIcCardInfo.setDelFlag(1L);
|
||||||
xhpcCardMapper.updateByPrimaryKeySelective(xhpcIcCardInfo);
|
xhpcCardMapper.updateByPrimaryKeySelective(xhpcIcCardInfo);
|
||||||
TIccardInfo tIccardInfo = tIccardInfoMapper.selectByPrimaryKey(Math.toIntExact(cardRecordId));
|
TIccardInfo tIccardInfo = tIccardInfoMapper.selectByPrimaryKey(Math.toIntExact(cardRecordId));
|
||||||
tIccardInfo.setStatus(5);
|
tIccardInfo.setStatus(0);
|
||||||
tIccardInfoMapper.updateByPrimaryKeySelective(tIccardInfo);
|
tIccardInfoMapper.updateByPrimaryKeySelective(tIccardInfo);
|
||||||
TIccardLog tIccardLog = new TIccardLog();
|
TIccardLog tIccardLog = new TIccardLog();
|
||||||
tIccardLog.setUniqueid(tIccardInfo.getCardid());
|
tIccardLog.setUniqueid(tIccardInfo.getCardid());
|
||||||
|
|||||||
@ -0,0 +1,34 @@
|
|||||||
|
package com.xhpc.databigscreen.controller;
|
||||||
|
|
||||||
|
import com.xhpc.common.core.domain.R;
|
||||||
|
import com.xhpc.common.core.web.controller.BaseController;
|
||||||
|
import com.xhpc.databigscreen.domain.CoreParam;
|
||||||
|
import com.xhpc.databigscreen.service.XhpcDataBigScreenService;
|
||||||
|
import org.springframework.web.bind.annotation.GetMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RequestMapping;
|
||||||
|
import org.springframework.web.bind.annotation.RestController;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
@RestController
|
||||||
|
@RequestMapping("/big-screen")
|
||||||
|
public class XhpcDataBigScreenController extends BaseController {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
XhpcDataBigScreenService xhpcDataBigScreenService;
|
||||||
|
|
||||||
|
//@GetMapping("/user-total-count")
|
||||||
|
//public R<Map<String,Object>> queryUserTotalCount(@RequestBody ) {
|
||||||
|
//
|
||||||
|
// return xhpcCardService.queryDeviceList(currentPage, items);
|
||||||
|
//}
|
||||||
|
|
||||||
|
@GetMapping("/core-locations")
|
||||||
|
public R<List<Map<String, Object>>> returnCoreLocation(CoreParam coreParam) {
|
||||||
|
|
||||||
|
return xhpcDataBigScreenService.returnCoreLocation(coreParam);
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,23 @@
|
|||||||
|
package com.xhpc.databigscreen.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 核心参数类,所有接口都会用到
|
||||||
|
*
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/2/28 11:47
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class CoreParam {
|
||||||
|
|
||||||
|
@JsonProperty("tenantIds")
|
||||||
|
private String tenantIds;
|
||||||
|
private String areaCode;
|
||||||
|
private String chargingStationIds;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,42 @@
|
|||||||
|
package com.xhpc.databigscreen.domain;
|
||||||
|
|
||||||
|
import com.fasterxml.jackson.annotation.JsonProperty;
|
||||||
|
import lombok.Data;
|
||||||
|
import lombok.NoArgsConstructor;
|
||||||
|
|
||||||
|
@NoArgsConstructor
|
||||||
|
@Data
|
||||||
|
public class ReturnCoreLocation {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 场站名称
|
||||||
|
*/
|
||||||
|
@JsonProperty("chargingStationName")
|
||||||
|
private String chargingStationName;
|
||||||
|
/**
|
||||||
|
* 场站id
|
||||||
|
*/
|
||||||
|
@JsonProperty("chargingStationId")
|
||||||
|
private Long chargingStationId;
|
||||||
|
/**
|
||||||
|
* 场站经度
|
||||||
|
*/
|
||||||
|
@JsonProperty("chargingStationLongitude")
|
||||||
|
private Double chargingStationLongitude;
|
||||||
|
/**
|
||||||
|
* 场站纬度
|
||||||
|
*/
|
||||||
|
@JsonProperty("chargingStationLatitude")
|
||||||
|
private Double chargingStationLatitude;
|
||||||
|
/**
|
||||||
|
* 场站区域码
|
||||||
|
*/
|
||||||
|
@JsonProperty("chargingStationAreaCode")
|
||||||
|
private String chargingStationAreaCode;
|
||||||
|
/**
|
||||||
|
* 场站所属租户id
|
||||||
|
*/
|
||||||
|
@JsonProperty("chargingStationTenantId")
|
||||||
|
private Long chargingStationTenantId;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,32 @@
|
|||||||
|
package com.xhpc.databigscreen.mapper;
|
||||||
|
|
||||||
|
import com.xhpc.databigscreen.pojo.XhpcChargingStation;
|
||||||
|
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
public interface XhpcChargingStationMapper {
|
||||||
|
|
||||||
|
int deleteByPrimaryKey(Long chargingStationId);
|
||||||
|
|
||||||
|
int insert(XhpcChargingStation record);
|
||||||
|
|
||||||
|
int insertSelective(XhpcChargingStation record);
|
||||||
|
|
||||||
|
XhpcChargingStation selectByPrimaryKey(Long chargingStationId);
|
||||||
|
|
||||||
|
int updateByPrimaryKeySelective(XhpcChargingStation record);
|
||||||
|
|
||||||
|
int updateByPrimaryKey(XhpcChargingStation record);
|
||||||
|
|
||||||
|
/**
|
||||||
|
* query charging station infos of special tenant or all ones by tenant Id List
|
||||||
|
*
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/2/28 17:50
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
List<Map<String, Object>> selectByTenantId(ArrayList<Long> tenantIdList);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,175 @@
|
|||||||
|
package com.xhpc.databigscreen.pojo;
|
||||||
|
|
||||||
|
import lombok.Data;
|
||||||
|
|
||||||
|
import java.io.Serializable;
|
||||||
|
import java.util.Date;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* xhpc_charging_station
|
||||||
|
*
|
||||||
|
* @author
|
||||||
|
*/
|
||||||
|
@Data
|
||||||
|
public class XhpcChargingStation implements Serializable {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站id
|
||||||
|
*/
|
||||||
|
private Long chargingStationId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 名称
|
||||||
|
*/
|
||||||
|
private String name;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 运营商id
|
||||||
|
*/
|
||||||
|
private Long operatorId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站位置(地上电站、地下电站)
|
||||||
|
*/
|
||||||
|
private Integer type;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 建设场所
|
||||||
|
*/
|
||||||
|
private Short constructionSite;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 服务设施
|
||||||
|
*/
|
||||||
|
private String serviceFacilities;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 周边设施
|
||||||
|
*/
|
||||||
|
private String peripheryFacilities;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 地址code
|
||||||
|
*/
|
||||||
|
private Integer areaCode;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站地址
|
||||||
|
*/
|
||||||
|
private String address;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 详细地址
|
||||||
|
*/
|
||||||
|
private String detailedAddress;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 经度
|
||||||
|
*/
|
||||||
|
private String longitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 维度
|
||||||
|
*/
|
||||||
|
private String latitude;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 停车说明
|
||||||
|
*/
|
||||||
|
private String parkingInstructions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 编号
|
||||||
|
*/
|
||||||
|
private String serialNumber;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 客户端可见类型
|
||||||
|
*/
|
||||||
|
private String clientVisible;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 状态(0启用 1停用)
|
||||||
|
*/
|
||||||
|
private Integer status;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 删除标志(0代表存在 2代表删除)
|
||||||
|
*/
|
||||||
|
private Integer delFlag;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建时间
|
||||||
|
*/
|
||||||
|
private Date createTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 创建者
|
||||||
|
*/
|
||||||
|
private String createBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新时间
|
||||||
|
*/
|
||||||
|
private Date updateTime;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 更新者
|
||||||
|
*/
|
||||||
|
private String updateBy;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 备注
|
||||||
|
*/
|
||||||
|
private String remark;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 当前计费模型id
|
||||||
|
*/
|
||||||
|
private Long rateModelId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业说明
|
||||||
|
*/
|
||||||
|
private String businessInstructions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 温馨提示
|
||||||
|
*/
|
||||||
|
private String reminderInstructions;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 图片集合
|
||||||
|
*/
|
||||||
|
private String imgId;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 电站类型
|
||||||
|
*/
|
||||||
|
private Short stationType;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 营业执照18个字符(对接第三方平台及监管平台的OperatorID取9至17个)
|
||||||
|
*/
|
||||||
|
private String operatorIdEvcs;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 站点电话
|
||||||
|
*/
|
||||||
|
private String serviceTel;
|
||||||
|
|
||||||
|
private String searchValue;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 侧位数量
|
||||||
|
*/
|
||||||
|
private Integer parkNums;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* 租户id
|
||||||
|
*/
|
||||||
|
private String tenantId;
|
||||||
|
|
||||||
|
private static final long serialVersionUID = 1L;
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,25 @@
|
|||||||
|
package com.xhpc.databigscreen.service;
|
||||||
|
|
||||||
|
import com.xhpc.common.core.domain.R;
|
||||||
|
import com.xhpc.databigscreen.domain.CoreParam;
|
||||||
|
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/2/28 17:13
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
public interface XhpcDataBigScreenService {
|
||||||
|
|
||||||
|
/**
|
||||||
|
* return multiple location infos
|
||||||
|
*
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/2/28 17:16
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
R<List<Map<String, Object>>> returnCoreLocation(CoreParam coreParam);
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,49 @@
|
|||||||
|
package com.xhpc.databigscreen.service.impl;
|
||||||
|
|
||||||
|
import com.xhpc.common.core.domain.R;
|
||||||
|
import com.xhpc.databigscreen.domain.CoreParam;
|
||||||
|
import com.xhpc.databigscreen.mapper.XhpcChargingStationMapper;
|
||||||
|
import com.xhpc.databigscreen.service.XhpcDataBigScreenService;
|
||||||
|
import org.springframework.stereotype.Service;
|
||||||
|
|
||||||
|
import javax.annotation.Resource;
|
||||||
|
import java.util.ArrayList;
|
||||||
|
import java.util.Arrays;
|
||||||
|
import java.util.List;
|
||||||
|
import java.util.Map;
|
||||||
|
|
||||||
|
/**
|
||||||
|
* @author WH
|
||||||
|
* @date 2022/2/28 17:14
|
||||||
|
* @since version-1.0
|
||||||
|
*/
|
||||||
|
@Service
|
||||||
|
public class XhpcDataBigScreenServiceImpl implements XhpcDataBigScreenService {
|
||||||
|
|
||||||
|
@Resource
|
||||||
|
XhpcChargingStationMapper xhpcChargingStationMapper;
|
||||||
|
|
||||||
|
@Override
|
||||||
|
public R<List<Map<String, Object>>> returnCoreLocation(CoreParam coreParam) {
|
||||||
|
//judge care param function
|
||||||
|
if (coreParam.getAreaCode() == null || "".equals(coreParam.getAreaCode())) {
|
||||||
|
if (coreParam.getChargingStationIds() == null || "".equals(coreParam.getChargingStationIds())) {
|
||||||
|
//query location infos of charging station of special or all tenant
|
||||||
|
String tenantIds = coreParam.getTenantIds();
|
||||||
|
ArrayList<Long> tenantIdList = new ArrayList<>();
|
||||||
|
if (!"".equals(tenantIds) && tenantIds != null) {
|
||||||
|
String[] tenantIdArray = tenantIds.split(",");
|
||||||
|
List<String> tenantIdStrList = Arrays.asList(tenantIdArray);
|
||||||
|
for (String tenantIdStr : tenantIdStrList) {
|
||||||
|
Long tenantId = Long.valueOf(tenantIdStr);
|
||||||
|
tenantIdList.add(tenantId);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
List<Map<String, Object>> xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantId(tenantIdList);
|
||||||
|
return R.ok(xhpcChargingStationList);
|
||||||
|
}
|
||||||
|
}
|
||||||
|
return null;
|
||||||
|
}
|
||||||
|
|
||||||
|
}
|
||||||
@ -0,0 +1,434 @@
|
|||||||
|
<?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">
|
||||||
|
<!--suppress ALL -->
|
||||||
|
<mapper namespace="com.xhpc.databigscreen.mapper.XhpcChargingStationMapper">
|
||||||
|
<resultMap id="BaseResultMap" type="com.xhpc.databigscreen.pojo.XhpcChargingStation">
|
||||||
|
<id column="charging_station_id" jdbcType="BIGINT" property="chargingStationId"/>
|
||||||
|
<result column="name" jdbcType="VARCHAR" property="name"/>
|
||||||
|
<result column="operator_id" jdbcType="BIGINT" property="operatorId"/>
|
||||||
|
<result column="type" jdbcType="INTEGER" property="type"/>
|
||||||
|
<result column="construction_site" jdbcType="SMALLINT" property="constructionSite"/>
|
||||||
|
<result column="service_facilities" jdbcType="VARCHAR" property="serviceFacilities"/>
|
||||||
|
<result column="periphery_facilities" jdbcType="VARCHAR" property="peripheryFacilities"/>
|
||||||
|
<result column="area_code" jdbcType="INTEGER" property="areaCode"/>
|
||||||
|
<result column="address" jdbcType="VARCHAR" property="address"/>
|
||||||
|
<result column="detailed_address" jdbcType="VARCHAR" property="detailedAddress"/>
|
||||||
|
<result column="longitude" jdbcType="VARCHAR" property="longitude"/>
|
||||||
|
<result column="latitude" jdbcType="VARCHAR" property="latitude"/>
|
||||||
|
<result column="parking_instructions" jdbcType="VARCHAR" property="parkingInstructions"/>
|
||||||
|
<result column="serial_number" jdbcType="VARCHAR" property="serialNumber"/>
|
||||||
|
<result column="client_visible" jdbcType="VARCHAR" property="clientVisible"/>
|
||||||
|
<result column="status" jdbcType="INTEGER" property="status"/>
|
||||||
|
<result column="del_flag" jdbcType="INTEGER" property="delFlag"/>
|
||||||
|
<result column="create_time" jdbcType="TIMESTAMP" property="createTime"/>
|
||||||
|
<result column="create_by" jdbcType="VARCHAR" property="createBy"/>
|
||||||
|
<result column="update_time" jdbcType="TIMESTAMP" property="updateTime"/>
|
||||||
|
<result column="update_by" jdbcType="VARCHAR" property="updateBy"/>
|
||||||
|
<result column="remark" jdbcType="VARCHAR" property="remark"/>
|
||||||
|
<result column="rate_model_id" jdbcType="BIGINT" property="rateModelId"/>
|
||||||
|
<result column="business_instructions" jdbcType="VARCHAR" property="businessInstructions"/>
|
||||||
|
<result column="reminder_instructions" jdbcType="VARCHAR" property="reminderInstructions"/>
|
||||||
|
<result column="img_id" jdbcType="VARCHAR" property="imgId"/>
|
||||||
|
<result column="station_type" jdbcType="SMALLINT" property="stationType"/>
|
||||||
|
<result column="operator_id_evcs" jdbcType="VARCHAR" property="operatorIdEvcs"/>
|
||||||
|
<result column="service_tel" jdbcType="VARCHAR" property="serviceTel"/>
|
||||||
|
<result column="search_value" jdbcType="VARCHAR" property="searchValue"/>
|
||||||
|
<result column="park_nums" jdbcType="INTEGER" property="parkNums"/>
|
||||||
|
<result column="tenant_id" jdbcType="VARCHAR" property="tenantId"/>
|
||||||
|
</resultMap>
|
||||||
|
<sql id="Base_Column_List">
|
||||||
|
charging_station_id
|
||||||
|
, `name`, operator_id, `type`, construction_site, service_facilities,
|
||||||
|
periphery_facilities, area_code, address, detailed_address, longitude, latitude,
|
||||||
|
parking_instructions, serial_number, client_visible, `status`, del_flag, create_time,
|
||||||
|
create_by, update_time, update_by, remark, rate_model_id, business_instructions,
|
||||||
|
reminder_instructions, img_id, station_type, operator_id_evcs, service_tel, search_value,
|
||||||
|
park_nums, tenant_id
|
||||||
|
</sql>
|
||||||
|
<select id="selectByPrimaryKey" parameterType="java.lang.Long" resultMap="BaseResultMap">
|
||||||
|
select
|
||||||
|
<include refid="Base_Column_List"/>
|
||||||
|
from xhpc_charging_station
|
||||||
|
where charging_station_id = #{chargingStationId,jdbcType=BIGINT}
|
||||||
|
</select>
|
||||||
|
<select id="selectByTenantId" resultType="Map">
|
||||||
|
SELECT
|
||||||
|
xhpc_charging_station.tenant_id tenantId,
|
||||||
|
xhpc_charging_station.chargingStationId,
|
||||||
|
xhpc_charging_station.`name`,
|
||||||
|
xhpc_charging_station.areaCode,
|
||||||
|
xhpc_charging_station.longitude,
|
||||||
|
xhpc_charging_station.latitude
|
||||||
|
FROM
|
||||||
|
xhpc_charging_station
|
||||||
|
WHERE
|
||||||
|
xhpc_charging_station.del_flag = 0
|
||||||
|
AND xhpc_charging_station.`status` = 0
|
||||||
|
<if test="list!=null and list.size()!=0">
|
||||||
|
AND xhpc_charging_station.tenant_id in
|
||||||
|
<foreach collection="list" separator="," open="(" close=")" item="tenantId">
|
||||||
|
#{tenantId}
|
||||||
|
</foreach>
|
||||||
|
</if>
|
||||||
|
</select>
|
||||||
|
<delete id="deleteByPrimaryKey" parameterType="java.lang.Long">
|
||||||
|
delete
|
||||||
|
from xhpc_charging_station
|
||||||
|
where charging_station_id = #{chargingStationId,jdbcType=BIGINT}
|
||||||
|
</delete>
|
||||||
|
<insert id="insert" keyColumn="charging_station_id" keyProperty="chargingStationId"
|
||||||
|
parameterType="com.xhpc.databigscreen.pojo.XhpcChargingStation" useGeneratedKeys="true">
|
||||||
|
insert into xhpc_charging_station (`name`, operator_id, `type`,
|
||||||
|
construction_site, service_facilities, periphery_facilities,
|
||||||
|
area_code, address, detailed_address,
|
||||||
|
longitude, latitude, parking_instructions,
|
||||||
|
serial_number, client_visible, `status`,
|
||||||
|
del_flag, create_time, create_by,
|
||||||
|
update_time, update_by, remark,
|
||||||
|
rate_model_id, business_instructions, reminder_instructions,
|
||||||
|
img_id, station_type, operator_id_evcs,
|
||||||
|
service_tel, search_value, park_nums,
|
||||||
|
tenant_id)
|
||||||
|
values (#{name,jdbcType=VARCHAR}, #{operatorId,jdbcType=BIGINT}, #{type,jdbcType=INTEGER},
|
||||||
|
#{constructionSite,jdbcType=SMALLINT}, #{serviceFacilities,jdbcType=VARCHAR},
|
||||||
|
#{peripheryFacilities,jdbcType=VARCHAR},
|
||||||
|
#{areaCode,jdbcType=INTEGER}, #{address,jdbcType=VARCHAR}, #{detailedAddress,jdbcType=VARCHAR},
|
||||||
|
#{longitude,jdbcType=VARCHAR}, #{latitude,jdbcType=VARCHAR}, #{parkingInstructions,jdbcType=VARCHAR},
|
||||||
|
#{serialNumber,jdbcType=VARCHAR}, #{clientVisible,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER},
|
||||||
|
#{delFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR},
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR},
|
||||||
|
#{rateModelId,jdbcType=BIGINT}, #{businessInstructions,jdbcType=VARCHAR},
|
||||||
|
#{reminderInstructions,jdbcType=VARCHAR},
|
||||||
|
#{imgId,jdbcType=VARCHAR}, #{stationType,jdbcType=SMALLINT}, #{operatorIdEvcs,jdbcType=VARCHAR},
|
||||||
|
#{serviceTel,jdbcType=VARCHAR}, #{searchValue,jdbcType=VARCHAR}, #{parkNums,jdbcType=INTEGER},
|
||||||
|
#{tenantId,jdbcType=VARCHAR})
|
||||||
|
</insert>
|
||||||
|
<insert id="insertSelective" keyColumn="charging_station_id" keyProperty="chargingStationId"
|
||||||
|
parameterType="com.xhpc.databigscreen.pojo.XhpcChargingStation" useGeneratedKeys="true">
|
||||||
|
insert into xhpc_charging_station
|
||||||
|
<trim prefix="(" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">
|
||||||
|
`name`,
|
||||||
|
</if>
|
||||||
|
<if test="operatorId != null">
|
||||||
|
operator_id,
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
`type`,
|
||||||
|
</if>
|
||||||
|
<if test="constructionSite != null">
|
||||||
|
construction_site,
|
||||||
|
</if>
|
||||||
|
<if test="serviceFacilities != null">
|
||||||
|
service_facilities,
|
||||||
|
</if>
|
||||||
|
<if test="peripheryFacilities != null">
|
||||||
|
periphery_facilities,
|
||||||
|
</if>
|
||||||
|
<if test="areaCode != null">
|
||||||
|
area_code,
|
||||||
|
</if>
|
||||||
|
<if test="address != null">
|
||||||
|
address,
|
||||||
|
</if>
|
||||||
|
<if test="detailedAddress != null">
|
||||||
|
detailed_address,
|
||||||
|
</if>
|
||||||
|
<if test="longitude != null">
|
||||||
|
longitude,
|
||||||
|
</if>
|
||||||
|
<if test="latitude != null">
|
||||||
|
latitude,
|
||||||
|
</if>
|
||||||
|
<if test="parkingInstructions != null">
|
||||||
|
parking_instructions,
|
||||||
|
</if>
|
||||||
|
<if test="serialNumber != null">
|
||||||
|
serial_number,
|
||||||
|
</if>
|
||||||
|
<if test="clientVisible != null">
|
||||||
|
client_visible,
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status`,
|
||||||
|
</if>
|
||||||
|
<if test="delFlag != null">
|
||||||
|
del_flag,
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
create_time,
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">
|
||||||
|
create_by,
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
update_time,
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">
|
||||||
|
update_by,
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
remark,
|
||||||
|
</if>
|
||||||
|
<if test="rateModelId != null">
|
||||||
|
rate_model_id,
|
||||||
|
</if>
|
||||||
|
<if test="businessInstructions != null">
|
||||||
|
business_instructions,
|
||||||
|
</if>
|
||||||
|
<if test="reminderInstructions != null">
|
||||||
|
reminder_instructions,
|
||||||
|
</if>
|
||||||
|
<if test="imgId != null">
|
||||||
|
img_id,
|
||||||
|
</if>
|
||||||
|
<if test="stationType != null">
|
||||||
|
station_type,
|
||||||
|
</if>
|
||||||
|
<if test="operatorIdEvcs != null">
|
||||||
|
operator_id_evcs,
|
||||||
|
</if>
|
||||||
|
<if test="serviceTel != null">
|
||||||
|
service_tel,
|
||||||
|
</if>
|
||||||
|
<if test="searchValue != null">
|
||||||
|
search_value,
|
||||||
|
</if>
|
||||||
|
<if test="parkNums != null">
|
||||||
|
park_nums,
|
||||||
|
</if>
|
||||||
|
<if test="tenantId != null">
|
||||||
|
tenant_id,
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
<trim prefix="values (" suffix=")" suffixOverrides=",">
|
||||||
|
<if test="name != null">
|
||||||
|
#{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="operatorId != null">
|
||||||
|
#{operatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
#{type,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="constructionSite != null">
|
||||||
|
#{constructionSite,jdbcType=SMALLINT},
|
||||||
|
</if>
|
||||||
|
<if test="serviceFacilities != null">
|
||||||
|
#{serviceFacilities,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="peripheryFacilities != null">
|
||||||
|
#{peripheryFacilities,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="areaCode != null">
|
||||||
|
#{areaCode,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="address != null">
|
||||||
|
#{address,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="detailedAddress != null">
|
||||||
|
#{detailedAddress,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="longitude != null">
|
||||||
|
#{longitude,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="latitude != null">
|
||||||
|
#{latitude,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parkingInstructions != null">
|
||||||
|
#{parkingInstructions,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="serialNumber != null">
|
||||||
|
#{serialNumber,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="clientVisible != null">
|
||||||
|
#{clientVisible,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
#{status,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="delFlag != null">
|
||||||
|
#{delFlag,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="createTime != null">
|
||||||
|
#{createTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="createBy != null">
|
||||||
|
#{createBy,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="updateTime != null">
|
||||||
|
#{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
</if>
|
||||||
|
<if test="updateBy != null">
|
||||||
|
#{updateBy,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="remark != null">
|
||||||
|
#{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="rateModelId != null">
|
||||||
|
#{rateModelId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="businessInstructions != null">
|
||||||
|
#{businessInstructions,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="reminderInstructions != null">
|
||||||
|
#{reminderInstructions,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="imgId != null">
|
||||||
|
#{imgId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="stationType != null">
|
||||||
|
#{stationType,jdbcType=SMALLINT},
|
||||||
|
</if>
|
||||||
|
<if test="operatorIdEvcs != null">
|
||||||
|
#{operatorIdEvcs,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="serviceTel != null">
|
||||||
|
#{serviceTel,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="searchValue != null">
|
||||||
|
#{searchValue,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parkNums != null">
|
||||||
|
#{parkNums,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="tenantId != null">
|
||||||
|
#{tenantId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</trim>
|
||||||
|
</insert>
|
||||||
|
<update id="updateByPrimaryKeySelective" parameterType="com.xhpc.databigscreen.pojo.XhpcChargingStation">
|
||||||
|
update xhpc_charging_station
|
||||||
|
<set>
|
||||||
|
<if test="name != null">
|
||||||
|
`name` = #{name,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="operatorId != null">
|
||||||
|
operator_id = #{operatorId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="type != null">
|
||||||
|
`type` = #{type,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="constructionSite != null">
|
||||||
|
construction_site = #{constructionSite,jdbcType=SMALLINT},
|
||||||
|
</if>
|
||||||
|
<if test="serviceFacilities != null">
|
||||||
|
service_facilities = #{serviceFacilities,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="peripheryFacilities != null">
|
||||||
|
periphery_facilities = #{peripheryFacilities,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="areaCode != null">
|
||||||
|
area_code = #{areaCode,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="address != null">
|
||||||
|
address = #{address,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="detailedAddress != null">
|
||||||
|
detailed_address = #{detailedAddress,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="longitude != null">
|
||||||
|
longitude = #{longitude,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="latitude != null">
|
||||||
|
latitude = #{latitude,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parkingInstructions != null">
|
||||||
|
parking_instructions = #{parkingInstructions,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="serialNumber != null">
|
||||||
|
serial_number = #{serialNumber,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="clientVisible != null">
|
||||||
|
client_visible = #{clientVisible,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="status != null">
|
||||||
|
`status` = #{status,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="delFlag != null">
|
||||||
|
del_flag = #{delFlag,jdbcType=INTEGER},
|
||||||
|
</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="remark != null">
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="rateModelId != null">
|
||||||
|
rate_model_id = #{rateModelId,jdbcType=BIGINT},
|
||||||
|
</if>
|
||||||
|
<if test="businessInstructions != null">
|
||||||
|
business_instructions = #{businessInstructions,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="reminderInstructions != null">
|
||||||
|
reminder_instructions = #{reminderInstructions,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="imgId != null">
|
||||||
|
img_id = #{imgId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="stationType != null">
|
||||||
|
station_type = #{stationType,jdbcType=SMALLINT},
|
||||||
|
</if>
|
||||||
|
<if test="operatorIdEvcs != null">
|
||||||
|
operator_id_evcs = #{operatorIdEvcs,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="serviceTel != null">
|
||||||
|
service_tel = #{serviceTel,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="searchValue != null">
|
||||||
|
search_value = #{searchValue,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
<if test="parkNums != null">
|
||||||
|
park_nums = #{parkNums,jdbcType=INTEGER},
|
||||||
|
</if>
|
||||||
|
<if test="tenantId != null">
|
||||||
|
tenant_id = #{tenantId,jdbcType=VARCHAR},
|
||||||
|
</if>
|
||||||
|
</set>
|
||||||
|
where charging_station_id = #{chargingStationId,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
<update id="updateByPrimaryKey" parameterType="com.xhpc.databigscreen.pojo.XhpcChargingStation">
|
||||||
|
update xhpc_charging_station
|
||||||
|
set `name` = #{name,jdbcType=VARCHAR},
|
||||||
|
operator_id = #{operatorId,jdbcType=BIGINT},
|
||||||
|
`type` = #{type,jdbcType=INTEGER},
|
||||||
|
construction_site = #{constructionSite,jdbcType=SMALLINT},
|
||||||
|
service_facilities = #{serviceFacilities,jdbcType=VARCHAR},
|
||||||
|
periphery_facilities = #{peripheryFacilities,jdbcType=VARCHAR},
|
||||||
|
area_code = #{areaCode,jdbcType=INTEGER},
|
||||||
|
address = #{address,jdbcType=VARCHAR},
|
||||||
|
detailed_address = #{detailedAddress,jdbcType=VARCHAR},
|
||||||
|
longitude = #{longitude,jdbcType=VARCHAR},
|
||||||
|
latitude = #{latitude,jdbcType=VARCHAR},
|
||||||
|
parking_instructions = #{parkingInstructions,jdbcType=VARCHAR},
|
||||||
|
serial_number = #{serialNumber,jdbcType=VARCHAR},
|
||||||
|
client_visible = #{clientVisible,jdbcType=VARCHAR},
|
||||||
|
`status` = #{status,jdbcType=INTEGER},
|
||||||
|
del_flag = #{delFlag,jdbcType=INTEGER},
|
||||||
|
create_time = #{createTime,jdbcType=TIMESTAMP},
|
||||||
|
create_by = #{createBy,jdbcType=VARCHAR},
|
||||||
|
update_time = #{updateTime,jdbcType=TIMESTAMP},
|
||||||
|
update_by = #{updateBy,jdbcType=VARCHAR},
|
||||||
|
remark = #{remark,jdbcType=VARCHAR},
|
||||||
|
rate_model_id = #{rateModelId,jdbcType=BIGINT},
|
||||||
|
business_instructions = #{businessInstructions,jdbcType=VARCHAR},
|
||||||
|
reminder_instructions = #{reminderInstructions,jdbcType=VARCHAR},
|
||||||
|
img_id = #{imgId,jdbcType=VARCHAR},
|
||||||
|
station_type = #{stationType,jdbcType=SMALLINT},
|
||||||
|
operator_id_evcs = #{operatorIdEvcs,jdbcType=VARCHAR},
|
||||||
|
service_tel = #{serviceTel,jdbcType=VARCHAR},
|
||||||
|
search_value = #{searchValue,jdbcType=VARCHAR},
|
||||||
|
park_nums = #{parkNums,jdbcType=INTEGER},
|
||||||
|
tenant_id = #{tenantId,jdbcType=VARCHAR}
|
||||||
|
where charging_station_id = #{chargingStationId,jdbcType=BIGINT}
|
||||||
|
</update>
|
||||||
|
</mapper>
|
||||||
Loading…
x
Reference in New Issue
Block a user