mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-05-08 03:50:13 +08:00
Merge branch 'dev' of http://192.168.2.2:8099/jsowell/jsowell-charger-web into dev
This commit is contained in:
@@ -5,9 +5,12 @@ import com.jsowell.pile.dto.UniAppQueryMemberBalanceDTO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberBalanceVO;
|
||||
import com.jsowell.pile.vo.uniapp.MemberWalletLogVO;
|
||||
import org.apache.ibatis.annotations.Param;
|
||||
import org.springframework.stereotype.Component;
|
||||
import org.springframework.stereotype.Repository;
|
||||
|
||||
import java.util.List;
|
||||
|
||||
@Repository
|
||||
public interface MemberWalletLogMapper {
|
||||
/**
|
||||
* delete by primary key
|
||||
|
||||
@@ -38,6 +38,7 @@ import org.springframework.stereotype.Service;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.ArrayList;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
import java.util.stream.Collectors;
|
||||
|
||||
@@ -392,6 +393,9 @@ public class MemberBasicInfoServiceImpl implements IMemberBasicInfoService {
|
||||
// totalAccountAmount = memberWalletInfo.getPrincipalBalance();
|
||||
vo.setMerchantId(memberWalletInfo.getMerchantId());
|
||||
}
|
||||
// 计算用户注册天数
|
||||
String days = DateUtils.getPoorDays(new Date(), vo.getCreateTime());
|
||||
vo.setRegistrationDays(days);
|
||||
vo.setPrincipalBalance(principalBalance);
|
||||
vo.setGiftBalance(giftBalance);
|
||||
vo.setTotalAccountAmount(vo.getPrincipalBalance().add(vo.getGiftBalance()));
|
||||
|
||||
@@ -6,6 +6,7 @@ import lombok.Data;
|
||||
import lombok.NoArgsConstructor;
|
||||
|
||||
import java.math.BigDecimal;
|
||||
import java.util.Date;
|
||||
import java.util.List;
|
||||
|
||||
/**
|
||||
@@ -64,6 +65,16 @@ public class MemberVO {
|
||||
*/
|
||||
private BigDecimal totalAccountAmount;
|
||||
|
||||
/**
|
||||
* 注册天数
|
||||
*/
|
||||
private String registrationDays;
|
||||
|
||||
/**
|
||||
* 创建时间
|
||||
*/
|
||||
private Date createTime;
|
||||
|
||||
/**
|
||||
* 车牌号
|
||||
*/
|
||||
|
||||
@@ -187,7 +187,8 @@
|
||||
t1.nick_name as nickName,
|
||||
t1.avatar_url as avatarUrl,
|
||||
t1.mobile_number as mobileNumber,
|
||||
t1.merchant_id as merchantId
|
||||
t1.merchant_id as merchantId,
|
||||
t1.create_time as createTime
|
||||
<!--t2.principal_balance as principalBalance,
|
||||
t2.gift_balance as giftBalance-->
|
||||
FROM
|
||||
|
||||
116
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/XDTService.java
vendored
Normal file
116
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/XDTService.java
vendored
Normal file
@@ -0,0 +1,116 @@
|
||||
package com.jsowell.thirdparty.xindiantu.service;
|
||||
|
||||
import com.jsowell.pile.dto.QueryEquipChargeStatusDTO;
|
||||
import com.jsowell.pile.dto.QueryEquipmentDTO;
|
||||
import com.jsowell.pile.dto.QueryStartChargeDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.zhongdianlian.dto.ZDLGetTokenDTO;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 新电途Service
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2023/12/27 14:27:42
|
||||
*/
|
||||
public interface XDTService {
|
||||
/**
|
||||
* 获取令牌
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public String getToken(ZDLGetTokenDTO dto);
|
||||
|
||||
/**
|
||||
* 生成token
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> generateToken(CommonParamsDTO dto) throws UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
* 查询站点信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 查询统计信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryStationStats(QueryStationInfoDTO dto);
|
||||
|
||||
/**
|
||||
* 请求设备认证
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryEquipAuth(QueryEquipmentDTO dto);
|
||||
|
||||
/**
|
||||
* 请求开始充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryStartCharge(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 查询业务策略信息结果
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryEquipBusinessPolicy(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 设备状态变化推送
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @return
|
||||
*/
|
||||
String notificationStationStatus(String pileConnectorCode, String status);
|
||||
|
||||
/**
|
||||
* 推送充电订单信息
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
String pushChargeOrderInfo(String orderCode);
|
||||
|
||||
/**
|
||||
* 查询充电状态
|
||||
* @param dto
|
||||
*/
|
||||
Map<String, String> queryEquipChargeStatus(QueryEquipChargeStatusDTO dto);
|
||||
|
||||
/**
|
||||
* 请求停止充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryStopCharge(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 推送启动充电结果
|
||||
* @return
|
||||
*/
|
||||
String notificationStartChargeResult(String orderCode);
|
||||
|
||||
/**
|
||||
* 推送停止充电结果(仅在 0x19的帧类型中调用)
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
String notificationStopChargeResult(String orderCode);
|
||||
|
||||
/**
|
||||
* 推送充电状态
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
String notificationEquipChargeStatus(String orderCode) throws UnsupportedEncodingException;
|
||||
}
|
||||
166
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/impl/XDTServiceImpl.java
vendored
Normal file
166
jsowell-thirdparty/src/main/java/com/jsowell/thirdparty/xindiantu/service/impl/XDTServiceImpl.java
vendored
Normal file
@@ -0,0 +1,166 @@
|
||||
package com.jsowell.thirdparty.xindiantu.service.impl;
|
||||
|
||||
import com.jsowell.pile.dto.QueryEquipChargeStatusDTO;
|
||||
import com.jsowell.pile.dto.QueryEquipmentDTO;
|
||||
import com.jsowell.pile.dto.QueryStartChargeDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.xindiantu.service.XDTService;
|
||||
import com.jsowell.thirdparty.zhongdianlian.dto.ZDLGetTokenDTO;
|
||||
import com.jsowell.thirdparty.zhongdianlian.service.ZDLService;
|
||||
import org.springframework.beans.factory.annotation.Autowired;
|
||||
import org.springframework.stereotype.Service;
|
||||
|
||||
import java.io.UnsupportedEncodingException;
|
||||
import java.util.Map;
|
||||
|
||||
/**
|
||||
* 新电途Service
|
||||
*
|
||||
* @author Lemon
|
||||
* @Date 2023/12/28 11:02:42
|
||||
*/
|
||||
@Service
|
||||
public class XDTServiceImpl implements XDTService {
|
||||
@Autowired
|
||||
private ZDLService zdlService;
|
||||
|
||||
/**
|
||||
* 获取令牌
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String getToken(ZDLGetTokenDTO dto) {
|
||||
return zdlService.ZDLGetToken(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 生成token
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> generateToken(CommonParamsDTO dto) throws UnsupportedEncodingException {
|
||||
return zdlService.generateToken(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询站点信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryStationsInfo(QueryStationInfoDTO dto) {
|
||||
return zdlService.queryStationsInfo(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询统计信息
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryStationStats(QueryStationInfoDTO dto) {
|
||||
return zdlService.queryStationStats(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求设备认证
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryEquipAuth(QueryEquipmentDTO dto) {
|
||||
return zdlService.queryEquipAuth(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求开始充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryStartCharge(QueryStartChargeDTO dto) {
|
||||
return zdlService.queryStartCharge(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询业务策略信息结果
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryEquipBusinessPolicy(QueryStartChargeDTO dto) {
|
||||
return zdlService.queryEquipBusinessPolicy(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 设备状态变化推送
|
||||
* @param pileConnectorCode
|
||||
* @param status
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStationStatus(String pileConnectorCode, String status) {
|
||||
return zdlService.notificationStationStatus(pileConnectorCode, status);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送充电订单信息
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String pushChargeOrderInfo(String orderCode) {
|
||||
return zdlService.pushChargeOrderInfo(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电状态
|
||||
* @param dto
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryEquipChargeStatus(QueryEquipChargeStatusDTO dto) {
|
||||
return zdlService.queryEquipChargeStatus(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求停止充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryStopCharge(QueryStartChargeDTO dto) {
|
||||
return zdlService.queryStopCharge(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送启动充电结果
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStartChargeResult(String orderCode) {
|
||||
return zdlService.notificationStartChargeResult(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送停止充电结果(仅在 0x19的帧类型中调用)
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStopChargeResult(String orderCode) {
|
||||
return zdlService.notificationStopChargeResult(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送充电状态
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationEquipChargeStatus(String orderCode) throws UnsupportedEncodingException {
|
||||
return zdlService.notificationEquipChargeStatus(orderCode);
|
||||
}
|
||||
}
|
||||
@@ -1,7 +1,6 @@
|
||||
package com.jsowell.thirdparty.zhongdianlian.service;
|
||||
|
||||
import com.jsowell.pile.dto.PushStationInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.thirdparty.lianlian.dto.CommonParamsDTO;
|
||||
import com.jsowell.thirdparty.zhongdianlian.dto.ZDLGetTokenDTO;
|
||||
|
||||
@@ -77,4 +76,58 @@ public interface ZDLService {
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> generateToken(CommonParamsDTO dto) throws UnsupportedEncodingException;
|
||||
|
||||
/**
|
||||
* 请求设备认证
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryEquipAuth(QueryEquipmentDTO dto);
|
||||
|
||||
/**
|
||||
* 请求开始充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryStartCharge(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 查询业务策略信息结果
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryEquipBusinessPolicy(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 查询充电状态
|
||||
* @param dto
|
||||
*/
|
||||
Map<String, String> queryEquipChargeStatus(QueryEquipChargeStatusDTO dto);
|
||||
|
||||
/**
|
||||
* 请求停止充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
Map<String, String> queryStopCharge(QueryStartChargeDTO dto);
|
||||
|
||||
/**
|
||||
* 推送启动充电结果
|
||||
* @return
|
||||
*/
|
||||
String notificationStartChargeResult(String orderCode);
|
||||
|
||||
/**
|
||||
* 推送停止充电结果(仅在 0x19的帧类型中调用)
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
String notificationStopChargeResult(String orderCode);
|
||||
|
||||
/**
|
||||
* 推送充电状态
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
String notificationEquipChargeStatus(String orderCode) throws UnsupportedEncodingException;
|
||||
}
|
||||
|
||||
@@ -8,8 +8,7 @@ import com.jsowell.common.enums.thirdparty.ThirdPlatformTypeEnum;
|
||||
import com.jsowell.common.util.PageUtils;
|
||||
import com.jsowell.common.util.StringUtils;
|
||||
import com.jsowell.pile.domain.*;
|
||||
import com.jsowell.pile.dto.PushStationInfoDTO;
|
||||
import com.jsowell.pile.dto.QueryStationInfoDTO;
|
||||
import com.jsowell.pile.dto.*;
|
||||
import com.jsowell.pile.service.*;
|
||||
import com.jsowell.pile.vo.base.MerchantInfoVO;
|
||||
import com.jsowell.pile.vo.base.ThirdPartyStationInfoVO;
|
||||
@@ -333,6 +332,84 @@ public class ZDLServiceImpl implements ZDLService {
|
||||
return lianLianService.generateToken(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求设备认证
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryEquipAuth(QueryEquipmentDTO dto) {
|
||||
return lianLianService.query_equip_auth(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求开始充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryStartCharge(QueryStartChargeDTO dto) {
|
||||
return lianLianService.query_start_charge(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* TODO 查询业务策略信息结果
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryEquipBusinessPolicy(QueryStartChargeDTO dto) {
|
||||
return null;
|
||||
}
|
||||
|
||||
/**
|
||||
* 查询充电状态
|
||||
* @param dto
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryEquipChargeStatus(QueryEquipChargeStatusDTO dto) {
|
||||
return lianLianService.query_equip_charge_status(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 请求停止充电
|
||||
* @param dto
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public Map<String, String> queryStopCharge(QueryStartChargeDTO dto) {
|
||||
return lianLianService.query_stop_charge(dto);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送启动充电结果
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStartChargeResult(String orderCode) {
|
||||
return lianLianService.pushStartChargeResult(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送停止充电结果(仅在 0x19的帧类型中调用)
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationStopChargeResult(String orderCode) {
|
||||
return lianLianService.pushStopChargeResult(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 推送充电状态
|
||||
* @param orderCode
|
||||
* @return
|
||||
*/
|
||||
@Override
|
||||
public String notificationEquipChargeStatus(String orderCode) throws UnsupportedEncodingException {
|
||||
return lianLianService.pushChargeStatus(orderCode);
|
||||
}
|
||||
|
||||
/**
|
||||
* 获取桩列表信息
|
||||
*
|
||||
|
||||
Reference in New Issue
Block a user