Explorar o código

提交查看订单详情身份证为01时改为身份证bug处理

hxl13994548489 %!s(int64=2) %!d(string=hai) anos
pai
achega
69c9aa07c6

+ 22 - 0
src/main/java/com/ydtech/modules/order/service/impl/InsOrdersServiceImpl.java

@@ -754,6 +754,8 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         //orderAndAreaCompany.setOwnerinfo(setNewPhone(orderAndAreaCompany.getOwnerinfo()));
         //orderAndAreaCompany.setApplyinfo(setNewPhone(orderAndAreaCompany.getApplyinfo()));
         //orderAndAreaCompany.setInsureinfo(setNewPhone(orderAndAreaCompany.getInsureinfo()));
+        //add by  hxl  处理特殊情况返回信息 身份证信息变为01时前台返回身份证信息
+        orderAndAreaCompany.setOwnerinfo(setNewIdentifyType(orderAndAreaCompany.getOwnerinfo()));
         return HttpResult.ok("success", orderAndAreaCompany);
     }
     /**
@@ -1102,6 +1104,26 @@ public class InsOrdersServiceImpl extends ServiceImpl<InsOrdersMapper, InsOrders
         orderAndAreaCompany.setOwnerinfo(setNewPhone(orderAndAreaCompany.getOwnerinfo()));
         orderAndAreaCompany.setApplyinfo(setNewPhone(orderAndAreaCompany.getApplyinfo()));
         orderAndAreaCompany.setInsureinfo(setNewPhone(orderAndAreaCompany.getInsureinfo()));
+        //add by  hxl  处理特殊情况返回信息 身份证信息变为01时前台返回身份证信息
+        orderAndAreaCompany.setOwnerinfo(setNewIdentifyType(orderAndAreaCompany.getOwnerinfo()));
         return HttpResult.ok("success", orderAndAreaCompany);
     }
+
+
+    /**
+     *  @version
+     *  @author: hxl
+     *  @Date: 2024/5/9 16:18
+     *  @Description:  处理身份证为01返回身份证
+     */
+    private static JSONObject setNewIdentifyType(JSONObject ownerinfo) {
+        if(ownerinfo !=null ){
+            String identifyType = ownerinfo.getString("identifyType");
+            if("01".equals(identifyType)){
+                identifyType="身份证";
+            }
+            ownerinfo.put("identifyType",identifyType);
+        }
+        return ownerinfo;
+    }
 }