From 172ee9a72b0ed822f6b7d4207f764d9085f49ae3 Mon Sep 17 00:00:00 2001 From: wenhui <1455474577@qq.com> Date: Wed, 9 Mar 2022 10:41:59 +0800 Subject: [PATCH] =?UTF-8?q?=E5=AE=8C=E6=88=90=E7=94=A8=E6=88=B7=E6=80=BB?= =?UTF-8?q?=E6=95=B0=E9=87=8F=E6=8E=A5=E5=8F=A3?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- .../xhpc/common/constant/ConstantClass.java | 22 + .../XhpcDataBigScreenController.java | 12 +- .../xhpc/databigscreen/domain/CoreParam.java | 7 + .../domain/ReturnCoreLocation.java | 42 -- .../mapper/XhpcAppUserMapper.java | 33 + .../mapper/XhpcChargingStationMapper.java | 14 +- .../mapper/XhpcHistoryOrderMapper.java | 31 + .../xhpc/databigscreen/pojo/XhpcAppUser.java | 118 +++ .../databigscreen/pojo/XhpcHistoryOrder.java | 271 +++++++ .../service/XhpcDataBigScreenService.java | 9 + .../impl/XhpcDataBigScreenServiceImpl.java | 172 ++++- .../resources/mapper/XhpcAppUserMapper.xml | 299 ++++++++ .../mapper/XhpcChargingStationMapper.xml | 21 +- .../mapper/XhpcHistoryOrderMapper.xml | 707 ++++++++++++++++++ 14 files changed, 1675 insertions(+), 83 deletions(-) create mode 100644 xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/constant/ConstantClass.java delete mode 100644 xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/domain/ReturnCoreLocation.java create mode 100644 xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcAppUserMapper.java create mode 100644 xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcHistoryOrderMapper.java create mode 100644 xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/pojo/XhpcAppUser.java create mode 100644 xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/pojo/XhpcHistoryOrder.java create mode 100644 xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcAppUserMapper.xml create mode 100644 xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcHistoryOrderMapper.xml diff --git a/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/constant/ConstantClass.java b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/constant/ConstantClass.java new file mode 100644 index 00000000..6951cc94 --- /dev/null +++ b/xhpc-modules/xhpc-common/src/main/java/com/xhpc/common/constant/ConstantClass.java @@ -0,0 +1,22 @@ +package com.xhpc.common.constant; + +import lombok.extern.slf4j.Slf4j; + +/** + * 全局静态常量类 + * + * @author WH + * @date 2022/3/9 10:31 + * @since version-1.0 + */ +@Slf4j +public class ConstantClass { + + private ConstantClass() { + + log.debug("This is a constant class!"); + } + + public static final String CHARGING_STATION_ID = "chargingStationId"; + +} diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/controller/XhpcDataBigScreenController.java b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/controller/XhpcDataBigScreenController.java index c187db72..b5e0d76d 100644 --- a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/controller/XhpcDataBigScreenController.java +++ b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/controller/XhpcDataBigScreenController.java @@ -19,16 +19,16 @@ public class XhpcDataBigScreenController extends BaseController { @Resource XhpcDataBigScreenService xhpcDataBigScreenService; - //@GetMapping("/user-total-count") - //public R> queryUserTotalCount(@RequestBody ) { - // - // return xhpcCardService.queryDeviceList(currentPage, items); - //} - @GetMapping("/core-locations") public R>> returnCoreLocation(CoreParam coreParam) { return xhpcDataBigScreenService.returnCoreLocation(coreParam); } + @GetMapping("/user-total-count") + public R queryUserTotalCount(CoreParam coreParam) { + + return xhpcDataBigScreenService.queryUserTotalCount(coreParam); + } + } diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/domain/CoreParam.java b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/domain/CoreParam.java index 184da7a6..d3edcdbf 100644 --- a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/domain/CoreParam.java +++ b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/domain/CoreParam.java @@ -17,5 +17,12 @@ public class CoreParam { private String tenantIds; private Integer areaCode; private String chargingStationIds; + /** + * 前端传递进来的参数是用于查询什么的 + * 0,全国 + * 1,省市区 + * 2,场站 + */ + private Integer paramType; } diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/domain/ReturnCoreLocation.java b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/domain/ReturnCoreLocation.java deleted file mode 100644 index d332721b..00000000 --- a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/domain/ReturnCoreLocation.java +++ /dev/null @@ -1,42 +0,0 @@ -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; - -} diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcAppUserMapper.java b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcAppUserMapper.java new file mode 100644 index 00000000..3ea2c2e1 --- /dev/null +++ b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcAppUserMapper.java @@ -0,0 +1,33 @@ +package com.xhpc.databigscreen.mapper; + +import com.xhpc.databigscreen.pojo.XhpcAppUser; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface XhpcAppUserMapper { + + int deleteByPrimaryKey(Long appUserId); + + int insert(XhpcAppUser record); + + int insertSelective(XhpcAppUser record); + + XhpcAppUser selectByPrimaryKey(Long appUserId); + + int updateByPrimaryKeySelective(XhpcAppUser record); + + int updateByPrimaryKey(XhpcAppUser record); + + /** + * query user total count by according one or multiple tenant id + * + * @param tenantIdList 租户集合 + * @return 租户数量 + * @author WH + * @date 2022/3/4 10:37 + * @since version-1.0 + */ + Long selectTotalCountByTenantId(@Param("tenantIdList") List tenantIdList); + +} \ No newline at end of file diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcChargingStationMapper.java b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcChargingStationMapper.java index 0846d02c..50fe740f 100644 --- a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcChargingStationMapper.java +++ b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcChargingStationMapper.java @@ -3,7 +3,6 @@ package com.xhpc.databigscreen.mapper; import com.xhpc.databigscreen.pojo.XhpcChargingStation; import org.apache.ibatis.annotations.Param; -import java.util.ArrayList; import java.util.List; import java.util.Map; @@ -26,13 +25,22 @@ public interface XhpcChargingStationMapper { * @date 2022/2/28 17:50 * @since version-1.0 */ - List> selectByTenantIdAndChargingStationId(@Param("tenantIdList") ArrayList tenantIdList, @Param("chargingStationId") Long chargingStationId); + List> selectByTenantIdAndChargingStationId(@Param("tenantIdList") List tenantIdList, @Param("chargingStationId") Long chargingStationId); /** * @author WH * @date 2022/3/3 15:20 * @since version-1.0 */ - List> selectByTenantIdAndAreaCode(@Param("tenantIdStr") String tenantIdStr, @Param("areaCode") Integer areaCode); + List> selectByTenantIdAndAreaCode(@Param("tenantIdList") List tenantIdList, @Param("areaCode") Integer areaCode); + + /** + * query id of charging station by list of tenant id + * + * @author WH + * @date 2022/3/4 11:21 + * @since version-1.0 + */ + List selectChargingStationIds(@Param("tenantIdList") List tenantIdList); } \ No newline at end of file diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcHistoryOrderMapper.java b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcHistoryOrderMapper.java new file mode 100644 index 00000000..19f95bd2 --- /dev/null +++ b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/mapper/XhpcHistoryOrderMapper.java @@ -0,0 +1,31 @@ +package com.xhpc.databigscreen.mapper; + +import com.xhpc.databigscreen.pojo.XhpcHistoryOrder; +import org.apache.ibatis.annotations.Param; + +import java.util.List; + +public interface XhpcHistoryOrderMapper { + + int deleteByPrimaryKey(Long historyOrderId); + + int insert(XhpcHistoryOrder record); + + int insertSelective(XhpcHistoryOrder record); + + XhpcHistoryOrder selectByPrimaryKey(Long historyOrderId); + + int updateByPrimaryKeySelective(XhpcHistoryOrder record); + + int updateByPrimaryKey(XhpcHistoryOrder record); + + /** + * query user total count by multiple tenant id and multiple charging station id and user type + * + * @author WH + * @date 2022/3/4 15:32 + * @since version-1.0 + */ + Long selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserType(@Param("tenantIdList") List tenantIdList, @Param("chargingStationIdList") List chargingStationIdList, @Param("userType") Integer userType); + +} \ No newline at end of file diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/pojo/XhpcAppUser.java b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/pojo/XhpcAppUser.java new file mode 100644 index 00000000..07aa193b --- /dev/null +++ b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/pojo/XhpcAppUser.java @@ -0,0 +1,118 @@ +package com.xhpc.databigscreen.pojo; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * xhpc_app_user + * + * @author + */ +@Data +public class XhpcAppUser implements Serializable { + + /** + * 用户ID + */ + private Long appUserId; + + /** + * 手机号码 + */ + private String phone; + + private String weixinOpenId; + + private String alipayOpenId; + + /** + * 微信是否登录(0未登录 1已登录) + */ + private Integer weixinLogin; + + /** + * 支付宝是否登录(0未登录 1已登录) + */ + private Integer alipayLogin; + + /** + * 头像地址 + */ + private String avatar; + + /** + * 余额 + */ + private BigDecimal balance; + + /** + * 密码(加密) + */ + private String password; + + /** + * 帐号状态 + */ + private Integer status; + + /** + * 是否有退款订单审核(0无 1有) + */ + private Integer isRefundApplication; + + /** + * 删除标志(0代表存在 2代表删除) + */ + private String delFlag; + + /** + * 创建者 + */ + private String createBy; + + /** + * 创建时间 + */ + private Date createTime; + + /** + * 更新者 + */ + private String updateBy; + + /** + * 更新时间 + */ + private Date updateTime; + + /** + * 备注 + */ + private String remark; + + /** + * 用户设置的SOC + */ + private Integer soc; + + /** + * 是否退款 0 不退款 1 退款 + */ + private Integer isRefund; + + /** + * 租户id + */ + private String tenantId; + + /** + * 是否开启电池保护 0 未开启 1开启 + */ + private Integer socProtect; + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/pojo/XhpcHistoryOrder.java b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/pojo/XhpcHistoryOrder.java new file mode 100644 index 00000000..34a3b9df --- /dev/null +++ b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/pojo/XhpcHistoryOrder.java @@ -0,0 +1,271 @@ +package com.xhpc.databigscreen.pojo; + +import lombok.Data; + +import java.io.Serializable; +import java.math.BigDecimal; +import java.util.Date; + +/** + * xhpc_history_order + * + * @author + */ +@Data +public class XhpcHistoryOrder implements Serializable { + + /** + * 历史订单id + */ + private Long historyOrderId; + + /** + * 电站id + */ + private Long chargingStationId; + + /** + * 充电订单id + */ + private Long chargeOrderId; + + /** + * 用户id + */ + private Long userId; + + /** + * 终端id + */ + private Long terminalId; + + /** + * 订单编号 + */ + private String serialNumber; + + /** + * 流量方订单号 + */ + private String internetSerialNumber; + + /** + * 总电费 + */ + private BigDecimal powerPriceTotal; + + /** + * 总服务费 + */ + private BigDecimal servicePriceTotal; + + /** + * 订单总价 + */ + private BigDecimal totalPrice; + + /** + * 电站活动抵扣--抵扣的总金额 + */ + private BigDecimal promotionDiscount; + + /** + * 实际价格-用户支付的钱 + */ + private BigDecimal actPrice; + + /** + * 实收电费-运营商电费 + */ + private BigDecimal actPowerPrice; + + /** + * 实收服务费-运营商服务费 + */ + private BigDecimal actServicePrice; + + /** + * 流量方总金额抽成 + */ + private BigDecimal internetCommission; + + /** + * 流量方服务费抽成 + */ + private BigDecimal internetSvcCommission; + + /** + * 平台总金额抽成 + */ + private BigDecimal platformCommission; + + /** + * 平台服务费抽成 + */ + private BigDecimal platformSvcCommisssion; + + /** + * 运维总抽成 + */ + private BigDecimal operationCommission; + + /** + * 运维服务费抽成 + */ + private BigDecimal operationSvcCommission; + + /** + * 开始充电soc + */ + private String startSoc; + + /** + * 结束时soc + */ + private String endSoc; + + /** + * 对账状态(0待确认 1已确认,2待提交,3待审核) + */ + private Integer reconciliationStatus; + + /** + * 清分状态(0待清分 1清分在途,2已提现,3待提交,4待审核) + */ + private Integer sortingStatus; + + /** + * 1 自动结算 2 平台结算 + */ + private Byte type; + + /** + * 状态(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; + + /** + * 0未统计 1小时统计 2 其他统计 + */ + private Integer state; + + /** + * VIN 码 + */ + private String vinNormal; + + private String searchValue; + + /** + * 运营商在EVCS分配的唯一OperatorID + */ + private String operatorIdEvcs; + + /** + * 终端客户开启充电方式 + */ + private Integer chargeModelEvcs; + + /** + * 接口额定功率 + */ + private Double connectorPowerEvcs; + + /** + * 电表总起值 + */ + private Double meterValueEndEvcs; + + /** + * 电表总结束值 + */ + private Double meterValueStartEvcs; + + /** + * 流量方OperatorID + */ + private String operatorId3rdptyEvcs; + + private Date startTime; + + /** + * 结束时间 + */ + private Date endTime; + + private Integer stopReasonEvcs; + + /** + * 电量 + */ + private Double totalPower; + + private String userNameEvcs; + + private String phone; + + /** + * 互联网订单流水号 + */ + private String evcsOrderNo; + + /** + * -1:未推送/推送失败 0:成功 1:争议交易 2~99:自定义 + */ + private Integer confirmResult; + + private Long rateModelId; + + /** + * 充电方式 + */ + private String chargingMode; + + /** + * 流量方电量抽成 + */ + private BigDecimal internetDegreeCommission; + + /** + * 订单来源(0 C端用户 1 流量方用户 2社区用户 3B端用户) + */ + private Integer source; + + /** + * 租户id + */ + private String tenantId; + + private static final long serialVersionUID = 1L; + +} \ No newline at end of file diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/service/XhpcDataBigScreenService.java b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/service/XhpcDataBigScreenService.java index 4df28371..994f5dc8 100644 --- a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/service/XhpcDataBigScreenService.java +++ b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/service/XhpcDataBigScreenService.java @@ -22,4 +22,13 @@ public interface XhpcDataBigScreenService { */ R>> returnCoreLocation(CoreParam coreParam); + /** + * query total count of user + * + * @author WH + * @date 2022/3/3 18:34 + * @since version-1.0 + */ + R queryUserTotalCount(CoreParam coreParam); + } diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/service/impl/XhpcDataBigScreenServiceImpl.java b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/service/impl/XhpcDataBigScreenServiceImpl.java index 3153e999..f728df90 100644 --- a/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/service/impl/XhpcDataBigScreenServiceImpl.java +++ b/xhpc-modules/xhpc-data-big-screen/src/main/java/com/xhpc/databigscreen/service/impl/XhpcDataBigScreenServiceImpl.java @@ -1,8 +1,12 @@ package com.xhpc.databigscreen.service.impl; +import com.xhpc.common.constant.ConstantClass; import com.xhpc.common.core.domain.R; +import com.xhpc.common.util.UserTypeUtil; import com.xhpc.databigscreen.domain.CoreParam; +import com.xhpc.databigscreen.mapper.XhpcAppUserMapper; import com.xhpc.databigscreen.mapper.XhpcChargingStationMapper; +import com.xhpc.databigscreen.mapper.XhpcHistoryOrderMapper; import com.xhpc.databigscreen.service.XhpcDataBigScreenService; import org.springframework.stereotype.Service; @@ -11,6 +15,7 @@ import java.util.ArrayList; import java.util.Arrays; import java.util.List; import java.util.Map; +import java.util.stream.Collectors; /** * @author WH @@ -22,42 +27,149 @@ public class XhpcDataBigScreenServiceImpl implements XhpcDataBigScreenService { @Resource XhpcChargingStationMapper xhpcChargingStationMapper; + @Resource + XhpcAppUserMapper xhpcAppUserMapper; + @Resource + XhpcHistoryOrderMapper xhpcHistoryOrderMapper; @Override public R>> returnCoreLocation(CoreParam coreParam) { + + String tenantIdsStr = null; + List> xhpcChargingStationList = null; + List tenantIdList = null; + String[] tenantIdArray = null; + + if (coreParam.getParamType() == null) { + return R.fail("ParamType不能为null"); + } //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 tenantIdList = new ArrayList<>(); - if (!"".equals(tenantIds) && tenantIds != null) { - String[] tenantIdArray = tenantIds.split(","); - List tenantIdStrList = Arrays.asList(tenantIdArray); - for (String tenantIdStr : tenantIdStrList) { - Long tenantId = Long.valueOf(tenantIdStr); - tenantIdList.add(tenantId); - } + switch (coreParam.getParamType()) { + case 0: + tenantIdsStr = coreParam.getTenantIds(); + if (!"".equals(tenantIdsStr) && tenantIdsStr != null) { + tenantIdArray = tenantIdsStr.split(","); + tenantIdList = Arrays.stream(tenantIdArray).collect(Collectors.toList()); + xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantIdAndChargingStationId(tenantIdList, null); + return R.ok(xhpcChargingStationList); + } else { + xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantIdAndChargingStationId(null, null); + return R.ok(xhpcChargingStationList); } - List> xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantIdAndChargingStationId(tenantIdList, null); - return R.ok(xhpcChargingStationList); - } else { + case 1: + //query charging station infos of whole area + Integer areaCode = coreParam.getAreaCode(); + tenantIdsStr = coreParam.getTenantIds(); + if (!"".equals(tenantIdsStr) && tenantIdsStr != null) { + tenantIdArray = tenantIdsStr.split(","); + tenantIdList = Arrays.stream(tenantIdArray).collect(Collectors.toList()); + xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantIdAndAreaCode(tenantIdList, areaCode); + return R.ok(xhpcChargingStationList); + } else { + xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantIdAndAreaCode(null, areaCode); + return R.ok(xhpcChargingStationList); + } + case 2: //query location info of special charging station of special tenant - String tenantIdStr = coreParam.getTenantIds(); - ArrayList tenantIdList = new ArrayList<>(); - long tenantId = Long.parseLong(tenantIdStr); - tenantIdList.add(tenantId); - String chargingStationIdStr = coreParam.getChargingStationIds(); - long chargingStationId = Long.parseLong(chargingStationIdStr); - List> xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantIdAndChargingStationId(tenantIdList, chargingStationId); - return R.ok(xhpcChargingStationList); - } - } else { - //query charging station infos of whole area - String tenantIdStr = coreParam.getTenantIds(); - Integer areaCode = coreParam.getAreaCode(); - List> xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantIdAndAreaCode(tenantIdStr, areaCode); - return R.ok(xhpcChargingStationList); + tenantIdsStr = coreParam.getTenantIds(); + if (!"".equals(tenantIdsStr) && tenantIdsStr != null) { + tenantIdArray = tenantIdsStr.split(","); + tenantIdList = Arrays.stream(tenantIdArray).collect(Collectors.toList()); + String chargingStationIdStr = coreParam.getChargingStationIds(); + long chargingStationId = Long.parseLong(chargingStationIdStr); + xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantIdAndChargingStationId(tenantIdList, chargingStationId); + return R.ok(xhpcChargingStationList); + } else { + return R.fail("传入的参数有误"); + } + default: + return R.fail("传入参数有误!"); } } + + @Override + public R queryUserTotalCount(CoreParam coreParam) { + + String tenantIdsStr = null; + List> xhpcChargingStationList = null; + List tenantIdList = null; + String[] tenantIdArray = null; + + //judge care param function + switch (coreParam.getParamType()) { + case 0: + tenantIdsStr = coreParam.getTenantIds(); + if (!"".equals(tenantIdsStr) && tenantIdsStr != null) { + tenantIdArray = tenantIdsStr.split(","); + tenantIdList = Arrays.stream(tenantIdArray).collect(Collectors.toList()); + //get user count of c client + Long appUserCount = xhpcAppUserMapper.selectTotalCountByTenantId(tenantIdList); + List chargingStationIdList = xhpcChargingStationMapper.selectChargingStationIds(tenantIdList); + //(0 C端用户 1 流量方用户 2社区用户 3B端用户) + Long communityUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserType(tenantIdList, chargingStationIdList, UserTypeUtil.COMMUNIT_TYPE); + Long customerUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserType(tenantIdList, chargingStationIdList, UserTypeUtil.CUSTOMERS_TYPE); + return R.ok(appUserCount + communityUserCount + customerUserCount); + } else { + //get user count of c client + Long appUserCount = xhpcAppUserMapper.selectTotalCountByTenantId(tenantIdList); + List chargingStationIdList = xhpcChargingStationMapper.selectChargingStationIds(tenantIdList); + //(0 C端用户 1 流量方用户 2社区用户 3B端用户) + Long communityUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserType(tenantIdList, chargingStationIdList, UserTypeUtil.COMMUNIT_TYPE); + Long customerUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserType(tenantIdList, chargingStationIdList, UserTypeUtil.CUSTOMERS_TYPE); + return R.ok(appUserCount + communityUserCount + customerUserCount); + } + //query charging station infos of whole area + case 1: + Integer areaCode = coreParam.getAreaCode(); + tenantIdsStr = coreParam.getTenantIds(); + if (!"".equals(tenantIdsStr) && tenantIdsStr != null) { + tenantIdArray = tenantIdsStr.split(","); + tenantIdList = Arrays.stream(tenantIdArray).collect(Collectors.toList()); + xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantIdAndAreaCode(tenantIdList, areaCode); + ArrayList chargingStationIdList = new ArrayList<>(); + for (Map chargingStation : xhpcChargingStationList) { + chargingStationIdList.add((Long) chargingStation.get(ConstantClass.CHARGING_STATION_ID)); + } + Long appUserCount = xhpcAppUserMapper.selectTotalCountByTenantId(tenantIdList); + Long communityUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserType(tenantIdList, chargingStationIdList, UserTypeUtil.COMMUNIT_TYPE); + Long customerUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserType(tenantIdList, chargingStationIdList, UserTypeUtil.CUSTOMERS_TYPE); + return R.ok(appUserCount + communityUserCount + customerUserCount); + } else { + xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantIdAndAreaCode(tenantIdList, areaCode); + ArrayList chargingStationIdList = new ArrayList<>(); + for (Map chargingStation : xhpcChargingStationList) { + chargingStationIdList.add((Long) chargingStation.get(ConstantClass.CHARGING_STATION_ID)); + } + Long appUserCount = xhpcAppUserMapper.selectTotalCountByTenantId(tenantIdList); + Long communityUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserType(tenantIdList, chargingStationIdList, UserTypeUtil.COMMUNIT_TYPE); + Long customerUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserType(tenantIdList, chargingStationIdList, UserTypeUtil.CUSTOMERS_TYPE); + return R.ok(appUserCount + communityUserCount + customerUserCount); + } + case 2: + //query location info of special charging station of special tenant + tenantIdsStr = coreParam.getTenantIds(); + if (!"".equals(tenantIdsStr) && tenantIdsStr != null) { + tenantIdArray = tenantIdsStr.split(","); + tenantIdList = Arrays.stream(tenantIdArray).collect(Collectors.toList()); + String chargingStationIdStr = coreParam.getChargingStationIds(); + long chargingStationId = Long.parseLong(chargingStationIdStr); + xhpcChargingStationList = xhpcChargingStationMapper.selectByTenantIdAndChargingStationId(tenantIdList, chargingStationId); + ArrayList chargingStationIdList = new ArrayList<>(); + for (Map chargingStation : xhpcChargingStationList) { + chargingStationIdList.add((Long) chargingStation.get(ConstantClass.CHARGING_STATION_ID)); + } + Long appUserCount = xhpcAppUserMapper.selectTotalCountByTenantId(tenantIdList); + Long communityUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserType(tenantIdList, chargingStationIdList, UserTypeUtil.COMMUNIT_TYPE); + Long customerUserCount = xhpcHistoryOrderMapper.selectUserTotalCountByTenantIdsAndChargingStationIdsAndUserType(tenantIdList, chargingStationIdList, UserTypeUtil.CUSTOMERS_TYPE); + return R.ok(appUserCount + communityUserCount + customerUserCount); + } else { + return R.fail("传入的参数有误"); + } + default: + R.fail("param type is invalid"); + break; + } + return null; + } + } diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcAppUserMapper.xml b/xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcAppUserMapper.xml new file mode 100644 index 00000000..45a8cd25 --- /dev/null +++ b/xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcAppUserMapper.xml @@ -0,0 +1,299 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + app_user_id + , phone, weixin_open_id, alipay_open_id, weixin_login, alipay_login, avatar, + balance, `password`, `status`, is_refund_application, del_flag, create_by, create_time, + update_by, update_time, remark, soc, is_refund, tenant_id, soc_protect + + + + + delete + from xhpc_app_user + where app_user_id = #{appUserId,jdbcType=BIGINT} + + + insert into xhpc_app_user (phone, weixin_open_id, alipay_open_id, + weixin_login, alipay_login, avatar, + balance, `password`, `status`, + is_refund_application, del_flag, create_by, + create_time, update_by, update_time, + remark, soc, is_refund, + tenant_id, soc_protect) + values (#{phone,jdbcType=VARCHAR}, #{weixinOpenId,jdbcType=VARCHAR}, #{alipayOpenId,jdbcType=VARCHAR}, + #{weixinLogin,jdbcType=INTEGER}, #{alipayLogin,jdbcType=INTEGER}, #{avatar,jdbcType=VARCHAR}, + #{balance,jdbcType=DECIMAL}, #{password,jdbcType=VARCHAR}, #{status,jdbcType=INTEGER}, + #{isRefundApplication,jdbcType=INTEGER}, #{delFlag,jdbcType=CHAR}, #{createBy,jdbcType=VARCHAR}, + #{createTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{updateTime,jdbcType=TIMESTAMP}, + #{remark,jdbcType=VARCHAR}, #{soc,jdbcType=INTEGER}, #{isRefund,jdbcType=INTEGER}, + #{tenantId,jdbcType=VARCHAR}, #{socProtect,jdbcType=INTEGER}) + + + insert into xhpc_app_user + + + phone, + + + weixin_open_id, + + + alipay_open_id, + + + weixin_login, + + + alipay_login, + + + avatar, + + + balance, + + + `password`, + + + `status`, + + + is_refund_application, + + + del_flag, + + + create_by, + + + create_time, + + + update_by, + + + update_time, + + + remark, + + + soc, + + + is_refund, + + + tenant_id, + + + soc_protect, + + + + + #{phone,jdbcType=VARCHAR}, + + + #{weixinOpenId,jdbcType=VARCHAR}, + + + #{alipayOpenId,jdbcType=VARCHAR}, + + + #{weixinLogin,jdbcType=INTEGER}, + + + #{alipayLogin,jdbcType=INTEGER}, + + + #{avatar,jdbcType=VARCHAR}, + + + #{balance,jdbcType=DECIMAL}, + + + #{password,jdbcType=VARCHAR}, + + + #{status,jdbcType=INTEGER}, + + + #{isRefundApplication,jdbcType=INTEGER}, + + + #{delFlag,jdbcType=CHAR}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{remark,jdbcType=VARCHAR}, + + + #{soc,jdbcType=INTEGER}, + + + #{isRefund,jdbcType=INTEGER}, + + + #{tenantId,jdbcType=VARCHAR}, + + + #{socProtect,jdbcType=INTEGER}, + + + + + update xhpc_app_user + + + phone = #{phone,jdbcType=VARCHAR}, + + + weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR}, + + + alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR}, + + + weixin_login = #{weixinLogin,jdbcType=INTEGER}, + + + alipay_login = #{alipayLogin,jdbcType=INTEGER}, + + + avatar = #{avatar,jdbcType=VARCHAR}, + + + balance = #{balance,jdbcType=DECIMAL}, + + + `password` = #{password,jdbcType=VARCHAR}, + + + `status` = #{status,jdbcType=INTEGER}, + + + is_refund_application = #{isRefundApplication,jdbcType=INTEGER}, + + + del_flag = #{delFlag,jdbcType=CHAR}, + + + create_by = #{createBy,jdbcType=VARCHAR}, + + + create_time = #{createTime,jdbcType=TIMESTAMP}, + + + update_by = #{updateBy,jdbcType=VARCHAR}, + + + update_time = #{updateTime,jdbcType=TIMESTAMP}, + + + remark = #{remark,jdbcType=VARCHAR}, + + + soc = #{soc,jdbcType=INTEGER}, + + + is_refund = #{isRefund,jdbcType=INTEGER}, + + + tenant_id = #{tenantId,jdbcType=VARCHAR}, + + + soc_protect = #{socProtect,jdbcType=INTEGER}, + + + where app_user_id = #{appUserId,jdbcType=BIGINT} + + + update xhpc_app_user + set phone = #{phone,jdbcType=VARCHAR}, + weixin_open_id = #{weixinOpenId,jdbcType=VARCHAR}, + alipay_open_id = #{alipayOpenId,jdbcType=VARCHAR}, + weixin_login = #{weixinLogin,jdbcType=INTEGER}, + alipay_login = #{alipayLogin,jdbcType=INTEGER}, + avatar = #{avatar,jdbcType=VARCHAR}, + balance = #{balance,jdbcType=DECIMAL}, + `password` = #{password,jdbcType=VARCHAR}, + `status` = #{status,jdbcType=INTEGER}, + is_refund_application = #{isRefundApplication,jdbcType=INTEGER}, + del_flag = #{delFlag,jdbcType=CHAR}, + create_by = #{createBy,jdbcType=VARCHAR}, + create_time = #{createTime,jdbcType=TIMESTAMP}, + update_by = #{updateBy,jdbcType=VARCHAR}, + update_time = #{updateTime,jdbcType=TIMESTAMP}, + remark = #{remark,jdbcType=VARCHAR}, + soc = #{soc,jdbcType=INTEGER}, + is_refund = #{isRefund,jdbcType=INTEGER}, + tenant_id = #{tenantId,jdbcType=VARCHAR}, + soc_protect = #{socProtect,jdbcType=INTEGER} + where app_user_id = #{appUserId,jdbcType=BIGINT} + + \ No newline at end of file diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcChargingStationMapper.xml b/xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcChargingStationMapper.xml index ba8c4d98..600e5acb 100644 --- a/xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcChargingStationMapper.xml +++ b/xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcChargingStationMapper.xml @@ -86,13 +86,30 @@ xhpc_charging_station WHERE del_flag = 0 - - AND tenant_id = #{tenantIdStr} + + AND tenant_id in + + #{tenantId} + AND area_code = #{areaCode} + delete from xhpc_charging_station diff --git a/xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcHistoryOrderMapper.xml b/xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcHistoryOrderMapper.xml new file mode 100644 index 00000000..15ebf644 --- /dev/null +++ b/xhpc-modules/xhpc-data-big-screen/src/main/resources/mapper/XhpcHistoryOrderMapper.xml @@ -0,0 +1,707 @@ + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + + history_order_id + , charging_station_id, charge_order_id, user_id, terminal_id, serial_number, + internet_serial_number, power_price_total, service_price_total, total_price, promotion_discount, + act_price, act_power_price, act_service_price, internet_commission, internet_svc_commission, + platform_commission, platform_svc_commisssion, operation_commission, operation_svc_commission, + start_soc, end_soc, reconciliation_status, sorting_status, `type`, `status`, del_flag, + create_time, create_by, update_time, update_by, remark, `state`, vin_normal, search_value, + operator_id_evcs, charge_model_evcs, connector_power_evcs, meter_value_end_evcs, + meter_value_start_evcs, operator_id3rdpty_evcs, start_time, end_time, stop_reason_evcs, + total_power, user_name_evcs, phone, evcs_order_no, confirm_Result, rate_model_id, + charging_mode, internet_degree_commission, `source`, tenant_id + + + + + delete + from xhpc_history_order + where history_order_id = #{historyOrderId,jdbcType=BIGINT} + + + insert into xhpc_history_order (charging_station_id, charge_order_id, user_id, + terminal_id, serial_number, internet_serial_number, + power_price_total, service_price_total, total_price, + promotion_discount, act_price, act_power_price, + act_service_price, internet_commission, internet_svc_commission, + platform_commission, platform_svc_commisssion, + operation_commission, operation_svc_commission, + start_soc, end_soc, reconciliation_status, + sorting_status, `type`, `status`, + del_flag, create_time, create_by, + update_time, update_by, remark, + `state`, vin_normal, search_value, + operator_id_evcs, charge_model_evcs, connector_power_evcs, + meter_value_end_evcs, meter_value_start_evcs, operator_id3rdpty_evcs, + start_time, end_time, stop_reason_evcs, + total_power, user_name_evcs, phone, + evcs_order_no, confirm_Result, rate_model_id, + charging_mode, internet_degree_commission, + `source`, tenant_id) + values (#{chargingStationId,jdbcType=BIGINT}, #{chargeOrderId,jdbcType=BIGINT}, #{userId,jdbcType=BIGINT}, + #{terminalId,jdbcType=BIGINT}, #{serialNumber,jdbcType=VARCHAR}, + #{internetSerialNumber,jdbcType=VARCHAR}, + #{powerPriceTotal,jdbcType=DECIMAL}, #{servicePriceTotal,jdbcType=DECIMAL}, + #{totalPrice,jdbcType=DECIMAL}, + #{promotionDiscount,jdbcType=DECIMAL}, #{actPrice,jdbcType=DECIMAL}, #{actPowerPrice,jdbcType=DECIMAL}, + #{actServicePrice,jdbcType=DECIMAL}, #{internetCommission,jdbcType=DECIMAL}, + #{internetSvcCommission,jdbcType=DECIMAL}, + #{platformCommission,jdbcType=DECIMAL}, #{platformSvcCommisssion,jdbcType=DECIMAL}, + #{operationCommission,jdbcType=DECIMAL}, #{operationSvcCommission,jdbcType=DECIMAL}, + #{startSoc,jdbcType=VARCHAR}, #{endSoc,jdbcType=VARCHAR}, #{reconciliationStatus,jdbcType=INTEGER}, + #{sortingStatus,jdbcType=INTEGER}, #{type,jdbcType=TINYINT}, #{status,jdbcType=INTEGER}, + #{delFlag,jdbcType=INTEGER}, #{createTime,jdbcType=TIMESTAMP}, #{createBy,jdbcType=VARCHAR}, + #{updateTime,jdbcType=TIMESTAMP}, #{updateBy,jdbcType=VARCHAR}, #{remark,jdbcType=VARCHAR}, + #{state,jdbcType=INTEGER}, #{vinNormal,jdbcType=VARCHAR}, #{searchValue,jdbcType=VARCHAR}, + #{operatorIdEvcs,jdbcType=VARCHAR}, #{chargeModelEvcs,jdbcType=INTEGER}, + #{connectorPowerEvcs,jdbcType=DOUBLE}, + #{meterValueEndEvcs,jdbcType=DOUBLE}, #{meterValueStartEvcs,jdbcType=DOUBLE}, + #{operatorId3rdptyEvcs,jdbcType=VARCHAR}, + #{startTime,jdbcType=TIMESTAMP}, #{endTime,jdbcType=TIMESTAMP}, #{stopReasonEvcs,jdbcType=INTEGER}, + #{totalPower,jdbcType=DOUBLE}, #{userNameEvcs,jdbcType=VARCHAR}, #{phone,jdbcType=VARCHAR}, + #{evcsOrderNo,jdbcType=VARCHAR}, #{confirmResult,jdbcType=INTEGER}, #{rateModelId,jdbcType=BIGINT}, + #{chargingMode,jdbcType=VARCHAR}, #{internetDegreeCommission,jdbcType=DECIMAL}, + #{source,jdbcType=INTEGER}, #{tenantId,jdbcType=VARCHAR}) + + + insert into xhpc_history_order + + + charging_station_id, + + + charge_order_id, + + + user_id, + + + terminal_id, + + + serial_number, + + + internet_serial_number, + + + power_price_total, + + + service_price_total, + + + total_price, + + + promotion_discount, + + + act_price, + + + act_power_price, + + + act_service_price, + + + internet_commission, + + + internet_svc_commission, + + + platform_commission, + + + platform_svc_commisssion, + + + operation_commission, + + + operation_svc_commission, + + + start_soc, + + + end_soc, + + + reconciliation_status, + + + sorting_status, + + + `type`, + + + `status`, + + + del_flag, + + + create_time, + + + create_by, + + + update_time, + + + update_by, + + + remark, + + + `state`, + + + vin_normal, + + + search_value, + + + operator_id_evcs, + + + charge_model_evcs, + + + connector_power_evcs, + + + meter_value_end_evcs, + + + meter_value_start_evcs, + + + operator_id3rdpty_evcs, + + + start_time, + + + end_time, + + + stop_reason_evcs, + + + total_power, + + + user_name_evcs, + + + phone, + + + evcs_order_no, + + + confirm_Result, + + + rate_model_id, + + + charging_mode, + + + internet_degree_commission, + + + `source`, + + + tenant_id, + + + + + #{chargingStationId,jdbcType=BIGINT}, + + + #{chargeOrderId,jdbcType=BIGINT}, + + + #{userId,jdbcType=BIGINT}, + + + #{terminalId,jdbcType=BIGINT}, + + + #{serialNumber,jdbcType=VARCHAR}, + + + #{internetSerialNumber,jdbcType=VARCHAR}, + + + #{powerPriceTotal,jdbcType=DECIMAL}, + + + #{servicePriceTotal,jdbcType=DECIMAL}, + + + #{totalPrice,jdbcType=DECIMAL}, + + + #{promotionDiscount,jdbcType=DECIMAL}, + + + #{actPrice,jdbcType=DECIMAL}, + + + #{actPowerPrice,jdbcType=DECIMAL}, + + + #{actServicePrice,jdbcType=DECIMAL}, + + + #{internetCommission,jdbcType=DECIMAL}, + + + #{internetSvcCommission,jdbcType=DECIMAL}, + + + #{platformCommission,jdbcType=DECIMAL}, + + + #{platformSvcCommisssion,jdbcType=DECIMAL}, + + + #{operationCommission,jdbcType=DECIMAL}, + + + #{operationSvcCommission,jdbcType=DECIMAL}, + + + #{startSoc,jdbcType=VARCHAR}, + + + #{endSoc,jdbcType=VARCHAR}, + + + #{reconciliationStatus,jdbcType=INTEGER}, + + + #{sortingStatus,jdbcType=INTEGER}, + + + #{type,jdbcType=TINYINT}, + + + #{status,jdbcType=INTEGER}, + + + #{delFlag,jdbcType=INTEGER}, + + + #{createTime,jdbcType=TIMESTAMP}, + + + #{createBy,jdbcType=VARCHAR}, + + + #{updateTime,jdbcType=TIMESTAMP}, + + + #{updateBy,jdbcType=VARCHAR}, + + + #{remark,jdbcType=VARCHAR}, + + + #{state,jdbcType=INTEGER}, + + + #{vinNormal,jdbcType=VARCHAR}, + + + #{searchValue,jdbcType=VARCHAR}, + + + #{operatorIdEvcs,jdbcType=VARCHAR}, + + + #{chargeModelEvcs,jdbcType=INTEGER}, + + + #{connectorPowerEvcs,jdbcType=DOUBLE}, + + + #{meterValueEndEvcs,jdbcType=DOUBLE}, + + + #{meterValueStartEvcs,jdbcType=DOUBLE}, + + + #{operatorId3rdptyEvcs,jdbcType=VARCHAR}, + + + #{startTime,jdbcType=TIMESTAMP}, + + + #{endTime,jdbcType=TIMESTAMP}, + + + #{stopReasonEvcs,jdbcType=INTEGER}, + + + #{totalPower,jdbcType=DOUBLE}, + + + #{userNameEvcs,jdbcType=VARCHAR}, + + + #{phone,jdbcType=VARCHAR}, + + + #{evcsOrderNo,jdbcType=VARCHAR}, + + + #{confirmResult,jdbcType=INTEGER}, + + + #{rateModelId,jdbcType=BIGINT}, + + + #{chargingMode,jdbcType=VARCHAR}, + + + #{internetDegreeCommission,jdbcType=DECIMAL}, + + + #{source,jdbcType=INTEGER}, + + + #{tenantId,jdbcType=VARCHAR}, + + + + + update xhpc_history_order + + + charging_station_id = #{chargingStationId,jdbcType=BIGINT}, + + + charge_order_id = #{chargeOrderId,jdbcType=BIGINT}, + + + user_id = #{userId,jdbcType=BIGINT}, + + + terminal_id = #{terminalId,jdbcType=BIGINT}, + + + serial_number = #{serialNumber,jdbcType=VARCHAR}, + + + internet_serial_number = #{internetSerialNumber,jdbcType=VARCHAR}, + + + power_price_total = #{powerPriceTotal,jdbcType=DECIMAL}, + + + service_price_total = #{servicePriceTotal,jdbcType=DECIMAL}, + + + total_price = #{totalPrice,jdbcType=DECIMAL}, + + + promotion_discount = #{promotionDiscount,jdbcType=DECIMAL}, + + + act_price = #{actPrice,jdbcType=DECIMAL}, + + + act_power_price = #{actPowerPrice,jdbcType=DECIMAL}, + + + act_service_price = #{actServicePrice,jdbcType=DECIMAL}, + + + internet_commission = #{internetCommission,jdbcType=DECIMAL}, + + + internet_svc_commission = #{internetSvcCommission,jdbcType=DECIMAL}, + + + platform_commission = #{platformCommission,jdbcType=DECIMAL}, + + + platform_svc_commisssion = #{platformSvcCommisssion,jdbcType=DECIMAL}, + + + operation_commission = #{operationCommission,jdbcType=DECIMAL}, + + + operation_svc_commission = #{operationSvcCommission,jdbcType=DECIMAL}, + + + start_soc = #{startSoc,jdbcType=VARCHAR}, + + + end_soc = #{endSoc,jdbcType=VARCHAR}, + + + reconciliation_status = #{reconciliationStatus,jdbcType=INTEGER}, + + + sorting_status = #{sortingStatus,jdbcType=INTEGER}, + + + `type` = #{type,jdbcType=TINYINT}, + + + `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}, + + + `state` = #{state,jdbcType=INTEGER}, + + + vin_normal = #{vinNormal,jdbcType=VARCHAR}, + + + search_value = #{searchValue,jdbcType=VARCHAR}, + + + operator_id_evcs = #{operatorIdEvcs,jdbcType=VARCHAR}, + + + charge_model_evcs = #{chargeModelEvcs,jdbcType=INTEGER}, + + + connector_power_evcs = #{connectorPowerEvcs,jdbcType=DOUBLE}, + + + meter_value_end_evcs = #{meterValueEndEvcs,jdbcType=DOUBLE}, + + + meter_value_start_evcs = #{meterValueStartEvcs,jdbcType=DOUBLE}, + + + operator_id3rdpty_evcs = #{operatorId3rdptyEvcs,jdbcType=VARCHAR}, + + + start_time = #{startTime,jdbcType=TIMESTAMP}, + + + end_time = #{endTime,jdbcType=TIMESTAMP}, + + + stop_reason_evcs = #{stopReasonEvcs,jdbcType=INTEGER}, + + + total_power = #{totalPower,jdbcType=DOUBLE}, + + + user_name_evcs = #{userNameEvcs,jdbcType=VARCHAR}, + + + phone = #{phone,jdbcType=VARCHAR}, + + + evcs_order_no = #{evcsOrderNo,jdbcType=VARCHAR}, + + + confirm_Result = #{confirmResult,jdbcType=INTEGER}, + + + rate_model_id = #{rateModelId,jdbcType=BIGINT}, + + + charging_mode = #{chargingMode,jdbcType=VARCHAR}, + + + internet_degree_commission = #{internetDegreeCommission,jdbcType=DECIMAL}, + + + `source` = #{source,jdbcType=INTEGER}, + + + tenant_id = #{tenantId,jdbcType=VARCHAR}, + + + where history_order_id = #{historyOrderId,jdbcType=BIGINT} + + + update xhpc_history_order + set charging_station_id = #{chargingStationId,jdbcType=BIGINT}, + charge_order_id = #{chargeOrderId,jdbcType=BIGINT}, + user_id = #{userId,jdbcType=BIGINT}, + terminal_id = #{terminalId,jdbcType=BIGINT}, + serial_number = #{serialNumber,jdbcType=VARCHAR}, + internet_serial_number = #{internetSerialNumber,jdbcType=VARCHAR}, + power_price_total = #{powerPriceTotal,jdbcType=DECIMAL}, + service_price_total = #{servicePriceTotal,jdbcType=DECIMAL}, + total_price = #{totalPrice,jdbcType=DECIMAL}, + promotion_discount = #{promotionDiscount,jdbcType=DECIMAL}, + act_price = #{actPrice,jdbcType=DECIMAL}, + act_power_price = #{actPowerPrice,jdbcType=DECIMAL}, + act_service_price = #{actServicePrice,jdbcType=DECIMAL}, + internet_commission = #{internetCommission,jdbcType=DECIMAL}, + internet_svc_commission = #{internetSvcCommission,jdbcType=DECIMAL}, + platform_commission = #{platformCommission,jdbcType=DECIMAL}, + platform_svc_commisssion = #{platformSvcCommisssion,jdbcType=DECIMAL}, + operation_commission = #{operationCommission,jdbcType=DECIMAL}, + operation_svc_commission = #{operationSvcCommission,jdbcType=DECIMAL}, + start_soc = #{startSoc,jdbcType=VARCHAR}, + end_soc = #{endSoc,jdbcType=VARCHAR}, + reconciliation_status = #{reconciliationStatus,jdbcType=INTEGER}, + sorting_status = #{sortingStatus,jdbcType=INTEGER}, + `type` = #{type,jdbcType=TINYINT}, + `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}, + `state` = #{state,jdbcType=INTEGER}, + vin_normal = #{vinNormal,jdbcType=VARCHAR}, + search_value = #{searchValue,jdbcType=VARCHAR}, + operator_id_evcs = #{operatorIdEvcs,jdbcType=VARCHAR}, + charge_model_evcs = #{chargeModelEvcs,jdbcType=INTEGER}, + connector_power_evcs = #{connectorPowerEvcs,jdbcType=DOUBLE}, + meter_value_end_evcs = #{meterValueEndEvcs,jdbcType=DOUBLE}, + meter_value_start_evcs = #{meterValueStartEvcs,jdbcType=DOUBLE}, + operator_id3rdpty_evcs = #{operatorId3rdptyEvcs,jdbcType=VARCHAR}, + start_time = #{startTime,jdbcType=TIMESTAMP}, + end_time = #{endTime,jdbcType=TIMESTAMP}, + stop_reason_evcs = #{stopReasonEvcs,jdbcType=INTEGER}, + total_power = #{totalPower,jdbcType=DOUBLE}, + user_name_evcs = #{userNameEvcs,jdbcType=VARCHAR}, + phone = #{phone,jdbcType=VARCHAR}, + evcs_order_no = #{evcsOrderNo,jdbcType=VARCHAR}, + confirm_Result = #{confirmResult,jdbcType=INTEGER}, + rate_model_id = #{rateModelId,jdbcType=BIGINT}, + charging_mode = #{chargingMode,jdbcType=VARCHAR}, + internet_degree_commission = #{internetDegreeCommission,jdbcType=DECIMAL}, + `source` = #{source,jdbcType=INTEGER}, + tenant_id = #{tenantId,jdbcType=VARCHAR} + where history_order_id = #{historyOrderId,jdbcType=BIGINT} + + \ No newline at end of file