Sfoglia il codice sorgente

增加小票手机号脱敏的处理

张洋 4 anni fa
parent
commit
c647cb580c

+ 2 - 0
lewaimai_pos_windows/order/CWaimaiOrder.cpp

@@ -162,6 +162,8 @@ bool CWaimaiOrder::InitData(std::string order_id, std::string order_no)
 			m_show_qiangdan_qrcode = data["show_qiangdan_qrcode"].GetString();
 
 			m_manzeng_name = data["manzeng_name"].GetString();
+
+			m_show_whole_phone = data["show_whole_phone"].GetString();
 		}
 	}
 

+ 2 - 0
lewaimai_pos_windows/order/CWaimaiOrder.h

@@ -109,5 +109,7 @@ public:
 	std::string m_show_qiangdan_qrcode;
 
 	std::string m_manzeng_name;
+
+	std::string m_show_whole_phone;
 };
 

+ 6 - 0
lewaimai_pos_windows/tool/CPosPrinter.cpp

@@ -643,6 +643,12 @@ void CPosPrinter::PrintWaimaiOrderShouyin(CWaimaiOrder& order)
             setting_printer_phone_big = true;
         }
 
+		//看看电话是否要脱敏
+		if (order.m_show_whole_phone == "1")
+		{
+			order.m_phone.replace(3, 4, 4, '*');
+		}
+
         string phone = "电话:" + CLewaimaiString::UTF8ToANSI(order.m_phone);
         POS_TextOut(phone, false, setting_printer_phone_big);
         POS_FeedLine();