瀏覽代碼

修复BUG

master
梁超 2 週之前
父節點
當前提交
c6aedddb95

+ 13
- 13
gly-base-core/src/main/java/cn/com/taiji/core/model/comm/COSConstant.java 查看文件

@@ -166,7 +166,7 @@ public class COSConstant {
if (moneyHex.length() > 8)
return null;
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex;
return initializePurchase.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009");
return initializePurchase.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId);
}

/**
@@ -182,7 +182,7 @@ public class COSConstant {
if (money < 0)
return null;
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex;
return initializePurchase.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009");
return initializePurchase.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId);
}

/**
@@ -205,7 +205,7 @@ public class COSConstant {
if (moneyHex.length() > 8)
return null;
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex;
return initializeLoad.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009");
return initializeLoad.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId);
}

/**
@@ -222,9 +222,9 @@ public class COSConstant {
return null;
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex;
if (cardVersion >= 48) {
return initializeLoad41.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009");
return initializeLoad41.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId);
}
return initializeLoad01.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009");
return initializeLoad01.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId);
}


@@ -241,7 +241,7 @@ public class COSConstant {
if (money < 0)
return null;
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex;
return initializeLoad.replace("MMMMMMMM", moneyHex.toUpperCase()).replace("TTTTTTTTTTTT", "520000000009");
return initializeLoad.replace("MMMMMMMM", moneyHex.toUpperCase()).replace("TTTTTTTTTTTT", terminalId);
}

/**
@@ -258,9 +258,9 @@ public class COSConstant {
return null;
moneyHex = "00000000".substring(0, 8 - moneyHex.length()) + moneyHex;
if (cardVersion == 41) {
return initializeLoad41.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009");
return initializeLoad41.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId);
}
return initializeLoad01.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", "520000000009");
return initializeLoad01.replace("MMMMMMMM", moneyHex).replace("TTTTTTTTTTTT", terminalId);
}

public static String selectAndRead0015 = selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015;
@@ -309,7 +309,7 @@ public class COSConstant {
*/
public static String cardChargeInitialize(Long money, String terminalId) {
return selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015 + COS_SEPERATOR + pinVertify
+ COS_SEPERATOR + initializeLoad(money, "520000000009");
+ COS_SEPERATOR + initializeLoad(money, terminalId);
}

/*
@@ -317,7 +317,7 @@ public class COSConstant {
*/
public static String cardChargeInitializeV2(Long money, String terminalId) {
return selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015 + COS_SEPERATOR + pinVertify_second
+ COS_SEPERATOR + initializeLoad(money, "520000000009");
+ COS_SEPERATOR + initializeLoad(money, terminalId);
}

/*
@@ -325,7 +325,7 @@ public class COSConstant {
*/
public static String cardChargeInitializeByVfj(Long money, String terminalId, int cardVersion) {
return selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015 + COS_SEPERATOR + pinVertify
+ COS_SEPERATOR + initializeLoad(money, "520000000009", cardVersion);
+ COS_SEPERATOR + initializeLoad(money, terminalId, cardVersion);
}

/*
@@ -333,7 +333,7 @@ public class COSConstant {
*/
public static String cardChargeInitializeV2ByVfj(Long money, String terminalId, int cardVersion) {
return selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015 + COS_SEPERATOR + pinVertify_second
+ COS_SEPERATOR + initializeLoad(money, "520000000009", cardVersion);
+ COS_SEPERATOR + initializeLoad(money, terminalId, cardVersion);
}

