|
@@ -1741,7 +1741,7 @@ public class ReceiptServiceImpl implements ReceiptService {
|
|
|
String curDateStr = (new SimpleDateFormat("yyyy-MM-dd HH:mm:ss")).format(date);
|
|
|
|
|
|
//推送信息中心-交易物流
|
|
|
- MessageCenter messageCenter=new MessageCenter();
|
|
|
+ MessageCenter messageCenter = new MessageCenter();
|
|
|
messageCenter.setShopID(null);
|
|
|
messageCenter.setClubID(order.getClubId());
|
|
|
messageCenter.setUserType(1);
|
|
@@ -2069,6 +2069,7 @@ public class ReceiptServiceImpl implements ReceiptService {
|
|
|
* 【中信银行】您尾号0897的中信卡于03月14日16:01,支付宝存入人民币5994.06元,当前余额为人民币1000000.00元。
|
|
|
* 【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币10000.00元,当前余额为人民币13871.67元。
|
|
|
* 您的账户2400于07月21日11:13收入人民币1000.79元,余额1000.79元。【华夏银行】
|
|
|
+ * 您公司账户9452,于08231217收入(网银网上支付)人民币1000.00当前余额1000.19,对方为广州市埃墨莉素生物科技有限公司(账号*0659)(我行吸收的本外币存款依照《存款保险条例》受到保护)【中国银行】
|
|
|
*/
|
|
|
private ResponseJson<ReceiptVo> identifyMessage(String message) throws Exception {
|
|
|
if (message.contains("银行")) {
|
|
@@ -2095,7 +2096,7 @@ public class ReceiptServiceImpl implements ReceiptService {
|
|
|
if (message.contains("支付宝")) {
|
|
|
receivableDesc += "-支付宝";
|
|
|
}
|
|
|
- } else if (receivableDesc.contains("广发银行") || receivableDesc.contains("建设银行") || receivableDesc.contains("华夏银行")) {
|
|
|
+ } else if (receivableDesc.contains("广发银行") || receivableDesc.contains("建设银行") || receivableDesc.contains("华夏银行") || receivableDesc.contains("中国银行")) {
|
|
|
// 匹配的第一组数字为银行卡尾号
|
|
|
Matcher matcherBank = PATTERN_NUMBER.matcher(message);
|
|
|
if (matcherBank.find()) {
|
|
@@ -2139,13 +2140,21 @@ public class ReceiptServiceImpl implements ReceiptService {
|
|
|
} else if (difference < 0) {
|
|
|
time = DateUtils.format(DateUtils.addMonth(DateUtils.parseDate(time), -1), "yyyy-MM-dd HH:mm:ss");
|
|
|
}
|
|
|
- } else if(Arrays.asList(22).contains(typeId)){
|
|
|
+ } else if (Arrays.asList(22).contains(typeId)) {
|
|
|
time = year + "-" + contentTime.get(1) + "-" + contentTime.get(2) + " " + contentTime.get(3);
|
|
|
int difference = DateUtils.differentDays(time);
|
|
|
if (difference < 0) {
|
|
|
time = Integer.parseInt(year) - 1 + "-" + contentTime.get(1) + "-" + contentTime.get(2) + " " + contentTime.get(3);
|
|
|
}
|
|
|
- }else {
|
|
|
+ } else if (Arrays.asList(23).contains(typeId)) {
|
|
|
+ String s = contentTime.get(1);
|
|
|
+ String s1 = s.substring(0, 2) + "-" + s.substring(2, 4) + " " + s.substring(4, 6) + ":" + s.substring(6, 8) + ":" + "00";
|
|
|
+ time = year + "-" + s1;
|
|
|
+ int difference = DateUtils.differentDays(time);
|
|
|
+ if (difference < 0) {
|
|
|
+ time = Integer.parseInt(year) + "-" + s1;
|
|
|
+ }
|
|
|
+ } else {
|
|
|
time = year + "-" + contentTime.get(1) + "-" + contentTime.get(2) + " " + contentTime.get(3) + ":" + "00";
|
|
|
int difference = DateUtils.differentDays(time);
|
|
|
if (difference < 0) {
|
|
@@ -2166,6 +2175,14 @@ public class ReceiptServiceImpl implements ReceiptService {
|
|
|
int index2 = message.indexOf("元", index);
|
|
|
money = Double.parseDouble(message.substring(index + 4, index2));
|
|
|
}
|
|
|
+ } else if (23 == typeId) {
|
|
|
+ if (message.contains("人民币")) {
|
|
|
+ index = message.indexOf("人民币");
|
|
|
+ int index2 = message.indexOf("当前余额", index);
|
|
|
+ money = Double.parseDouble(message.substring(index + 3, index2));
|
|
|
+ } else {
|
|
|
+ throw new Exception("短信识别错误!");
|
|
|
+ }
|
|
|
} else {
|
|
|
if (message.contains("入人民币")) {
|
|
|
index = message.indexOf("入人民币");
|
|
@@ -2211,26 +2228,34 @@ public class ReceiptServiceImpl implements ReceiptService {
|
|
|
}
|
|
|
|
|
|
/**
|
|
|
- * 隐藏短信余额
|
|
|
- *
|
|
|
- * 贵公司尾号7297的账户5月23日15时30分往来款收入人民币1800.00元,余额7055.50元。对方户名:哈尔滨爱丽达医疗美容管理有限公司爱建医疗美容诊所。[建设银行]
|
|
|
- * 【广发银行】尊敬的客户,贵司账号后四位0115 的账户于08日13:55 收入一笔方芳尾数为8067的账户转账1850.00元,手续费0.00元。账户余额:1000000.00元。
|
|
|
- * 【广发银行】您末四位为0115的企业账户于12日16:09收入人民币5000.00元(深圳同城)。账户余额:8907.21元。
|
|
|
- * 【中信银行】贵公司尾号7172的中信账号于03月15日17:25,二代支付存入人民币3132.30元,当前余额为人民币4373.07元。
|
|
|
- * 【中信银行】您尾号0897的中信卡于03月06日11:44,存入人民币2358.00元,当前余额为人民币1000000.00元。
|
|
|
- * 【中信银行】您尾号0897的中信卡于03月19日13:37,财付通快捷支付存入人民币11348.45元,当前余额为人民币1000000.00元。
|
|
|
- * 【中信银行】您尾号0897的中信卡于03月14日16:01,支付宝存入人民币5994.06元,当前余额为人民币1000000.00元。
|
|
|
- * 【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币10000.00元,当前余额为人民币13871.67元。
|
|
|
- * 您的账户2400于07月21日11:13收入人民币1000.79元,余额1000.79元。【华夏银行】
|
|
|
+ * 隐藏短信余额
|
|
|
+ * <p>
|
|
|
+ * 贵公司尾号7297的账户5月23日15时30分往来款收入人民币1800.00元,余额7055.50元。对方户名:哈尔滨爱丽达医疗美容管理有限公司爱建医疗美容诊所。[建设银行]
|
|
|
+ * 【广发银行】尊敬的客户,贵司账号后四位0115 的账户于08日13:55 收入一笔方芳尾数为8067的账户转账1850.00元,手续费0.00元。账户余额:1000000.00元。
|
|
|
+ * 【广发银行】您末四位为0115的企业账户于12日16:09收入人民币5000.00元(深圳同城)。账户余额:8907.21元。
|
|
|
+ * 【中信银行】贵公司尾号7172的中信账号于03月15日17:25,二代支付存入人民币3132.30元,当前余额为人民币4373.07元。
|
|
|
+ * 【中信银行】您尾号0897的中信卡于03月06日11:44,存入人民币2358.00元,当前余额为人民币1000000.00元。
|
|
|
+ * 【中信银行】您尾号0897的中信卡于03月19日13:37,财付通快捷支付存入人民币11348.45元,当前余额为人民币1000000.00元。
|
|
|
+ * 【中信银行】您尾号0897的中信卡于03月14日16:01,支付宝存入人民币5994.06元,当前余额为人民币1000000.00元。
|
|
|
+ * 【中信银行】您尾号0897的中信卡于05月29日14:42,二代支付存入人民币10000.00元,当前余额为人民币13871.67元。
|
|
|
+ * 您的账户2400于07月21日11:13收入人民币1000.79元,余额1000.79元。【华夏银行】
|
|
|
+ * 您公司账户9452,于08231217收入(网银网上支付)人民币1000.00当前余额1000.19,对方为广州市埃墨莉素生物科技有限公司(账号*0659)(我行吸收的本外币存款依照《存款保险条例》受到保护)【中国银行】
|
|
|
*/
|
|
|
private String hiddenBalance(String message) {
|
|
|
message = message.replace(":", ":").trim();
|
|
|
int index = message.indexOf("余额");
|
|
|
if (index != -1) {
|
|
|
- int index2 = message.indexOf("元", index);
|
|
|
- String text1 = message.substring(0, index + 2);
|
|
|
- String text2 = message.substring(index2);
|
|
|
- message = text1 + "***" + text2;
|
|
|
+ if (message.contains("中国银行")) {
|
|
|
+ int index2 = message.lastIndexOf(",");
|
|
|
+ String text1 = message.substring(0, index + 2);
|
|
|
+ String text2 = message.substring(index2);
|
|
|
+ message = text1 + "***" + text2;
|
|
|
+ } else {
|
|
|
+ int index2 = message.indexOf("元", index);
|
|
|
+ String text1 = message.substring(0, index + 2);
|
|
|
+ String text2 = message.substring(index2);
|
|
|
+ message = text1 + "***" + text2;
|
|
|
+ }
|
|
|
}
|
|
|
return message;
|
|
|
}
|