diff --git a/data-center-business-common/src/main/java/com/techsor/datacenter/business/common/Constants.java b/data-center-business-common/src/main/java/com/techsor/datacenter/business/common/Constants.java index c72a51b..e8aed55 100644 --- a/data-center-business-common/src/main/java/com/techsor/datacenter/business/common/Constants.java +++ b/data-center-business-common/src/main/java/com/techsor/datacenter/business/common/Constants.java @@ -52,6 +52,7 @@ public class Constants { public static final String USER_OPERATION_LOG_TYPE_ASSET_LOG = "ASSET_LOG"; public static final String USER_OPERATION_LOG_TYPE_CLASS_LOG = "CLASS_LOG"; public static final String USER_OPERATION_LOG_TYPE_DEVICE_LOG = "DEVICE_LOG"; + public static final String USER_OPERATION_LOG_TYPE_GATEWAY_LOG = "GATEWAY_LOG"; public static final String USER_OPERATION_LOG_TYPE_DEVICE_TYPE_LOG = "DEVICE_TYPE_LOG"; public static final String USER_OPERATION_LOG_TYPE_ALERT_TEMPLATE_LOG = "ALERT_TEMPLATE_LOG"; public static final String USER_OPERATION_LOG_TYPE_FORWARD_LOG = "FORWARD_LOG"; diff --git a/data-center-business-controller/src/main/java/com/techsor/datacenter/business/controller/ApGatewayController.java b/data-center-business-controller/src/main/java/com/techsor/datacenter/business/controller/ApGatewayController.java new file mode 100644 index 0000000..fcdd0e1 --- /dev/null +++ b/data-center-business-controller/src/main/java/com/techsor/datacenter/business/controller/ApGatewayController.java @@ -0,0 +1,121 @@ +package com.techsor.datacenter.business.controller; + + +import com.techsor.datacenter.business.common.response.PageInfo; +import com.techsor.datacenter.business.common.response.PageResponse; +import com.techsor.datacenter.business.common.response.ResponseCode; +import com.techsor.datacenter.business.common.response.SimpleDataResponse; +import com.techsor.datacenter.business.dto.apgateway.*; +import com.techsor.datacenter.business.model.ApGateway; +import com.techsor.datacenter.business.service.ApGatewayService; +import com.techsor.datacenter.business.vo.apgateway.ApGatewayHeartbeatHistoryResponseVO; +import io.swagger.v3.oas.annotations.Hidden; +import io.swagger.v3.oas.annotations.Operation; +import io.swagger.v3.oas.annotations.Parameter; +import io.swagger.v3.oas.annotations.media.Schema; +import io.swagger.v3.oas.annotations.tags.Tag; +import lombok.extern.slf4j.Slf4j; +import org.springframework.beans.factory.annotation.Autowired; +import org.springframework.web.bind.annotation.*; + +@RestController +//@AccessRequired +@RequestMapping("/apgateway") +@Tag(name = "ApGatewayController",description = "Ap gateway control") +@Slf4j +public class ApGatewayController { + + @Autowired + private ApGatewayService apGatewayService; + + @Operation(summary = "Get Gateway clients list by param", description = "") + @PostMapping(path = "/getListPage") + public PageResponse> getApGatewayListPage( + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "User's company ID", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type 0: Chinese 1: English 2: Japanese", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType, + @Parameter(name = "UTCOffset", description = "Offset between GMT and local time in minutes, e.g., -480 for GMT+8") @RequestHeader(required = true) Integer UTCOffset, + @RequestBody ApGatewayQueryParam param){ + PageResponse> pageResponse = new PageResponse<>(); + try { + pageResponse.setData(apGatewayService.query(param, UserId, CompanyId, LanguageType)); + pageResponse.setCode(ResponseCode.SUCCESS); + pageResponse.setMsg("success"); + } catch (Exception e) { + log.error("Error querying device list", e); + pageResponse.setCode(ResponseCode.SERVER_ERROR); + pageResponse.setMsg("service error"); + } + return pageResponse; + } + + @Operation(summary = "add", description = "") + @PostMapping(path = "/add") + public SimpleDataResponse add( + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "User's company ID", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type 0: Chinese 1: English 2: Japanese", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType, + @Parameter(name = "UTCOffset", description = "Offset between GMT and local time in minutes, e.g., -480 for GMT+8") @RequestHeader(required = true) Integer UTCOffset, + @RequestBody ApGatewayAddParam param + ){ + return apGatewayService.add(param, UserId, CompanyId, LanguageType); + } + + @Operation(summary = "edit", description = "") + @PostMapping(path = "/edit") + public SimpleDataResponse edit( + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "User's company ID", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type 0: Chinese 1: English 2: Japanese", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType, + @Parameter(name = "UTCOffset", description = "Offset between GMT and local time in minutes, e.g., -480 for GMT+8") @RequestHeader(required = true) Integer UTCOffset, + @RequestBody ApGatewayEditParam param + ){ + return apGatewayService.edit(param, UserId, CompanyId, LanguageType); + } + + @Operation(summary = "Get built-in function list", description = "Retrieve the list of built-in functions") + @PostMapping(path = "/delete") + public SimpleDataResponse delete( + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "User's company ID", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type 0: Chinese 1: English 2: Japanese", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType, + @Parameter(name = "UTCOffset", description = "Offset between GMT and local time in minutes, e.g., -480 for GMT+8") @RequestHeader(required = true) Integer UTCOffset, + @RequestBody ApGatewayDeleteParam param + ){ + return apGatewayService.batchDelete(param, UserId, CompanyId, LanguageType); + } + + + @Hidden + @Operation(summary = "MQTT statistical history", description = "") + @PostMapping(path = "/heartbeat/getListPage") + public PageResponse> getStatisticsListPage( + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "User's company ID", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type 0: Chinese 1: English 2: Japanese", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType, + @Parameter(name = "UTCOffset", description = "Offset between GMT and local time in minutes, e.g., -480 for GMT+8") @RequestHeader(required = true) Integer UTCOffset, + @RequestBody ApGatewayHeartbeatQueryParam param){ + PageResponse> pageResponse = new PageResponse<>(); + try { + pageResponse.setData(apGatewayService.getApHeartbeatHistoryListPage(param, UserId, CompanyId, LanguageType)); + pageResponse.setCode(ResponseCode.SUCCESS); + pageResponse.setMsg("success"); + } catch (Exception e) { + log.error("Error heartbeat/getListPage", e); + pageResponse.setCode(ResponseCode.SERVER_ERROR); + pageResponse.setMsg("service error"); + } + return pageResponse; + } + +} diff --git a/data-center-business-controller/src/main/java/com/techsor/datacenter/business/controller/SalesforceController.java b/data-center-business-controller/src/main/java/com/techsor/datacenter/business/controller/SalesforceController.java index 50efb31..df00518 100644 --- a/data-center-business-controller/src/main/java/com/techsor/datacenter/business/controller/SalesforceController.java +++ b/data-center-business-controller/src/main/java/com/techsor/datacenter/business/controller/SalesforceController.java @@ -2,6 +2,7 @@ package com.techsor.datacenter.business.controller; import com.techsor.datacenter.business.dto.salesforce.SalesforceBingDeviceSearchParams; import com.techsor.datacenter.business.vo.device.DeviceShortVO; +import io.swagger.v3.oas.annotations.Hidden; import io.swagger.v3.oas.annotations.media.Schema; import io.swagger.v3.oas.annotations.tags.Tag; import io.swagger.v3.oas.annotations.Operation; @@ -107,6 +108,20 @@ public class SalesforceController { return pageResponse; } + @Operation(summary = "Get Salesforce drop-down list") + @RequestMapping(value = "/getListForBindBuilding", method = RequestMethod.GET) + public SimpleDataResponse> getListForBindBuilding( + @Parameter(name = "LoginName", description = "Login name", required = true, schema = @Schema(defaultValue = "admin")) @RequestHeader(required = true) String LoginName, + @Parameter(name = "AccessToken", description = "Authentication token", required = true) @RequestHeader(required = true) String AccessToken, + @Parameter(name = "UserId", description = "User ID", required = true, schema = @Schema(defaultValue = "1")) @RequestHeader(required = true) Long UserId, + @Parameter(name = "CompanyId", description = "User's company ID", required = false, schema = @Schema(defaultValue = "1")) @RequestHeader(required = false) Long CompanyId, + @Parameter(name = "LanguageType", description = "Language type 0: Chinese 1: English 2: Japanese", required = true, schema = @Schema(defaultValue = "2")) @RequestHeader(required = true) Integer LanguageType, + @Parameter(name = "UTCOffset", description = "Time difference in minutes from UTC, e.g., East 8 is -480", required = true, schema = @Schema(defaultValue = "-480")) @RequestHeader(required = true) Integer UTCOffset) throws BusinessException { + + return salesforceService.getListForBindBuilding(CompanyId, UserId, LanguageType, UTCOffset); + } + + @Hidden @Operation(summary = "Get device for binding") @RequestMapping(value = "/getDevicePageForBinding", method = RequestMethod.GET) public PageResponse> getDevicePageForBinding( diff --git a/data-center-business-controller/src/main/resources/db/migration/V78__ap_gateway.sql b/data-center-business-controller/src/main/resources/db/migration/V78__ap_gateway.sql new file mode 100644 index 0000000..b407bfa --- /dev/null +++ b/data-center-business-controller/src/main/resources/db/migration/V78__ap_gateway.sql @@ -0,0 +1,21 @@ +CREATE TABLE `ap_gateway` ( + `ap_gateway_id` bigint NOT NULL AUTO_INCREMENT, + `model` varchar(45) DEFAULT NULL COMMENT '型号,目前有: L5, EV07', + `imei` varchar(45) NOT NULL, + `mac` varchar(45) DEFAULT NULL, + `create_ts` bigint DEFAULT NULL, + `update_ts` bigint DEFAULT NULL, + `address` varchar(500) DEFAULT NULL, + `gps` varchar(100) DEFAULT NULL, + `latest_heartbeat_ts` bigint DEFAULT NULL, + `online_status` int DEFAULT '0' COMMENT '在线标记,1:在线,0:离线', + `battery` decimal(5,2) DEFAULT '-1.00' COMMENT '电量百分比,-1为无数据或无电池', + `flag` int DEFAULT NULL, + `company_id` bigint DEFAULT NULL, + `offline_interval` int DEFAULT '10', + `ack_flag` int DEFAULT NULL COMMENT '是否是ack下行,1:是,0:否', + `downlink_id` varchar(45) DEFAULT NULL COMMENT '下行ID,在Eview中就是sequenceId', + `auth_user_id` varchar(255) DEFAULT NULL COMMENT '认证用户ID', + `auth_pwd` varchar(255) DEFAULT NULL COMMENT '认证密码', + PRIMARY KEY (`ap_gateway_id`) +) ENGINE=InnoDB DEFAULT CHARSET=utf8mb4 COMMENT='硬件网关管理表'; \ No newline at end of file diff --git a/data-center-business-controller/src/main/resources/db/migration/V79__building_bind_sales.sql b/data-center-business-controller/src/main/resources/db/migration/V79__building_bind_sales.sql new file mode 100644 index 0000000..8171e74 --- /dev/null +++ b/data-center-business-controller/src/main/resources/db/migration/V79__building_bind_sales.sql @@ -0,0 +1,3 @@ + +ALTER TABLE basic_building ADD `salesforce_primary_id` bigint COMMENT 'salesforce表的主键ID'; + diff --git a/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/ApGatewayMapper.java b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/ApGatewayMapper.java new file mode 100644 index 0000000..0724f4e --- /dev/null +++ b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/auto/ApGatewayMapper.java @@ -0,0 +1,96 @@ +package com.techsor.datacenter.business.dao.auto; + +import com.techsor.datacenter.business.model.ApGateway; +import com.techsor.datacenter.business.model.ApGatewayExample; +import java.util.List; +import org.apache.ibatis.annotations.Param; + +public interface ApGatewayMapper { + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table ap_gateway + * + * @mbg.generated + */ + long countByExample(ApGatewayExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table ap_gateway + * + * @mbg.generated + */ + int deleteByExample(ApGatewayExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table ap_gateway + * + * @mbg.generated + */ + int deleteByPrimaryKey(Long apGatewayId); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table ap_gateway + * + * @mbg.generated + */ + int insert(ApGateway record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table ap_gateway + * + * @mbg.generated + */ + int insertSelective(ApGateway record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table ap_gateway + * + * @mbg.generated + */ + List selectByExample(ApGatewayExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table ap_gateway + * + * @mbg.generated + */ + ApGateway selectByPrimaryKey(Long apGatewayId); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table ap_gateway + * + * @mbg.generated + */ + int updateByExampleSelective(@Param("record") ApGateway record, @Param("example") ApGatewayExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table ap_gateway + * + * @mbg.generated + */ + int updateByExample(@Param("record") ApGateway record, @Param("example") ApGatewayExample example); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table ap_gateway + * + * @mbg.generated + */ + int updateByPrimaryKeySelective(ApGateway record); + + /** + * This method was generated by MyBatis Generator. + * This method corresponds to the database table ap_gateway + * + * @mbg.generated + */ + int updateByPrimaryKey(ApGateway record); +} \ No newline at end of file diff --git a/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/ApGatewayMapperExt.java b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/ApGatewayMapperExt.java new file mode 100644 index 0000000..b7c3b04 --- /dev/null +++ b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/ApGatewayMapperExt.java @@ -0,0 +1,16 @@ +package com.techsor.datacenter.business.dao.ex; + +import com.techsor.datacenter.business.dao.auto.ApGatewayMapper; +import com.techsor.datacenter.business.dto.apgateway.ApGatewayQueryParam; +import com.techsor.datacenter.business.model.ApGateway; +import org.apache.ibatis.annotations.Mapper; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +@Mapper +public interface ApGatewayMapperExt extends ApGatewayMapper { + + List getListPage(@Param("param") ApGatewayQueryParam param, @Param("companyId") Long companyId); + +} diff --git a/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/BasicSalesforceMapperExt.java b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/BasicSalesforceMapperExt.java index d860d2b..50025c7 100644 --- a/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/BasicSalesforceMapperExt.java +++ b/data-center-business-dao/src/main/java/com/techsor/datacenter/business/dao/ex/BasicSalesforceMapperExt.java @@ -18,4 +18,6 @@ public interface BasicSalesforceMapperExt extends BasicSalesforceMapper { List getListPage(SalesforceSearchParams pageSearchParam); List getDevicePageForBinding(SalesforceBingDeviceSearchParams pageSearchParam); + + List getListForBindBuilding(Long companyId); } diff --git a/data-center-business-dao/src/main/resources/mappers/auto/ApGatewayMapper.xml b/data-center-business-dao/src/main/resources/mappers/auto/ApGatewayMapper.xml new file mode 100644 index 0000000..9c08002 --- /dev/null +++ b/data-center-business-dao/src/main/resources/mappers/auto/ApGatewayMapper.xml @@ -0,0 +1,477 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + + + + + + + + and ${criterion.condition} + + + and ${criterion.condition} #{criterion.value} + + + and ${criterion.condition} #{criterion.value} and #{criterion.secondValue} + + + and ${criterion.condition} + + #{listItem} + + + + + + + + + + + + ap_gateway_id, model, imei, mac, create_ts, update_ts, address, gps, latest_heartbeat_ts, + online_status, battery, flag, company_id, offline_interval, ack_flag, downlink_id, + auth_user_id, auth_pwd + + + + + + delete from ap_gateway + where ap_gateway_id = #{apGatewayId,jdbcType=BIGINT} + + + + delete from ap_gateway + + + + + + + + SELECT LAST_INSERT_ID() + + insert into ap_gateway (model, imei, mac, + create_ts, update_ts, address, + gps, latest_heartbeat_ts, online_status, + battery, flag, company_id, + offline_interval, ack_flag, downlink_id, + auth_user_id, auth_pwd) + values (#{model,jdbcType=VARCHAR}, #{imei,jdbcType=VARCHAR}, #{mac,jdbcType=VARCHAR}, + #{createTs,jdbcType=BIGINT}, #{updateTs,jdbcType=BIGINT}, #{address,jdbcType=VARCHAR}, + #{gps,jdbcType=VARCHAR}, #{latestHeartbeatTs,jdbcType=BIGINT}, #{onlineStatus,jdbcType=INTEGER}, + #{battery,jdbcType=DECIMAL}, #{flag,jdbcType=INTEGER}, #{companyId,jdbcType=BIGINT}, + #{offlineInterval,jdbcType=INTEGER}, #{ackFlag,jdbcType=INTEGER}, #{downlinkId,jdbcType=VARCHAR}, + #{authUserId,jdbcType=VARCHAR}, #{authPwd,jdbcType=VARCHAR}) + + + + + SELECT LAST_INSERT_ID() + + insert into ap_gateway + + + model, + + + imei, + + + mac, + + + create_ts, + + + update_ts, + + + address, + + + gps, + + + latest_heartbeat_ts, + + + online_status, + + + battery, + + + flag, + + + company_id, + + + offline_interval, + + + ack_flag, + + + downlink_id, + + + auth_user_id, + + + auth_pwd, + + + + + #{model,jdbcType=VARCHAR}, + + + #{imei,jdbcType=VARCHAR}, + + + #{mac,jdbcType=VARCHAR}, + + + #{createTs,jdbcType=BIGINT}, + + + #{updateTs,jdbcType=BIGINT}, + + + #{address,jdbcType=VARCHAR}, + + + #{gps,jdbcType=VARCHAR}, + + + #{latestHeartbeatTs,jdbcType=BIGINT}, + + + #{onlineStatus,jdbcType=INTEGER}, + + + #{battery,jdbcType=DECIMAL}, + + + #{flag,jdbcType=INTEGER}, + + + #{companyId,jdbcType=BIGINT}, + + + #{offlineInterval,jdbcType=INTEGER}, + + + #{ackFlag,jdbcType=INTEGER}, + + + #{downlinkId,jdbcType=VARCHAR}, + + + #{authUserId,jdbcType=VARCHAR}, + + + #{authPwd,jdbcType=VARCHAR}, + + + + + + + update ap_gateway + + + ap_gateway_id = #{record.apGatewayId,jdbcType=BIGINT}, + + + model = #{record.model,jdbcType=VARCHAR}, + + + imei = #{record.imei,jdbcType=VARCHAR}, + + + mac = #{record.mac,jdbcType=VARCHAR}, + + + create_ts = #{record.createTs,jdbcType=BIGINT}, + + + update_ts = #{record.updateTs,jdbcType=BIGINT}, + + + address = #{record.address,jdbcType=VARCHAR}, + + + gps = #{record.gps,jdbcType=VARCHAR}, + + + latest_heartbeat_ts = #{record.latestHeartbeatTs,jdbcType=BIGINT}, + + + online_status = #{record.onlineStatus,jdbcType=INTEGER}, + + + battery = #{record.battery,jdbcType=DECIMAL}, + + + flag = #{record.flag,jdbcType=INTEGER}, + + + company_id = #{record.companyId,jdbcType=BIGINT}, + + + offline_interval = #{record.offlineInterval,jdbcType=INTEGER}, + + + ack_flag = #{record.ackFlag,jdbcType=INTEGER}, + + + downlink_id = #{record.downlinkId,jdbcType=VARCHAR}, + + + auth_user_id = #{record.authUserId,jdbcType=VARCHAR}, + + + auth_pwd = #{record.authPwd,jdbcType=VARCHAR}, + + + + + + + + + update ap_gateway + set ap_gateway_id = #{record.apGatewayId,jdbcType=BIGINT}, + model = #{record.model,jdbcType=VARCHAR}, + imei = #{record.imei,jdbcType=VARCHAR}, + mac = #{record.mac,jdbcType=VARCHAR}, + create_ts = #{record.createTs,jdbcType=BIGINT}, + update_ts = #{record.updateTs,jdbcType=BIGINT}, + address = #{record.address,jdbcType=VARCHAR}, + gps = #{record.gps,jdbcType=VARCHAR}, + latest_heartbeat_ts = #{record.latestHeartbeatTs,jdbcType=BIGINT}, + online_status = #{record.onlineStatus,jdbcType=INTEGER}, + battery = #{record.battery,jdbcType=DECIMAL}, + flag = #{record.flag,jdbcType=INTEGER}, + company_id = #{record.companyId,jdbcType=BIGINT}, + offline_interval = #{record.offlineInterval,jdbcType=INTEGER}, + ack_flag = #{record.ackFlag,jdbcType=INTEGER}, + downlink_id = #{record.downlinkId,jdbcType=VARCHAR}, + auth_user_id = #{record.authUserId,jdbcType=VARCHAR}, + auth_pwd = #{record.authPwd,jdbcType=VARCHAR} + + + + + + + update ap_gateway + + + model = #{model,jdbcType=VARCHAR}, + + + imei = #{imei,jdbcType=VARCHAR}, + + + mac = #{mac,jdbcType=VARCHAR}, + + + create_ts = #{createTs,jdbcType=BIGINT}, + + + update_ts = #{updateTs,jdbcType=BIGINT}, + + + address = #{address,jdbcType=VARCHAR}, + + + gps = #{gps,jdbcType=VARCHAR}, + + + latest_heartbeat_ts = #{latestHeartbeatTs,jdbcType=BIGINT}, + + + online_status = #{onlineStatus,jdbcType=INTEGER}, + + + battery = #{battery,jdbcType=DECIMAL}, + + + flag = #{flag,jdbcType=INTEGER}, + + + company_id = #{companyId,jdbcType=BIGINT}, + + + offline_interval = #{offlineInterval,jdbcType=INTEGER}, + + + ack_flag = #{ackFlag,jdbcType=INTEGER}, + + + downlink_id = #{downlinkId,jdbcType=VARCHAR}, + + + auth_user_id = #{authUserId,jdbcType=VARCHAR}, + + + auth_pwd = #{authPwd,jdbcType=VARCHAR}, + + + where ap_gateway_id = #{apGatewayId,jdbcType=BIGINT} + + + + update ap_gateway + set model = #{model,jdbcType=VARCHAR}, + imei = #{imei,jdbcType=VARCHAR}, + mac = #{mac,jdbcType=VARCHAR}, + create_ts = #{createTs,jdbcType=BIGINT}, + update_ts = #{updateTs,jdbcType=BIGINT}, + address = #{address,jdbcType=VARCHAR}, + gps = #{gps,jdbcType=VARCHAR}, + latest_heartbeat_ts = #{latestHeartbeatTs,jdbcType=BIGINT}, + online_status = #{onlineStatus,jdbcType=INTEGER}, + battery = #{battery,jdbcType=DECIMAL}, + flag = #{flag,jdbcType=INTEGER}, + company_id = #{companyId,jdbcType=BIGINT}, + offline_interval = #{offlineInterval,jdbcType=INTEGER}, + ack_flag = #{ackFlag,jdbcType=INTEGER}, + downlink_id = #{downlinkId,jdbcType=VARCHAR}, + auth_user_id = #{authUserId,jdbcType=VARCHAR}, + auth_pwd = #{authPwd,jdbcType=VARCHAR} + where ap_gateway_id = #{apGatewayId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/data-center-business-dao/src/main/resources/mappers/auto/BasicBuildingMapper.xml b/data-center-business-dao/src/main/resources/mappers/auto/BasicBuildingMapper.xml index 7705ab8..cd53e3e 100644 --- a/data-center-business-dao/src/main/resources/mappers/auto/BasicBuildingMapper.xml +++ b/data-center-business-dao/src/main/resources/mappers/auto/BasicBuildingMapper.xml @@ -23,6 +23,7 @@ + building_id, company_id, `name`, address, flag, create_time, creator_id, modify_time, modifier_id, udf_building_id, building_bucket, thumbnail_num, show_switch_2d3d, brief_introduction, - latitude, longitude, retain_alert + latitude, longitude, retain_alert, salesforce_primary_id