// 00A40000023F00,00A40000021001,805C000204
@@ -345,7 +345,7 @@ public class COSConstant {

public static String cardChargeInitialize(String moneyHex, String terminalId) {
return selectRoot + COS_SEPERATOR + selectDF01 + COS_SEPERATOR + read0015 + COS_SEPERATOR + pinVertify
+ COS_SEPERATOR + initializeLoad(moneyHex, "520000000009");
+ COS_SEPERATOR + initializeLoad(moneyHex, terminalId);
}

/**

+ 2
- 2
gly-base-core/src/main/java/cn/com/taiji/core/repo/jpa/log/YgzInterfaceLogRepo.java 查看文件

@@ -10,8 +10,8 @@ import java.util.List;

public interface YgzInterfaceLogRepo extends AbstractJpaRepo<YgzInterfaceLog, String> {

@Query(" from YgzInterfaceLog where uniqueId = ?1 and ifCode =?2 and status =?3")
YgzInterfaceLog findBy(String uniqueId, String ifCode, InterfaceStatus status);
@Query(" from YgzInterfaceLog where uniqueId = ?1 and ifCode =?2 and status =?3 and sendStatus=?4")
YgzInterfaceLog findBy(String uniqueId, String ifCode, InterfaceStatus status, YgzSendStatus sendStatus);
@Query(" from YgzInterfaceLog where sendStatus = ?1 and resendTimes < 5")
List<YgzInterfaceLog> listBySendStatusLessThen5Times(YgzSendStatus sendStatus);
}

+ 2
- 2
zhywpt-service-ias/src/main/java/cn/com/taiji/ias/manager/ygz/nio/AbstractCommNioManager.java 查看文件

@@ -66,9 +66,9 @@ public class AbstractCommNioManager extends AbstractManager {

protected void handleLog(String uniqueId, Operation operation, DataSourceEnum dataSource, YgzServiceCmd cmd, YgzInterfaceLog log) {

YgzInterfaceLog oldLog = logRepo.findBy(uniqueId, cmd.getIfCode(), InterfaceStatus.FAILED);
YgzInterfaceLog oldLog = logRepo.findBy(uniqueId, cmd.getIfCode(), InterfaceStatus.FAILED, YgzSendStatus.WAIT_SEND);
// 重发
if (oldLog != null && oldLog.getSendStatus() == YgzSendStatus.WAIT_SEND && oldLog.getResendTimes() < 5) {
if (oldLog != null && oldLog.getResendTimes() < 5) {
oldLog.setOperation(operation);
oldLog.setSource(dataSource);
oldLog.setResendTimes(oldLog.getResendTimes() + 1);

+ 3
- 0
zhywpt-service-inss/src/main/java/cn/com/taiji/inss/manager/inst/AbstractCommandHandler.java 查看文件

@@ -7,6 +7,7 @@ import cn.com.taiji.core.model.comm.protocol.inss.inst.InstCallBackRequest;
import cn.com.taiji.core.model.comm.protocol.inss.inst.InstCallBackResponse;
import cn.com.taiji.core.model.comm.protocol.valid.GlyServiceError;
import cn.com.taiji.core.repo.jpa.issue.VfjCOSRecordRepo;
import cn.com.taiji.inss.config.VfjConfigProperties;
import cn.com.taiji.inss.manager.AbstractCommManager;
import cn.com.taiji.inss.manager.model.inst.IssueOrderVO;
import org.springframework.beans.factory.annotation.Autowired;
@@ -21,6 +22,8 @@ public abstract class AbstractCommandHandler extends AbstractCommManager impleme
private IssueOrderVO orderVo;
@Autowired
private VfjCOSRecordRepo cosRecordRepo;
@Autowired
protected VfjConfigProperties vfjConfig;

@Transactional(rollbackFor = Exception.class)
public final InstCallBackResponse doHandle(InstCallBackRequest request, IssueOrderVO vo) throws ServiceHandleException {

+ 2
- 3
zhywpt-service-inss/src/main/java/cn/com/taiji/inss/manager/inst/InstCardInitHandler.java 查看文件

@@ -12,7 +12,6 @@ import org.springframework.stereotype.Service;
@Service
public class InstCardInitHandler extends AbstractCommandHandler {


@Override
IssueOrderVO handleInternal(IssueOrderVO vo, String cmdResultsStr) throws ServiceHandleException {
vo.setCmdType("CARD");
@@ -46,7 +45,7 @@ public class InstCardInitHandler extends AbstractCommandHandler {
String cos_pin = cardVersion >= 48 ? COSConstant.pinVertify_second : COSConstant.pinVertify;
return COSConstant.selectRoot + COSConstant.COS_SEPERATOR + COSConstant.selectDF01 + COSConstant.COS_SEPERATOR
+ COSConstant.read0015 + COSConstant.COS_SEPERATOR + cos_pin + COSConstant.COS_SEPERATOR
+ COSConstant.initializeLoad(money, null, cardVersion);
+ COSConstant.initializeLoad(money, vfjConfig.getTerminalId(), cardVersion);
}

public String cardReverseInitializeWith0018(Long money, int cardVersion) throws FormatException {
@@ -54,6 +53,6 @@ public class InstCardInitHandler extends AbstractCommandHandler {
return COSConstant.selectRoot + COSConstant.COS_SEPERATOR + COSConstant.selectDF01 + COSConstant.COS_SEPERATOR
+ COSConstant.read0015 + COSConstant.COS_SEPERATOR + cos_pin + COSConstant.COS_SEPERATOR
+ COSConstant.readCardTrace(1) + COSConstant.COS_SEPERATOR
+ COSConstant.initializePurchase(money, null);
+ COSConstant.initializePurchase(money, vfjConfig.getTerminalId());
}
}

Loading…
取消
儲存