瀏覽代碼

短信识别修复

huangzhiguo 2 年之前
父節點
當前提交
1ba887b696

+ 3 - 1
src/main/java/com/caimei365/order/mapper/cmOfflineCollectionMapper.java

@@ -4,6 +4,8 @@ import com.caimei365.order.model.po.cmOfflineCollectionPo;
 import org.apache.ibatis.annotations.Mapper;
 import org.apache.ibatis.annotations.Param;
 
+import java.util.List;
+
 /**
  * Description
  *
@@ -22,5 +24,5 @@ public interface cmOfflineCollectionMapper {
      * 检测银行账号是否删除
      * @return
      */
-    cmOfflineCollectionPo detectionAccount(@Param("bankAccount") String bankAccount);
+    List<cmOfflineCollectionPo> detectionAccount(@Param("bankAccount") String bankAccount);
 }

+ 5 - 3
src/main/java/com/caimei365/order/service/impl/ReceiptServiceImpl.java

@@ -230,9 +230,11 @@ public class ReceiptServiceImpl implements ReceiptService {
         if (message.length() > 10) {
             int index = message.indexOf("尾号");
             String account = message.substring(index + 2, index + 2 + 4);
-            cmOfflineCollectionPo collectionPo = collectionMapper.detectionAccount(account);
-            if (collectionPo.getIsDisable() == 0) {
-                return "-1";
+            List<cmOfflineCollectionPo> collectionPo = collectionMapper.detectionAccount(account);
+            for (cmOfflineCollectionPo po: collectionPo) {
+                if (po.getIsDisable() == 0) {
+                    return "-1";
+                }
             }
             return "0";
         }