mirror of
https://codeup.aliyun.com/67c68d4e484ca2f0a13ac3c1/ydc/jsowell-charger-web.git
synced 2026-07-02 04:57:57 +08:00
打印日志
This commit is contained in:
@@ -428,6 +428,8 @@ public class OrderService {
|
|||||||
} catch (Exception e) {
|
} catch (Exception e) {
|
||||||
log.error("后管查询订单详情时把redis中的实时数据存到表发生异常", e);
|
log.error("后管查询订单详情时把redis中的实时数据存到表发生异常", e);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// 校验
|
||||||
return vo;
|
return vo;
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -1107,6 +1109,7 @@ public class OrderService {
|
|||||||
* 对公账户创建失败
|
* 对公账户创建失败
|
||||||
*/
|
*/
|
||||||
private void corpMemberFailed(String data) {
|
private void corpMemberFailed(String data) {
|
||||||
|
log.info("对公账户创建失败 data:{}", JSON.toJSONString(data));
|
||||||
// 删除表中的记录
|
// 删除表中的记录
|
||||||
JSONObject jsonObject = JSON.parseObject(data);
|
JSONObject jsonObject = JSON.parseObject(data);
|
||||||
String memberId = jsonObject.getString("member_id");
|
String memberId = jsonObject.getString("member_id");
|
||||||
@@ -1126,6 +1129,7 @@ public class OrderService {
|
|||||||
* 对公账户创建成功
|
* 对公账户创建成功
|
||||||
*/
|
*/
|
||||||
private void corpMemberSucceeded(String data) {
|
private void corpMemberSucceeded(String data) {
|
||||||
|
log.info("对公账户创建成功 data:{}", JSON.toJSONString(data));
|
||||||
JSONObject jsonObject = JSON.parseObject(data);
|
JSONObject jsonObject = JSON.parseObject(data);
|
||||||
String memberId = jsonObject.getString("member_id");
|
String memberId = jsonObject.getString("member_id");
|
||||||
if (StringUtils.isBlank(memberId)) {
|
if (StringUtils.isBlank(memberId)) {
|
||||||
@@ -1142,6 +1146,7 @@ public class OrderService {
|
|||||||
* 取现成功
|
* 取现成功
|
||||||
*/
|
*/
|
||||||
private void cashSucceeded(String data) {
|
private void cashSucceeded(String data) {
|
||||||
|
log.info("取现成功 data:{}", JSON.toJSONString(data));
|
||||||
JSONObject jsonObject = JSON.parseObject(data);
|
JSONObject jsonObject = JSON.parseObject(data);
|
||||||
String withdrawCode = jsonObject.getString("id");
|
String withdrawCode = jsonObject.getString("id");
|
||||||
// 通过取现id查询取现数据
|
// 通过取现id查询取现数据
|
||||||
@@ -1157,6 +1162,7 @@ public class OrderService {
|
|||||||
* @param data
|
* @param data
|
||||||
*/
|
*/
|
||||||
private void cashFailed(String data) {
|
private void cashFailed(String data) {
|
||||||
|
log.info("取现失败 data:{}", JSON.toJSONString(data));
|
||||||
JSONObject jsonObject = JSON.parseObject(data);
|
JSONObject jsonObject = JSON.parseObject(data);
|
||||||
String withdrawCode = jsonObject.getString("id");
|
String withdrawCode = jsonObject.getString("id");
|
||||||
// 通过取现id查询取现数据
|
// 通过取现id查询取现数据
|
||||||
|
|||||||
@@ -16,11 +16,9 @@ import com.jsowell.netty.factory.YKCOperateFactory;
|
|||||||
import com.jsowell.pile.domain.MemberPlateNumberRelation;
|
import com.jsowell.pile.domain.MemberPlateNumberRelation;
|
||||||
import com.jsowell.pile.domain.PileAuthCard;
|
import com.jsowell.pile.domain.PileAuthCard;
|
||||||
import com.jsowell.pile.dto.GenerateOrderDTO;
|
import com.jsowell.pile.dto.GenerateOrderDTO;
|
||||||
import com.jsowell.pile.service.IMemberBasicInfoService;
|
|
||||||
import com.jsowell.pile.service.IMemberPlateNumberRelationService;
|
import com.jsowell.pile.service.IMemberPlateNumberRelationService;
|
||||||
import com.jsowell.pile.service.IOrderBasicInfoService;
|
import com.jsowell.pile.service.IOrderBasicInfoService;
|
||||||
import com.jsowell.pile.service.IPileAuthCardService;
|
import com.jsowell.pile.service.IPileAuthCardService;
|
||||||
import com.jsowell.wxpay.service.WxAppletRemoteService;
|
|
||||||
import io.netty.channel.Channel;
|
import io.netty.channel.Channel;
|
||||||
import lombok.extern.slf4j.Slf4j;
|
import lombok.extern.slf4j.Slf4j;
|
||||||
import org.springframework.beans.factory.annotation.Autowired;
|
import org.springframework.beans.factory.annotation.Autowired;
|
||||||
@@ -49,12 +47,6 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
|||||||
@Autowired
|
@Autowired
|
||||||
private IMemberPlateNumberRelationService memberPlateNumberRelationService;
|
private IMemberPlateNumberRelationService memberPlateNumberRelationService;
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private WxAppletRemoteService wxAppletRemoteService;
|
|
||||||
|
|
||||||
@Autowired
|
|
||||||
private IMemberBasicInfoService memberBasicInfoService;
|
|
||||||
|
|
||||||
@Override
|
@Override
|
||||||
public void afterPropertiesSet() throws Exception {
|
public void afterPropertiesSet() throws Exception {
|
||||||
YKCOperateFactory.register(type, this);
|
YKCOperateFactory.register(type, this);
|
||||||
@@ -100,7 +92,6 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
|||||||
length = 8;
|
length = 8;
|
||||||
byte[] cardNumByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
byte[] cardNumByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
||||||
String physicsCard = BytesUtil.binary(cardNumByteArr, 16);
|
String physicsCard = BytesUtil.binary(cardNumByteArr, 16);
|
||||||
log.info("桩号:{}申请充电物理卡号:{}", pileSn, physicsCard);
|
|
||||||
|
|
||||||
// 输入密码 对用户输入的密码进行16 位MD5 加密,采用小写上传
|
// 输入密码 对用户输入的密码进行16 位MD5 加密,采用小写上传
|
||||||
startIndex += length;
|
startIndex += length;
|
||||||
@@ -112,7 +103,6 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
|||||||
length = 17;
|
length = 17;
|
||||||
byte[] vinCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
byte[] vinCodeByteArr = BytesUtil.copyBytes(msgBody, startIndex, length);
|
||||||
String vinCode = BytesUtil.ascii2Str(vinCodeByteArr);
|
String vinCode = BytesUtil.ascii2Str(vinCodeByteArr);
|
||||||
log.info("桩号:{}申请充电VIN码:{}", pileSn, vinCode);
|
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* 刷卡启动充电
|
* 刷卡启动充电
|
||||||
@@ -123,6 +113,7 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
|||||||
String transactionCode = "";
|
String transactionCode = "";
|
||||||
try {
|
try {
|
||||||
if (StringUtils.equals("01", startMode)) {
|
if (StringUtils.equals("01", startMode)) {
|
||||||
|
log.info("桩号:{}申请充电物理卡号:{}", pileSn, physicsCard);
|
||||||
// 查询卡信息 根据传过来的物理卡号查询数据库中此卡信息
|
// 查询卡信息 根据传过来的物理卡号查询数据库中此卡信息
|
||||||
PileAuthCard pileAuthCardInfo = pileAuthCardService.selectCardInfoByLogicCard(physicsCard);
|
PileAuthCard pileAuthCardInfo = pileAuthCardService.selectCardInfoByLogicCard(physicsCard);
|
||||||
if (pileAuthCardInfo == null) {
|
if (pileAuthCardInfo == null) {
|
||||||
@@ -159,15 +150,12 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
|||||||
transactionCode = Constants.ILLEGAL_TRANSACTION_CODE;
|
transactionCode = Constants.ILLEGAL_TRANSACTION_CODE;
|
||||||
accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
|
accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
|
||||||
authenticationFlagByteArr = Constants.zeroByteArray;
|
authenticationFlagByteArr = Constants.zeroByteArray;
|
||||||
|
|
||||||
log.error("刷卡启动充电鉴权 error:{}, {}", e.getCode(), e.getMessage());
|
log.error("刷卡启动充电鉴权 error:{}, {}", e.getCode(), e.getMessage());
|
||||||
}catch (Exception e){
|
} catch (Exception e){
|
||||||
transactionCode = Constants.ILLEGAL_TRANSACTION_CODE;
|
transactionCode = Constants.ILLEGAL_TRANSACTION_CODE;
|
||||||
accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
|
accountBalanceByteArr = BytesUtil.checkLengthAndBehindAppendZero(accountBalanceByteArr, 8);
|
||||||
authenticationFlagByteArr = Constants.zeroByteArray;
|
authenticationFlagByteArr = Constants.zeroByteArray;
|
||||||
|
|
||||||
log.error("刷卡启动充电鉴权 error", e);
|
log.error("刷卡启动充电鉴权 error", e);
|
||||||
|
|
||||||
}
|
}
|
||||||
|
|
||||||
try {
|
try {
|
||||||
@@ -175,6 +163,7 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
|||||||
* VIN码启动充电
|
* VIN码启动充电
|
||||||
*/
|
*/
|
||||||
if (StringUtils.equals("03", startMode)) {
|
if (StringUtils.equals("03", startMode)) {
|
||||||
|
log.info("桩号:{}申请充电VIN码:{}", pileSn, vinCode);
|
||||||
// 通过vin码查询数据库绑定用户信息
|
// 通过vin码查询数据库绑定用户信息
|
||||||
MemberPlateNumberRelation plateInfo = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(vinCode);
|
MemberPlateNumberRelation plateInfo = memberPlateNumberRelationService.getMemberPlateInfoByVinCode(vinCode);
|
||||||
if (plateInfo == null) {
|
if (plateInfo == null) {
|
||||||
@@ -259,6 +248,5 @@ public class ConfirmStartChargingRequestHandler extends AbstractHandler{
|
|||||||
authenticationFlagByteArr, defeatReasonByteArr);
|
authenticationFlagByteArr, defeatReasonByteArr);
|
||||||
|
|
||||||
return getResult(ykcDataProtocol, msgBodyByteArr);
|
return getResult(ykcDataProtocol, msgBodyByteArr);
|
||||||
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user